// source --> https://www.gamtosvaikai.eu/wp-content/plugins/beam-me-up-scotty/library/js/scripts.min.js?ver=1.0.24 
(function ($) {
    $(document).ready(function () { var back_to_top_button = $('.otb-beam-me-up-scotty'); back_to_top_button.bind('click', function () { $('body').addClass('animating'); $('html, body').stop().animate({ scrollTop: 0 }, 'slow', function () { $('body').removeClass('animating') }); return !1 }); back_to_top_button.hover(function () { if ($(this).hasClass('hide-when-inactive')) { disable_scroll_timer.call(this) } }, function () { if ($(this).hasClass('hide-when-inactive')) { enable_scroll_timer.call(this) } }) }); $(window).on('load', function () { setBackToTopButtonVisibility() }); $(window).scroll(function (e) {
        var back_to_top_button = $('.otb-beam-me-up-scotty'); if (back_to_top_button.hasClass('hide-when-inactive')) { disable_scroll_timer.call(back_to_top_button); enable_scroll_timer.call(back_to_top_button) }
        setBackToTopButtonVisibility()
    }); function disable_scroll_timer() { clearTimeout($.data($(this)[0], 'scrollTimer')) }
    function enable_scroll_timer() { $.data($(this)[0], 'scrollTimer', setTimeout(function () { hideBackToTopButton() }, otb_beam_me_up_scotty.hide_delay)) }
    function showBackToTopButton() { $('.otb-beam-me-up-scotty').css('visibility', 'visible').removeClass('hidden') }
    function hideBackToTopButton() { $('.otb-beam-me-up-scotty').addClass('hidden').css('visibility', 'hidden') }
    function setBackToTopButtonVisibility() { if ($(window).scrollTop() > $(window).height() / 2) { showBackToTopButton() } else { hideBackToTopButton() } }
})(jQuery);