(function(a){a.fn.extend(window.WPD.ajaxsearchpro.plugin,{showVerticalResults:function(){this.showResultsBox();if(0<this.n("items").length){let b=this.n("items").length<this.o.itemscount?this.n("items").length:this.o.itemscount;b=0>=b?9999:b;var e=a(".asp_group_header",this.n("resultsDiv"));if(0==this.o.itemscount||this.n("items").length<=this.o.itemscount)this.n("results").css({height:"auto"});else if(1>this.call_num&&this.n("results").css({height:"30px"}),1>this.call_num){let c=0,d=0,f=0,h=0;this.n("items").each(function(){d+=
a(this).outerHeight(!0);a(this).outerHeight(!0)>h&&(h=a(this).outerHeight(!0));c++});f=h*b;f>d&&(f=d);c=1>c?1:c;d=d/c*b;0<e.length&&e.each(function(g,k){g=Array.prototype.slice.call(g.parentNode.children).indexOf(g);g-k-Math.floor(g/3)<b&&(f+=a(this).outerHeight(!0))});this.n("results").css({height:f+"px"})}this.n("items").last().addClass("asp_last_item");this.n("results").find(".asp_group_header").prev(".item").addClass("asp_last_item");1==this.o.highlight&&a("div.item",this.n("resultsDiv")).highlight(this.n("text").val().split(" "),
{element:"span",className:"highlighted",wordsOnly:this.o.highlightWholewords})}this.resize();0==this.n("items").length&&this.n("results").css({height:"auto"});1>this.call_num&&(this.n("results").get(0).scrollTop=0);if(this.o.preventBodyScroll){let b;e=a("body");let c=e.css("overflow"),d="undefined"===typeof e.attr("style");this.n("results").off("touchstart");this.n("results").off("touchend");this.n("results").on("touchstart",function(){clearTimeout(b);a("body").css("overflow","hidden")}).on("touchend",
function(){clearTimeout(b);b=setTimeout(function(){d?a("body").removeAttr("style"):a("body").css("overflow",c)},300)})}this.addAnimation();this.fixResultsPosition(!0);this.searching=!1}})})(WPD.dom);
