
		
		//設定可能なパラメーター///////////////////////////////////////////////////////////////////////
		
		//一枚の画像を表示する秒数
		var intervalSec = 2;
		
		//画像を切り替える時のフェードアウトの秒数
		var animationSec = 4;
		
		//画像をWindowサイズに自動調整するか
		var autoAdjustImgsize = true;
		
		//スクロールバーを表示させない最大のwindowの高さ
		var heightLimit = 1120;
		var widthLimit = 900;
		
		//ボタンの高さ
		var heightButton = 22;
		
		//フッターの高さ
		var heightFooter = 280;
		
		//これより下はいじらないで下さい///////////////////////////////////////////////////////////////////////
		
		function menuPositionFix(){

			
			if(!menuShowing){
				$("#footer").css('display','none');
				$("#header").css('display','none');
			}
			
			var screenBottom = $(window).scrollTop()+$(window).height();
			$("#action_buttons").css({position: "absolute",top:(screenBottom-heightButton)+"px"});
			$("#footer").css({position: "absolute",top:screenBottom+"px"});
			$("#header").css({position: "absolute",top:screenBottom+"px"});
			
		}
		
		var winHeight;
		var winWidth;
		var docHeight;
		var menuShowing = false;
		
		$(document).ready(function() {
			//X座標のスクロールバーを一切表示させない
			document.body.style.overflowX = 'hidden';
			document.body.style.overflowY="auto";
			
			winHeight = $(window).height();
			winWidth = $(window).width();
			docHeight = $(document.body).height();
			
			if(winWidth < widthLimit){
				document.body.style.overflowX = 'auto';
				winWidth = widthLimit;
			}
			
			var imageHeight = 0;
			
			var i = 0;

			$("#visual img").each(function(){
				
				if(jQuery.browser.version == '6.0')
					$(this).css('position','absolute');
					
				$(this).css('top','0px');
				$(this).css('left','0px');
				$(this).css('z-index',0);
				
				//縦横比を保存
				var rate = parseFloat($(this).css('height')) / parseFloat($(this).css('width'));

				if(autoAdjustImgsize){
					$(this).css('width',winWidth);
					$(this).css('height',winWidth * rate);
					imageHeight = winWidth * rate;
				}

			});
			

			$('#action_buttons').css('z-index',20);
			$("#contents").css('z-index',10);
			$("#contents").css('width',winWidth + 'px');
			menuPositionFix();
			
			$("#action_buttons").mouseenter(function(){
				
				menuShowing = true;	
				
				$("#footer").css('display','block');
				$("#header").css('display','block');
				$("#action_buttons").css('opacity','0');
				$("#action_buttons").css('display','none');
				
				$("#footer").css("z-index",98);
				$("#header").css("z-index",99);
			
				var screenBottom = $(window).scrollTop()+$(window).height();

				$("#footer").animate({top:screenBottom-heightFooter+"px"},500);
				$("#header").animate({top:screenBottom-heightFooter+"px"},500);
				
				$(window).css('overflow','hidden');
				
				document.body.style.overflowY="hidden";
				
			});

			$("body").mousemove(function(e){
				
				if(menuShowing && e.pageY < $(window).scrollTop()+$(window).height() - heightFooter && menuShowing){
					
					$("#footer").animate({top:($(window).scrollTop()+$(window).height())+"px"},1000);
					$("#header").animate({top:($(window).scrollTop()+$(window).height())+"px"},1000,function(){					

						$("#action_buttons").css('display','block');
						$("#action_buttons").animate({opacity:1},500);
						document.body.style.overflowY="auto";

						menuPositionFix();
					});
					
					menuShowing = false;
				}

			});

			$("#visual").css('opacity',0);
			$("#contents").css('display','none');

			$("#footer").css("z-index",98);
			$("#header").css("z-index",99);
			$("#action_buttons").css("z-index",99);
							
		});
		
		$(window).load(function() {

			$('#loading').css("display","none");
			

           $("#visual").animate({opacity:1},2000,function(){
                   $("#contents").css('display','block');
           });
		});
		

		$(window).scroll(function(){
			menuPositionFix();
		});


		$(window).resize(function() {
			
			if(menuShowing)
				return;
				
			var winHeight = $(window).height();
			var winWidth = $(window).width();
			
			if(winWidth < widthLimit){
				document.body.style.overflowX = 'auto';
				winWidth = widthLimit;
			}
			var imageHeight = 0;
			var i = 0;
			
			$("#visual img").each(function(){
				var rate = parseFloat($(this).css('height')) / parseFloat($(this).css('width'));	
				$(this).css('width',winWidth);
				$(this).css('height',winWidth * rate);
			});
			
			$('#contents').css('width',winWidth);
			
			
			menuPositionFix();

		});



