// JavaScript Document
$(document).ready(function(){

	$("#blocage").hide();
	$("#blocage").animate({opacity:0}, 1400, function (){
		$(this).css({height:"300%"});
		$(this).show();
		$(this).animate({opacity:0.9}, 700);
	});


	$.each($(".hz_menu"), function(){
		$.preloadImages("images/hotel_v_over.gif");
	});
	
	$(".hz_menu").hover(function(){
		$(this).css({backgroundImage:"url(images/fd_menuHz_over.gif)"});
	},
	function(){
		$(this).css({backgroundImage:"url(images/fd_menuHz.gif)"});
	})
	insertSWF();
});

jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}
function carte(URL){
	window.open(URL, "", "height=800,width=411,scrollbars,titlebar=no");
}

function afeno(filename){
	$("#lightBx").animate({opacity:0}, 400, function(){
		$("#lightBx").css({height:"0px"});
	});
	$("#mavesatra").css({left:"23%", top:"-20px", height:"10px", position:"absolute", width:"600px", margin:"auto", zIndex:"300", overflow:"scroll"});
	$("#mavesatra img:not([src='galery/photo/grand/"+filename+"'])").show();
}
function aseho(filename){
	$("#lightBx").css({height:($(document).attr("height")+10)+"px", opacity:0});
	$("#lightBx").animate({opacity:0.9});
	$("#mavesatra").css({left:"25%", top:"20px", height:"600px", position:"fixed", width:"100%", margin:"auto", zIndex:"300", overflow:"hidden"});
	$("#mavesatra img:not([src='galery/photo/grand/"+filename+"'])").hide();
}
function afenina(){
		$("#lightBx").css({height:"0px"});
	$("#lightBx").animate({opacity:0}, 400, function(){
	});
	$("#mavesatra").css({left:"23%", top:"-20px", height:"10px", position:"absolute", width:"600px", margin:"auto", zIndex:"300", overflow:"scroll"});
	$("#mavesatra img").show();
}
function insertSWF(){
	tab = $(".swf").text().split("+");
	content = "<object data='"+tab[0]+"' type='application/x-shockwave-flash' title='"+tab[4]+"' width='"+tab[1]+"' height='"+tab[2]+"'><param name='wmode' value='transparent' /><param name='play' value='true' /><param name='movie' value='"+tab[0]+"' /><param name='menu' value='false' /><param name='quality' value='high' /><param name='scalemode' value='noborder' /><p>"+tab[3]+"</p></object>";
	$(".swf").html(content);
}
