function close(){
	$("#description_1").hide("slow");
	$("#description_2").hide("slow");
	$("#description_3").hide("slow");
	$("#description_4").hide("slow");
	$("#description_5").hide("slow");
	$("#description_6").hide("slow");
	$("#description_7").hide("slow");
	
	}
	
function validateBooking(){
	var alert_message="";

	if(document.book_now.visitor.value==""){
		alert_message="Name; ";
		document.getElementById("visitor").className="empty";
	} 

	if(document.book_now.email.value==""){
		alert_message+="Email; ";
		document.getElementById("email").className="empty";
	}

	if(document.book_now.tourdate.value==""){
		alert_message+="Tour Date; ";
		document.getElementById("tourdate").className="empty_date";
	}

	if(alert_message.length>0) {
		document.getElementById('errorBooking').style.display="block";
		alert_message=alert_message;
		document.getElementById('errorBooking').innerHTML=alert_message;
	}
	else
		return true;

	return false;	
}
		
$(function(){
	$("#intro").fadeIn(2000);
	
	// Sub menu Adventures for life			
	$("#land_adventures").mouseover( function() { $("#land_adventures_hover").fadeIn(); });
	$("#land_adventures_hover").mouseout( function() { $("#land_adventures_hover").fadeOut(); });
	$("#water_adventures").mouseover( function() { $("#water_adventures_hover").fadeIn(); });
	$("#water_adventures_hover").mouseout( function() { $("#water_adventures_hover").fadeOut(); });
	$("#landWater_adventures").mouseover( function() { $("#landWater_adventures_hover").fadeIn(); });
	$("#landWater_adventures_hover").mouseout( function() { $("#landWater_adventures_hover").fadeOut(); });
	$("#customsGroups").mouseover( function() { $("#customsGroups_hover").fadeIn(); });
	$("#customsGroups_hover").mouseout( function() { $("#customsGroups_hover").fadeOut(); });
	
	// Sub menu Vacations for life	
	$("#beyondBaja").mouseover( function() { $("#beyondBaja_hover").fadeIn(); });
	$("#beyondBaja_hover").mouseout( function() { $("#beyondBaja_hover").fadeOut(); });
	$("#amazingCabo").mouseover( function() { $("#amazingCabo_hover").fadeIn(); });
	$("#amazingCabo_hover").mouseout( function() { $("#amazingCabo_hover").fadeOut(); });
	$("#cabosEscape").mouseover( function() { $("#cabosEscape_hover").fadeIn(); });
	$("#cabosEscape_hover").mouseout( function() { $("#cabosEscape_hover").fadeOut(); });
	$("#bajaSurf").mouseover( function() { $("#bajaSurf_hover").fadeIn(); });
	$("#bajaSurf_hover").mouseout( function() { $("#bajaSurf_hover").fadeOut(); });
	
	// Sub menu Comments & News
	$("#clients_comments").mouseover( function() { $("#clients_comments_hover").fadeIn(); });
	$("#clients_comments_hover").mouseout( function() { $("#clients_comments_hover").fadeOut(); });
	$("#news").mouseover( function() { $("#news_hover").fadeIn(); });
	$("#news_hover").mouseout( function() { $("#news_hover").fadeOut(); });
	$("#turtle_tracking").mouseover( function() { $("#turtle_tracking_hover").fadeIn(); });
	$("#turtle_tracking_hover").mouseout( function() { $("#turtle_tracking_hover").fadeOut(); });
	
	// Sub menu Media seccion	
	$("#videos").mouseover( function() { $("#videos_hover").fadeIn(); });
	$("#videos_hover").mouseout( function() { $("#videos_hover").fadeOut(); });
	$("#photo_gallery").mouseover( function() { $("#photo_gallery_hover").fadeIn(); });
	$("#photo_gallery_hover").mouseout( function() { $("#photo_gallery_hover").fadeOut(); });
	
	// Sub menu Land Adventures	
	$("#hiking_waterfalls").mouseover( function() { $("#hiking_waterfalls_hover").fadeIn(); });
	$("#hiking_waterfalls_hover").mouseout( function() { $("#hiking_waterfalls_hover").fadeOut(); });
	$("#hiking_canyons").mouseover( function() { $("#hiking_canyons_hover").fadeIn(); });
	$("#hiking_canyons_hover").mouseout( function() { $("#hiking_canyons_hover").fadeOut(); });
	$("#rancho").mouseover( function() { $("#rancho_hover").fadeIn(); });
	$("#rancho_hover").mouseout( function() { $("#rancho_hover").fadeOut(); });
	$("#remote_villages").mouseover( function() { $("#remote_villages_hover").fadeIn(); });
	$("#remote_villages_hover").mouseout( function() { $("#remote_villages_hover").fadeOut(); });
	$("#todosSantos").mouseover( function() { $("#todosSantos_hover").fadeIn(); });
	$("#todosSantos_hover").mouseout( function() { $("#todosSantos_hover").fadeOut(); });
	$("#bird").mouseover( function() { $("#bird_hover").fadeIn(); });
	$("#bird_hover").mouseout( function() { $("#bird_hover").fadeOut(); });
	$("#turtle").mouseover( function() { $("#turtle_hover").fadeIn(); });
	$("#turtle_hover").mouseout( function() { $("#turtle_hover").fadeOut(); });
	
	// Sub menu Water Adventures	
	$("#surf_eastcape").mouseover( function() { $("#surf_eastcape_hover").fadeIn(); });
	$("#surf_eastcape_hover").mouseout( function() { $("#surf_eastcape_hover").fadeOut(); });
	$("#surf_cerritos").mouseover( function() { $("#surf_cerritos_hover").fadeIn(); });
	$("#surf_cerritos_hover").mouseout( function() { $("#surf_cerritos_hover").fadeOut(); });
	$("#surf_costaazul").mouseover( function() { $("#surf_costaazul_hover").fadeIn(); });
	$("#surf_costaazul_hover").mouseout( function() { $("#surf_costaazul_hover").fadeOut(); });
	$("#kayak_arch").mouseover( function() { $("#kayak_arch_hover").fadeIn(); });
	$("#kayak_arch_hover").mouseout( function() { $("#kayak_arch_hover").fadeOut(); });
	$("#kayak_eastcape").mouseover( function() { $("#kayak_eastcape_hover").fadeIn(); });
	$("#kayak_eastcape_hover").mouseout( function() { $("#kayak_eastcape_hover").fadeOut(); });
	$("#kayak_3bay").mouseover( function() { $("#kayak_3bay_hover").fadeIn(); });
	$("#kayak_3bay_hover").mouseout( function() { $("#kayak_3bay_hover").fadeOut(); });
	$("#cabo4kids").mouseover( function() { $("#cabo4kids_hover").fadeIn(); });
	$("#cabo4kids_hover").mouseout( function() { $("#cabo4kids_hover").fadeOut(); });
	
	// Sub menu Land Water Adventures	
	$("#eastcape_adventure").mouseover( function() { $("#eastcape_adventure_hover").fadeIn(); });
	$("#eastcape_adventure_hover").mouseout( function() { $("#eastcape_adventure_hover").fadeOut(); });
	$("#cliff").mouseover( function() { $("#cliff_hover").fadeIn(); });
	$("#cliff_hover").mouseout( function() { $("#cliff_hover").fadeOut(); });
	
	// Sub menu Customs and Groups Adventures	
	$("#customs").mouseover( function() { $("#customs_hover").fadeIn(); });
	$("#customs_hover").mouseout( function() { $("#customs_hover").fadeOut(); });
	$("#groups").mouseover( function() { $("#groups_hover").fadeIn(); });
	$("#groups_hover").mouseout( function() { $("#groups_hover").fadeOut(); });
	
	// Video and Comments buttons	
	$("#watch_video").mouseover( function() { $("#watch_video_hover").fadeIn(); });
	$("#watch_video_hover").mouseout( function() { $("#watch_video_hover").fadeOut(); });
	$("#add_comments").mouseover( function() { $("#add_comments_hover").fadeIn(); });
	$("#add_comments_hover").mouseout( function() { $("#add_comments_hover").fadeOut(); });
	
	// Abrir ventana emergente en slideToggle
	$("#bookNow").click(function() {$("#booking").slideToggle("slow"); });
	$("#bookingClose").click(function() {;$("#booking").slideToggle("slow"); });
	$("#watch_video_hover").click(function() {$("#window").slideToggle("slow"); });
	$("#add_comments_hover").click(function() {$("#window").slideToggle("slow"); });
	$("#clients_comments_hover").click(function() {$("#window").slideToggle("slow"); });
	$("#news_hover").click(function() {$("#window").slideToggle("slow"); });
	$("#turtle_tracking_hover").click(function() {$("#window").slideToggle("slow"); });
	$("#videos_hover").click(function() {$("#window").slideToggle("slow"); });
	$("#photo_gallery_hover").click(function() {$("#window").slideToggle("slow"); });
	$("#windowClose").click(function() {$("#window").slideToggle("slow"); });
	
	// Menu desplegable
	// Defino que submenus deben estar visibles cuando se pasa el mouse por encima
	$("#nav li").hover(function(){
	    $(this).find('ul').css({visibility: "visible",display: "none"}).slideDown(500);
	    },function(){
	        $(this).find('ul').slideUp(500);
	});


	var $_GET = {};
	$("h5").click( function() {close();$(this).next().show("slow");});
	var options={target:'#booking_response'};
	$("#book_now").ajaxForm(options);
	$("#movie_button").click(function() {$("#window").slideToggle("slow"); });
	$("#closeButton").click(function() {$("#window").slideToggle("slow"); });   
	$("#commentsImage").click(function() {$("#window").slideToggle("slow"); });
	$("#tourdate").datepicker();
	$("#increase").click(function() {$("#paxs").val(parseInt($("#paxs").val())+1); });
	$("#decrease").click(function() {if($("#paxs").val()>1) $("#paxs").val(parseInt($("#paxs").val())-1); });
});

