// source --> https://www.sfamgroup.com/wp-content/plugins/to-top/public/js/to-top-public.js?ver=3.1 
(function($) {
    "use strict";
    $(function() {
        var container = $("#to_top_scrollup").css({
            'opacity': 0
        });
        var data = to_top_options;

        var mouse_over = false;
        var hideEventID = 0;

        var fnHide = function() {
            clearTimeout(hideEventID);
            if (container.is(":visible")) {
                container.stop().fadeTo(200, 0, function() {
                    container.hide();
                    mouse_over = false;
                });
            }
        };

        var fnHideEvent = function() {
            if (!mouse_over && data.enable_autohide == 1 ) {
                clearTimeout(hideEventID);
                hideEventID = setTimeout(function() {
                    fnHide();
                }, data.autohide_time * 1000);
            }
        };

        var scrollHandled = false;
        var fnScroll = function() {
            if (scrollHandled)
                return;

            scrollHandled = true;

            if ($(window).scrollTop() > data.scroll_offset) {
                container.stop().css("opacity", mouse_over ? 1 : parseFloat(data.icon_opacity/100)).show();

                    fnHideEvent();

            } else {
                fnHide();
            }

            scrollHandled = false;
        };

        if ("undefined" != typeof to_top_options.enable_hide_small_device && "1" == to_top_options.enable_hide_small_device) {
            if ($(window).width() > to_top_options.small_device_max_width) {
                $(window).on( "scroll", fnScroll);
                $(document).on( "scroll", fnScroll);
            }
        }else{
            $(window).on( "scroll", fnScroll);
            $(document).on( "scroll", fnScroll);
        }

        container.on( "hover", function() {
                clearTimeout(hideEventID);
                mouse_over = true;
                $(this).css("opacity", 1);
            }, function() {
                $(this).css("opacity", parseFloat(data.icon_opacity/100));
                mouse_over = false;
                fnHideEvent();
            })
            .on( "click", function() {
                $("html, body").animate({
                    scrollTop: 0
                }, 400);
                return false;
            });
    });
})(jQuery);
// source --> https://www.sfamgroup.com/wp-content/themes/enfold/js/avia-js.min.js?ver=7.1.3 
var aviaJS=aviaJS||{};!function(){"use strict";if(!aviaJS.aviaJSHelpers){class aviaJSHelpers{constructor(){this.wpHooks()}debounce(i,s,t){var e;return function(){var o=this,a=arguments,l=function(){e=null,t||i.apply(o,a)},n=t&&!e;clearTimeout(e),e=setTimeout(l,s),n&&i.apply(o,a)}}wpHooks(){if(window.wp&&wp.hooks)return;window.wp?window.wp.hooks={}:window.wp={hooks:{}};let i=window.wp.hooks;i.applyFilters=this.wpHooks_applyFilters,i.doAction=this.wpHooks_applyFilters,i.hasFilter=this.wpHooks_hasFilters,i.hasAction=this.wpHooks_hasFilters}wpHooks_applyFilters(i,s){return s}wpHooks_hasFilters(i,s){return!1}}aviaJS.aviaJSHelpers=new aviaJSHelpers}if(!aviaJS.aviaPlugins){class aviaPlugins{plugins=[];defaultPlugin={classFactory:null,selector:""};constructor(){this.plugins=[]}register(i,s){if("function"!=typeof i)return!1;let t=Object.assign({},this.defaultPlugin);"string"!=typeof s&&(s="body"),t.classFactory=i,t.selector=s,this.plugins.push(t),this.check_bind()}check_bind(){"complete"===document.readyState?this.bind_plugins():document.addEventListener("readystatechange",this.bind_plugins.bind(this))}bind_plugins(i){if("complete"!==document.readyState)return;let s=this.plugins;this.plugins=[];for(let t of s){let i=document.querySelectorAll(t.selector);for(let s of i)t.classFactory(s)}}}aviaJS.aviaPlugins=new aviaPlugins}}();
// source --> https://www.sfamgroup.com/wp-content/themes/enfold/js/avia-compat.min.js?ver=7.1.3 
"use strict";var avia_is_mobile=!1;/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&"ontouchstart"in document.documentElement?(avia_is_mobile=!0,document.documentElement.className+=" avia_mobile "):document.documentElement.className+=" avia_desktop ",document.documentElement.className+=" js_active ",function(){var e=["-webkit-","-moz-","-ms-",""],t="",n=!1,o=!1;for(var a in e)e[a]+"transform"in document.documentElement.style&&(n=!0,t=e[a]+"transform"),e[a]+"perspective"in document.documentElement.style&&(o=!0);n&&(document.documentElement.className+=" avia_transform "),o&&(document.documentElement.className+=" avia_transform3d "),"function"==typeof document.getElementsByClassName&&"function"==typeof document.documentElement.getBoundingClientRect&&0==avia_is_mobile&&t&&window.innerHeight>0&&setTimeout((function(){var e=0,n={},o=0,a=document.getElementsByClassName("av-parallax"),m=window.pageYOffset||document.documentElement.scrollTop;for(e=0;e<a.length;e++)a[e].style.top="0px",n=a[e].getBoundingClientRect(),o=Math.ceil(.3*(window.innerHeight+m-n.top)),a[e].style[t]="translate(0px, "+o+"px)",a[e].style.top="auto",a[e].className+=" enabled-parallax "}),50)}();