var userAgent = window.navigator.userAgent.toLowerCase();
if (userAgent.indexOf("msie") == -1) {
	document.write('<style type="text/css">#header,#mainImage,#container,#footer { display: none; }</style>');
}

var i = 0;
var int = 0;
$(window).bind("load", function() {
	$('#header').fadeIn(800); // box1のフェードインの実行
	var int=setInterval("sFade(i)",600);  // 1000ミリ秒ごとにフェードインの処理の実行
});
function sFade() {
	if (i >= 0) {
		clearInterval(int); // setIntervalの解除
	}
	if (i == 0) {
		$('#mainImage').fadeIn(1000); // box2のフェードインの実行
		$('#container').fadeIn(1000); // box2のフェードインの実行
		$('#footer').fadeIn(1500); // box3のフェードインの実行
	}
    i++;
}

$(function(){

	$('a img').hover(function(){
		$(this).attr('src', $(this).attr('src').replace('_off', '_on'));
	}, function(){
		if (!$(this).hasClass('currentPage')) {
			$(this).attr('src', $(this).attr('src').replace('_on', '_off'));
		}
	});
});

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-503994-1']);
_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);
})();

