(function(c){let g=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{showIsotopicResults:function(){if(1==this._no_animations)return this.showResultsBox(),this.addAnimation(),this.searching=!1,!0;this.preProcessIsotopicResults();this.showResultsBox();0<this.n("items").length&&(this.n("results").css({height:"auto"}),1==this.o.highlight&&c("div.item",this.n("resultsDiv")).highlight(this.n("text").val().split(" "),{element:"span",className:"highlighted",wordsOnly:this.o.highlightWholewords}));
0==this.call_num&&this.calculateIsotopeRows();this.showPagination();this.isotopicPagerScroll();if(0==this.n("items").length)this.n("results").css({height:"11110px"}),this.n("results").css({height:"auto"}),this.n("resdrg").css({height:"auto"});else if("undefined"!==typeof rpp_isotope){if(null!=this.isotopic&&"undefined"!=typeof this.isotopic.destroy&&0==this.call_num&&this.isotopic.destroy(),0==this.call_num||null==this.isotopic)this.isotopic=new rpp_isotope("#ajaxsearchprores"+this.o.rid+" .resdrg",
{isOriginLeft:!c("body").hasClass("rtl"),itemSelector:"div.item",layoutMode:"masonry",filter:this.filterFns.number,masonry:{gutter:this.o.isotopic.gutter}})}else return!1;this.addAnimation();this.initIsotopicClick();this.searching=!1},initIsotopicClick:function(){let a=this;a.eh.isotopicClickhandle=a.eh.isotopicClickhandle||function(b){if(!a.dragging){let e=c(this).find(".asp_content a.asp_res_url"),d=e.attr("href");""!==d&&(b.preventDefault(),2==b.which||"_blank"==e.attr("target")?g.openInNewTab(d):
location.href=d)}};a.n("resultsDiv").find(".asp_isotopic_item").on("click",a.eh.isotopicClickhandle)},preProcessIsotopicResults:function(){let a=this,b=0,e="";a.o.isotopic.showOverlay&&0<a.n("aspItemOverlay").length&&(e=a.n("aspItemOverlay").get(0).outerHTML);a.n("items").forEach(function(d){let h="";var f=0<c(d).find(".asp_image").length,k=c(d).find(".asp_image");f&&(f=k.data("src"),k=a.o.isotopic.blurOverlay&&!g.isMobile()?"aspblur":"no_aspblur",h=c("<div data-src='"+f+"' ></div>"),"undefined"==
typeof WPD.lazy&&h.css({"background-image":"url("+f+")"}),h.css({filter:"url(#"+k+")","-webkit-filter":"url(#"+k+")","-moz-filter":"url(#"+k+")","-o-filter":"url(#"+k+")","-ms-filter":"url(#"+k+")"}).addClass("asp_item_overlay_img asp_lazy"),h=h.get(0).outerHTML);c(d).prepend(h+e+"");c(d).attr("data-itemnum",b);b++})},isotopicPagerScroll:function(){if(0>=c("nav>ul li.asp_active",this.n("resultsDiv")).length)return!1;var a=c("nav>ul li.asp_active",this.n("resultsDiv")).offset().left;let b=c("nav>ul li.asp_active",
this.n("resultsDiv")).outerWidth(!0),e=c("nav>a.asp_next",this.n("resultsDiv")).offset().left;var d=c("nav>a.asp_prev",this.n("resultsDiv")).offset().left;0>=b||(d=Math.ceil((d-a+2*b)/b),0<d?0==c("nav>ul li.asp_active",this.n("resultsDiv")).prev().length?c("nav>ul",this.n("resultsDiv")).css({left:b+"px"}):c("nav>ul",this.n("resultsDiv")).css({left:c("nav>ul",this.n("resultsDiv")).position().left+b*d+"px"}):(a=0==c("nav>ul li.asp_active",this.n("resultsDiv")).next().length?Math.ceil((a-e+b)/b):Math.ceil((a-
e+2*b)/b),0<a&&c("nav>ul",this.n("resultsDiv")).css({left:c("nav>ul",this.n("resultsDiv")).position().left-b*a+"px"})))},showPagination:function(a){a="undefined"!==typeof a?a:!1;if(!this.o.isotopic.pagination)return null!=this.isotopic&&a&&this.isotopic.arrange({transitionDuration:0,filter:this.filterFns.number}),!1;(1>this.call_num||a)&&c("nav.asp_navigation ul li",this.n("resultsDiv")).remove();c("nav.asp_navigation",this.n("resultsDiv")).css("display","none");if(0<this.n("items").length){var b=
1;0<this.call_num&&!a&&(b=this.n("resultsDiv").find("nav.asp_navigation ul").first().find("li").length+1);let e=Math.ceil(this.n("items").length/this.il.itemsPerPage);if(1<e){let d=a&&0<this.il.lastVisibleItem?Math.ceil(this.il.lastVisibleItem/this.il.itemsPerPage):1;for(d=0>=d?1:d;b<=e;b++)b==d?c("nav.asp_navigation ul",this.n("resultsDiv")).append("<li class='asp_active'><span>"+b+"</span></li>"):c("nav.asp_navigation ul",this.n("resultsDiv")).append("<li><span>"+b+"</span></li>");c("nav.asp_navigation",
this.n("resultsDiv")).css("display","block");a?c("nav.asp_navigation ul li.asp_active",this.n("resultsDiv")).trigger("click_trigger"):c("nav.asp_navigation ul li.asp_active",this.n("resultsDiv")).trigger("click")}else null!=this.isotopic&&a&&this.isotopic.arrange({transitionDuration:0,filter:this.filterFns.number})}},hidePagination:function(){c("nav.asp_navigation",this.n("resultsDiv")).css("display","none")},visiblePagination:function(){return"none"!=c("nav.asp_navigation",this.n("resultsDiv")).css("display")},
calculateIsotopeRows:function(){let a=this;let b;var e=parseFloat(a.n("results").width());if("desktop"===g.deviceType()){var d=g.getWidthFromCSSValue(a.o.isotopic.itemWidth,e);b=g.getWidthFromCSSValue(a.o.isotopic.itemHeight,e)}else"tablet"===g.deviceType()?(d=g.getWidthFromCSSValue(a.o.isotopic.itemWidthTablet,e),b=g.getWidthFromCSSValue(a.o.isotopic.itemHeightTablet,e)):(d=g.getWidthFromCSSValue(a.o.isotopic.itemWidthPhone,e),b=g.getWidthFromCSSValue(a.o.isotopic.itemHeightPhone,e));let h=a.o.isotopic.gutter,
f=Math.floor(e/d);0>=f&&(f=1);Math.abs(e/f-d)>Math.abs(e/(f+1)-d)&&f++;e=e/f-(f-1)*h/f;d=e/d*b;a.il.columns=f;a.il.itemsPerPage=f*a.il.rows;a.il.lastVisibleItem=0;a.n("results").find(".asp_isotopic_item").forEach(function(k,l){"none"!=c(k).css("display")&&(a.il.lastVisibleItem=l)});isNaN(a.il.columns)||isNaN(a.il.itemsPerPage)||(a.n("resultsDiv").data("colums",a.il.columns),a.n("resultsDiv").data("itemsperpage",a.il.itemsPerPage));a.currentPage=1;a.n("items").css({width:Math.floor(e)+"px",height:Math.floor(d)+
"px"})}})})(WPD.dom);
(function(c){let g=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{initIsotopicPagination:function(){let a=this;a.n("resultsDiv").on(a.clickTouchend+" click_trigger","nav>a",function(b){b.preventDefault();b.stopImmediatePropagation();b=c(this).closest("nav").find("li.asp_active");"next"==(c(this).hasClass("asp_prev")?"prev":"next")?0<b.next("li").length?b.next("li").trigger("click"):c(this).closest("nav").find("li").first().trigger("click"):0<b.prev("li").length?b.prev("li").trigger("click"):
c(this).closest("nav").find("li").last().trigger("click")});a.n("resultsDiv").on(a.clickTouchend+" click_trigger","nav>ul li",function(b){b.preventDefault();b.stopImmediatePropagation();let e=b.type,d=this;b=1;g.isMobile()&&(a.n("text").trigger("blur"),b=300);setTimeout(function(){a.currentPage=parseInt(c(d).find("span").html(),10);c("nav>ul li",a.n("resultsDiv")).removeClass("asp_active");c("nav",a.n("resultsDiv")).each(function(h){c(c(h).find("ul li").get(a.currentPage-1)).addClass("asp_active")});
"click_trigger"===e?a.isotopic.arrange({transitionDuration:0,filter:a.filterFns.number}):a.isotopic.arrange({transitionDuration:400,filter:a.filterFns.number});a.isotopicPagerScroll();a.removeAnimation();"undefined"!=typeof WPD.lazy&&document.dispatchEvent(new Event("wpd-lazy-trigger"));a.n("resultsDiv").trigger("nav_switch")},b)})}})})(WPD.dom);
