/* Cufon */
Cufon.replace('h1');
Cufon.replace('h2');
Cufon.replace('h3');
Cufon.replace('.img');
Cufon.replace('#menu td a', { hover: true });
// · · · · · · · · · · · JQUERY 
$(document).ready(function(){
	
//Olivdo contraseña
	
	$("#btn_lost_pass").click(function(){
		$(".lost_pass").slideToggle(300);
		return false;
		}
	);
	
	
	$("#utilMenu ul li a").click(function(e) {
		switch(e.target.id){
		case "win_lng1":  
            //change status & style menu  
            $("#win_lng1").addClass("active");  
            $("#win_login1").removeClass("active");  
            //display selected division, hide others  
            $(".lng").fadeIn(700);  
            $(".login").css("display", "none");  
			return false;
        break;
		case "win_login1":  
            //change status & style menu  
            $("#win_lng1").removeClass("active");  
            $("#win_login1").addClass("active");  
            //display selected division, hide others  
            $(".lng").css("display", "none");  
            $(".login").fadeIn(700);
			return false;
        break;
		}
	});
	
	$(".b_close1").click(function () {
			$(".lng").stop(true,true).fadeOut();
			$(".login").stop(true,true).fadeOut();
			$("#win_lng1").removeClass("active");  
            $("#win_login1").removeClass("active");
			
			return false;
		}
	);
	$("#link_win_info1").click (function(){
		$("#win_info1").show();
		return false;
	});
	$(".b_close1").click(function () {
			$("#win_info1").hide(); 
			return false;
		}
	);
	// Galeria - Hide & Show					   
	$("#win_photo1").click(function(){
		$("#body_off").show();
		$("#body_off").fadeTo(500, 0.80);
		$("#win_galeria").fadeIn(500);
		return false;
		}
	);
	$("#body_off").click(function(){
		$("#body_off").hide();
		$("#body_off").fadeTo(200, 0.00);
		$("#win_galeria").fadeOut(200);
		return false;
		}
	);
	// Galeria - Hide & Show					   
	$("#win_video1").click(function(){
		$("#body_off").show();
		$("#body_off").fadeTo(500, 0.80);
		$("#win_video").fadeIn(500);
		return false;
		}
	);
	$(".win_video_b_close1").click(function(){
		$("#body_off").hide();
		$("#body_off").fadeTo(200, 0.00);
		$("#win_video").fadeOut(200);
		return false;
		}
	);
	$("#body_off").click(function(){
		$("#body_off").hide();
		$("#body_off").fadeTo(200, 0.00);
		$("#win_video").fadeOut(200);
		return false;
		}
	);
	//Init body_off
	$("#body_off").css("height", $(document).height());
	$("#body_off").fadeTo("fast", 0.0);
	

	//div informacion habitacion
	var div_info = null;
	$("a.tarifa_mas_info").click(function(e) {
		if(div_info!=null)$(div_info).fadeOut(700);
		div_info = "#d_"+e.target.id;
		$("#d_"+e.target.id).fadeIn(700);
        return false;
	});

	$("a.habitacion_mas_info").click(function(e) {
		if(div_info!=null)$(div_info).fadeOut(700);
		div_info = "#d_"+e.target.id;

		$("#d_"+e.target.id).fadeIn(700);
        return false;
	});


	$("a.tarifa_mas_info_cerrar").click(function(e) {
		$("#d"+e.target.id).fadeOut(700);
		div_info = 	null;
        return false;
	});

	$("a.habitacion_mas_info_cerrar").click(function(e) {
		$("#d"+e.target.id).fadeOut(700);
		div_info = 	null;
        return false;
	});
	
	// Nota legal - hide & Show					   
	$("#win_nota1").click(function(){
		$("#body_off").show();
		$("#body_off").fadeTo(500, 0.80);
		$("#win_notalegal").fadeIn(500);
		return false;
		}
	);
	$("#body_off").click(function(){
		$("#body_off").hide();
		$("#body_off").fadeTo(200, 0.00);
		$("#win_notalegal").fadeOut(200);
		return false;
		}
	);
	$(".win_nota_b_close1").click(function(){
		$("#body_off").hide();
		$("#body_off").fadeTo(200, 0.00);
		$("#win_notalegal").fadeOut(200);
		return false;
		}
	);
	$("#body_off").fadeTo("fast", 0.0);
});
$(window).resize(function(){
	$("#body_off").css("height", $(document).height());
});
// Galeria - Esconder galeria desde flash.
function galleryHide() {
	//$("#body_off").fadeOut(200);
	$("#body_off").fadeTo(200, 0.00, hide);
	$("#win_galeria").fadeOut(200);
	function hide() {
		  $("#body_off").hide();
	}
};

// · · · · · · · · · · · Window Nota_legal
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
