var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); /* * @name image-zoom * @author Matt Hinchliffe * @modified Monday, September 15th, 2014 * @version 2.2.1 */ !function(a){"use strict";function b(b,c){return this.$target=a(b),this.opts=a.extend({},i,c),void 0===this.isOpen&&this._init(),this}var c,d,e,f,g,h,i={loadingNotice:"Loading image",errorNotice:"The image could not be loaded",errorDuration:2500,preventClicks:!0,onShow:void 0,onHide:void 0};b.prototype._init=function(){var b=this;this.$link=this.$target.find("a"),this.$image=this.$target.find("img"),this.$flyout=a('
'),this.$notice=a('
'),this.$target.on("mouseenter.easyzoom touchstart.easyzoom",function(a){b.isMouseOver=!0,a.originalEvent.touches&&1!==a.originalEvent.touches.length||(a.preventDefault(),b.show(a,!0))}).on("mousemove.easyzoom touchmove.easyzoom",function(a){b.isOpen&&(a.preventDefault(),b._move(a))}).on("mouseleave.easyzoom touchend.easyzoom",function(){b.isMouseOver=!1,b.isOpen&&b.hide()}),this.opts.preventClicks&&this.$target.on("click.easyzoom","a",function(a){a.preventDefault()})},b.prototype.show=function(a,b){var g,h,i,j,k=this;return this.isReady?(this.$target.append(this.$flyout),g=this.$target.width(),h=this.$target.height(),i=this.$flyout.width(),j=this.$flyout.height(),c=this.$zoom.width()-i,d=this.$zoom.height()-j,e=c/g,f=d/h,this.isOpen=!0,this.opts.onShow&&this.opts.onShow.call(this),void(a&&this._move(a))):void this._load(this.$link.attr("href"),function(){(k.isMouseOver||!b)&&k.show(a)})},b.prototype._load=function(b,c){var d=new Image;this.$target.addClass("is-loading").append(this.$notice.text(this.opts.loadingNotice)),this.$zoom=a(d),d.onerror=a.proxy(function(){var a=this;this.$notice.text(this.opts.errorNotice),this.$target.removeClass("is-loading").addClass("is-error"),this.detachNotice=setTimeout(function(){a.$notice.detach(),a.detachNotice=null},this.opts.errorDuration)},this),d.onload=a.proxy(function(){d.width&&(this.isReady=!0,this.$notice.detach(),this.$flyout.html(this.$zoom),this.$target.removeClass("is-loading").addClass("is-ready"),c())},this),d.style.position="absolute",d.src=b},b.prototype._move=function(a){if(0===a.type.indexOf("touch")){var b=a.touches||a.originalEvent.touches;g=b[0].pageX,h=b[0].pageY}else g=a.pageX||g,h=a.pageY||h;var i=this.$target.offset(),j=h-i.top,k=g-i.left,l=Math.ceil(j*f),m=Math.ceil(k*e);0>m||0>l||m>c||l>d?this.hide():this.$zoom.css({top:""+-1*l+"px",left:""+-1*m+"px"})},b.prototype.hide=function(){this.isOpen&&(this.$flyout.detach(),this.isOpen=!1,this.opts.onHide&&this.opts.onHide.call(this))},b.prototype.swap=function(b,c,d){this.hide(),this.isReady=!1,this.detachNotice&&clearTimeout(this.detachNotice),this.$notice.parent().length&&this.$notice.detach(),a.isArray(d)&&(d=d.join()),this.$target.removeClass("is-loading is-ready is-error"),this.$image.attr({src:b,srcset:d}),this.$link.attr("href",c)},b.prototype.teardown=function(){this.hide(),this.$target.removeClass("is-loading is-ready is-error").off(".easyzoom"),this.detachNotice&&clearTimeout(this.detachNotice),delete this.$link,delete this.$zoom,delete this.$image,delete this.$notice,delete this.$flyout,delete this.isOpen,delete this.isReady},a.fn.easyZoom=function(c){return this.each(function(){var d=a.data(this,"easyZoom");d?void 0===d.isOpen&&d._init():a.data(this,"easyZoom",new b(this,c))})},"function"==typeof define&&define.amd?define(function(){return b}):"undefined"!=typeof module&&module.exports&&(module.exports=b)}(jQuery);;jQuery(document).ready(function($){"use strict";function shopkeeper_refresh_dynamic_contents(){$.ajax({url:shopkeeper_ajaxurl,type:"POST",data:{'action':'refresh_dynamic_contents'},success:function(data){$(".shopping_bag_items_number").html(data['cart_count_products']);$(".wishlist_items_number").html(data['wishlist_count_products']);}});} shopkeeper_refresh_dynamic_contents();$("#yith-wcwl-form").on("click",".product-remove a, .product-add-to-cart a",function(){setTimeout(function(){shopkeeper_refresh_dynamic_contents();},2000);});$(".content-area").fitVids();var offcanvas_open=false;var offcanvas_from_left=false;var offcanvas_from_right=false;var window_width=$(window).innerWidth();function submenu_adjustments(){$(".main-navigation > ul > .menu-item").mouseenter(function(){if($(this).children(".sub-menu").length>0){var submenu=$(this).children(".sub-menu");var window_width=parseInt($(window).outerWidth());var submenu_width=parseInt(submenu.outerWidth());var submenu_offset_left=parseInt(submenu.offset().left);var submenu_adjust=window_width-submenu_width-submenu_offset_left;if(submenu_adjust<0){submenu.css("left",submenu_adjust-30+"px");}}});} submenu_adjustments();function columns_height_adjustment(){$('.adjust_cols_height').each(function(){var column_min_height=0;var that=$(this);that.imagesLoaded('always',function(){that.find('.column_container').first().siblings().addBack().css('min-height',0).each(function(){if($(this).outerHeight(true)>column_min_height){column_min_height=$(this).outerHeight(true);}}) that.addClass('height_adjusted').find('.column_container').first().siblings().addBack().css('min-height',column_min_height);});});};if($('.row').hasClass('adjust_cols_height')){if(window_width>640){setTimeout(function(){columns_height_adjustment();},1)}else{$('.adjust_cols_height').addClass('height_adjusted');}} $('.woocommerce-tabs .panel:first-child').addClass('current');$('.woocommerce-tabs ul.tabs li a').off('click').on('click',function(){var that=$(this);var currentPanel=that.attr('href');that.parent().siblings().removeClass('active').end().addClass('active');$('.woocommerce-tabs').find(currentPanel).siblings('.panel').filter(':visible').fadeOut(500,function(){$('.woocommerce-tabs').find(currentPanel).siblings('.panel').removeClass('current');$('.woocommerce-tabs').find(currentPanel).addClass('current').fadeIn(500);}) return false;}) $('.add_to_cart_button').one('click',function(){var add_to_cart_classes,add_to_cart_styles,that=$(this);add_to_cart_classes=that.attr('class');add_to_cart_classes=add_to_cart_classes.replace('add_to_cart_button','');add_to_cart_styles=that.attr('style');that.parent().on('DOMNodeInserted',function(e){e.stopPropagation();if($(e.target).is('.added_to_cart')){$(e.target).addClass(add_to_cart_classes).removeClass('added_to_cart').addClass('added_to_cart_button');$(e.target).attr('style',add_to_cart_styles);}});}) $('.woocommerce-product-search .search-field, .search-form .search-field').val('');$(".search-button").on('click',function(){var documentHeight=$(document).height(),searchWrapper=$('.site-search .search-form'),searchProductsWrapper=$('.site-search .woocommerce-product-search');if($('.site-search .woocommerce-product-search').length>0){$('.site-search .woocommerce-product-search .search-field').val('');if(!searchProductsWrapper.find('.submit_icon').size()) {searchProductsWrapper.append('
')} searchProductsWrapper.css('margin-left',-$(window).width()/4);$('.site-search').addClass('open');$(".site-search").on('click',function(e){if($(e.target).attr('id')=='searchsubmit'||$(e.target).attr('class')=='search-field'){return;}else{$('.site-search').removeClass('open');}});}else{$('.site-search .widget_search .search-field').val('');if(!searchWrapper.find('.submit_icon').size()) {searchWrapper.append('
')} searchWrapper.css('margin-left',-$(window).width()/4);$('.site-search').addClass('open');$('.site-search .widget_search .search-field').focus();$(".site-search").on('click',function(e){if($(e.target).attr('class')=='search-submit'||$(e.target).attr('class')=='search-field'){return;}else{$('.site-search').removeClass('open');}});}});$.fn.visible=function(partial){var $t=$(this),$w=$(window),viewTop=$w.scrollTop(),viewBottom=viewTop+$w.height(),_top=$t.offset().top,_bottom=_top+$t.height(),compareTop=partial===true?_bottom:_top,compareBottom=partial===true?_top:_bottom;return((compareBottom<=viewBottom)&&(compareTop>=viewTop));};$(".single_product_summary_related").each(function(i,el){if($(el).visible(true)){$(el).addClass("on_screen");}});function offcanvas_left(){$(".st-container").removeClass("slide-from-right");$(".st-container").addClass("slide-from-left");$(".st-container").addClass("st-menu-open");offcanvas_open=true;offcanvas_from_left=true;$(".st-menu").addClass("open");$("body").addClass("offcanvas_open offcanvas_from_left");$(".nano").nanoScroller();} function offcanvas_right(){$(".st-container").removeClass("slide-from-left");$(".st-container").addClass("slide-from-right");$(".st-container").addClass("st-menu-open");offcanvas_open=true;offcanvas_from_right=true;$(".st-menu").addClass("open");$("body").addClass("offcanvas_open offcanvas_from_right");$(".nano").nanoScroller();} function offcanvas_close(){if(offcanvas_open===true){$(".st-container").removeClass("slide-from-left");$(".st-container").removeClass("slide-from-right");$(".st-container").removeClass("st-menu-open");offcanvas_open=false;offcanvas_from_left=false;offcanvas_from_right=false;$(".st-menu").removeClass("open");$("body").removeClass("offcanvas_open offcanvas_from_left offcanvas_from_right");}} $(".offcanvas-menu-button, .open-offcanvas").click(function(){offcanvas_right();});$("#button_offcanvas_sidebar_left").click(function(){offcanvas_left();});$("#st-container").on("click",".st-pusher-after",function(e){offcanvas_close();});$(".st-pusher-after").swipe({swipeLeft:function(event,direction,distance,duration,fingerCount){offcanvas_close();},swipeRight:function(event,direction,distance,duration,fingerCount){offcanvas_close();},tap:function(event,direction,distance,duration,fingerCount){offcanvas_close();},threshold:0});$(".mobile-navigation .menu-item-has-children").append('
');$(".mobile-navigation").on("click",".more",function(e){e.stopPropagation();$(this).parent().toggleClass("current").children(".sub-menu").toggleClass("open");$(this).html($(this).html()==''?'':'');$(".nano").nanoScroller();});$(".mobile-navigation").on("click","a",function(e){if(($(this).attr('href')==="#")||($(this).attr('href')==="")){$(this).parent().children(".more").trigger("click");}else{offcanvas_close();}});$("#related-products-carousel").owlCarousel({items:4,itemsDesktop:[1200,4],itemsDesktopSmall:[1000,3],itemsTablet:false,itemsMobile:[600,2],lazyLoad:true,pagination:true,});$("#cross-sell-products-carousel").owlCarousel({items:4,itemsDesktop:[1200,4],itemsDesktopSmall:[1000,3],itemsTablet:false,itemsMobile:[600,2],lazyLoad:true,});$("#upsells-products-carousel").owlCarousel({items:4,itemsDesktop:[1200,4],itemsDesktopSmall:[1000,3],itemsTablet:false,itemsMobile:[600,2],lazyLoad:true,pagination:true,});function replace_img_source(selector){var data_src=$(selector).attr('data-src');$(selector).one('load',function(){}).each(function(){$(selector).attr('src',data_src);$(selector).css("opacity","1");});} $('#products-grid li img').each(function(){replace_img_source(this);});$('.related.products:not(.owl-carousel) li img').each(function(){replace_img_source(this);});$('.upsells.products:not(.owl-carousel) li img').each(function(){replace_img_source(this);});$('.add_to_cart_button').on('click',function(){$(this).parents('li.animate').addClass('product_added_to_cart')}) $('.woocommerce-review-link').off('click').on('click',function(){$('.tabs li a').each(function(){if($(this).attr('href')=='#tab-reviews'){$(this).trigger('click');}});var elem_on_screen_height=0;if($('#wpadminbar').length>0){elem_on_screen_height+=$('#wpadminbar').outerHeight();} if($('.getbowtied_theme_explorer_wrapper').length>0&&$('.getbowtied_theme_explorer_wrapper').is('visible')){elem_on_screen_height+=$('.getbowtied_theme_explorer_wrapper').outerHeight();} var tab_reviews_topPos=$('.woocommerce-tabs').offset().top-elem_on_screen_height;$('html, body').animate({scrollTop:tab_reviews_topPos},1000);return false;}) $("body").live('added_to_wishlist',function(e){shopkeeper_refresh_dynamic_contents();});$('.add_to_wishlist').on('click',function(){$(this).parents('.yith-wcwl-add-button').addClass('show_overlay');}) var account_tab_list=$('.account-tab-list');account_tab_list.on('click','.account-tab-link',function(){if($('.account-tab-link').hasClass('registration_disabled')){return false;}else{var that=$(this),target=that.attr('href');that.parent().siblings().find('.account-tab-link').removeClass('current');that.addClass('current');$('.account-forms').find($(target)).siblings().stop().fadeOut(function(){$('.account-forms').find($(target)).fadeIn();});return false;}});$('.account-tab-link-register').on('click',function(){$('.login-form').stop().fadeOut(function(){$('.register-form').fadeIn();}) return false;}) $('.account-tab-link-login').on('click',function(){$('.register-form').stop().fadeOut(function(){$('.login-form').fadeIn();}) return false;}) function disable_fresco(){if($(window).innerWidth()<640){$(".product_content_wrapper .fresco").on('click',function(){return false;});}} disable_fresco();$(".gallery").each(function(){var that=$(this);that.find('.gallery-item').each(function(){var this_gallery_item=$(this);this_gallery_item.find('.fresco').attr('data-fresco-group',that.attr('id'));if(this_gallery_item.find('.gallery-caption').length>0){this_gallery_item.find('.fresco').attr('data-fresco-caption',this_gallery_item.find('.gallery-caption').text());}});});$('.product_socials_wrapper').on('mouseenter',function(){$(this).addClass('hovered');}) $('.product_socials_wrapper').on('mouseleave',function(){$(this).removeClass('hovered');}) function handleSelect(){if($(window).innerWidth()>1023){var select2=$(".orderby, .big-select, .topbar-language-switcher, .wcml_currency_switcher ").select2({allowClear:true,minimumResultsForSearch:Infinity});}} handleSelect();$('.gallery-item').each(function(){var that=$(this);if(that.find('.gallery-caption').length>0){that.append('i')}}) $('.gallery-caption-trigger').on('mouseenter',function(){$(this).siblings('.gallery-caption').addClass('show');});$('.gallery-caption-trigger').on('mouseleave',function(){$(this).siblings('.gallery-caption').removeClass('show');});function refreshBackgrounds(selector){$.browser.chrome=/chrom(e|ium)/.test(navigator.userAgent.toLowerCase());if($.browser.chrome){if($(selector).css("background-image")!="none"){var oldBackgroundImage=$(selector).css("background-image");$(selector).css("background-image",oldBackgroundImage);}}} refreshBackgrounds(".st-content");$('.trigger-footer-widget-icon').on('click',function(){var trigger=$(this).parent();trigger.fadeOut('1000',function(){trigger.remove();$('.site-footer-widget-area').fadeIn();});});function blogIsotopeWrapper(){if($(window).innerWidth()>1024){$blog_grid=3;$('.blog-isotop-container').css({'margin':'0 -1.5%'})}else if($(window).innerWidth()<=640){$blog_grid=1;$('.blog-isotop-container').css({'margin':'0 -30px'})}else{$blog_grid=2;$('.blog-isotop-container').css({'margin':'0 -1.5%'})} $blog_wrapper_width=$('.blog-isotop-container').width();if($blog_wrapper_width%$blog_grid>0){$blog_wrapper_width=$blog_wrapper_width+($blog_grid-$blog_wrapper_width%$blog_grid);};$('.blog-isotope').css('width',$blog_wrapper_width);return $blog_grid;} if($('.blog-isotop-container').size()){var $blog_wrapper_inner,$blog_wrapper_width,$blog_grid,$filterValue;$filterValue=$('.filters-group .is-checked').attr('data-filter');$blog_grid=blogIsotopeWrapper();blogIsotopeWrapper();var afterBlogIsotope=function(){setTimeout(function(){$(".blog-post").removeClass('hidden');},200);} var blogIsotope=function(){var imgLoad=imagesLoaded($('.blog-isotope'));imgLoad.on('done',function(){$blog_wrapper_inner=$('.blog-isotope').isotope({"itemSelector":".blog-post","masonry":{"columnWidth":".grid-sizer"}});afterBlogIsotope()}) imgLoad.on('fail',function(){$blog_wrapper_inner=$('.blog-isotope').isotope({"itemSelector":".blog-post","masonry":{"columnWidth":".grid-sizer"}});afterBlogIsotope()})} blogIsotope();$('.filters-group').on('click','filter-item',function(){$filterValue=$(this).attr('data-filter');$blog_wrapper_inner.isotope({filter:$filterValue});});} $('.hover-effect-text').each(function(){var that=$(this);that.css('bottom',-that.outerHeight()).attr('data-height',that.outerHeight());}) $('.hover-effect-link').mouseenter(function(){var that=$(this);if(!that.find('.hover-effect-text').is(':empty')){var portfolio_cat_height=that.find('.hover-effect-text').outerHeight();that.find('.hover-effect-title').css('bottom',portfolio_cat_height);that.find('.hover-effect-text').css('bottom',0);}});$('.hover-effect-link').mouseleave(function(){var that=$(this);if(!that.find('.hover-effect-text').is(':empty')){var portfolio_cat_height=that.find('.hover-effect-text').attr('data-height');that.find('.hover-effect-title').css('bottom',28);that.find('.hover-effect-text').css('bottom',-portfolio_cat_height);}});function portfolioIsotopeWrapper(){if($(window).innerWidth()>1584){$portfolio_grid=5;}else if($(window).innerWidth()<=480){$portfolio_grid=1;}else if($(window).innerWidth()<=901){$portfolio_grid=2;}else if($(window).innerWidth()<=1248){$portfolio_grid=3;}else{$portfolio_grid=4;} if($('.items_per_row_3').length>0&&$(window).innerWidth()>1248) {$portfolio_grid=3;} if($('.items_per_row_4').length>0&&$(window).innerWidth()>1584) {$portfolio_grid=4;} $portfolio_wrapper_width=$('.portfolio-isotope-container').width();if($portfolio_wrapper_width%$portfolio_grid>0){$portfolio_wrapper_width=$portfolio_wrapper_width+($portfolio_grid-$portfolio_wrapper_width%$portfolio_grid);};$('.portfolio-isotope').css('width',$portfolio_wrapper_width);return $portfolio_grid;} if($('.portfolio-isotope-container').size()){var $portfolio_wrapper_inner,$portfolio_wrapper_width,$portfolio_grid,$filterValue;$filterValue=$('.filters-group .is-checked').attr('data-filter');$portfolio_grid=portfolioIsotopeWrapper();portfolioIsotopeWrapper();var afterIsotope=function(){setTimeout(function(){$(".portfolio-box").removeClass('hidden');},200);} var portfolioIsotope=function(){var imgLoad=imagesLoaded($('.portfolio-isotope'));imgLoad.on('done',function(){$portfolio_wrapper_inner=$('.portfolio-isotope').isotope({"itemSelector":".portfolio-box","masonry":{"columnWidth":".portfolio-grid-sizer"}});afterIsotope()}) imgLoad.on('fail',function(){portfolio_wrapper_inner=$('.portfolio-isotope').isotope({"itemSelector":".portfolio-box","masonry":{"columnWidth":".portfolio-grid-sizer"}});afterIsotope()})} portfolioIsotope();$('.filters-group').on('click','.filter-item',function(){$filterValue=$(this).attr('data-filter');$(this).parents('.portfolio-filters').siblings('.portfolio-isotope').isotope({filter:$filterValue});});} $('.topbar-language-switcher').change(function(){window.location=$(this).val();});$(window).load(function(){$('body').hide().show();var product_thumbnails_swiper=$('.product_thumbnails .product_thumbnails_swiper_container').swiper({slidesPerView:"auto",watchActiveIndex:true,mousewheelControl:true,mode:'vertical',onSlideClick:function(swiper){owl.goTo(product_thumbnails_swiper.clickedSlideIndex);for(var i=0;i1024){var $easyzoom=$(".easyzoom").easyZoom({loadingNotice:'',errorNotice:'',preventClicks:true,});var easyzoom_api=$easyzoom.data('easyZoom');$(".variations").on('change','select',function(){owl.goTo(0);easyzoom_api.teardown();easyzoom_api._init();});}else{$(".easyzoom a").click(function(event){event.preventDefault();});}} setTimeout(function(){$(".product_thumbnail.with_second_image").css("background-size","cover");$(".product_thumbnail.with_second_image").addClass("second_image_loaded");},300);if($(window).outerWidth()>1024){$.stellar({horizontalScrolling:false,responsive:true});} setTimeout(function(){$('.parallax, .single-post-header-bkg').addClass('loaded');},150)});$(window).resize(function(){$('.site-search-form-wrapper-inner, .site-search .widget_search .search-form').css('margin-left',-$(window).width()/4);$('.product_thumbnails_swiper_container').css('max-height',$('.product_images').height());$(".main-navigation > ul > .menu-item > .sub-menu").css("left","-15px");disable_fresco();if($('.row').hasClass('adjust_cols_height')){if($(window).width()>640){columns_height_adjustment();}else{$('.adjust_cols_height').find('.column_container').css('min-height',300);}} refreshBackgrounds(".st-content");if($('.blog-isotop-container').size()){var $blog_grid_on_resize;blogIsotopeWrapper() $blog_grid_on_resize=blogIsotopeWrapper();if($blog_grid!=$blog_grid_on_resize){$('.filters-group .filter-item').each(function(){if($(this).attr('data-filter')==$filterValue){$(this).trigger('click');}}) $blog_grid=$blog_grid_on_resize;resizeIsotopeEnd();}} if($('.portfolio-isotope-container').size()){var $portfolio_grid_on_resize;portfolioIsotopeWrapper() $portfolio_grid_on_resize=portfolioIsotopeWrapper();if($portfolio_grid!=$portfolio_grid_on_resize){$('.filters-group .filter-item').each(function(){if($(this).attr('data-filter')==$filterValue){$(this).trigger('click');}}) $portfolio_grid=$portfolio_grid_on_resize;resizeIsotopeEnd();}} var window_resizeTo=this.resizeTO;function resizeIsotopeEnd(){if(window_resizeTo)clearTimeout(window_resizeTo);window_resizeTo=setTimeout(function(){$(this).trigger('onEndResizingIsotope');},100);}});$(window).bind('onEndResizingIsotope',function(){console.log('resizeend') $('.filters-group .filter-item').each(function(){if($(this).attr('data-filter')==$filterValue){$(this).trigger('click');console.log('trigger resize')}})});$(window).scroll(function(){if($(this).scrollTop()>0){$('#page_wrapper.sticky_header .top-headers-wrapper').addClass('on_page_scroll');}else{$('#page_wrapper.sticky_header .top-headers-wrapper').removeClass('on_page_scroll');} if($(window).innerWidth()>640){$(".products li").each(function(i,el){if($(el).visible(true)){$(el).addClass("animate");}});} $(".single_product_summary_related, #site-footer").each(function(i,el){if($(el).visible(true)){$(el).addClass("on_screen");}else{$(el).removeClass("on_screen");}});if($(window).width()>1024){$('.single-post-header-overlay').css('opacity',0.3+($(window).scrollTop())/(($(window).height())*1.4));} refreshBackgrounds(".st-content");});});;!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content"),j=b.querySelectorAll("blockquote.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(200>~~g)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);;document.documentElement.className+=' js_active ';document.documentElement.className+='ontouchstart'in document.documentElement?' vc_mobile ':' vc_desktop ';(function(){var prefix=['-webkit-','-moz-','-ms-','-o-',''];for(var i=0;iloading tweets...'});});};} if('function'!==typeof(window['vc_googleplus'])){window.vc_googleplus=function(){if(0parseInt(ver[1]);$call.each(function(index){var $tabs,interval=jQuery(this).attr("data-interval"),tabs_array=[];$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);}});if(interval&&0index){index=$tabs.tabs("length")-1;} else if(index>=$tabs.tabs("length")){index=0;} $tabs.tabs("select",index);}else{var index=$tabs.tabs("option","active"),length=$tabs.find('.wpb_tab').length;if(jQuery(this).parent().hasClass('wpb_next_slide')){index=(index+1)>=length?0:index+1;}else{index=0>index-1?length-1:index-1;} $tabs.tabs("option","active",index);}});});}}} if('function'!==typeof(window['vc_accordionBehaviour'])){window.vc_accordionBehaviour=function(){jQuery('.wpb_accordion').each(function(index){var $this=jQuery(this);var $tabs,interval=$this.attr("data-interval"),active_tab=!isNaN(jQuery(this).data('active-tab'))&&0 div > h3",autoHeight:false,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:true,activate:vc_accordionActivate,change:function(event,ui){if('undefined'!==typeof(jQuery.fn.isotope)){ui.newContent.find('.isotope').isotope("layout");} vc_carouselBehaviour(ui.newPanel);}});if(true===$this.data('vcDisableKeydown')){$tabs.data('uiAccordion')._keydown=function(){};}});}} if('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);var $thumbs=$container.find('.wpb_thumbnails');var layout_mode=$thumbs.attr('data-layout-mode');$thumbs.isotope({itemSelector:'.isotope-item',layoutMode:('undefined'===typeof(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");});});}} if('function'!==typeof(window['vc_carouselBehaviour'])){window.vc_carouselBehaviour=function($parent){var $carousel=$parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel");$carousel.each(function(){var $this=jQuery(this);if(true!==$this.data('carousel_enabled')&&$this.is(':visible')){$this.data('carousel_enabled',true);var visible_count=getColumnsCount(jQuery(this)),carousel_speed=500;if(jQuery(this).hasClass('columns_count_1')){carousel_speed=900;} var carousele_li=jQuery(this).find('.wpb_thumbnails-fluid li');carousele_li.css({"margin-right":carousele_li.css("margin-left"),"margin-left":0});jQuery(this).find('.wpb_wrapper:eq(0)').jCarouselLite({btnNext:jQuery(this).find('.next'),btnPrev:jQuery(this).find('.prev'),visible:visible_count,speed:carousel_speed}).width('100%');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();if(before_resize!=screen_size){window.setTimeout('location.reload()',20);}});}});}} if('function'!==typeof(window['vc_slidersBehaviour'])){window.vc_slidersBehaviour=function(){jQuery('.wpb_gallery_slides').each(function(index){var this_element=jQuery(this);var $imagesGrid;if(this_element.hasClass('wpb_slider_nivo')){var sliderSpeed=800,sliderTimeout=this_element.attr('data-interval')*1000;if(0===sliderTimeout){sliderTimeout=9999999999;} this_element.find('.nivoSlider').nivoSlider({effect:'boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse',slices:15,boxCols:8,boxRows:4,animSpeed:sliderSpeed,pauseTime:sliderTimeout,startSlide:0,directionNav:true,directionNavHide:true,controlNav:true,keyboardNav:false,pauseOnHover:true,manualAdvance:false,prevText:'Prev',nextText:'Next'});} else if(this_element.hasClass('wpb_image_grid')){if(jQuery.fn.imagesLoaded){$imagesGrid=this_element.find('.wpb_image_grid_ul').imagesLoaded(function(){$imagesGrid.isotope({itemSelector:'.isotope-item',layoutMode:'fitRows'});});}else{this_element.find('.wpb_image_grid_ul').isotope({itemSelector:'.isotope-item',layoutMode:'fitRows'});}}});}} if('function'!==typeof(window['vc_prettyPhoto'])){window.vc_prettyPhoto=function(){try{if(jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto){jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:'normal',padding:15,opacity:0.7,showTitle:true,allowresize:true,counter_separator_label:'/',hideflash:false,deeplinking:false,modal:false,callback:function(){var url=location.href;var hashtag=(url.indexOf('#!prettyPhoto'))?true:false;if(hashtag){location.hash="!";}},social_tools:''});}}catch(err){window.console&&window.console.log&&console.log(err);}}} if('function'!==typeof(window['vc_google_fonts'])){window.vc_google_fonts=function(){return false;}} window.vcParallaxSkroll=false;if('function'!==typeof(window['vc_rowBehaviour'])){window.vc_rowBehaviour=function(){var $=window.jQuery;function localFunction(){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');var el_margin_left=parseInt($el.css('margin-left'),10);var el_margin_right=parseInt($el.css('margin-right'),10);var offset=0-$el_full.offset().left-el_margin_left;var width=$(window).width();$el.css({'position':'relative','left':offset,'box-sizing':'border-box','width':$(window).width()});if(!$el.data('vcStretchContent')){var padding=(-1*offset);if(0>padding){padding=0;} var paddingRight=width-padding-$el_full.width()+el_margin_left+el_margin_right;if(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');});} function parallaxRow(){var vcSkrollrOptions,vcParallaxSkroll,callSkrollInit=false;if(vcParallaxSkroll){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=true;if('on'===$(this).data('vcParallaxOFade')){$(this).children().attr('data-5p-top-bottom','opacity:0;').attr('data-30p-top-bottom','opacity:1;');} skrollrSize=$(this).data('vcParallax')*100;$parallaxElement=$('
').addClass('vc_parallax-inner').appendTo($(this));$parallaxElement.height(skrollrSize+'%');parallaxImage=$(this).data('vcParallaxImage');youtubeId=vcExtractYoutubeId(parallaxImage);if(youtubeId){insertYoutubeVideoAsBackground($parallaxElement,youtubeId);}else if('undefined'!==typeof(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+'%;');});if(callSkrollInit&&window.skrollr){vcSkrollrOptions={forceHeight:false,smoothScrolling:false,mobileCheck:function(){return false;}};vcParallaxSkroll=skrollr.init(vcSkrollrOptions);return vcParallaxSkroll;} return false;} function fullHeightRow(){$('.vc_row-o-full-height:first').each(function(){var $window,windowHeight,offsetTop,fullHeight;$window=$(window);windowHeight=$window.height();offsetTop=$(this).offset().top;if(offsetTop
').addClass('vc_row-full-height-fixer').height(elHeight).prependTo($(this));});} $(window).unbind('resize.vcRowBehaviour').bind('resize.vcRowBehaviour',localFunction);$(window).bind('resize.vcRowBehaviour',fullHeightRow);localFunction();fullHeightRow();initVideoBackgrounds();parallaxRow();}} if('function'!==typeof(window['vc_gridBehaviour'])){window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery('[data-vc-grid]').vcGrid();}} if('function'!==typeof(window['getColumnsCount'])){window.getColumnsCount=function(el){var find=false,i=1;while(false===find){if(el.hasClass('columns_count_'+i)){find=true;return i;} i++;}}} var screen_size=getSizeName();function getSizeName(){var screen_w=jQuery(window).width();if(1170screen_w){return'desktop';} if(768screen_w){return'tablet';} if(300screen_w){return'mobile';} if(300>screen_w){return'mobile_portrait';} return'';} function loadScript(url,$obj,callback){var script=document.createElement("script");script.type="text/javascript";if(script.readyState){script.onreadystatechange=function(){if("loaded"===script.readyState||"complete"===script.readyState){script.onreadystatechange=null;callback();}};}else{} script.src=url;$obj.get(0).appendChild(script);} if('function'!==typeof(window['wpb_prepare_tab_content'])){window.wpb_prepare_tab_content=function(event,ui){var 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"]'),$ui_panel,$google_maps;vc_carouselBehaviour();vc_plugin_flexslider(panel);if(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();});} if(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:false});$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:false});$carousel.length&&jQuery.fn.carousel&&$carousel.carousel('resizeAction');$ui_panel=panel.find('.isotope, .wpb_image_grid_ul');$google_maps=panel.find('.wpb_gmaps_widget');if(0<$ui_panel.length){$ui_panel.isotope("layout");} if($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');} if(panel.parents('.isotope').length){panel.parents('.isotope').each(function(){jQuery(this).isotope("layout");});}}} 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"]');if('undefined'!==typeof(jQuery.fn.isotope)){ui.newPanel.find('.isotope, .wpb_image_grid_ul').isotope("layout");} if(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:false});$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:false});$carousel.length&&jQuery.fn.carousel&&$carousel.carousel('resizeAction');if(ui.newPanel.parents('.isotope').length){ui.newPanel.parents('.isotope').each(function(){jQuery(this).isotope("layout");});}}} function initVideoBackgrounds(){jQuery('.vc_row').each(function(){var $row=jQuery(this),youtubeUrl,youtubeId;if($row.data('vcVideoBg')){youtubeUrl=$row.data('vcVideoBg');youtubeId=vcExtractYoutubeId(youtubeUrl);if(youtubeId){$row.find('.vc_video-bg').remove();insertYoutubeVideoAsBackground($row,youtubeId);} jQuery(window).on('grid:items:added',function(event,$grid){if(!$row.has($grid).length){return;} vcResizeVideoBackground($row);});}else{$row.find('.vc_video-bg').remove();}});} function insertYoutubeVideoAsBackground($element,youtubeId,counter){if('undefined'===typeof(YT.Player)){counter='undefined'===typeof(counter)?0:counter;if(100
').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},events:{onReady:function(event){event.target.mute().setLoop(true);}}});vcResizeVideoBackground($element);jQuery(window).bind('resize',function(){vcResizeVideoBackground($element);});} function vcResizeVideoBackground($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight(),ratio1=16,ratio2=9;if((containerW/containerH)<(ratio1/ratio2)){iframeW=containerH*(ratio1/ratio2);iframeH=containerH;marginLeft=-Math.round((iframeW-containerW)/2)+'px';marginTop=-Math.round((iframeH-containerH)/2)+'px';iframeW+='px';iframeH+='px';}else{iframeW=containerW;iframeH=containerW*(ratio2/ratio1);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('undefined'===typeof(url)){return false;} var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);if(null!==id){return id[1];} return false;};(function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this);;+function($){'use strict';var Accordion,clickHandler,old,hashNavigation;function Plugin(action,options){var args;args=Array.prototype.slice.call(arguments,1);return this.each(function(){var $this,data;$this=$(this);data=$this.data('vc.accordion');if(!data){data=new Accordion($this,$.extend(true,{},options));$this.data('vc.accordion',data);} if('string'===typeof(action)){data[action].apply(data,args);}});} Accordion=function($element,options){this.$element=$element;this.activeClass='vc_active';this.animatingClass='vc_animating';this.useCacheFlag=undefined;this.$target=undefined;this.$targetContent=undefined;this.selector=undefined;this.$container=undefined;this.animationDuration=undefined;this.index=0;};Accordion.transitionEvent=function(){var transition,transitions,el;el=document.createElement('vcFakeElement');transitions={'transition':'transitionend','MSTransition':'msTransitionEnd','MozTransition':'transitionend','WebkitTransition':'webkitTransitionEnd'};for(transition in transitions){if('undefined'!==typeof(el.style[transition])){return transitions[transition];}}};Accordion.emulateTransitionEnd=function($el,duration){var callback,called;called=false;if(!duration){duration=250;} $el.one(Accordion.transitionName,function(){called=true;});callback=function(){if(!called){$el.trigger(Accordion.transitionName);}};setTimeout(callback,duration);};Accordion.DEFAULT_TYPE='collapse';Accordion.transitionName=Accordion.transitionEvent();Accordion.prototype.controller=function(action){var $this;$this=this.$element;if('string'!==typeof(action)){action=$this.data('vcAction')||this.getContainer().data('vcAction');} if('undefined'===typeof(action)){action=Accordion.DEFAULT_TYPE;} if('string'===typeof(action)){Plugin.call($this,action);}};Accordion.prototype.isCacheUsed=function(){var useCache,that;that=this;useCache=function(){return false!==that.$element.data('vcUseCache');};if('undefined'===typeof(this.useCacheFlag)){this.useCacheFlag=useCache();} return this.useCacheFlag;};Accordion.prototype.getSelector=function(){var findSelector,$this;$this=this.$element;findSelector=function(){var selector;selector=$this.data('vcTarget');if(!selector){selector=$this.attr('href');} return selector;};if(!this.isCacheUsed()){return findSelector();} if('undefined'===typeof(this.selector)){this.selector=findSelector();} return this.selector;};Accordion.prototype.findContainer=function(){var $container;$container=this.$element.closest(this.$element.data('vcContainer'));if(!$container.length){$container=$('body');} return $container;};Accordion.prototype.getContainer=function(){if(!this.isCacheUsed()){return this.findContainer();} if('undefined'===typeof(this.$container)){this.$container=this.findContainer();} return this.$container;};Accordion.prototype.getTarget=function(){var selector,that,getTarget;that=this;selector=that.getSelector();getTarget=function(){var element;element=that.getContainer().find(selector);if(!element.length){element=that.getContainer().filter(selector);} return element;};if(!this.isCacheUsed()){return getTarget();} if('undefined'===typeof(this.$target)){this.$target=getTarget();} return this.$target;};Accordion.prototype.getTargetContent=function(){var $target,$targetContent;$target=this.getTarget();if(!this.isCacheUsed()){if($target.data('vcContent')){$targetContent=$target.find($target.data('vcContent'));if($targetContent.length){return $targetContent;}} return $target;} if('undefined'===typeof(this.$targetContent)){$targetContent=$target;if($target.data('vcContent')){$targetContent=$target.find($target.data('vcContent'));if(!$targetContent.length){$targetContent=$target;}} this.$targetContent=$targetContent;} return this.$targetContent;};Accordion.prototype.getTriggers=function(){var i;i=0;return this.getContainer().find('[data-vc-accordion]').each(function(){var accordion,$this;$this=$(this);accordion=$this.data('vc.accordion');if('undefined'===typeof(accordion)){$this.vcAccordion();accordion=$this.data('vc.accordion');} accordion&&accordion.setIndex&&accordion.setIndex(i++);});};Accordion.prototype.setIndex=function(index){this.index=index;};Accordion.prototype.getIndex=function(){return this.index;};Accordion.prototype.triggerEvent=function(event){var $event;if('string'===typeof(event)){$event=$.Event(event);this.$element.trigger($event);}};Accordion.prototype.getActiveTriggers=function(){var $triggers;$triggers=this.getTriggers().filter(function(){var $this,accordion;$this=$(this);accordion=$this.data('vc.accordion');return accordion.getTarget().hasClass(accordion.activeClass);});return $triggers;};Accordion.prototype.changeLocationHash=function(){var id,$target;$target=this.getTarget();if($target.length){id=$target.attr('id');} if(id){if(history.pushState){history.pushState(null,null,'#'+id);} else{location.hash='#'+id;}}};Accordion.prototype.isActive=function(){return this.getTarget().hasClass(this.activeClass);};Accordion.prototype.getAnimationDuration=function(){var findAnimationDuration,that;that=this;findAnimationDuration=function(){var $targetContent,duration;if('undefined'===typeof(Accordion.transitionName)){return'0s';} $targetContent=that.getTargetContent();duration=$targetContent.css('transition-duration');duration=duration.split(',')[0];return duration;};if(!this.isCacheUsed()){return findAnimationDuration();} if('undefined'===typeof(this.animationDuration)){this.animationDuration=findAnimationDuration();} return this.animationDuration;};Accordion.prototype.getAnimationDurationMilliseconds=function(){var duration;duration=this.getAnimationDuration();if('ms'===duration.substr(-2)){return parseInt(duration);} if('s'===duration.substr(-1)){return Math.round(parseFloat(duration)*1000)}};Accordion.prototype.isAnimated=function(){return parseFloat(this.getAnimationDuration())>0;};Accordion.prototype.show=function(){var $target,that,$targetContent;that=this;$target=that.getTarget();$targetContent=that.getTargetContent();if(that.isActive()){return;} if(that.isAnimated()){that.triggerEvent('beforeShow.vc.accordion');$target.queue(function(next){$targetContent.one(Accordion.transitionName,function(){$target.removeClass(that.animatingClass);$targetContent.attr('style','');that.triggerEvent('afterShow.vc.accordion');});Accordion.emulateTransitionEnd($targetContent,that.getAnimationDurationMilliseconds()+100);next();}).queue(function(next){$targetContent.css({position:'absolute',visibility:'hidden',display:'block'});var height=$targetContent.height();$targetContent.data('vcHeight',height);$targetContent.attr('style','');next();}).queue(function(next){$targetContent.height(0);$targetContent.css({'padding-top':0,'padding-bottom':0});next();}).queue(function(next){$target.addClass(that.animatingClass);$target.addClass(that.activeClass);that.changeLocationHash();that.triggerEvent('show.vc.accordion');next();}).queue(function(next){var height=$targetContent.data('vcHeight');$targetContent.animate({'height':height},that.getAnimationDurationMilliseconds());$targetContent.css({'padding-top':'','padding-bottom':''});next();});}else{$target.addClass(that.activeClass);that.triggerEvent('show.vc.accordion');}};Accordion.prototype.hide=function(){var $target,that,$targetContent;that=this;$target=that.getTarget();$targetContent=that.getTargetContent();if(!that.isActive()){return;} if(that.isAnimated()){that.triggerEvent('beforeHide.vc.accordion');$target.queue(function(next){$targetContent.one(Accordion.transitionName,function(){$target.removeClass(that.animatingClass);$targetContent.attr('style','');that.triggerEvent('afterHide.vc.accordion');});Accordion.emulateTransitionEnd($targetContent,that.getAnimationDurationMilliseconds()+100);next();}).queue(function(next){$target.addClass(that.animatingClass);$target.removeClass(that.activeClass);that.triggerEvent('hide.vc.accordion');next();}).queue(function(next){var height=$targetContent.height();$targetContent.height(height);next();}).queue(function(next){$targetContent.animate({'height':0},that.getAnimationDurationMilliseconds());$targetContent.css({'padding-top':0,'padding-bottom':0});next();});}else{$target.removeClass(that.activeClass);that.triggerEvent('hide.vc.accordion');}};Accordion.prototype.toggle=function(){var $this;$this=this.$element;if(this.isActive()){Plugin.call($this,'hide');}else{Plugin.call($this,'show');}};Accordion.prototype.dropdown=function(){var $this,that;that=this;$this=this.$element;if(this.isActive()){Plugin.call($this,'hide');}else{Plugin.call($this,'show');$(document).on('click.vc.accordion.data-api.dropdown',function(e){var isTarget;isTarget=$(e.target).closest(that.getTarget()).length;if(!isTarget){Plugin.call($this,'hide');$(document).off(e);}});}};Accordion.prototype.collapse=function(){var $this,$triggers;$this=this.$element;$triggers=this.getActiveTriggers().filter(function(){return $this[0]!==this;});if($triggers.length){Plugin.call($triggers,'hide');} Plugin.call($this,'show');};Accordion.prototype.collapseAll=function(){var $this,$triggers;$this=this.$element;$triggers=this.getActiveTriggers().filter(function(){return $this[0]!==this;});if($triggers.length){Plugin.call($triggers,'hide');} Plugin.call($this,'toggle');};Accordion.prototype.showNext=function(){var $triggers,$activeTriggers,activeIndex;$triggers=this.getTriggers();$activeTriggers=this.getActiveTriggers();if($triggers.length){if($activeTriggers.length){var lastActiveAccordion;lastActiveAccordion=$activeTriggers.eq($activeTriggers.length-1).vcAccordion().data('vc.accordion');if(lastActiveAccordion&&lastActiveAccordion.getIndex){activeIndex=lastActiveAccordion.getIndex();}} if(-1