// source --> https://queenstownremarkables.holidayinn.com/wp-content/plugins/themify-ptb/public/js/ptb-public.min.js?ver=1.3.8 
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,e,d){a instanceof String&&(a=String(a));for(var b=a.length,c=0;c<b;c++){var l=a[c];if(e.call(d,l,c,a))return{i:c,v:l}}return{i:-1,v:void 0}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,e,d){a!=Array.prototype&&a!=Object.prototype&&(a[e]=d.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};
$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,e,d,b){if(e){d=$jscomp.global;a=a.split(".");for(b=0;b<a.length-1;b++){var c=a[b];c in d||(d[c]={});d=d[c]}a=a[a.length-1];b=d[a];e=e(b);e!=b&&null!=e&&$jscomp.defineProperty(d,a,{configurable:!0,writable:!0,value:e})}};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,d){return $jscomp.findInternal(this,a,d).v}},"es6-impl","es3");var PTB;
(function(a){function e(a,b){var c;document.createEvent?(c=document.createEvent("HTMLEvents"),c.initEvent(b,!0,!0)):document.createEventObject&&(c=document.createEventObject(),c.eventType=b);c.eventName=b;a.dispatchEvent?a.dispatchEvent(c):a.fireEvent&&htmlEvents["on"+b]?a.fireEvent("on"+c.eventType,c):a[b]?a[b]():a["on"+b]&&a["on"+b]()}PTB={LoadAsync:function(a,b,c,e,g){var h=a.split("/").pop().replace(/\./g,"_");if(document.getElementById(h)){if(b)if(g)var k=setInterval(function(){var a=!1;try{a=
g.call()}catch(m){}a&&(clearInterval(k),b.call())},100);else setTimeout(b,110)}else{var d=!1;var f=document.createElement("script");f.type="text/javascript";f.id=h;f.src=c||"undefined"===typeof tbLocalScript?a:a+"?version="+tbLocalScript.version;e?f.defer=!0:f.async=!0;f.onload=f.onreadystatechange=function(){d||this.readyState&&"complete"!==this.readyState||(d=!0,b&&b())};a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(f,a)}},LoadCss:function(d,b,c,e){if(!(0<a("link[href='"+
d+"']").length)){var g=window.document,h=g.createElement("link");if(c)var k=c;else k=(g.body||g.getElementsByTagName("head")[0]).childNodes,k=k[k.length-1];var l=g.styleSheets;h.rel="stylesheet";h.href=b?d+"?version="+b:d;h.media="only x";h.async="async";k.parentNode.insertBefore(h,c?k:k.nextSibling);var f=function(a){for(var b=h.href,c=l.length;c--;)if(l[c].href===b)return a();setTimeout(function(){f(a)})};h.onloadcssdefined=f;f(function(){h.media=e||"all"});return h}}};a(document).ready(function(){function d(){a("#lightcase-case").find(".ptb_single_lightbox").css("max-height",
a(window).height()-100)}var b=a(".ptb_post.ptb_is_excerpt .ptb_items_wrapper"),c=0!==b.length;c?a(".ptb_post.type-post").addClass("ptb_is_excerpt"):b=a(".ptb_post .ptb_items_wrapper");if(0<b.length){var l=0<a(".ptb_loops_wrapper").length;b.each(function(){if(0===a(this).closest(".ptb_loops_shortcode").length){var b=a(this).closest(".ptb_post");c||b.html(a(this));l&&b.closest(".ptb_loops_wrapper").append(b)}});l&&(c?a(".ptb_loops_wrapper:not(.ptb_loops_shortcode)>*").not(".ptb_post.ptb_is_excerpt").remove():
a(".ptb_loops_wrapper:not(.ptb_loops_shortcode)>*").not(".ptb_post").remove(),a(document).ajaxComplete(function(){var b=a(".ptb_loops_wrapper").nextAll(".ptb_post");0<b.length&&(b.each(function(){var b=a(this).find(".ptb_post").first();0===b.length&&(b=a(this),b.html(b.find(".ptb_items_wrapper").first()));a(".ptb_loops_wrapper").append(b)}),c?a(".ptb_loops_wrapper:not(.ptb_loops_shortcode)>*").not(".ptb_post.ptb_is_excerpt").remove():a(".ptb_loops_wrapper:not(.ptb_loops_shortcode)>*").not(".ptb_post").remove(),
a.event.trigger({type:"ptb_loaded"}))}))}a(".ptb_loops_wrapper,.ptb_pagenav,.ptb_single .ptb_post,.ptb_category_wrapper").css("display","block");a(document).trigger("ptb_loaded",!1);e(window,"resize");a(document).on("ptb_ligthbox_close",function(){a("#lightcase-case").removeClass("ptb_is_single_lightbox");a("body").removeClass("ptb_hide_scroll");a(window).unbind("resize",d)});a("a.ptb_open_lightbox").lightcase({type:"ajax",maxWidth:.8*a(window).width(),onFinish:{bar:function(){a("body").addClass("ptb_hide_scroll")},
baz:function(){var b=a("#lightcase-case");b.addClass("ptb_is_single_lightbox");b.find(".ptb_post img").css("display","block");a(document).trigger("ptb_loaded",!0);e(window,"resize");d();a(window).resize(d)}},onClose:{qux:function(){a.event.trigger({type:"ptb_ligthbox_close"})}}});a("a.ptb_lightbox").lightcase({type:"iframe",onFinish:{bar:function(){a.event.trigger({type:"ptb_ligthbox_close"});a("body").addClass("ptb_hide_scroll")}},onClose:{qux:function(){a.event.trigger({type:"ptb_ligthbox_close"})}}});
var g=a(".ptb-post-filter");g.each(function(){var b=g.next(".ptb_loops_wrapper");a(this).on("click","li",function(c){c.preventDefault();c.stopPropagation();c=b.find(".ptb_post");c.removeClass("ptb-isotop-filter-clear");if(a(this).hasClass("ptb_filter_active"))g.find("li.ptb_filter_active").removeClass("ptb_filter_active"),b.removeClass("ptb-isotop-filter"),c.stop().fadeIn("normal");else{g.find("li.ptb_filter_active").removeClass("ptb_filter_active");a(this).addClass("ptb_filter_active");b.addClass("ptb-isotop-filter");
var d=".ptb-tax-"+a(this).data("tax"),f=a(this).find("li");0<f.length&&f.each(function(){d+=" ,.ptb-tax-"+a(this).data("tax")});var f=c.filter(d),e=b.hasClass("ptb_grid4")?4:b.hasClass("ptb_grid3")?3:b.hasClass("ptb_grid2")?2:1;1<e&&f.each(function(b){0===b%e&&a(this).addClass("ptb-isotop-filter-clear")});c.hide();f.not("visible").stop().fadeIn("normal")}})})})})(jQuery);