

$(function() {
		
		var urlStr = 'http://kinmugistyle.jp/index.html';
		
		$('#twitter').socialbutton('twitter', {
			button: 'none',
			url:urlStr
		});
		$('#facebook_like').socialbutton('facebook_like', {
				button: 'button_count',
				url:urlStr
		});
		$('#facebook_share').socialbutton('facebook_share',{
				button: 'button',
				url:urlStr
		});
		$('#mixi').socialbutton('mixi_check', {
				key: '58edb3ac3c83f4eb1576201f8c3c8bee8d5b9043',
				url:urlStr
		});
		
		
		var mgn;
		var fw;
		if($.browser.name=="msie" && ($.browser.version<9)){
			mgn = 6;
			fw = 73;
		}else{
			mgn = 0;
			fw = 71;
		}
		$("#twitter").css("width",$("#twitter").width()+mgn);
		$("#facebook_like").css("width",fw);
		var socialCount = 100;
	 	setTimeout(function(){
			var wid = $("#twitter").width()+$("#facebook_like").width()+$("#facebook_share").width()+$("#mixi").width()+15;
			$("#socialHiddenButton").css("width",wid);
			$("#socialHiddenButtonOvLay").css("width",wid);
		}, socialCount);
		
		var logoCount = 1300;
	 	setTimeout(function(){$("#hdLogo").fadeIn(2000);}, logoCount);
		
		
		$("div#cntsSection01Element").css("top",$("#cntsSection01Bdy").height() + $("#cntsSection01Bdy").position().top + 20);
		
		$("#cntsSection01Image").css("display","none");
		$("#cntsSection01Image").css("visibility","visible");
		var section01ImageCount = 2000;
 		setTimeout(function(){$("#cntsSection01Image").fadeIn(500);}, section01ImageCount);
		$("#cntsSection01Date").css("display","none");
		$("#cntsSection01Date").css("visibility","visible");
		var section01DateCount = 2000;
 		setTimeout(function(){$("#cntsSection01Date").fadeIn(500);}, section01DateCount);
		$("#cntsSection01Bdy").css("display","none");
		$("#cntsSection01Bdy").css("visibility","visible");
		var section01BdyCount = 2500;
 		setTimeout(function(){$("#cntsSection01Bdy").fadeIn(500);}, section01BdyCount);
		$("#cntsSection01Element").css("display","none");
		$("#cntsSection01Element").css("visibility","visible");
		var section01ElementCount = 2500;
 		setTimeout(function(){$("#cntsSection01Element").fadeIn(500);}, section01ElementCount);
		var sec01Images = $("#cntsSection01Clickable img");
		$("#cntsSection01Clickable").hover(function(){
			for(var i=0; i < sec01Images.length; i++) {
				if(sec01Images[i].getAttribute("src").match("_off.")){
					sec01Images[i].setAttribute("src", sec01Images[i].getAttribute("src").replace("_off.", "_on."));
				}
			}
		}, function() {
			for(var i=0; i < sec01Images.length; i++) {
				if(sec01Images[i].getAttribute("src").match("_on.")){
					sec01Images[i].setAttribute("src", sec01Images[i].getAttribute("src").replace("_on.", "_off."));
				}
			}
		});
		$("#cntsSection01Clickable").click(function(){
			location.href='/shun/';
			return false;
		});
		
		$("div#cntsSection02Element").css("top",$("#cntsSection02Bdy").height() + $("#cntsSection02Bdy").position().top + 5);
		
		$("#cntsSection02Image").css("display","none");
		$("#cntsSection02Image").css("visibility","visible");
		var section02ImageCount = 2200;
 		setTimeout(function(){$("#cntsSection02Image").fadeIn(500);}, section02ImageCount);
		$("#cntsSection02Date").css("display","none");
		$("#cntsSection02Date").css("visibility","visible");
		var section02DateCount = 2200;
 		setTimeout(function(){$("#cntsSection02Date").fadeIn(500);}, section02DateCount);
		$("#cntsSection02Bdy").css("display","none");
		$("#cntsSection02Bdy").css("visibility","visible");
		var section02BdyCount = 2700;
 		setTimeout(function(){$("#cntsSection02Bdy").fadeIn(500);}, section02BdyCount);
		$("#cntsSection02Element").css("display","none");
		$("#cntsSection02Element").css("visibility","visible");
		var section02ElementCount = 2700;
 		setTimeout(function(){$("#cntsSection02Element").fadeIn(500);}, section02ElementCount);
		var sec02Images = $("#cntsSection02Clickable img");
		$("#cntsSection02Clickable").hover(function(){
			for(var i=0; i < sec02Images.length; i++) {
				if(sec02Images[i].getAttribute("src").match("_off.")){
					sec02Images[i].setAttribute("src", sec02Images[i].getAttribute("src").replace("_off.", "_on."));
				}
			}
		}, function() {
			for(var i=0; i < sec02Images.length; i++) {
				if(sec02Images[i].getAttribute("src").match("_on.")){
					sec02Images[i].setAttribute("src", sec02Images[i].getAttribute("src").replace("_on.", "_off."));
				}
			}
		});
		$("#cntsSection02Clickable").click(function(){
			location.href='/recipe/';
			return false;
		});
		
		$("div#cntsSection03Element").css("top",$("#cntsSection03Bdy").height() + $("#cntsSection03Bdy").position().top + 15);
		
		$("#cntsSection03Image").css("display","none");
		$("#cntsSection03Image").css("visibility","visible");
		var section03ImageCount = 2400;
 		setTimeout(function(){$("#cntsSection03Image").fadeIn(500);}, section03ImageCount);
		$("#cntsSection03Date").css("display","none");
		$("#cntsSection03Date").css("visibility","visible");
		var section03DateCount = 2400;
 		setTimeout(function(){$("#cntsSection03Date").fadeIn(500);}, section03DateCount);
		$("#cntsSection03Bdy").css("display","none");
		$("#cntsSection03Bdy").css("visibility","visible");
		var section03BdyCount = 2900;
 		setTimeout(function(){$("#cntsSection03Bdy").fadeIn(500);}, section03BdyCount);
		$("#cntsSection03Element").css("display","none");
		$("#cntsSection03Element").css("visibility","visible");
		var section03ElementCount = 2900;
 		setTimeout(function(){$("#cntsSection03Element").fadeIn(500);}, section03ElementCount);
		var sec03Images = $("#cntsSection03Clickable img");
		$("#cntsSection03Clickable").hover(function(){
			for(var i=0; i < sec03Images.length; i++) {
				if(sec03Images[i].getAttribute("src").match("_off.")){
					sec03Images[i].setAttribute("src", sec03Images[i].getAttribute("src").replace("_off.", "_on."));
				}
			}
		}, function() {
			for(var i=0; i < sec03Images.length; i++) {
				if(sec03Images[i].getAttribute("src").match("_on.")){
					sec03Images[i].setAttribute("src", sec03Images[i].getAttribute("src").replace("_on.", "_off."));
				}
			}
		});
		$("#cntsSection03Clickable").click(function(){
			location.href='/selection/';
			return false;
		});
		
		$("div#cntsSection04Element").css("top",$("#cntsSection04Bdy").height() + $("#cntsSection04Bdy").position().top + 15);
		
		$("#cntsSection04Image").css("display","none");
		$("#cntsSection04Image").css("visibility","visible");
		var section04ImageCount = 2600;
 		setTimeout(function(){$("#cntsSection04Image").fadeIn(500);}, section04ImageCount);
		$("#cntsSection04Date").css("display","none");
		$("#cntsSection04Date").css("visibility","visible");
		var section04DateCount = 2600;
 		setTimeout(function(){$("#cntsSection04Date").fadeIn(500);}, section04DateCount);
		$("#cntsSection04Bdy").css("display","none");
		$("#cntsSection04Bdy").css("visibility","visible");
		var section04BdyCount = 3100;
 		setTimeout(function(){$("#cntsSection04Bdy").fadeIn(500);}, section04BdyCount);
		$("#cntsSection04Element").css("display","none");
		$("#cntsSection04Element").css("visibility","visible");
		var section04ElementCount = 3100;
 		setTimeout(function(){$("#cntsSection04Element").fadeIn(500);}, section04ElementCount);
		var sec04Images = $("#cntsSection04Clickable img");
		$("#cntsSection04Clickable").hover(function(){
			for(var i=0; i < sec04Images.length; i++) {
				if(sec04Images[i].getAttribute("src").match("_off.")){
					sec04Images[i].setAttribute("src", sec04Images[i].getAttribute("src").replace("_off.", "_on."));
				}
			}
		}, function() {
			for(var i=0; i < sec04Images.length; i++) {
				if(sec04Images[i].getAttribute("src").match("_on.")){
					sec04Images[i].setAttribute("src", sec04Images[i].getAttribute("src").replace("_on.", "_off."));
				}
			}
		});
		$("#cntsSection04Clickable").click(function(){
			location.href='/people/';
			return false;
		});
		
		$("div#cntsSection05Element").css("top",$("#cntsSection05Bdy").height() + $("#cntsSection05Bdy").position().top + 15);
		
		$("#cntsSection05Image").css("display","none");
		$("#cntsSection05Image").css("visibility","visible");
		var section05ImageCount = 2800;
 		setTimeout(function(){$("#cntsSection05Image").fadeIn(500);}, section05ImageCount);
		$("#cntsSection05Date").css("display","none");
		$("#cntsSection05Date").css("visibility","visible");
		var section05DateCount = 2800;
 		setTimeout(function(){$("#cntsSection05Date").fadeIn(500);}, section05DateCount);
		$("#cntsSection05Bdy").css("display","none");
		$("#cntsSection05Bdy").css("visibility","visible");
		var section05BdyCount = 3300;
 		setTimeout(function(){$("#cntsSection05Bdy").fadeIn(500);}, section05BdyCount);
		$("#cntsSection05Element").css("display","none");
		$("#cntsSection05Element").css("visibility","visible");
		var section05ElementCount = 3300;
 		setTimeout(function(){$("#cntsSection05Element").fadeIn(500);}, section05ElementCount);
		var sec05Images = $("#cntsSection05Clickable img");
		$("#cntsSection05Clickable").hover(function(){
			for(var i=0; i < sec05Images.length; i++) {
				if(sec05Images[i].getAttribute("src").match("_off.")){
					sec05Images[i].setAttribute("src", sec05Images[i].getAttribute("src").replace("_off.", "_on."));
				}
			}
		}, function() {
			for(var i=0; i < sec05Images.length; i++) {
				if(sec05Images[i].getAttribute("src").match("_on.")){
					sec05Images[i].setAttribute("src", sec05Images[i].getAttribute("src").replace("_on.", "_off."));
				}
			}
		});
		$("#cntsSection05Clickable").click(function(){
			location.href='/idea/120113/?pScjushoIdea';
			return false;
		});
		/*setTimeout(function(){
			timerFlg = true;
			$('#hdEnquete').stop().animate({height:'32px'},160);
		},5000);
		
		$('#hdEnquete').hover(function(){
			if(timerFlg){
				$(this).stop().animate({height:'260px'},{queue:false,duration:160});
			}
		}, function() {
			if(timerFlg){
				$(this).stop().animate({height:'32px'},{queue:false,duration:160});
			}
		});*/

		
});
