$(document).ready(function(){ $('#sm_home').addClass("tabover"); $('#sm_home').next('.infotab').slideDown('slow'); $('#text_index > .info_content').hide(); $('.show').show(); $('#text_index > .info_title').css({"cursor":"pointer", 'font-weight' : 'bold'}); $('#text_index > .info_title').click(function(){ $(this).next('.info_content').slideToggle("fast"); }); $('#text_index > .info_title') .mouseover(function(){ $(this).css({ 'background-color' : '#DDDDDD'}); }) .mouseout(function(){ $(this).css({ 'background-color' : '#EEEEEE'}); }); $(".sub_button").click(function () { $(this).next(".subcategory").slideToggle("slow"); }); //$(".text_county").hide(); $(".tit_county").click(function () { $(this).next(".text_county").slideToggle("slow"); }); $(".content_det").hide(); $("#book_det").click(function () { $(".content_det").hide(); $(".booking_det").show(); }); $(".overview_det").click(function () { $(".content_det").hide(); $("#overview").show(); }); $("#reviews_det").click(function () { $(".content_det").hide(); $(".reviews").show(); }); $("#pics_det").click(function () { $(".content_det").hide(); $(".pics").show(); }); $("#dir_det").click(function () { $(".content_det").hide(); $("#directions").show(); }); $("#rat_det").click(function () { $(".content_det").hide(); $("#rates").show(); }); $("#generalinfo").click(function () { $(".content_det").hide(); $("#content_generalinfo").show(); }); $("#mapandmore").click(function () { $(".content_det").hide(); $("#content_mapandmore").show(); }); $("#photoshotel").click(function () { $(".content_det").hide(); $("#content_photoshotel").show(); }); $("#reviewshotel").click(function () { $(".content_det").hide(); $("#content_reviewshotel").show(); }); $("#bookhotel").click(function () { $(".content_det").hide(); $("#content_bookhotel").show(); }); $('#close').click(function(){ $('.feedback').fadeOut("fast"); }); $(".tab").mouseover( function(){ $(".tab").css({"cursor":"pointer"}); $(".tab").removeClass("tabover"); $('.infotab').hide(); $(this).addClass("tabover"); $(this).next('.infotab').show(); }); $(".tabh").click( function(){ $(".tabh").removeClass("taboverh"); $(this).addClass("taboverh"); }); $(".tabh").mouseover( function(){ $(".tabh").css({"cursor":"pointer"}); }); $('#sel_dates').hide(); $('#show_dates').click(function(){ $('#sel_dates').show(); $('#sel_when').hide(); }); $('#close_dates').click(function(){ $('#sel_dates').hide(); $('#sel_when').show(); }); $("#contact").validate(); }); function closeDiv(something){ $(something).fadeOut("slow", null); } /*window.setTimeout("closeDiv('.feedback');", 7000);*/ function clearDefault(el) { if (el.defaultValue==el.value) el.value = ""; } function checkValue(el){ if(el.value=='') el.value=el.defaultValue; } function closeDiv(something){ $(something).fadeOut("slow", null); } /*window.setTimeout("closeDiv('.feedback');", 7000);*/ function customRange(input){ var min = new Date(); //Set this to your absolute minimum date var dateMin = min; var dateMax = null; var dayRange = 30; if (input.id == "end_date"){ if ($("#start_date").datepicker("getDate") != null){ dateStart = $("#start_date").datepicker("getDate"); dateMin = new Date(dateStart.getFullYear(), dateStart.getMonth(), dateStart.getDate()) var rangeMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + dayRange); if(rangeMax < dateMax){ dateMax = rangeMax; } } } return { minDate: dateMin, maxDate: dateMax, value: dateMin }; }