// source --> https://okna-teplo.ru/wp-content/plugins/to-top/public/js/to-top-public.js?ver=2.3 
(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).scroll(fnScroll);
                $(document).scroll(fnScroll);
            }
        }else{
            $(window).scroll(fnScroll);
            $(document).scroll(fnScroll);
        }

        container
            .hover(function() {
                clearTimeout(hideEventID);
                mouse_over = true;
                $(this).css("opacity", 1);
            }, function() {
                $(this).css("opacity", parseFloat(data.icon_opacity/100));
                mouse_over = false;
                fnHideEvent();
            })
            .click(function() {
                $("html, body").animate({
                    scrollTop: 0
                }, 400);
                return false;
            });
    });
})(jQuery);
// source --> https://okna-teplo.ru/wp-content/plugins/luckywp-cookie-notice-gdpr/front/assets/main.min.js?ver=1.2.1 
!function(t){var n={b:{},useShowAgain:void 0,status:{unknown:0,accepted:void 0,rejected:void 0},setStatus:function(t){var e=new Date;e.setTime(e.getTime()+n.b.notice.data("cookieExpire")),document.cookie="lwpcngStatus="+t+"; expires="+e.toUTCString()+"; path=/"},getStatus:function(){var t=document.cookie.match(new RegExp("(?:^|; )lwpcngStatus=("+n.status.accepted+"|"+n.status.rejected+")($|;)"));return t?t[1]:n.status.unknown},accept:function(){n.setStatus(n.status.accepted),n.b.notice.data("reloadAfterAccept")&&window.location.reload(!0)},reject:function(){n.setStatus(n.status.rejected),n.b.notice.data("reloadAfterReject")&&window.location.reload(!0)},showNotice:function(){n.b.showAgain.length&&n.b.showAgain.hide(),n.b.notice.show()},showShowAgain:function(){n.useShowAgain&&n.b.showAgain.show(),n.b.notice.hide()},init:function(){(n.b={notice:t(".js-lwpcngNotice"),showAgain:t(".js-lwpcngShowAgain")},n.b.notice.length)&&(n.useShowAgain=n.b.notice.data("useShowAgain"),n.status.accepted=n.b.notice.data("statusAccepted"),n.status.rejected=n.b.notice.data("statusRejected"),n.getStatus()==n.status.unknown?n.showNotice():n.showShowAgain(),n.b.notice.find(".js-lwpcngAccept,.js-lwpcngReject").click(function(){n.showShowAgain(),t(this).hasClass("js-lwpcngReject")?n.reject():n.accept()}),n.useShowAgain&&n.b.showAgain.click(n.showNotice))}};t(function(){n.init()})}(jQuery);