!function(u){"use strict";var a="devicePixelRatio"in window&&2<=parseInt(window.devicePixelRatio,10),e=u("body"),i=a?"data-loftocean-retina-image":"data-loftocean-normal-image",v=e.hasClass("rtl"),n=!1,s=!1,t=(u("head"),0);u.fn.loftoceanImageLoading=function(){var a=u(this).add(u(this).find("[data-loftocean-image=1]")).filter("[data-loftocean-image=1]"),e=u(this).add(u(this).find('img[data-loftocean-loading-image="on"]')).filter('img[data-loftocean-loading-image="on"]');return loftoceanImageLoad.lazyLoadEnabled?(a.length&&(n=n&&n.length?n.add(a):a),e.length&&(s=s&&s.length?s.add(e):e),u(window).trigger("startLazyLoad.loftocean")):(a.length&&a.each(function(){var a,e,t=u(this);t.attr("data-loftocean-image")&&(a=t.prop("tagName"),e=t.attr(i),u(new Image).on("load",function(){t.css("transition","none"),"IMG"==a?t.attr("src",e).removeAttr("style"):t.css({"background-image":"url("+e+")",filter:""}),t.css("transition",""),t.removeAttr("data-loftocean-retina-image").removeAttr("data-loftocean-normal-image").removeAttr("data-loftocean-image")}).attr("src",e))}),e.length&&e.each(function(){u(this).attr("data-loftocean-loading-image")&&(u(this).data("srcset")&&u(this).attr("srcset",u(this).data("srcset")).removeAttr("data-srcset"),u(this).data("loftocean-lazy-load-sizes")&&u(this).attr("sizes",u(this).data("loftocean-lazy-load-sizes")).removeAttr("data-loftocean-lazy-load-sizes"),u(this).data("src")&&u(this).attr("src",u(this).data("src")).removeAttr("data-src"),u(this).removeAttr("data-loftocean-loading-image").css({filter:"",opacity:""}))})),this},loftoceanImageLoad.lazyLoadEnabled&&(u(window).on("startLazyLoad.loftocean",function(a){var t=u(window).scrollTop()+u(window).height(),o=u();n&&n.length&&(n.each(function(){var a=u(this),e=a.attr(i);e&&parseInt(a.offset().top-t,10)<100&&(u(new Image).on("load",function(){a.css("transition","none"),a.css({"background-image":"url("+e+")",filter:""}),a.css("transition",""),a.removeAttr("data-loftocean-retina-image").removeAttr("data-loftocean-normal-image").removeAttr("data-loftocean-image")}).attr("src",e),o=o.add(a))}),o.length&&(n=n.not(o))),s&&s.length&&(o=u(),s.each(function(){u(this).attr("data-loftocean-loading-image")&&parseInt(u(this).offset().top-t,10)<100&&(u(this).data("srcset")&&u(this).attr("srcset",u(this).data("srcset")).removeAttr("data-srcset"),u(this).data("loftocean-lazy-load-sizes")&&u(this).attr("sizes",u(this).data("loftocean-lazy-load-sizes")).removeAttr("data-loftocean-lazy-load-sizes"),u(this).data("src")&&u(this).attr("src",u(this).data("src")).removeAttr("data-src"),u(this).removeAttr("data-loftocean-loading-image").css({filter:"",opacity:""}),o=o.add(u(this)))}),o.length&&(s=s.not(o)))}).on("scroll",function(a){var e=u(this).scrollTop();t",{type:"hidden",name:e}).appendTo(p)).val(a.data("value")))});var e="roomSearchNonce",t=p.serializeArray();(p.children('input[type="hidden"][name="'+e+'"]').length?p.children('input[type="hidden"][name="'+e+'"]'):u("",{type:"hidden",name:e}).appendTo(p)).val(btoa(JSON.stringify(t)))});var e,a=u(".posts.layout-carousel .posts-wrapper");a.length&&(e=[{breakpoint:1200,settings:{slidesToShow:3}},{breakpoint:800,settings:{slidesToShow:2}},{breakpoint:480,settings:{slidesToShow:1}}],a.each(function(){var a=u(this).parent().find(".post").length,a=Math.min(Math.max(parseInt(a,10),1),4);u(this).on("init",function(a){u.fn.loftoceanImageLoading&&u(this).loftoceanImageLoading()}).slick({dots:!1,arrows:!0,infinite:!0,fade:!1,speed:700,autoplay:!0,autoplaySpeed:5e3,pauseOnHover:!0,rtl:v,slidesToShow:a,slidesToScroll:1,swipeToSlide:!0,responsive:e.slice(-a)})}));a=u(".room-top-section .cs-gallery.gallery-carousel.variable-width .cs-gallery-wrap");a.length&&a.each(function(){u(this).on("init",function(a){u(this).find(".hide").removeClass("hide")}).slick({dots:!0,arrows:!0,rtl:v,slidesToShow:1,infinite:!0,speed:500,centerMode:!0,variableWidth:!0})});var m=u(".room-top-section .cs-gallery.gallery-mosaic .cs-gallery-item > a");m.length&&(new SimpleLightbox(".room-top-section .cs-gallery.gallery-mosaic .cs-gallery-item > a",{}),u(".room-top-section .cs-gallery-view-all").on("click",function(a){a.preventDefault(),m.eq(0).find("img").trigger("click")})),u(window).on("resize",function(a){var e=u("input.date-range-picker");e.length&&e.each(function(){var a=u(this).data("daterangepicker");void 0!==a&&"none"!=a.container.css("display")&&u(this).trigger("show.daterangepicker",a)})})})}(jQuery);