<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">let isTouchDevice = false;

let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
window.addEventListener('resize', function () {
    vh = window.innerHeight * 0.01;
    document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
});
function closeNanobar(e, name, type, cssVar) {
    var $target = $(e).closest('.js-nanobar');
    $target.stop().animate({
        height: "0px"
    }, 500, function() {
        $target.remove();
        set_front_var(name,1,type);
        $(window).trigger('resize');
        if ( cssVar != "undefined" || cssVar != "" ) root.style.setProperty(cssVar, "0px");
    });
}
function getContrastYIQ(hexcolor){
    var r = parseInt(hexcolor.substr(0,2),16);
    var g = parseInt(hexcolor.substr(2,2),16);
    var b = parseInt(hexcolor.substr(4,2),16);
    var yiq = ((r*299)+(g*587)+(b*114))/1000;
    return (yiq &gt;= 128) ? 'light' : 'dark';
}
function getHeight(el) {
    return el.outerHeight();
}
function handleCloseDropdowns(maskNotClose) {
    $('html').removeClass('scroll-hidden');
    $('[data-btn-for], [data-content-for]').removeClass('is-active');
    if (!maskNotClose) {
        $.mask.close();
    }
}

function getHeaderHeight() {
    return 0;
}

function handleCloseNavItems() {
    const navItemShow = $('.nav-item.show');
    navItemShow.removeClass('show');
    navItemShow.find('.dropdown-menu').removeClass('show');
}

(function() {
    if (window.navigator.userAgent.match(/(MSIE|Trident)/)) {
        $('html').addClass('ie');
    }
})();

/* Business logic to handle hover behaviour on one product element */
function altPicHover() {
    let item = $(this);

    /* Get the main image */
    let mainPic = item.find(".js-main-img");
    let mainPicSrc = mainPic.attr("data-src-orig");
    let mainPicSrcSet = mainPic.attr("data-srcset-orig");
    if (mainPicSrcSet==undefined) mainPicSrcSet="";

    /* Get the alt image wrappers */
    let altPics = item.find(".js-alt-img-wrap");

    /* Business logic to handle swapping of the main img and one alt img */
    function handleSwap() {
        let $this = $(this);

        /* When hovering over the alt img swap it with the main img */
        $this.mouseover(function() {
            let currentAltPicSrc = $(this)
                .find("img")
                .attr("data-src-orig");
            mainPic.attr("src", currentAltPicSrc);

            let currentAltPicSrcSet = $(this)
                .find("img")
                .attr("data-srcset-orig");
            if (currentAltPicSrcSet==undefined) currentAltPicSrcSet="";
            mainPic.attr("srcset", currentAltPicSrcSet);
        });
    }

    item.find('.js-alt-images').mouseleave(function() {
        mainPic.attr("src", mainPicSrc);
        mainPic.attr("srcset", mainPicSrcSet);
    });

    /* Call the handleSwap fn on all alt imgs */
    altPics.each(handleSwap);
}

/* CHECK SEARCH INPUT CONTENT  */
function checkForInput(element) {
    let thisEl = $(element);
    let tmpval = thisEl.val();
    thisEl.toggleClass('not-empty', tmpval.length &gt;= 1);
    thisEl.toggleClass('search-enable', tmpval.length &gt;= 3);
}

function getScrollTop() {
    return $(window).scrollTop();
}
function getWindowWidth() {
    return $(window).width();
}
let root = document.documentElement;
let $headerHeight = 0;
let $searchBarHeight = 40;
$(document).ready(function() {
    if (service_type == 'shop') {
        initTippy();
    }

    const $header = $('.js-header');

    /** van fejlec **/
    if ($header.length) {
        const $headerInner = $('.js-header-inner');
        const $searchBar = $('.js-search');
            $headerHeight = getHeight($headerInner);
            root.style.setProperty('--header-height', $headerHeight + "px");

        let $headerOffsetTop = $header.offset().top;
            $searchBarHeight = getHeight($searchBar);
        $header.css('height', $headerHeight + 'px');

        function headerFixHandle() {
            if ( $(window).scrollTop() &gt;= $headerOffsetTop) {
                $header.addClass('is-fixed');
            } else {
                $header.removeClass('is-fixed');
            }
        }
        headerFixHandle();

        /*** SCROLL DOWN ***/
        let didScroll;
        let lastScrollTop = 0;
        let delta = 1;

        $(window).on('scroll',{passive: true},function (e) {
            if (window.matchMedia('(min-width: 1200px)').matches) {
                if ($('[data-content-for]').hasClass('is-active')) {
                    if (!$(e.target).closest('[data-btn-for]').length &amp;&amp; !$(e.target).closest('[data-content-for]').length &amp;&amp; !$(e.target).hasClass('js-remove-slider-filter')) {
                        handleCloseDropdowns();
                    }
                }
            }
            didScroll = true;
            headerFixHandle();
        });

        $(window).resize(function () {
            $headerOffsetTop = $header.offset().top;
            $headerHeight = getHeight($headerInner);
            $header.css('height', $headerHeight + 'px');
            root.style.setProperty('--header-height', $headerHeight + "px");
        });

        setInterval(function () {
            if (didScroll) {
                hasScrolled();
                didScroll = false;
            }
        }, 250);

        function hasScrolled() {
            /*if (getWindowWidth() &gt; 992) $('.dropdown--btn').removeClass('is-active');*/
            let st = $(this).scrollTop();

            // Make sure they scroll more than delta
            if (Math.abs(lastScrollTop - st) &lt;= delta)
                return;

            // If they scrolled down and are past the navbar, add class .nav-up.
            // This is necessary so you never see what is "behind" the navbar.

            if (st &gt; $headerHeight + $headerOffsetTop + $searchBarHeight) {
                if (st &gt; lastScrollTop) {
                    // Scroll Down
                    $header.removeClass('is-visible').addClass('is-hidden');
                    $(".js-search-smart-autocomplete").addClass('is-hidden');
                    $('.search-close-btn').addClass('is-hidden');
                    $("#box_search_input").blur();

                } else {
                    // Scroll Up
                    if (st + $(window).height() &lt; $(document).height()) {
                        $header.addClass('is-visible').removeClass('is-hidden');
                    }
                }
            } else {
                $header.removeClass('is-visible is-hidden');
            }
            lastScrollTop = st;
        }
    }

    /* COMPARE POPUP OPENED */
    $(document).on('popupOpen', function(event, array){
        if (array['popupId'] === 'compare') {
            setTimeout(
                function() {
                    $('table.compare_list_table tbody').width($('.shop_popup_compare').width());
                }, 400
            );
        }
    });

    /* BACk TO TOP */
    const scrollTopOffset = 220;
    let duration = 0;
    $(window).on('scroll',{passive: true}, function(){
        if ($(this).scrollTop() &gt; scrollTopOffset) {
            $('.back_to_top').stop().fadeIn(duration);
        } else {
            $('.back_to_top').stop().fadeOut(duration);
        }
    });
    $('.back_to_top').click(function(event) {
        event.preventDefault();
        $('html, body').animate({scrollTop: 0}, duration);
        return false;
    });

    /*Check the user agent string*/
    if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
        $('html').addClass('prel-touch-device');
        isTouchDevice = true;
    }
    /* IS TOUCH DEVICE */
    $(document).on('touchstart', {passive: true}, function() {
        $('html').removeClass('prel-touch-device').addClass('touch-device');
        isTouchDevice = true;
    });

    $(document).on('click', '.search-btn', function(e) {
        let $searchInput = $('#box_search_input');
        if ($searchInput.prop('readonly')==true) {
            e.preventDefault();
            $searchInput.blur();
            $searchInput.prop('readonly', false);
        }
        $searchInput.focus();
    });

    /* DROPDOWN BUTTONS */
    $(document).on('click', '[data-btn-for]', function(e) {
        let $thisBtn = $(this);

        let $thisBtnLeft = $thisBtn.offset().left;
        let $thisBtnTop =  $thisBtn.offset().top - $(window).scrollTop();

        let $thisDropdown = $($thisBtn.data("btn-for"));

        if ($thisDropdown.length &gt; 0 ) {
            if ($thisDropdown.hasClass('is-active')) {
                $($thisDropdown.data("content-for")).removeClass('is-active');
                $thisDropdown.removeClass('is-active');
                $('html').removeClass('scroll-hidden');
                if (window.matchMedia('(max-width: 1199.8px)').matches) {
                    $.mask.close();
                }
            } else {
                handleCloseDropdowns();
                handleCloseNavItems();
                if (window.matchMedia('(max-width: 1199.8px)').matches) {
                    $thisDropdown.expose({
                        loadSpeed: "normal",
                        zIndex: 1035,
                        onClose: function(event) {
                            handleCloseDropdowns();
                        }
                    });
                } else {
                    $thisDropdown.css({top: $thisBtnTop + 'px', left: $thisBtnLeft + 'px' });
                }
                $thisBtn.addClass('is-active');
                $thisDropdown.addClass('is-active');
                if ($thisBtn.hasClass('cart-box__btn') &amp;&amp; !$thisBtn.hasClass("js-cart-box-loaded-by-ajax")) {
                    let cartBoxFreeShippingEl = $(".cart-box__free-shipping", $thisDropdown);
                    let cartBoxHeaderEl = $(".cart-box__header", $thisDropdown);
                    if (cartBoxFreeShippingEl.length &gt; 0 &amp;&amp; cartBoxFreeShippingEl.css('display') != 'none') {
                        root.style.setProperty("--cart-box-free-shipping-height", cartBoxFreeShippingEl.outerHeight(true) + "px");
                    }
                    if (cartBoxHeaderEl.length &gt; 0 &amp;&amp; cartBoxHeaderEl.css('display') != 'none') {
                        root.style.setProperty("--cart-box-header-height", cartBoxHeaderEl.outerHeight(true) + "px");
                    }
                    root.style.setProperty("--cart-box-offset-top", $thisBtnTop + "px");
                }
                $('html').addClass('scroll-hidden');
            }
        }
        e.stopPropagation();
    });

    $('[data-close-btn-for]').on('click', function(e) {
        handleCloseDropdowns();
    });

    /* CHECK SEARCH INPUT CONTENT  */
    $('#box_search_input').on('blur change keyup', function() {
        checkForInput(this);
    });

    /* REMOVE is-active CLASS FROM DROPDOWN WHEN CLICKED OUTSIDE */
    $(document).click(function(e) {
        if ($('[data-content-for]').hasClass('is-active')) {
            if (!$(e.target).closest('[data-btn-for]').length &amp;&amp; !$(e.target).closest('[data-content-for]').length &amp;&amp; !$(e.target).hasClass('js-remove-slider-filter')) {
                handleCloseDropdowns(true);
            }
        }
        if ($('.nav-item').hasClass('show')) {
            if (!$(e.target).closest('.nav-item.show').length) {
                handleCloseNavItems();
            }
        }
    });

    /* DATA SCROLL DOWN */
    $('[data-scroll]').click(function() {
        let $this = $(this);
        let $offset = 10;

        if ($('.js-fixed-cart').length &gt; 0) {
            $offset += $('.js-fixed-cart').height();
        }
        $('html,body').animate({
            scrollTop: $($this.attr('data-scroll')).offset().top - $offset},
        'slow');
    });
});

/*** PRODUCT VARIANT CHANGE AND ERROR HANDLING ***/
function changeVariant(el) {
    let $thisSelect = $(el);
    let $thisSelectWrap = $thisSelect.closest('.js-variant-wrap');

    if (!$thisSelect.hasClass('is-selected')) {
        $thisSelect.addClass('is-selected');
        $thisSelectWrap.removeClass('has-fault');
    }
    checkVariants(el, true)
}
let $faultInVariants;
function checkVariants(el, onlyCheck) {
    $faultInVariants = false;
    let $thisProduct = $(el).closest('.js-product');
    let $variantSelectWraps = $('.js-variant-wrap', $thisProduct);

    $variantSelectWraps.each( function() {
        let selectWrap = $(this);
        let selectItem = $(selectWrap).find('select');

        if (!selectItem.hasClass('is-selected')) {
            if (!onlyCheck) selectWrap.addClass('has-fault');
            $faultInVariants = true;
        } else {
            if (!onlyCheck) selectWrap.removeClass('has-fault');
        }
    });
    if (!$faultInVariants) {
        $thisProduct.removeClass('has-unselected-variant');
        $thisProduct.addClass('all-variant-selected');
    } else {
        $thisProduct.addClass('has-unselected-variant');
        $thisProduct.removeClass('all-variant-selected');
    }
}

function isInViewport(element) {
    const EL = document.querySelector(element);
    const RECT = EL.getBoundingClientRect();
    return (
        RECT.top &gt;= 0 &amp;&amp;
        RECT.left &gt;= 0 &amp;&amp;
        RECT.bottom &lt;= (window.innerHeight || document.documentElement.clientHeight) &amp;&amp;
        RECT.right &lt;= (window.innerWidth || document.documentElement.clientWidth)
    );
}

let headerCorrection =  function(from, to) {
    let correction = 20;

    if (!($("#ud_shop_cart").length || $("#ud_shop_order_mods").length || $("#ud_shop_order_control").length)) {
        if (from &gt; to) {
            correction += $headerHeight;
            if (window.matchMedia('(max-width: 991.98px)').matches) {
                correction += $('.search-box').height();
            }
        } else {
            if ($("#ud_shop_artdet").length){
                if (to + 60 &gt; $(".js-main-cart-btn").offset().top) {
                    correction += $(".js-fixed-cart").height();
                }
            }
        }
    }

    return correction;
}

function inputsErrorHandling(isTooltip) {
    /*check error in spec params inputs*/
    let faultInInputs = check_cust_input();
    /*check error in variant inputs*/
    let faultInVariant = $faultInVariants;
    /* IS not select onchange fn call (it runs only when clicked on btn), is a text input param, is artdet */

    if (faultInInputs === 1 || faultInVariant === true) {
        if (faultInInputs === 1) {
            if ( isTooltip !== 1 ) {
                let temp_callback = function() {
                    overlay_load("warning",lang_text_required_fields_missing);
                }
                if ( isInViewport('.js-spec-params-input') ) {
                    temp_callback();
                } else {
                    scrollToElement({ element: '.js-spec-params-input', callback: temp_callback });
                }
            } else {
                scrollToElement({ element: '.product-tooltip__spec-params', offset: 0, scrollIn: '.product-tooltip__datas', container: '#page_PopupContainer_tooltip_inner' });
            }
        } else {
            if ( isTooltip !== 1 ) {
                let temp_callback = function() {
                    overlay_load("warning",lang_text_required_fields_missing);
                }
                if ( isInViewport('.js-variants') ) {
                    temp_callback();
                } else {
                    scrollToElement({ element: '.js-variants', callback: temp_callback });
                }
            } else {
                scrollToElement({ element: '.product-tooltip__variants', offset: 0, scrollIn: '.product-tooltip__datas', container: '#page_PopupContainer_tooltip_inner' });
            }
        }
    }else{
        let mainBtn;
        if ( isTooltip === 1 ) {
            mainBtn = $('#page_tooltip').find('.js-main-product-cart-btn');
        } else {
            mainBtn = $('#page_artdet_content').find('.js-main-product-cart-btn');
        }
        let cartadd = mainBtn.data("cartadd");
        mainBtn.addClass('loading');
        eval(cartadd);
    }
}
function closeVariantsOverlay(el) {
    let $thisCloseBtn = $(el);
    $thisCloseBtn.closest('.js-product').find('.js-variants').slideUp('slow', function() {
        $thisCloseBtn.closest('.js-product').removeClass('is-variants-opened');
    });
}

function openVariantsOverlay(el) {
    let $thisOpenBtn = $(el);
    if($thisOpenBtn.closest('.js-product').is('.all-variant-selected.is-variants-opened') || $thisOpenBtn.closest('.js-product').is('.all-variant-selected.js-variant-type-2') ){
        let cartadd = $thisOpenBtn.data("cartadd");
        eval(cartadd);
        return;
    }
    if(!$thisOpenBtn.closest('.js-product').hasClass('is-variants-opened') &amp;&amp; !$thisOpenBtn.closest('.js-product').hasClass('js-variant-type-2')){
        $thisOpenBtn.closest('.js-product').find('.js-variants').slideDown('slow', function(){
            $thisOpenBtn.closest('.js-product').addClass('is-variants-opened');
        });
    }else{
        checkVariants(el);
    }
}
$(window).bind("pageshow", function() {
    $('.js-variant-wrap').each(function () {
        $('select option', this).each(function () {
            if (this.defaultSelected) {
                this.selected = true;
                return false;
            }
        });
    });
    $('.cust_input_select:not(.param_cust_input_save_select)').each(function () {
        $('option', this).each(function () {
            if (this.defaultSelected) {
                this.selected = true;
                return false;
            }
        });
    });
    $('.cust_input_file, .cust_input_text').each(function () {
        let $this = $(this);
        if (!$this.hasClass('param_cust_input_save')) {
            $this.val("");
        }
        if ($this.hasClass('cust_input_file')) {
            $this.siblings(".file-name").html($this.siblings(".file-name").attr('data-empty'));
        }
    });
});

/**** FILE INPUT CUSTOMIZATION ****/
function file_input_filname_change(el){
    let thisInput = $(el);
    let fileName = thisInput.val().split("\\").pop();

    if (fileName === "") {
        let thisLabel = thisInput.next('.custom-file-label')
        thisLabel.html(thisLabel.attr('data-title'));
    } else {
        thisInput.next('.custom-file-label').html(fileName);
    }
}

/*** FLOATING LABELS FOR IE AND EDGE ***/
$(document).ready(function(){
    $('.form-label-group .form-control').each(function(){
        if ($(this).val()!=="") {
            $(this).addClass('placeholder-hide');
        } else {
            $(this).removeClass('placeholder-hide');
        }
    });
    $(document).on('change keypress blur', '.form-label-group .form-control', function () {
        if ($(this).val()!=="") {
            $(this).addClass('placeholder-hide');
        } else {
            $(this).removeClass('placeholder-hide');
        }
    });
});

/*** CUSTOM CONTENT/SHORT DESCRIPTION OPENER ***/
function readMoreOpener(){
    let $container = $(this);
    let $content = $('.read-more__content', $container);
    let $button = $('.read-more__btn', $container);
    let $contentHeight = $content.outerHeight(true);
    let $defaultMaxHeight = 220;
    let $dataMaxHeight =  $container.data('read-more-height');

    if ($dataMaxHeight != undefined &amp;&amp; $dataMaxHeight != "" ) {
        $defaultMaxHeight = $dataMaxHeight;
    }

    if ($contentHeight &gt; $defaultMaxHeight) {
        $container.addClass('has-button').css({height: $defaultMaxHeight + 'px'});

        $button.toggle(function () {
            $container.css('max-height', 'unset').addClass('is-opened').animate({height: $content.outerHeight(true) + $button.outerHeight(true)}, 400);
            $button.addClass('is-active');
        }, function () {
            $container.animate({height: $defaultMaxHeight}, 400).removeClass('is-opened');
            $button.removeClass('is-active');
        });
    }
    $(this).addClass('is-processed');
}

$(document).ready(function() {
    if ( typeof responsive_menu !== 'undefined' ) {
        eval(responsive_menu);
    }
});
if (service_type == 'shop') {
    $(document).ready(function() {
        toastr.options = {
            "positionClass": "toast-top-center",
            "closeButton": true
        }
    });
    $(document).on('addToCartSuccess', function (e, array) {
        if (config_plus['cart_redirect'] == 1) {
            if (array['qty'] &gt; array['qty_add']) {
                let text = lang_text_item_add_to_cart_with_qty_problem;

                text = text.replace("[qty_added_to_cart]", "&lt;span class='toast-qty'&gt;" + array['qty_add']);
                text = text.replace("[qty_unit]", array['unit'] + "&lt;/span&gt;");
                text = $.parseHTML(text);

                toastr.warning(text);
            } else {
                toastr.success(lang_text_item_add_to_cart);
            }
        }
    });
    $(document).on('onLoad onClose', function () {
        tippy.hideAll({duration: 500});
    });
}
if (service_type == 'cms') {
    $(document).on('click', function(e) {
       if ($(e.target).closest('#exposeMask').length || $(e.target).attr("id") == "exposeMask" || $(e.target).closest('.hamburger__btn-close').length){
           $('body').css("overflow","visible");
       }
    });
}</pre></body></html>