function avadaUpdateToTopPostion(){var o=avadaToTopVars.totop_position.split("_");o=2===o.length?"to-top-"+o[0]+" to-top-"+o[1]:"to-top-"+o[0],jQuery(".to-top-container").attr("class","to-top-container"),jQuery(".to-top-container").addClass(o)}jQuery(document).ready((function(){var o=0,t=jQuery("html").hasClass("ua-edge")||jQuery("html").hasClass("ua-safari-12")||jQuery("html").hasClass("ua-safari-11")||jQuery("html").hasClass("ua-safari-10")?"body":"html";jQuery(".fusion-top-top-link").on("click",(function(o){o.preventDefault();const e=jQuery(document).height()-jQuery(window).height(),n=jQuery(document).scrollTop()/e;(cssua.ua.mobile&&-1!==avadaToTopVars.status_totop.indexOf("mobile")||!cssua.ua.mobile)&&(jQuery(t).on("scroll wheel mousedown keydown touchstart",(function(){jQuery(t).stop()})),jQuery(t).animate({scrollTop:0},1500-500*n,"easeInOutExpo",(function(){jQuery(t).off("scroll mousedown wheel keydown touchstart")})))})),jQuery(window).on("scroll",(function(){var t=jQuery(this).scrollTop();200<t&&(t>=o||1!==parseInt(avadaToTopVars.totop_scroll_down_only))?jQuery(".fusion-top-top-link").addClass("fusion-to-top-active"):jQuery(".fusion-top-top-link").removeClass("fusion-to-top-active"),o=t})),jQuery(window).on("updateToTopPostion",avadaUpdateToTopPostion)})),jQuery(document).ready((function(){jQuery.fn.toTopScrollProgress=function(){var o,t=jQuery(this);getMaxScroll=function(){return jQuery(document).height()-jQuery(window).height()},getWidthPercentage=function(){const t=jQuery(window).scrollTop();let e=Math.ceil(t/o*100);return 100<e?100:e},setWidthPercentage=function(){t.css("stroke-dashoffset",166-166*getWidthPercentage()/100+"px")},o=getMaxScroll(),jQuery(document).on("scroll",setWidthPercentage),jQuery(window).on("resize",(function(){o=getMaxScroll(),setWidthPercentage(),setTimeout((function(){o=getMaxScroll(),setWidthPercentage()}),700)}))},jQuery(".awb-to-top-progress .awb-progress").toTopScrollProgress()}));