jQuery(document).ready(function ($){ if(fifuImageVars.fifu_lazy) fifu_lazy(); disableClick($); disableLink($); setTimeout(function (){ jQuery('img.zoomImg').css('z-index', ''); }, 1000); jQuery('img[height=1]').each(function (index){ if(jQuery(this).attr('width')!=1) jQuery(this).css('position', 'relative'); }); }); jQuery(window).on('ajaxComplete', function (){ if(fifuImageVars.fifu_lazy) fifu_lazy(); }); function disableClick($){ if(!fifuImageVars.fifu_woo_lbox_enabled){ firstParentClass=''; parentClass=''; jQuery('figure.woocommerce-product-gallery__wrapper').find('div.woocommerce-product-gallery__image').each(function (index){ parentClass=jQuery(this).parent().attr('class').split(' ')[0]; if(!firstParentClass) firstParentClass=parentClass; if(parentClass!=firstParentClass) return false; jQuery(this).children().click(function (){ return false; }); jQuery(this).children().children().css("cursor", "default"); }); }} function disableLink($){ if(!fifuImageVars.fifu_woo_lbox_enabled){ firstParentClass=''; parentClass=''; jQuery('figure.woocommerce-product-gallery__wrapper').find('div.woocommerce-product-gallery__image').each(function (index){ parentClass=jQuery(this).parent().attr('class').split(' ')[0]; if(!firstParentClass) firstParentClass=parentClass; if(parentClass!=firstParentClass) return false; jQuery(this).children().attr("href", ""); }); }} jQuery(document).click(function ($){ fifu_fix_gallery_height(); }) function fifu_fix_gallery_height(){ if(fifuImageVars.fifu_is_flatsome_active){ mainImage=jQuery('.woocommerce-product-gallery__wrapper div.flickity-viewport').find('img')[0]; if(mainImage) jQuery('.woocommerce-product-gallery__wrapper div.flickity-viewport').css('height', mainImage.clientHeight + 'px'); }}; 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;i=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)):(index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length,index=jQuery(this).parent().hasClass("wpb_next_slide")?length<=index+1?0:index+1:index-1<0?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 $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).on("click",function(e){e&&e.preventDefault&&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 carousel_li,fluid_ul,$this=jQuery(this);!0!==$this.data("carousel_enabled")&&$this.is(":visible")&&($this.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1"),(carousel_li=jQuery(this).find(".wpb_thumbnails-fluid li")).css({"margin-right":carousel_li.css("margin-left"),"margin-left":0}),(fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid")).width(fluid_ul.width()+300),jQuery(window).on("resize",function(){screen_size!=(screen_size=getSizeName())&&window.setTimeout(function(){location.reload()},20)}))})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,sliderTimeout,this_element=jQuery(this);this_element.hasClass("wpb_slider_nivo")?(0===(sliderTimeout=1e3*this_element.attr("data-interval"))&&(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"})):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(){-1')}),vc_initVideoBackgrounds(),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 skrollrSize,skrollrStart,$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))).height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),(youtubeId=vcExtractYoutubeId(parallaxImage))?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrStart=-(skrollrSize-100),$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: 0%;")}),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 getSizeName(){var screen_w=jQuery(window).width();return 1170
').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"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function($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"):(iframeH=(iframeW=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"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(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"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.on("click",function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.on("mouseleave",function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(hoverBox){hoverBox.each(function(){var $this=jQuery(this),perspective=4*$this.width()+"px";$this.css("perspective",perspective)})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(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=backHeight li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=o(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():o()}},_createIcons:function(){var e,t=this.options.icons;t&&(e=o(""),this._addClass(e,"ui-accordion-header-icon","ui-icon "+t.header),e.prependTo(this.headers),e=this.active.children(".ui-accordion-header-icon"),this._removeClass(e,t.header)._addClass(e,null,t.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"!==e?("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons())):this._activate(t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!e)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var t=o.ui.keyCode,i=this.headers.length,a=this.headers.index(e.target),s=!1;switch(e.keyCode){case t.RIGHT:case t.DOWN:s=this.headers[(a+1)%i];break;case t.LEFT:case t.UP:s=this.headers[(a-1+i)%i];break;case t.SPACE:case t.ENTER:this._eventHandler(e);break;case t.HOME:s=this.headers[0];break;case t.END:s=this.headers[i-1]}s&&(o(e.target).attr("tabIndex",-1),o(s).attr("tabIndex",0),o(s).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===o.ui.keyCode.UP&&e.ctrlKey&&o(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=o()):!1===e.active?this._activate(0):this.active.length&&!o.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=o()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var i,e=this.options,t=e.heightStyle,a=this.element.parent();this.active=this._findActive(e.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=o(this),t=e.uniqueId().attr("id"),i=e.next(),a=i.uniqueId().attr("id");e.attr("aria-controls",a),i.attr("aria-labelledby",t)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(e.event),"fill"===t?(i=a.height(),this.element.siblings(":visible").each(function(){var e=o(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=o(this).outerHeight(!0)}),this.headers.next().each(function(){o(this).height(Math.max(0,i-o(this).innerHeight()+o(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.headers.next().each(function(){var e=o(this).is(":visible");e||o(this).show(),i=Math.max(i,o(this).css("height","").height()),e||o(this).hide()}).height(i))},_activate:function(e){e=this._findActive(e)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:o.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):o()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&o.each(e.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var t=this.options,i=this.active,a=o(e.currentTarget),s=a[0]===i[0],n=s&&t.collapsible,h=n?o():a.next(),r=i.next(),h={oldHeader:i,oldPanel:r,newHeader:n?o():a,newPanel:h};e.preventDefault(),s&&!t.collapsible||!1===this._trigger("beforeActivate",e,h)||(t.active=!n&&this.headers.index(a),this.active=s?o():a,this._toggle(h),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),t.icons&&(i=i.children(".ui-accordion-header-icon"),this._removeClass(i,null,t.icons.activeHeader)._addClass(i,null,t.icons.header)),s||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),t.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,t.icons.header)._addClass(s,null,t.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var t=e.newPanel,i=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=t,this.prevHide=i,this.options.animate?this._animate(t,i,e):(i.hide(),t.show(),this._toggleComplete(e)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),t.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):t.length&&this.headers.filter(function(){return 0===parseInt(o(this).attr("tabIndex"),10)}).attr("tabIndex",-1),t.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,i,t){var a,s,n,h=this,r=0,o=e.css("box-sizing"),d=e.length&&(!i.length||e.index()=h-window.innerHeight&&g1?i.removeClass("bt-no-change"):i.addClass("bt-no-change")}function B(){return"bt-carousel-1"==l||"bt-carousel-2"==l||"bt-carousel-3"==l||"bt-carousel-4"==l||"bt-carousel-5"==l||"bt-carousel-6"==l||"bt-carousel-7"==l||"bt-carousel-8"==l||"bt-carousel-9"==l||"bt-carousel-10"==l||"bt-carousel-11"==l||"bt-carousel-12"==l||"bt-carousel-13"==l||"bt-carousel-14"==l||"bt-carousel-15"==l||"bt-carousel-16"==l||"bt-carousel-17"==l||"bt-carousel-18"==l||"bt-carousel-19"==l||"bt-carousel-20"==l}function C(){return""==l||"bt-2row"==l||"bt-medium"==l||"bt-small"==l||"default"==l}function E(b){var c=m;0==b?(a(".bt-slider-prev span",i).text(c+"/"+c),B()&&a(".bt-slider-prev",i).addClass("remove-click")):(a(".bt-slider-prev span",i).text(b+"/"+c),B()&&a(".bt-slider-prev",i).removeClass("remove-click")),b+1==parseInt(c)?(a(".bt-slider-next span",i).text("1/"+c),B()&&a(".bt-slider-next",i).addClass("remove-click")):(a(".bt-slider-next span",i).text(b+2+"/"+c),B()&&a(".bt-slider-next",i).removeClass("remove-click"))}function G(b){function s(){""!=n&&null!=n&&"undefined"!=typeof n&&"rand"==n&&(m.addClass("animated "+g),o.addClass("animated "+h),q.addClass("bt-ready-load animated "+g),r.addClass("bt-ready-load animated "+h),setTimeout(function(){m.removeClass("animated "+g),o.removeClass("animated "+h),q.removeClass("animated "+g),r.removeClass("animated "+h)},2e3)),""!=n&&null!=n&&"undefined"!=typeof n&&"randsync"==n&&(m.addClass("animated "+g),o.addClass("animated "+g),p.addClass("bt-ready-load animated "+g),setTimeout(function(){m.removeClass("animated "+g),o.removeClass("animated "+g),p.removeClass("animated "+g)},2e3)),""!=n&&null!=n&&"undefined"!=typeof n&&isNumber(n)&&parseInt(n)';v+='',v+='',v+='',v+="",a(".bt-background-slider",i).prepend(v);var w=document.getElementById(t);w.play(),d.addClass("bt-set-active"),s()}else a("video#"+t).remove(),checkIeSafari()||!a(".bt-background-slider",i).hasClass("bt-is-parallax")?a(".bt368-nav-ptt-content",i).css({"background-image":"url("+j+")"}):a(".bt-background-slider",i).css({"background-image":"url("+j+")"}).attr({"data-width":k,"data-height":l}),a('').load(function(){d.addClass("bt-set-active"),s()})}else d.addClass("bt-set-active"),s()}function I(a){a.hasClass("bt-is-isotope")||H.parents(".bt368-nav-ptt").hasClass("bt-combo-list-ahead")||(f[c]=a.masonry({itemSelector:".bt-post-item",transitionDuration:0}),a.css({opacity:"1"}).parent().find(".bt-animate-thumb-overlay.for-masonry").remove())}function J(b,c,d,e){if("wait"==a('[data-slick-index="'+b+'"] .bt-slider-item-content',i).attr("data-html")){b'+p+""),G(b)):B()?(a('[data-slick-index="'+b+'"]',i).html(c),a(".slick-list",i).height(a(".bt-slider-item.slick-slide.slick-active",i).height()),a(".bt-slider-item.slick-slide .bt-slider-item-content",i).height(a(".bt-slider-item.slick-slide.slick-active",i).height()),setTimeout(function(){G(b)},368)):(a('[data-slick-index="'+b+'"]',i).html(c),setTimeout(function(){a('[data-slick-index="'+b+'"] .bt-scroll-bar',i).mCustomScrollbar({theme:"rounded"}),G(b)},368))},error:function(){a('[data-slick-index="'+b+'"] .bt-slider-item-content',i).html('
'+p+"
"),G(b)}})}else G(b)}function K(d,e,h,j){t(),d=parseInt(d);var l=a(".bt-ajax-listing",i);if(m>=d){de){g[c]=1,b.find(".bt-infinite-data").addClass("bt-set-active");var f=b.find(".bt-infinite-data").attr("data-paged");if(!isNumber(f))return!1;K(parseInt(f)+1,"","",q)}}}function N(b,f){function h(){u.removeClass("bt-set-active"),v.removeClass("bt-set-active"),w.removeClass("bt-trans-close").removeAttr("style"),x.removeClass("bt-set-active"),i.removeAttr("style")}1==e[c],a(".bt-canvas-menu .bt-animate-thumb-overlay",i).addClass("bt-loading-now"),"yes"==r&&d[c].slick("slickPause"),a(".slick-slide.slick-active",i).addClass("setNewJson").removeClass("bt-set-active"),d[c].slick("unslick"),a(".bt-slider-item:not(.setNewJson)",i).remove(),a(".bt-slider-item.setNewJson .bt-slider-item-content > *:not(.bt-animate-thumb-overlay)",i).remove(),a(".bt-slider-item.setNewJson .bt-slider-item-content",i).attr("data-img-bg","").removeClass("bt-set-active"),a(".bt368-nav-ptt-content",i).attr("style",""),a(".bt-slider-item",i).removeClass("setNewJson"),t();var g={p_default:o,paged:1,category:b,tag:f,isJson:"yes",action:"jpsbeteajaxaction"};a.ajax({url:k,type:"POST",data:g,dataType:"json",cache:!1,success:function(b){if("0"==b||""==b||"0"==b.success)d[c]=j.slick(D),a('[data-slick-index="0"] .bt-slider-item-content',i).html('
'+p+"
"),a(".bt-slider-prev span",i).text(""),a(".bt-slider-next span",i).text(""),h(),a(".bt-canvas-menu .bt-animate-thumb-overlay",i).removeClass("bt-loading-now"),0==e[c];else{i.css({"max-height":i.outerHeight(),overflow:"hidden"}),a(".bt368-nav-ptt-content",i).css({"max-height":i.height(),overflow:"hidden"});for(var f="",g=2;g<=parseInt(b.data_max_pages);g++)f+='
',f+=isNumber(b.data_server_height)?'
':'
',f+='
';a(f).appendTo(a(".bt-json-slider",i)),i.attr("data-server-params",b.data_server_params),i.attr("data-max-pages",b.data_max_pages),i.attr("data-last-posts-count",b.data_last_posts_count);var l={p_default:b.data_server_params,paged:1,category:"",tag:"",itemsLastPage:"",isJsonFirst:"yes",action:"jpsbeteajaxaction"};a.ajax({url:k,type:"POST",data:l,dataType:"html",cache:!1,success:function(b){function f(){t(),L(),h(),a(".bt-canvas-menu .bt-animate-thumb-overlay",i).removeClass("bt-loading-now"),B()&&(a(".bt-filter-item-sub-list .bt-animate-thumb-overlay",i).removeClass("bt-loading-now"),a(".bt-json-carousel",i).removeClass("bt-set-active"),E(0),a(".slick-list",i).height(a(".bt-slider-item.slick-slide.slick-active",i).height()),a(".bt-slider-item.slick-slide .bt-slider-item-content",i).height(a(".bt-slider-item.slick-slide.slick-active",i).height()),setTimeout(function(){a(".bt-filter-item-default",i).removeClass("bt-set-active")},368)),A(),G(0),0==e[c],"yes"==r&&d[c].slick("slickPlay")}if("0"==b||""==b);else{d[c]=j.slick(D),a('[data-slick-index="0"]',i).html(b);var g=a('[data-slick-index="0"] .bt-slider-item-content',i).attr("data-img-bg");""!=g&&null!=g&&"undefined"!=typeof g?a('').load(function(){f(),a('[data-slick-index="0"] .bt-scroll-bar',i).mCustomScrollbar({theme:"rounded"})}):(f(),a('[data-slick-index="0"] .bt-scroll-bar',i).mCustomScrollbar({theme:"rounded"}))}},error:function(){}})}},error:function(){d[c]=j.slick(D),a('[data-slick-index="0"] .bt-slider-item-content',i).html('
'+p+"
"),a(".bt-slider-prev span",i).text(""),a(".bt-slider-next span",i).text(""),h(),a(".bt-canvas-menu .bt-animate-thumb-overlay",i).removeClass("bt-loading-now"),0==e[c]}})}function O(d,e){function j(){u.removeClass("bt-set-active"),v.removeClass("bt-set-active"),w.removeClass("bt-trans-close").removeAttr("style"),x.removeClass("bt-set-active"),i.removeAttr("style"),a(".bt-load-more, .bt-infinite-data",i).removeClass("bt-set-active").removeAttr("style"),g[c]=0}a(".bt-canvas-menu .bt-animate-thumb-overlay",i).addClass("bt-loading-now"),t();var h={p_default:o,paged:1,category:d,tag:e,isJson:"yes",action:"jpsbeteajaxaction"};a.ajax({url:k,type:"POST",data:h,dataType:"json",cache:!1,success:function(d){if("0"==d||""==d||"0"==d.success)j(),a(".bt-canvas-menu .bt-animate-thumb-overlay",i).removeClass("bt-loading-now");else{i.css({"max-height":i.outerHeight(),overflow:"hidden"}),a(".bt368-nav-ptt-content",i).css({"max-height":i.height(),overflow:"hidden"}),i.attr("data-server-params",d.data_server_params),i.attr("data-max-pages",d.data_max_pages),i.attr("data-last-posts-count",d.data_last_posts_count);var e=a(".bt-ajax-listing",i),g={p_default:d.data_server_params,paged:1,category:"",tag:"",itemsLastPage:"",isJsonFirst:"yes",action:"jpsbeteajaxaction"};a.ajax({url:k,type:"POST",data:g,dataType:"html",cache:!1,success:function(d){function g(){t(),j(),a(".bt-canvas-menu .bt-animate-thumb-overlay",i).removeClass("bt-loading-now"),G(0)}function k(){function j(){console.log("Load Complete Json"),a(".bt-post-item:not(.bt-ready-parallax).bt-opacity-loading, .bt-check-post-normal",i).removeClass("bt-opacity-loading"),g(),b(a(".bt-post-item:not(.bt-ready-parallax)",i)),1==m?a(".bt-load-more, .bt-infinite-data",i).hide():a(".bt-load-more, .bt-infinite-data",i).removeClass("bt-set-active").removeAttr("style")}e.html(d),h.html(""),H.hasClass("bt-is-isotope")||(i.hasClass("bt-combo-list-ahead")||f[c].masonry("reloadItems").masonry("layout"),j())}function l(){e.html(d),h.html(""),g(),b(a(".bt-post-item:not(.bt-ready-parallax)",i)),1==m?a(".bt-load-more, .bt-infinite-data",i).hide():a(".bt-load-more, .bt-infinite-data",i).removeClass("bt-set-active").removeAttr("style")}if("0"==d||""==d)j(),a(".bt-canvas-menu .bt-animate-thumb-overlay",i).removeClass("bt-loading-now");else{var h=a(".bt-ajax-imagesload",i);e.hasClass("bt-is-masonry")?h.html(d).imagesLoaded().done(function(a){k()}).fail(function(){k()}):""!=n&&null!=n&&"undefined"!=typeof n?h.html(d).imagesLoaded().done(function(a){l()}).fail(function(){l()}):l(),a(".bt-load-more, .bt-infinite-data",i).attr("data-paged",1)}},error:function(){j(),a(".bt-canvas-menu .bt-animate-thumb-overlay",i).removeClass("bt-loading-now")}})}},error:function(){j(),a(".bt-canvas-menu .bt-animate-thumb-overlay",i).removeClass("bt-loading-now")}})}var i=a(this),j=a(this).find(".bt-json-slider"),k=i.attr("data-server-request"),l=i.attr("data-style"),m=i.attr("data-max-pages");m=isNumber(m)?parseInt(m):0;var n=i.attr("data-effect-slider"),o=i.attr("data-server-params"),p=i.attr("data-information-err"),q=i.attr("data-last-posts-count"),r=i.attr("data-autoplay"),s=i.attr("data-autoplay_speed"),u=a(".bt-open-category-filter",i),v=a(".bt-canvas-menu",i),w=a(".bt368-nav-ptt-content, .bt-background-slider-row",i),x=a(".bt-content-overlay",i),y=a(".bt-close-menu",i),z=".bt-is-parallax";z=checkIeSafari()?".bt-is-parallax.bt368-nav-ptt-content":".bt-is-parallax.bt-background-slider",A(),i.attr("data-bete-s-id",c),g[c]=0;var D={dots:!0,arrows:!0,infinite:!0,speed:0,fade:!0,cssEase:"ease-in-out",adaptiveHeight:!1,autoplay:"yes"==r,autoplaySpeed:isNumber(s)?s:1e4,touchThreshold:50,accessibility:!1};B()&&(D={dots:!1,arrows:!0,infinite:!1,speed:600,fade:!1,cssEase:"ease-in-out",adaptiveHeight:!0,autoplay:"yes"==r,autoplaySpeed:isNumber(s)?s:1e4,touchThreshold:50,slidesToShow:1,accessibility:!1}),e[c]=0,d[c]=j,B()&&d[c].on("init",function(b,c){a(".bt-slider-item.slick-slide .bt-slider-item-content",i).height(a(".bt-slider-item.slick-slide.slick-active",i).height()),E(0)}),d[c].slick(D);var F=i.attr("data-delay-spinner");isNumber(F)&&B()&&a('').appendTo("head"),G(0);var H=a(".bt-is-masonry",i);L(),i.on("click",".bt-load-more",function(){if(0==g[c]){var b=a(this),d=a(this).attr("data-paged");if(!isNumber(d))return!1;b.addClass("bt-set-active"),g[c]=1,K(parseInt(d)+1,"","",q)}}),a(window).load(function(){I(H),M(),a(window).bind("scroll",function(){M()})}),d[c].on("beforeChange",function(a,b,d,f){0==e[c]&&J(f,"","",q),E(f)}),a(".bt-slider-prev",i).click(function(){d[c].slick("slickPrev")}).hover(function(){"yes"==r&&d[c].slick("slickPause")},function(){a(".bt-open-category-filter",i).hasClass("bt-set-active")||"yes"==r&&d[c].slick("slickPlay")}),a(".bt-slider-next",i).click(function(){d[c].slick("slickNext")}).hover(function(){"yes"==r&&d[c].slick("slickPause")},function(){a(".bt-open-category-filter",i).hasClass("bt-set-active")||"yes"==r&&d[c].slick("slickPlay")}),a('.bt-filter-item[data-filter-pos="category"]',i).click(function(){var b=a(this);a('.bt-filter-item[data-filter-pos="category"]',i).removeClass("bt-set-active"),b.addClass("bt-set-active"),B()&&(b.parents(".bt-filter-style-top").find(".bt-filter-item-default").text(b.text()),a(".bt-filter-item-sub-list .bt-animate-thumb-overlay",i).addClass("bt-loading-now"),a(".bt-json-carousel",i).addClass("bt-set-active"),i.addClass("bt-no-change"));var c=Math.round(b.offset().top-i.offset().top+30);a(".bt-canvas-menu .bt-animate-thumb-overlay .bt-loader",i).css({"margin-top":"0px",top:c+"px"}),C()||B()?N(b.attr("data-filter-id"),""):O(b.attr("data-filter-id"),"")}),a(z,i).parallaxBackground({speed:.32}),a(".bt-scroll-bar",i).mCustomScrollbar({theme:"rounded"}),a(".bt-filter-all",i).mCustomScrollbar({theme:"minimal"}),a(".bt-scroll-down-more",i).click(function(){a(this);a("html, body").animate({scrollTop:i.offset().top+i.outerHeight()},1e3)});var P=a(".bt-top-filter",i);if(P.length>0){var Q=P.attr("data-filter-id");priorityNav.init({mainNavWrapper:"."+Q,navDropdownLabel:P.attr("data-text-more"),navDropdownBreakpointLabel:P.attr("data-text-filter")});P.find(".bt-filter-item").off(".setActiveFilter2").on("click.setActiveFilter2",function(){x.addClass("bt-set-active")})}a(".bt-open-category-filter",i).click(function(){var b=a(this);b.hasClass("bt-set-active")?(b.removeClass("bt-set-active"),v.removeClass("bt-set-active"),w.removeClass("bt-trans-close"),x.removeClass("bt-set-active"),"yes"==r&&d[c].slick("slickPlay"),g[c]=0):(b.addClass("bt-set-active"),v.addClass("bt-set-active"),w.addClass("bt-trans-close"),x.addClass("bt-set-active"),"yes"==r&&d[c].slick("slickPause"),g[c]=1),y.on("click.setCloseClass",function(){b.removeClass("bt-set-active"),v.removeClass("bt-set-active"),w.removeClass("bt-trans-close"),x.removeClass("bt-set-active"),y.off(".setCloseClass"),"yes"==r&&d[c].slick("slickPlay"),g[c]=0})}),a(".bt-filter-item-default",i).click(function(){var b=a(this);b.hasClass("bt-set-active")?(b.removeClass("bt-set-active"),"yes"==r&&d[c].slick("slickPlay")):(b.addClass("bt-set-active"),"yes"==r&&d[c].slick("slickPause"))});var S=i.attr("data-social-facebook"),T=i.attr("data-social-twitter"),U=i.attr("data-social-google-plus"),V=i.attr("data-social-pinterest"),W=i.attr("data-social-tumblr"),X=i.attr("data-social-linkedin"),Y=i.attr("data-social-email"),Z=i.attr("data-feature-image"),$=i.attr("data-strip-shortcode"),_=i.attr("data-youtube-thumb"),aa=i.attr("data-youtube-key");i.on("click",".open-full-post",function(){function c(){a("#bt-lightbox-post, #bt-lightbox-close, #bt-post-ajax-content").removeClass("bt-set-active").off(".btCloseLightBox"),setTimeout(function(){a("#bt-lightbox-post, #bt-post-ajax-content").remove()},400)}var b=a(this);return 0==a("#bt-lightbox-post").length&&a('
').appendTo("body"),a("#bt-lightbox-post").addClass("bt-set-active"),a("#bt-lightbox-post, #bt-lightbox-close").on("click.btCloseLightBox",function(){c()}),a.ajax({url:k,type:"POST",data:{post_id:b.attr("data-id"),post_type:b.attr("data-post-type"),taxonomy:b.attr("data-taxonomy"),tc_eventbuild:b.attr("data-tc-eventbuild"),tc_eventbuild_starts:b.attr("data-tc-eventbuild-starts"),tc_eventbuild_ends:b.attr("data-tc-eventbuild-ends"),social_facebook:S,social_twitter:T,social_google_plus:U,social_pinterest:V,social_tumblr:W,social_linkedin:X,social_email:Y,feature_img:Z,strip_shortcode:$,youtube_thumb:_,youtube_key:aa,action:"jpsbetepostaction"},dataType:"html",cache:!1,success:function(b){"0"==b||""==b?c():(a("#bt-post-ajax-content .bt-entry-content").html(b),navigator.userAgent.match(/(Android|iPod|iPhone|iPad|IEMobile|Opera Mini)/)?a("#bt-post-ajax-content").css({"overflow-y":"scroll"}):a("#bt-post-ajax-content").mCustomScrollbar({theme:"minimal-dark"}),a("#bt-post-ajax-content").addClass("bt-set-active"))},error:function(){c()}}),!1}),""!=l&&"bt-2row"!=l&&null!=l&&"undefined"!=typeof l&&"default"!=l||i.on("mouseenter",".slick-dots li button",function(){var b=a(this),c=b.parents("li"),d=b.text();if(0==a(".bt-thumb-slider-item",c).length){c.append('
'),t();var e={p_default:o,paged:d,isJsonThumb:"yes",action:"jpsbeteajaxaction"};a.ajax({url:k,type:"POST",data:e,dataType:"json",cache:!1,success:function(b){var d=new Date;a('').load(function(){a(".bt-thumb-slider-item .bt-thumb-slider-item-content",c).append('')})}})}else a(".bt-thumb-slider-item .bt-thumb-slider-item-content",c).find(".bt-loader").remove(),a(".bt-thumb-slider-item .bt-thumb-slider-item-content",c).prepend('
');a(".slick-dots li .bt-thumb-slider-item",i).removeClass("bt-set-active"),a(".slick-dots li button",i).removeClass("bt-set-active"),a(".bt-thumb-slider-item",c).addClass("bt-set-active"),b.addClass("bt-set-active")}).on("mouseleave",".slick-dots li button",function(){var b=a(this),c=b.parents("li");a(".bt-thumb-slider-item",c).removeClass("bt-set-active"),b.removeClass("bt-set-active")}),i.on("click",".bt-switch-grid, .bt-switch-list",function(){var b=a(this);if(b.hasClass(".bt-set-active"))return!1;a(".bt-switch-grid, .bt-switch-list",i).removeClass("bt-set-active"),b.addClass("bt-set-active");b.attr("data-set-style");"bt-combo-list-ahead"==b.attr("data-set-style")?(i.addClass("bt-combo-list-ahead"),a.cookie("btSettingListAhead","1",{path:"/"}),a(".bt-ajax-listing",i).length>0&&a(".bt-ajax-listing",i).hasClass("bt-is-masonry")&&f[c].masonry("destroy")):(i.removeClass("bt-combo-list-ahead"),a.cookie("btSettingListAhead","0",{path:"/"}),a(".bt-ajax-listing",i).length>0&&a(".bt-ajax-listing",i).hasClass("bt-is-masonry")&&I(H))})})},a(document).ready(function(c){a(".bt368-nav-ptt").jps_bete_action({}),b(a(".bt-post-item:not(.bt-ready-parallax)"))})}(jQuery);