jQuery.event.add(window,'load',function()
{
	$('#entershop').fadeOut('slow',function(){
			$('#entershop').remove();
			$('#wrap').fadeIn('slow');
		});
});

$(function(){
	
	var audiosupport=1;
	var audioext='wav';
	try{
		var bellobj = new Audio('');
	}catch(er){
		audiosupport=0;
	}
	if(audiosupport)
	{
		if(bellobj.canPlayType)
		{
			audioext=bellobj.canPlayType('audio/ogg')?'ogg':'mp3';
		}
		bellobj.src='./shop/bell.'+audioext;
	}
	var ga=new Array();
	for(var i=5; i>=1; i--)
	{
		ga[i] = document.createElement('img');
		$(ga[i]).attr({'class':'animg', 'id': 'i'+i, src:"./shop/"+i+".jpg"});
		document.getElementById('wrap').appendChild(ga[i]);
	}

	
//$('#gate').hover(
//	function(){
//		$('#i1').fadeOut(200);
//		$('#i2').fadeOut(300);
//		},
//	function(){
//		$('#i2').fadeIn(200);
//		$('#i1').fadeIn(300);
//		}
//	);

$('#gate').mouseover(
	function(){
$('#i1').fadeOut(200);
$('#i2').fadeOut(300,function(){
		$('#i1').remove();
		$('#i2').remove();
		try{
		//var bellobj = new Audio('./shop/bell.wav');
		if(bellobj) bellobj.play();
		}catch(er){}
		$('#i3').fadeOut(1000,
		function(){$('#i4').fadeOut(1000,
			function(){
				location.href='http://le-petittrianon.shop-pro.jp/';
				$('#i5').fadeOut(1000,
				function(){location.href='http://le-petittrianon.shop-pro.jp/';}
				)}
			)}
		)

});				
		}
	);

	});
