
$(document).ready( function() {
							
	//フォントサイズ変更
	$( "#fontsize a" ).textresizer({
		target: "#contents",
		type: "fontSize",
		sizes: [ "80%", "100%", "120%"],
		selectedIndex: 1
	});	
	
	//グローバルナビ暫定変更しない
	$("#gnav07").click(function(){
		$(this).find("a").attr("href","/recruit/");
	});
	
	//ロギング
	logging(location.pathname);
	$("a").click(function (){
		if($(this).attr("target") == "_blank")
			logging($(this).attr("href"));
	});

	//Google Analyticsログ
	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-2717398-5']);
	_gaq.push(['_trackPageview']);

	(function() {
		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName('script')[0];
		s.parentNode.insertBefore(ga, s);
	})();

});

$(document).ready(function() {

	//Default Action
	$(".tabbody").hide(); //Hide all content
	$(".tabhead li:first").addClass("current").show(); //Activate first tab
	$(".tabbody:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabhead li").click(function() {
		$("ul.tabhead li").removeClass("current"); //Remove any "active" class
		$(this).addClass("current"); //Add "active" class to selected tab
		$(".tabbody").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});

});



window.onload = function(){

    $(".zebra tr:nth-child(even)").addClass("even");

};



// scrolling page top
function backToTop() {
	var x1 = x2 = x3 = 0;
	var y1 = y2 = y3 = 0;
		if (document.documentElement) {
		x1 = document.documentElement.scrollLeft || 0;
		y1 = document.documentElement.scrollTop || 0;
	}
	if (document.body) {
		x2 = document.body.scrollLeft || 0;
		y2 = document.body.scrollTop || 0;
	}
	x3 = window.scrollX || 0;
	y3 = window.scrollY || 0;
	var x = Math.max(x1, Math.max(x2, x3));
	var y = Math.max(y1, Math.max(y2, y3));
	window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));
	if (x > 0 || y > 0) {
	window.setTimeout("backToTop()", 25);
	}
}

// input ロールオーバー
/*
jQuery(function($) {
	// 基本
	$('#nav a img').rollover();

	// inputもいける
	$('form input:image').rollover();

	// 複数指定も楽々
	$('#nav a img, form input:image').rollover();

	// 引数で _on の部分を指定できる
	$('#nav a img').rollover('_over');
});
*/

function logging(path){
	//自前ログ
	var param ="";
	param += "&agent=" + navigator.userAgent;
	param += "&screen=" + screen.width + "*" + screen.height;
	param += "&location=" + path;
	$.ajax({
		type: "POST",
		url: "/log.php",
		data: param,
		success: function(data){
		}
	});
}


