$(function() {

	$(".tipo1").live("click", function (e) {
		e.preventDefault(); //prevent default link action
		$(this).overlay({
			mask: "white",
			effect: "apple",
			target: "#lbtamany1",
			api: true,
			/*onLoad: function () {
				$("button").button();
				$("button").fadeIn();
				$(".bannergira_foto").fadeIn();
				$(".bannergira_foto").innerfade({ speed: "slow", timeout: 4000, type: "sequence", containerheight: "298px" });
				x=this;
				$("#cerrar1").click(function() {
 			 		x.close();
					setTimeout('$("#op1").click();',800);
				});
				$("#cerrar2").click(function() {
 			 		x.close();
					setTimeout('$("#op2").click();',800);
				});
				$("#cerrar3").click(function() {
 			 		x.close();
					setTimeout('$("#op3").click();',800);
				});
				$("#cerrar4").click(function() {
 			 		x.close();
					setTimeout('$("#op4").click();',800);
				});
			},*/

			onBeforeLoad: function () {
				this.getOverlay().find(".contentWrap").load(this.getTrigger().attr("href"));
			},
			load: true
		});
		$("html, body").animate({scrollTop:0}, "slow");
	});
	$(".tipo2").live("click", function (e) {
		e.preventDefault(); //prevent default link action
		$(this).overlay({
			mask: "white",
			effect: "apple",
			target: "#lbtamany3",
			api: true,
		/*	onLoad: function () {
				$("button").button();
				$("button").fadeIn();
				$(".bannergira_foto").fadeIn();
				$(".bannergira_foto").innerfade({ speed: "slow", timeout: 4000, type: "sequence", containerheight: "298px" });
				x=this;
				$("#cerrar5").click(function() {
 			 		x.close();
					setTimeout('$("#tarifas1").click();',800);
				});
				$("#cerrar6").click(function() {
 			 		x.close();
					setTimeout('$("#tarifas2").click();',800);
				});
				$("#reservar5").click(function() {
 			 		x.close();
					setTimeout('$("#op5").click();',800);
				});
				$("#reservar6").click(function() {
 			 		x.close();
					setTimeout('$("#op6").click();',800);
				});
			},*/

			onBeforeLoad: function () {
				this.getOverlay().find(".contentWrap").load(this.getTrigger().attr("href"));
			},
			load: true
		});
		$("html, body").animate({scrollTop:0}, "slow");
	});
	$(".tipo3").live("click", function (e) {
		e.preventDefault(); //prevent default link action
		$(this).overlay({
			mask: "white",
			effect: "apple",
			target: "#lbtamany4",
			api: true,
			/*onLoad: function () {
				$("button").button();
				$("button").fadeIn();
				x=this;
				$("#cerrar1").click(function() {
 			 		x.close();
					setTimeout('$("#ficha6").click();',800);
				});
				$("#cerrar2").click(function() {
 			 		x.close();
					setTimeout('$("#op6").click();',800);
				});
				$("#cerrar3").click(function() {
 			 		x.close();
					setTimeout('$("#ficha5").click();',800);
				});
				$("#cerrar4").click(function() {
 			 		x.close();
					setTimeout('$("#op5").click();',800);
				});
			},*/

			onBeforeLoad: function () {
				this.getOverlay().find(".contentWrap").load(this.getTrigger().attr("href"));
			},
			load: true
		});
		$("html, body").animate({scrollTop:0}, "slow");
	});
	$(".bitacora_foto").live("click", function (e) {
		e.preventDefault(); //prevent default link action
		$(this).overlay({
			mask: "white",
			effect: "apple",
			target: "#lbtamany1",
			api: true,
			onBeforeLoad: function () {
				this.getOverlay().find(".contentWrap").load(this.getTrigger().attr("href"));
			},
			load: true
		});
		$("html, body").animate({scrollTop:0}, "slow");
	});
	$(".comollegar").live("click", function (e) {
		e.preventDefault(); //prevent default link action
		$(this).overlay({
			mask: "white",
			effect: "apple",
			target: "#lbtamany2",
			api: true,
			onBeforeLoad: function () {
				this.getOverlay().find(".contentWrap").load(this.getTrigger().attr("href"));
			},
			load: true
		});
		$("html, body").animate({scrollTop:0}, "slow");
	});
	$(".promociones").live("click", function (e) {
		e.preventDefault(); //prevent default link action
		$(this).overlay({
			mask: "white",
			effect: "apple",
			target: "#lbtamany5",
			api: true,
			/*onLoad: function () {
				$("button").button();
				$("button").fadeIn();
			},*/
			onBeforeLoad: function () {
				this.getOverlay().find(".contentWrap").load(this.getTrigger().attr("href"));
			},
			load: true
		});
		$("html, body").animate({scrollTop:0}, "slow");
	});
	$(".conocermas").live("click", function (e) {
		e.preventDefault(); //prevent default link action
		$(this).overlay({
			mask: "white",
			effect: "apple",
			target: "#lbtamany1",
			api: true,
			/*onLoad: function () {
				$("button").button();
				$("button").fadeIn();
				$(".bannergira_foto").fadeIn();
				$(".bannergira_foto").innerfade({ speed: "slow", timeout: 4000, type: "sequence", containerheight: "298px" });
			},*/

			onBeforeLoad: function () {
				this.getOverlay().find(".contentWrap").load(this.getTrigger().attr("href"));
			},
			load: true
		});
		$("html, body").animate({scrollTop:0}, "slow");
	});
	$(".reservar").live("click", function (e) {
		e.preventDefault(); //prevent default link action
		$(this).overlay({
			mask: "white",
			effect: "apple",
			target: "#lbtamany6",
			api: true,
			onBeforeLoad: function () {
				this.getOverlay().find(".contentWrap").load(this.getTrigger().attr("href"));
			},
		/*	onLoad: function () {
				$("button").button();
				$("button").fadeIn();
				$("#llegada").datepicker();
				$("#salida").datepicker();
				$(".boto_propi").button();
				$(".boto_propi").fadeIn();
				x=this;
				$("#cerrar_ficha1").click(function() {
 			 		x.close();
					setTimeout('$("#ficha1").click();',800);
				});
				$("#cerrar_ficha2").click(function() {
 			 		x.close();
					setTimeout('$("#ficha2").click();',800);
				});
				$("#cerrar_ficha3").click(function() {
 			 		x.close();
					setTimeout('$("#ficha3").click();',800);
				});
				$("#cerrar_ficha4").click(function() {
 			 		x.close();
					setTimeout('$("#ficha4").click();',800);
				});
			},*/
			load: true
		});
		$("html, body").animate({scrollTop:0}, "slow");
	});
	$(".reservar2").live("click", function (e) {
		e.preventDefault(); //prevent default link action
		$(this).overlay({
			mask: "white",
			effect: "apple",
			target: "#lbtamany7",
			api: true,
			onBeforeLoad: function () {
				this.getOverlay().find(".contentWrap").load(this.getTrigger().attr("href"));
			},
			/*onLoad: function () {
				$("button").button();
				$("button").fadeIn();
				$("#llegada").datepicker();
				$("#salida").datepicker();
				$(".boto_propi").button();
				$(".boto_propi").fadeIn();
				x=this;
				$("#cerrar5").click(function() {
 			 		x.close();
					setTimeout('$("#ficha5").click();',800);
				});
				$("#cerrar6").click(function() {
 			 		x.close();
					setTimeout('$("#ficha6").click();',800);
				});
			},*/
			load: true
		});
		$("html, body").animate({scrollTop:0}, "slow");
	});
	$(".reservar_total").live("click", function (e) {
		e.preventDefault(); //prevent default link action
		$(this).overlay({
			mask: "white",
			effect: "apple",
			target: "#lbtamany8",
			api: true,
			onBeforeLoad: function () {
				this.getOverlay().find(".contentWrap").load(this.getTrigger().attr("href"));
			},
		/*	onLoad: function () {
				$("button").button();
				$("button").fadeIn();
				$("#llegada").datepicker();
				$("#salida").datepicker();
				$(".boto_propi").button();
				$(".boto_propi").fadeIn();
				x=this;
				$("#cerrar_ficha1").click(function() {
 			 		x.close();
					setTimeout('$("#ficha1").click();',800);
				});
				$("#cerrar_ficha2").click(function() {
 			 		x.close();
					setTimeout('$("#ficha2").click();',800);
				});
				$("#cerrar_ficha3").click(function() {
 			 		x.close();
					setTimeout('$("#ficha3").click();',800);
				});
				$("#cerrar_ficha4").click(function() {
 			 		x.close();
					setTimeout('$("#ficha4").click();',800);
				});
				$("#cerrar_ficha5").click(function() {
 			 		x.close();
					setTimeout('$("#ficha5").click();',800);
				});
				$("#cerrar_ficha6").click(function() {
 			 		x.close();
					setTimeout('$("#ficha6").click();',800);
				});
			},*/
			load: true
		});
		$("html, body").animate({scrollTop:0}, "slow");
	});
});

