jQuery(document).ready(function($){"use strict";var useFixedHeader=Boolean(ThemeOptions.use_fixed_header);var showScrollToTopButton=Boolean(ThemeOptions.display_scroll_to_top_button);var autoFlipSubmenu=Boolean(ThemeOptions.auto_flipping_submenu);var homeSliderAutoAnimated=Boolean(ThemeOptions.basic_slider_auto_rotation);var homeSliderAutoAnimatedDelay=parseInt(ThemeOptions.basic_slider_rotation_duration,10);var homeSliderAnimation=ThemeOptions.basic_slider_transition;var homeSliderAnimationSpeed=parseInt(ThemeOptions.basic_slider_transition_speed,10);var testimonialSliderAnimationSpeed=600;var imageSliderAnimation='directscroll';var imageSliderAnimationSpeed=600;var portfolioImageSliderAutoAnimated=Boolean(ThemeOptions.portfolio_slider_auto_rotation);var portfolioImageSliderAutoAnimatedDelay=parseInt(ThemeOptions.portfolio_slider_rotation_duration,10);var portfolioImageSliderAnimation=ThemeOptions.portfolio_slider_transition;var portfolioImageSliderAnimationSpeed=parseInt(ThemeOptions.portfolio_slider_transition_speed,10);var isHeaderCollapsed=false;var isSearchDisplayed=false;var width=parseInt($('.content-width').css('width').replace('px',''),10);var ua=navigator.userAgent.toLowerCase();var isAndroid=ua.indexOf("android")>-1;var androidversion=parseFloat(ua.slice(ua.indexOf('android')+8));renderGoogleMaps('all');initMobileMenu();runBackStretchJS();$(document).foundation();$('.row.outer-padding').each(function(){var rowWrapper=$('
');var columnWrapper=$('');$(this).append(columnWrapper.append(rowWrapper.append($(this).children('.columns'))));});$('.row.col-small-padding').each(function(){$(this).find('.uxb-col.columns').addClass('less-padding');});if($('#content-container').hasClass('no-header-image')){if((width>=768&&width<=959)||width>=960){$('#content-container').css('margin-top',Math.abs($('#no-header-image-wrapper').height()-$('#header-container').height()));}}
$('#menu-wrapper').css('display','block');$('input#submit, input[type="submit"], input[type="button"]').addClass('flat button');$('p:empty').remove();if($('.box .close').length>0){if($('.box .close').parent().prop('tagName').toLowerCase()==='p'){$('.box .close').unwrap();}}
$('.box').find('p:last-child').addClass('no-margin');var waitForFinalEvent=(function(){var timers={};return function(callback,ms,uniqueId){if(!uniqueId){uniqueId="Don't call this twice without a uniqueId";}
if(timers[uniqueId]){clearTimeout(timers[uniqueId]);}
timers[uniqueId]=setTimeout(callback,ms);};})();if(showScrollToTopButton){$.scrollUp({animation:'slide',topDistance:'1000',topSpeed:700,scrollText:'',animationInSpeed:700,animationOutSpeed:300,});$('#scrollUp').append('');}
function runBackStretchJS(){if($('#content-container .image-shortcode.stretch-image').length>0){$('#content-container .image-shortcode.stretch-image').each(function(){var originalImg=$(this);if(!originalImg.attr('src')){return;}
var originalImgAttr=$(this).prop('attributes');var containingColumn=originalImg.closest('.columns');var imageShortcodeContainer=originalImg.closest('.vc_single_image');containingColumn.backstretch(originalImg.attr('src'));var backstretchContainer=containingColumn.find('.backstretch');imageShortcodeContainer.append(backstretchContainer);var stretchedImg=backstretchContainer.children('img');$.each(originalImgAttr,function(){stretchedImg.attr(this.name,this.value);});var parentTag=originalImg.parent();if(parentTag.prop('tagName').toLowerCase()==='a'){if(width>=960||width<=479){backstretchContainer.append(parentTag.css({'position':'absolute','left':0,'width':'100%',}).append(stretchedImg));}else{backstretchContainer.append(parentTag.css({'position':'absolute','left':0,}).append(stretchedImg));}}
var caption=containingColumn.find('.image-caption');caption.appendTo(backstretchContainer);originalImg.remove();});}}
if($('.home-slider-item, #header-image').length>0){$('.home-slider-item, #header-image').each(function(){});}
function stretchHomeSliderImage(obj){var originalImg=$(obj).find('img');if(originalImg.length>0&&originalImg.attr('src')){var parentTag=$(obj);if(!$('.home-slider-item').hasClass('no-slide')){parentTag.backstretch(originalImg.attr('src'));var originalImgAttr=originalImg.prop('attributes');var alteredImg=parentTag.find('div.backstretch').find('img');$.each(originalImgAttr,function(){alteredImg.attr(obj.name,obj.value);});parentTag.find('div.backstretch').find('img').attr('alt',originalImg.attr('alt'));originalImg.remove();}}}
if($('#portfolio-item-images').length>0){$('#portfolio-item-images img').each(function(){var originalImg=$(this);var parentTag=$(this).parents('.single-portfolio-item');var anchorTagAttributes=$(this).parent('a').prop('attributes');if($(this).parent().prop('tagName').toLowerCase()==='a'){parentTag.backstretch(originalImg.attr('src'));var originalImgAttr=$(this).prop('attributes');var alteredImg=parentTag.find('div.backstretch').find('img');$.each(originalImgAttr,function(){alteredImg.attr(this.name,this.value);});var newAnchor=$('');$.each(anchorTagAttributes,function(){newAnchor.attr(this.name,this.value);});parentTag.find('div.backstretch').append(newAnchor.append(alteredImg));$(this).parent().remove();}else if($(this).parent().prop('tagName').toLowerCase()==='div'){parentTag.backstretch(originalImg.attr('src'));originalImg.remove();}});}
var animateObj={animate:'easeOutQuint',duration:600,};if($('.accordion').length>0){$('.accordion').each(function(){$(this).accordion({autoHeight:false,heightStyle:'content',collapsible:$(this).attr('data-collapsible')==='true'?true:false,animate:animateObj,active:parseInt($(this).attr('data-active-index'),10)});});}
if($('.toggle').length>0){$('.toggle').accordion({autoHeight:false,heightStyle:'content',collapsible:true,animate:animateObj,active:false,});if($('.toggle').hasClass('active')){$('.toggle.active').accordion({heightStyle:'content',autoHeight:false,collapsible:true,animate:animateObj,active:0,});$('body').scrollTop(0);}}
if($('#intro').length>0){if($('#intro').find('p').length===0){$('#intro').find('h1, h2').addClass('no-margin-bottom');}
if($('#intro').find('#intro-line').length===0){$('#intro').addClass('no-margin-bottom');}}
if($('html').hasClass('lt-ie9')){$('.auto').addClass('tabs').removeClass('auto').attr('data-section','tabs');}
$('.wpb_tabs_nav li a, .vc_tta-tab a, .vc_tta-panel .vc_tta-panel-heading a, .wpb_accordion_header').on('click',function(){if($(this).closest('.vc_tta-container').length>0){var panelBody=$($(this).attr('href')).find('.vc_tta-panel-body');$(panelBody).css('display','none').css('display','block');renderGoogleMaps($(panelBody).find('.google-map'));}else if($(this).closest('.wpb_accordion_section').length>0){var accContent=$(this).closest('.wpb_accordion_section').find('.wpb_accordion_content');$(accContent).css('display','none').css('display','block');renderGoogleMaps($(accContent).find('.google-map'));}else{var tabContent=$($(this).attr('href'));$(tabContent).css('display','none').css('display','block');renderGoogleMaps($(tabContent).find('.google-map'));}});var subs=$('ul.sf-menu').supersubs({minWidth:15,maxWidth:25,extraWidth:2});subs.superfish({animation:{opacity:'show',height:'show'},delay:150,speed:'fast'});if(autoFlipSubmenu){var menus=$('#root-menu > li');var menusCount=menus.length;var i=1;menus.each(function(){if((menusCount-i)<=1){$(this).find('ul').addClass('flip');}
i++;});}
$('#header-search-button').click(function(){if(!isSearchDisplayed){$('#header-search-input-wrapper').css('display','block').stop().animate({opacity:1},300);$('#header-search-button').addClass('cancel').find('i').removeClass().addClass('icon-reply');$('#header-search-input').focus();isSearchDisplayed=true;}else{$('#header-search-input-wrapper').stop().animate({opacity:0},300,function(){$(this).css('display','none');});$('#header-search-button').removeClass('cancel').find('i').removeClass().addClass('icon-search');isSearchDisplayed=false;}});if(useFixedHeader){$('#header-container').removeClass('no-fixed');$(window).bind('scroll',function(){var header=$('#header-container');var logo=$('#logo-wrapper');var search=$('#header-search');var topHeaderValue=0;if($(window).scrollTop()>150){if(width>959){if(!isHeaderCollapsed){if(!$('#header-container').hasClass('center')){if($('body').hasClass('admin-bar')){topHeaderValue=-56;}
header.stop().animate({top:topHeaderValue,},800,function(){search.css('right',-60).stop().animate({top:84});});logo.find('p').hide();if(logo.find('img').length>0){}else{logo.find('h1').css('fontSize',30);}
logo.css({paddingBottom:0,});logo.stop().animate({bottom:0,});}else{topHeaderValue=-12;if($('body').hasClass('admin-bar')){topHeaderValue=16;}
header.stop().animate({top:topHeaderValue,},800);search.stop().animate({top:12},800);logo.find('p').hide();if(logo.find('img').length>0){}else{logo.find('h1').css('fontSize',30);}
logo.css({paddingBottom:0,});logo.stop().animate({bottom:0,});}
$('#header-search-input').addClass('small');isHeaderCollapsed=true;}}else{if(width>=768){if(!isHeaderCollapsed){topHeaderValue=-12;if($('body').hasClass('admin-bar')){topHeaderValue=16;}
header.stop().animate({top:topHeaderValue,},800);search.stop().animate({top:12},800);logo.find('p').hide();if(logo.find('img').length>0){}else{logo.find('h1').css('fontSize',30);}
logo.css({paddingBottom:0,});logo.stop().animate({bottom:0,});$('#header-search-input').addClass('small');isHeaderCollapsed=true;}}}
$(header).addClass('collapsed-header');}else{topHeaderValue=0;if($('body').hasClass('admin-bar')){topHeaderValue=28;}
header.stop().animate({top:topHeaderValue,});if(logo.find('img').length>0){logo.find('img').removeAttr('style');}else{logo.find('h1').removeAttr('style');}
logo.css({paddingBottom:0,});logo.find('p').show();search.stop().animate({top:0},function(){$(this).animate({'right':0});});$('#header-search-input').removeClass('small');isHeaderCollapsed=false;$(header).removeClass('collapsed-header');}});}else{$('#header-container').addClass('no-fixed');}
if(jQuery().carouFredSel){if($('#home-slider').length>0){if($('#home-slider').find('.home-slider-item').hasClass('no-slide')){homeSliderAutoAnimated=false;}
$('#home-slider').imagesLoaded(function(){$('#home-slider').carouFredSel({responsive:true,swipe:true,width:'100%',onCreate:function(){$('#home-slider .home-slider-item').each(function(){var originalImg=$(this).children('img');if(originalImg.length>0&&originalImg.attr('src')){var finalPath=originalImg.attr('src');$(this).css('background-image','url("'+finalPath+'")');originalImg.remove();}});$('#home-slider .home-slider-item').stop().animate({opacity:1},800,function(){$('.slider-caption').stop().animate({opacity:1});});$('#slider-controller').stop().animate({opacity:1},800);},scroll:{fx:homeSliderAnimation,duration:homeSliderAnimationSpeed,},auto:{play:homeSliderAutoAnimated,pauseOnHover:'resume',timeoutDuration:homeSliderAutoAnimatedDelay,},prev:{button:'#slider-prev',},next:{button:'#slider-next',},},{transition:true,});});}}
if($('#header-image').length>0){$('#header-image').imagesLoaded(function(){var originalImg=$('#header-image').children('img');if(originalImg.length>0&&originalImg.attr('src')){var finalPath=originalImg.attr('src');$('#header-image').css('background-image','url("'+finalPath+'")');originalImg.remove();$('#header-image').stop().animate({opacity:1,},800);}});}
if(jQuery().isotope){var container=$('.portfolio-wrapper');if(container.length>0){$(container).imagesLoaded(function(){$(container).isotope({itemSelector:'.portfolio-item',});$(container).parents('.portfolio-root-wrapper').find('.loading-text').css('display','none');$(container).parents(".portfolio-loaded-wrapper").stop().animate({"opacity":1,},800);});}}
if(jQuery().hoverdir){$('.portfolio-item').not('.fixed-box').each(function(){$(this).hoverdir({hoverDelay:75,selector:'.portfolio-item-hover',});});}
if(jQuery().carouFredSel){if($('#portfolio-item-images').length>0){$('#portfolio-item-images').imagesLoaded(function(){$('#portfolio-item-images').carouFredSel({responsive:true,swipe:true,onCreate:function(){$(this).find('.single-portfolio-item').stop().animate({opacity:1},800);$('#portfolio-item-images-controller').stop().animate({opacity:1},800);},scroll:{fx:portfolioImageSliderAnimation,duration:portfolioImageSliderAnimationSpeed,},auto:{play:portfolioImageSliderAutoAnimated,pauseOnHover:'resume',timeoutDuration:portfolioImageSliderAutoAnimatedDelay,},prev:{button:'#portfolio-item-images-prev',},next:{button:'#portfolio-item-images-next',},},{transition:true,});});}}
$('.portfolio-root-wrapper').each(function(){$(this).closest('.row').css('background','none');});renderTestimonials($('.testimonial-list'));if(jQuery().carouFredSel){if($('.image-slider').length>0){$('.image-slider').each(function(){var $currentSlider=$(this);var autoRotate=$currentSlider.attr('data-auto-rotation'),imageSliderAutoAnimated=true,imageSliderAutoAnimatedDelay=10000;if(autoRotate!=='disabled'){imageSliderAutoAnimatedDelay=parseInt(autoRotate,10)*1000;}else{imageSliderAutoAnimated=false;}
$currentSlider.imagesLoaded(function(){$currentSlider.carouFredSel({responsive:true,swipe:true,onCreate:function(){$currentSlider.css('height','auto');$currentSlider.parents('.image-slider-wrapper').find('.image-slider-item').stop().animate({opacity:1},800);$currentSlider.parents('.image-slider-wrapper').find('.image-slider-controller').stop().animate({opacity:1},800);},scroll:{fx:imageSliderAnimation,duration:imageSliderAnimationSpeed,},auto:{play:imageSliderAutoAnimated,pauseOnHover:'resume',timeoutDuration:imageSliderAutoAnimatedDelay,},prev:{button:$currentSlider.parent().find('.image-slider-prev'),},next:{button:$currentSlider.parent().find('.image-slider-next'),},},{transition:true,});});});}}
var enableLightbox=Boolean(ThemeOptions.enable_lightbox_wp_gallery);if(enableLightbox){registerFancyBoxToWPGallery();registerFancyBoxToWPImage();callFancyBoxScript();}
function registerFancyBoxToWPGallery(){var $wpGallery=$('.gallery');$wpGallery.each(function(){var mainId=$(this).attr('id');var items=$(this).find('.gallery-item').find('a');items.each(function(){var href=$(this).attr('href');if(href.toLowerCase().indexOf('.jpg')>=0||href.toLowerCase().indexOf('.jpeg')>=0||href.toLowerCase().indexOf('.png')>=0||href.toLowerCase().indexOf('.gif')>=0){$(this).addClass('image-box');$(this).attr('rel',mainId);}});});}
function registerFancyBoxToWPImage(){$('img[class*="wp-image-"]').each(function(){var $parentAnchor=$(this).closest('a');if($parentAnchor.length>0){var href=$parentAnchor.attr('href');if(href.toLowerCase().indexOf('.jpg')>=0||href.toLowerCase().indexOf('.jpeg')>=0||href.toLowerCase().indexOf('.png')>=0||href.toLowerCase().indexOf('.gif')>=0){$parentAnchor.addClass('image-box');}}});}
function callFancyBoxScript(){if(jQuery().fancybox){$('#content-container a').each(function(){if($(this).hasClass('prettyphoto')&&!$(this).parent().hasClass('post-title')){$(this).removeClass('prettyphoto').addClass('image-box');$(this).attr('rel',$(this).attr('rel').replace('prettyPhoto[','').replace(']',''));};});if(isAndroid&&androidversion<=4.0){$('.image-box, .vc_gitem-zone a').not('.clone .image-box').fancybox();}else{$('.image-box, .vc_gitem-zone a').not('.clone .image-box').fancybox({helpers:{thumbs:{width:50,height:50},overlay:{locked:false,}},beforeLoad:function(){var captionText='';if($(this.element).closest('.image-slider-item').length>0){captionText=$(this.element).closest('.image-slider-item').find('.image-caption').text();}
if($(this.element).closest('.gallery-item-wrapper').length>0){captionText=$(this.element).closest('.gallery-item-wrapper').find('.image-caption').text();}
this.title=captionText;}});}}}
if($('.vc_grid-container-wrapper').length>0){$('.vc_grid-container-wrapper').each(function(){var $grid=$(this);if($grid.find('.vc_grid-container').attr('class').indexOf('media_grid')!=-1){var checkExist=setInterval(function(){if($grid.find('.vc_grid-loading').length==0){callFancyBoxScript();clearInterval(checkExist);}else{}},500);}});}
function renderTestimonials(testimonialList){if(jQuery().carouFredSel){if(testimonialList.length>0){testimonialList.each(function(){var autoRotate=$(this).attr('data-auto-rotation'),testimonialSliderAutoAnimated=true,testimonialSliderAutoAnimatedDelay=10000;if(autoRotate!=='disabled'){testimonialSliderAutoAnimatedDelay=parseInt(autoRotate,10)*1000;}else{testimonialSliderAutoAnimated=false;}
$(this).carouFredSel({responsive:true,swipe:true,onCreate:function(){$(this).parents('.testimonial-wrapper').find('.testimonial-inner').stop().animate({opacity:1},800);$(this).parents('.testimonial-wrapper').find('.testimonial-bullets').stop().animate({opacity:1},800);},pagination:{container:$(this).parent().parent().find('.testimonial-bullets'),anchorBuilder:function(nr){return'';}},scroll:{fx:'crossfade',duration:testimonialSliderAnimationSpeed,},auto:{play:testimonialSliderAutoAnimated,pauseOnHover:'resume',timeoutDuration:testimonialSliderAutoAnimatedDelay,},},{transition:true,});});}}}
function renderGoogleMaps(mapSelector){if(typeof google!=='undefined'&&typeof google.maps!=='undefined'&&typeof google.maps.MapTypeId!=='undefined'){var elements=$('.google-map');if(mapSelector!='all'){elements=mapSelector;}
elements.each(function(){var rawlatlng=$(this).attr('data-latlng').split(',');var lat=jQuery.trim(rawlatlng[0]);var lng=jQuery.trim(rawlatlng[1]);var address=$(this).attr('data-address');var displayType=$(this).attr('data-display-type');var zoomLevel=parseInt($(this).attr('data-zoom-level'),10);$(this).css('height',$(this).attr('data-height'));switch(displayType.toUpperCase()){case'ROADMAP':displayType=google.maps.MapTypeId.ROADMAP;break;case'SATELLITE':displayType=google.maps.MapTypeId.SATELLITE;break;case'HYBRID':displayType=google.maps.MapTypeId.HYBRID;break;case'TERRAIN':displayType=google.maps.MapTypeId.TERRAIN;break;default:displayType=google.maps.MapTypeId.ROADMAP;break;}
var geocoder=new google.maps.Geocoder();var latlng=new google.maps.LatLng(lat,lng);var myOptions={scrollwheel:false,zoom:zoomLevel,center:latlng,mapTypeId:displayType};var map=new google.maps.Map($(this)[0],myOptions);geocoder.geocode({'address':address,'latLng':latlng,},function(results,status){if(status===google.maps.GeocoderStatus.OK){var marker;if(jQuery.trim(address).length>0){marker=new google.maps.Marker({map:map,position:results[0].geometry.location});map.setCenter(results[0].geometry.location);}else{marker=new google.maps.Marker({map:map,position:latlng});marker.setPosition(latlng);map.setCenter(latlng);}}else{window.alert("Geocode was not successful for the following reason: "+status);}});});}}
function initMobileMenu(){var mobileMenuList=$('').appendTo($('#mobile-menu .top-bar-section'));var clonedList=$('#root-menu > li').clone();clonedList=getGeneratedSubmenu(clonedList);clonedList.appendTo(mobileMenuList);}
function getGeneratedSubmenu(list){list.each(function(){if($(this).find('ul').length>0){var submenu=$(this).find('ul');$(this).addClass('has-dropdown');submenu.addClass('dropdown');getGeneratedSubmenu(submenu.find('li'));}});return list;}
$(window).resize(function(){});});;!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);;function vc_js(){vc_toggleBehaviour(),vc_tabsBehaviour(),vc_accordionBehaviour(),vc_teaserGrid(),vc_carouselBehaviour(),vc_slidersBehaviour(),vc_prettyPhoto(),vc_googleplus(),vc_pinterest(),vc_progress_bar(),vc_plugin_flexslider(),vc_google_fonts(),vc_gridBehaviour(),vc_rowBehaviour(),vc_ttaActivation(),jQuery(document).trigger("vc_js"),window.setTimeout(vc_waypoints,500)}function getSizeName(){var screen_w=jQuery(window).width();return screen_w>1170?"desktop_wide":screen_w>960&&1169>screen_w?"desktop":screen_w>768&&959>screen_w?"tablet":screen_w>300&&767>screen_w?"mobile":300>screen_w?"mobile_portrait":""}function loadScript(url,$obj,callback){var script=document.createElement("script");script.type="text/javascript",script.readyState&&(script.onreadystatechange=function(){("loaded"===script.readyState||"complete"===script.readyState)&&(script.onreadystatechange=null,callback())}),script.src=url,$obj.get(0).appendChild(script)}function vc_ttaActivation(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var $=window.jQuery,ui={};ui.newPanel=$(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,ui)})}function vc_accordionActivate(event,ui){if(ui.newPanel.length&&ui.newHeader.length){var $pie_charts=ui.newPanel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=ui.newPanel.find(".vc_round-chart"),$line_charts=ui.newPanel.find(".vc_line-chart"),$carousel=ui.newPanel.find('[data-ride="vc_carousel"]');"undefined"!=typeof jQuery.fn.isotope&&ui.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),vc_carouselBehaviour(ui.newPanel),vc_plugin_flexslider(ui.newPanel),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),ui.newPanel.parents(".isotope").length&&ui.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}}function initVideoBackgrounds(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}function vc_initVideoBackgrounds(){jQuery(".vc_row").each(function(){var youtubeUrl,youtubeId,$row=jQuery(this);$row.data("vcVideoBg")?(youtubeUrl=$row.data("vcVideoBg"),youtubeId=vcExtractYoutubeId(youtubeUrl),youtubeId&&($row.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground($row,youtubeId)),jQuery(window).on("grid:items:added",function(event,$grid){$row.has($grid).length&&vcResizeVideoBackground($row)})):$row.find(".vc_video-bg").remove()})}function insertYoutubeVideoAsBackground($element,youtubeId,counter){if("undefined"==typeof YT.Player)return counter="undefined"==typeof counter?0:counter,counter>100?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground($element,youtubeId,counter++)},100);var $container=$element.prepend('').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}function vcResizeVideoBackground($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight(),ratio1=16,ratio2=9;ratio1/ratio2>containerW/containerH?(iframeW=containerH*(ratio1/ratio2),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px",iframeW+="px",iframeH+="px"):(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!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id?id[1]:!1}document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",function(){for(var prefix=["-webkit-","-moz-","-ms-","-o-",""],i=0;iparseInt(ver[1]);$call.each(function(index){var $tabs,interval=jQuery(this).attr("data-interval"),tabs_array=[];if($tabs=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(event,ui){wpb_prepare_tab_content(event,ui)},beforeActivate:function(event,ui){1!==ui.newPanel.index()&&ui.newPanel.find(".vc_pie_chart:not(.vc_ready)")},activate:function(event,ui){wpb_prepare_tab_content(event,ui)}}),interval&&interval>0)try{$tabs.tabs("rotate",1e3*interval)}catch(e){window.console&&window.console.log&&console.log(e)}jQuery(this).find(".wpb_tab").each(function(){tabs_array.push(this.id)}),jQuery(this).find(".wpb_tabs_nav li").click(function(e){return e.preventDefault(),old_version?$tabs.tabs("select",jQuery("a",this).attr("href")):$tabs.tabs("option","active",jQuery(this).index()),!1}),jQuery(this).find(".wpb_prev_slide a, .wpb_next_slide a").click(function(e){if(e.preventDefault(),old_version){var index=$tabs.tabs("option","selected");jQuery(this).parent().hasClass("wpb_next_slide")?index++:index--,0>index?index=$tabs.tabs("length")-1:index>=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)}else{var index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length;index=jQuery(this).parent().hasClass("wpb_next_slide")?index+1>=length?0:index+1:0>index-1?length-1:index-1,$tabs.tabs("option","active",index)}})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,$this=jQuery(this),active_tab=($this.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){"undefined"!=typeof jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:"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")})})}),"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(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0);var carousel_speed=(getColumnsCount(jQuery(this)),500);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});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).resize(function(){var before_resize=screen_size;screen_size=getSizeName(),before_resize!=screen_size&&window.setTimeout("location.reload()",20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderSpeed=800,sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:sliderSpeed,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){var url=location.href,hashtag=url.indexOf("#!prettyPhoto")?!0:!1;hashtag&&(location.hash="!")},social_tools:""})}catch(err){window.console&&window.console.log&&console.log(err)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){function fullWidthRow(){var $elements=$('[data-vc-full-width="true"]');$.each($elements,function(key,item){var $el=$(this);$el.addClass("vc_hidden");var $el_full=$el.next(".vc_row-full-width");$el_full.length||($el_full=$el.parent().next(".vc_row-full-width"));var el_margin_left=parseInt($el.css("margin-left"),10),el_margin_right=parseInt($el.css("margin-right"),10),offset=0-$el_full.offset().left-el_margin_left,width=$(window).width();if($el.css({position:"relative",left:offset,"box-sizing":"border-box",width:$(window).width()}),!$el.data("vcStretchContent")){var padding=-1*offset;0>padding&&(padding=0);var paddingRight=width-padding-$el_full.width()+el_margin_left+el_margin_right;0>paddingRight&&(paddingRight=0),$el.css({"padding-left":padding+"px","padding-right":paddingRight+"px"})}$el.attr("data-vc-full-width-init","true"),$el.removeClass("vc_hidden")}),$(document).trigger("vc-full-width-row",$elements)}function parallaxRow(){var vcSkrollrOptions,callSkrollInit=!1;return window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSpeed,skrollrSize,skrollrStart,skrollrEnd,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),$parallaxElement=$("").addClass("vc_parallax-inner").appendTo($(this)),$parallaxElement.height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),youtubeId=vcExtractYoutubeId(parallaxImage),youtubeId?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):"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+"%;")}),callSkrollInit&&window.skrollr?(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll):!1}function fullHeightRow(){var $element=$(".vc_row-o-full-height:first");if($element.length){var $window,windowHeight,offsetTop,fullHeight;$window=$(window),windowHeight=$window.height(),offsetTop=$element.offset().top,windowHeight>offsetTop&&(fullHeight=100-offsetTop/(windowHeight/100),$element.css("min-height",fullHeight+"vh"))}$(document).trigger("vc-full-height-row",$element)}function fixIeFlexbox(){var ua=window.navigator.userAgent,msie=ua.indexOf("MSIE ");(msie>0||navigator.userAgent.match(/Trident.*rv\:11\./))&&$(".vc_row-o-full-height").each(function(){"flex"===$(this).css("display")&&$(this).wrap('')})}var $=window.jQuery;$(window).off("resize.vcRowBehaviour").on("resize.vcRowBehaviour",fullWidthRow).on("resize.vcRowBehaviour",fullHeightRow),fullWidthRow(),fullHeightRow(),fixIeFlexbox(),vc_initVideoBackgrounds(),parallaxRow()}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(event,ui){var $ui_panel,$google_maps,panel=ui.panel||ui.newPanel,$pie_charts=panel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=panel.find(".vc_round-chart"),$line_charts=panel.find(".vc_line-chart"),$carousel=panel.find('[data-ride="vc_carousel"]');if(vc_carouselBehaviour(),vc_plugin_flexslider(panel),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),panel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&panel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),$ui_panel=panel.find(".isotope, .wpb_image_grid_ul"),$google_maps=panel.find(".wpb_gmaps_widget"),0<$ui_panel.length&&$ui_panel.isotope("layout"),$google_maps.length&&!$google_maps.is(".map_ready")){var $frame=$google_maps.find("iframe");$frame.attr("src",$frame.attr("src")),$google_maps.addClass("map_ready")}panel.parents(".isotope").length&&panel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),jQuery(document).ready(function($){window.vc_js()});;(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);