(function(factory){
"use strict";
if(typeof define==='function'&&define.amd){
define([ 'jquery' ], factory);
}else if(typeof exports==='object'&&typeof require==='function'){
factory(require('jquery') );
}else{
factory(jQuery);
}}(function($){
'use strict';
var utils=(function (){
return {
escapeRegExChars: function(value){
return value.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
},
createNode: function(containerClass){
var div=document.createElement('div');
div.className=containerClass;
div.style.display='none';
return div;
}};}()),
keys={
ESC: 27,
TAB: 9,
RETURN: 13,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40
};
function Autocomplete(el, options){
var noop=$.noop,
that=this,
defaults={
ajaxSettings: { },
autoSelectFirst: false,
appendTo: document.body,
serviceUrl: null,
lookup: null,
onSelect: null,
onMouseOver: null,
onMouseLeave: null,
width: '100%',
minChars: 1,
maxHeight: 1000,
deferRequestBy: 0,
params: { },
delimiter: null,
zIndex: 9999,
type: 'GET',
noCache: false,
is_rtl: false,
onSearchStart: noop,
onSearchComplete: noop,
onSearchError: noop,
preserveInput: false,
wrapperaClass: 'search-wrapp',
containerClass: 'search-suggestions-wrapp',
preloaderClass: 'search-preloader',
closeTrigger: 'search-close',
tabDisabled: false,
dataType: 'text',
currentRequest: null,
triggerSelectOnValidInput: true,
preventBadQueries: true,
lookupFilter: function(suggestion, originalQuery, queryLowerCase){
return suggestion.value.toLowerCase().indexOf(queryLowerCase)!==-1;
},
paramName: 'query',
transformResult: function(response){
return typeof response==='string' ? JSON.parse(response):response;
},
showNoSuggestionNotice: false,
noSuggestionNotice: 'No results',
orientation: 'bottom'
};
that.element=el;
that.el=$(el);
that.suggestions=[ ];
that.badQueries=[ ];
that.selectedIndex=-1;
that.currentValue=that.element.value;
that.intervalId=0;
that.cachedResponse={ };
that.detailsRequestsSent=[ ];
that.onChangeInterval=null;
that.onChange=null;
that.isLocal=false;
that.suggestionsContainer=null;
that.detailsContainer=null;
that.noSuggestionsContainer=null;
that.options=$.extend({ }, defaults, options);
that.classes={
selected: 'search-suggestion-selected',
suggestion: 'search-suggestion'
};
that.hint=null;
that.hintValue='';
that.selection=null;
that.initialize();
that.setOptions(options);
}
Autocomplete.utils=utils;
$.Autocomplete=Autocomplete;
Autocomplete.prototype={
killerFn: null,
initialize: function (){
var that=this,
suggestionSelector='.' + that.classes.suggestion,
selected=that.classes.selected,
options=that.options,
container,
closeTrigger='.' + options.closeTrigger;
that.killerFn=function(e){
if($(e.target).closest('.' + that.options.containerClass).length===0){
that.killSuggestions();
that.disableKillerFn();
}};
that.suggestionsContainer=Autocomplete.utils.createNode(options.containerClass);
container=$(that.suggestionsContainer);
container.appendTo(that.el.closest('.' + options.wrapperaClass) );
if(options.width!=='auto'){
container.width(options.width);
}
container.on('mouseover.autocomplete', suggestionSelector, function (){
that.onMouseOver($(this).data('index') );
that.activate($(this).data('index') );
});
container.on('mouseout.autocomplete', function (){
});
$(document).on('click.autocomplete', closeTrigger, function(e){
that.killerFn(e);
that.clear(e);
$(this).removeClass(options.closeTrigger);
that.el.val('').focus();
});
container.on('click.autocomplete', suggestionSelector, function (){
that.select($(this).data('index') );
return false;
});
that.el.on('keydown.autocomplete', function(e){
that.onKeyPress(e);
});
that.el.on('keyup.autocomplete', function(e){
that.onKeyUp(e);
});
that.el.on('change.autocomplete', function(e){
that.onKeyUp(e);
});
that.el.on('input.autocomplete', function(e){
that.onKeyUp(e);
});
},
onFocus: function (){
var that=this;
if(that.el.val().length >=that.options.minChars){
that.onValueChange();
}},
onBlur: function (){
this.enableKillerFn();
},
abortAjax: function (){
var that=this;
if(that.currentRequest){
that.currentRequest.abort();
that.currentRequest=null;
}},
setOptions: function(suppliedOptions){
var that=this,
options=that.options;
$.extend(options, suppliedOptions);
that.isLocal=Array.isArray(options.lookup);
if(that.isLocal){
options.lookup=that.verifySuggestionsFormat(options.lookup);
}
options.orientation=that.validateOrientation(options.orientation, 'bottom');
that.options.onSearchComplete=function (){
that.preloader('hide', $('.' + options.preloaderClass), options.closeTrigger);
};},
clearCache: function (){
this.cachedResponse={ };
this.badQueries=[ ];
},
clear: function (){
this.clearCache();
this.currentValue='';
this.suggestions=[ ];
},
disable: function (){
var that=this;
that.disabled=true;
clearInterval(that.onChangeInterval);
that.abortAjax();
},
enable: function (){
this.disabled=false;
},
enableKillerFn: function (){
var that=this;
$(document).on('click.autocomplete', that.killerFn);
},
disableKillerFn: function (){
var that=this;
$(document).off('click.autocomplete', that.killerFn);
},
killSuggestions: function (){
var that=this,
containerParent=$(that.suggestionsContainer).parent();
that.stopKillSuggestions();
that.intervalId=window.setInterval(function (){
if(that.visible){
if(!that.options.preserveInput){
that.el.val(that.currentValue);
}
that.hide();
}
that.stopKillSuggestions();
}, 50);
},
stopKillSuggestions: function (){
window.clearInterval(this.intervalId);
},
isCursorAtEnd: function (){
var that=this,
valLength=that.el.val().length,
selectionStart=that.element.selectionStart,
range;
if(typeof selectionStart==='number'){
return selectionStart===valLength;
}
if(document.selection){
range=document.selection.createRange();
range.moveStart('character', -valLength);
return valLength===range.text.length;
}
return true;
},
onKeyPress: function(e){
var that=this;
if(!that.disabled&&!that.visible&&e.which===keys.DOWN&&that.currentValue){
that.suggest();
return;
}
if(that.disabled||!that.visible){
return;
}
switch(e.which){
case keys.ESC:
that.el.val(that.currentValue);
that.hide();
break;
case keys.RIGHT:
if(that.hint&&that.options.onHint&&that.isCursorAtEnd()){
that.selectHint();
break;
}
return;
case keys.TAB:
if(that.hint&&that.options.onHint){
that.selectHint();
return;
}
if(that.selectedIndex===-1){
that.hide();
return;
}
that.select(that.selectedIndex);
if(that.options.tabDisabled===false){
return;
}
break;
case keys.RETURN:
if(that.selectedIndex===-1){
that.hide();
return;
}
that.select(that.selectedIndex);
break;
case keys.UP:
that.moveUp();
break;
case keys.DOWN:
that.moveDown();
break;
default:
return;
}
e.stopImmediatePropagation();
e.preventDefault();
},
onKeyUp: function(e){
var that=this;
if(that.disabled){
return;
}
switch(e.which){
case keys.UP:
case keys.DOWN:
return;
}
clearInterval(that.onChangeInterval);
if(that.currentValue!==that.el.val()){
that.findBestHint();
if(that.options.deferRequestBy > 0){
that.onChangeInterval=setInterval(function (){
that.onValueChange();
}, that.options.deferRequestBy);
}else{
that.onValueChange();
}}
},
onValueChange: function (){
var that=this,
options=that.options,
value=that.el.val(),
query=that.getQuery(value);
if(that.selection&&that.currentValue!==query){
that.selection=null;
(options.onInvalidateSelection||$.noop).call(that.element);
}
clearInterval(that.onChangeInterval);
that.currentValue=value;
that.selectedIndex=-1;
if(options.triggerSelectOnValidInput&&that.isExactMatch(query) ){
that.select(0);
return;
}
if(query.length < options.minChars){
$('.' + that.options.closeTrigger).removeClass(that.options.closeTrigger);
that.hide();
}else{
that.getSuggestions(query);
}},
isExactMatch: function(query){
var suggestions=this.suggestions;
return(suggestions.length===1&&suggestions[0].value.toLowerCase()===query.toLowerCase());
},
getQuery: function(value){
var delimiter=this.options.delimiter,
parts;
if(!delimiter){
return value;
}
parts=value.split(delimiter);
return $.trim(parts[parts.length - 1]);
},
getSuggestionsLocal: function(query){
var that=this,
options=that.options,
queryLowerCase=query.toLowerCase(),
filter=options.lookupFilter,
limit=parseInt(options.lookupLimit, 10),
data;
data={
suggestions: $.grep(options.lookup, function(suggestion){
return filter(suggestion, query, queryLowerCase);
})
};
if(limit&&data.suggestions.length > limit){
data.suggestions=data.suggestions.slice(0, limit);
}
return data;
},
getSuggestions: function(q){
var response,
that=this,
container=$(that.suggestionsContainer),
options=that.options,
serviceUrl=options.serviceUrl,
params,
cacheKey,
ajaxSettings;
options.params[options.paramName]=q;
params=options.ignoreParams ? null:options.params;
that.preloader('show', $('.' + options.preloaderClass), 'search-inner-preloader', container);
if(options.onSearchStart.call(that.element, options.params)===false){
return;
}
if($.isFunction(options.lookup) ){
options.lookup(q, function(data){
that.suggestions=data.suggestions;
that.suggest();
options.onSearchComplete.call(that.element, q, data.suggestions);
});
return;
}
if(that.isLocal){
response=that.getSuggestionsLocal(q);
}else{
if($.isFunction(serviceUrl) ){
serviceUrl=serviceUrl.call(that.element, q);
}
cacheKey=serviceUrl + '?' + $.param(params||{ });
response=that.cachedResponse[cacheKey];
}
if(response&&Array.isArray(response.suggestions) ){
that.suggestions=response.suggestions;
that.suggest();
options.onSearchComplete.call(that.element, q, response.suggestions);
}else if(!that.isBadQuery(q) ){
that.abortAjax();
ajaxSettings={
url: serviceUrl,
data: params,
type: options.type,
dataType: options.dataType
};
$.extend(ajaxSettings, options.ajaxSettings);
that.currentRequest=$.ajax(ajaxSettings).done(function(data){
var result;
that.currentRequest=null;
result=options.transformResult(data, q);
if(typeof result.suggestions!=='undefined'){
that.processResponse(result, q, cacheKey);
}
options.onSearchComplete.call(that.element, q, result.suggestions);
}).fail(function(jqXHR, textStatus, errorThrown){
options.onSearchError.call(that.element, q, jqXHR, textStatus, errorThrown);
});
}else{
options.onSearchComplete.call(that.element, q, [ ]);
}},
isBadQuery: function(q){
if(!this.options.preventBadQueries){
return false;
}
var badQueries=this.badQueries,
i=badQueries.length;
while(i--){
if(q.indexOf(badQueries[i])===0){
return true;
}}
return false;
},
hide: function (){
var that=this,
container=$(that.suggestionsContainer),
containerParent=$(that.suggestionsContainer).parent();
if($.isFunction(that.options.onHide)&&that.visible){
that.options.onHide.call(that.element, container);
}
that.visible=false;
that.selectedIndex=-1;
clearInterval(that.onChangeInterval);
$(that.suggestionsContainer).hide();
$(that.detailsContainer).hide();
containerParent.removeClass('search-open');
that.signalHint(null);
},
suggest: function (){
if(this.suggestions==''){
if(this.options.showNoSuggestionNotice){
this.noSuggestions();
}else{
this.hide();
}
return;
}
var that=this,
options=that.options,
groupBy=options.groupBy,
formatResult=options.formatResult,
value=that.getQuery(that.currentValue),
className=that.classes.suggestion,
classSelected=that.classes.selected,
container=$(that.suggestionsContainer),
noSuggestionsContainer=$(that.noSuggestionsContainer),
beforeRender=options.beforeRender,
category,
formatGroup=function(suggestion, index){
var currentCategory=suggestion.data[groupBy];
if(category===currentCategory){
return '';
}
category=currentCategory;
return '<div class="autocomplete-group"><strong>' + category + '</strong></div>';
};
if(options.triggerSelectOnValidInput&&that.isExactMatch(value) ){
that.select(0);
return;
}
this.adjustContainerWidth();
noSuggestionsContainer.detach();
container.html(that.suggestions);
if($.isFunction(beforeRender) ){
beforeRender.call(that.element, container, that.suggestions);
}
container.show();
container.parent().addClass('search-open');
if(options.autoSelectFirst){
that.selectedIndex=0;
container.scrollTop(0);
container.children('.' + className).first().addClass(classSelected);
}
that.visible=true;
that.findBestHint();
},
noSuggestions: function (){
},
adjustContainerWidth: function (){
var that=this,
options=that.options,
width,
container=$(that.suggestionsContainer).parent(),
containerSugg=$(that.suggestionsContainer),
maxWidth=550;
if(options.width==='auto'){
width=that.el.outerWidth();
containerSugg.css('width', width + 'px');
}},
findBestHint: function (){
var that=this,
value=that.el.val().toLowerCase(),
bestMatch=null;
if(!value){
return;
}
that.signalHint(bestMatch);
},
signalHint: function(suggestion){
var hintValue='',
that=this;
if(suggestion){
hintValue=that.currentValue + suggestion.value.substr(that.currentValue.length);
}
if(that.hintValue!==hintValue){
that.hintValue=hintValue;
that.hint=suggestion;
(this.options.onHint||$.noop)(hintValue);
}},
preloader: function(action, container, cssClass, suggestionsContainer){
var html,
defaultClass='search-preloader-wrapp',
cssClasses=cssClass==null ? defaultClass:defaultClass + ' ' + cssClass;
if(search.show_preloader!=1||container.length==0){
return;
}
if(action==='hide'){
$(defaultClass).remove();
container.html('');
if(!($('.search-suggestions-wrapp .products')[0])){
}}
if(action==='show'){
suggestionsContainer.html('');
container.html('<div class="'+cssClasses+'"></div>');
}},
validateOrientation: function(orientation, fallback){
orientation=$.trim(orientation||'').toLowerCase();
if($.inArray(orientation, [ 'auto', 'bottom', 'top' ])===-1){
orientation=fallback;
}
return orientation;
},
processResponse: function(result, originalQuery, cacheKey){
var that=this,
options=that.options;
if(!options.noCache){
that.cachedResponse[cacheKey]=result;
if(options.preventBadQueries&&!result.suggestions.length){
that.badQueries.push(originalQuery);
}}
if(originalQuery!==that.getQuery(that.currentValue) ){
return;
}
that.suggestions=result.suggestions;
that.suggest();
},
activate: function(index){
var that=this,
activeItem,
selected=that.classes.selected,
container=$(that.suggestionsContainer),
children=container.find('.' + that.classes.suggestion);
container.find('.' + selected).removeClass(selected);
that.selectedIndex=index;
if(that.selectedIndex!==-1&&children.length > that.selectedIndex){
activeItem=children.get(that.selectedIndex);
$(activeItem).addClass(selected);
return activeItem;
}
return null;
},
selectHint: function (){
var that=this,
i=$.inArray(that.hint, that.suggestions);
that.select(i);
},
select: function(i){
var that=this;
that.hide();
that.onSelect(i);
that.disableKillerFn();
},
moveUp: function (){
var that=this;
if(that.selectedIndex===-1){
return;
}
if(that.selectedIndex===0){
$(that.suggestionsContainer).children().first().removeClass(that.classes.selected);
that.selectedIndex=-1;
that.el.val(that.currentValue);
that.findBestHint();
return;
}
that.adjustScroll(that.selectedIndex - 1);
},
moveDown: function (){
var that=this;
if(that.selectedIndex===(that.suggestions.length - 1) ){
return;
}
that.adjustScroll(that.selectedIndex + 1);
},
adjustScroll: function(index){
var that=this,
activeItem=that.activate(index);
if(!activeItem){
return;
}
var offsetTop,
upperBound,
lowerBound,
heightDelta=$(activeItem).outerHeight();
offsetTop=activeItem.offsetTop;
upperBound=$(that.suggestionsContainer).scrollTop();
lowerBound=upperBound + that.options.maxHeight - heightDelta;
if(offsetTop < upperBound){
$(that.suggestionsContainer).scrollTop(offsetTop);
}else if(offsetTop > lowerBound){
$(that.suggestionsContainer).scrollTop(offsetTop - that.options.maxHeight + heightDelta);
}
if(!that.options.preserveInput){
that.el.val(that.getValue(that.suggestions[index].value) );
}
that.signalHint(null);
},
onSelect: function(index){
var that=this,
onSelectCallback=that.options.onSelect,
suggestion=that.suggestions[index];
that.currentValue=that.getValue(suggestion.value);
if(that.currentValue!==that.el.val()&&!that.options.preserveInput){
that.el.val(that.currentValue);
}
if(suggestion.id!=-1){
window.location.href=suggestion.url;
}
that.signalHint(null);
that.suggestions=[ ];
that.selection=suggestion;
if($.isFunction(onSelectCallback) ){
onSelectCallback.call(that.element, suggestion);
}},
onMouseOver: function(index){
var that=this,
onMouseOverCallback=that.options.onMouseOver,
suggestion=that.suggestions[index];
if($.isFunction(onMouseOverCallback) ){
onMouseOverCallback.call(that.element, suggestion);
}},
onMouseLeave: function(index){
var that=this,
onMouseLeaveCallback=that.options.onMouseLeave,
suggestion=that.suggestions[index];
if($.isFunction(onMouseLeaveCallback) ){
onMouseLeaveCallback.call(that.element, suggestion);
}},
getValue: function(value){
var that=this,
delimiter=that.options.delimiter,
currentValue,
parts;
if(!delimiter){
return value;
}
currentValue=that.currentValue;
parts=currentValue.split(delimiter);
if(parts.length===1){
return value;
}
return currentValue.substr(0, currentValue.length - parts[parts.length - 1].length) + value;
},
dispose: function (){
var that=this;
that.el.off('.autocomplete').removeData('autocomplete');
that.disableKillerFn();
$(that.suggestionsContainer).remove();
}};
$.fn.dgwtWcasAutocomplete=function(options, args){
var dataKey='autocomplete';
if(!arguments.length){
return this.first().data(dataKey);
}
return this.each(function (){
var inputElement=$(this),
instance=inputElement.data(dataKey);
if(typeof options==='string'){
if(instance&&typeof instance[options]==='function'){
instance[options](args);
}}else{
if(instance&&instance.dispose){
instance.dispose();
}
instance=new Autocomplete(this, options);
inputElement.data(dataKey, instance);
}});
};
(function (){
$(function (){
"use strict";
$('.search-input').dgwtWcasAutocomplete({
minChars: 3,
autoSelectFirst: false,
triggerSelectOnValidInput: false,
serviceUrl: search.ajax_search_endpoint,
paramName: 'search_keyword',
});
});
}());
}) );
document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",(()=>{for(var e=["-webkit-","-moz-","-ms-","-o-",""],t=0;t<e.length;t++)e[t]+"transform"in document.documentElement.style&&(document.documentElement.className+=" vc_transform ")})(),(c=>{"function"!=typeof window.vc_js&&(window.vc_js=function(){vc_toggleBehaviour(),vc_tabsBehaviour(),vc_accordionBehaviour(),vc_teaserGrid(),vc_carouselBehaviour(),vc_slidersBehaviour(),vc_prettyPhoto(),vc_pinterest(),vc_progress_bar(),vc_plugin_flexslider(),vc_gridBehaviour(),vc_rowBehaviour(),vc_prepareHoverBox(),vc_googleMapsPointer(),vc_ttaActivation(),vc_ttaToggleBehaviour(),jQuery(document).trigger("vc_js"),window.setTimeout(vc_waypoints,500)}),"function"!=typeof window.vc_plugin_flexslider&&(window.vc_plugin_flexslider=function(e){(e?e.find(".wpb_flexslider"):jQuery(".wpb_flexslider")).each(function(){var e=jQuery(this),t=1e3*parseInt(e.attr("data-interval"),10),i=e.attr("data-flex_fx"),o=0==t?!1:!0;e.is(":visible")&&setTimeout(function(){e.flexslider({animation:i,slideshow:o,slideshowSpeed:t,sliderSpeed:800,smoothHeight:!0})},1)})}),"function"!=typeof window.vc_googleplus&&(window.vc_googleplus=function(){var e,t;0<jQuery(".wpb_googleplus").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://apis.google.com/js/plusone.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_pinterest&&(window.vc_pinterest=function(){var e,t;0<jQuery(".wpb_pinterest").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://assets.pinterest.com/js/pinit.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_progress_bar&&(window.vc_progress_bar=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".vc_progress_bar").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.find(".vc_single_bar").each(function(e){var t=jQuery(this).find(".vc_bar"),i=t.data("percentage-value");setTimeout(function(){t.css({width:i+"%"})},200*e)})},{offset:"85%"})})}),"function"!=typeof window.vc_waypoints&&(window.vc_waypoints=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".wpb_animate_when_almost_visible:not(.wpb_start_animation)").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.addClass("wpb_start_animation animated")},{offset:"85%"})})}),"function"!=typeof window.vc_toggleBehaviour&&(window.vc_toggleBehaviour=function(e){function t(e){e&&e.preventDefault&&e.preventDefault();var t=jQuery(this).closest(".vc_toggle"),e=t.find(".vc_toggle_content");t.hasClass("vc_toggle_active")?e.slideUp({duration:300,complete:function(){t.removeClass("vc_toggle_active")}}):e.slideDown({duration:300,complete:function(){t.addClass("vc_toggle_active")}})}(e?e.hasClass("vc_toggle_title")?e.unbind("click"):e.find(".vc_toggle_title").off("click"):jQuery(".vc_toggle_title").off("click")).on("click",t)}),"function"!=typeof window.vc_ttaToggleBehaviour&&(window.vc_ttaToggleBehaviour=function(e){function t(){var e=jQuery(this);e.toggleClass("wpb-tta-toggle-active"),e.parent().parent().parent().find(".vc_pagination-item").each(function(){if(!c(this).hasClass("vc_active"))return c(this).find("a").click(),!1})}(e?e.find(".wpb-tta-toggle"):jQuery(".wpb-tta-toggle")).off("click").on("click",t),setTimeout(function(){jQuery(".wpb-tta-toggle").each(function(){var e=jQuery(this);e.parent().parent().parent().find(".vc_tta-panels-container .vc_pagination li:first").hasClass("vc_active")||e.addClass("wpb-tta-toggle-active")})},1e3)}),"function"!=typeof window.vc_tabsBehaviour&&(window.vc_tabsBehaviour=function(e){var t,o;jQuery.ui&&(e=e||jQuery(".wpb_tabs, .wpb_tour"),t=jQuery.ui&&jQuery.ui.version?jQuery.ui.version.split("."):"1.10",o=1===parseInt(t[0],10)&&parseInt(t[1],10)<9,e.each(function(){var e=jQuery(this).attr("data-interval"),t=[],i=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(e,t){wpb_prepare_tab_content(e,t)},activate:function(e,t){wpb_prepare_tab_content(e,t)}});if(e&&0<e)try{i.tabs("rotate",1e3*e)}catch(e){window.console&&window.console.warn&&console.warn("tabs behaviours error",e)}jQuery(this).find(".wpb_tab").each(function(){t.push(this.id)}),jQuery(this).find(".wpb_tabs_nav li").on("click",function(e){return e&&e.preventDefault&&e.preventDefault(),o?i.tabs("select",jQuery("a",this).attr("href")):i.tabs("option","active",jQuery(this).index()),!1}),jQuery(this).find(".wpb_prev_slide a, .wpb_next_slide a").on("click",function(e){var t;e&&e.preventDefault&&e.preventDefault(),o?(t=i.tabs("option","selected"),jQuery(this).parent().hasClass("wpb_next_slide")?t++:t--,t<0?t=i.tabs("length")-1:t>=i.tabs("length")&&(t=0),i.tabs("select",t)):(t=i.tabs("option","active"),e=i.find(".wpb_tab").length,t=jQuery(this).parent().hasClass("wpb_next_slide")?e<=t+1?0:t+1:t-1<0?e-1:t-1,i.tabs("option","active",t))})}))}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(){var e=jQuery(this),t=(e.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0<parseInt(e.data("active-tab"),10)&&parseInt(e.data("active-tab"),10)-1),i=!1===t||"yes"===e.data("collapsible"),t=e.find(".wpb_accordion_wrapper").accordion({header:"> div > h3",autoHeight:!1,heightStyle:"content",active:t,collapsible:i,navigation:!0,activate:vc_accordionActivate,change:function(e,t){void 0!==jQuery.fn.isotope&&t.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(t.newPanel)}});!0===e.data("vcDisableKeydown")&&(t.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var o={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 e=jQuery(this),t=e.find(".wpb_thumbnails"),i=t.attr("data-layout-mode");t.isotope({itemSelector:".isotope-item",layoutMode:void 0===o[i]?"fitRows":o[i]}),e.find(".categories_filter a").data("isotope",t).on("click",function(e){e&&e.preventDefault&&e.preventDefault();e=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),e.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).on("load resize",function(){t.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function(e){(e?e.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var e=jQuery(this);!0!==e.data("carousel_enabled")&&e.is(":visible")&&(e.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1"),(e=jQuery(this).find(".wpb_thumbnails-fluid li")).css({"margin-right":e.css("margin-left"),"margin-left":0}),(e=jQuery(this).find("ul.wpb_thumbnails-fluid")).width(e.width()+300))})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(){var e,t,i=jQuery(this);i.hasClass("wpb_slider_nivo")?(0===(t=1e3*i.attr("data-interval"))&&(t=9999999999),jQuery.fn.nivoSlider&&!i.data("nivo-initialized")&&(i.data("nivo-initialized",!0),i.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:t,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"}))):i.hasClass("wpb_image_grid")&&i.find(".wpb_image_grid_ul")&&i.find(".wpb_image_grid_ul").isotope&&(jQuery.fn.imagesLoaded?e=i.find(".wpb_image_grid_ul").imagesLoaded(function(){e.isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0})}):i.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0}))})}),"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<location.href.indexOf("#!prettyPhoto")&&(location.hash="")},social_tools:""})}catch(e){window.console&&window.console.warn&&window.console.warn("vc_prettyPhoto initialize error",e)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return window.console&&window.console.warn&&window.console.warn("function vc_google_fonts is deprecated, no need to use it"),!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){var s=window.jQuery;function e(){var e;void 0!==window.wpb_disable_full_width_row_js&&window.wpb_disable_full_width_row_js||(e=s('[data-vc-full-width="true"]'),s.each(e,function(){var e,t,i,o,n,a,r,c=s(this),d=(c.addClass("vc_hidden"),c.next(".vc_row-full-width"));(d=d.length?d:c.parent().next(".vc_row-full-width")).length&&(c.removeAttr("data-vc-full-width-temp"),e=parseInt(c.css("margin-left"),10),t=parseInt(c.css("margin-right"),10),i=0-d.offset().left-e,o=s(window).width(),n={position:"relative",left:i="rtl"===c.css("direction")?(i=i-d.width()+o)+e+t:i,"box-sizing":"border-box",width:o,"max-width":o},c.css(n),c.data("vcStretchContent")||("rtl"===c.css("direction")?((a=i)<0&&(a=0),(r=i)<0&&(r=0)):(r=o-(a=(a=-1*i)<0?0:a)-d.width()+e+t)<0&&(r=0),c.css({"padding-left":a+"px","padding-right":r+"px"})),c.attr("data-vc-full-width-init","true"),c.removeClass("vc_hidden"),s(document).trigger("vc-full-width-row-single",{el:c,offset:i,marginLeft:e,marginRight:t,elFull:d,width:o,maxWidth:o}))}),s(document).trigger("vc-full-width-row",e))}function t(){var e,t,i=s(".vc_row-o-full-height:first");i.length&&(e=s(window).height(),(t=i.offset().top)<e)&&i.css("min-height",100-t/(e/100)+"vh"),s(document).trigger("vc-full-height-row",i)}s(window).off("resize.vcRowBehaviour").on("resize.vcRowBehaviour",e).on("resize.vcRowBehaviour",t),e(),t(),(0<window.navigator.userAgent.indexOf("MSIE ")||navigator.userAgent.match(/Trident.*rv\:11\./))&&s(".vc_row-o-full-height").each(function(){"flex"===s(this).css("display")&&s(this).wrap('<div class="vc_ie-flexbox-fixer"></div>')}),vc_initVideoBackgrounds();var n=!1;if(window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),s(".vc_parallax-inner").remove(),s("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),s("[data-vc-parallax]").each(function(){var e,t,i,o;n=!0,"on"===s(this).data("vcParallaxOFade")&&s(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),e=100*s(this).data("vcParallax"),(t=s("<div />").addClass("vc_parallax-inner").appendTo(s(this))).height(e+"%"),i=s(this).data("vcParallaxImage"),(o=vcExtractYoutubeId(i))?insertYoutubeVideoAsBackground(t,o):void 0!==i&&t.css("background-image","url("+i+")"),t.attr("data-bottom-top","top: "+-(e-100)+"%;").attr("data-top-bottom","top: 0%;")}),n&&window.skrollr)window.vcParallaxSkroll=skrollr.init({forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}}),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(e){for(var t=!1,i=1;!1===t;){if(e.hasClass("columns_count_"+i))return t=!0,i;i++}}),"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(e,t){var i=t.panel||t.newPanel,o=i.find(".vc_pie_chart:not(.vc_ready)"),n=i.find(".vc_round-chart"),a=i.find(".vc_line-chart"),r=i.find('[data-ride="vc_carousel"]');vc_carouselBehaviour(),vc_plugin_flexslider(i),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),i.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&i.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),o.length&&jQuery.fn.vcChat&&o.vcChat(),n.length&&jQuery.fn.vcRoundChart&&n.vcRoundChart({reload:!1}),a.length&&jQuery.fn.vcLineChart&&a.vcLineChart({reload:!1}),r.length&&jQuery.fn.carousel&&r.carousel("resizeAction"),t=i.find(".isotope, .wpb_image_grid_ul"),o=i.find(".wpb_gmaps_widget"),0<t.length&&t.isotope("layout"),o.length&&!o.is(".map_ready")&&((n=o.find("iframe")).attr("src",n.attr("src")),o.addClass("map_ready")),i.parents(".isotope").length&&i.parents(".isotope").each(function(){jQuery(this).isotope("layout")}),c(document).trigger("wpb_prepare_tab_content",i)}),"function"!=typeof window.vc_ttaActivation&&(window.vc_ttaActivation=function(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var t=window.jQuery,i={};i.newPanel=t(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,i)})}),"function"!=typeof window.vc_accordionActivate&&(window.vc_accordionActivate=function(e,t){var i,o,n,a;t.newPanel.length&&t.newHeader.length&&(i=t.newPanel.find(".vc_pie_chart:not(.vc_ready)"),o=t.newPanel.find(".vc_round-chart"),n=t.newPanel.find(".vc_line-chart"),a=t.newPanel.find('[data-ride="vc_carousel"]'),void 0!==jQuery.fn.isotope&&t.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),vc_carouselBehaviour(t.newPanel),vc_plugin_flexslider(t.newPanel),i.length&&jQuery.fn.vcChat&&i.vcChat(),o.length&&jQuery.fn.vcRoundChart&&o.vcRoundChart({reload:!1}),n.length&&jQuery.fn.vcLineChart&&n.vcLineChart({reload:!1}),a.length&&jQuery.fn.carousel&&a.carousel("resizeAction"),t.newPanel.parents(".isotope").length)&&t.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),"function"!=typeof window.initVideoBackgrounds&&(window.initVideoBackgrounds=function(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}),"function"!=typeof window.vc_initVideoBackgrounds&&(window.vc_initVideoBackgrounds=function(){c(".vc_video-bg").remove(),c("[data-vc-video-bg]").each(function(){var e,i=jQuery(this);i.data("vcVideoBg")?(e=i.data("vcVideoBg"),(e=vcExtractYoutubeId(e))&&(i.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground(i,e)),jQuery(window).on("grid:items:added",function(e,t){i.has(t).length&&vcResizeVideoBackground(i)})):i.find(".vc_video-bg").remove()})}),"function"!=typeof window.insertYoutubeVideoAsBackground&&(window.insertYoutubeVideoAsBackground=function(e,t,i){if("undefined"==typeof YT||void 0===YT.Player)return 100<(i=void 0===i?0:i)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground(e,t,i++)},100);var o=e.prepend('<div class="vc_video-bg"><div class="inner"></div></div>').find(".inner");new YT.Player(o[0],{width:"100%",height:"100%",videoId:t,playerVars:{playlist:t,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,mute:1,wmode:"transparent"},events:{onReady:function(e){e.target.mute().setLoop(!0)}}}),vcResizeVideoBackground(e),jQuery(window).on("resize",function(){vcResizeVideoBackground(e)})}),"function"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function(e){var t,i,o,n,a=e.innerWidth(),r=e.innerHeight();a/r<16/9?(t=r*(16/9),i=r,o=-Math.round((t-a)/2)+"px",n=-Math.round((i-r)/2)+"px"):(i=(t=a)*(9/16),n=-Math.round((i-r)/2)+"px",o=-Math.round((t-a)/2)+"px"),t+="px",i+="px",e.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:o,marginTop:n,width:t,height:i})}),"function"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(e){return void 0!==e&&null!==(e=e.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/))&&e[1]}),"function"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var e=window.jQuery,t=e(".wpb_gmaps_widget");t.on("click",function(){e("iframe",this).css("pointer-events","auto")}),t.on("mouseleave",function(){e("iframe",this).css("pointer-events","none")}),e(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(e){e.each(function(){var e=jQuery(this),t=e.width();e.css("perspective",4*t+"px")})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(e){e.each(function(){var e=jQuery(this),t=e.find(".vc-hoverbox-inner"),i=(t.css("min-height",0),e.find(".vc-hoverbox-front-inner").outerHeight()),e=e.find(".vc-hoverbox-back-inner").outerHeight(),i=e<i?i:e;t.css("min-height",(i=i<250?250:i)+"px")})}),"function"!=typeof window.vc_prepareHoverBox&&(window.vc_prepareHoverBox=function(){var e=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(e),vc_setHoverBoxPerspective(e)}),jQuery(document).ready(window.vc_prepareHoverBox),jQuery(window).on("resize",window.vc_prepareHoverBox),jQuery(document).ready(function(){window.vc_js()})})(window.jQuery);