!function(a){function b(a){this.markup=null,this.selector=null,this.fixed=!0,this.visible=!1,this.init=function(){if(this.valid()){void 0!==a&&void 0!==a.fixed&&(this.fixed=a.fixed),this.selector=a&&a.selector?a.selector:"#go-top",this.getMarkup();var b=this;if(jQuery("body").append(this.markup),this.fixed){jQuery(this.selector).hide();var c=jQuery(window).height();jQuery(window).scroll(function(){jQuery(window).scrollTop()>c-100?0==b.visible&&(jQuery(b.selector).fadeIn(),b.visible=!0):1==b.visible&&(jQuery(b.selector).fadeOut(),b.visible=!1)}),jQuery(this.selector).scrollTo()}}},this.getMarkup=function(){var b=this.fixed?"fixed":"absolute",c='style="position: '+b+'; z-index:999999; bottom: 20px; right: 20px;"',d="
Scroll To Top
';this.markup=a&&a.markup?a.markup:d},this.valid=function(){return!(a&&a.markup&&!a.selector)||(alert('Please provide selector. eg. { markup: "
", selector: "#scroll-top"}'),!1)}}function c(b){var c=b+" .menu-item-has-children > a";a(c).each(function(){var b=a(this).text();b+='',a(this).html(b)}),a(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(){var b,c=function(){a("body").hasClass("fixed-nav-active")||a("body").addClass("fixed-nav-active")},d=function(){a("body").hasClass("fixed-nav-active")&&a("body").removeClass("fixed-nav-active")},e=function(b){a("#fixed-header").css({top:b})},f=function(){a("#fixed-header").css({"margin-top":"0"})},g=function(){a("#fixed-header").css({"margin-top":"-100%"})},h=function(){b=a(".top-header").outerHeight()+a("#masthead").outerHeight(),e(b)},i=function(){var h=jQuery(document).scrollTop(),i=0,j=b+12,k=a(window).width();if(BUSINESSGRAVITY.is_admin_bar_showing&&k>=782&&(h+=32),j)j>=h?(i=j-jQuery(document).scrollTop(),d(),g()):BUSINESSGRAVITY.is_admin_bar_showing&&k>=782?(i=32,c(),f()):(c(),f());else{var l=a(".top-header, #masthead").outerHeight(),h=jQuery(document).scrollTop();l>=h?(i=BUSINESSGRAVITY.is_admin_bar_showing&&k>=782?32-h:-h,d(),g()):(i=BUSINESSGRAVITY.is_admin_bar_showing&&k>=782?32:0,c(),f())}e(i)};a(window).resize(function(){h(),i()}),h(),i(),a(window).scroll(i),jQuery(window).load(function(){h(),i()})}function e(){var b=a(".top-header").outerHeight(),c=a(".site-header-four").outerHeight();a(".site-header-four").css({top:b}),BUSINESSGRAVITY.is_admin_bar_showing&&a(".site-header-four").css({top:b+45}),a(".wrap-inner-banner .page-header, .block-slider .slide-inner").css({paddingTop:c})}function f(){a(".testimonial-carousel").owlCarousel({items:1,animateOut:"fadeOut",navContainer:".block-testimonial .controls",dotsContainer:"#testimonial-pager",responsiveClass:!0,responsive:{0:{items:1,nav:!0}},rtl:"1"==BUSINESSGRAVITY.is_rtl,loop:!1,dots:!0})}function g(){var a=parseInt(jQuery(".block-slider .slide-item").length);jQuery(".home-slider").owlCarousel({items:1,autoHeight:!1,autoHeightClass:"name",animateOut:"fadeOut",navContainer:".block-slider .controls",dotsContainer:"#kt-slide-pager",autoplay:BUSINESSGRAVITY.home_slider.autoplay,autoplayTimeout:parseInt(BUSINESSGRAVITY.home_slider.timeout),loop:a>1,rtl:"1"==BUSINESSGRAVITY.is_rtl})}function h(){var a=parseInt(jQuery(".block-highlight .slide-item").length);jQuery(".highlight-slider").owlCarousel({items:1,autoHeight:!1,autoHeightClass:"name",animateOut:"fadeOut",navContainer:".block-highlight .controls",margin:30,autoplay:BUSINESSGRAVITY.highlight.autoplay,loop:a>1,rtl:"1"==BUSINESSGRAVITY.is_rtl,responsive:{768:{items:3,nav:!0}}})}jQuery.fn.scrollTo=function(a){return jQuery(document).on("click",".scroll-to",function(b){b.preventDefault();var c=jQuery(this).attr("href");if(void 0!==c){a||(a=0);var d=jQuery(c).offset().top-a;jQuery("html, body").animate({scrollTop:d},800)}}),this},jQuery(document).on("added_to_cart",function(){$ele=a(".cart-icon .count");var b=$ele.text();$ele.text(parseInt(b)+1)}),jQuery(document).on("click",".top-header-right .search-icon",function(a){a.preventDefault(),jQuery("#search-form").toggleClass("search-slide")}),function(a){var b=function(){var b=0;return jQuery(a).height("auto"),jQuery(a).each(function(){jQuery(this).height()>b&&(b=jQuery(this).height())}),b},c=function(){var c=(jQuery(window).width(),b());jQuery(a).each(function(){jQuery(this).height(c)})};jQuery(document).ready(function(){c()}),jQuery(window).resize(function(){c()}),jQuery(window).load(function(){c()})}(".block-slider .slide-item"),jQuery(".kt-contact-form-area input, .kt-contact-form-area textarea").on("focus",function(){var a=jQuery(this).attr("id");jQuery('label[for="'+a+'"]').addClass("move")}),jQuery(".kt-contact-form-area input, .kt-contact-form-area textarea").on("blur",function(){var a=jQuery(this).attr("id");jQuery('label[for="'+a+'"]').removeClass("move")}),jQuery(document).ready(function(){d(),g(),e(),f(),h(),a(".scroll-to").scrollTo(),new b({markup:'',selector:"#go-top"}).init(),c("#offcanvas-menu"),a(document).on("click",".alt-menu-icon .offcanvas-menu-toggler, .close-offcanvas-menu a, .kt-offcanvas-overlay",function(b){b.preventDefault(),a("body").toggleClass("offcanvas-menu-open")}),jQuery("body").append('
'),jQuery(".masonry-wrapper").length>0&&($grid=jQuery(".masonry-wrapper").masonry({itemSelector:".masonry-grid",percentPosition:!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+" .masonry-grid")).each(function(){$items=a(this),$grid.append($items).masonry("appended",$items)}),setTimeout(function(){$grid.masonry("layout")},500)}),a("#masthead #s").attr("placeholder",BUSINESSGRAVITY.search_placeholder),a("#searchform #s").attr("placeholder",BUSINESSGRAVITY.search_default_placeholder)}),jQuery(window).load(function(){"undefined"!=typeof $grid&&($grid.masonry("reloadItems"),$grid.masonry("layout"))}),jQuery(window).load(function(){jQuery("#site-loader").fadeOut(500)}),jQuery(window).resize(function(){e()}),jQuery(document).ready(function(){body=jQuery(document.body),jQuery(window).on("load.BUSINESSGRAVITY resize.BUSINESSGRAVITY",function(){window.innerWidth<1200&&jQuery(".offcanvas-menu-inner, close-offcanvas-menu a").on("focusout",function(){var a=jQuery(this);setTimeout(function(){a.find(":focus").length||jQuery(".offcanvas-menu-toggler").trigger("click")},0)})})})}(jQuery);