function periodical() { //揺らす
  $('.box_enter img').effect('shake', { times:2 , direction:"up" , distance:5 }, 100); 
} 
$(document).ready(function() { 
//  $('.box_enter').hide().css('display','').fadeIn(600); 
  var shake = setInterval(periodical, 2000);

  $('.box_enter').click(function() { 
    clearInterval(shake); 
  })
  
  var base_bg_height = $(window).height(); //背景に紙を敷く
  $(".base_bg").css("height",base_bg_height);
  
  var stain_height = $(window).height(); //背景にシミを敷く
  $("#stain").css("height",stain_height);
  
  $(window).scrollTop(0);//背景に紙を敷く_下部
	var s_top = $(window).scrollTop();
	/*
	var menu_bg_top = ($(window).height()+s_top)-150;
	$(".menu_bg").css("top",menu_bg_top);
	*/
	
　$(window).resize(function(){//背景の紙がリサイズに追従
	var s_top = $(window).scrollTop();//背景
	var base_bg_height = $(window).height()+s_top;
		$(".base_bg").css("height",base_bg_height);
	/*
	var menu_bg_top = ($(window).height()+s_top)-150;
	$(".menu_bg").css("top",menu_bg_top);
	*/
	var stain_height = $(window).height(); //背景のシミ
  　$("#stain").css("height",stain_height);
　})

　$(window).scroll(function(){//背景の紙がスクロールに追従
	var s_top = $(window).scrollTop();//背景
	var base_bg_height = $(window).height()+s_top;
		$(".base_bg").css("height",base_bg_height);
	var s_top = $(window).scrollTop();//メニュー背景
	/*
	var menu_bg_top = ($(window).height()+s_top)-150;
		$(".menu_bg").css("top",menu_bg_top);
	*/
　});

});
  
  

$(function(){
		$('.box_1').addClass('firstset');
		$('.box_2').addClass('firstset');
		$('.box_3').addClass('firstset');
		$('.box_4').addClass('firstset');
		$('.box_5').addClass('firstset');
		//$('.box_enter').addClass('firstset');
		$(".logo_small").css("opacity",'0')
		
	
		$('.box_enter').click(function(){		   
			$('.box_1').animate({"left" : '100px' ,"top" : '400px'},700,"easeOutExpo");
			$('.box_2').css("z-index","100").animate({"left" : '240px' ,"top" : '300px'},700,"easeOutExpo");
			$('.box_3').animate({"left" : '390px' ,"top" : '370px'},700,"easeOutExpo");
			$('.box_4').animate({"left" : '610px' ,"top" : '450px'},700,"easeOutExpo");
			$('.box_5').animate({"left" : '730px' ,"top" : '330px'},700,"easeOutExpo");
			$('.box_enter').animate({"opacity" : '0'},100,function(){$('.box_enter').remove();});
			$('.footer_credit').animate({"opacity" : '0'},100,function(){$('.footer_credit').remove();});
			
			/*
			$('#stain').css("background-image",'none');//背景のシミを入れ替える
						$('#stain').css("background-image",'url(images/stain_enter.jpg)');
						$('#stain').css("opacity",'0')
						$("#stain").animate({"opacity" : '+=1'},700)
			*/
			})
		
		
})
$(function(b1){//アバウト
		 $(".box_1").hover(function(){//マウスオーバーの動き
						$('.box_1 .image').stop().animate({"top" : '-15px'},500,"easeOutBounce");
						},
						function(){
						$('.box_1 .image').stop().animate({"top" : '0px'},300,"easeOutBounce");
						}
						)
		,$('.box_1').click(function(){//クリックしたら
						$(".box_1_contents").css("display",'block');//必要な#contentsだけ表示させる
							$("#about_container").css("display",'block');//必要な#approach_contentsを表示させる
						$(".box_2_contents").css("display",'none');
						$(".box_3_contents").css("display",'none');
						$(".box_4_contents").css("display",'none');
						$(".box_5_contents").css("display",'none');
						
						/*
						$('#stain').css("background-image",'none');//背景のシミを入れ替える
						$('#stain').css("background-image",'url(images/stain_about.jpg)');
						$('#stain').css("opacity",'0')
						$("#stain").animate({"opacity" : '+=1'},700)
						*/
						
						//メニューが落ちる
						$(window).scrollTop(0);//スクロールを一番上にする
						var s_top = $(window).scrollTop();
						var i = ($(window).height()+s_top)-110;
						$('.box_1').animate({"top" : i},700,"easeOutBounce")
						$('.box_2').animate({"top" : i},800,"easeOutBounce")
						$('.box_3').animate({"top" : i},900,"easeOutBounce");
						$('.box_4').animate({"top" : i},900,"easeOutBounce");
						$('.box_5').animate({"top" : i},900,"easeOutBounce");
						
						$(".logo_large").animate({"opacity" : '0',"top" : 200},300,function(){$('.logo_large').remove();})//トップのロゴが消える
						$(".logo_small").animate({"opacity" : '+=1',"top" : 20},700,"easeOutBounce")//右上ロゴがあらわれる
						
						$("#contents").css("top",'200px');//#contentsを200px下げる
						$(".box_1_contents").css("opacity",'0')
						$("#contents").animate({"top" : '130'},1000,"easeOutBounce")//#contentsを130pxの位置に移動させる
					　　$(".box_1_contents").animate({"opacity" : '+=1'},800)
					
							,$(window).resize(function(){//ウィンドウリサイズでメニューをウィンドウに追従
							var s_top = $(window).scrollTop();
							var i = ($(window).height()+s_top)-110;
							$('.box_1').css("top",i);
							$('.box_2').css("top",i);
							$('.box_3').css("top",i);
							$('.box_4').css("top",i);
							$('.box_5').css("top",i);
							});
							$(window).scroll(function(){//スクロールでメニューをウィンドウに追従
							var i = $(window).height()-110;
							var s_rei = $(window).scrollTop()+i;
							$('.box_1').css("top",s_rei);
							$('.box_2').css("top",s_rei);
							$('.box_3').css("top",s_rei);
							$('.box_4').css("top",s_rei);
							$('.box_5').css("top",s_rei);
							});
							return false;//「ロードする＜リンクさせてる＞」のときこれを書いておくと、ベージ遷移しない
						})});

$(function(b2){//ワークス
		 $(".box_2").hover(function(){//マウスオーバーの動き
						$('.box_2 .image').stop().animate({"top" : '-15px'},500,"easeOutBounce");
						},
						function(){
						$('.box_2 .image').stop().animate({"top" : '0px'},300,"easeOutBounce");
						}
						)
		,$('.box_2').click(function(){//クリックしたら
						$(".box_1_contents").css("display",'none');//必要な#contentsだけ表示させる
						$(".box_2_contents").css("display",'block');
							$("#works_container").css("display",'block');//必要な#works_containerを表示させる
						$(".box_3_contents").css("display",'none');
						$(".box_4_contents").css("display",'none');
						$(".box_5_contents").css("display",'none');
						
						$(".logo_large").animate({"opacity" : '0',"top" : 200},300,function(){$('.logo_large').remove();})//トップのロゴが消える
						$(".logo_small").animate({"opacity" : '+=1',"top" : 20},700,"easeOutBounce")//右上ロゴがあらわれる
						
						/*
						$('#stain').css("background-image",'none');//背景のシミを入れ替える
						$('#stain').css("background-image",'url(images/stain_works.jpg)');
						$('#stain').css("opacity",'0')
						$("#stain").animate({"opacity" : '+=1'},700)
						*/
						
						//メニューが落ちる
						$(window).scrollTop(0);//スクロールを一番上にする
						var s_top = $(window).scrollTop();
						var i = ($(window).height()+s_top)-110;
						$('.box_1').animate({"top" : i},700,"easeOutBounce")
						$('.box_2').animate({"top" : i},800,"easeOutBounce")
						$('.box_3').animate({"top" : i},900,"easeOutBounce");
						$('.box_4').animate({"top" : i},900,"easeOutBounce");
						$('.box_5').animate({"top" : i},900,"easeOutBounce");
						
						$("#contents").css("top",'130px');//works_containerの位置は上から130px
						
					　　$(".box_2_contents").animate({"opacity" : '+=1'},1000)
					
							,$(window).resize(function(){//ウィンドウリサイズでメニューをウィンドウに追従
							var s_top = $(window).scrollTop();
							var i = ($(window).height()+s_top)-110;
							$('.box_1').css("top",i);
							$('.box_2').css("top",i);
							$('.box_3').css("top",i);
							$('.box_4').css("top",i);
							$('.box_5').css("top",i);
							});
							$(window).scroll(function(){//スクロールでメニューをウィンドウに追従
							var i = $(window).height()-110;
							var s_rei = $(window).scrollTop()+i;
							$('.box_1').css("top",s_rei);
							$('.box_2').css("top",s_rei);
							$('.box_3').css("top",s_rei);
							$('.box_4').css("top",s_rei);
							$('.box_5').css("top",s_rei);
							});
							return false;//「ロードする＜リンクさせてる＞」のときこれを書いておくと、ベージ遷移しない
						})});

$(function(b3){//アプローチ
		 $(".box_3").hover(function(){//マウスオーバーの動き
						$('.box_3 .image').stop().animate({"top" : '-15px'},500,"easeOutBounce");
						},
						function(){
						$('.box_3 .image').stop().animate({"top" : '0px'},300,"easeOutBounce");
						}
						)
		,$('.box_3').click(function(){//クリックしたら
						$(".box_1_contents").css("display",'none');//必要な#contentsだけ表示させる
						$(".box_2_contents").css("display",'none');
						$(".box_3_contents").css("display",'block');
							$("#approach_container").css("display",'block');//必要な#approach_containerを表示させる
						$(".box_4_contents").css("display",'none');
						$(".box_5_contents").css("display",'none');
						
						/*
						$('#stain').css("background-image",'none');//背景のシミを入れ替える
						$('#stain').css("background-image",'url(images/stain_approach.jpg)');
						$('#stain').css("opacity",'0')
						$("#stain").animate({"opacity" : '+=1'},700)
						*/
						
						//メニューが落ちる
						$(window).scrollTop(0);//スクロールを一番上にする
						var s_top = $(window).scrollTop();
						var i = ($(window).height()+s_top)-110;
						$('.box_1').animate({"top" : i},700,"easeOutBounce")
						$('.box_2').animate({"top" : i},800,"easeOutBounce")
						$('.box_3').animate({"top" : i},900,"easeOutBounce");
						$('.box_4').animate({"top" : i},900,"easeOutBounce");
						$('.box_5').animate({"top" : i},900,"easeOutBounce");
						
						$(".logo_large").animate({"opacity" : '0',"top" : 200},300,function(){$('.logo_large').remove();})//トップのロゴが消える
						$(".logo_small").animate({"opacity" : '+=1',"top" : 20},700,"easeOutBounce")//右上ロゴがあらわれる
						
						$("#contents").css("top",'200px');//#contentsを160px下げる
						$(".box_3_contents").css("opacity",'0')
						$("#contents").animate({"top" : '160'},800,"easeOutBounce")
					　　$(".box_3_contents").animate({"opacity" : '+=1'},800)
					
							,$(window).resize(function(){//ウィンドウリサイズでメニューをウィンドウに追従
							var s_top = $(window).scrollTop();
							var i = ($(window).height()+s_top)-110;
							$('.box_1').css("top",i);
							$('.box_2').css("top",i);
							$('.box_3').css("top",i);
							$('.box_4').css("top",i);
							$('.box_5').css("top",i);
							});
							$(window).scroll(function(){//スクロールでメニューをウィンドウに追従
							var i = $(window).height()-110;
							var s_rei = $(window).scrollTop()+i;
							$('.box_1').css("top",s_rei);
							$('.box_2').css("top",s_rei);
							$('.box_3').css("top",s_rei);
							$('.box_4').css("top",s_rei);
							$('.box_5').css("top",s_rei);
							});
							return false;//「ロードする＜リンクさせてる＞」のときこれを書いておくと、ベージ遷移しない
						})});

$(function(b4){//ブログ
		 $(".box_4").hover(function(){//マウスオーバーの動き
						$('.box_4 .image').stop().animate({"top" : '-15px'},500,"easeOutBounce");
						},
						function(){
						$('.box_4 .image').stop().animate({"top" : '0px'},300,"easeOutBounce");
						}
						)
		,$('.box_4').click(function(){//クリックしたら
						$(".box_1_contents").css("display",'none');//必要な#contentsだけ表示させる
						$(".box_2_contents").css("display",'none');
						$(".box_3_contents").css("display",'none');
						$(".box_4_contents").css("display",'block');
							$("#blog_container").css("display",'block');//必要な#blog_containerを表示させる
						$(".box_5_contents").css("display",'none');
						
						/*
						$('#stain').css("background-image",'none');//背景のシミを入れ替える
						$('#stain').css("background-image",'url(images/stain_blog.jpg)');
						$('#stain').css("opacity",'0')
						$("#stain").animate({"opacity" : '+=1'},700)
						*/
						
						//メニューが落ちる
						$(window).scrollTop(0);//スクロールを一番上にする
						var s_top = $(window).scrollTop();
						var i = ($(window).height()+s_top)-110;
						$('.box_1').animate({"top" : i},700,"easeOutBounce")
						$('.box_2').animate({"top" : i},800,"easeOutBounce")
						$('.box_3').animate({"top" : i},900,"easeOutBounce");
						$('.box_4').animate({"top" : i},900,"easeOutBounce");
						$('.box_5').animate({"top" : i},900,"easeOutBounce");
						
						$(".logo_large").animate({"opacity" : '0',"top" : 200},300,function(){$('.logo_large').remove();})//トップのロゴが消える
						$(".logo_small").animate({"opacity" : '+=1',"top" : 20},700,"easeOutBounce")//右上ロゴがあらわれる
						
						$("#contents").css("top",'200px');//#contentsを160px下げる
						$(".box_4_contents").css("opacity",'0')
						$("#contents").animate({"top" : '100'},800,"easeOutExpo")
					　　$(".box_4_contents").animate({"opacity" : '+=1'},1000)
						$(".box_4_contents").html('<p class="loader"><img src="images/loader.gif" alt="" /></p>');//ローディング
					
						$(".box_4_contents").load("designersunion.php #content")//#contentsの中に読み込む
						,function(){$(this).appendTo('#blog_contents')
						}
					
							,$(window).resize(function(){//ウィンドウリサイズでメニューをウィンドウに追従
							var s_top = $(window).scrollTop();
							var i = ($(window).height()+s_top)-110;
							$('.box_1').css("top",i);
							$('.box_2').css("top",i);
							$('.box_3').css("top",i);
							$('.box_4').css("top",i);
							$('.box_5').css("top",i);
							});
							$(window).scroll(function(){//スクロールでメニューをウィンドウに追従
							var i = $(window).height()-110;
							var s_rei = $(window).scrollTop()+i;
							$('.box_1').css("top",s_rei);
							$('.box_2').css("top",s_rei);
							$('.box_3').css("top",s_rei);
							$('.box_4').css("top",s_rei);
							$('.box_5').css("top",s_rei);
							});
							return false;//「ロードする＜リンクさせてる＞」のときこれを書いておくと、ベージ遷移しない
						})});

$(function(b5){//コンタクト
		 $(".box_5").hover(function(){//マウスオーバーの動き
						$('.box_5 .image').stop().animate({"top" : '-15px'},500,"easeOutBounce");
						},
						function(){
						$('.box_5 .image').stop().animate({"top" : '0px'},300,"easeOutBounce");
						}
						)
		,$('.box_5').click(function(){//クリックしたら
						$(".box_1_contents").css("display",'none');//必要な#contentsだけ表示させる
						$(".box_2_contents").css("display",'none');
						$(".box_3_contents").css("display",'none');
						$(".box_4_contents").css("display",'none');
						$(".box_5_contents").css("display",'block');
							$("#contact_container").css("display",'block');//必要な#contact_containerを表示させる
						
						/*
						$('#stain').css("background-image",'none');//背景のシミを入れ替える
						$('#stain').css("background-image",'url(images/stain_contact.jpg)');
						$('#stain').css("opacity",'0')
						$("#stain").animate({"opacity" : '+=1'},700)
						*/
						
						//メニューが落ちる
						$(window).scrollTop(0);//スクロールを一番上にする
						var s_top = $(window).scrollTop();
						var i = ($(window).height()+s_top)-110;
						$('.box_1').animate({"top" : i},700,"easeOutBounce")
						$('.box_2').animate({"top" : i},800,"easeOutBounce")
						$('.box_3').animate({"top" : i},900,"easeOutBounce");
						$('.box_4').animate({"top" : i},900,"easeOutBounce");
						$('.box_5').animate({"top" : i},900,"easeOutBounce");
						
						$(".logo_large").animate({"opacity" : '0',"top" : 200},300,function(){$('.logo_large').remove();})//トップのロゴが消える
						$(".logo_small").animate({"opacity" : '+=1',"top" : 20},700,"easeOutBounce")//右上ロゴがあらわれる
						
						$("#contents").css("top",'220px');//#contentsを160px下げる
						$(".box_5_contents").css("opacity",'0')
						$("#contents").animate({"top" : '120'},800,"easeOutBounce")
					　　$(".box_5_contents").animate({"opacity" : '+=1'},800)

					
							,$(window).resize(function(){//ウィンドウリサイズでメニューをウィンドウに追従
							var s_top = $(window).scrollTop();
							var i = ($(window).height()+s_top)-110;
							$('.box_1').css("top",i);
							$('.box_2').css("top",i);
							$('.box_3').css("top",i);
							$('.box_4').css("top",i);
							$('.box_5').css("top",i);
							});
							$(window).scroll(function(){//スクロールでメニューをウィンドウに追従
							var i = $(window).height()-110;
							var s_rei = $(window).scrollTop()+i;
							$('.box_1').css("top",s_rei);
							$('.box_2').css("top",s_rei);
							$('.box_3').css("top",s_rei);
							$('.box_4').css("top",s_rei);
							$('.box_5').css("top",s_rei);
							});
							return false;//「ロードする＜リンクさせてる＞」のときこれを書いておくと、ベージ遷移しない
						})});