function initStackingScrollSections(e){var t=e?jQuery(".post-preview.post-content").find(".awb-stacking-sections"):jQuery(".awb-stacking-sections");t.length&&t.each(function(){var e,t=jQuery(this),n=t.children(".awb-stacking-section-element"),i=t.find(".fusion-scroll-section-link"),o=0;function s(){var e=t.find(".fusion-scroll-section-nav ul");o=getScrollSectionTopOffset(),t.css("--awb-stacking-offset",o+"px"),e.length&&t.css("--awb-stacking-nav-half",e.outerHeight()/2+"px"),0==fusionContainerVars.container_hundred_percent_height_mobile&&Modernizr.mq("only screen and (max-width: "+fusionContainerVars.content_break_point+"px)")?t.addClass("awb-stacking-disabled"):t.removeClass("awb-stacking-disabled")}t.data("stacking-init")||(t.data("stacking-init",!0),s(),jQuery(window).on("resize",s),jQuery(document).on("sticky_kit:stick sticky_kit:unstick",s),i.length&&"undefined"!=typeof IntersectionObserver&&(e=new IntersectionObserver(function(){var e=0,t=window.innerHeight/2;n.each(function(n){var i=this.getBoundingClientRect();i.top<=t&&i.bottom>=t&&(e=n)}),i.removeClass("active"),i.eq(e).addClass("active")},{threshold:[0,.25,.5,.75,1]}),n.each(function(){e.observe(this)})),i.on("click",function(e){var i=jQuery(this).closest("li").index(),s=t.offset().top-o;e.preventDefault(),n.slice(0,i).each(function(){s+=jQuery(this).outerHeight()}),window.scrollTo({top:s,behavior:"smooth"})}))})}function fusionInitStickyContainers(){"function"==typeof jQuery.fn.stick_in_parent&&jQuery(".fusion-sticky-container").each(function(){fusionInitSticky(jQuery(this))})}function fusionInitSticky(e){var t=void 0===e.attr("data-transition-offset")?0:parseFloat(e.attr("data-transition-offset")),n=void 0===e.attr("data-sticky-offset")?0:e.attr("data-sticky-offset"),i=void 0!==e.attr("data-scroll-offset")&&parseFloat(e.attr("data-scroll-offset")),o={sticky_class:"fusion-container-stuck",bottoming:!0,offset_top:n,transition_offset:t,clone:!1},s="data-sticky-medium-visibility";jQuery("body").hasClass("fusion-disable-sticky")?e.data("sticky_kit")&&e.trigger("sticky_kit:detach"):"object"!=typeof fusion||"function"!=typeof fusion.isLarge||(fusion.isLarge()?s="data-sticky-large-visibility":fusion.isSmall()&&(s="data-sticky-small-visibility"),void 0!==e.attr(s)&&e.attr(s))?e.data("sticky_kit")||(i&&(o.scroll_transition=i),e.closest(".fusion-tb-header").length||e.closest(".fusion-tb-page-title-bar").length?(o.parent="#wrapper",o.bottoming=!1):e.closest(".fusion-content-tb").length?o.parent=".fusion-content-tb":e.closest(".fusion-builder-live-editor").length?o.parent="#fusion_builder_container":e.parent().parent(".post-content").length?o.parent=".post-content":e.hasClass("awb-sticky-content")&&(o.parent="#wrapper"),"string"==typeof e.attr("data-sticky-parent")&&(o.parent=e.attr("data-sticky-parent")),"string"==typeof e.attr("data-sticky-bottoming")&&(o.bottoming=e.attr("data-sticky-bottoming")),jQuery("body").hasClass("fusion-builder-live")||void 0===e.attr("data-sticky-height-transition")||(o.clone=!0),e.stick_in_parent(o)):e.data("sticky_kit")&&e.trigger("sticky_kit:detach")}function awbContainerIsOutOfFlow(e){var t="medium";return!!e.hasClass("fusion-absolute-container")&&("object"==typeof fusion&&"function"==typeof fusion.isLarge&&(fusion.isLarge()?t="large":fusion.isSmall()&&(t="small")),e.hasClass("fusion-absolute-position-"+t))}function fusionGetStickyOffset(e){var t=0,n=jQuery(".fusion-container-stuck:not( .side-header-wrapper )");return n.length?(n.each(function(){var n=jQuery(this),i=n.position().top+n.outerHeight(!0);if(!fusionIsWholeElementInViewport(n[0]))return;const o=n.closest("#side-header");(!o.length||"static"===o.css("position")&&o.hasClass("fusion-tb-header"))&&(n.closest(".off-canvas-content").length||e&&awbContainerIsOutOfFlow(n)||i>t&&(t=i))}),t):t}function fusionIsWholeElementInViewport(e){const t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return!(100>Math.floor(100-(0<=t.top?0:t.top)/+-t.height*100)||100>Math.floor(100-(t.bottom-n)/t.height*100))}function getScrollSectionTopOffset(){return jQuery(".fusion-tb-header").length?fusionGetStickyOffset(!0)||fusion.getAdminbarHeight():(Number(fusionContainerVars.is_sticky_header_transparent)||"function"!=typeof getStickyHeaderHeight?0:getStickyHeaderHeight(!0))+fusion.getAdminbarHeight()}function hasTransformedAncestor(e){for(var t,n=e.parentElement;n&&n!==document.body;){if("none"!==(t=getComputedStyle(n)).transform||"none"!==t.perspective||"none"!==t.filter||t.backdropFilter&&"none"!==t.backdropFilter||/transform|perspective|filter/.test(t.willChange))return!0;n=n.parentElement}return!1}function getScrollableParent(e,t,n){for(var i,o=e;o&&o!==t&&o!==document.body;){if(o.scrollHeight>o.clientHeight&&("auto"===(i=getComputedStyle(o)).overflowY||"scroll"===i.overflowY)&&(0n&&0n.y?1:-1),k.animating=!0,k.tween=gsap.to(n,{y:o,duration:Math.max(.4,i/1e3),ease:"power3.out",onUpdate:function(){window.scrollTo(0,n.y)},onComplete:function(){k.animating=!1,k.cooldownEnd=performance.now()+400}})}2>r||t.data("full-sections-init")||(t.data("full-sections-init",!0),delete g.opacity,a&&c&&(u=!u),t.wrap('
'),t.addClass("awb-full-sections-disabled"),gsap.matchMedia().add(w,function(){var s,a,f;if(t.removeClass("awb-full-sections-disabled"),c?gsap.set(o,{xPercent:function(e){return(u?-100:100)*e}}):(p.prev.filter&&gsap.set(o,{filter:"brightness(1)"}),"fade"===n&&gsap.set(o,{zIndex:function(e){return e+1}}),gsap.set(o.slice(1),p.next)),a={trigger:e,start:function(){var t=getScrollSectionTopOffset();return e.style.height="calc(100vh - "+t+"px)","top top+="+t},end:function(){return"+="+(r-1)*e.offsetHeight},pin:!0,pinType:hasTransformedAncestor(e)?"transform":"fixed",scrub:!0,invalidateOnRefresh:!0,onUpdate:function(e){var t=e.progress*(r-1),n=Math.round(t),i=0performance.now()-k.lastWheelTime&&.02s.end+1)&&!(1===(n=0=s.progress)&&(k.animating||!e.contains(t.target)||!getScrollableParent(t.target,e,t.deltaY))){if(t.preventDefault(),k.animating){if(n===k.direction)return;k.tween&&k.tween.kill(),k.animating=!1}else if(performance.now()Math.abs(t.deltaY))return;i=s.progress*(r-1),C(1===n?Math.floor(i+.02)+1:Math.ceil(i-.02)-1)}},{passive:!1}),s.on("click",function(e){e.preventDefault(),_(jQuery(this).closest("li").index(),!0)}),jQuery('a[href^="#"]').on("click.awbFullSections",function(e){var n=jQuery(this).attr("href"),i="#"!==n?t.find(n):jQuery(),o=i.length?Q(i):-1;-1!==o&&(e.preventDefault(),_(o,!0))}),window.location.hash&&t.find(window.location.hash).length&&setTimeout(function(){var e=Q(t.find(window.location.hash));-1!==e&&_(e,!1)},150))}))}function initScrollingSections(e){initStackingScrollSections(e),initFullScrollSections(e),jQuery(".hundred-percent-height").length&&(setNonScrollingSectionHeights(),jQuery(window).on("resize",setNonScrollingSectionHeights))}function setNonScrollingSectionHeights(){var e,t=jQuery(".hundred-percent-height.non-hundred-percent-height-scrolling");t.length&&0==fusionContainerVars.container_hundred_percent_height_mobile&&(Modernizr.mq("only screen and (max-width: "+fusionContainerVars.content_break_point+"px)")?(t.css("height","auto"),t.find(".fusion-fullwidth-center-content").css("height","auto")):(e=getScrollSectionTopOffset(),t.css("height","calc(100vh - "+e+"px)"),t.find(".fusion-fullwidth-center-content").css("height","")))}jQuery(window).on("load fusion-element-render-fusion_builder_container resize",function(e,t){var n=void 0!==t?jQuery('div[data-cid="'+t+'"]').find(".fullwidth-faded"):jQuery(".fullwidth-faded"),i=void 0!==t?jQuery('div[data-cid="'+t+'"]').find(".hundred-percent-height"):jQuery(".hundred-percent-height"),o=Number(fusionContainerVars.is_sticky_header_transparent)||"function"!=typeof getStickyHeaderHeight?0:getStickyHeaderHeight(!0),s=fusion.getAdminbarHeight(),r=jQuery("body").hasClass("fusion-builder-live")&&!jQuery("body").hasClass("fusion-builder-preview-mode"),a=o+s;n.fusionScroller({type:"fading_blur"}),i.css("min-height","").css("height",""),i.find(".fusion-fullwidth-center-content").css("min-height",""),0==fusionContainerVars.container_hundred_percent_height_mobile&&Modernizr.mq("only screen and (max-width: "+fusionContainerVars.content_break_point+"px)")?(i.css("height","auto"),r&&(i.css("min-height","0"),i.find(".fusion-fullwidth-center-content").css("min-height","0"))):(i.css("height","calc(100vh - "+a+"px)"),r&&(i.css("min-height","calc(100vh - "+a+"px)"),i.find(".fusion-fullwidth-center-content").css("min-height","calc(100vh - "+a+"px)")))}),jQuery(document).ready(function(){var e;initScrollingSections(),fusionInitStickyContainers(),!jQuery("body").hasClass("fusion-builder-live")&&"object"==typeof cssua&&"string"==typeof cssua.ua.safari&&16>parseInt(cssua.ua.safari)&&(e=jQuery(".awb-sticky, .mobile-sticky-tabs, .sticky-tabs")).length&&(jQuery("#boxed-wrapper").addClass("safari-overflow"),e.each(function(){jQuery(this).parents(".fusion-fullwidth").addClass("has-sticky")})),Modernizr.mq("only screen and (max-width: "+fusionContainerVars.content_break_point+"px)")&&jQuery(".fullwidth-faded").each(function(){var e=jQuery(this).css("background-image"),t=jQuery(this).css("background-color");jQuery(this).parent().css("--awb-background-image",e),jQuery(this).parent().css("--awb-background-color",t),jQuery(this).remove()})}),jQuery(window).on("fusion-reinit-sticky",function(e,t){var n=void 0!==t&&jQuery('div[data-cid="'+t+'"] .fusion-fullwidth');n&&n.length&&(n.trigger("sticky_kit:detach"),fusionInitSticky(n))}),jQuery(window).on("fusion-sticky-header-reinit fusion-resize-horizontal",function(){fusionInitStickyContainers()}),jQuery("body").on("avada-studio-preview-done",function(){initScrollingSections(!0)});