!function(a){function b(){var b=a(".site-header-primary .main-header").outerHeight(),b=a(".site-header-two").outerHeight();a(".slicknav_nav").css("top",b)}function c(b){var c=b+" .header-navigation .menu-item-has-children > a";a(c).each(function(){var b=a(this).text();b+='',a(this).html(b)}),jQuery(document).on("click",c+" .triangle",function(b){b.preventDefault(),b.stopPropagation(),$parentLi=a(this).parent().parent("li"),$childLi=$parentLi.find("li"),$parentLi.hasClass("open")?($parentLi.removeClass("open"),$childLi.removeClass("open"),a(this).parent("a").next().slideUp(),a(this).parent("a").next().find("ul").slideUp()):($parentLi.addClass("open"),a(this).parent("a").next().slideDown())})}function d(){$notificationHight=a(".notification-bar").height(),$logo_selector=document.getElementById("headerLogo");var b=a(window).width();$logo_selector&&KORTEZ.fixed_nav&&KORTEZ.fixed_header_logo&&($mastheadHeight=782)&&($logo_selector.src=KORTEZ.separate_logo)):""!==KORTEZ.header_two_logo&&(KORTEZ.is_front_page||KORTEZ.overlay_post||KORTEZ.overlay_page)&&KORTEZ.is_header_two?$logo_selector.src=KORTEZ.header_two_logo:""!==KORTEZ.the_custom_logo?$logo_selector.src=KORTEZ.the_custom_logo:""!==KORTEZ.separate_logo&&a(".site-header .site-branding img").css("display","none")),$mastheadHeight>a(window).scrollTop()||0==a(window).scrollTop()?KORTEZ.fixed_nav&&a("#masthead.site-header").hasClass("sticky-header")&&(a("#masthead.site-header").removeClass("sticky-header"),KORTEZ.is_admin_bar_showing&&b>=782&&a(".fixed-header").css("marginTop",0),KORTEZ.is_admin_bar_showing&&b<=781&&a(".fixed-header").css("marginTop",0)):KORTEZ.fixed_nav&&!a("#masthead.site-header").hasClass("sticky-header")&&((!KORTEZ.mobile_fixed_nav_off||b>=782)&&a("#masthead.site-header").addClass("sticky-header").fadeIn(),KORTEZ.is_admin_bar_showing&&b>=782&&a(".fixed-header").css("marginTop",32),KORTEZ.is_admin_bar_showing&&b<=781&&a(".fixed-header").css("marginTop",46),KORTEZ.is_admin_bar_showing&&b<=600&&a(".fixed-header").css("marginTop",0),KORTEZ.mobile_fixed_nav_off&&b<=781&&a(".fixed-header").css("marginTop",0))}function e(){var b=a(window).width();KORTEZ.is_header_two&&(KORTEZ.is_admin_bar_showing&&b>=782&&a(".overlay-header").css("top",32),KORTEZ.is_admin_bar_showing&&b<=781&&a(".overlay-header").css("top",46))}$mastheadHeight=a("#masthead.site-header").height(),$stickymastheadHeight=a("#masthead .overlay-header").height(),jQuery(document).ready(function(){b(),c("#offcanvas-menu"),e(),a(document).on("click",".offcanvas-menu-toggler, .close-offcanvas-menu button, .offcanvas-overlay",function(b){b.preventDefault(),a("body").toggleClass("offcanvas-slide-open"),setTimeout(function(){a(".close-offcanvas-menu button").focus()},40)}),a(".close-offcanvas-menu button").click(function(){setTimeout(function(){a(".offcanvas-menu-toggler").focus()},50)}),jQuery("body").append('
'),jQuery(".offcanvas-menu-wrap .offcanvas-menu-inner").on("focusout",function(){var b=jQuery(this);setTimeout(function(){b.find(":focus").length||(jQuery(".offcanvas-menu-toggler").trigger("click"),a(".offcanvas-menu-toggler").focus())},0)}),jQuery(document).on("click",".search-icon, .close-button",function(){a(".header-search").toggleClass("search-in"),a(".header-search input").focus()}),jQuery(".header-search form").on("focusout",function(){var b=jQuery(this);setTimeout(function(){b.find(":focus").length||(jQuery(".search-icon").trigger("click"),a(".search-icon").focus())},0)}),a(".header-image-slider").slick({dots:!0,arrows:!0,adaptiveHeight:!1,fade:KORTEZ.header_image_slider.fade,speed:parseInt(KORTEZ.header_image_slider.fadeControl),cssEase:"linear",autoplay:KORTEZ.header_image_slider.autoplay,autoplaySpeed:KORTEZ.header_image_slider.autoplaySpeed,infinite:!0,prevArrow:a(".header-slider-prev"),nextArrow:a(".header-slider-next"),rows:0,appendDots:a(".header-slider-dots")}),a(".header-image-slider").attr("dir","ltr"),a("#primary-menu").slicknav({duration:500,closedSymbol:'',openedSymbol:'',appendTo:".mobile-menu-container",allowParentLinks:!0,nestedParentLinks:!1,label:KORTEZ.responsive_header_menu_text,closeOnClick:!0}),jQuery(".slicknav_menu .slicknav_nav").on("focusout",function(){var a=jQuery(this);setTimeout(function(){a.find(":focus").length||jQuery(".slicknav_open").trigger("click")},0)}),a(".site-header").hasClass("header-two")&&a(".home .section-banner .banner-content").css("marginTop",$stickymastheadHeight),KORTEZ.sticky_sidebar&&a(".content-area, .left-sidebar, .right-sidebar").theiaStickySidebar({additionalMarginTop:30}),jQuery(document).on("click","#back-to-top a",function(){return a("html, body").animate({scrollTop:0},800),!1})}),jQuery(window).on("resize",function(){b(),d(),e()}),jQuery(window).on("load",function(){a("#site-preloader").fadeOut(500),1==KORTEZ.enable_scroll_top&&a(window).scrollTop()>200?a("#back-to-top").fadeIn(200):a("#back-to-top").fadeOut(200),jQuery(".masonry-wrapper").length>0&&($grid=jQuery(".masonry-wrapper").masonry({itemSelector:".grid-post",isAnimated:!0})),infinite_count=0,a(document.body).on("post-load",function(){infinite_count+=1;var b="#infinite-view-"+infinite_count;a(b).hide(),a(a(b+" .grid-post")).each(function(){$items=a(this),$grid.append($items).masonry("appended",$items)}),setTimeout(function(){$grid.masonry("layout")},500)})}),jQuery(window).on("scroll",function(){d(),0==KORTEZ.disable_scroll_top&&a(window).scrollTop()>200?a("#back-to-top").fadeIn(200):a("#back-to-top").fadeOut(200)})}(jQuery);