$(document).ready(function() {
	
	$('.hoverMenu').hover(function(){
		var id = $(this).attr("id");
		$('#logo_'+id).fadeIn(150);
	},function(){
		var id = $(this).attr("id");
		var classe = $(this).attr("class");
		if (classe.indexOf('on') == -1) $('#logo_'+id).fadeOut(150);
	});
	
	$('#alpha > a').lightBox();
	
	if($('#beta a').find("img").length > 0) {  
		$('#beta a img').each(function(index) {
			if ($(this).parent().attr("rel") != 'external') $(this).parent().lightBox();
		});
	}
	
	if (document.getElementById("alert")) { $('#alert').slideDown("slow"); }
	
	if (document.getElementById("ticker01")) { $("#ticker01").liScroll(); };
	
	/* IE7 bug fix */
	$("#headerBottom li").each(function(index) {
		var id = $(this).attr("id");
		$('#logo_'+id).css("width", $(this).width());
	});
	
	
	
	/* AJOUT ATTRIBUT BLANK lien MIDDLE  */
	$("#beta a").not("p.dispo a").attr("target","_blank");
	

	/* ajout link popup vérif reservation */
	$("p.dispo").find("a").each(function() {
		
			switch($(this).text()) {
				case "fr":
				$(this).html("V&eacute;rifiez la disponibilit&eacute;");
				$(this).click(function() { window.open("http://www.hoteliers.com/wlpEngine.php?ID=1889%20&lang=fr","V&eacute;rifiez la disponibilit&eacute;","menubar=no, status=no, scrollbars=yes, menubar=no, width=700, height=700"); })
				break;
				case "de":
				$(this).html("kontrollieren");
				$(this).click(function() { window.open("http://www.hoteliers.com/wlpEngine.php?ID=1889%20&lang=de","kontrollieren","menubar=no, status=no, scrollbars=yes, menubar=no, width=700, height=700"); })
				break;
				case "nl":
				$(this).html("Controleer Beschikbaarheid");
				$(this).click(function() { window.open("http://www.hoteliers.com/wlpEngine.php?ID=1889%20&lang=nl","Controleer Beschikbaarheid","menubar=no, status=no, scrollbars=yes, menubar=no, width=700, height=700"); })
				break;
				default:
				$(this).html("V&eacute;rifiez la disponibilit&eacute;");
				$(this).click(function() { window.open("http://www.hoteliers.com/wlpEngine.php?ID=1889%20&lang=fr","V&eacute;rifiez la disponibilit&eacute;","menubar=no, status=no, scrollbars=yes, menubar=no, width=700, height=700"); })
			}
		
		
			
	})
	
	
	
	
	
	
});
