//**************************************
//背景画像をフィックス
//**************************************
//Max Image Fix2.0用
		$(function(){
				$('#maximage').maximage({
			
					onFirstImageLoaded: function(){
						jQuery('#maximage').fadeIn('fast');
					}
				});
			});

//**************************************
//フェードイン関係
//**************************************
//IE透過png対応
$(function(){ 
	$("#logo img").fixPng();
	$("#aboutWW img").fixPng();
	$(".fadeInObj").fixPng();
	$(".fadeInObj2").fixPng();
	$(".fadeInObj3").fixPng();
	$(".fadeInObj4").fixPng();
	$("#prev a img").fixPng();
	$("#next a img").fixPng();
})


//読み込み終わった時 にやること
  $(document).ready(function(){		
							 
  });

  
//フェードインしたい要素の透明度を0にする
$(function(){  
		//enterを非表示
		$("#maximage").animate({opacity:'0'},0)
		$("#enter").animate({opacity:'0'},0)
		//FadeInObj のクラスがついているものを非表示
    	$(".fadeInObj").animate({opacity:'0'},0)
    	$(".fadeInObj2").animate({opacity:'0'},0)
    	$(".fadeInObj3").animate({opacity:'0'},0)
		$(".fadeInObj4").animate({opacity:'0'},0)
		$("#prev a img").animate({opacity:'0'},0)
		$("#next a img").animate({opacity:'0'},0)	
 });
  

  
//画面全体フェードイン
$(function(){
			$('#wrapper:not(body #wrapper)').css({display:'block',opacity:'0'});
			$('#wrapper:not(body #wrapper)').animate({opacity:'1'},1500);
			$('body #wrapper').css({display:'block',opacity:'0'});
			$('body #wrapper').animate({opacity:'1'},1500);
	
	
			//フェードインする
			$("#maximage").delay( 200 ).animate({opacity:'1'},1000,"swing");
			$(".fadeInObj").delay( 3200 ).animate({opacity:'1'},3500,"swing");
			$(".fadeInObj2").delay( 400 ).animate({opacity:'1'},2500);
			$(".fadeInObj3").delay( 1000 ).animate({opacity:'1'},2500);
			$(".fadeInObj4").delay( 1200 ).animate({opacity:'1'},2100);
			$("#prev a img").delay( 1800 ).animate({opacity:'1'},2500);
			$("#next a img").delay( 1800 ).animate({opacity:'1'},2500);
			
			//enterのフェードイン
			$("#enter").delay( 1600 ).animate({opacity:'1'},2500);
			
			
			
			//ID #enterを押して移動した時はフェードアウト
			$('#enter').click(function(){
				var pass = $(this).attr("href");
				$('#wrapper').animate({opacity:'0'},1000,function(){
					location.href = pass;
				});
				return false;
			});
			
		
			//ID #prevを押して移動した時はフェードアウト
			$('#prev a').click(function(){
				var pass = $(this).attr("href");
				$('#wrapper').animate({opacity:'0'},1000,function(){
					location.href = pass;
				});
				return false;
			});
			
			//ID #nextを押して移動した時はフェードアウト
			$('#next a').click(function(){
				var pass = $(this).attr("href");
				$('#wrapper').animate({opacity:'0'},1000,function(){
					location.href = pass;
				});
				return false;
			});
	
});


//**************************************
//マウスオーバー時の設定
//**************************************
	//Top - #movie
	$(function(){
		$("#movie").hover(function(){
		$(this).stop().animate({opacity:'0.5'},500,"swing");
		}, function(){
		$(this).stop().animate({opacity:'1'},500,"swing");
		});
	});
	
	//Top - #Dress
	$(function(){
		$("#Dress").hover(function(){
		$(this).stop().animate({opacity:'0.5'},500);
		}, function(){
		$(this).stop().animate({opacity:'1'},500);
		});
	});
	
	
	//Top - #AfterParty
	$(function(){
		$("#AfterParty").hover(function(){
		$(this).stop().animate({opacity:'0.5'},500);
		}, function(){
		$(this).stop().animate({opacity:'1'},500);
		});
	});
	
	//Top - #StudioPhoto
	$(function(){
		$("#StudioPhoto").hover(function(){
		$(this).stop().animate({opacity:'0.5'},500);
		}, function(){
		$(this).stop().animate({opacity:'1'},500);
		});
	});
	
	//#enter
	$(function(){
		$("#enter").hover(function(){
		$(this).stop().animate({opacity:'0.5'},500,"swing");
		}, function(){
		$(this).stop().animate({opacity:'1'},500),"swing";
		});
	});
	
	
	//#prev img
	$(function(){
		$("#prev a").hover(function(){
		$("#prev a img").stop().animate({opacity:'0.5'},500);

		}, function(){
		$("#prev a img").stop().animate({opacity:'1'},500);
		});
	});
	
	//#next img
	$(function(){
		$("#next a").hover(function(){
		$("#next a img").stop().animate({opacity:'0.5'},500);
		}, function(){
		$("#next a img").stop().animate({opacity:'1'},500);
		});
	});
