window.better_ads_adblock=!0; !function(c,d){"use strict";var e=!1,n=!1;if(d.querySelector)if(c.addEventListener)e=!0;if(c.wp=c.wp||{},!c.wp.receiveEmbedMessage)if(c.wp.receiveEmbedMessage=function(e){var t=e.data;if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,a,i,s=d.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=d.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=0;oscreen_w?"desktop":768screen_w?"tablet":300screen_w?"mobile":300>screen_w?"mobile_portrait":""}function loadScript(url,$obj,callback){var script=document.createElement("script");script.type="text/javascript",script.readyState&&(script.onreadystatechange=function(){"loaded"!==script.readyState&&"complete"!==script.readyState||(script.onreadystatechange=null,callback())}),script.src=url,$obj.get(0).appendChild(script)}function vc_ttaActivation(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var $=window.jQuery,ui={};ui.newPanel=$(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,ui)})}function vc_accordionActivate(event,ui){if(ui.newPanel.length&&ui.newHeader.length){var $pie_charts=ui.newPanel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=ui.newPanel.find(".vc_round-chart"),$line_charts=ui.newPanel.find(".vc_line-chart"),$carousel=ui.newPanel.find('[data-ride="vc_carousel"]');void 0!==jQuery.fn.isotope&&ui.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),vc_carouselBehaviour(ui.newPanel),vc_plugin_flexslider(ui.newPanel),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),ui.newPanel.parents(".isotope").length&&ui.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}}function initVideoBackgrounds(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}function vc_initVideoBackgrounds(){jQuery("[data-vc-video-bg]").each(function(){var youtubeUrl,youtubeId,$element=jQuery(this);$element.data("vcVideoBg")?(youtubeUrl=$element.data("vcVideoBg"),youtubeId=vcExtractYoutubeId(youtubeUrl),youtubeId&&($element.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground($element,youtubeId)),jQuery(window).on("grid:items:added",function(event,$grid){$element.has($grid).length&&vcResizeVideoBackground($element)})):$element.find(".vc_video-bg").remove()})}function insertYoutubeVideoAsBackground($element,youtubeId,counter){if("undefined"==typeof YT||void 0===YT.Player)return 100<(counter=void 0===counter?0:counter)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground($element,youtubeId,counter++)},100);var $container=$element.prepend('
').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}function vcResizeVideoBackground($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px",iframeW+="px",iframeH+="px"):(iframeW=containerW,iframeH=containerW*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px",iframeW+="px",iframeH+="px"),$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}function vcExtractYoutubeId(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}function vc_googleMapsPointer(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.click(function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.mouseleave(function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}function vc_setHoverBoxPerspective(hoverBox){hoverBox.each(function(){var $this=jQuery(this),width=$this.width(),perspective=4*width+"px";$this.css("perspective",perspective)})}function vc_setHoverBoxHeight(hoverBox){hoverBox.each(function(){var $this=jQuery(this),hoverBoxInner=$this.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=$this.find(".vc-hoverbox-front-inner").outerHeight(),backHeight=$this.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=frontHeight>backHeight?frontHeight:backHeight;hoverBoxHeight<250&&(hoverBoxHeight=250),hoverBoxInner.css("min-height",hoverBoxHeight+"px")})}function vc_prepareHoverBox(){var hoverBox=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(hoverBox),vc_setHoverBoxPerspective(hoverBox)}document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",function(){for(var prefix=["-webkit-","-moz-","-ms-","-o-",""],i=0;iparseInt(ver[1]);$call.each(function(index){var $tabs,interval=jQuery(this).attr("data-interval"),tabs_array=[];if($tabs=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(event,ui){wpb_prepare_tab_content(event,ui)},beforeActivate:function(event,ui){1!==ui.newPanel.index()&&ui.newPanel.find(".vc_pie_chart:not(.vc_ready)")},activate:function(event,ui){wpb_prepare_tab_content(event,ui)}}),interval&&0index?index=$tabs.tabs("length")-1:index>=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)}else{var index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length;index=jQuery(this).parent().hasClass("wpb_next_slide")?index+1>=length?0:index+1:0>index-1?length-1:index-1,$tabs.tabs("option","active",index)}})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,$this=jQuery(this),active_tab=($this.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).click(function(e){e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var $this=jQuery(this);if(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1");var carousele_li=jQuery(this).find(".wpb_thumbnails-fluid li");carousele_li.css({"margin-right":carousele_li.css("margin-left"),"margin-left":0});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).resize(function(){var before_resize=screen_size;screen_size=getSizeName(),before_resize!=screen_size&&window.setTimeout("location.reload()",20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){location.href.indexOf("#!prettyPhoto")>-1&&(location.hash="")},social_tools:""})}catch(err){window.console&&window.console.log&&console.log(err)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){function fullWidthRow(){var $elements=$('[data-vc-full-width="true"]');$.each($elements,function(key,item){var $el=$(this);$el.addClass("vc_hidden");var $el_full=$el.next(".vc_row-full-width");if($el_full.length||($el_full=$el.parent().next(".vc_row-full-width")),$el_full.length){var el_margin_left=parseInt($el.css("margin-left"),10),el_margin_right=parseInt($el.css("margin-right"),10),offset=0-$el_full.offset().left-el_margin_left,width=$(window).width();if($el.css({position:"relative",left:offset,"box-sizing":"border-box",width:$(window).width()}),!$el.data("vcStretchContent")){var padding=-1*offset;0>padding&&(padding=0);var paddingRight=width-padding-$el_full.width()+el_margin_left+el_margin_right;0>paddingRight&&(paddingRight=0),$el.css({"padding-left":padding+"px","padding-right":paddingRight+"px"})}$el.attr("data-vc-full-width-init","true"),$el.removeClass("vc_hidden"),$(document).trigger("vc-full-width-row-single",{el:$el,offset:offset,marginLeft:el_margin_left,marginRight:el_margin_right,elFull:$el_full,width:width})}}),$(document).trigger("vc-full-width-row",$elements)}function fullHeightRow(){var $element=$(".vc_row-o-full-height:first");if($element.length){var $window,windowHeight,offsetTop,fullHeight;$window=$(window),windowHeight=$window.height(),offsetTop=$element.offset().top,offsetTop0||navigator.userAgent.match(/Trident.*rv\:11\./))&&$(".vc_row-o-full-height").each(function(){"flex"===$(this).css("display")&&$(this).wrap('
')})}(),vc_initVideoBackgrounds(),function(){var vcSkrollrOptions,callSkrollInit=!1;window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSpeed,skrollrSize,skrollrStart,skrollrEnd,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),$parallaxElement=$("
").addClass("vc_parallax-inner").appendTo($(this)),$parallaxElement.height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),youtubeId=vcExtractYoutubeId(parallaxImage),youtubeId?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrSpeed=skrollrSize-100,skrollrStart=-skrollrSpeed,skrollrEnd=0,$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: "+skrollrEnd+"%;")}),!(!callSkrollInit||!window.skrollr)&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}()}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(event,ui){var $ui_panel,$google_maps,panel=ui.panel||ui.newPanel,$pie_charts=panel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=panel.find(".vc_round-chart"),$line_charts=panel.find(".vc_line-chart"),$carousel=panel.find('[data-ride="vc_carousel"]');if(vc_carouselBehaviour(),vc_plugin_flexslider(panel),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),panel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&panel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),$ui_panel=panel.find(".isotope, .wpb_image_grid_ul"),$google_maps=panel.find(".wpb_gmaps_widget"),0<$ui_panel.length&&$ui_panel.isotope("layout"),$google_maps.length&&!$google_maps.is(".map_ready")){var $frame=$google_maps.find("iframe");$frame.attr("src",$frame.attr("src")),$google_maps.addClass("map_ready")}panel.parents(".isotope").length&&panel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),window.vc_googleMapsPointer,jQuery(document).ready(vc_prepareHoverBox),jQuery(window).resize(vc_prepareHoverBox),jQuery(document).ready(function($){window.vc_js()}); (function(n,t,i){"use strict";var e=n.Sizzle||jQuery.find,r={},o=function(n,t,u,o,s){if(n=f(n),n!=""){var h;o||s||(h=/^([0-9]*.?[0-9]+)(px|em)$/.exec(u),h!=null&&(o=Number(h[1]),o+""!="NaN"&&(s=h[2]))),s&&(e.compile&&e.compile(n),r[n]===i&&(r[n]={}),r[n][t]===i&&(r[n][t]={}),r[n][t][u]=[o,s])}},h=function(n,t){var i,r,f;for(i in n)for(r in n[i])if(typeof n[i][r]=="string")o(i,r,n[i][r]);else if(typeof n[i][r]=="object")for(f=0;f=0;)r=r.replace(" "+u+" "," "),e=!0;e&&n.setAttribute(t,f(r))}},u=function(){var o,h,i,s,a,u,f,v;for(o in r)if(a=e(o),a.length>0)for(h=0;h=f||i=="max-width"&&u.offsetWidth<=f||i=="min-height"&&u.offsetHeight>=f||i=="max-height"&&u.offsetHeight<=f?c(u,i,s):l(u,i,s)}!n.addEventListener&&n.attachEvent&&(v=t.documentElement.className,t.documentElement.className=" "+v,t.documentElement.className=v)};n.elementQuery=function(n,t){!n||typeof n!="object"||n.cssRules||n.rules?n||t||u():h(n,t)},n.elementQuery.selectors=function(){},n.addEventListener?(n.addEventListener("resize",u,!1),n.addEventListener("DOMContentLoaded",u,!1),n.addEventListener("load",u,!1)):n.attachEvent&&(n.attachEvent("onresize",u),n.attachEvent("onload",u))})(this,document,undefined); (function(n,t){"use strict";var i="!important;",r="position:absolute"+i+"visibility:hidden"+i+"width:1em"+i+"font-size:1em"+i+"padding:0"+i;window.getEmPixels=function(u){var f,e,o;return u||(u=f=n.createElement("body"),f.style.cssText="font-size:1em"+i,t.insertBefore(f,n.body)),e=n.createElement("i"),e.style.cssText=r,u.appendChild(e),o=e.clientWidth,f?t.removeChild(f):u.removeChild(e),o}})(document,document.documentElement); var Better_Social_Counter=function(e){"use strict";return{init:function(){this.fix_element_query()},fix_element_query:function(){"function"==typeof elementQuery&&elementQuery({".better-social-counter":{"max-width":["358px","199px","230px","900px","530px","750px"]},".better-social-banner":{"max-width":["250px"]}})}}}(jQuery);jQuery(function(e){Better_Social_Counter.init()}); !function(t){"use strict";function n(t,n,i,e){t.beginPath(),t.arc(n,i,e,0,w,!1),t.fill()}function i(t,n,i,e,a){t.beginPath(),t.moveTo(n,i),t.lineTo(e,a),t.stroke()}function e(t,i,e,a,o,r,s,l){var h=Math.cos(i*w),c=Math.sin(i*w);l-=s,n(t,e-c*o,a+h*r+.5*l,s+(1-.5*h)*l)}function a(t,n,i,a,o,r,s,l){var h;for(h=5;h--;)e(t,n+h/5,i,a,o,r,s,l)}function o(t,n,i,e,o,r,s){n/=3e4;var l=.21*o,h=.12*o,c=.24*o,u=.28*o;t.fillStyle=s,a(t,n,i,e,l,h,c,u),t.globalCompositeOperation="destination-out",a(t,n,i,e,l,h,c-r,u-r),t.globalCompositeOperation="source-over"}function r(t,n,e,a,o,r,s){n/=12e4;var l,h,c,u,f=.25*o-.5*r,d=.32*o+.5*r,v=.5*o-.5*r;for(t.strokeStyle=s,t.lineWidth=r,t.lineCap="round",t.lineJoin="round",t.beginPath(),t.arc(e,a,f,0,w,!1),t.stroke(),l=8;l--;)h=(n+l/8)*w,c=Math.cos(h),u=Math.sin(h),i(t,e+c*d,a+u*d,e+c*v,a+u*v)}function s(t,n,i,e,a,o,r){n/=15e3;var s=.29*a-.5*o,l=.05*a,h=Math.cos(n*w),c=h*w/-16;t.strokeStyle=r,t.lineWidth=o,t.lineCap="round",t.lineJoin="round",i+=h*l,t.beginPath(),t.arc(i,e,s,c+w/8,c+7*w/8,!1),t.arc(i+Math.cos(c)*s*C,e+Math.sin(c)*s*C,s,c+5*w/8,c+3*w/8,!0),t.closePath(),t.stroke()}function l(t,n,i,e,a,o,r){n/=1350;var s,l,h,c,u=.16*a,f=11*w/12,d=7*w/12;for(t.fillStyle=r,s=4;s--;)l=(n+s/4)%1,h=i+(s-1.5)/1.5*(1===s||2===s?-1:1)*u,c=e+l*l*a,t.beginPath(),t.moveTo(h,c-1.5*o),t.arc(h,c,.75*o,f,d,!1),t.fill()}function h(t,n,e,a,o,r,s){n/=750;var l,h,c,u,f=.1875*o;for(t.strokeStyle=s,t.lineWidth=.5*r,t.lineCap="round",t.lineJoin="round",l=4;l--;)h=(n+l/4)%1,c=Math.floor(e+(l-1.5)/1.5*(1===l||2===l?-1:1)*f)+.5,u=a+h*o,i(t,c,u-1.5*r,c,u+1.5*r)}function c(t,n,e,a,o,r,s){n/=3e3;var l,h,c,u,f=.16*o,d=.75*r,v=n*w*.7,m=Math.cos(v)*d,g=Math.sin(v)*d,M=v+w/3,p=Math.cos(M)*d,C=Math.sin(M)*d,y=v+2*w/3,b=Math.cos(y)*d,S=Math.sin(y)*d;for(t.strokeStyle=s,t.lineWidth=.5*r,t.lineCap="round",t.lineJoin="round",l=4;l--;)h=(n+l/4)%1,c=e+Math.sin((h+l/4)*w)*f,u=a+h*o,i(t,c-m,u-g,c+m,u+g),i(t,c-p,u-C,c+p,u+C),i(t,c-b,u-S,c+b,u+S)}function u(t,n,i,e,o,r,s){n/=3e4;var l=.21*o,h=.06*o,c=.21*o,u=.28*o;t.fillStyle=s,a(t,n,i,e,l,h,c,u),t.globalCompositeOperation="destination-out",a(t,n,i,e,l,h,c-r,u-r),t.globalCompositeOperation="source-over"}function f(t,n,i,e,a,o,r){var s=a/8,l=s/3,h=2*l,c=n%1*w,u=Math.cos(c),f=Math.sin(c);t.fillStyle=r,t.strokeStyle=r,t.lineWidth=o,t.lineCap="round",t.lineJoin="round",t.beginPath(),t.arc(i,e,s,c,c+Math.PI,!1),t.arc(i-l*u,e-l*f,h,c+Math.PI,c,!1),t.arc(i+h*u,e+h*f,l,c+Math.PI,c,!0),t.globalCompositeOperation="destination-out",t.fill(),t.globalCompositeOperation="source-over",t.stroke()}function d(t,n,i,e,a,o,r,s,l){n/=2500;var h,c,u,d,v=y[r],m=(n+r-b[r].start)%s,g=(n+r-b[r].end)%s,M=(n+r)%s;if(t.strokeStyle=l,t.lineWidth=o,t.lineCap="round",t.lineJoin="round",m<1){if(t.beginPath(),m*=v.length/2-1,h=Math.floor(m),m-=h,h*=2,h+=2,t.moveTo(i+(v[h-2]*(1-m)+v[h]*m)*a,e+(v[h-1]*(1-m)+v[h+1]*m)*a),g<1){for(g*=v.length/2-1,c=Math.floor(g),g-=c,c*=2,c+=2,d=h;d!==c;d+=2)t.lineTo(i+v[d]*a,e+v[d+1]*a);t.lineTo(i+(v[c-2]*(1-g)+v[c]*g)*a,e+(v[c-1]*(1-g)+v[c+1]*g)*a)}else for(d=h;d!==v.length;d+=2)t.lineTo(i+v[d]*a,e+v[d+1]*a);t.stroke()}else if(g<1){for(t.beginPath(),g*=v.length/2-1,c=Math.floor(g),g-=c,c*=2,c+=2,t.moveTo(i+v[0]*a,e+v[1]*a),d=2;d!==c;d+=2)t.lineTo(i+v[d]*a,e+v[d+1]*a);t.lineTo(i+(v[c-2]*(1-g)+v[c]*g)*a,e+(v[c-1]*(1-g)+v[c+1]*g)*a),t.stroke()}M<1&&(M*=v.length/2-1,u=Math.floor(M),M-=u,u*=2,u+=2,f(t,n,i+(v[u-2]*(1-M)+v[u]*M)*a,e+(v[u-1]*(1-M)+v[u+1]*M)*a,a,o,l))}function v(t){t.shadowColor="rgba(0,0,0,.25)",t.shadowBlur=0,t.lineWidth=1,t.shadowOffsetY=2}var m,g;!function(){var n=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame,i=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||t.msCancelAnimationFrame;n&&i?(m=function(t,i){function e(){a.value=n(e),t()}var a={value:null};return e(),a},g=function(t){i(t.value)}):(m=setInterval,g=clearInterval)}();var M=500,p=.08,w=2*Math.PI,C=2/Math.sqrt(2),y=[[-.75,-.18,-.7219,-.1527,-.6971,-.1225,-.6739,-.091,-.6516,-.0588,-.6298,-.0262,-.6083,.0065,-.5868,.0396,-.5643,.0731,-.5372,.1041,-.5033,.1259,-.4662,.1406,-.4275,.1493,-.3881,.153,-.3487,.1526,-.3095,.1488,-.2708,.1421,-.2319,.1342,-.1943,.1217,-.16,.1025,-.129,.0785,-.1012,.0509,-.0764,.0206,-.0547,-.012,-.0378,-.0472,-.0324,-.0857,-.0389,-.1241,-.0546,-.1599,-.0814,-.1876,-.1193,-.1964,-.1582,-.1935,-.1931,-.1769,-.2157,-.1453,-.229,-.1085,-.2327,-.0697,-.224,-.0317,-.2064,.0033,-.1853,.0362,-.1613,.0672,-.135,.0961,-.1051,.1213,-.0706,.1397,-.0332,.1512,.0053,.158,.0442,.1624,.0833,.1636,.1224,.1615,.1613,.1565,.1999,.15,.2378,.1402,.2749,.1279,.3118,.1147,.3487,.1015,.3858,.0892,.4236,.0787,.4621,.0715,.5012,.0702,.5398,.0766,.5768,.089,.6123,.1055,.6466,.1244,.6805,.144,.7147,.163,.75,.18],[-.75,0,-.7033,.0195,-.6569,.0399,-.6104,.06,-.5634,.0789,-.5155,.0954,-.4667,.1089,-.4174,.1206,-.3676,.1299,-.3174,.1365,-.2669,.1398,-.2162,.1391,-.1658,.1347,-.1157,.1271,-.0661,.1169,-.017,.1046,.0316,.0903,.0791,.0728,.1259,.0534,.1723,.0331,.2188,.0129,.2656,-.0064,.3122,-.0263,.3586,-.0466,.4052,-.0665,.4525,-.0847,.5007,-.1002,.5497,-.113,.5991,-.124,.6491,-.1325,.6994,-.138,.75,-.14]],b=[{start:.36,end:.11},{start:.56,end:.16}],S=function(t){this.list=[],this.interval=null,this.color=t&&t.color?t.color:"black",this.dropShadow="undefined"==typeof t.dropShadow||t.dropShadow,this.resizeClear=!(!t||!t.resizeClear)};S.CLEAR_DAY=function(t,n,i,e){var a=t.canvas.width,o=t.canvas.height,s=Math.min(a,o);r(t,n,.5*a,.5*o,s,s*p,i),e&&v(t)},S.CLEAR_NIGHT=function(t,n,i,e){var a=t.canvas.width,o=t.canvas.height,r=Math.min(a,o);s(t,n,.5*a,.5*o,r,r*p,i),e&&v(t)},S.PARTLY_CLOUDY_DAY=function(t,n,i,e){var a=t.canvas.width,s=t.canvas.height,l=Math.min(a,s);r(t,n,.625*a,.375*s,.75*l,l*p,i),o(t,n,.375*a,.625*s,.75*l,l*p,i),e&&v(t)},S.PARTLY_CLOUDY_NIGHT=function(t,n,i,e){var a=t.canvas.width,r=t.canvas.height,l=Math.min(a,r);s(t,n,.667*a,.375*r,.75*l,l*p,i),o(t,n,.375*a,.625*r,.75*l,l*p,i),e&&v(t)},S.CLOUDY=function(t,n,i,e){var a=t.canvas.width,r=t.canvas.height,s=Math.min(a,r);o(t,n,.5*a,.5*r,s,s*p,i),e&&v(t)},S.RAIN=function(t,n,i,e){var a=t.canvas.width,r=t.canvas.height,s=Math.min(a,r);l(t,n,.5*a,.37*r,.9*s,s*p,i),o(t,n,.5*a,.37*r,.9*s,s*p,i),e&&v(t)},S.SLEET=function(t,n,i,e){var a=t.canvas.width,r=t.canvas.height,s=Math.min(a,r);h(t,n,.5*a,.37*r,.9*s,s*p,i),o(t,n,.5*a,.37*r,.9*s,s*p,i),e&&v(t)},S.SNOW=function(t,n,i,e){var a=t.canvas.width,r=t.canvas.height,s=Math.min(a,r);c(t,n,.5*a,.37*r,.9*s,s*p,i),o(t,n,.5*a,.37*r,.9*s,s*p,i),e&&v(t)},S.WIND=function(t,n,i,e){var a=t.canvas.width,o=t.canvas.height,r=Math.min(a,o);d(t,n,.5*a,.5*o,r,r*p,0,2,i),d(t,n,.5*a,.5*o,r,r*p,1,2,i),e&&v(t)},S.FOG=function(t,n,e,a){var o=t.canvas.width,r=t.canvas.height,s=Math.min(o,r),l=s*p;u(t,n,.5*o,.32*r,.75*s,l,e),n/=5e3;var h=Math.cos(n*w)*s*.02,c=Math.cos((n+.25)*w)*s*.02,f=Math.cos((n+.5)*w)*s*.02,d=Math.cos((n+.75)*w)*s*.02,m=.936*r,g=Math.floor(m-.5*l)+.5,M=Math.floor(m-2.5*l)+.5;t.strokeStyle=e,t.lineWidth=l,t.lineCap="round",t.lineJoin="round",i(t,h+.2*o+.5*l,g,c+.8*o-.5*l,g),i(t,f+.2*o+.5*l,M,d+.8*o-.5*l,M),a&&v(t)},S.prototype={_determineDrawingFunction:function(t){if("string"==typeof t)return t=t.toUpperCase().replace(/-/g,"_"),S.hasOwnProperty(t)?S[t]:null},add:function(t,n){var i;"string"==typeof t&&(t=document.getElementById(t)),null!==t&&(n=this._determineDrawingFunction(n),"function"==typeof n&&(i={element:t,context:t.getContext("2d"),drawing:n},this.list.push(i),this.draw(i,M)))},set:function(t,n){var i;for("string"==typeof t&&(t=document.getElementById(t)),i=this.list.length;i--;)if(this.list[i].element===t)return this.list[i].drawing=this._determineDrawingFunction(n),void this.draw(this.list[i],M);this.add(t,n)},remove:function(t){var n;for("string"==typeof t&&(t=document.getElementById(t)),n=this.list.length;n--;)if(this.list[n].element===t)return void this.list.splice(n,1)},draw:function(t,n){var i=t.context.canvas;this.resizeClear?i.width=i.width:t.context.clearRect(0,0,i.width,i.height),t.drawing(t.context,n,this.color,this.dropShadow)},play:function(){var t=this;this.pause(),this.interval=m(function(){var n,i=Date.now();for(n=t.list.length;n--;)t.draw(t.list[n],i)},1e3/60)},pause:function(){this.interval&&(g(this.interval),this.interval=null)}},t.Skycons=S}(this); !function(e){e.betterWeather=function(t,a){var r=this;r.$el=e(t),r.el=t,r.$el.data("betterWeather",r),r.templateInitialized=!1,r.retina=window.devicePixelRatio>1,r.init=function(){r.initIcons(),r.$el.hasClass("better-weather")&&(r.prettifyIconSize(),e(window).resize(function(){r.prettifyIconSize()})),setTimeout(function(){r.helper.hideLoader()},600)},r.initIcons=function(){if(r.$el.hasClass("animated-icons"))if(r.$el.hasClass("better-weather")){if(r.helper.isCanvasSupported()&&(r.skycons=new Skycons({color:r.$el.data("font-color"),dropShadow:!0})),r.$el.hasClass("style-normal")){var t="#"+r.$el.attr("id")+"-summary-icon";e(t).attr("height",r.helper.getCorrectSize(85)).attr("width",r.helper.getCorrectSize(85)),r.skycons.set(r.$el.attr("id")+"-summary-icon",e(t).data("icon")),r.skycons.play()}else{var t="#"+r.$el.attr("id")+"-summary-icon";e(t).attr("height",r.helper.getCorrectSize(55)).attr("width",r.helper.getCorrectSize(55)),r.skycons.set(r.$el.attr("id")+"-summary-icon",e(t).data("icon")),r.skycons.play()}if(r.$el.hasClass("have-next-days")){var t="#"+r.$el.attr("id");e(t+"-day1-icon").attr("height",r.helper.getCorrectSize(17)).attr("width",r.helper.getCorrectSize(17)),r.skycons.set(r.$el.attr("id")+"-day1-icon",e(t+"-day1-icon").data("icon")),r.skycons.play(),e(t+"-day2-icon").attr("height",r.helper.getCorrectSize(17)).attr("width",r.helper.getCorrectSize(17)),r.skycons.set(r.$el.attr("id")+"-day2-icon",e(t+"-day2-icon").data("icon")),r.skycons.play(),e(t+"-day3-icon").attr("height",r.helper.getCorrectSize(17)).attr("width",r.helper.getCorrectSize(17)),r.skycons.set(r.$el.attr("id")+"-day3-icon",e(t+"-day3-icon").data("icon")),r.skycons.play(),e(t+"-day4-icon").attr("height",r.helper.getCorrectSize(17)).attr("width",r.helper.getCorrectSize(17)),r.skycons.set(r.$el.attr("id")+"-day4-icon",e(t+"-day4-icon").data("icon")),r.skycons.play()}}else if(r.$el.hasClass("better-weather-inline")){r.helper.isCanvasSupported()&&(r.skycons=new Skycons({color:r.$el.data("font-color"),dropShadow:!1}));var a="",i="";switch(r.$el.data("inline-size")){case"small":i=a=18;break;case"medium":i=a=30;break;case"large":i=a=55}e("#"+r.$el.attr("id")+"-summary-icon").attr("height",i).attr("width",a),r.skycons.set(r.$el.attr("id")+"-summary-icon",e("#"+r.$el.attr("id")+"-summary-icon").data("icon")),r.skycons.play()}},r.prettifyIconSize=function(){var e=r.$el.width(),t=r.$el.find(".bw_summary .bw_icon");if(!t.hasClass("hw_static-icon"))switch(!0){case e<=70:r.helper.updateIconSize(t,28,28);break;case e<=100:r.helper.updateIconSize(t,35,35);break;case e<=200:r.helper.updateIconSize(t,40,40);break;case e<=400:r.$el.hasClass("style-modern")?r.helper.updateIconSize(t,55,55):r.$el.hasClass("style-modern")&&r.helper.updateIconSize(t,70,70);break;case e<=1170:r.helper.updateIconSize(t,35,35)}},r.helper={getCorrectSize:function(e){return r.retina?2*e:e},updateIconSize:function(e,t,a){e.attr("width",r.helper.getCorrectSize(t)),e.attr("height",r.helper.getCorrectSize(a)),e.css("width",t+"px"),e.css("height",a+"px")},hideLoader:function(){r.$el.find(".bw-loader").remove()},isCanvasSupported:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))}},"function"==typeof elementQuery&&elementQuery({".better-weather":{"max-width":["2000px","1170px","970px","900px","830px","650px","550px","440px","400px","350px","300px","250px","200px","170px","120px","100px","50px"]}}),r.init()},e.fn.betterWeather=function(t){return this.each(function(){new e.betterWeather(this,t)})}}(jQuery),function(e){e(".better-weather, .better-weather-inline").each(function(){e(this).betterWeather()})}(jQuery); (function ($){ "use strict"; var xhr,xhrList={}, cache={}; function _dispatchEvents(fireScroll){ fireScroll=typeof fireScroll==='undefined' ? true:fireScroll; if(fireScroll){ $(window).scroll(); } if(document.createEvent){ var ev=document.createEvent('Event'); ev.initEvent('resize', true, true); window.dispatchEvent(ev); }else{ var element=document.documentElement; var event=document.createEventObject(); element.fireEvent("onresize",event); }} function Better_Ajax_Pagination(settings){ this.prefix='bs_ajax_paginate_'; this.deferredPrefix='bs_deferred_loading_'; this.isPrevPage=false; this.$link_el=false; this.id=false; this.paginationStyle=false; this.settings=$.extend({ afterSuccessDeferredAjax: function(){ }},settings); return this; } Better_Ajax_Pagination.prototype.init=function (wrapper){ var _this=this; $(wrapper).on('click', '.bs-ajax-pagination a', function (e){ e.preventDefault(); var $this=$(this), $pagination=$this.parent(); if($this.hasClass('disabled')||$pagination.hasClass('bs-pagination-loading')){ return false; }else{ $pagination.addClass('bs-pagination-loading') } var $this_pagination=$this.closest('.bs-pagination'); _this.$link_el=$this; _this.id=$this.data('id'); try { if(!_this.id) throw 'invalid element'; _this.setNewPageNumber(); _this.paginationStyle=_this.getPaginationStyle(); var props=_this.getAjaxProps(); var cached_data=_this.cache_get(props[ 'current_page' ], _this.id); if(typeof cached_data==='object'){ _this.handle_response(cached_data); $pagination.removeClass('bs-pagination-loading'); }else{ var $this_pagination_wrapper=$this_pagination.prevAll('.bs-pagination-wrapper'); if(props[ 'current_page' ]==2){ _this.cache_add(1, { output: $this_pagination_wrapper.html(), label: $this_pagination.find('.bs-pagination-label').html(), have_next: true, have_prev: false }, _this.id ); } switch (_this.paginationStyle){ case 'next_prev': $this_pagination_wrapper.children().addClass('bs-pagination-in-loading'); $this_pagination_wrapper.prepend(_this.getLoadingRawHtml()); break; case 'more_btn_infinity': $this.find('.loaded').hide(); $this.find('.loading').show(); $this.removeClass('more_btn_infinity') .addClass('infinity') .addClass('bs-pagination-in-loading'); $this_pagination.removeClass('more_btn_infinity') .addClass('infinity'); break; case 'infinity': case 'more_btn': $this.addClass('bs-pagination-in-loading'); $this.find('.loaded').hide(); $this.find('.loading').show(); break; } xhr=$.ajax({ url: props[ 'ajax_url' ], type: 'POST', dataType: 'json', data: props }) .fail(function (e){ $pagination.removeClass('bs-pagination-loading'); switch (_this.paginationStyle){ case 'more_btn_infinity': case 'next_prev': $this_pagination_wrapper.find('.bs-pagin-loading-wrapper').remove(); $this.addClass('bs-pagination-in-loading'); break; case 'infinity': case 'more_btn': $this.addClass('bs-pagination-in-loading'); $this.find('.loaded').show(); $this.find('.loading').hide(); break; } if(e.statusText!=="abort") alert('cannot load data. please check your internet connection!'); }) .done(function (response){ _this.handle_response(response); if(_this.cacheThisStyle(_this.paginationStyle)){ _this.cache_add(props[ 'current_page' ], response, _this.id); } switch (_this.paginationStyle){ case 'more_btn_infinity': $this.removeClass('bs-pagination-in-loading'); $this_pagination_wrapper.find('.bs-pagin-loading-wrapper').remove(); break; case 'next_prev': $this.removeClass('bs-pagination-in-loading'); $this_pagination_wrapper.find('.bs-pagin-loading-wrapper').remove(); $this_pagination_wrapper.children().removeClass('bs-pagination-in-loading'); break; case 'infinity': case 'more_btn': $this.removeClass('bs-pagination-in-loading'); $this.find('.loaded').show(); $this.find('.loading').hide(); break; } $pagination.removeClass('bs-pagination-loading'); }); }} catch (err){ _this.debug(err); }}); new OnScreen({ tolerance: 0, debounce: 100, container: window }).on('enter', '.bs-ajax-pagination.infinity', function (el){ $(el).find('a').click(); }); } Better_Ajax_Pagination.prototype.filter_slider_params=function (settings){ if(typeof settings.autoplayspeed!=='undefined'){ settings.autoplaySpeed=settings.autoplayspeed; } settings.dots=typeof settings.sliderControlDots!=='undefined'&&settings.sliderControlDots!=='off'; settings.autoplay=typeof settings.sliderAutoplay!=='undefined'&&parseInt(settings.sliderAutoplay); settings.speed=settings.sliderAnimationSpeed; if(typeof settings.sliderControlNextPrev!=='undefined'&&settings.sliderControlNextPrev=='off'){ settings.appendArrows=false; } return settings; }; Better_Ajax_Pagination.prototype.handler_slider=function (sliderContext){ var self=this; if($.fn.slick){ $('.bs-slider-items-container',sliderContext).each(function (){ var $this=$(this), is_rtl=$(document.body).hasClass('rtl'); if($this.hasClass('slick-ready')){ return ; } var defaults=$this.data(), settings=self.filter_slider_params($.extend({ sliderControlDots: 'off', prevArrow: '', nextArrow: '', rtl: $(document.body).hasClass('rtl'), slideMargin: 25, slide: '.bs-slider-item', appendArrows: $this.find('.bs-slider-controls .bs-control-nav'), classPrefix: 'bs-slider-', dotsClass: 'bs-slider-dots', customPaging: function (slider, i){ return $('').text(i + 1); }}, defaults)); if(settings.sliderControlDots&&defaults.sliderControlDots){ settings.appendDots=$this.find('.bs-slider-controls'); settings.dotsClass +=' ' + settings.dotsClass + '-' + defaults.sliderControlDots; } $this.slick(settings); $this.addClass('slick-ready'); }); $('.multi-tab').on('shown.bs.tab', 'a[data-toggle="tab"]:not([data-deferred-init])', function (e){ var selector=$(e.target).attr('href'); $(selector).find('.bs-slider-items-container').slick('setPosition'); _dispatchEvents(); }); }}; Better_Ajax_Pagination.prototype.bindDeferredEvents=function (){ var tabHeight=200, self=this,minHeight=0; $('.multi-tab').on('show.bs.tab', 'a[data-deferred-init]', function (e){ var prev_el=$(this).closest('.multi-tab') .find('.active') .attr('href'); tabHeight=$(prev_el).height(); }); $('.tabs-section').on('show.bs.tab', 'a[data-deferred-init]', function (e){ var prev_el=$(this).closest('.tabs-section') .find('.active:visible a') .data('target'), $target=$(prev_el); tabHeight=$target.height(); }).on('show.bs.tab', 'a', function (){ var prev_el=$(this).closest('.tabs-section') .find('.active:visible a') .data('target'), $target=$(prev_el), _tabHeight=$target.outerHeight(); if(_tabHeight){ var $parent=$target.closest('.tab-content'); if($parent.length){ var calcHeight=Math.max(_tabHeight, parseInt($parent.outerHeight())); calcHeight=Math.max(calcHeight, minHeight); $parent.css('min-height', calcHeight).data('bs-height', calcHeight); minHeight=calcHeight; }} }); $('a[data-deferred-init]').each(function(e){ var $this=$(this), event=$this.data('deferred-event')||'click'; if($this.closest('.deferred-block-exclude').length > 0){ return ; } $this.on(event, function (e){ var $this=$(this), blockID=$this.data('deferred-init'), $wrapper=$("#bsd_" + blockID), $container=$wrapper.closest('.bs-deferred-container'); if($wrapper.hasClass('bs-deferred-load-wrapper')){ if($wrapper.hasClass('bs-deferred-loaded')){ var isPinned=$wrapper.closest('.bs-pinning-block.pinned').length; _dispatchEvents(!isPinned); }else{ $container.removeClass('bs-tab-animated'); self.handleDeferredElements($wrapper, {loadingHeight: tabHeight ? tabHeight:undefined}, function (){ $container.addClass('bs-tab-animated'); $wrapper.addClass('bs-deferred-loaded'); var $pagination=$container.find('.bs-pagination'); if(tabHeight&&(!$pagination.length||$pagination.hasClass('next_prev'))){ $container.css('min-height', tabHeight); } tabHeight=undefined; }); }} }); }); } Better_Ajax_Pagination.prototype.handleDeferredElements=function ($el,args, successCallback){ var self=this; if(! $el.hasClass('bs-deferred-load-wrapper')){ $el=$el.find('.bs-deferred-load-wrapper'); } $el.each(function (){ var $wrapper=$(this); if($wrapper.hasClass('deferred-html-exists')){ return; } args=$.extend({ loadingHeight: 100, loadingMinHeight: 0 },args); if(!$wrapper.find('.deferred-loading-container').length){ var $loading=$('
', { 'class': 'deferred-loading-container', height: args.loadingHeight }); var $pagination=$wrapper.find('.bs-pagination'); if(args.loadingMinHeight&&(! $pagination||!$pagination.hasClass('more_btn'))){ $loading.css('min-height', args.loadingMinHeight); } $loading.append(self.getLoadingRawHtml()); $loading.appendTo($wrapper); } self.id=$wrapper.attr('id'); var props=self.getAjaxProps('deferred'); if(typeof xhrList[self.id]==='object') xhrList[self.id].abort(); xhrList[self.id]=$.ajax({ url: props[ 'ajax_url' ], type: 'POST', dataType: 'json', data: props }).done(function (response){ $wrapper.find('.deferred-loading-container').remove(); delete xhrList[self.id]; $wrapper.addClass('deferred-html-exists').append(response.output); self.handler_slider($wrapper); if(successCallback) successCallback.call($wrapper, response); var isPinned=$wrapper.closest('.bs-pinning-block.pinned').length; _dispatchEvents(!isPinned); self.settings.afterSuccessDeferredAjax.call(self, $wrapper, response); }); }); }; Better_Ajax_Pagination.prototype.getLoadingRawHtml=function (){ return '
' + bs_pagination_loc.loading + '
'; } Better_Ajax_Pagination.prototype.getAjaxProps=function (propType){ propType=propType||'pagination'; var prefix=propType==='deferred' ? this.deferredPrefix:this.prefix; var _jsonStringVarName=prefix + this.id, props; if(typeof window[ _jsonStringVarName ]==='undefined') throw 'pagination settings not set'; props=jQuery.parseJSON(window[ _jsonStringVarName ]); switch(propType.toLowerCase()){ case 'pagination': props[ 'action' ]='pagination_ajax'; props[ 'current_page' ]=this.$link_el.parent().data('current-page')||1; props[ 'pagin_type' ]=this.paginationStyle; break; case 'deferred': props[ 'action' ]='deferred_loading'; props[ 'current_page' ]=1; break; } return props; }; Better_Ajax_Pagination.prototype.setNewPageNumber=function (){ var $pagination=this.$link_el.parent(), current_page=$pagination.data('current-page')||1; this.isPrevPage=this.$link_el.hasClass('prev'); if(this.isPrevPage){ if(current_page < 2) throw 'Wrong page number!'; current_page--; }else{ current_page++; } $pagination.data('current-page', current_page); }; Better_Ajax_Pagination.prototype.debug=function (message){ console.error(message); }; Better_Ajax_Pagination.prototype.cacheThisStyle=function (styleName){ return 'next_prev'===styleName; }; Better_Ajax_Pagination.prototype.getPaginationStyle=function (){ var valid_types=[ 'next_prev', 'more_btn', 'more_btn_infinity', 'infinity' ]; var $pagination_wrapper=this.$link_el.closest('.bs-pagination'), current_class; for (var i=0; i < valid_types.length; i++){ current_class=valid_types[ i ]; if($pagination_wrapper.hasClass(current_class)) return current_class; } return ''; }; Better_Ajax_Pagination.prototype.cache_get=function (name, group){ if(typeof cache[ group ]!=='undefined'&&typeof cache[ group ][ name ]!=='undefined'){ return cache[ group ][ name ]; }}; Better_Ajax_Pagination.prototype.cache_add=function (name, data, group){ if(typeof cache[ group ]==='undefined') cache[ group ]={}; cache[ group ][ name ]=data; }; Better_Ajax_Pagination.prototype.handle_event=function (response, event){ if(typeof response[ 'events' ]!=='object') return false; if(typeof response[ 'events' ][ event ]==='string'){ var callback_name=response[ 'events' ][ event ]; if(typeof window[ callback_name ]==='function'){ window[ callback_name ].call(this, response, event); }} }; Better_Ajax_Pagination.prototype.handle_response=function (response){ if(response===null||typeof response[ 'error' ]==='string'){ if(response===null){ this.debug("Error!") ; }else{ this.debug(response[ 'error' ]); } return; } var $paginate=this.$link_el.closest('.bs-pagination'), $outputSection=$paginate.prevAll('.bs-pagination-wrapper'); var isPinned=$paginate.closest('.bs-pinning-block.pinned').length; this.handle_event(response, 'before_append'); switch (this.paginationStyle){ case 'next_prev': $outputSection.html(response[ 'output' ]); this.handle_event(response, 'after_append'); $outputSection .addClass('bs-animate') .addClass(this.isPrevPage ? 'bs-fadeInLeft':'bs-fadeInRight') .delay(400) .queue(function (n){ $(this).removeClass('bs-animate bs-fadeInRight bs-fadeInLeft'); n(); }); _dispatchEvents(!isPinned); if(typeof response[ 'label' ]!=='undefined'){ $paginate.find('.bs-pagination-label').html(response[ 'label' ]); } $paginate.find('.next')[ response[ 'have_next' ] ? 'removeClass':'addClass' ]('disabled'); $paginate.find('.prev')[ response[ 'have_prev' ] ? 'removeClass':'addClass' ]('disabled'); break; case 'more_btn': case 'more_btn_infinity': case 'infinity': if(typeof response[ 'add-to' ]==='string'){ var $appended_el=$(response[ 'output' ]); if(response[ 'add-type' ]=='prepend'){ $outputSection.find(response[ 'add-to' ]).prepend($appended_el); }else{ $outputSection.find(response[ 'add-to' ]).append($appended_el); }}else{ var $appended_el=$outputSection.append(response[ 'output' ]).children(':last'); } _dispatchEvents(!isPinned); this.handle_event(response, 'after_append'); $appended_el .addClass('bs-animate bs-fadeInUp') .delay(400) .queue(function (n){ $(this).removeClass('bs-animate bs-fadeInUp'); n(); }); if(this.paginationStyle==='infinity'){ if(!response[ 'have_next' ]){ this.$link_el.unbind('inview').remove(); }}else{ if(response[ 'have_next' ]){ this.$link_el.removeClass('disabled'); }else{ this.$link_el.addClass('disabled'); this.$link_el.find('.loaded').remove(); this.$link_el.find('.no-more').show(); }} break; } this.handle_event(response, 'after_response'); }; $.fn.Better_Ajax_Pagination=function(settings){ new Better_Ajax_Pagination(settings).handler_slider(); return this.each(function(){ new Better_Ajax_Pagination().init(this); }); }; $.fn.Better_Deferred_Loading=function(settings){ var pagination=new Better_Ajax_Pagination(settings); pagination.bindDeferredEvents(); return pagination; }})(jQuery); !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('
"),o.wrapper=t(this).closest(".bs-pinning-wrapper"),o.target=t(this),a.prepare(),t(window).on("scroll",a.pinHandler)})}}(jQuery),!function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}(this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var n=this._events=this._events||{},i=n[t]=n[t]||[];return-1==i.indexOf(e)&&i.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var n=this._onceEvents=this._onceEvents||{},i=n[t]=n[t]||[];return i[e]=!0,this}},e.off=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=n.indexOf(e);return-1!=i&&n.splice(i,1),this}},e.emitEvent=function(t,e){var n=this._events&&this._events[t];if(n&&n.length){var i=0,o=n[i];e=e||[];for(var a=this._onceEvents&&this._onceEvents[t];o;){var s=a&&a[o];s&&(this.off(t,o),delete a[o]),o.apply(this,e),i+=s?0:1,o=n[i]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(n){return e(t,n)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}(window,function(t,e){function n(t,e){for(var n in e)t[n]=e[n];return t}function i(t){var e=[];if(Array.isArray(t))e=t;else if("number"==typeof t.length)for(var n=0;n'+i.options.prev_label+''+i.options.next_label+""),i.$el.on("click",".control-nav .prev",function(){i.prev()}),i.$el.on("click",".control-nav .next",function(){i.next()}))},i.next=function(){var t=i.$el.find("li.active"),e=t.next();e.length||(e=i.$el.find("li:first")),i.$el.find("li.active").removeClass("active"),e.addClass("active").fadeIn()},i.prev=function(){var t=i.$el.find("li.active"),e=t.prev();e.length||(e=i.$el.find("li:last")),i.$el.find("li.active").removeClass("active"),e.addClass("active").fadeIn()},i.init()},t.betterNewsticker.defaultOptions={speed:8e3,control_nav:!1,prev_label:'',next_label:''},t.fn.betterNewsticker=function(e){return this.each(function(){new t.betterNewsticker(this,e)})}}(jQuery),function(t,e,n){t.fn.simplyScroll=function(e){return this.each(function(){new t.simplyScroll(this,e)})};var i={customClass:"simply-scroll",frameRate:24,speed:1,orientation:"horizontal",auto:!0,autoMode:"loop",manualMode:"end",direction:"forwards",pauseOnHover:!0,pauseOnTouch:!0,pauseButton:!1,startOnLoad:!1};t.simplyScroll=function(n,o){var a=this;this.o=t.extend({},i,o||{}),this.isAuto=!1!==this.o.auto&&null!==this.o.autoMode.match(/^loop|bounce$/),this.isRTL=(this.isHorizontal=null!==this.o.orientation.match(/^horizontal|vertical$/)&&this.o.orientation==i.orientation)&&"rtl"==t("html").attr("dir"),this.isForwards=!this.isAuto||this.isAuto&&null!==this.o.direction.match(/^forwards|backwards$/)&&this.o.direction==i.direction&&!this.isRTL,this.isLoop=this.isAuto&&"loop"==this.o.autoMode||!this.isAuto&&"loop"==this.o.manualMode,this.events=(this.supportsTouch="createTouch"in document)?{start:"touchstart MozTouchDown",move:"touchmove MozTouchMove",end:"touchend touchcancel MozTouchRelease"}:{start:"mouseenter",end:"mouseleave"},this.$list=t(n);var s=this.$list.children();if(this.$list.addClass("simply-scroll-list").wrap('
').parent().wrap('
'),this.isAuto?this.o.pauseButton&&(this.$list.parent().parent().prepend('
'),this.o.pauseOnHover=!1):this.$list.parent().parent().prepend('
').prepend('
'),1").parent().addClass("simply-scroll-list"),this.isHorizontal?this.$list.children().css({float:"left",width:l+"px"}):this.$list.children().css({height:l+"px"}))}this.o.startOnLoad?t(e).load(function(){a.init()}):this.init()},t.simplyScroll.fn=t.simplyScroll.prototype={},t.simplyScroll.fn.extend=t.simplyScroll.extend=t.extend,t.simplyScroll.fn.extend({init:function(){this.$items=this.$list.children(),this.$clip=this.$list.parent(),this.$container=this.$clip.parent(),this.$btnBack=t(".simply-scroll-back",this.$container),this.$btnForward=t(".simply-scroll-forward",this.$container),this.isHorizontal?(this.itemMax=this.$items.eq(0).outerWidth(!0),this.clipMax=this.$clip.width(),this.dimension="width",this.moveBackClass="simply-scroll-btn-left",this.moveForwardClass="simply-scroll-btn-right",this.scrollPos="Left"):(this.itemMax=this.$items.eq(0).outerHeight(!0),this.clipMax=this.$clip.height(),this.dimension="height",this.moveBackClass="simply-scroll-btn-up",this.moveForwardClass="simply-scroll-btn-down",this.scrollPos="Top"),this.posMin=0,this.posMax=this.$items.length*this.itemMax;var e=Math.ceil(this.clipMax/this.itemMax);if(this.isAuto&&"loop"==this.o.autoMode)this.$list.css(this.dimension,this.posMax+this.itemMax*e+"px"),this.posMax+=this.clipMax-this.o.speed,this.isForwards?(this.$items.slice(0,e).clone(!0).appendTo(this.$list),this.resetPosition=0):(this.$items.slice(-e).clone(!0).prependTo(this.$list),this.resetPosition=this.$items.length*this.itemMax,this.isRTL&&(this.$clip[0].dir="ltr",this.$items.css("float","right")));else if(this.isAuto||"loop"!=this.o.manualMode)this.$list.css(this.dimension,this.posMax+"px"),this.isForwards?this.resetPosition=0:(this.resetPosition=this.$items.length*this.itemMax,this.isRTL&&(this.$clip[0].dir="ltr",this.$items.css("float","right")));else{this.posMax+=this.itemMax*e,this.$list.css(this.dimension,this.posMax+this.itemMax*e+"px"),this.posMax+=this.clipMax-this.o.speed,this.$items.slice(0,e).clone(!0).appendTo(this.$list),this.$items.slice(-e).clone(!0).prependTo(this.$list),this.resetPositionForwards=this.resetPosition=e*this.itemMax,this.resetPositionBackwards=this.$items.length*this.itemMax;var i=this;this.$btnBack.bind(this.events.start,function(){i.isForwards=!1,i.resetPosition=i.resetPositionBackwards}),this.$btnForward.bind(this.events.start,function(){i.isForwards=!0,i.resetPosition=i.resetPositionForwards})}if(this.resetPos(),this.interval=null,this.intervalDelay=Math.floor(1e3/this.o.frameRate),this.isAuto||"end"!=this.o.manualMode)for(;0!==this.itemMax%this.o.speed;)if(this.o.speed--,0===this.o.speed){this.o.speed=1;break}if(i=this,this.trigger=null,this.funcMoveBack=function(t){t!==n&&t.preventDefault(),i.trigger=i.isAuto||"end"!=i.o.manualMode?null:this,i.isAuto?i.isForwards?i.moveBack():i.moveForward():i.moveBack()},this.funcMoveForward=function(t){t!==n&&t.preventDefault(),i.trigger=i.isAuto||"end"!=i.o.manualMode?null:this,i.isAuto?i.isForwards?i.moveForward():i.moveBack():i.moveForward()},this.funcMovePause=function(){i.movePause()},this.funcMoveStop=function(){i.moveStop()},this.funcMoveResume=function(){i.moveResume()},this.isAuto){this.paused=!1;var o=function(){return i.paused===!1?(i.paused=!0,i.funcMovePause()):(i.paused=!1,i.funcMoveResume()),i.paused};if(this.supportsTouch&&this.$items.find("a").length&&(this.supportsTouch=!1),this.isAuto&&this.o.pauseOnHover&&!this.supportsTouch)this.$clip.bind(this.events.start,this.funcMovePause).bind(this.events.end,this.funcMoveResume);else if(this.isAuto&&this.o.pauseOnTouch&&!this.o.pauseButton&&this.supportsTouch){var a,s;this.$clip.bind(this.events.start,function(t){o();var e=t.originalEvent.touches[0];a=i.isHorizontal?e.pageX:e.pageY,s=i.$clip[0]["scroll"+i.scrollPos],t.stopPropagation(),t.preventDefault()}).bind(this.events.move,function(t){t.stopPropagation(),t.preventDefault(),t=t.originalEvent.touches[0],t=a-(i.isHorizontal?t.pageX:t.pageY)+s,t<0?t=0:t>i.posMax&&(t=i.posMax),i.$clip[0]["scroll"+i.scrollPos]=t,i.funcMovePause(),i.paused=!0})}else this.o.pauseButton&&(this.$btnPause=t(".simply-scroll-btn-pause",this.$container).bind("click",function(e){e.preventDefault(),o()?t(this).addClass("active"):t(this).removeClass("active")}));this.funcMoveForward()}else this.$btnBack.addClass("simply-scroll-btn "+this.moveBackClass).bind(this.events.start,this.funcMoveBack).bind(this.events.end,this.funcMoveStop),this.$btnForward.addClass("simply-scroll-btn "+this.moveForwardClass).bind(this.events.start,this.funcMoveForward).bind(this.events.end,this.funcMoveStop),"end"==this.o.manualMode&&(this.isRTL?this.$btnForward.addClass("disabled"):this.$btnBack.addClass("disabled"))},moveForward:function(){var t=this;this.movement="forward",null!==this.trigger&&this.$btnBack.removeClass("disabled"),t.interval=setInterval(function(){t.$clip[0]["scroll"+t.scrollPos]t.posMin?t.$clip[0]["scroll"+t.scrollPos]-=t.o.speed:t.isLoop?t.resetPos():t.moveStop(t.movement)},t.intervalDelay)},movePause:function(){clearInterval(this.interval)},moveStop:function(e){this.movePause(),null!==this.trigger&&("undefined"!=typeof e&&t(this.trigger).addClass("disabled"),this.trigger=null),this.isAuto&&"bounce"==this.o.autoMode&&("forward"==e?this.moveBack():this.moveForward())},moveResume:function(){"forward"==this.movement?this.moveForward():this.moveBack()},resetPos:function(){this.$clip[0]["scroll"+this.scrollPos]=this.resetPosition}})}(jQuery,window),function(t,e,n){"use strict";var i=t(e),o=e.document,a=t(o),s=function(){for(var t,e=3,n=o.createElement("div"),i=n.getElementsByTagName("i");n.innerHTML="",i[0];);return e>4?e:t}(),r=function(){var t=e.pageXOffset!==n?e.pageXOffset:"CSS1Compat"==o.compatMode?e.document.documentElement.scrollLeft:e.document.body.scrollLeft,i=e.pageYOffset!==n?e.pageYOffset:"CSS1Compat"==o.compatMode?e.document.documentElement.scrollTop:e.document.body.scrollTop;"undefined"==typeof r.x&&(r.x=t,r.y=i),"undefined"==typeof r.distanceX?(r.distanceX=t,r.distanceY=i):(r.distanceX=t-r.x,r.distanceY=i-r.y);var a=r.x-t,s=r.y-i;r.direction=a<0?"right":a>0?"left":s<=0?"down":s>0?"up":"first",r.x=t,r.y=i};i.on("scroll",r),t.fn.style=function(n){if(!n)return null;var i,a=t(this),s=a.clone().css("display","none");s.find("input:radio").attr("name","copy-"+Math.floor(100*Math.random()+1)),a.after(s);var r=function(t,n){var i;return t.currentStyle?i=t.currentStyle[n.replace(/-\w/g,function(t){return t.toUpperCase().replace("-","")})]:e.getComputedStyle&&(i=o.defaultView.getComputedStyle(t,null).getPropertyValue(n)),i=/margin/g.test(n)?parseInt(i)===a[0].offsetLeft?i:"auto":i};return"string"==typeof n?i=r(s[0],n):(i={},t.each(n,function(t,e){i[e]=r(s[0],e)})),s.remove(),i||null},t.fn.extend({hcSticky:function(o){return 0==this.length?this:(this.pluginOptions("hcSticky",{top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,className:"sticky",wrapperClassName:"wrapper-sticky",stickTo:null,responsive:!0,followScroll:!0,offResolutions:null,onStart:t.noop,onStop:t.noop,on:!0,fn:null},o||{},{reinit:function(){t(this).hcSticky()},stop:function(){t(this).pluginOptions("hcSticky",{on:!1}).each(function(){var e=t(this),n=e.pluginOptions("hcSticky"),i=e.parent("."+n.wrapperClassName),o=e.offset().top-i.offset().top;e.css({position:"absolute",top:o,bottom:"auto",left:"auto",right:"auto"}).removeClass(n.className)})},off:function(){t(this).pluginOptions("hcSticky",{on:!1}).each(function(){var e=t(this),n=e.pluginOptions("hcSticky"),i=e.parent("."+n.wrapperClassName);e.css({position:"relative",top:"auto",bottom:"auto",left:"auto",right:"auto"}).removeClass(n.className),i.css("height","auto")})},on:function(){t(this).each(function(){t(this).pluginOptions("hcSticky",{on:!0,remember:{offsetTop:i.scrollTop()}}).hcSticky()})},destroy:function(){var e=t(this),n=e.pluginOptions("hcSticky"),o=e.parent("."+n.wrapperClassName);e.removeData("hcStickyInit").css({position:o.css("position"),top:o.css("top"),bottom:o.css("bottom"),left:o.css("left"),right:o.css("right")}).removeClass(n.className),i.off("resize",n.fn.resize).off("scroll",n.fn.scroll),e.unwrap()}}),o&&"undefined"!=typeof o.on&&(o.on?this.hcSticky("on"):this.hcSticky("off")),"string"==typeof o?this:this.each(function(){var o=t(this),l=o.pluginOptions("hcSticky"),c=function(){var t=o.parent("."+l.wrapperClassName);return t.length>0&&(t.css({height:o.outerHeight(!0),width:function(){var e=t.style("width");return e.indexOf("%")>=0||"auto"==e?("border-box"==o.css("box-sizing")||"border-box"==o.css("-moz-box-sizing")?o.css("width",t.width()):o.css("width",t.width()-parseInt(o.css("padding-left")-parseInt(o.css("padding-right")))),e):o.outerWidth(!0)}()}),t)}()||function(){var e=o.style(["width","margin-left","left","right","top","bottom","float","display"]),n=o.css("display"),i=t("
",{class:l.wrapperClassName}).css({display:n,height:o.outerHeight(!0),width:function(){return e.width.indexOf("%")>=0||"auto"==e.width&&"inline-block"!=n&&"inline"!=n?(o.css("width",parseFloat(o.css("width"))),e.width):"auto"!=e.width||"inline-block"!=n&&"inline"!=n?"auto"==e["margin-left"]?o.outerWidth():o.outerWidth(!0):o.width()}(),margin:e["margin-left"]?"auto":null,position:function(){var t=o.css("position");return"static"==t?"relative":t}(),float:e.float||null,left:e.left,right:e.right,top:e.top,bottom:e.bottom,"vertical-align":"top"});return o.wrap(i),7===s&&0===t("head").find("style#hcsticky-iefix").length&&t('").appendTo("head"),o.parent()}();if(!o.data("hcStickyInit")){o.data("hcStickyInit",!0);var d=!(!l.stickTo||!("document"==l.stickTo||l.stickTo.nodeType&&9==l.stickTo.nodeType||"object"==typeof l.stickTo&&l.stickTo instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document))),u=l.stickTo?d?a:"string"==typeof l.stickTo?t(l.stickTo):l.stickTo:c.parent();o.css({top:"auto",bottom:"auto",left:"auto",right:"auto"}),i.load(function(){o.outerHeight(!0)>u.height()&&(c.css("height",o.outerHeight(!0)),o.hcSticky("reinit"))});var h=function(t){o.hasClass(l.className)||(t=t||{},o.css({position:"fixed",top:t.top||0,left:t.left||c.offset().left}).addClass(l.className),l.onStart.apply(o[0]),c.addClass("sticky-active"))},p=function(t){t=t||{},t.position=t.position||"absolute",t.top=t.top||0,t.left=t.left||0,"fixed"!=o.css("position")&&parseInt(o.css("top"))==t.top||(o.css({position:t.position,top:t.top,left:t.left}).removeClass(l.className),l.onStop.apply(o[0]),c.removeClass("sticky-active"))},f=function(e){if(l.on&&o.is(":visible")){if(o.outerHeight(!0)>=u.height())return void p();var n,a=l.innerSticker?t(l.innerSticker).position().top:l.innerTop?l.innerTop:0,s=c.offset().top,f=u.height()-l.bottomEnd+(d?0:s),m=c.offset().top-l.top+a,v=o.outerHeight(!0)+l.bottom,g=i.height(),b=i.scrollTop(),y=o.offset().top,w=y-b;if("undefined"!=typeof l.remember&&l.remember){var x=y-l.top-a;return void(v-a>g&&l.followScroll?xx?b<=x&&(h({top:l.top-a}),l.remember=!1):b>=x&&(h({top:l.top-a}),l.remember=!1))}b>m?f+l.bottom-(l.followScroll&&gg-(m-a)&&l.followScroll&&(n=v-g-a)>0?n:0)?p({top:f-v+l.bottom-s}):v-a>g&&l.followScroll?w+v<=g?"down"==r.direction?h({top:g-v}):w<0&&"fixed"==o.css("position")&&p({top:y-(m+l.top-a)-r.distanceY}):"up"==r.direction&&y>=b+l.top-a?h({top:l.top-a}):"down"==r.direction&&y+v>g&&"fixed"==o.css("position")&&p({top:y-(m+l.top-a)-r.distanceY}):h({top:l.top-a}):p()}},m=!1,v=!1,g=function(){if(y(),b(),l.on){var t=function(){"fixed"==o.css("position")?o.css("left",c.offset().left):o.css("left",0)};if(l.responsive){v||(v=o.clone().attr("style","").css({visibility:"hidden",height:0,overflow:"hidden",paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}),c.after(v));var e=c.style("width"),n=v.style("width");"auto"==n&&"auto"!=e&&(n=parseInt(o.css("width"))),n!=e&&c.width(n),m&&clearTimeout(m),m=setTimeout(function(){m=!1,v.remove(),v=!1},250)}if(t(),o.outerWidth(!0)!=c.width()){var i="border-box"==o.css("box-sizing")||"border-box"==o.css("-moz-box-sizing")?c.width():c.width()-parseInt(o.css("padding-left"))-parseInt(o.css("padding-right"));i=i-parseInt(o.css("margin-left"))-parseInt(o.css("margin-right")),o.css("width",i)}}};o.pluginOptions("hcSticky",{fn:{scroll:f,resize:g}});var b=function(){if(l.offResolutions){t.isArray(l.offResolutions)||(l.offResolutions=[l.offResolutions]);var e=!0;t.each(l.offResolutions,function(t,n){n<0?i.width()n&&(e=!1,o.hcSticky("off"))}),e&&!l.on&&o.hcSticky("on")}};b(),i.on("resize",g);var y=function(){var o=!1;t._data(e,"events").scroll!=n&&t.each(t._data(e,"events").scroll,function(t,e){e.handler==l.fn.scroll&&(o=!0)}),o||(l.fn.scroll(!0),i.on("scroll",l.fn.scroll))};y()}}))}})}(jQuery,this),function(t,e){"use strict";t.fn.extend({pluginOptions:function(n,i,o,a){return this.data(n)||this.data(n,{}),n&&"undefined"==typeof i?this.data(n).options:(o=o||i||{},"object"==typeof o||o===e?this.each(function(){var e=t(this);e.data(n).options?e.data(n,t.extend(e.data(n),{options:t.extend(e.data(n).options,o||{})})):(e.data(n,{options:t.extend(i,o||{})}),a&&(e.data(n).commands=a))}):"string"==typeof o?this.each(function(){t(this).data(n).commands[o].call(this)}):this)}})}(jQuery),!function(t){!function(t){function e(e,n){this.element=e,this.$element=t(e),this.overflowElements=[],this.elementsWidth=0,this.lastExecutedBR=0,this.handleBR=!1,this.options=t.extend({childClass:!1,mustDisplayClass:!1,menuContainerTag:"div",menuContainerClass:"bs-pretty-tabs-container",menuContainerPosition:"beginning",itemsWrapperSelector:!1,moreContainer:'More
',getContainerWidth:function(t){return t},initWrapperContainer:function(t){return t},styleChangesAt:[]},n),this.options.styleChangesAt.length&&(this.handleBR=!0,this.options.styleChangesAt=this.options.styleChangesAt.sort(function(t,e){return t>e})),this.init()}t.extend(e.prototype,{init:function(){var e=this;t(window).on("resize.bsPrettyTabs",function(){if(e.handleBR){var n=e.getCurrentBR();n!==e.lastExecutedBR&&(e.retrieveElements(!0),e.getItems().each(function(){var n=t(this);e._updateElementWidth(n)}),e.lastExecutedBR=n)}e.handlePrettyTabs()}).resize(),e.$element.addClass("bs-pretty-tabs bs-pretty-tabs-initialized")},getItemsWrapper:function(){var t;return t=this.options.itemsWrapperSelector?this.$element.find(this.options.itemsWrapperSelector):this.$element},getItems:function(t){return this.getItemsWrapper().children(t)},getCurrentBR:function(){var t=0;for(i=0;i=window.outerWidth){t=this.options.styleChangesAt[i];break}return t},handlePrettyTabs:function(){var e=this;e.collectOverflowElements(),e.overflowElements.length?e.overflowElements.forEach(function(t){e.moveToInvisibleContainer(t)}):e.retrieveElements();var n=this._getTotalWidth(),i=this._getMenuLinkWidth(),o=this._getMenuContainer();if(n",{class:this.options.menuContainerClass});return e=this.options.initWrapperContainer.call(this,e),e.append(this.options.moreContainer),"end"===this.options.menuContainerPosition?e.appendTo(this.getItemsWrapper()):e.prependTo(this.getItemsWrapper()),e.on("mouseover",function(){t(this).addClass("display-more-items")}).on("mouseout",function(){t(this).removeClass("display-more-items")}).on("click",function(){t(this).toggleClass("display-more-items")}),e},_getMenuLinkWidth:function(t){var e=this.options.menuContainerClass,n=this.$element.find("."+e+" .bs-pretty-tabs-more"),t=t||!1;return n.length||t?this._getElementWidth(n)||0:(this._setMenuContainer(),this._getMenuLinkWidth(!0))},_getTotalWidth:function(){return this.options.getContainerWidth.call(this,this.$element.width())},getInvisibleElementsContainer:function(){return t(".bs-pretty-tabs-elements",this._getMenuContainer())},moveToInvisibleContainer:function(e){var n=this.getInvisibleElementsContainer(),i=t(e);i.data("bs-visibility","hidden"),i.prependTo(n)},moveToVisibleContainer:function(t){var e=this._getMenuContainer();t.data("bs-visibility","visible"),"end"===this.options.menuContainerPosition?t.insertBefore(this._getMenuContainer()):t.appendTo(e.parent())},collectOverflowElements:function(){var e=this._getTotalWidth(),n=this;this.overflowElements=[],this.elementsWidth=n._getMenuLinkWidth(),this.getItems().each(function(){var i=t(this);if(!i.hasClass(n.options.menuContainerClass)){var o=n._getElementWidth(i);n.elementsWidth+=o,n.elementsWidth>e&&(i.hasClass(n.options.menuContainerClass)||n.options.mustDisplayClass&&i.hasClass(n.options.mustDisplayClass)||n.overflowElements.push(i))}}),n.overflowElements=n.overflowElements.reverse()}}),t.fn.bsPrettyTabs=function(t){this.each(function(){new e(this,t)})}}(jQuery)}(jQuery),!function(){function t(t){return Array.prototype.slice.call(t)}function e(t){var e=parseInt(t,10);return e>d?d:e}function n(t){return t.hasAttribute("data-no-resize")||(0===t.offsetWidth&&0===t.offsetHeight?(t.setAttribute("width",t.naturalWidth),t.setAttribute("height",t.naturalHeight)):(t.setAttribute("width",t.offsetWidth),t.setAttribute("height",t.offsetHeight))),t}function i(t,e){var i=t.nodeName.toLowerCase(),o=document.createElement("img"); o.addEventListener("load",function(){"img"===i?n(t).setAttribute("src",e):t.style.backgroundImage="url("+e+")"}),o.setAttribute("src",e),t.setAttribute(f,!0)}function o(t,n){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2],a=e(o);if(n&&a>1){var s=n.replace(u,"@"+a+"x$1");i(t,s)}}function a(t,e,n){d>1&&i(t,n)}function s(e){return e?"function"==typeof e.forEach?e:t(e):"undefined"!=typeof document?t(document.querySelectorAll(p)):[]}function r(t){return t.style.backgroundImage.replace(h,"$2")}function l(t){s(t).forEach(function(t){if(!t.getAttribute(f)){var e="img"===t.nodeName.toLowerCase(),n=e?t.getAttribute("src"):r(t),i=t.getAttribute("data-bsrjs"),s=!isNaN(parseInt(i,10));if(null===i)return;s?o(t,n,i):a(t,n,i)}})}var c="undefined"!=typeof window,d=c?window.devicePixelRatio||1:1,u=/(\.[A-z]{3,4}\/?(\?.*)?)$/,h=/url\(('|")?([^\)'"]+)('|")?\)/i,p="[data-bsrjs]",f="data-bsrjs-processed";c&&(window.addEventListener("load",l),window.bsrj_retinajs=l)}(),function(){var t=jQuery.fn.addClass;jQuery.fn.addClass=function(){var e=t.apply(this,arguments);return jQuery(this).trigger("cssClassChanged"),e}}(); !function(a){function b(){var a=location.href;return hashtag=a.indexOf("#prettyPhoto")!==-1&&decodeURI(a.substring(a.indexOf("#prettyPhoto")+1,a.length)),hashtag&&(hashtag=hashtag.replace(/<|>/g,"")),hashtag}function c(){"undefined"!=typeof theRel&&(location.hash=theRel+"/"+rel_index+"/")}function d(){location.href.indexOf("#prettyPhoto")!==-1&&(location.hash="prettyPhoto")}function e(a,b){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c="[\\?&]"+a+"=([^&#]*)",d=new RegExp(c),e=d.exec(b);return null==e?"":e[1]}a.fn.prettyPhoto||(a.prettyPhoto={version:"3.1.6"},a.fn.prettyPhoto=function(f){function r(){a(".pp_loaderIcon").hide(),projectedTop=scroll_pos.scrollTop+(o/2-i.containerHeight/2),projectedTop<0&&(projectedTop=0),$ppt.fadeTo(settings.animation_speed,1),$pp_pic_holder.find(".pp_content").animate({height:i.contentHeight,width:i.contentWidth},settings.animation_speed),$pp_pic_holder.animate({top:projectedTop,left:p/2-i.containerWidth/2<0?0:p/2-i.containerWidth/2,width:i.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(i.height).width(i.width),$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed),isSet&&"image"==w(pp_images[set_position])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),settings.allow_expand&&(i.resized?a("a.pp_expand,a.pp_contract").show():a("a.pp_expand").hide()),!settings.autoplay_slideshow||q||j||a.prettyPhoto.startSlideshow(),settings.changepicturecallback(),j=!0}),A(),f.ajaxcallback()}function s(b){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden"),$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){a(".pp_loaderIcon").show(),b()})}function t(b){b>1?a(".pp_nav").show():a(".pp_nav").hide()}function u(a,b){if(resized=!1,v(a,b),imageWidth=a,imageHeight=b,(n>p||m>o)&&doresize&&settings.allow_resize&&!h){for(resized=!0,fitting=!1;!fitting;)n>p?(imageWidth=p-200,imageHeight=b/a*imageWidth):m>o?(imageHeight=o-200,imageWidth=a/b*imageHeight):fitting=!0,m=imageHeight,n=imageWidth;(n>p||m>o)&&u(n,m),v(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(m),containerWidth:Math.floor(n)+2*settings.horizontal_padding,contentHeight:Math.floor(k),contentWidth:Math.floor(l),resized:resized}}function v(b,c){b=parseFloat(b),c=parseFloat(c),$pp_details=$pp_pic_holder.find(".pp_details"),$pp_details.width(b),detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom")),$pp_details=$pp_details.clone().addClass(settings.theme).width(b).appendTo(a("body")).css({position:"absolute",top:-1e4}),detailsHeight+=$pp_details.height(),detailsHeight=detailsHeight<=34?36:detailsHeight,$pp_details.remove(),$pp_title=$pp_pic_holder.find(".ppt"),$pp_title.width(b),titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom")),$pp_title=$pp_title.clone().appendTo(a("body")).css({position:"absolute",top:-1e4}),titleHeight+=$pp_title.height(),$pp_title.remove(),k=c+detailsHeight,l=b,m=k+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(),n=b}function w(a){return a.match(/youtube\.com\/watch/i)||a.match(/youtu\.be/i)?"youtube":a.match(/vimeo\.com/i)?"vimeo":a.match(/\b.mov\b/i)?"quicktime":a.match(/\b.swf\b/i)?"flash":a.match(/\biframe=true\b/i)?"iframe":a.match(/\bajax=true\b/i)?"ajax":a.match(/\bcustom=true\b/i)?"custom":"#"==a.substr(0,1)?"inline":"image"}function x(){if(doresize&&"undefined"!=typeof $pp_pic_holder){if(scroll_pos=y(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=o/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>o)return;$pp_pic_holder.css({top:projectedTop,left:p/2+scroll_pos.scrollLeft-contentwidth/2})}}function y(){return self.pageYOffset?{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}:document.documentElement&&document.documentElement.scrollTop?{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}:document.body?{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}:void 0}function z(){o=a(window).height(),p=a(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(a(document).height()).width(p)}function A(){isSet&&settings.overlay_gallery&&"image"==w(pp_images[set_position])?(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((i.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject),$pp_pic_holder.find("#pp_full_res").after(toInject),$pp_gallery=a(".pp_pic_holder .pp_gallery"),$pp_gallery_li=$pp_gallery.find("li"),$pp_gallery.find(".pp_arrow_next").click(function(){return a.prettyPhoto.changeGalleryPage("next"),a.prettyPhoto.stopSlideshow(),!1}),$pp_gallery.find(".pp_arrow_previous").click(function(){return a.prettyPhoto.changeGalleryPage("previous"),a.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()}),itemWidth=57,$pp_gallery_li.each(function(b){a(this).find("a").click(function(){return a.prettyPhoto.changePage(b),a.prettyPhoto.stopSlideshow(),!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend(''),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){return a.prettyPhoto.startSlideshow(),!1})),$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme),$pp_overlay.css({opacity:0,height:a(document).height(),width:a(window).width()}).bind("click",function(){settings.modal||a.prettyPhoto.close()}),a("a.pp_close").bind("click",function(){return a.prettyPhoto.close(),!1}),settings.allow_expand&&a("a.pp_expand").bind("click",function(b){return a(this).hasClass("pp_expand")?(a(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(a(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),s(function(){a.prettyPhoto.open()}),!1}),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){return a.prettyPhoto.changePage("previous"),a.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){return a.prettyPhoto.changePage("next"),a.prettyPhoto.stopSlideshow(),!1}),x()}f=jQuery.extend({hook:"rel",animation_speed:"fast",ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'
 
',gallery_markup:'',image_markup:'',flash_markup:'',quicktime_markup:'',iframe_markup:'',inline_markup:'
{content}
',custom_markup:"",social_tools:''},f);var i,j,k,l,m,n,q,g=this,h=!1,o=a(window).height(),p=a(window).width();return doresize=!0,scroll_pos=y(),a(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){x(),z()}),f.keyboard_shortcuts&&a(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(b){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(b.keyCode){case 37:a.prettyPhoto.changePage("previous"),b.preventDefault();break;case 39:a.prettyPhoto.changePage("next"),b.preventDefault();break;case 27:settings.modal||a.prettyPhoto.close(),b.preventDefault()}}),a.prettyPhoto.initialize=function(){return settings=f,"pp_default"==settings.theme&&(settings.horizontal_padding=16),theRel=a(this).attr(settings.hook),galleryRegExp=/\[(?:.*)\]/,isSet=!!galleryRegExp.exec(theRel),pp_images=isSet?jQuery.map(g,function(b,c){if(a(b).attr(settings.hook).indexOf(theRel)!=-1)return a(b).attr("href")}):a.makeArray(a(this).attr("href")),pp_titles=isSet?jQuery.map(g,function(b,c){if(a(b).attr(settings.hook).indexOf(theRel)!=-1)return a(b).find("img").attr("alt")?a(b).find("img").attr("alt"):""}):a.makeArray(a(this).find("img").attr("alt")),pp_descriptions=isSet?jQuery.map(g,function(b,c){if(a(b).attr(settings.hook).indexOf(theRel)!=-1)return a(b).attr("title")?a(b).attr("title"):""}):a.makeArray(a(this).attr("title")),pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1),set_position=jQuery.inArray(a(this).attr("href"),pp_images),rel_index=isSet?set_position:a("a["+settings.hook+"^='"+theRel+"']").index(a(this)),B(this),settings.allow_resize&&a(window).bind("scroll.prettyphoto",function(){x()}),a.prettyPhoto.open(),!1},a.prettyPhoto.open=function(b){return"undefined"==typeof settings&&(settings=f,pp_images=a.makeArray(arguments[0]),pp_titles=arguments[1]?a.makeArray(arguments[1]):a.makeArray(""),pp_descriptions=arguments[2]?a.makeArray(arguments[2]):a.makeArray(""),isSet=pp_images.length>1,set_position=arguments[3]?arguments[3]:0,B(b.target)),settings.hideflash&&a("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden"),t(a(pp_images).size()),a(".pp_loaderIcon").show(),settings.deeplinking&&c(),settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)),$pp_pic_holder.find(".pp_social").html(facebook_like_link)),$ppt.is(":hidden")&&$ppt.css("opacity",0).show(),$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity),$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+a(pp_images).size()),"undefined"!=typeof pp_descriptions[set_position]&&""!=pp_descriptions[set_position]?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])):$pp_pic_holder.find(".pp_description").hide(),movie_width=parseFloat(e("width",pp_images[set_position]))?e("width",pp_images[set_position]):settings.default_width.toString(),movie_height=parseFloat(e("height",pp_images[set_position]))?e("height",pp_images[set_position]):settings.default_height.toString(),h=!1,movie_height.indexOf("%")!=-1&&(movie_height=parseFloat(a(window).height()*parseFloat(movie_height)/100-150),h=!0),movie_width.indexOf("%")!=-1&&(movie_width=parseFloat(a(window).width()*parseFloat(movie_width)/100-150),h=!0),$pp_pic_holder.fadeIn(function(){switch(settings.show_title&&""!=pp_titles[set_position]&&"undefined"!=typeof pp_titles[set_position]?$ppt.html(unescape(pp_titles[set_position])):$ppt.html(" "),imgPreloader="",skipInjection=!1,w(pp_images[set_position])){case"image":imgPreloader=new Image,nextImage=new Image,isSet&&set_position0&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),movie_id.indexOf("&")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("&")))),movie="http://www.youtube.com/embed/"+movie_id,e("rel",pp_images[set_position])?movie+="?rel="+e("rel",pp_images[set_position]):movie+="?rel=1",settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.iframe_markup.replace(/{width}/g,i.width).replace(/{height}/g,i.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":i=u(movie_width,movie_height),movie_id=pp_images[set_position];var b=/http(s?):\/\/(www\.)?vimeo.com\/(\d+)/,c=movie_id.match(b);movie="http://player.vimeo.com/video/"+c[3]+"?title=0&byline=0&portrait=0",settings.autoplay&&(movie+="&autoplay=1;"),vimeo_width=i.width+"/embed/?moog_width="+i.width,toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,i.height).replace(/{path}/g,movie);break;case"quicktime":i=u(movie_width,movie_height),i.height+=15,i.contentHeight+=15,i.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,i.width).replace(/{height}/g,i.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":i=u(movie_width,movie_height),flash_vars=pp_images[set_position],flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length),filename=pp_images[set_position],filename=filename.substring(0,filename.indexOf("?")),toInject=settings.flash_markup.replace(/{width}/g,i.width).replace(/{height}/g,i.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":i=u(movie_width,movie_height),frame_url=pp_images[set_position],frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1),toInject=settings.iframe_markup.replace(/{width}/g,i.width).replace(/{height}/g,i.height).replace(/{path}/g,frame_url);break;case"ajax":doresize=!1,i=u(movie_width,movie_height),doresize=!0,skipInjection=!0,a.get(pp_images[set_position],function(a){toInject=settings.inline_markup.replace(/{content}/g,a),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,r()});break;case"custom":i=u(movie_width,movie_height),toInject=settings.custom_markup;break;case"inline":myClone=a(pp_images[set_position]).clone().append('
').css({width:settings.default_width}).wrapInner('
').appendTo(a("body")).show(),doresize=!1,i=u(a(myClone).width(),a(myClone).height()),doresize=!0,a(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,a(pp_images[set_position]).html())}imgPreloader||skipInjection||($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,r())}),!1},a.prettyPhoto.changePage=function(b){currentGalleryPage=0,"previous"==b?(set_position--,set_position<0&&(set_position=a(pp_images).size()-1)):"next"==b?(set_position++,set_position>a(pp_images).size()-1&&(set_position=0)):set_position=b,rel_index=set_position,doresize||(doresize=!0),settings.allow_expand&&a(".pp_contract").removeClass("pp_contract").addClass("pp_expand"),s(function(){a.prettyPhoto.open()})},a.prettyPhoto.changeGalleryPage=function(a){"next"==a?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):"previous"==a?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=a,slide_speed="next"==a||"previous"==a?settings.animation_speed:0,slide_to=currentGalleryPage*(itemsPerPage*itemWidth),$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)},a.prettyPhoto.startSlideshow=function(){"undefined"==typeof q?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){return a.prettyPhoto.stopSlideshow(),!1}),q=setInterval(a.prettyPhoto.startSlideshow,settings.slideshow)):a.prettyPhoto.changePage("next")},a.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){return a.prettyPhoto.startSlideshow(),!1}),clearInterval(q),q=void 0},a.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(a.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),a("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){a(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){settings.hideflash&&a("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible"),a(this).remove(),a(window).unbind("scroll.prettyphoto"),d(),settings.callback(),doresize=!0,j=!1,delete settings}))},!pp_alreadyInitialized&&b()&&(pp_alreadyInitialized=!0,hashIndex=b(),hashRel=hashIndex,hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){a("a["+f.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50)),this.unbind("click.prettyphoto").bind("click.prettyphoto",a.prettyPhoto.initialize)})}(jQuery);var pp_alreadyInitialized=!1; var Publisher_Theme=function(e){"use strict";return{init:function(){this.prettyPhotoSettings={social_tools:!1,show_title:!1,markup:'

0/0

',gallery_markup:''},this.setup_responsive_header(),this.back_to_top(),this.handleAjaxifiedComments(),this.setup_post();var t=e(document.body).attr("class"),a=t.toString().match(/\bpostid\-(\d+)\b/i);a&&this.handleInfinitySinglePostLoading(a[1]),this.woo_commerce(),this.visual_composer()},fix_element_query:function(){"function"==typeof elementQuery&&elementQuery({".listing":{"max-width":["450px","560px","900px","1000px"]},".listing-item-blog":{"max-width":["420px","560px"]},".listing-modern-grid":{"max-width":["980px","780px","620px","480px","370px"]},".listing-mg-3-item":{"max-width":["300px","250px"]},".listing-mg-4-item":{"max-width":["250px"]},".bs-slider":{"max-width":["370px"]},".bs-slider-item":{"max-width":["780px","520px","370px"]},".listing-item-classic":{"max-width":["380px"]},".bs-shortcode-row":{"max-width":["450px","600px","700px"]}})},is_rtl:function(){return e("body").hasClass("rtl")},setup_responsive_header:function(){e(".responsive-header .menu-container .menu-handler").click(function(t){t.preventDefault();var a=e(this).parent();a.hasClass("close")&&e(".responsive-header .search-container").removeClass("open").addClass("close"),a.toggleClass("open").toggleClass("close")}),e(".responsive-header .search-container .search-handler").click(function(t){t.preventDefault();var a=e(this).parent();a.hasClass("close")&&e(".responsive-header .menu-container").removeClass("open").addClass("close"),a.toggleClass("open").toggleClass("close")}),e(".responsive-header .menu-container .menu-box").is(":empty")&&e(".responsive-header .menu-container .menu-box").html(e(".main-menu.menu").clone().removeClass("main-menu").addClass("resp-menu").prop("id","resp-navigation")),e(".responsive-header .menu-container .menu-box .mega-menu.mega-grid-posts").remove(),e(".responsive-header .menu-container .resp-menu li > a").each(function(){var t=e(this).parent();if(!t.hasClass("menu-item-mega-grid-posts")&&t.children("ul,.mega-menu").length>0&&t.append(''),t.hasClass("menu-item-mega-tabbed-grid-posts")){t.find(".tab-content").remove();var a=t.find(".tabs-section").removeClass("tabs-section").addClass("sub-menu").clone();t.find(".mega-menu.tabbed-grid-posts").remove(),a.find("li a").removeAttr("data-target").removeAttr("data-deferred-init").removeAttr("data-toggle").removeAttr("data-deferred-event").removeAttr("class"),t.append(a)}}),e(".responsive-header .menu-container .resp-menu .children-button").click(function(){return e(this).closest("li").toggleClass("open-sub"),e(this).find(".fa-angle-down").length?e(this).find(".fa-angle-down").removeClass("fa-angle-down").addClass("fa-angle-up"):e(this).find(".fa-angle-up").removeClass("fa-angle-up").addClass("fa-angle-down"),!1}),e(".responsive-header-container").bsPinning(),e(".better-newsticker").betterNewsticker({control_nav:!0})},setup_menu:function(){e("ul.menu.bsm-pure").addClass("bsm-initialized").removeClass("bsm-pure");var t,a;e(".menu.bsm-initialized li.menu-item-has-children").each(function(){var t=e(this);t.is(":hover")?t.addClass("bsm-enter"):t.addClass("bsm-leave")}),e(document).on("mouseenter","li.menu-item-has-children",function(){var a=e(this),s=a;a.removeClass("bsm-leave"),t=function(){s.closest(".menu-item-has-children").addClass("bsm-enter")},setTimeout(function(){t()},1)}).on("mouseleave","li.menu-item-has-children",function(){var t=e(this),s=t;t.removeClass("bsm-enter"),a=function(){s.addClass("bsm-leave")},setTimeout(function(){a()},200)});var s="#header .main-menu-wrapper, .site-header.header-style-5.full-width > .content-wrap, .site-header.header-style-5.boxed > .content-wrap > .container, .site-header.header-style-6.full-width > .content-wrap, .site-header.header-style-6.boxed > .content-wrap > .container, .site-header.header-style-8.full-width > .content-wrap, .site-header.header-style-8.boxed > .content-wrap > .container",n=e(".site-header").attr("class").match(/header-style-[\w-]*\b/);n&&(e("body").hasClass("main-menu-sticky-smart")?e(s).bsPinning({smart:!0,wrapper_class:"bspw-"+n[0]}):e("body").hasClass("main-menu-sticky")&&e(s).bsPinning({smart:!1,wrapper_class:"bspw-header bspw-"+n[0]}))},setup_sliders:function(){e.fn.flexslider&&(e(".gallery-slider .better-slider").flexslider({namespace:"better-",animation:"fade",controlNav:!1,smoothHeight:!0,animationSpeed:"200",start:function(e){Publisher_Theme.fire_resize()}}).find(".better-control-nav").addClass("square"),e(".bs-shortcode.bs-slider > .better-slider").each(function(){var t=e(this);t.flexslider({namespace:"better-",animation:t.data("animation"),slideshowSpeed:t.data("slideshowSpeed"),animationSpeed:t.data("animationSpeed"),animationLoop:!0,directionNav:!0,pauseOnHover:!0,start:function(e){jQuery(e).find(".better-active-slide").addClass("slider-content-shown"),Publisher_Theme.fire_resize()},before:function(e){jQuery(e).find(".slider-content-shown").removeClass("slider-content-shown")},after:function(e){jQuery(e).find(".better-active-slide").addClass("slider-content-shown")}}).find(".better-control-nav").addClass("circle")}))},setup_video_players:function(){e(".single-featured, .the-content, .sidebar, .post, .bs-embed, .entry-content").fitVids({ignore:".bsp-player > iframe"})},fire_resize:function(){if(document.createEvent){var e=document.createEvent("Event");e.initEvent("resize",!0,!0),window.dispatchEvent(e)}else{var t=document.documentElement,a=document.createEventObject();t.fireEvent("onresize",a)}},small_style_fixes:function(){e(".site-header .search-container .search-handler").click(function(){e(this).closest(".main-menu-container").toggleClass("search-open").toggleClass("search-close");var t=e(this).closest(".search-container");t.toggleClass("open").toggleClass("close"),t.hasClass("open")?(e(this).find(".fa").removeClass("fa-search").addClass("fa-close"),t.find(".search-field").focus()):(e(this).find(".fa").addClass("fa-search").removeClass("fa-close"),t.find(".search-field").focusout())}),e(document).on("keyup",function(t){if(27==t.keyCode&&e(".search-container.open").length>0){var a=e(".site-header .search-container"),s=a.find(".search-handler");a.removeClass("open").addClass("close"),e(".main-menu-container.search-open").removeClass("search-open").addClass("search-close"),a.hasClass("open")?(s.find(".fa").removeClass("fa-search").addClass("fa-close"),a.find(".search-field").focus()):(s.find(".fa").addClass("fa-search").removeClass("fa-close"),a.find(".search-field").focusout())}}),e(".site-header .shop-cart-container").hover(function(t){t.preventDefault(),e(this).closest(".main-menu-container").toggleClass("cart-open").toggleClass("cart-close");var a=e(this);a.toggleClass("open").toggleClass("close")}),e(".widget.widget_calendar table td a").each(function(){e(this).parent().addClass("active-day")}),e.browser.msie&&10==e.browser.version&&e("html").addClass("ie ie10"),e('.section-heading.multi-tab a[data-toggle="tab"]').on("shown.bs.tab",function(t){if(e(this).hasClass("active"))return void t.preventDefault();if("undefined"==typeof e(t.target).parent().attr("class"))return!0;var a=e(t.target).closest(".section-heading"),s=e(t.target).find(".h-text").attr("class").split(" "),n="";jQuery.each(s,function(e,t){if(t.match(/main-term-/))return n=t,!1}),jQuery.each(a.attr("class").split(" "),function(e,t){t.match(/main-term-/)&&a.removeClass(t)}),a.addClass(n).find("a.active").removeClass("active"),e(this).addClass("active")}),e('[data-toggle="tab"]').on("shown.bs.tab",function(e){Publisher_Theme.fire_resize()}),e("[data-vc-accordion]").on("show.vc.accordion",function(e){Publisher_Theme.fire_resize()}),e(".panel-collapse").on("shown.bs.collapse",function(e){Publisher_Theme.fire_resize()}),e(".bs-accordion-shortcode .panel-heading a").on("click",function(t){e(this).closest(".panel-heading").hasClass("active")||e(this).closest(".panel").addClass("open")}),e(".panel-collapse").on("hide.bs.collapse",function(t){e(t.target).closest(".panel").removeClass("open")}),e('.bs-listing a[data-toggle="tab"]').on("show.bs.tab",function(t){var a=e(e(this).attr("href"));a.hasClass("active")||(e(this).closest(".bs-listing").find(".tab-pane").removeClass("bs-tab-animated"),a.addClass("bs-tab-animated"))}),e(".tabbed-grid-posts .tabs-section > li > a").click(function(){"#"!=e(this).attr("href")&&(window.location=e(this).attr("href"))}).hover(function(){e(this).tab("show")}),e('.tabbed-grid-posts .tabs-section > li > a[data-toggle="tab"]').on("show.bs.tab",function(t){var a=e(e(this).data("target"));a.hasClass("active")||(e(this).closest(".tabbed-grid-posts").find(".tab-pane").removeClass("bs-tab-animated"),a.addClass("bs-tab-animated"))}),e(".move-to-content .fa").click(function(){e("body,html").animate({scrollTop:e(".content-column").offset().top-25},700)}),e(".post-tp-4-header,.post-tp-5-header").each(function(){var t=e(this),a=e(this).find(".post-header-title");jQuery(window).scroll(function(){var e=jQuery(window).scrollTop(),s=t.height();return et.offset().bottom?void a.css({"-webkit-transform":"translate3d(0px, 0px, 0px)"}).css({transform:"translate3d(0px, 0px, 0px)"}).css({opacity:"1"}):void a.css({"-webkit-transform":"translate3d(0px, "+Math.ceil((e-t.offset().top)/5.3)+"px, 0px)"}).css({transform:"translate3d(0px, "+Math.ceil((e-t.offset().top)/5.3)+"px, 0px)"}).css({opacity:(e-s)/333.333*-1})})}),e(".footer-instagram-3 .bs-instagram-photos").simplyScroll({frameRate:70}),e(".remember-label").on("click",function(){e(this).siblings("input[type=checkbox]").click()}),e(".bs-shortcode.bs-login-shortcode").attr("style",""),e(".bs-login .go-login-panel, .bs-login .go-reset-panel").click(function(t){t.preventDefault();var a=e(this).closest(".bs-login-panel"),s=a.siblings(".bs-login-panel");a.removeClass("bs-current-login-panel"),s.addClass("bs-current-login-panel")}),e(".post-share.single-post-share .post-share-btn.post-share-btn-comments").click(function(){e("body,html").animate({scrollTop:e("form.comment-form").offset().top-100},1e3)})},init_sticky_columns:function(){if(e.fn.hcSticky&&!(window.innerWidth<=700)){var t={wrapperClassName:"wrapper-sticky"},a=e([]),s=!1,n=e("body");(n.hasClass("main-menu-sticky-smart")||n.hasClass("main-menu-sticky"))&&(t.top=e("#header .main-menu-wrapper").height()),n.hasClass("active-sticky-sidebar")&&e(window).width()>780&&(a=a.add(e(".wpb_widgetised_column").closest(".wpb_column").not(".sticky-column")),a=a.add(e(".sidebar-column"))),a=a.add(e(".wpb_column.sticky-column")),a.each(function(a,s){var n=e(s),i=e.extend({},t);if(n.hasClass("wpb_column")){var o=["vc_hidden-lg","vc_hidden-md","vc_hidden-sm","vc_hidden-xs",".hidden-lg",".hidden-md",".hidden-sm",".hidden-xs"];o.forEach(function(e){n.hasClass(e)&&(i.wrapperClassName+=" "+e)})}n.hcSticky(i)}),e(window).on("resize.bs-sticky-column",function(){window.innerWidth<=780&&!s&&a.each(function(t,a){e(a).hcSticky("off").hcSticky("destroy").data("hcSticky-destroy",!0).removeAttr("style"),s=!0})})}},betterstudio_editor_shortcodes:function(){e(".bs-accordion-shortcode").on("show.bs.collapse",function(t){e(t.target).prev(".panel-heading").addClass("active")}).on("hide.bs.collapse",function(t){e(t.target).prev(".panel-heading").removeClass("active")})},back_to_top:function(){var t=e(".back-top");0!=t.length&&(t.click(function(){e("body,html").animate({scrollTop:0},700)}),e(window).scroll(function(){switch(e(this).scrollTop()>300?t.addClass("is-visible"):t.removeClass("is-visible fade-out1 fade-out2 fade-out3 fade-out4"),!0){case e(this).scrollTop()>2400:t.addClass("fade-out4");break;case e(this).scrollTop()>1700:t.removeClass("fade-out3").addClass("fade-out3");break;case e(this).scrollTop()>1e3:t.removeClass("fade-out4 fade-out3").addClass("fade-out2");break;case e(this).scrollTop()>500:t.removeClass("fade-out4 fade-out3 fade-out2").addClass("fade-out1")}}))},popup:function(){if(e("body").hasClass("active-light-box")&&e.fn.prettyPhoto&&!(e(window).width()<700)){var t=publisher_theme_global_loc.lightbox.not_classes.split(" "),a=function(){var a=e(this);if(!a.attr("href"))return!1;if("undefined"!=typeof a.data("not-rel"))return!1;var s=!1;return t.length>0&&t.forEach(function(e,t){""!=e&&a.hasClass(e)&&(s=!0)}),!s&&a.attr("href").match(/\.(jp?g|png|bmp|jpeg|gif)$/)};e(".entry-content a,.single-featured a").has("img").filter(a).attr("rel","prettyPhoto");var s=1;e(".entry-content .gallery,.entry-content .tiled-gallery").each(function(){e(this).find("a").has("img").filter(a).attr("rel","prettyPhoto[gallery_"+s+"]"),s++}),e("a[rel^='prettyPhoto']").prettyPhoto(Publisher_Theme.prettyPhotoSettings)}},gallery:function(){if(e.fn.fotorama){jQuery(".fotorama").fotorama({width:"100%",loop:!0,margin:10,thumbwidth:85,thumbheight:62,thumbmargin:9,transitionduration:800,arrows:!1,click:!1,swipe:!0}).on("fotorama:show",function(t,a,s){var n=e(this).closest(".better-gallery");n.find(".count .current").html(a.activeFrame.i)});(e("body").hasClass("active-light-box")&&e.fn.prettyPhoto||e(window).width()<700)&&jQuery(".better-gallery").on("click",".slide-link",function(){event.preventDefault();var t=e(this).closest(".better-gallery"),a=t.data("gallery-id"),s=Publisher_Theme.prettyPhotoSettings;return s.changepicturecallback=function(){e("#gallery-"+a).find(".fotorama").data("fotorama").show(e(".pp_gallery").find("li").index(e(".selected")))},e.fn.prettyPhoto(s),e.prettyPhoto.open(window["prt_gal_img_"+a],window["prt_gal_cap_"+a],window["prt_gal_cap_"+a]),e.prettyPhoto.changePage(e("#gallery-"+a).find(".fotorama").data("fotorama").activeFrame.i-1),!1}),jQuery(".better-gallery .gallery-title .next").click(function(){var t=e(this).closest(".better-gallery").find(".fotorama").data("fotorama");t.show(">")}),jQuery(".better-gallery .gallery-title .prev").click(function(){var t=e(this).closest(".better-gallery").find(".fotorama").data("fotorama");t.show("<")})}},bsPrettyTabs:function(){if("enable"===publisher_theme_global_loc.main_menu.more_menu){var t=e("#header").hasClass("header-style-6"),a='';t&&(a+=''),a+=publisher_theme_global_loc.translations.tabs_more+'',e("#main-navigation").parent().bsPrettyTabs({menuContainerPosition:"end",menuContainerTag:"li",itemsWrapperSelector:"#main-navigation",moreContainer:a,initWrapperContainer:function(e){return e.addClass("menu-item-has-children better-anim-fade"),t&&e.addClass("menu-have-icon menu-icon-type-fontawesome"),e},styleChangesAt:[992,780]})}e(".section-heading.multi-tab").bsPrettyTabs({moreContainer:''+publisher_theme_global_loc.translations.tabs_all+'
',mustDisplayClass:"main-link",getContainerWidth:function(e){return.8*e}})},bsPagination:function(t){e.fn.Better_Ajax_Pagination&&e(".bs-ajax-pagination",t).parent().Better_Ajax_Pagination()},initDeferredElements:function(){if(e.fn.Better_Deferred_Loading){var t=this;e.fn.Better_Deferred_Loading({afterSuccessDeferredAjax:function(e){t.bsPagination(e)}})}},handleAjaxifiedComments:function(){e(document).on("click",".comment-ajaxified-placeholder",function(t){t.preventDefault();var a=e(this),s=a.closest(".comments-template");a.hide();var n=e("
",{class:"deferred-loading-container",height:40});n.append('
'+publisher_theme_global_loc.loading+"
"),n.appendTo(s),e.ajax({url:publisher_theme_global_loc.ajax_url,type:"post",dataType:"json",data:e.extend(a.data(),{action:"ajaxified-comments"})}).done(function(t){s.replaceWith(t.rawHTML),e(".deferred-loading-container",s).remove(),e(document).trigger("ajaxified-comments-loaded",[s,t])})})},handleInfinitySinglePostLoading:function(t){function a(){e(c).length||e("
",{id:c}).appendTo(d)}function s(t,a){t.data("post-permalink",a.permalink),t.data("post-id",a.post_id);var s=t.attr("id");m.on("enter","#"+s,function(t){var a=e(t),s=a.data("post-id"),n=a.data("post-permalink");return l!==s&&(n&&history.pushState({},void 0,n),void(l=s))})}function n(a){o();var n=e(a),l=e("
",{class:"deferred-loading-container",height:200});l.append('
'+publisher_theme_global_loc.loading+"
"),l.appendTo(n),r&&r.abort(),r=e.ajax({url:publisher_theme_global_loc.ajax_url,type:"post",dataType:"json",data:{action:"ajax-get-post",post_ID:t,loaded_posts:p}}).done(function(t){if(e(".deferred-loading-container",n).remove(),t.rawHTML&&n.before(t.rawHTML),t.post_id&&p.push(t.post_id),t.haveNext&&i(),f.setup_post(),t.post_id){var a=n.prev(),o="_post-id-"+t.post_id;a.attr("id",o),s(a,t)}if("function"==typeof ga){var r=e("",{href:t.permalink});ga("send","pageview",r[0].pathname)}})}function i(){u.on("enter","#"+c,n)}function o(){u.off("enter","#"+c)}if(e("body").hasClass("single")&&e("body").hasClass("infinity-related-post")&&"function"==typeof OnScreen){var r,l,c="infinity-single-post-loading",d=e(".content-column"),h=d.find(".single-post-content"),p=[parseInt(h.attr("id").replace(/[^0-9\.]/g,""))],f=this,u=new OnScreen({tolerance:-500,container:window}),m=new OnScreen({tolerance:100,container:window});a(),i(),h.attr("id","_post-id-"+t),s(h,{permalink:window.location.href,post_id:t})}},setup_post:function(){this.gallery(),this.setup_sliders(),this.setup_video_players(),this.small_style_fixes(),this.init_sticky_columns(),this.betterstudio_editor_shortcodes(),this.setup_menu(),this.popup(),this.fix_element_query(),this.bsPrettyTabs(),this.bsPagination(),this.initDeferredElements()},woo_commerce:function(){var t=!1;e(".woocommerce div.product .woocommerce-tabs ul.tabs li").bind("cssClassChanged",function(){1!=t&&(t=!0,e(this).hasClass("active")&&(e(this).closest("ul.tabs").find("a.active").removeClass("active"),e(this).find("a").addClass("active")),t=!1)}),e(window).on("added_to_cart",function(t,a,s){"undefined"!=typeof a["total-items-in-cart"]&&e(".main-menu-container .shop-cart-container").length>=1&&(e(".main-menu-container .shop-cart-container .cart-handler .cart-count").length<1?e(".main-menu-container .shop-cart-container .cart-handler").append(''+a["total-items-in-cart"]+""):e(".main-menu-container .shop-cart-container .cart-handler .cart-count").html(a["total-items-in-cart"]))})},visual_composer:function(){function e(){var e=jQuery('[data-vc-full-width="true"]');jQuery.each(e,function(){var e=jQuery(this);e.css("right",e.css("left")).css("left","")})}this.is_rtl()&&(jQuery(document).on("vc-full-width-row",function(){e()}),e())}}}(jQuery);jQuery(document).ready(function(){var e=function(e){return{wrapperSelector:".main-menu-container .search-container",$wrapper:!1,_xhr:!1,prevSearchQuery:!1,_doingAjax:!1,localize:e.extend({ajax_url:!1,previewMarkup:!1},publisher_theme_ajax_search_loc),ajaxRequestDelay:300,EL:{INPUT:"search-field",PREVIEW:"search-preview",LOADING:"ajax-search-loading"},init:function(){this.$wrapper=e(this.wrapperSelector),this.prepareMarkup(),this.bindEvents()},prepareMarkup:function(){var t=this.findElements(this.EL.PREVIEW);t.length||(t=e("
",{class:this.EL.PREVIEW}).appendTo(this.$wrapper),this.localize.previewMarkup&&t.html(this.localize.previewMarkup));var a=this.findElements(this.EL.LOADING);a.length||(this._createLoadingELement().appendTo(this.$wrapper.find(".search-handler")).hide(),this._addLoadingInPreview())},_createLoadingELement:function(){return e("",{class:"fa fa-refresh fa-spin fa-fw ajax-loading-icon"})},_addLoadingInPreview:function(){if(!this._doingAjax){var t,a=e("",{class:this.EL.LOADING}),s=this.findSections(this.EL.PREVIEW);a.html('');for(t in s)s[t].html(" "),a.clone().appendTo(s[t])}},_ajax:function(t,a,s){var n=this,i=e.extend({url:this.localize.ajax_url,data:e.extend({action:"ajaxified-search"},a)},s);return n._doingAjax=!0,e.ajax({url:i.url,type:"POST",dataType:"json",data:i.data}).done(function(){n._doingAjax=!1,t.apply(this,arguments)})},findElements:function(e){return this.$wrapper.find("."+e)},findSections:function(t){var a;if(a=t?this.findElements(t):this.$wrapper){var s={};return e("[data-section-name]",a).each(function(){var t=e(this),a=t.data("section-name");a&&(s[a]=t)}),s}return!1},listSections:function(){var e=this.findSections();return e?Object.keys(e):[]},bindEvents:function(){var t=this;t.findElements(this.EL.INPUT).on("keyup.ajax-search",function(a){if(!a.ctrlKey&&!a.metaKey){var s=e.trim(this.value);s!==t.prevSearchQuery&&(t.handleUserSearch.call(t,this),t.prevSearchQuery=s)}})},hidePreviewSection:function(){e(".bs-pinning-wrapper").removeClass("stop-smarty-pinning");var t=e("#header .bs-pinning-block");t.hasClass("pinned")&&t.removeClass("pinned top normal").addClass("unpinned")},showPreviewSection:function(){e(".bs-pinning-wrapper").addClass("stop-smarty-pinning")},handleUserSearch:function(e){var t=e.value,a=this;t?(a.triggerLoading("on"),a._xhr&&a._xhr.abort(),a.$wrapper.finish().delay(a.ajaxRequestDelay).queue(function(){a._xhr=a._ajax(function(e){a.appendHTML(e),a.triggerLoading("off")},{s:t,sections:a.listSections(),full_width:a.localize.full_width})})):a.hidePreviewSection()},bindCloseEvent:function(){var t=(e(document),this);this.findElements(this.EL.PREVIEW).on("click.ajax-search",function(e){e.stopPropagation()}),e(".search-container .search-handler").on("click",function(a){e(".search-container").hasClass("open")||t.$wrapper.hasClass("result-results-exist")&&t.showPreviewSection()})},appendHTML:function(e){if("object"==typeof e.sections){var t=this.findSections(this.EL.PREVIEW);if(t){var a;for(a in t)"string"==typeof e.sections[a]&&t[a].html(e.sections[a]);this.$wrapper.addClass("result-results-exist")}}this.bindCloseEvent()},triggerLoading:function(t){var a="on"===t,s=this.findElements(this.EL.LOADING);s[a?"show":"hide"]();var n=e(".ajax-loading-icon",this.$wrapper);n[a?"show":"hide"](),n.siblings()[a?"hide":"show"](),a&&(this.showPreviewSection(),this._addLoadingInPreview())}}}(jQuery);Publisher_Theme.init(),jQuery("body").hasClass("active-ajax-search")&&e.init()}),"function"==typeof OnScreen&&(bsrj_retinajs(document.querySelectorAll(".site-header img#site-logo")),bsrj_retinajs(document.querySelectorAll(".responsive-header .logo-container img")),bsrj_retinajs(document.querySelectorAll(".bs-subscribe-newsletter .powered-by img")));