/*!
 * jQuery RT Parallax Backgrounds
 * Author: RT-Themes
 * Copyright (C) RT-Themes
 */
!function(a,b,c){"use strict";function d(b,c){return this.settings=null,this.options=a.extend({},d.Defaults,c),this.$element=a(b),this.istouchDevice()&&this.ismobileDevice()?void this.$element.show():(this.refresh(),void this.initialize())}d.Defaults={speed_min:1.35},d.prototype.istouchDevice=function(){try{return c.createEvent("TouchEvent"),!0}catch(a){return!1}},d.prototype.ismobileDevice=function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?!0:void 0},d.prototype.initialize=function(){var a=this;a.win.on("resize refresh-rtprlx",function(){a.refresh(),a.parallax()}),a.parallax(),a.win.on("scroll.rtprlx",function(){a.parallax()}),a.$element.show()},d.prototype.parallax=function(){var a=this.winH+this.win.scrollTop()-this.itemTop,b=this.invisible_part/(this.winH+this.row_height),c=a>0&&this.itemBottom>this.win.scrollTop();if(c){var d=a*b;if("vertical"==this.effect){var e=1==this.direction?-1*d:-1*this.invisible_part+d;this.apply_css(0,e)}else{var f=1==this.direction?-1*d:-1*this.invisible_part+d;this.apply_css(f,0)}}},d.prototype.refresh=function(){this.row=this.options.parent_row?this.options.parent_row:this.$element.parents("div:eq(0)"),this.effect=this.$element.attr("data-rt-parallax-effect"),this.direction=this.$element.attr("data-rt-parallax-direction"),this.speed=Math.max(parseInt(this.$element.attr("data-rt-parallax-speed")),this.options.speed_min),this.row_height=this.row.outerHeight(),this.row_width=this.row.outerWidth(),this.holder_height="vertical"==this.effect?this.row_height*this.speed:this.row_height,this.holder_width="horizontal"==this.effect?this.row_width*this.speed:this.row_width+4,this.invisible_part="vertical"==this.effect?this.holder_height-this.row_height:this.holder_width-this.row_width,this.posTop=this.row.offset().top,this.itemBottom=this.posTop+this.row_height,this.itemTop=this.posTop,this.win=a(b),this.winH=a(b).height(),this.winW=a(b).width(),this.start_position=-1==this.direction?-1*this.invisible_part:0,this.$element.css({height:this.holder_height,width:this.holder_width+"px"}),"vertical"==this.effect?this.apply_css(0,this.start_position):this.apply_css(this.start_position,0)},d.prototype.apply_css=function(b,c){var d=a("body").hasClass("rtl");b=d?-1*b:b,this.$element.css({"-webkit-transform":"translate3d("+b+"px, "+c+"px,0)","-moz-transform":"translate3d("+b+"px, "+c+"px,0)","-ms-transform":"translate3d("+b+"px, "+c+"px,0)","-o-transform":"translate3d("+b+"px, "+c+"px,0)",transform:"translate3d("+b+"px, "+c+"px,0)"})},a.fn.rtprlx=function(b){return this.each(function(){a.data(this,"rtprlx")||a.data(this,"rtprlx",new d(this,b))})}}(jQuery,window,document),/*!
 * naturalife WordPress Theme Scripts
 * Copyright (C) 2017 RT-Themes
 * http://rtthemes.com
 *
 * various scripts file
 */
function($){"use strict";function rt_scroll_to(a,b){$("html, body").stop().animate({scrollTop:a},900,"swing",function(){window.location.hash=b,$("html,body").scrollTop(a)})}var is_rtl=$("body").hasClass("rtl"),window_width=$(window).width(),window_height=$(window).height();$("html").imagesLoaded({background:".has-bg-image, body, .slide-background"},function(){$(window).trigger("rt_images_loaded")}),$(window).on("rt_images_loaded",function(){"complete"===document.readyState?$(window).trigger("rt_loaded"):$(window).on("load",function(){$(window).trigger("rt_loaded")})}),$(document).ajaxComplete(function(){$(window).trigger("rt_ajax_complete")});var loading_lgoo_img=$(".loading-logo");loading_lgoo_img.waitForImages(function(){loading_lgoo_img.css({opacity:1})}),$("body").hasClass("rt-loading")&&$(window).scrollTop(0),$(window).on("rt_loaded",function(){$("body").hasClass("rt-loading")&&($("body").addClass("rt-loaded"),setTimeout(function(){$("#loader-wrapper").remove()},650)),setTimeout(function(){$("body").removeClass("rt-loading")},200)}),$.fn.rt_on_leave||($.fn.rt_on_leave=function(){$('a[href^="'+rtframework_params.home_url+'"]').on("click",function(a){if(!($.fn.is_mobile_menu()||$(this).attr("target")&&""!=$(this).attr("target")&&"_self"!==$(this).attr("target")||window.parent.location!==window.location)){var b=window.location.host+window.location.pathname+window.location.search,c=this.host+this.pathname+this.search,d=this.pathname.split("."),e=this.search;if(b!=c&&1!=e.indexOf("replytocom")&&("undefined"==typeof d[1]||"php"==typeof d[1]||"html"==typeof d[1])&&!(a.ctrlKey||a.shiftKey||a.metaKey||a.button&&1==a.button)){$("body").addClass("rt-leaving");var f=this.href;return window.location=f,!1}}})}),$(window).on("rt_loaded",function(){$("body").hasClass("rt-transition")&&$.fn.rt_on_leave()}),$(window).bind("pageshow",function(a){a.originalEvent.persisted&&$("body").hasClass("rt-transition")&&window.location.reload()}),$(window).resize(function(){$(this).width()!=window_width&&(window_width=$(this).width(),$(window).trigger("window_width_resize"))}),$(window).resize(function(){$(this).height()!=window_height&&(window_height=$(this).height(),$(window).trigger("window_height_resize"))}),$.fn.is_mobile_menu||($.fn.is_mobile_menu=function(){return Modernizr.mq("(max-width: 1024px)")}),$.fn.rt_sticky_header||($.fn.rt_sticky_header=function(){if(0!=$(this).length){var a=$(this),b=$("body"),c=$(".top-header").outerHeight(),d=$(".top-header").offset().top,e=$("#main-content > div:not(.sub-page-header):eq(0)").offset().top,e=c>e?c+d:e,f=($(".naturalife-top-bar").outerHeight(),0+$("#wpadminbar").outerHeight(),0),g=b.hasClass("sticky-header-style-1")?"down":"always",h="";a.length>0&&$(window).scroll(function(){if(!$.fn.is_mobile_menu()){{var a=$(window).scrollTop();b.hasClass("stuck")}if(!(0>a))return h=a>f?"down":"up",f=a,e+50>a?void b.removeClass("header-stuck  header-long-distance"):e+150>a?void b.removeClass("header-stuck"):"always"==g&&a>500?void b.addClass("header-stuck header-long-distance"):"up"==h&&a>500?void b.addClass("header-stuck header-long-distance"):"down"==h?void b.removeClass("header-stuck"):void 0}})}}),$(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addFilter("frontend/handlers/menu_anchor/scroll_top_distance",function(a){return!$.fn.is_mobile_menu()&&$("body").hasClass("sticky-header-style-2")?a-60:a})}),$(window).on("rt_loaded resize",function(){$(".sticky-header-holder").rt_sticky_header()}),$.fn.rt_sticky_mobile_header||($.fn.rt_sticky_mobile_header=function(){if($(window).width()>600)return void($(window).width()<1024&&($(".mobile-header-stuck").removeClass("mobile-header-stuck"),$(window).off("scroll.mobile-header")));var a=$(this);a.length>0&&$(window).on("scroll.mobile-header",function(){var b=$(window).scrollTop();if(!(0>b||b>200))return b>46?(a.addClass("mobile-header-stuck"),void $("body").removeClass("admin-bar")):100>b?(a.removeClass("mobile-header-stuck"),void $("body").addClass("admin-bar")):void 0})}),$(window).on("rt_loaded resize",function(){$(".admin-bar.sticky-mobile-header .mobile-header").rt_sticky_mobile_header()}),$.fn.rt_fixed_footers||($.fn.rt_fixed_footers=function(){function a(){$("body").removeClass("naturalife-fixed-footer-acitve"),b.css({"margin-bottom":""})}if(!($("body.elementor-editor-active").length>0||$(this).length<1)){var b=$("#main-content"),c=$("#footer"),d=c.outerHeight(!0);if(0!=c.length){if(Modernizr.touch)return void $("body").removeClass("naturalife-fixed-footer-acitve");if($("body").outerHeight()-$(window).height()<d)return void a();if($(window).height()-100<d)return void a();$("body").addClass("naturalife-fixed-footer-acitve"),b.css({"margin-bottom":d+"px"}),$(window).off("scroll.footer")}}}),$.fn.rt_fixed_footers&&$(window).on("rt_loaded",function(){$.fn.is_mobile_menu()||($(window).on("scroll.footer",function(){var a=$("#footer");0!=a.length&&a.offset().top-300<$(window).scrollTop()+$(window).outerHeight()&&$(".naturalife-fixed-footer").rt_fixed_footers()}),$(window).on("rt_ajax_complete resize",function(){setTimeout(function(){$(".naturalife-fixed-footer").rt_fixed_footers()},200)}))}),$.fn.rt_image_hover||($.fn.rt_image_hover=function(){$(this).each(function(){var a=$(this).find(".action-button");a.length>0||$(this).append('<span class="action-button"></span>')})}),$(window).on("resize load",function(){$(".imgeffect").rt_image_hover()}),$.fn.rt_image_overlays||($.fn.rt_image_overlays=function(){$(this).each(function(){var a=$(this).find("img"),b=a.width();0==b&&(b=a.attr("width")),0==b&&(b="auto"),$(this).css({"max-width":parseInt(b)})})}),$(window).on("resize load",function(a){"resize"==a.type&&$(".has-overlay, .imgeffect").css({"max-width":"100%"}),setTimeout(function(){$(".has-overlay, .imgeffect").rt_image_overlays()},300)}),$.fn.rt_calc_distance||($.fn.rt_calc_distance=function(a){var b=$("#wpadminbar").outerHeight(),c=$(".sticky-header .top-header"),d=a.offset().top,e=85,f=b;return a.offset().top>30&&c.length>0&&(f+=e),d-f}),$.fn.rt_one_page||($.fn.rt_one_page=function(){function a(){$(".main-menu > li.current-menu-item, .main-menu > li.current_page_item, .section-nav > li.current_page_item").removeClass("current-menu-item current_page_item")}if(window.location.hash){var b=$(window.location.hash);b.length>0&&$('.main-menu a[href*="'+window.location.hash+'"]').length>0&&!b.hasClass("vc_tta-panel vc_active")&&rt_scroll_to($.fn.rt_calc_distance(b),window.location.hash)}$(this).on("click",function(a){var b=window.location.host+window.location.pathname+window.location.search,c=this.host+this.pathname+this.search;if(b==c){if(a.preventDefault(),"#top"==this.hash)return void rt_scroll_to(0,"");if($("body").hasClass("elementor-page"))return;var d=$(this.hash);if(d.hasClass("hidden-element")&&(d=d.parents("*:eq(0)")),0==d.length)return void(window.location=this.href);rt_scroll_to($.fn.rt_calc_distance(d),this.hash)}}),$(this).each(function(){var b=$(this),c=this.hash,d=$(c);d.is(":visible")||(d=d.parents("*:eq(0)")),b.parent("li").removeClass("current-menu-item current_page_item"),d.appear(function(){a(),b.parent("li").addClass("current-menu-item current_page_item")},{accX:0,accY:-1*d.height()/2,one:!1})})}),$.fn.rt_one_page&&$(window).one("rt_loaded",function(){$($('.main-menu a[href*="#"]:not([href="#"]),.section-nav a[href*="#"]:not([href="#"]), .rt-scroll a[href*="#"]:not([href="#"]), a.rt-scroll[href*="#"]:not([href="#"])')).rt_one_page()}),$(".scroll").on("click",function(){return"#top"==this.hash?void rt_scroll_to(0,""):void($(this.hash).length<1||rt_scroll_to($.fn.rt_calc_distance($(this.hash)),this.hash))}),$.fn.rtframework_go_to_top||($.fn.rtframework_go_to_top=function(){var a=$(this);$(window).trigger("scroll"),$(window).on("scroll",function(){var b=$(this).scrollTop();(b>400||600>b)&&(b>400?a.addClass("visible"):a.removeClass("visible"))}),$(this).on("click",function(){rt_scroll_to(0,"")})}),$.fn.rtframework_go_to_top&&$(".go-to-top").rtframework_go_to_top(),$.fn.rt_counter||($.fn.rt_counter=function(){$(this).each(function(){var a=$(this).find("> .number > span"),b=a.text();$(this).appear(function(){$({Counter:0}).animate({Counter:a.text()},{duration:1200,step:function(){a.text(Math.ceil(this.Counter))},complete:function(){a.text(b)}})},{accX:0,accY:-30})})}),$.fn.rt_counter&&$(window).one("rt_loaded",function(){$(".rt_counter").rt_counter()}),$.fn.rt_tables||($.fn.rt_tables=function(){function a(a){$(a).each(function(){var a=$(this).find(".start_position"),b=$(this).find(".table_wrap.features ul"),c=a.offset().top-$(this).offset().top;b.css("top",c)})}function b(a){var b;$(a).each(function(){b=[],$(this).find(".table_wrap.features li").each(function(){b.push($(this).html())})}),$(a).find(".table_wrap").each(function(a){if(""==$(this).hasClass("features")){var a=0;$(this).find("li").each(function(){"undefined"!=typeof b[a]&&$(this).prepend('<div class="d-lg-none">'+b[a]+"</div>"),a++})}})}$(this).each(function(){var c=$(this);$(window).bind("resize",c,function(){a(c)}),a(c),b(c)})}),$.fn.rt_tables&&$(".pricing_table.compare").rt_tables(),$.fn.rt_accordion||($.fn.rt_accordion=function(){$(this).each(function(){$(this).find(".toggle-content").hide(),$(this).find(".open .toggle-content").show(),$(this).find("ol li .toggle-head").on("click",function(){function a(){if($(window).scrollTop()>b.offset().top){setTimeout(function(){var a=$("#wpadminbar").outerHeight()+$(".top-header.stuck").outerHeight();rt_scroll_to(b.offset().top-a,"")},100)}}clearTimeout("accordion_timeout");var b=$(this).parent("li"),c=b.find(".toggle-content");b.hasClass("open")?(b.removeClass("open"),c.stop().slideUp(300)):($(this).parents("ol").find("li.open").removeClass("open").find(".toggle-content").stop().slideUp(300),b.addClass("open"),c.stop().slideDown(300,function(){a()}))})})}),$.fn.rt_accordion&&$(".rt-toggle").rt_accordion(),$.fn.rt_tabs||($.fn.rt_tabs=function(){$(this).each(function(){function a(){h.each(function(){$(this).removeClass("active")}),f.each(function(){$(this).removeClass("active")})}function b(a){var b=d.find('[data-tab-number="'+a+'"]'),e=d.find('[data-tab-content="'+a+'"]');b.addClass("active"),e.addClass("active"),c(a),$.fn.rt_customized_selects(e),e.find("span.customselect").remove(),e.find("select.hasCustomSelect").removeAttr("style"),$.fn.rt_customized_selects(e),767>window_width&&rt_scroll_to(e.offset().top,"")}function c(a){if("tab-position-2"==i){var b=d.find('[data-tab-content="'+a+'"]').outerHeight();e.css({"min-height":b+"px"})}}var d=$(this),e=$(this).find("> .tab_nav"),f=$(this).find("> .tab_nav > li"),g=$(this).find("> .tab_contents > .tab_content_wrapper > .tab_title"),h=$(this).find("> .tab_contents > .tab_content_wrapper"),i=$(this).attr("data-tab-position");c(1),g.on("click",function(){a(),b($(this).attr("data-tab-number"))}),f.on("click",function(){a(),b($(this).attr("data-tab-number"))})})}),$.fn.rt_tabs&&$(".rt_tabs").rt_tabs(),$.fn.rt_start_carousels=function(a){function b(){var a=$(".masonry-gallery");a.length>0&&setTimeout(function(){a.isotope("layout")},1e3)}function c(a,b){var c=$(window).height(),d=($("#wpadminbar").outerHeight(),a.offset().top),e=c-d;parseInt(b)>e||a.find(".has-bg-image,.slide-content-wrapper").each(function(){$(this).css({"min-height":e+"px"})})}$(".main-carousel").each(function(){var a="",b="",c=$(this).data("mobile-height"),d=$(this).data("tablet-height");a+="#"+$(this).attr("id")+" .item{min-height:"+c+"px !important;}",a+="#"+$(this).attr("id")+" .slide-background{height:"+c+"px !important;}",a+="#"+$(this).attr("id")+" .owl-nav div{top:"+c/2+"px !important;}",a+="#"+$(this).attr("id")+" .slide-content{margin-top:"+c+"px !important;}",$("<style>@media screen and (max-width: 475px) {"+a+"}</style>").prependTo($("body")),a="",$(this).find(".slide_heading").each(function(){b="heading-"+Math.floor(1e5*Math.random()+1),$(this).addClass(b),a+="."+b+"{font-size:"+$(this).data("mobile-value")+"px !important;}"}),$(this).find(".slide-text").each(function(){b="text-"+Math.floor(1e5*Math.random()+1),$(this).addClass(b),a+="."+b+"{font-size:"+$(this).data("mobile-value")+"px !important;}"}),$(this).find(".slide-background").each(function(){b="bg-"+Math.floor(1e5*Math.random()+1),$(this).addClass(b),a+="."+b+"{background-position:"+$(this).data("bgpos")+" !important;}"}),a+="#"+$(this).attr("id")+" .item{min-height:"+d+"px !important;}",a+="#"+$(this).attr("id")+" .slide-background{height:"+d+"px !important;}",a+="#"+$(this).attr("id")+" .owl-nav div{top:"+d/2+"px !important;}",a+="#"+$(this).attr("id")+" .slide-content{margin-top:"+d+"px !important;}",$("<style>@media screen and (max-width: 1024px) {"+a+"}</style>").prependTo($("body"))}),$(this).find(".rt-carousel:not(.manual-start)").each(function(){var d,e=""!==$(this).data("margin")&&"undefined"!=typeof $(this).data("margin")?$(this).data("margin"):15,f=""!==$(this).data("padding")&&"undefined"!=typeof $(this).data("padding")?$(this).data("padding"):0,g=$(this),h=g.data("min-height"),i=parseInt($(this).attr("data-item-width")),j="undefined"!=typeof $(this).data("tablet-item-width")&&""!=$(this).data("tablet-item-width")?parseInt($(this).attr("data-tablet-item-width")):1==i?1:2,k="undefined"!=typeof $(this).data("mobile-item-width")?parseInt($(this).attr("data-mobile-item-width")):1,l="true"==$(this).attr("data-nav")?!0:!1,m="true"==$(this).attr("data-dots")?!0:!1,n="true"==$(this).attr("data-thumbnails")?!0:!1,o=("true"==$(this).attr("data-boxed")?!0:!1,"true"==$(this).attr("data-fullheight")?!0:!1),p="undefined"!=typeof $(this).attr("data-timeout")?$(this).data("timeout"):5e3,q="undefined"!=$(this).data("autoplay")?$(this).data("autoplay"):!1,r="undefined"!=typeof $(this).data("loop")&&""!=$(this).data("loop")?!0:!1,s=$(this).attr("id"),t=g.hasClass("main-carousel");1==i&&0==f?(d=!0,e=0):(d=!1,e=e),j=j||1,k=k||1;var u=g.find(".owl-carousel");g.addClass("rt-carousel-loaded"),u.imagesLoaded({background:".has-bg-image"},function(d){if(1==d.images.length&&(l=m=!1),$(window).on("header_normal_pos",function(){u.trigger("carousel_header_style")}),u.on("initialized.owl.carousel changed.owl.carousel carousel_header_style",function(a){if(a.item)var b=$(this).find(".owl-item:eq("+a.item.index+")");else var b=$(this).find(".owl-item.active");if(t&&0!==b.length){var c=b.find("> .item").data("color-tone");void 0!==c&&""!=c&&(g.removeClass("dark-bg-tone light-bg-tone"),g.addClass(c+"-bg-tone"),1024>window_width||$(".top-header").hasClass("stuck")||u.parents(".elementor-top-section").last().is($(".overlapped-header .elementor-section-wrap > .elementor-top-section:first-child"))&&($("body.overlapped-header .dynamic-skin").removeClass("naturalife-dark-header naturalife-light-header"),$("body.overlapped-header .dynamic-skin").addClass("naturalife-"+c+"-header")))}}),u.on("changed.owl.carousel initialized.owl.carousel",function(a){n&&($("#"+s+"-thumbnails > a.active").removeClass("active"),$("#"+s+"-thumbnails > a:eq("+a.item.index+")").addClass("active"))}),$("#"+s+"-thumbnails > a").on("click dblclick",function(a){if("dblclick"==a.type)return void a.preventDefault();var b=$(this).data("href");u.trigger("to.owl.carousel",[b,300,!0])}),o&&(u.on("initialized.owl.carousel",function(){c(u,h)}),$(window).on("window_height_resize",function(){c(u,h),u.trigger("refresh.owl.carousel")})),t)var v=is_rtl?['<span class="ui-icon-right-arrow-1"></span>','<span class="ui-icon-left-arrow-1"></span>']:['<span class="ui-icon-left-arrow-1"></span>','<span class="ui-icon-right-arrow-1"></span>'];else var v=is_rtl?['<span class="ui-icon-angle-right"></span>','<span class="ui-icon-angle-left"></span>']:['<span class="ui-icon-angle-left"></span>','<span class=" ui-icon-angle-right"></span>'];u.owlCarousel({rtl:is_rtl?!0:!1,loop:r,autoplayTimeout:p,autoplay:q,autoplayHoverPause:!0,margin:e,responsiveClass:!0,URLhashListener:n,startPosition:"URLHash",autoplaySpeed:700,navSpeed:1==i?700:300,dotsSpeed:300,autoHeightClass:"owl-height",navText:l?v:"",animateOut:t?"fadeOut":!1,animateIn:t?"fadeIn":!1,rewind:t?!0:!1,responsive:{0:{items:k,nav:l,dots:m,autoHeight:1,dotsContainer:"#"+s+"-dots",stagePadding:0},768:{items:j,nav:l,dots:m,autoHeight:1,dotsContainer:"#"+s+"-dots",stagePadding:f/2},1025:{items:i,nav:l,dots:m,autoHeight:1,dotsContainer:"#"+s+"-dots",stagePadding:f,mouseDrag:t?!1:!0,autoplayHoverPause:!1}},onInitialized:a?a._onInitialized:b,onChanged:a?a._onChanged:"",onRefreshed:a?a._onRefreshed:"",onTranslated:b}),u.on("changed.owl.carousel",function(){r&&u.rt_lightbox("init")})})})},$("body").rt_start_carousels(),$(".rt_form .search-icon").on("click",function(){$(this).parents("form:eq(0)").submit()}),$(document.body).on("click",".naturalife-share-content a",function(a){if(!$(this).hasClass("icon-mail")){var b=window.open($(this).attr("data-url"),"name","height=400,width=400");null==b||"undefined"==typeof b?alert(rtframework_params.popup_blocker_message):b.focus(),a.preventDefault()}}),$(document.body).on("click",".social_share > span",function(){var a=$(this).next("ul");$.fn.rt_popup_on(".rt-popup-share");var b=$(".naturalife-share-content ul");b.replaceWith(a.clone())}),$.fn.rt_drop_down||($.fn.rt_drop_down=function(){if(!$.fn.is_mobile_menu()){var a=$(this);a.each(function(){var a=$(this).find(".menu-item-has-children"),b=0;if(a.each(function(){b=Math.max(b,$(this).data("depth"))}),is_rtl){var c=window_width-$(this).offset().left,d=$(this).offset().left,e=c+240*(b+1);c>d&&e>window_width&&$(this).addClass("o-direction")}else{var c=window_width-$(this).offset().left,d=$(this).offset().left,e=d+240*(b+1);d>c&&e>window_width&&$(this).addClass("o-direction")}$(this).addClass("submenu-loaded")})}}),$(".main-menu > li:not(.multicolumn).menu-item-has-children").rt_drop_down(),$.fn.rt_topbar_drop_down||($.fn.rt_topbar_drop_down=function(){if(!$.fn.is_mobile_menu()){var a=$(this);a.each(function(){var a=$(this).find(".menu-item-has-children"),b=0;a.each(function(){b=Math.max(b,$(this).parents("ul").length)}),is_rtl?0>$(this).offset().left-160*b&&$(this).addClass("o-direction"):window_width<$(this).offset().left+160*b&&$(this).addClass("o-direction")})}}),$(".top-bar-right .topbar-widget .menu > li.menu-item-has-children").rt_topbar_drop_down(),$(".main-menu .multicolumn > ul > li.menu-item-has-children > a").each(function(){if("#"==$(this).attr("href")||""==$(this).attr("href")){var a=$(this);$("<span>"+$(this).html()+"</span>").insertAfter(a),a.remove()}}),$.fn.rt_mega_menu||($.fn.rt_mega_menu=function(){if(0!==$(this).length){var a=$(this),b=$(".header-elements"),b=$(".header-elements").length>0?b:$(".main-menu-wrapper").parents(".elementor-row:eq(0)"),c=b[0].getBoundingClientRect().width-40;a.each(function(){var a=$(this),d=a.find("> ul"),e=a.data("col-size"),f=Math.min(310*e,c);if(!d.hasClass("multicolumn-holder")){$("<ul class='sub-menu multicolumn-holder' />").appendTo($(this));for(var g,h=Math.ceil(d.find("> li").length/e);(g=d.find("> li:lt("+h+")").remove()).length;)$("<li/>").append($("<ul class='sub-menu'/>").append(g)).appendTo($(this).find("> .multicolumn-holder"));d.remove(),d=a.find("> ul")}if($(this).addClass("submenu-loaded"),is_rtl){var i=a.outerWidth(),j=a.offset().left+i,k=Math.min(0,-1*(b.offset().left-(j-f))-20);if(d.css({width:f}),0==k)return;d.css({"margin-right":k})}else{var j=a.offset().left,k=Math.ceil(c+b.offset().left)-(j+f)+20;if(d.css({width:f}),k>0)return;d.css({"margin-left":parseFloat(k)})}})}});var rt_mega_menu=$(".main-menu > li.multicolumn.menu-item-has-children");$("#logo").waitForImages(function(){rt_mega_menu.rt_mega_menu()}),$(window).on("window_width_resize",function(){rt_mega_menu.rt_mega_menu()}),$(window).on("rt_loaded",function(){$(".rt-parallax-background:not(.rt-el-parallax)").rtprlx({})}),$(window).on("rt_loaded",function(){$(".rt-el-parallax-background").each(function(){var a=$(this).hasClass("elementor-column")?$(this).find(".elementor-column-wrap"):$(this),b=getComputedStyle(a[0]),c={1:[{effect:"horizontal",direction:"-1"}],2:[{effect:"horizontal",direction:"1"}],3:[{effect:"vertical",direction:"-1"}],4:[{effect:"vertical",direction:"1"}]};if($(this).data("settings")){var d=c[$(this).data("settings").rt_bg_parallax_effect],e=$('<div class="rt-parallax-background rt-el-parallax has-bg-image" data-rt-parallax-direction="'+d[0].direction+'" data-rt-parallax-effect="'+d[0].effect+'" data-rt-parallax-speed="'+$(this).data("settings").rt_bg_parallax_speed+'"/>');e.css({"background-attachment":b["background-attachment"],"background-blend":b["background-blend"],"background-clip":b["background-clip"],"background-color":b["background-color"],"background-image":b["background-image"],"background-origin":b["background-origin"],"background-position":b["background-position"],"background-repeat":b["background-repeat"],"background-size":b["background-size"],bottom:"0",height:"100%",position:"absolute",top:"0"}),a.find(">div:eq(0)").before(e),a.css({background:"none",overflow:"hidden"}),$(this).find(".rt-parallax-background").rtprlx({parent_row:$(this)})}})}),$(".load_more").on("click",function(a){a.preventDefault();var b=$(this),c=b.attr("data-listid"),d=parseInt(b.attr("data-page_count")),e=parseInt(b.attr("data-current_page"));b.attr("disabled","disabled"),1!=d&&(b.find("span.ui-icon-angle-down:first-child").removeClass("ui-icon-angle-down").addClass("ui-icon-spin1 animate-spin"),$.ajax({type:"POST",url:rtframework_params.ajax_url,data:{action:"rtframework_ajax_loader",atts:$(this).attr("data-atts"),wpml_lang:rtframework_params.wpml_lang,page:e+1},success:function(a){var f,g,h,a=$(a);g=$("#"+c),(g.hasClass("masonry-gallery")||g.hasClass("metro-gallery"))&&(h=!0),f=a.find(h?".rt-dynamic":"> div, > article"),imagesLoaded(a).on("done",function(){h?(g.isotope().append(f).isotope("appended",f),$(window).trigger("window_width_resize")):g.append(f),f.find(".imgeffect").rt_image_hover(),$(f).rt_lightbox("init"),f.rt_start_carousels({_onRefreshed:function(){h&&g.isotope("layout")}}),b.find(".animate-spin").removeClass("ui-icon-spin1 animate-spin").addClass("ui-icon-angle-down"),b.attr("data-page_count",d-1),b.attr("data-current_page",e+1),1>=d-1?b.attr("disabled","disabled").hide():b.removeAttr("disabled")})},error:function(a,b,c){console.log(c)}}))}),$.fn.rt_customized_selects||($.fn.rt_customized_selects=function(a){if($.isFunction($.fn.customSelect)){var b=".orderby, .widget .menu.dropdown-menu, .naturalife-custom-select";a?a.find(b).customSelect({customClass:"customselect"}):$(b).customSelect({customClass:"customselect"})}}),$(window).load(function(){$.fn.rt_customized_selects(),$(document).bind("gform_post_render",function(){$.fn.rt_customized_selects()})}),$.fn.rt_contact_form=function(){$(this).each(function(){var a=$(this);a.find(".submit").on("click",function(){var b=a.find(".loading"),c=!1;if(a.find(".required").each(function(){var a=$(this).prop("type")||$(this).prop("tagName").toLowerCase(),b=$(this).val();b&&("checkbox"!=a||$(this).attr("checked"))?$(this).removeClass("error"):($(this).addClass("error"),c=!0)}),!c){b.show();var d=$(a).serialize(),e=d+"&action=rt_ajax_contact_form";$.post(rtframework_params.ajax_url,e,function(c){var c=$(c);c.prependTo(a),b.hide()}),a.find(".info_box").remove()}})})},$(".validate_form").rt_contact_form(),$(document.body).on("click",".info_box .icon-cancel",function(){$(this).parent(".info_box").fadeOut()}),$.fn.rt_lightbox=function(){if($.fn.lightGallery){var a={selector:'a[data-rel^="rt_lightbox"]',hash:!1,downloadUrl:!1,loop:!1,thumbnail:!1,index:0};$(this).find(".rt_lightbox_gallery, .rt-gallery").lightGallery(a);var a={selector:"this",hash:!1,downloadUrl:!1,loop:!1,thumbnail:!1,index:0};$(this).find(".rt_lightbox").lightGallery(a),$(this).find(".rt_lightbox").on("click",function(a){return a.preventDefault(),!1})}},$(document).rt_lightbox("init"),$.rt_maps=function(a,b){var c=this;c.init=function(){b.length>0&&google.maps.event.addDomListener(window,"load",$.fn.rt_maps())},b.length>0&&c.init()},$.fn.rt_maps=function(a,b){var c=$(this).attr("id"),d=$('[data-scope="#'+c+'"]').attr("data-height");d>0&&$(this).css({height:d+"px"});var e={zoom:b,panControl:!0,zoomControl:!0,scaleControl:!0,streetViewControl:!1,overviewMapControl:!1,scrollwheel:!1,navigationControl:!0,center:new google.maps.LatLng(0,0),mapTypeId:google.maps.MapTypeId.ROADMAP},f=new google.maps.Map(document.getElementById(c),e),g=$('[data-scope="#'+c+'"]').attr("data-bw");if("undefined"!=typeof g&&""!=g){var h=[{stylers:[{hue:"#fff"},{saturation:-100},{lightness:0},{gamma:1}]}],i=new google.maps.StyledMapType(h,{name:"Styled Map"});f.mapTypes.set("map_style",i),f.setMapTypeId("map_style")}$.fn.setMarkers(f,a),$.fn.fixTabs(f,c,b),$.fn.fixAccordions(f,c,b)},$.fn.setMarkers=function(a,b){if(b.length>1)var c=new google.maps.LatLngBounds;else{var d=new google.maps.LatLng(b[0][1],b[0][2]);a.panTo(d)}for(var e=0;e<b.length;e++)if(b[e]instanceof Array){var f=b[e],g=new google.maps.LatLng(f[1],f[2]),h=new google.maps.Marker({position:g,map:a,animation:google.maps.Animation.DROP,draggable:!1,title:f[0]});$.fn.add_new_event(a,h,f[4]),b.length>1&&c.extend(g)}b.length>1&&a.fitBounds(c)},$.fn.add_new_event=function(a,b,c){if(c){var d=new google.maps.InfoWindow({content:c,maxWidth:300});google.maps.event.addListener(b,"click",function(){d.open(a,b)})}},$.fn.fixTabs=function(a,b,c){var d=$("#"+b).parents(".rt_tabs:eq(0)"),e=d.find("> .tab_nav > li"),f=d.find("> .tab_contents > .tab_content_wrapper > .tab_title");e.on("click",{map:a},function(){var b=a.getCenter();google.maps.event.trigger(a,"resize"),a.setZoom(c),a.setCenter(b)}),f.on("click",{map:a},function(){var b=a.getCenter();google.maps.event.trigger(a,"resize"),a.setZoom(c),a.setCenter(b)})},$.fn.fixAccordions=function(a,b,c){var d=$("#"+b).parents(".rt-toggle:eq(0) > ol > li");d.on("click",{map:a},function(){var b=a.getCenter();google.maps.event.trigger(a,"resize"),a.setZoom(c),a.setCenter(b)})},$.fn.rt_slider_position=function(){var a=$('#main-content > .content-row:first-child .main-carousel[data-parallax="true"], .elementor-row .main-carousel[data-parallax="true"]');if(0!=a.length&&!Modernizr.touchevents){var b=(Modernizr.touchevents?!1:!0,$("#wpadminbar").outerHeight()),c=a.offset().top,d=a.outerHeight(),e=c-b,f=a.find(".owl-stage-outer"),g=f.find(".slide-background"),h=$(window);$(window).on("scroll",function(){if(!(1024>window_width)){var a=h.scrollTop()-e;if(!(a>d)){var b=Math.max(0,a),c=parseInt(.2*b);420>b&&g.css({"-webkit-transform":"translate3d(0, "+c+"px, 0)","-moz-transform":"translate3d(0, "+c+"px, 0)","-ms-transform":"translate3d(0, "+c+"px, 0)","-o-transform":"translate3d(0, "+c+"px, 0)",transform:"translate3d(0, "+c+"px, 0)"}),b>220&&260>b&&f.addClass("scrolled"),220>b&&f.removeClass("scrolled")}}})}},$(window).on("rt_loaded resize",function(){$.fn.rt_slider_position()}),$.fn.rt_run_masonry_isotope=function(){$(this).each(function(){{var a=$(this);$('[data-list-id="'+$(this).attr("id")+'"]')}a.rt_fix_metro_layout();var b=function(){a.isotope({resizable:!1,itemSelector:".rt-dynamic",percentPosition:!0,layoutMode:"packery"})};b()})},$(window).on("rt_loaded window_width_resize",function(){$(".masonry, .masonry-gallery, .metro-gallery").rt_run_masonry_isotope()}),$.fn.rt_fix_metro_layout=function(){var a=$(this);if(a.hasClass("metro-gallery")){var b=a.width()/4,c=a.hasClass("nogaps")?0:15;a.find(".col").each(function(){if(window_width>1024)var a=$(this).hasClass("double-width")?"50%":"25%",d=$(this).hasClass("double-height")?2*(b-c):b-2*c;else if(1024>=window_width&&window_width>=768)var a=$(this).hasClass("double-width")?"100%":"50%",d=$(this).hasClass("double-height")?4*b+2*c:2*b;else var a="100%",d=$(this).hasClass("double-width")&&!$(this).hasClass("double-height")?2*b:4*b;$(this).css({flex:"0 0"+a,width:a,height:d});var e=$(this).innerHeight();$(this).find("img").css({height:e,width:"auto","max-width":"inherit","max-height":"inherit"})})}},$.fn.rt_filter_nav=function(){var a=$(this);$(this).each(function(){var b=$(this).find("a");b.on("click",function(){var b=$(this),c=$(this).attr("data-filter");if($("#"+a.data("list-id")).isotope({filter:c}),b.hasClass("active"))return!1;var d=b.parents(".filter_navigation ul");return d.find(".active").removeClass("active"),b.addClass("active"),!1})})},$(".filter-holder").rt_filter_nav(),$.fn.rt_font_resize=function(){$(this).each(function(){var a=$(this),b=a.data("maxfont-size"),c=a.data("minfont-size"),d=function(){var d=1;return d=1260>window_width?.85:d,d=1160>window_width?.75:d,d=960>window_width?.65:d,d=768>window_width?.6:d,d=560>window_width?.5:d,d=480>window_width?.4:d,d=300>window_width?.35:d,1==d?(a.css("font-size",b+"px"),!1):void a.css("font-size",Math.max(c,parseFloat(d*b))+"px")};d(),$(window).on("resize.rt_font_resize orientationchange.rt_font_resize",d)})},$("[data-maxfont-size]").rt_font_resize(),$.fn.rt_pie_carts=function(){$(this).appear(function(){var a=$(this).find("span.icon").length>0,b=Math.min(window_width-60,$(this).data("wsize"));$(this).find("span").css({"line-height":b+"px",width:b+"px"}),$(this).easyPieChart({barColor:$(this).data("barcolor"),trackColor:$(this).data("basecolor"),scaleColor:!1,lineCap:"butt",lineWidth:$(this).data("linewidth"),animate:1500,size:Math.min(window_width-60,$(this).data("wsize")),onStep:function(b,c,d){a||$(this.el).find(".percent").text(Math.round(d))}})},{accX:0,accY:-100})},$(window).one("rt_loaded",function(){$(".rt-pie-chart").rt_pie_carts()}),$.fn.rt_progress_bar=function(){$(this).each(function(){var a=$(this),b=a.find(".naturalife-progress-bar"),c=a.find(".naturalife-progress-title"),d=a.data("percent"),e=a.find(".naturalife-progress-desc span");c.width()+30>a.width()*d/100&&a.addClass("short-bar"),a.appear(function(){b.width(d+"%"),e.css(is_rtl?{right:d+"%"}:{left:d+"%"}),$({Counter:0}).animate({Counter:d},{duration:1200,step:function(){e.text(Math.ceil(this.Counter))},complete:function(){e.text(d)}})},{accX:0,accY:-30})})},$(window).one("rt_loaded",function(){$(".naturalife-progress-bar-holder").rt_progress_bar()}),$.fn.rt_anim=function(){$(this).each(function(){var a=$(this),b=(a.find("span"),a.find("span:first-child")),c=a.data("timeout");b.addClass("active");setInterval(function(){var c=a.find(".active"),d=c.next();0==d.length&&(d=b),c.removeClass("active"),d.addClass("active")},c)})},$(window).one("rt_loaded",function(){$(".rt-anim").rt_anim()}),$.fn.rt_bg_anim=function(){$(this).each(function(){function a(a){setTimeout(function(){h.css(a?{opacity:0,transform:"scale(1.5)",transition:"opacity 1s ease "+(d-1)+"s, transform "+2*d+"s"}:{transform:"scale(1.5)",transition:"transform "+2*d+"s"}),e=e==g?1:e+1,b.css({"background-image":"url("+f[e-1]+")"})},50)}var b=$(this),c=b.data("imgs"),d=b.data("timeout"),e=1,f=c.split(","),g=f.length,h=b.clone();h.appendTo(b);for(var i=[],j=0;j<f.length;j++){var k=new Image;k.src=f[e],i[j]=k}$(i).imagesLoaded().done(function(){b.appear(function(){if(1>=g)return void a(!1);a(!0);setInterval(function(){h.css({"background-image":"url("+f[e-1]+")",transform:"scale(1)",transition:"opacity 0s, transform 0s",opacity:1}),a(!0)},1e3*d)})})})},$(window).one("rt_loaded",function(){$(".rt-background-slider").rt_bg_anim()});var side_animation={};$.fn.rt_toggle_side_panel=function(){if($("body").toggleClass("naturalife-panel-on"),$("body").hasClass("naturalife-panel-on")){{setTimeout(function(){$(".naturalife-panel-contents > .animate").show().animate({opacity:1,top:0},400),$("naturalife-panel-holder").perfectScrollbar("update")},700)}$(document).on("keyup.rt_side_panel",function(a){return 27===a.keyCode?void $(window).trigger("rt_side_panel"):void 0})}else $(".naturalife-panel-contents > .animate").animate({opacity:0,top:"20px"},400,function(){$(this).hide()}),$(".naturalife-sidepanel-button").removeClass("active"),$(document).off("keyup.rt_side_panel")},$(window).on("rt_side_panel",function(){$.fn.rt_toggle_side_panel()}),$(window).on("rt_side_panel resize",function(){$("body").hasClass("naturalife-panel-on")&&$(".naturalife-panel-holder,.naturalife-panel-background").height($(window).height()<1024?"100vh":$(window).height())
}),$.fn.rt_side_panel_scrollbar=function(){$.fn.is_mobile_menu()||$('.naturalife-panel-holder:not(".ps-container")').perfectScrollbar({suppressScrollX:!0})},$(window).on("rt_loaded resize",function(){$.fn.rt_side_panel_scrollbar()}),$.fn.rtframework_side_menu_button=function(){$(this).on("click",function(a){a.preventDefault(),$(this).addClass("active"),$(".naturalife-panel-contents > .widget.woocommerce, .naturalife-panel-contents > .widget.rt_woocommerce_login").removeClass("animate"),$(".naturalife-panel-contents > *:not(.widget.woocommerce):not(.widget.rt_woocommerce_login)").addClass("animate"),$("body").hasClass("naturalife-panel-on")||$(window).trigger("rt_side_panel")})},$(".naturalife-sidepanel-button").rtframework_side_menu_button(),$(".naturalife-panel-close").on("click",function(){$("body").hasClass("naturalife-panel-on")&&$(window).trigger("rt_side_panel")}),$.fn.rtframework_cart_menu_button=function(){$(this).on("click",function(a){a.preventDefault(),$(".naturalife-panel-contents > *:not(.widget.woocommerce)").removeClass("animate"),$(".naturalife-panel-contents > .widget.woocommerce").addClass("animate"),$("body").hasClass("naturalife-panel-on")||$(window).trigger("rt_side_panel")})},$(".naturalife-cart-menu-button").rtframework_cart_menu_button(),$.fn.rtframework_user_menu_button=function(){$(this).on("click",function(a){a.preventDefault(),$(".naturalife-panel-contents > *:not(.widget.rt_woocommerce_login)").removeClass("animate"),$(".naturalife-panel-contents > .widget.rt_woocommerce_login").addClass("animate"),$("body").hasClass("naturalife-panel-on")||$(window).trigger("rt_side_panel")})},$(".naturalife-user-menu-button").rtframework_user_menu_button(),$.fn.rt_panel_menu||($.fn.rt_panel_menu=function(){$(this).on("click",function(a){var b=$(this).parent("li");if("#"==$(this).attr("href"))return a.preventDefault(),b.find(">ul").slideToggle(),void b.toggleClass("current-menu-item");if(is_rtl){if(!b.hasClass("menu-item-has-children")||a.pageX>65)return void $(".naturalife-sidepanel-button").trigger("click")}else if(!b.hasClass("menu-item-has-children")||window_width-((window_width-$(".naturalife-panel-contents .menu").width())/2+a.pageX)>55)return void $(".naturalife-sidepanel-button").trigger("click");return a.preventDefault(),b.find(">ul").slideToggle(),b.toggleClass("current-menu-item"),!1})}),$(window).on("load",function(){$(".naturalife-panel-contents .menu li").each(function(){$(this).hasClass("current-menu-ancestor")&&($(this).removeClass("current-menu-item current-menu-ancestor"),$(this).addClass("current-menu-item"))}).promise().done(function(){$(".naturalife-panel-contents .menu li a, .naturalife-panel-contents .menu li > span").rt_panel_menu()})}),$(".naturalife-panel-holder").after('<div id="content-overlay"></div>'),$("#content-overlay").on("touchstart click",function(a){a.preventDefault(),$("body").hasClass("naturalife-panel-on")&&$(window).trigger("rt_side_panel")}),$('<style>.naturalife-panel-on  #content-overlay{ cursor: url("'+rtframework_params.rttheme_template_dir+'/images/close.cur"), pointer;}</style>').appendTo($("head")),$.fn.rt_header_search_button=function(){$(this).on("click",function(a){a.preventDefault(),setTimeout(function(){$(".rt-popup-search .search").focus()},500),$.fn.rt_popup_on(".rt-popup-search")})},$(".naturalife-search-button").rt_header_search_button(),$.fn.rtframework_language_menu_button=function(){$(this).on("click",function(a){a.preventDefault(),$.fn.rt_popup_on(".rt-popup-languages")})},$(".naturalife-wpml-menu-button").rtframework_language_menu_button(),$.fn.rt_popup_on=function(a){$(a).toggleClass("active"),$(".rt-popup-content-wrapper").perfectScrollbar({suppressScrollX:!0}),$(document).on("keyup.rt_popup_esc",function(b){return 27===b.keyCode?void $.fn.rt_popup_off(a):void 0}),$(a).find(".rt-popup-close").on("click",function(){$.fn.rt_popup_off(a)})},$.fn.rt_popup_off=function(a){$(a).toggleClass("active"),$(document).off("keyup.rt_popup_esc"),$(a).find(".rt-popup-close").off("click")},$.fn.rt_add_to_cart||($.fn.rt_add_to_cart=function(){"undefined"!=typeof wc_cart_fragments_params&&$(".add_to_cart_button").on("click",function(){$(this).parent().addClass("clicked"),$("body").one("added_to_cart",function(){$(".naturalife-panel-contents > .widget_shopping_cart").css({opacity:0}),$(".naturalife-cart-menu-button").trigger("click"),setTimeout(function(){$(window).trigger("rt_fix_sticky_sidebar")},50)})})}),$.fn.rt_add_to_cart(),$(document.body).on("click",".quantity .rt-minus,.quantity .rt-plus",function(a){a.preventDefault();var b=$(this),c=b.hasClass("rt-plus"),d=b.parent().find(".qty"),e=parseInt(d.attr("step")),f=parseInt(d.attr("min")),g=parseInt(d.attr("max")),h=parseInt(d.attr("value")),i=0;i=c?h+e:h-e,i=f?Math.max(f,i):i,i=g?Math.min(g,i):i,i=Math.max(0,i),d.val(i),d.trigger("change")}),$.fn.rt_countdown||($.fn.rt_countdown=function(){$(this).each(function(){var a=$(this).attr("data-date"),b=$(this).html();return void 0===a?!0:($(this).countdown(a,function(a){$(this).html(a.strftime(b))}),void $(this).addClass("started"))})}),$(".rt-countdown").rt_countdown(),$(".woocommerce-MyAccount-navigation .is-active a").on("click touchstart",function(a){$(".woocommerce-MyAccount-navigation li").show("slow"),a.preventDefault()}),$("form .icon-submit").on("click",function(a){$(this).parents("form:eq(0)").submit(),a.preventDefault()}),$.fn.rt_rev_control||($.fn.rt_rev_control=function(action){$("body").hasClass("overlapped-header")&&$(".rev_slider_wrapper").each(function(){var $this=$(this);if($this.parents(".elementor-top-section").last().is($(".overlapped-header .elementor-section-wrap > .elementor-top-section:first-child"))){var id_array=$this.attr("id").split("_"),id=id_array[2],revapi=eval("revapi"+id);revapi.bind("revolution.slide.onchange",function(a,b){var c=$this.find(".tp-leftarrow.custom"),d=$this.find(".tp-rightarrow.custom"),e=b.currentslide.data("param1");""!=e&&($("body.overlapped-header .dynamic-skin").removeClass("naturalife-dark-header naturalife-light-header"),$("body.overlapped-header .dynamic-skin").addClass("naturalife-"+e+"-header"),$(".top-header").attr("data-color",e),c.removeClass("light dark").addClass(e),d.removeClass("light dark").addClass(e))}),revapi.bind("revolution.slide.onbeforeswap",function(a,b){var c=b.nextslide.data("param1");""!=c&&($.fn.is_mobile_menu()||$(".top-header").hasClass("stuck")||$("body.overlapped-header .dynamic-skin").css({opacity:.5}))}),revapi.bind("revolution.slide.onafterswap",function(a,b){var c=b.currentslide.data("param1");""!=c&&($.fn.is_mobile_menu()||$(".top-header").hasClass("stuck")||$("body.overlapped-header .dynamic-skin").css({opacity:1}))})}})}),$(window).on("load",function(){$.fn.rt_rev_control()}),$.fn.rt_category_tree||($.fn.rt_category_tree=function(){var a=$(this);a.find(".cat-item:has(.children)").addClass("has-children"),$("<span></span>").prependTo(a.find(".cat-item:has(.children)")),a.find(".cat-item:has(.children) > span").on("click",function(){var a=$(this).parent();(a.hasClass("current-cat")||a.hasClass("current-cat-ancestor"))&&(a.removeClass("current-cat current-cat-ancestor"),a.addClass("active")),a.toggleClass("active")})}),$(".rt-category-tree").rt_category_tree(),$(window).on("load resize",function(){setTimeout(function(){$(".rt-svg-background.bottom").each(function(){var a=(window.navigator.userAgent,$(this)),b=a.attr("width"),c=a.attr("height"),d=a.parent().width(),e=a.parent().height(),f=c*d/b;a.css({"padding-top":e-f+1+"px"})})},150)}),$.fn.rt_menu_touch_fix=function(){$(this).on("touchstart",function(a){a.preventDefault();{var b=$(this).parent("li");$(this).attr("href")}if(b.hasClass("hover"))return $(this).trigger("click"),!0;var c=$(this).parents("ul:eq(0)").find("> li.hover");return c.is($(this))||c.removeClass("hover"),b.addClass("hover"),!1})},Modernizr.touchevents&&$(".main-menu li:has(ul) > a").rt_menu_touch_fix(),$("#container").on("click",function(){return $(".main-menu .hover").removeClass("hover"),!0}),$.fn.rt_sticky_sidebar||($.fn.rt_sticky_sidebar=function(){var a=$(window);if(a.off("scroll.sidebar"),0!=$(this).length){if(Modernizr.touchevents||$.fn.is_mobile_menu())return void $(this).each(function(){$(this).find("> .column-inner").removeAttr("style")});var b="#wpadminbar, .header-stuck .sticky-header-holder";$(this).each(function(){var c=$(this).parent(),d=$(this),e=$(this).find("> .column-inner"),f=c.find(".content:eq(0) > .column-inner");e.removeAttr("style");var g=0,h=(d.offset().left,d.position().left,e.outerHeight()),i=d.outerHeight(),j=d.width(),k=e.position().top,l=d.offset().top,m=k+h+l-window_height;f.height()<h||i>h&&a.on("scroll.sidebar",function(){var c=a.scrollTop();if(h=e.outerHeight(),!$.fn.is_mobile_menu()){var f=25;if($(b).each(function(){f+=$(this).height()}),h>window_height){var n=i-h,o=c-m-g;if(o=Math.min(o,n),o=Math.max(o,g),g>=o)return e.removeAttr("style"),void d.removeClass("stuck");if(o==n)return e.css({position:"absolute",bottom:g+"px"}),void d.addClass("stuck");if(n>g)return e.css({position:"fixed",top:"auto",bottom:g+"px",width:j+"px"}),void d.addClass("stuck")}else{var p=c+f,q=i-(k+h)-g,r=-1*Math.min(0,l-p);if(r=Math.min(q,r),l-p>0)return e.removeAttr("style"),void d.removeClass("stuck");if(q==r)return e.css({position:"absolute",bottom:"auto",top:i-h-g+"px",width:j+"px"}),void d.addClass("stuck");if(0>l-p)return e.css({position:"fixed",top:f+g+"px",bottom:"auto",width:j+"px"}),void d.addClass("stuck")}}})})}}),$(window).on("rt_loaded resize rt_fix_sticky_sidebar",function(){$(".sticky-sidebar").rt_sticky_sidebar(),$(window).trigger("scroll")}),$(window).on("rt_ajax_complete",function(){setTimeout(function(){$(window).trigger("rt_fix_sticky_sidebar")},150)}),$(".wc-tabs > li").on("click load",function(){setTimeout(function(){$(window).trigger("rt_fix_sticky_sidebar")},50)}),$("select").on("select2:open",function(){$(".select2-container").removeClass("default-style").addClass("default-style")}),$.fn.rt_button_hovers=function(){var a="";$(this).each(function(){var b=$(this);if(b.find("> span:only-child").clone().appendTo(b),b[0].hasAttribute("data-hover-style")){var c="button-"+Math.floor(1e4*Math.random()+1);b.addClass(c),a+="."+c+":hover{"+b.data("hover-style")+"}",b.removeAttr("data-hover-style")}}),""!==a&&$("<style>"+a+"</style>").appendTo($("head"))},$(".button_").rt_button_hovers(),$(function(){"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("sidebar-updated",function(){$(".widget .button_").rt_button_hovers()})}),$.fn.rt_tooltips=function(){$(this).each(function(){var a=$(this),b=a.find("mark"),c=b.height();a.on("touchstart mouseenter",function(){b.css({display:"block",top:a.offset().top-$(window).scrollTop()-c-20+"px",left:a.offset().left+(a.outerWidth()-b.outerWidth())/2}),$(window).on("scroll.tooltip",function(){b.removeAttr("style"),$(window).off("scroll.tooltip")})}),a.on("mouseleave touchmove",function(){b.removeAttr("style")})})},$(".rt-tooltip-text").rt_tooltips()}(jQuery);