;(function($){$(function(){var new_menu_breakpoint=1279;var very_first_load=true;var is_submenu_opened=false;var curSubSubMenu;var hovered_not_clicked=false;function returnToMain(){$('.CustomHeader-hideOnMobile').removeClass('CustomHeader-hideOnMobile');$('.CustomHeader-specialOnMobile').removeClass('CustomHeader-specialOnMobile');$('a.CustomHeader-returnToMain').addClass('CustomHeader-hideOnMobile');$('.CustomHeader-showOnMobile').removeClass('CustomHeader-showOnMobile');$('.CustomHeader-showSubSubMenuOnMobile').removeClass('CustomHeader-showSubSubMenuOnMobile');}
$('.CustomHeader .navbar-nav>li>.dropdown-menu>li>').removeClass('dropdown-menu');$('.CustomHeader .navbar-nav>li>.dropdown-menu>li>').addClass('CustomHeader-dropdownMenu');$(window).on('scroll',function(e){var wintop=$(window).scrollTop();if($(window).outerWidth()>new_menu_breakpoint){if(wintop>5){if(!$('.CustomHeader-parentRow').hasClass('CustomHeader-bgOnScroll')){$('.CustomHeader-parentRow').addClass('CustomHeader-bgOnScroll');}}else{$('.CustomHeader-parentRow').removeClass('CustomHeader-bgOnScroll');}}});$('.CustomHeader-navbarToggle').on("click",function(){if($(window).outerWidth()<=new_menu_breakpoint){$(this).toggleClass('CustomHeader-closeBut');$('.CustomHeader .navbar-nav > li').removeClass('CustomHeader-hideOnMobile');$('body').toggleClass('CustomHeader-overflowHidden');$('.CustomHeader-searchForm').toggleClass('CustomHeader-opacity1');$('.CustomHeader-searchForm').toggleClass('CustomHeader-pointerEvents');$('.CustomHeader .navbar-collapse').slideToggle(250,function(){});returnToMain();}});$('.CustomHeader ul.navbar-nav>li').on("mouseenter",function(){var displayVal="grid";var curentLi=$(this);$('.CustomHeader li').removeClass('open');curentLi.addClass('open');if($(window).outerWidth()>new_menu_breakpoint&&!$(".CustomHeader-searchBtn").hasClass('CustomHeader-searchBtnActive')){is_submenu_opened=false;setTimeout(function(){is_submenu_opened=false;},1000);$('.CustomHeader .dropdown-menu').each(function(){if($(this).parent()[0]!=curentLi[0]){$(this).css({'display':'none','opacity':'0'});}});displayVal="grid";if(curentLi.hasClass('CustomHeader-2subMenuLevels')){displayVal="block";}
$('.dropdown-menu',curentLi).css({'display':displayVal,'visibility':'visible'});if($(this).hasClass('menu-item-has-children')){$('.CustomHeader-submenuOverlay').css({'display':'block','visibility':'visible'});}else{$('.CustomHeader-submenuOverlay').css({'display':'none'});}
$('.dropdown-menu',curentLi).fadeTo(500,1,function(){});}});$('.CustomHeader .dropdown-menu').on("mouseleave",function(){if($(window).outerWidth()>new_menu_breakpoint&&!is_submenu_opened){$('.CustomHeader li').removeClass('open');$('.CustomHeader .dropdown-menu').css({'display':'none','opacity':'0'});$('.CustomHeader-submenuOverlay').css({'display':'none'});}});$('.CustomHeader-submenuOverlay').on("mouseenter",function(){if($(window).outerWidth()>new_menu_breakpoint&&!is_submenu_opened){$('.CustomHeader .dropdown-menu').css({'display':'none','opacity':'0'});$('.CustomHeader-submenuOverlay').css({'display':'none'});$('.CustomHeader li').removeClass('open');}});$('.CustomHeader-rightButtons').on("mouseenter",function(){$('.CustomHeader-submenuOverlay').mouseenter();});$('.CustomHeader-logo').on("mouseenter",function(){$('.CustomHeader-submenuOverlay').mouseenter();});if($(window).outerWidth()>new_menu_breakpoint){$('.CustomHeader li.CustomHeader-2subMenuLevels li.menu-item-has-children:first-of-type').addClass('activated');$('.CustomHeader li.CustomHeader-2subMenuLevels>ul.dropdown-menu').height($('.CustomHeader li.CustomHeader-2subMenuLevels li.menu-item-has-children:first-of-type>ul.CustomHeader-dropdownMenu').outerHeight());}
$('.CustomHeader li.CustomHeader-2subMenuLevels li.menu-item-has-children>a').on("click",function(e){if($(window).outerWidth()<=new_menu_breakpoint){e.preventDefault();}
var posX=$(this).position().left
var posY=$(this).position().top;var clickX=e.pageX-posX;var clickY=e.pageY-posY;var open_it=false;var the_url=e.target.href;var aria_expanded=$(this).attr('aria-expanded');if(the_url!=''&&the_url!='#'&&the_url!=undefined){open_it=true;}
if(hovered_not_clicked==true&&$(window).outerWidth()>new_menu_breakpoint){open_it=false;}
if($(window).outerWidth()<=new_menu_breakpoint){if(clickX>=($(window).outerWidth()-140)){open_it=false;}}
if(open_it){window.location=the_url;}else{if($(window).outerWidth()>new_menu_breakpoint){$('.CustomHeader li.CustomHeader-2subMenuLevels>ul.dropdown-menu>li.menu-item-has-children').removeClass('activated');$('ul.CustomHeader-dropdownMenu').css({'display':'none'});$(this).parent().addClass('activated');$('ul.CustomHeader-dropdownMenu',$(this).parent()).css({'display':'inline-grid','visibility':'visible'});curSubSubMenu=$('ul.CustomHeader-dropdownMenu',$(this).parent());setTimeout(function(){$('.CustomHeader li.CustomHeader-2subMenuLevels>ul.dropdown-menu').height(curSubSubMenu.outerHeight());},50);}else{$('ul.CustomHeader-dropdownMenu',$(this).parent()).toggleClass('CustomHeader-showSubSubMenuOnMobile');$(this).toggleClass('CustomHeader-activeSubSubMenuLinkOnMobile');}}});$('.CustomHeader li.CustomHeader-2subMenuLevels li.menu-item-has-children>a').on("mouseenter",function(e){if($(window).outerWidth()>new_menu_breakpoint){hovered_not_clicked=true;$(this).click();}});$('.CustomHeader li.CustomHeader-2subMenuLevels li.menu-item-has-children>a').on("mouseout",function(e){if($(window).outerWidth()>new_menu_breakpoint){hovered_not_clicked=false;}});$('.CustomHeader>.container-fluid>.navbar-collapse>ul.navbar-nav>li.menu-item-has-children>a').on("click",function(e){var open_it=false;var the_url=e.target.href;var posX=$(this).position().left
var posY=$(this).position().top;var clickX=e.pageX-posX;var clickY=e.pageY-posY;if($(window).outerWidth()<=new_menu_breakpoint){e.preventDefault();if(the_url!=''&&the_url!='#'&&the_url!=undefined){open_it=true;}
if(clickX>=($(window).outerWidth()-140)){open_it=false;}
if(open_it){window.location=the_url;}}});$('.CustomHeader>.container-fluid>.navbar-collapse>ul.navbar-nav>li.menu-item-has-children').on("click",function(e){if($(window).outerWidth()<=new_menu_breakpoint){$('.CustomHeader .navbar-nav > li').addClass('CustomHeader-hideOnMobile');$('.CustomHeader-searchForm').addClass('CustomHeader-hideOnMobile');$('a.CustomHeader-returnToMain').removeClass('CustomHeader-hideOnMobile');$(this).removeClass('CustomHeader-hideOnMobile');$('.dropdown-menu',$(this)).addClass('CustomHeader-showOnMobile');$('>a',$(this)).addClass('CustomHeader-specialOnMobile');}});$('.CustomHeader-returnToMain').on("click",function(e){returnToMain();});$('.CustomHeader-announcement--close').on("click",function(){$('.CustomHeader-announcement').slideUp();$('.OnPageNavigation').css({'marginTop':(-1)*$('.CustomHeader-announcement').height()-15+'px'});});$(".CustomHeader-searchBtn").on('click',function(e){$('.CustomHeader li').removeClass('open');$('.CustomHeader .dropdown-menu').css({'display':'none','opacity':'0'});$(this).toggleClass('CustomHeader-searchBtnActive');$('.CustomHeader-searchForm').toggleClass('CustomHeader-fadeInAnimClass');$('.CustomHeader-searchForm').toggleClass('CustomHeader-pointerEvents');document.getElementById("s").focus();});$(".CustomHeader-clearInput").on('click',function(e){$(".CustomHeader-searchInput").val('');});$(window).ready(function(){$('.CustomHeader .dropdown-menu  a').attr('title','');});$(window).on("resize",function(){if($(window).outerWidth()>new_menu_breakpoint){$('.CustomHeader .navbar-nav > li.menu-item-has-children').removeClass('open');$('body').removeClass('CustomHeader-overflowHidden');}else{$('.CustomHeader').removeClass('CustomHeader-bgOnScroll');}});$("#s").on('input',function(e){text=$(this).val();$("#_search_input").val(text);});});})(jQuery);(function($){FLThemeBuilderHeaderLayout={win:null,body:null,header:null,overlay:false,hasAdminBar:false,stickyOn:'',breakpointWidth:0,init:function(){var editing=$('html.fl-builder-edit').length,header=$('.fl-builder-content[data-type=header]'),menuModule=header.find('.fl-module-menu'),breakpoint=null;if(!editing&&header.length){header.imagesLoaded($.proxy(function(){this.win=$(window);this.body=$('body');this.header=header.eq(0);this.overlay=!!Number(header.attr('data-overlay'));this.hasAdminBar=!!$('body.admin-bar').length;this.stickyOn=this.header.data('sticky-on');breakpoint=this.header.data('sticky-breakpoint');if(''==this.stickyOn){if(typeof FLBuilderLayoutConfig.breakpoints[breakpoint]!==undefined){this.breakpointWidth=FLBuilderLayoutConfig.breakpoints[breakpoint];}
else{this.breakpointWidth=FLBuilderLayoutConfig.breakpoints.medium;}}
if(Number(header.attr('data-sticky'))){this.header.data('original-top',this.header.offset().top);this.win.on('resize',$.throttle(500,$.proxy(this._initSticky,this)));this._initSticky();}},this));}},_initSticky:function(e){var header=$('.fl-builder-content[data-type=header]'),windowSize=this.win.width(),makeSticky=false;makeSticky=this._makeWindowSticky(windowSize);if(makeSticky||(this.breakpointWidth>0&&windowSize>=this.breakpointWidth)){this.win.on('scroll.fl-theme-builder-header-sticky',$.proxy(this._doSticky,this));if(e&&'resize'===e.type){if(this.header.hasClass('fl-theme-builder-header-sticky')){this._doSticky(e);}
this._adjustStickyHeaderWidth();}
if(Number(header.attr('data-shrink'))){this.header.data('original-height',this.header.outerHeight());this.win.on('resize',$.throttle(500,$.proxy(this._initShrink,this)));this._initShrink();}
this._initFlyoutMenuFix(e);}else{this.win.off('scroll.fl-theme-builder-header-sticky');this.win.off('resize.fl-theme-builder-header-sticky');this.header.removeClass('fl-theme-builder-header-sticky');this.header.removeAttr('style');this.header.parent().css('padding-top','0');}},_makeWindowSticky:function(windowSize){var makeSticky=false;switch(this.stickyOn){case'xl':makeSticky=windowSize>FLBuilderLayoutConfig.breakpoints['large'];break;case'':case'desktop':makeSticky=windowSize>=FLBuilderLayoutConfig.breakpoints['medium'];break;case'desktop-medium':makeSticky=windowSize>FLBuilderLayoutConfig.breakpoints['small'];break;case'large':makeSticky=windowSize>FLBuilderLayoutConfig.breakpoints['medium']&&windowSize<=FLBuilderLayoutConfig.breakpoints['large'];break;case'large-medium':makeSticky=windowSize>FLBuilderLayoutConfig.breakpoints['small']&&windowSize<=FLBuilderLayoutConfig.breakpoints['large'];break;case'medium':makeSticky=(windowSize<=FLBuilderLayoutConfig.breakpoints['medium']&&windowSize>FLBuilderLayoutConfig.breakpoints['small']);break;case'medium-mobile':makeSticky=(windowSize<=FLBuilderLayoutConfig.breakpoints['medium']);break;case'mobile':makeSticky=(windowSize<=FLBuilderLayoutConfig.breakpoints['small']);break;case'all':makeSticky=true;break;}
return makeSticky;},_doSticky:function(e){var winTop=Math.floor(this.win.scrollTop()),headerTop=Math.floor(this.header.data('original-top')),hasStickyClass=this.header.hasClass('fl-theme-builder-header-sticky'),hasScrolledClass=this.header.hasClass('fl-theme-builder-header-scrolled'),beforeHeader=this.header.prevAll('.fl-builder-content'),bodyTopPadding=parseInt(jQuery('body').css('padding-top')),winBarHeight=$('#wpadminbar').length?$('#wpadminbar').outerHeight():0,headerHeight=0;if(isNaN(bodyTopPadding)){bodyTopPadding=0;}
if(this.hasAdminBar&&this.win.width()>600){winTop+=Math.floor(winBarHeight);}
if(winTop>headerTop){if(!hasStickyClass){if(e&&('scroll'===e.type||'smartscroll'===e.type)){this.header.addClass('fl-theme-builder-header-sticky');if(this.overlay&&beforeHeader.length){this.header.css('top',winBarHeight);}}
if(!this.overlay){this._adjustHeaderHeight();}}}
else if(hasStickyClass){this.header.removeClass('fl-theme-builder-header-sticky');this.header.removeAttr('style');this.header.parent().css('padding-top','0');}
this._adjustStickyHeaderWidth();if(winTop>headerTop){if(!hasScrolledClass){this.header.addClass('fl-theme-builder-header-scrolled');}}else if(hasScrolledClass){this.header.removeClass('fl-theme-builder-header-scrolled');}
this._flyoutMenuFix(e);},_initFlyoutMenuFix:function(e){var header=this.header,menuModule=header.closest('.fl-menu'),flyoutMenu=menuModule.find('.fl-menu-mobile-flyout'),isPushMenu=menuModule.hasClass('fl-menu-responsive-flyout-push')||menuModule.hasClass('fl-menu-responsive-flyout-push-opacity'),isOverlay=menuModule.hasClass('fl-menu-responsive-flyout-overlay'),flyoutPos=menuModule.hasClass('fl-flyout-right')?'right':'left',flyoutParent=header.parent().is('header')?header.parent().parent():header.parent();isFullWidth=this.win.width()===header.width(),flyoutLayout='',activePos=250,headerPos=0;if(!flyoutMenu.length){return;}
if(this.win.width()>header.parent().width()){headerPos=(this.win.width()-header.width())/ 2;}
if(isOverlay){activePos=headerPos;}
else if(isPushMenu){activePos=activePos+headerPos;}
flyoutMenu.data('activePos',activePos);if(isPushMenu){flyoutLayout='push-'+flyoutPos;}
else if(isOverlay){flyoutLayout='overlay-'+flyoutPos;}
if(isPushMenu&&!$('html').hasClass('fl-theme-builder-has-flyout-menu')){$('html').addClass('fl-theme-builder-has-flyout-menu');}
if(!flyoutParent.hasClass('fl-theme-builder-flyout-menu-'+flyoutLayout)){flyoutParent.addClass('fl-theme-builder-flyout-menu-'+flyoutLayout);}
if(!header.hasClass('fl-theme-builder-flyout-menu-overlay')&&isOverlay){header.addClass('fl-theme-builder-flyout-menu-overlay');}
if(!header.hasClass('fl-theme-builder-header-full-width')&&isFullWidth){header.addClass('fl-theme-builder-header-full-width');}
else if(!isFullWidth){header.removeClass('fl-theme-builder-header-full-width');}
menuModule.on('click','.fl-menu-mobile-toggle',$.proxy(function(event){if(menuModule.find('.fl-menu-mobile-toggle.fl-active').length){$('html').addClass('fl-theme-builder-flyout-menu-active');event.stopImmediatePropagation();}
else{$('html').removeClass('fl-theme-builder-flyout-menu-active');}
this._flyoutMenuFix(event);},this));},_flyoutMenuFix:function(e){var header=this.header,menuModule=$(e.target).closest('.fl-menu'),flyoutMenu=menuModule.find('.fl-menu-mobile-flyout'),flyoutPos=menuModule.hasClass('fl-flyout-right')?'right':'left',menuOpacity=menuModule.find('.fl-menu-mobile-opacity'),isScroll='undefined'!==typeof e&&'scroll'===e.handleObj.type,activePos='undefined'!==typeof flyoutMenu.data('activePos')?flyoutMenu.data('activePos'):0,headerPos=(this.win.width()-header.width())/ 2,inactivePos=headerPos>0?activePos+4:254;if(!flyoutMenu.length){return;}
if(this.overlay){return;}
if($('.fl-theme-builder-flyout-menu-active').length){if(isScroll&&!flyoutMenu.hasClass('fl-menu-disable-transition')){flyoutMenu.addClass('fl-menu-disable-transition');}
if(header.hasClass('fl-theme-builder-header-sticky')){if(!isScroll){setTimeout($.proxy(function(){flyoutMenu.css(flyoutPos,'-'+activePos+'px');},this),1);}
else{flyoutMenu.css(flyoutPos,'-'+activePos+'px');}}
else{flyoutMenu.css(flyoutPos,'0px');}}
else{if(flyoutMenu.hasClass('fl-menu-disable-transition')){flyoutMenu.removeClass('fl-menu-disable-transition');}
if(header.hasClass('fl-theme-builder-flyout-menu-overlay')&&headerPos>0&&headerPos<250){if(header.hasClass('fl-theme-builder-header-sticky')){inactivePos=headerPos+254;}
else{inactivePos=254;}}
if(e&&e.type==='resize'){inactivePos=headerPos+254;}
flyoutMenu.css(flyoutPos,'-'+inactivePos+'px');}
if(e&&menuModule.is('.fl-menu-responsive-flyout-overlay')&&$.infinitescroll){e.stopImmediatePropagation();}
if(menuOpacity.length){if(header.hasClass('fl-theme-builder-header-sticky')){if('0px'===menuOpacity.css('left')){menuOpacity.css('left','-'+headerPos+'px');}}
else{menuOpacity.css('left','');}}},_adjustStickyHeaderWidth:function(){if($('body').hasClass('fl-fixed-width')){var parentWidth=this.header.parent().width();if(this.win.width()>=992){this.header.css({'margin':'0 auto','max-width':parentWidth,});}
else{this.header.css({'margin':'','max-width':'',});}}},_adjustHeaderHeight:function(){var beforeHeader=this.header.prevAll('.fl-builder-content'),beforeHeaderHeight=0,beforeHeaderFix=0,headerHeight=Math.floor(this.header.outerHeight()),bodyTopPadding=parseInt($('body').css('padding-top')),wpAdminBarHeight=0,totalHeaderHeight=0;if(isNaN(bodyTopPadding)){bodyTopPadding=0;}
if(beforeHeader.length){$.each(beforeHeader,function(){beforeHeaderHeight+=Math.floor($(this).outerHeight());});beforeHeaderFix=2;}
if(this.hasAdminBar&&this.win.width()<=600){wpAdminBarHeight=Math.floor($('#wpadminbar').outerHeight());}
totalHeaderHeight=Math.floor(beforeHeaderHeight+headerHeight);if(headerHeight>0){var headerParent=this.header.parent(),headerParentTopPadding=0;if($(headerParent).is('body')){headerParentTopPadding=Math.floor(headerHeight-wpAdminBarHeight);}else{headerParentTopPadding=Math.floor(headerHeight-bodyTopPadding-wpAdminBarHeight);}
$(headerParent).css('padding-top',(headerParentTopPadding-beforeHeaderFix)+'px');this.header.css({'-webkit-transform':'translate(0px, -'+totalHeaderHeight+'px)','-ms-transform':'translate(0px, -'+totalHeaderHeight+'px)','transform':'translate(0px, -'+totalHeaderHeight+'px)'});}},_initShrink:function(e){if(this.win.width()>=this.breakpointWidth){this.win.on('scroll.fl-theme-builder-header-shrink',$.proxy(this._doShrink,this));this._setImageMaxHeight();if(this.win.scrollTop()>0){this._doShrink();}}else{this.header.parent().css('padding-top','0');this.win.off('scroll.fl-theme-builder-header-shrink');this._removeShrink();this._removeImageMaxHeight();}},_doShrink:function(e){var winTop=this.win.scrollTop(),headerTop=this.header.data('original-top'),headerHeight=this.header.data('original-height'),shrinkImageHeight=this.header.data('shrink-image-height'),windowSize=this.win.width(),makeSticky=this._makeWindowSticky(windowSize),hasClass=this.header.hasClass('fl-theme-builder-header-shrink');if(this.hasAdminBar){winTop+=32;}
if(makeSticky&&(winTop>headerTop+headerHeight)){if(!hasClass){this.header.addClass('fl-theme-builder-header-shrink');this.header.find('img').each(function(i){var image=$(this),maxMegaMenu=image.closest('.max-mega-menu').length,imageInLightbox=image.closest('.fl-button-lightbox-content').length,imageInNavMenu=image.closest('li.menu-item').length;if(!(imageInLightbox||imageInNavMenu||maxMegaMenu)){image.css('max-height',shrinkImageHeight);}});this.header.find('.fl-row-content-wrap').each(function(){var row=$(this);if(parseInt(row.css('padding-bottom'))>5){row.addClass('fl-theme-builder-header-shrink-row-bottom');}
if(parseInt(row.css('padding-top'))>5){row.addClass('fl-theme-builder-header-shrink-row-top');}});this.header.find('.fl-module-content').each(function(){var module=$(this);if(parseInt(module.css('margin-bottom'))>5){module.addClass('fl-theme-builder-header-shrink-module-bottom');}
if(parseInt(module.css('margin-top'))>5){module.addClass('fl-theme-builder-header-shrink-module-top');}});}}else if(hasClass){this.header.find('img').css('max-height','');this._removeShrink();}
if('undefined'===typeof(e)&&$('body').hasClass('fl-fixed-width')){if(!this.overlay){this._adjustHeaderHeight();}}},_removeShrink:function(){var rows=this.header.find('.fl-row-content-wrap'),modules=this.header.find('.fl-module-content');rows.removeClass('fl-theme-builder-header-shrink-row-bottom');rows.removeClass('fl-theme-builder-header-shrink-row-top');modules.removeClass('fl-theme-builder-header-shrink-module-bottom');modules.removeClass('fl-theme-builder-header-shrink-module-top');this.header.removeClass('fl-theme-builder-header-shrink');},_setImageMaxHeight:function(){var head=$('head'),stylesId='fl-header-styles-'+this.header.data('post-id'),styles='',images=this.header.find('.fl-module-content img');if($('#'+stylesId).length){return;}
images.each(function(i){var image=$(this),height=image.height(),node=image.closest('.fl-module').data('node'),className='fl-node-'+node+'-img-'+i,maxMegaMenu=image.closest('.max-mega-menu').length,imageInLightbox=image.closest('.fl-button-lightbox-content').length,imageInNavMenu=image.closest('li.menu-item').length;if(!(imageInLightbox||imageInNavMenu||maxMegaMenu)){image.addClass(className);styles+='.'+className+' { max-height: '+(height?height:image[0].height)+'px }';}});if(''!==styles){head.append('<style id="'+stylesId+'">'+styles+'</style>');}},_removeImageMaxHeight:function(){$('#fl-header-styles-'+this.header.data('post-id')).remove();},};$(function(){FLThemeBuilderHeaderLayout.init();});})(jQuery);;