$(document).foundation({accordion:{callback:function(e){}}});var LeafMap,BouncingMarker={},importantSetHeight=function(){if($("section.map").length>0){var e=$("section.map"),t=$(window).height();e.css("minHeight",t),e.find(".map_canvas").height(t)}},equaliseElmtsDoc=function(){if($(".site_nav ul").is(":visible")){var e=$(".site_nav .first_level > li > a"),t=0;e.height("auto"),e.each(function(){var e=$(this).height();e>t&&(t=e)}),e.height(t)}},equaliseElmts=function(){if(equaliseElmtsDoc(),$(".horizontal_modules").length>0){var e=$(".horizontal_modules .module_block .text_content"),t=0;e.height("auto"),e.each(function(){var e=$(this).height();e>t&&(t=e)}),e.height(t)}if($(".bedrooms").length>0){var a=$(".bedrooms .bedroom"),t=0;a.height("auto"),a.each(function(){var e=$(this).height();e>t&&(t=e)}),a.height(t)}};function select2Init(){try{$("select").select2({minimumResultsForSearch:1/0})}catch(e){console.log("wsewr")}}function addAccessibilitySlider(){$("#show-accessibility").click(function(){var e=$(this);$("#accessibility-cover").slideToggle(function(){"Show Accessibility Information"==e.text()?e.text("Close Accessibility Information"):e.text("Show Accessibility Information")})})}function getRange(e,t){return Array(t-e+1).fill().map((t,a)=>a+e)}function pagination(e,t,a=4){let i={start:Math.round(e-a/2),end:Math.round(e+a/2)};(i.start-1==1||i.end+1===t)&&(i.start+=1,i.end+=1);let s=e>a?getRange(Math.min(i.start,t-a),Math.min(i.end,t)):getRange(1,Math.min(t,a+1)),o=(e,a)=>s.length+1!==t?a:[e];return 1!==s[0]&&(s=o(1,[1,"..."]).concat(s)),s[s.length-1]'+t+"":'"}function paginationHTML(e,t,a){html="";for(var i=pagination(e,t,delta=5),s=0;s...';return html}function GetNextSetOfCottageResults(e,t,a,i,s){var o=$("#cottage-search-ul"),n=o.data("url"),l={initialLoad:e,page:i,pageId:o.data("pageid")};$(".prev_link").html('« Previous'),$(".next_link").html('Next »'),$(".pagi_text").html('loading spinner'),$(".pagi_page_numbers").html(""),$.ajax({url:n,method:"POST",data:l,success:function(t){if(t.reloadPage)window.location.reload();else{if(o.html(t.resultsAsHtml),0===t.totalResults?$("#header_results_h3").html("Oops! We didn't find any cottages for your search"):1===t.totalResults?$("#header_results_h3").html("We found "+t.totalResults+" cottage"):$("#header_results_h3").html("We found "+t.totalResults+" cottages"),t.page>1){var i=t.page-1;$(".prev_link").html('« Previous')}else $(".prev_link").html('« Previous');if(t.pageNext »')}else $(".next_link").html('Next »');if($(".js-shortlistaction").off("click",BindShortListHandler),$(".js-shortlistaction").on("click",BindShortListHandler),e?$("#mobile_view").length>0&&!$("#mobile_view").is(":hidden")&&t.scroll&&$("html, body").animate({scrollTop:$("#main_search_submit_btn").offset().top},300):$("#mobile_view").length>0&&!$("#mobile_view").is(":hidden")?$("html, body").animate({scrollTop:$("#main_search_submit_btn").offset().top},300):s&&$("html, body").animate({scrollTop:$("#cottage-search-ul").offset().top-50},300),$(document).foundation(),$(".search-result-link").each(function(){var e=.66*$(this).width();$(this).css("height",e+"px")}),$(".search-result-thumb-slick").length>0)for(var l=$(".search-result-thumb-slick"),r=0;r<=l.length;++r)setSlickWithTimeout($(l[r]));$(".search-result-link").each(function(){var e=.66*$(this).width();$(this).css("height",e+"px")}),$(".search-result-thumb-slick").on("mouseover",function(e){bounceMarker($(this))}),$(".search-result-thumb-slick").on("mouseout",function(e){removeBounceMarker($(this))}),$(".pagi_text").html("Page "+t.page+" of "+t.totalPages),$(".pagi_page_numbers").html(paginationHTML(t.page,t.totalPages,a)),$(".pagi-no-holder.link").on("click",function(e){e.preventDefault();var t=$(this).attr("data-url"),a=$(e.target),i=t.split("page=")[0],s=t.split("page=")[1],o=!1;a.parents("div#bottom_pager").length&&(o=!0),GetNextSetOfCottageResults(!1,t,i,s,o)})}},error:function(e){alert("Ooops something went wrong, please try searching again")}})}function setSlickWithTimeout(e){try{setTimeout(function(){e.slick({dots:!1,infinite:!0,slidesToShow:1,slidesToScroll:1,autoplay:!1,autoplaySpeed:5e3,arrows:!0,speed:500,fade:!0,pauseOnHover:!1,pauseOnFocus:!1,focusOnSelect:!1,adaptiveHeight:!0,cssEase:"linear",lazyLoad:"ondemand"});var t=e.find(".search-result-link"),a=.66*t.width();t.css("height",a+"px")},100)}catch(t){}}function GetNextSetOfAttractionResults(e,t,a,i){var s=$("#attraction-search-ul"),o=s.data("url"),n={initialLoad:e,page:i,pageId:s.data("pageid")};$(".prev_link").html('« Previous'),$(".next_link").html('Next »'),$(".pagi_text").html('loading spinner'),$.ajax({url:o,method:"POST",data:n,success:function(t){if(t.reloadPage)window.location.reload();else{if(s.html(t.resultsAsHtml),0==t.totalResults?$("#header_results_h3").html("Oops! We didn't find any attractions for your search"):1==t.totalResults?$("#header_results_h3").html("We found "+t.totalResults+" attraction"):$("#header_results_h3").html("We found "+t.totalResults+" attractions"),t.page>1){var i=t.page-1;$(".prev_link").html('« Previous')}else $(".prev_link").html('« Previous');if(t.pageNext »')}else $(".next_link").html('Next »');$(".pagi_text").html("Page "+t.page+" of "+t.totalPages),$(".pagi_page_numbers").html(paginationHTML(t.page,t.totalPages,a)),$(".pagi-no-holder.link").on("click",function(e){e.preventDefault();var t=$(this).attr("data-url"),a=$(e.target),i=t.split("page=")[0],s=t.split("page=")[1],o=!1;a.parents("div#bottom_pager").length&&(o=!0),GetNextSetOfAttractionResults(!1,t,i,s,o)}),$(document).foundation(),e?$("#mobile_view").length>0&&!$("#mobile_view").is(":hidden")&&t.scroll&&$("html, body").animate({scrollTop:$("#main_search_submit_btn").offset().top},300):$("#mobile_view").length>0&&!$("#mobile_view").is(":hidden")?$("html, body").animate({scrollTop:$("#main_search_submit_btn").offset().top},300):scroll&&$("html, body").animate({scrollTop:$("#attraction-search-ul").offset().top-50},300)}},error:function(e){alert("Ooops something went wrong, please try searching again")}})}function SetupCalendar(){function e(e,t){for(var a=0;a li.bookable").click(function(t,a){if(t.preventDefault(),!a&&(!$(this).hasClass("userbookable")||$(this).hasClass("booked_start")))return!1;var i=$(".events_list.cal_view .dates > li:not(.empty)");$("li.bookable.endday").length>0&&($(".bookable.selected").removeClass("selected"),$(".bookable.firstday").removeClass("firstday"),$(".bookable.endday").removeClass("endday"),$(".actual_cal_selected").removeClass("actual_cal_selected"),$(".cal_selected").removeClass("cal_selected")),i=$(".events_list.cal_view .dates > li:not(.empty)");var s="firstday";$("li.bookable.firstday").length>0&&(e($("li.bookable.firstday"),i)>e($(this),i)?$("li.bookable.firstday").removeClass("firstday selected"):s="endday"),$(this).addClass("selected"),$(this).addClass(s);var o=$(i).filter(".bookable.firstday"),n=$(i).filter(".bookable.endday");if(0==n.length){var l=e($("li.bookable.firstday"),i),r=parseInt($("select[name='duration']").val());(isNaN(r)||null==r||void 0==r)&&($("select[name='duration']").val($("select[name='duration'] option:selected:not([disabled])").val()),r=parseInt($("select[name='duration']").val()),(isNaN(r)||null==r||void 0==r)&&($("select[name='duration']").val($("select[name='duration'] option:not([disabled])").last().val()),r=parseInt($("select[name='duration']").val()))),select2Init();var c=r;$("select[name='duration']").find("option:selected").text();var d=l+c;i.slice(l,d);var u=!1;if($("select[name='duration'] option").each(function(){if(u)$(this).hide().attr("disabled","true");else{var e=parseInt($(this).val()),t=$(i[l+(e-1)]);t.hasClass("bookable")&&!t.hasClass("booked_start")?$(this).show().removeAttr("disabled"):(u=!0,$(this).hide().attr("disabled","true"))}}),select2Init(),$(i[d]).hasClass("bookable")){var p=parseInt($("select[name='duration']").find("option:not([disabled])").first().val());if(isNaN(p)){var h="Sorry, it is not possible to book the period you have selected.",m=$(".my_selection"),f=m.find(".message");return f.html(h),m.show(),"true"!=m.attr("data-preselected")&&$("#cottage_date_selected_modal").modal(),o.removeClass("firstday selected"),$("select[name='duration'] option").removeAttr("disabled").show(),$("select[name='duration'] option:first-child").attr("selected","true"),select2Init(),$(".actual_cal_selected").removeClass("actual_cal_selected"),$(".cal_selected").removeClass("cal_selected"),!1}$(".arrivedep").show(),$("#duration_dropdown_row").show(),$(".default_template").show();var g=parseInt($("select[name='duration']").find("option:not([disabled])").last().val()),v=parseInt($(i[d]).data("dateid"))-parseInt(o.data("dateid"));g0?o.removeClass("firstday selected").click():(o.removeClass("firstday selected"),$("select[name='duration'] option").removeAttr("disabled").show(),$("select[name='duration'] option:first-child").attr("selected","true"),select2Init(),$(".my_selection").hide(),$(".actual_cal_selected").removeClass("actual_cal_selected"),$(".cal_selected").removeClass("cal_selected"));var m=$(".my_selection"),f=m.find(".message"),b=m.find(".other_selections").eq(0);m.find(".no_alternatives"),m.find(".alt_date_template").hide(),b.hide(),$(".arrivedep").hide(),$("#duration_dropdown_row").hide(),$(".default_template").hide();var h="Sorry, it is not possible to book the period you have selected.";f.html(h);var k=$(".calendars");return k.addClass("cal_selected"),m.show(),"true"!=m.attr("data-preselected")&&$("#cottage_date_selected_modal").modal(),!1}}if(o.length>0&&n.length>0){var w=$(".events_list.cal_view .dates > li:not(.empty)"),x=$(w).filter(".firstday").first(),T=$(w).filter(".endday").first(),l=e(x,w),_=e(T,w),P=w.slice(l,_);P.hasClass("booked")?P.each(function(){if($(this).hasClass("booked"))return n.removeClass("selected endday"),$(this).prev().addClass("endday"),!1;$(this).addClass("selected")}):P.addClass("selected");var C=$(x),S=$(T),D=C.parents(".events_list").first();D.addClass("actual_cal_selected");var M=S.parents(".events_list").first();M.addClass("actual_cal_selected");var B=M.offset().top-M.parents(".calendars").first().offset().top+M.height()+60,m=$(".my_selection"),k=$(".calendars");k.addClass("cal_selected"),"true"!=m.attr("data-preselected")&&$("#cottage_date_selected_modal").modal(),window.setTimeout(function(){var e=m.parents(".calendars").first().height(),t=B+m.height(),a=!1,i=$(x).offset().top-100;t+100>e&&(B=B-m.outerHeight(!0)-(D.outerHeight(!0)+100),a=!0),"true"!=m.attr("data-preselected")?m.show():m.attr("data-preselected","false"),m.find(".nightstext").text($("select[name=duration] option:selected").text()),m.find(".checkin").text(C.data("textdate")),m.find(".checkout").text(S.data("textcheckoutdate"));var s=m.find(".default_template"),o=m.find(".other_selections").eq(0),n=m.find(".no_alternatives"),l=m.find(".alt_date_template"),r=s.find(".price"),c=s.find(".discount"),d=s.find(".price_paynow"),u=s.find(".price_paylater"),p=s.find(".securitybond"),h=s.find(".securitybondprice"),f=s.find(".bondinfo_availability_popup"),g=m.find(".message");r.text("Calculating Price..."),d.text(""),u.text(""),g.text(""),p.hide(),c.hide(),u.hide(),o.hide(),n.hide(),l.hide(),o.find(".alts").html("");var v=!1;$(".ghost_startday").length>0&&(v=!0,$(".ghost_startday").removeClass("ghost_startday")),v||$("html,body").animate({scrollTop:i},500);var y=s.data("action"),b={fromDate:C.data("date"),toDate:S.data("date"),cottageId:k.data("id")};$.ajax({url:y,method:"POST",data:b,success:function(e){if(r.text(""),e.HasPrice){if($(".arrivedep").show(),$("#duration_dropdown_row").show(),$(".default_template").show(),r.html("£"+e.Price),e.SecurityDepositPrice>0&&(p.show(),f.attr("title",e.SecurityBondInfoMessage),h.html("Accidental Damage Bond £"+e.SecurityDepositPrice+" ")),e.Discount>0){c.show(),currentOriginalPrice=e.Price+e.Discount,r.html('£'+currentOriginalPrice+" Cost £"+e.Price);var t="Saving £"+e.Discount;if(null!==e.SpecialOffer)switch(e.SpecialOffer.DiscountTypeID){case 1:case 4:case 10:t+=" with a special offer";break;case 2:t+=" with an earlybird discount";break;case 3:t+=" with a last minute offer"}c.html(t)}e.PaymentDueNow?(d.html("Amount to pay now £"+(e.Price+e.SecurityDepositPrice).toFixed(2)),e.SecurityDepositPrice>0&&d.html("Amount to pay now £"+(e.Price+e.SecurityDepositPrice).toFixed(2)+" (inc bond)")):(u.show(),d.html("Amount to pay now £"+e.DepositPrice),u.html("Amount due on "+e.PaymentCutOffAsString+" £"+(e.Price+e.SecurityDepositPrice-e.DepositPrice).toFixed(2)),e.SecurityDepositPrice>0&&u.html("Amount due on "+e.PaymentCutOffAsString+" £"+(e.Price+e.SecurityDepositPrice-e.DepositPrice).toFixed(2)+" (inc bond)")),$(".default_booknow").data("fromdate",e.FromDate),$(".default_booknow").data("todate",e.ToDate),$(".default_booknow").show()}else $(".default_booknow").hide();try{var a=e.DaysAvailableFromStartDate.length,i=document.getElementById("duration_dropdown");$("#duration_dropdown > option").each(function(){$(this).hide().attr("disabled","true"),$(this).css("display","none")});var s=i.options[i.selectedIndex].value;i.options.length=0;var o=!1;if(a>0){for(var n=0;n-1&&(o=!0);for(var n=0;ns&&!o&&(i.options.add(new Option(s.toString()+" Nights",s)),o=!0),i.options.add(new Option(e.DaysAvailableFromStartDate[n].toString()+" Nights",e.DaysAvailableFromStartDate[n]));for(var n=0;n li.bookable.ghost_startday").trigger("click",!1)}$(document).ready(function(){if(initBlogCategorySelector(),equaliseElmtsDoc(),$(document).bind("contextmenu","img",function(e){e.preventDefault()}),$(".js-show-virtual-tour-button").click(function(){$(".launch-virtual-tour").hide(),$(".virtual-tour").show()}),window.onorientationchange=function(){var e=window.orientation;switch(e){case 0:case 90:case -90:window.location.reload()}},$(function(e){var t=e(window).width(),a=e(window).height();e(window).resize(function(){clearTimeout(resizeTimeout),resizeTimeout=setTimeout(function(){if(t!==e(window).width()||a!==e(window).height()){e(".select2").css("width","100%"),e(".search-result-link").each(function(){var t=.66*e(this).width();e(this).css("height",t+"px"),e(".search-result-thumb-slick").css("height",t+"px"),e(".slick-list").height()!==t&&e(".search-result-thumb-slick").css("height",t+"px"),e(".slick-list").height()!==t&&e(".slick-list").css("height",t+"px")});return}},1500)})}),$("#advanced_modal_link").on("click",function(e){e.preventDefault(),$("#advanced_search_modal").modal(),$(".select2").css("width","100%")}),$(".update-bookingform").change(function(){var e=$("#auto_balance_div"),t="full";$.ajax({type:"POST",url:$("#update_booking_form_url").val(),data:$("#BookingForm").serialize(),success:function(a){if(null!=a)for(var i=0;i0&&$(".update-price").trigger("change"),$("#BookingForm").submit(function(e){$.modal.close(),$(this).valid()&&($("#modal-making-booking-title").html("Making Booking"),$("#make_booking_spinner_modal").modal())}),$("#ApplyVoucher").click(function(e){e.preventDefault(),$("#modal-making-booking-title").html("Checking Voucher Code"),$("#make_booking_spinner_modal").modal(),$(".invalidcode").hide(),$(".validcode").hide(),$.ajax({type:"POST",url:$(this).attr("href"),data:$("#BookingForm").serialize(),success:function(e){e?($("#BookingSummary").fadeOut(),$("#BookingSummary").replaceWith(e),$("#BookingSummary").fadeIn(),$(".validcode").show()):$(".invalidcode").show(),$(".close-modal").trigger("click")},error:function(e){$(".invalidcode").show(),$(".close-modal").trigger("click")}})}),$(".rte img").each(function(){var e=$(this);"right"===e.css("float")?e.addClass("img_float_right"):e.addClass("img_float_left")}),$("form.basic_search button[type=submit]").click(function(e){e.preventDefault(),$.modal.close(),$("#search-modal-spinner-text").text("Please wait whilst we search our cottages"),$("#search_spinner_modal").modal(),$("#UserInitialPost").val("True"),$(".advanced_search_form").length>0?$(".advanced_search_form").submit():$(this).parents("form").first().submit()}),$("form.advanced_search_form button[type=submit]").click(function(e){e.preventDefault(),$.modal.close(),$("#search-modal-spinner-text").text("Please wait whilst we search our cottages"),$("#search_spinner_modal").modal(),$("#UserInitialPost").val("True"),$(".advanced_search_form").length>0?$(".advanced_search_form").submit():$(this).parents("form").first().submit()}),$("form.clear_search button[type=submit]").click(function(e){e.preventDefault(),$.modal.close(),$("#search-modal-spinner-text").text("Please wait, clearing search"),$("#search_spinner_modal").modal(),$(this).parents("form").first().submit()}),$("#advanced_search_link").length){var resizeTimeout,url=window.location.href;url.indexOf("#advanced")>-1&&(url=url.replace("#advanced","")),url+="#advanced",$("#advanced_search_link").attr("href",url)}if($(".basic_search select").change(function(){var e=$(this).val(),t=$(this).closest(".input_wrapper");-1!=e&&void 0!==e&&""!=e?t.addClass("value_chosen"):t.removeClass("value_chosen")}),$("select[name=PlusMinusDays]").change(function(){var e=$(this).val();$("input:hidden[name=PlusMinusDays]").val(e),$("select[name=PlusMinusDays]").each(function(){$(this).val(e)}),select2Init()}),$("select[name=NumberofGuests]").change(function(){var e=$(this).val();$("input:hidden[name=NumberofGuests]").val(e),$("select[name=NumberofGuests]").each(function(){$(this).val(e)}),select2Init()}),$("select[name=Nights]").change(function(){var e=$(this).val();$("input:hidden[name=Nights]").val(e),$("select[name=Nights]").each(function(){$(this).val(e)}),select2Init()}),$("select[name=PlusMinusDays]").change(function(){var e=$(this).val();$("input:hidden[name=PlusMinusDays]").val(e),select2Init()}),$("select[name=SortOrder]").change(function(){var e=$(this).val();$("select[name=SortOrder]").each(function(){$(this).val(e)}),select2Init();var t=window.location.href,a=t.indexOf("#advanced");a>-1&&(t=t.replace("#advanced","")),(a=t.indexOf("?"))>-1&&(t=t.substring(0,a)),t+="?reorder="+e,window.location.href=t}),"Pets"===$("#Pets").val()?$(".numberofpets").show():$(".numberofpets").hide(),$("#Pets").change(function(){"Pets"===$(this).val()?$(".numberofpets").show():$(".numberofpets").hide()}),$("select[name=CombinedPets]").change(function(){var e=$(this).val();$("input:hidden[name=CombinedPets]").val(e),$("select[name=CombinedPets]").each(function(){$(this).val(e)});var t=$("input:hidden[name=Pets]"),a=$("input:hidden[name=NumberOfPets]");"NoPets"===e?t.val("NoPets"):t.val("DontMind"),"ThreeOrMoreDogs"===e?(t.val("Pets"),a.val("ThreeOrMoreDogs")):"TwoDogs"===e?(t.val("Pets"),a.val("TwoDogs")):"OneDog"===e&&(t.val("Pets"),a.val("OneDog")),select2Init()}),$("#close-advanced-modal").on("click",function(e){$.modal.close()}),$("form.basic_search select[name=CombinedPets], form.basic_search select[name=NumberofGuests], form.basic_search select[name=AttractionTypeID], form.basic_search select[name=Radius]").on("change",function(){autoSubmitFormIfRequired()}),$("#search-filters .search-removal-link").length>0?$("#search-filters-header").show():$("#search-filters-header").hide(),$(".rotator .rotator_slides .item").length>1){var owl=$(".rotator .rotator_slides").owlCarousel({loop:!0,autoplay:6e3,margin:0,nav:!1,dots:!0,dotsContainer:"#custom_dots",items:1});$(".rotator .next").click(function(e){e.preventDefault(),owl.trigger("next.owl.carousel")}),$(".rotator .prev").click(function(e){e.preventDefault(),owl.trigger("prev.owl.carousel")})}if($(".search-result-thumb-slick").length>0&&$(".search-result-thumb-slick").each(function(e,t){$(this).slick({dots:!1,infinite:!0,slidesToShow:1,slidesToScroll:1,autoplay:!0,autoplaySpeed:5e3,arrows:!1,speed:500,fade:!0,pauseOnHover:!1,pauseOnFocus:!1,focusOnSelect:!1,cssEase:"linear",lazyLoad:"ondemand"})}),$(".internal_slider").length>0){var sync1=$("#sync1"),sync2=$("#sync2");sync1.slick({slidesToShow:1,slidesToScroll:1,arrows:!1,fade:!0,asNavFor:sync2,dots:!1,lazyLoad:"ondemand"}),sync2.slick({slidesToShow:4,slidesToScroll:1,asNavFor:sync1,dots:!1,center:!0,lazyLoad:"ondemand",focusOnSelect:!0,responsive:[{breakpoint:678,settings:{slidesToShow:2,slidesToScroll:2}}]}),$(".internal_slider .expand").click(function(e){e.preventDefault();var index=$(this).parents(".item.slick-slide.slick-active").first().index(),data=$(this).parents(".internal_slider").first().data("lightbox");$(this).lightGallery({dynamic:!0,html:!0,mobileSrc:!0,index:index,dynamicEl:eval(data),counter:!0,preload:2})})}$("#login_image_gallery").lightGallery({selector:".image"}),null!=document.getElementById("map-canvas")&&($(".map_canvas").is(":visible")||null==document.getElementById("map_canvas_container"))&&CreateLeafletMap();var i=0;function CreateGoogleMap(){var e,t=[{featureType:"water",stylers:[{color:"#19a0d8"}]},{featureType:"administrative",elementType:"labels.text.stroke",stylers:[{color:"#ffffff"},{weight:6}]},{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#e85113"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#efe9e4"},{lightness:-40}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{color:"#efe9e4"},{lightness:-20}]},{featureType:"road",elementType:"labels.text.stroke",stylers:[{lightness:100}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{lightness:-100}]},{featureType:"road.highway",elementType:"labels.icon"},{featureType:"landscape",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape",stylers:[{lightness:20},{color:"#efe9e4"}]},{featureType:"landscape.man_made",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{lightness:100}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{lightness:-100}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{hue:"#11ff00"}]},{featureType:"poi",elementType:"labels.text.stroke",stylers:[{lightness:100}]},{featureType:"poi",elementType:"labels.icon",stylers:[{hue:"#4cff00"},{saturation:58}]},{featureType:"poi",elementType:"geometry",stylers:[{visibility:"on"},{color:"#f0e4d3"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#efe9e4"},{lightness:-25}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{color:"#efe9e4"},{lightness:-10}]},{featureType:"poi",elementType:"labels",stylers:[{visibility:"simplified"}]},{featureType:"poi.attraction",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"poi.business",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi.government",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi.medical",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi.park",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"poi.place_of_worship",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"poi.school",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi.sports_complex",elementType:"all",stylers:[{visibility:"on"}]}],a=[],i=new google.maps.LatLngBounds,s="/images/icons/map-pins/",o=s+"default.png",n=$("#map-canvas").data("zoom");function l(){for(var t=$("#map-canvas").data("json"),n=new google.maps.InfoWindow({}),l=0;l"+this.bubbleContent;this.link&&(t+='Read More'),""!=this.bookingLink&&void 0!==this.bookingLink&&(t+='Book Now'),""!=this.availabilityLink&&void 0!==this.availabilityLink&&(t+='Availability'),t+="",n.setContent(t),e.panTo(this.getPosition()),n.open(e,this)}),document.getElementById("locations")&&google.maps.event.addDomListener(document.getElementById("location-"+r.Id),"click",function(e){var t=$(this);google.maps.event.trigger(a[t.data("pos")],"click"),$("html, body").animate({scrollTop:$("#map-canvas").offset().top},"slow")}),d.setMap(e),a.push(d)}var u=[{url:"/images/icons/map-pins/icon-cluster-yellow-small.png",height:45,width:45,textColor:"#333333",textSize:10},{url:"/images/icons/map-pins/icon-cluster-yellow-medium.png",height:55,width:55,textColor:"#333333",textSize:10},{url:"/images/icons/map-pins/icon-cluster-yellow-large.png",height:60,width:60,textColor:"#333333",textSize:10}];a.length>0&&(new MarkerClusterer(e,a,{averageCenter:!0,maxZoom:12,gridSize:40,imagePath:"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",styles:u}),e.initialZoom=!0,e.fitBounds(i))}function r(){var a={minZoom:2,maxZoom:17,scrollwheel:!1,center:new google.maps.LatLng(53.386195,-3.037148),mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:!1,panControlOptions:{position:google.maps.ControlPosition.TOP_LEFT},zoomControlOptions:{position:google.maps.ControlPosition.TOP_LEFT}};(e=new google.maps.Map(document.getElementById("map-canvas"),a)).setOptions({styles:t}),l(),window.setTimeout(function(){if($(".listing_box").length>0){$(".listing_box").offset().left,$("#map-canvas").offset().left,$("#map-canvas").outerWidth(!0);var t=e.getBounds();t.getSouthWest();var a=t.getNorthEast();i.extend(new google.maps.LatLng(a.lat(),a.lng()+2)),e.fitBounds(i)}},600),google.maps.event.addDomListener(window,"resize",function(){var t=e.getCenter();google.maps.event.trigger(e,"resize"),e.setCenter(t)}),google.maps.event.addListener(e,"zoom_changed",function(){zoomChangeBoundsListener=google.maps.event.addListener(e,"bounds_changed",function(e){this.getZoom()>5&&!0==this.initialZoom&&(this.setZoom(17),this.initialZoom=!1),google.maps.event.removeListener(zoomChangeBoundsListener)})}),google.maps.event.addListenerOnce(e,"idle",function(){null!=n&&(this.setZoom(n),this.initialZoom=!1)})}$("#map-canvas").length&&$(".search_listing li").hover(function(){d($(this))},function(){u($(this))});var c=function(e){var t=$(e).attr("data-result-id");if(void 0!==t)return $.grep(a,function(e,a){return e.markerId==t})[0]},d=function(e){var t=c(e);void 0!==t&&t.setAnimation(google.maps.Animation.BOUNCE)},u=function(e){var t=c(e);void 0!==t&&t.setAnimation(null)};google.maps.event.addDomListener(window,"load",r)}function CreateLeafletMap(){var e="/images/icons/map-pins/",t=e+"default.png";function a(){for(var a=$("#map-canvas").data("json"),i={type:"FeatureCollection",features:[]},s=0;s"+e.properties.bubbleContent;return e.properties.link&&(t+='Read More'),""!=e.properties.bookingLink&&void 0!==e.properties.bookingLink&&(t+='Book Now'),""!=e.properties.availabilityLink&&void 0!==e.properties.availabilityLink&&(t+='Availability'),t+=""}function g(e,t){var a=e.properties.image;return new L.Marker(new L.LatLng(e.geometry.coordinates[1],e.geometry.coordinates[0]),{icon:L.icon({iconSize:[30,38],iconAnchor:[15,38],popupAnchor:[0,-30],iconUrl:a,className:"FeatureIcon"}),prop_id:e.properties.markerId})}i.features.length>1&&(u=L.latLng(u.lat,u.lng+2.5),h.extend(u)),LeafMap.fitBounds(h,{maxZoom:13}),LeafMap.invalidateSize()}LeafMap=new L.Map("map-canvas",{center:new L.LatLng(51.505,-.09),zoom:8,layers:new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors'})}),window.setTimeout(function(){if($(".listing_box").length>0){$(".listing_box").offset().left,$("#map-canvas").offset().left,$("#map-canvas").outerWidth(!0);var e=LeafMap.getBounds();e.getSouthWest(),e.getNorthEast(),LeafMap.invalidateSize()}},600),setTimeout(function(){LeafMap.invalidateSize()},100),$(window).trigger("resize"),LeafMap.invalidateSize(),a(),LeafMap.on("popupopen",function(e){var t=LeafMap.project(e.popup._latlng);t.y-=e.popup._container.clientHeight/2,LeafMap.panTo(LeafMap.unproject(t),{animate:!0})}),LeafMap.scrollWheelZoom.disable()}function showAndScrollToAdvancedPanel(e){$(".advanced_search").length&&($("html, body").animate({scrollTop:$(".advanced_search").offset().top},e),$(".cottage-search-wrap").addClass("adv_open"),$(".advanced_search").addClass("active"))}if(function(){var e=$("#at_a_glance:not(.notmoving)");if(e.length>0){var t=e.parent();t.css("position","relative"),e.removeClass("fixed_top").removeClass("absBottom"),t.removeClass("absBottom"),window.ataglanceInital=e.offset().top,window.ataglanceWidth=e.width();var a=e.parent().offset().top+e.parent().outerHeight(!0);window.ataglanceBottomPoint=a-e.find(".panel").outerHeight(!0),e.find(".panel").width(e.find(".panel").width()),$(window).scroll(function(){var t=$(window).scrollTop();t>window.ataglanceBottomPoint?(e.removeClass("aagfixed_top"),e.addClass("aagabsBottom")):(e.removeClass("aagabsBottom"),t>window.ataglanceInital?e.addClass("aagfixed_top"):e.removeClass("aagfixed_top"))}),setInterval(function(){var e=$("#at_a_glance:not(.notmoving)"),t=e.parent().offset().top+e.parent().outerHeight(!0);window.ataglanceBottomPoint=t-e.find(".panel").outerHeight(!0)},1e3),setTimeout(function(){clearInterval(i)},1e4),$(window).scroll()}}(),$(".subnav .toggle").click(function(e){e.preventDefault();var t=$(this),a=t.siblings("ul").first();a.is(":visible")?(a.slideUp(),t.removeClass("toggled")):(a.slideDown(),t.addClass("toggled"))}),$(".subnav ul li ul .selected ul").show(),$(".subnav ul li ul .selected .toggle").addClass("toggled"),$("#reportrange2 span").html(moment().subtract(29,"days").format("MMMM D, YYYY")+" - "+moment().format("MMMM D, YYYY")),$("#reportrange2").daterangepicker({opens:"center"}),$(".booking-date-picker").datepicker({minDate:3,maxDate:"+2Y",dateFormat:"dd/mm/yy",firstDay:1}),jQuery.validator.methods.date=function(e,t){if(e)try{$.datepicker.parseDate("dd/mm/yy",e)}catch(a){return!1}return!0},"#advanced"==window.location.hash&&(showAndScrollToAdvancedPanel(0),showAdvancedSearchPanel(200)),$("#advanced_search_link").click(function(){$(".advanced_toggle_holder").length?showAndScrollToAdvancedPanel(200):window.location.href="/cottages#advanced"}),$("#advanced_toggle, .close_advanced").click(function(e){e.preventDefault(),$(".cottage-search-wrap").toggleClass("adv_open"),$(".advanced_search").toggleClass("active"),initMapSetup()}),$(".mobile-only-title").click(function(){var e=$(this).closest("ul");e.toggleClass("active"),$(e).find(".toggle-mobile > ul > li").each(function(){$(this).find("> ul").slideUp(),$(this).find(".toggled").removeClass("toggled")}),e.find(".toggle-mobile > ul").slideToggle({queue:!1})}),$("#search").length){var siteSearchInput=$("#search"),autoCompleteApiUrl=$("#search").data("uiurl"),resList=(siteSearchInput.parents("form").find("#search-results"),$("#search-results"));siteSearchInput.autocomplete({source:function(e,t,a){var i=e.term;$.ajax({url:autoCompleteApiUrl+"?term="+i,dataType:"json",type:"GET",success:function(e){t($.map(e,function(e){return{label:e.Title,value:e.Url}}))}})},minLength:3,response:function(e,t){resList.find("li").remove(),t.content.length>0?(resList.css("padding","5px 0 10px"),resList.addClass("hasResults"),$.each(t.content,function(e,t){resList.append('
  • '+t.label+'
  • ')})):(resList.css("padding","0"),resList.removeClass("hasResults"))}}),$("body").click(function(e){!$(e.target).is(".single-result")&&resList.hasClass("hasResults")&&$("#search-results").removeAttr("style").empty()})}if($("#advanced_search_modal").length>0){var lower=$("#LowerPrice"),upper=$("#HigherPrice");$("#high_price_span").text(upper),$("#low_price_span").text(lower);var lowerVal=200,upperVal=3e3,priceSliderNew=document.getElementById("slider_placeholder_basic");noUiSlider.create(priceSliderNew,{start:[lower.val(),upper.val()],connect:!0,step:50,margin:50,range:{min:lowerVal,max:upperVal}}),priceSliderNew.noUiSlider.on("update",function(e,t){var a=e[t];t?(upper.val(a),$("#high_price_span").text(upper.val())):(lower.val(a),$("#low_price_span").text(lower.val()))}),String.prototype.width=function(e){var t=e||'16px "Montserrat","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif',a=$("
    "+this+"
    ").css({position:"absolute",float:"left","white-space":"nowrap",visibility:"hidden",font:t}).appendTo($("body")),i=a.width();return a.remove(),i};var checkInputSize=function(e){var t=e.val().width();e.width(t),parseInt(e.val())>999?e.after("+"):$("#plus_symbol").remove()};checkInputSize($("#LowerPrice")),checkInputSize($("#HigherPrice")),$("#slider_placeholder").on({slide:function(){checkInputSize($("#LowerPrice")),checkInputSize($("#HigherPrice"))},set:function(){checkInputSize($("#LowerPrice")),checkInputSize($("#HigherPrice"))}}),$("#LowerPrice").on("change",function(){checkInputSize($(this))}),$("#HigherPrice").on("change",function(){checkInputSize($(this))})}initOverlays(),select2Init(),$(".search_toggle").click(function(e){e.preventDefault();var t=$(this).outerHeight(!0);$("html,body").animate({scrollTop:$(".site_nav").offset().top-t},500),$(".site_nav .first_level").slideUp(),$(".mobile-search-slide").slideToggle({queue:!1})}),$(".menu_toggle").click(function(e){e.preventDefault();var t=$(this).outerHeight(!0);$("html,body").animate({scrollTop:$(".site_nav").offset().top-t},500),$(".mobile-search-slide").slideUp(),$(".site_nav .first_level").slideToggle({queue:!1})}),$(".mobile-nav-toggle").click(function(e){e.preventDefault(),$(".mobile-nav-toggle.active").each(function(){$(this).removeClass("active")}),$(this).toggleClass("active");var t=$(this).siblings(".mega_menu, .dropdown").first();$(".mega_menu, .dropdown").not(t).slideUp({queue:!1}),t.slideToggle({queue:!1,complete:function(){$("html, body").animate({scrollTop:t.offset().top-50})}})}),$(".js-shortlistaction").click(function(e){e.preventDefault();var t=$(this),a="true"===t.data("is-shortlisted")||"True"===t.data("is-shortlisted"),i=t.data("shortlist-url"),s=$("#shortlist-count"),o=t.parents(".shortlist").first();i&&$.ajax({type:"POST",url:i,success:function(e){if(e){t.data("is-shortlisted",!a),t.toggleClass(t.data("add-class")),t.toggleClass(t.data("remove-class"));var i="";a?(i=t.data("removed-text"),t.attr("title",i).text(i)):(i=t.data("added-text"),t.attr("title",i).text(i)),s.text(e),$("span[data-selector="+t.attr("id")+"]").text(i)}o.length>0&&window.location.reload()}})});var headroom,myElement=document.querySelector("aside");new Headroom(myElement).init(),SetupCalendar()});var initMapSetup=function(){importantSetHeight();var e=$("section.map .map_canvas #map-canvas");if(e.length>0){var t=e.parent();e.removeClass("fixed_top").removeClass("absBottom"),t.removeClass("absBottom"),window.mapInital=e.offset().top,window.mapWidth=e.outerWidth(!0),window.mapBottomPoint=window.mapInital+e.parents("section.map").first().outerHeight(!0)-e.outerHeight(!0),e.width(window.mapWidth),$(window).scroll(function(){var a=$(window).scrollTop();a>window.mapBottomPoint?(e.removeClass("fixed_top"),t.addClass("absBottom")):(t.removeClass("absBottom"),a>window.mapInital?e.addClass("fixed_top"):e.removeClass("fixed_top"))})}$(window).scroll()};function validateNewsletterSubscription(){var e=document.getElementById("mce-EMAIL"),t=document.getElementById("checkbox");return""!=e.value||t.checked?""==e.value?(alert("A valid email is required to sign up for the newsletter."),!1):t.checked?void 0:(alert("You need to agree to the Privacy Policy before you can sign up for the newsletter."),!1):(alert("A valid email is required, and you need to agree to the Privacy Policy before you can sign up for the newsletter."),!1)}function BindShortListHandler(e){e.preventDefault();var t=$(this),a="true"===t.data("is-shortlisted")||"True"===t.data("is-shortlisted"),i=t.data("shortlist-url"),s=$("#shortlist-count"),o=t.parents(".shortlist").first();i&&$.ajax({type:"POST",url:i,success:function(e){if(e){t.data("is-shortlisted",!a),t.toggleClass(t.data("add-class")),t.toggleClass(t.data("remove-class"));var i="";a?(i=t.data("removed-text"),t.attr("title",i).text(i)):(i=t.data("added-text"),t.attr("title",i).text(i)),s.text(e),$("span[data-selector="+t.attr("id")+"]").text(i)}o.length>0&&window.location.reload()}})}function autoSubmitFormIfRequired(){"False"==$("#IsCleanUnalterted").val()&&($("#search-modal-spinner-text").length>0&&($("#search-modal-spinner-text").text("Please wait whilst we search our cottages"),$("#search_spinner_modal").modal()),$("#UserInitialPost").val("True"),$(".advanced_search_form").length>0?$(".advanced_search_form").submit():$(".basic_search").length>0&&$(".basic_search").submit())}function bounceMarker(e){if(void 0!==LeafMap){var t=e.data("property-id"),a=e.data("property-lat"),i=e.data("property-lng"),s=!1;L.Marker.stopAllBouncingMarkers(),void 0!==BouncingMarker&&LeafMap.removeLayer(BouncingMarker),LeafMap.eachLayer(function(e){e instanceof L.Marker&&void 0!==e.options.prop_id&&e.stopBouncing()}),LeafMap.eachLayer(function(e){e instanceof L.Marker&&void 0!==e.options.prop_id&&e.options.prop_id===t&&(e.bounce(),s=!0)}),s||((BouncingMarker=new L.Marker(new L.LatLng(a,i),{icon:L.icon({iconSize:[30,38],iconAnchor:[15,38],popupAnchor:[0,-30],iconUrl:"/images/icons/map-pins/extra-care.png",className:"FeatureIcon"})})).addTo(LeafMap),BouncingMarker.bounce())}}function removeBounceMarker(){void 0!==LeafMap&&(LeafMap.eachLayer(function(e){e instanceof L.Marker&&void 0!==e.options.prop_id&&e.stopBouncing()}),void 0!==BouncingMarker&&LeafMap.removeLayer(BouncingMarker))}$(window).on("load",function(){addAccessibilitySlider(),equaliseElmts(),initMapSetup()}),$('button[type="reset"]').click(function(){$(this).parents("form")[0].reset(),$(this).find("select").each(function(e,t){$(t).data("select2")&&$(this).select2("data",null)})}),$(window).resize(function(){equaliseElmts(),initMapSetup(),void 0!==LeafMap&&LeafMap.invalidateSize()}),$(".search-removal-link").click(function(e){e.preventDefault();var t=$(this).attr("data-rel-id"),a=$(this).attr("data-rel-type"),i="";switch(a){case"radio":$("[id='"+t+"']").prop("checked",!1);break;case"dropdown":i=$(this).attr("data-rel-default-val"),$("#"+t).val(i);try{$("input:hidden[name="+t+"]").val(i)}catch(s){}break;case"dropdown-pets":i=$(this).attr("data-rel-default-val"),$("#"+t).val(i);try{$("input:hidden[name="+t+"]").val(i),$("input:hidden[name=Pets]").val("DontMind"),$("input:hidden[name=NumberOfPets]").val("OneDog")}catch(o){}break;case"dropdown-location":i=$(this).attr("data-rel-default-val"),$("#"+t).val(i);try{$("input:hidden[name="+t+"]").val(i),$("input:hidden[name=Latitude]").val("0"),$("input:hidden[name=Longitude]").val("0")}catch(n){}break;case"hidden-price":i=$(this).attr("data-rel-default-val");try{$("input:hidden[name="+t+"]").val(i)}catch(l){}break;case"hidden-dates":try{$("input:hidden[name=FromDate]").val(""),$("input:hidden[name=ToDate]").val("")}catch(r){}}$.modal.close(),$("#search-modal-spinner-text").text("Please wait whilst we update your results"),$("#search_spinner_modal").modal(),$(".advanced_search_form").length>0?($("#UserInitialPost").val("True"),$(".advanced_search_form").submit()):$(this).parents("form").first().submit()});