­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ !function($){"use strict";$us.WTabs=function(container,options){this.init(container,options)};$us.WTabs.prototype={init:function(container,options){var defaults={duration:300,easing:'cubic-bezier(.78,.13,.15,.86)'};this.options=$.extend({},defaults,options);this.isRtl=$('.l-body').hasClass('rtl');this.$container=$(container);this.$tabsList=this.$container.find('> .w-tabs-list:first');this.$tabs=this.$tabsList.find('.w-tabs-item');this.$sectionsWrapper=this.$container.find('> .w-tabs-sections:first');this.$sectionsHelper=this.$sectionsWrapper.children();this.$sections=this.$sectionsHelper.find('> .w-tabs-section');this.$headers=this.$sections.children('.w-tabs-section-header');this.$contents=this.$sections.children('.w-tabs-section-content');this.$line_charts=this.$container.find(".vc_line-chart");this.$round_charts=this.$container.find(".vc_round-chart");if(this.$container.hasClass('accordion')){this.$tabs=this.$headers} this.width=0;this.tabWidths=[];this.tabHeights=[];this.tabTops=[];this.tabLefts=[];this.isScrolling=!1;this.hasScrolling=this.$container.hasClass('has_scrolling')||!1;this.isTogglable=(this.$container.usMod('type')==='togglable');this.isStretched=this.$tabsList.hasClass('stretch');this.minWidth=0;this.count=this.$tabs.length;if(this.count===0){return} this.basicLayout=this.$container.hasClass('accordion')?'accordion':(this.$container.usMod('layout')||'hor');this.curLayout=this.basicLayout;this.active=[];this.activeOnInit=[];this.definedActive=[];this.isTrendy=this.$container.hasClass('style_trendy');if(this.isTrendy){this.$tabsBar=$()} this.tabs=$.map(this.$tabs.toArray(),$);this.sections=$.map(this.$sections.toArray(),$);this.headers=$.map(this.$headers.toArray(),$);this.contents=$.map(this.$contents.toArray(),$);if(!this.sections.length){return} $.each(this.tabs,function(index){if(this.sections[index].hasClass('content-empty')){this.tabs[index].hide();this.sections[index].hide()} if(this.tabs[index].hasClass('active')){this.active.push(index);this.activeOnInit.push(index)} if(this.tabs[index].hasClass('defined-active')){this.definedActive.push(index)} this.tabs[index].add(this.headers[index]).on('click mouseover',function(e){var $link=this.tabs[index];if(!$link.is('a')){$link=$link.find('a')} if(!$link.length||($link.is('[href]')&&$link.attr('href').indexOf('http')===-1)){e.preventDefault()} if(e.type=='mouseover'&&(this.$container.hasClass('accordion')||!this.$container.hasClass('switch_hover'))){return} if(this.curLayout==='accordion'&&this.isTogglable){this.toggleSection(index)} else{if(index!=this.active[0]){this.headerClicked=!0;this.openSection(index)}else if(this.curLayout==='accordion'){this.contents[index].css('display','block').attr('aria-expanded','true').slideUp(this.options.duration,this._events.contentChanged);this.tabs[index].removeClass('active');this.sections[index].removeClass('active');this.active[0]=undefined}}}.bind(this))}.bind(this));this._events={resize:this.resize.bind(this),hashchange:this.hashchange.bind(this),contentChanged:function(){$.each(this.contents,function(_,item){var $content=$(item);$content.attr('aria-expanded',$content.is(':visible'))}) $us.$canvas.trigger('contentChange');this.$line_charts.length&&jQuery.fn.vcLineChart&&this.$line_charts.vcLineChart({reload:!1});this.$round_charts.length&&jQuery.fn.vcRoundChart&&this.$round_charts.vcRoundChart({reload:!1})}.bind(this),wheel:function(){if(this.isScrolling){$us.$htmlBody.stop(!0,!1)}}};this.switchLayout(this.curLayout);$us.$window.on('resize',$us.debounce(this._events.resize,5)).on('hashchange',this._events.hashchange).on('wheel',$us.debounce(this._events.wheel.bind(this),5)) $us.$document.ready(function(){this.resize();$us.timeout(this._events.resize,50);$us.timeout(function(){if(window.location.hash){var hash=window.location.hash.substr(1),$linkedSection=this.$sectionsWrapper.find('.w-tabs-section[id="'+hash+'"]');if($linkedSection.length&&(!$linkedSection.hasClass('active'))){$linkedSection.find('.w-tabs-section-header').trigger('click')}}}.bind(this),150)}.bind(this));$.each(this.tabs,function(index){if(this.headers.length&&this.headers[index].attr('href')!=undefined){var tabHref=this.headers[index].attr('href'),tabHeader=this.headers[index];$('a[href="'+tabHref+'"]',this.$container).on('click',function(e){e.preventDefault();if($(this).hasClass('w-tabs-section-header','w-tabs-item')){return} if(!$(tabHeader).parent('.w-tabs-section').hasClass('active')){tabHeader.trigger('click')}})}}.bind(this));this.$container.addClass('initialized');this.headerHeight=0;$us.header.on('transitionEnd',function(header){this.headerHeight=header.getCurrentHeight()}.bind(this))},hashchange:function(){if(window.location.hash){var hash=window.location.hash.substr(1),$linkedSection=this.$sectionsWrapper.find('.w-tabs-section[id="'+hash+'"]');if($linkedSection.length&&(!$linkedSection.hasClass('active'))){var $header=$linkedSection.find('.w-tabs-section-header');$header.click()}}},switchLayout:function(to){this.cleanUpLayout(this.curLayout);this.prepareLayout(to);this.curLayout=to},cleanUpLayout:function(from){if(from==='hor'){this.$sectionsWrapper.clearPreviousTransitions().resetInlineCSS('width','height');this.$sectionsHelper.clearPreviousTransitions().resetInlineCSS('position','width','left');this.$sections.resetInlineCSS('width','display');this.$container.removeClass('autoresize')}else if(from==='accordion'){this.$container.removeClass('accordion');this.$sections.resetInlineCSS('display');this.$contents.resetInlineCSS('height','padding-top','padding-bottom','display','opacity')}else if(from==='ver'){this.$contents.resetInlineCSS('height','padding-top','padding-bottom','display','opacity')} if(this.isTrendy&&(from==='hor'||from==='ver')){this.$tabsBar.remove()}},prepareLayout:function(to){if(to!=='accordion'&&this.active[0]===undefined){this.active[0]=this.activeOnInit[0];if(this.active[0]!==undefined){this.tabs[this.active[0]].addClass('active');this.sections[this.active[0]].addClass('active')}} if(to==='hor'){this.$container.addClass('autoresize');this.$sectionsHelper.css('position','absolute')}else if(to==='accordion'){this.$container.addClass('accordion');this.$contents.hide();if(this.curLayout!=='accordion'&&this.active[0]!==undefined&&this.active[0]!==this.definedActive[0]){this.headers[this.active[0]].removeClass('active');this.tabs[this.active[0]].removeClass('active');this.sections[this.active[0]].removeClass('active');this.active[0]=this.definedActive[0]} for(var i=0;i').appendTo(this.$tabsList)}},measure:function(){if(this.basicLayout==='ver'){this.$tabsList.css('width',0);var minTabWidth=this.$tabsList.outerWidth(!0);this.$tabsList.css('width','');this.$container.addClass('measure');var minContentWidth=this.$sectionsWrapper.outerWidth(!0);this.$container.removeClass('measure');var navWidth=this.$container.usMod('navwidth');if(navWidth!=='auto'){minTabWidth=Math.max(minTabWidth,minContentWidth*parseInt(navWidth)/(100-parseInt(navWidth)))} var width=(!window.ontouchstart&&this.$container.closest('.vc_col-sm-6').parent('.type_boxes').length)?480-(parseInt(this.$container.closest('.vc_col-sm-6').width())-this.$container.width()):480;this.minWidth=Math.max(width,minContentWidth+minTabWidth+1);if(this.isTrendy){this.tabHeights=[];this.tabTops=[];for(var index=0;index