// source --> https://lgx.com.ua/wp-content/plugins/featured-image-from-url/includes/html/js/image.js?ver=4.6.5 
jQuery(document).ready(function ($) {
    // lazy load
    if (fifuImageVars.fifu_lazy)
        fifu_lazy();
    else {
        // no WordPress lazy load for the top images
        jQuery('img').each(function (index) {
            if (jQuery(this).offset().top < jQuery(window).height()) {
                jQuery(this).removeAttr('loading');
            }
        });
    }

    // woocommerce lightbox/zoom
    disableClick($);
    disableLink($);

    // zoomImg
    setTimeout(function () {
        jQuery('img.zoomImg').css('z-index', '');
        // Check if the zoomImg is missing an alt attribute and if its preceding sibling is an image
        if (!jQuery('img.zoomImg').attr('alt')) {
            const $zoomImg = jQuery('img.zoomImg');
            const $precedingImg = $zoomImg.prev('img');
            if ($precedingImg.length > 0) {
                $zoomImg.attr('alt', $precedingImg.attr('alt'));
            }
        }
    }, 1000);

    jQuery('img[height=1]').each(function (index) {
        if (jQuery(this).attr('width') != 1)
            jQuery(this).css('position', 'relative');
    });

    // load more buttons + lazy load
    jQuery('a.btn-load-more').on('click', function () {
        fifu_lazy();
    });
});

jQuery(window).on('ajaxComplete', function () {
    if (fifuImageVars.fifu_lazy)
        fifu_lazy();
});

jQuery(document).ajaxSuccess(function ($) {
    if (fifuImageVars.fifu_lazy)
        fifu_lazy_ajax();
});

var observer = new MutationObserver(function (mutations) {
    if (fifuImageVars.fifu_lazy) {
        mutations.forEach(function (mutation) {
            mutation.addedNodes.forEach(function (node) {
                if (jQuery(node).find('img').length > 0) {
                    // ignore WooCommerce zoom
                    if (!jQuery(node).hasClass('pswp__zoom-wrap')) {
                        jQuery(node).find('img').each(function (index) {
                            // dont touch on slider
                            if (jQuery(this).attr('src') == 'null' || jQuery(this).hasClass('lazyload'))
                                return;

                            fifu_lazy_ajax(this);
                        });
                    }
                    return;
                } else if (jQuery(node).prop('tagName') == 'IMG') {
                    // ignore WooCommerce zoom
                    if (!jQuery(node).hasClass('zoomImg'))
                        fifu_lazy_ajax(node);
                    return;
                }
            });
        });
    }
});
observer.observe(document, {attributes: false, childList: true, characterData: false, subtree: true});

function disableClick($) {
    if (!fifuImageVars.fifu_woo_lbox_enabled) {
        firstParentClass = '';
        parentClass = '';
        jQuery('figure.woocommerce-product-gallery__wrapper').find('div.woocommerce-product-gallery__image').each(function (index) {
            parentClass = jQuery(this).parent().attr('class').split(' ')[0];
            if (!firstParentClass)
                firstParentClass = parentClass;

            if (parentClass != firstParentClass)
                return false;

            jQuery(this).children().click(function () {
                return false;
            });
            jQuery(this).children().children().css("cursor", "default");
        });
    }
}

function disableLink($) {
    if (!fifuImageVars.fifu_woo_lbox_enabled) {
        firstParentClass = '';
        parentClass = '';
        jQuery('figure.woocommerce-product-gallery__wrapper').find('div.woocommerce-product-gallery__image').each(function (index) {
            parentClass = jQuery(this).parent().attr('class').split(' ')[0];
            if (!firstParentClass)
                firstParentClass = parentClass;

            if (parentClass != firstParentClass)
                return false;

            jQuery(this).children().attr("href", "");
        });
    }
}

jQuery(document).click(function ($) {
    fifu_fix_gallery_height();
})

function fifu_fix_gallery_height() {
    if (fifuImageVars.fifu_is_flatsome_active) {
        mainImage = jQuery('.woocommerce-product-gallery__wrapper div.flickity-viewport').find('img')[0];
        if (mainImage)
            jQuery('.woocommerce-product-gallery__wrapper div.flickity-viewport').css('height', mainImage.clientHeight + 'px');
    }
};
// source --> https://lgx.com.ua/wp-includes/js/jquery/ui/slider.min.js?ver=1.13.1 
/*!
 * jQuery UI Slider 1.13.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","./core"],e):e(jQuery)}(function(o){"use strict";return o.widget("ui.slider",o.ui.mouse,{version:"1.13.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,t=this.options,i=this.element.find(".ui-slider-handle"),s=[],a=t.values&&t.values.length||1;for(i.length>a&&(i.slice(a).remove(),i=i.slice(0,a)),e=i.length;e<a;e++)s.push("<span tabindex='0'></span>");this.handles=i.add(o(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){o(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:Array.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=o("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,a,n,t,h,l=this,r=this.options;return!r.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),h={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(h),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var t=Math.abs(i-l.values(e));(t<s||s===t&&(e===l._lastChangedValue||l.values(e)===r.min))&&(s=t,a=o(this),n=e)}),!1!==this._start(e,n)&&(this._mouseSliding=!0,this._handleIndex=n,this._addClass(a,null,"ui-state-active"),a.trigger("focus"),t=a.offset(),h=!o(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-t.left-a.width()/2,top:e.pageY-t.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,n,i),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},t=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,t),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,e="horizontal"===this.orientation?(t=this.elementSize.width,e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),e=e/t;return(e=1<e?1:e)<0&&(e=0),"vertical"===this.orientation&&(e=1-e),t=this._valueMax()-this._valueMin(),t=this._valueMin()+e*t,this._trimAlignValue(t)},_uiHash:function(e,t,i){var s={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==t?t:this.values(e),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,i){var s,a=this.value(),n=this.values();this._hasMultipleValues()&&(s=this.values(t?0:1),a=this.values(t),2===this.options.values.length&&!0===this.options.range&&(i=0===t?Math.min(s,i):Math.max(s,i)),n[t]=i),i!==a&&!1!==this._trigger("slide",e,this._uiHash(t,i,n))&&(this._hasMultipleValues()?this.values(t,i):this.value(i))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,t){var i,s,a;if(1<arguments.length)return this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!Array.isArray(e))return this._hasMultipleValues()?this._values(e):this.value();for(i=this.options.values,s=e,a=0;a<i.length;a+=1)i[a]=this._trimAlignValue(s[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,t){var i,s=0;switch("range"===e&&!0===this.options.range&&("min"===t?(this.options.value=this._values(0),this.options.values=null):"max"===t&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(e,t),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(t),this.handles.css("horizontal"===t?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i;if(arguments.length)return e=this.options.values[e],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(t=this.options.values.slice(),i=0;i<t.length;i+=1)t[i]=this._trimAlignValue(t[i]);return t}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=0<this.options.step?this.options.step:1,i=(e-this._valueMin())%t,e=e-i;return 2*Math.abs(i)>=t&&(e+=0<i?t:-t),parseFloat(e.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step;(e=Math.round((e-t)/i)*i+t)>this.options.max&&(e-=i),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return e=null!==this.options.min?Math.max(e,this._precisionOf(this.options.min)):e},_precisionOf:function(e){var t=e.toString(),e=t.indexOf(".");return-1===e?0:t.length-e-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,i,e,s,a,n=this.options.range,h=this.options,l=this,r=!this._animateOff&&h.animate,u={};this._hasMultipleValues()?this.handles.each(function(e){i=(l.values(e)-l._valueMin())/(l._valueMax()-l._valueMin())*100,u["horizontal"===l.orientation?"left":"bottom"]=i+"%",o(this).stop(1,1)[r?"animate":"css"](u,h.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===e&&l.range.stop(1,1)[r?"animate":"css"]({left:i+"%"},h.animate),1===e&&l.range[r?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:h.animate})):(0===e&&l.range.stop(1,1)[r?"animate":"css"]({bottom:i+"%"},h.animate),1===e&&l.range[r?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:h.animate}))),t=i}):(e=this.value(),s=this._valueMin(),a=this._valueMax(),i=a!==s?(e-s)/(a-s)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[r?"animate":"css"](u,h.animate),"min"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[r?"animate":"css"]({width:i+"%"},h.animate),"max"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[r?"animate":"css"]({width:100-i+"%"},h.animate),"min"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[r?"animate":"css"]({height:i+"%"},h.animate),"max"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[r?"animate":"css"]({height:100-i+"%"},h.animate))},_handleEvents:{keydown:function(e){var t,i,s,a=o(e.target).data("ui-slider-handle-index");switch(e.keyCode){case o.ui.keyCode.HOME:case o.ui.keyCode.END:case o.ui.keyCode.PAGE_UP:case o.ui.keyCode.PAGE_DOWN:case o.ui.keyCode.UP:case o.ui.keyCode.RIGHT:case o.ui.keyCode.DOWN:case o.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(o(e.target),null,"ui-state-active"),!1===this._start(e,a)))return}switch(s=this.options.step,t=i=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case o.ui.keyCode.HOME:i=this._valueMin();break;case o.ui.keyCode.END:i=this._valueMax();break;case o.ui.keyCode.PAGE_UP:i=this._trimAlignValue(t+(this._valueMax()-this._valueMin())/this.numPages);break;case o.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(t-(this._valueMax()-this._valueMin())/this.numPages);break;case o.ui.keyCode.UP:case o.ui.keyCode.RIGHT:if(t===this._valueMax())return;i=this._trimAlignValue(t+s);break;case o.ui.keyCode.DOWN:case o.ui.keyCode.LEFT:if(t===this._valueMin())return;i=this._trimAlignValue(t-s)}this._slide(e,a,i)},keyup:function(e){var t=o(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,t),this._change(e,t),this._removeClass(o(e.target),null,"ui-state-active"))}}})});
// source --> https://lgx.com.ua/wp-content/plugins/woocommerce/assets/js/jquery-ui-touch-punch/jquery-ui-touch-punch.min.js?ver=6.6.2 
/*!
 * jQuery UI Touch Punch 0.2.3
 *
 * Copyright 2011–2014, Dave Furfero
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Depends:
 *  jquery.ui.widget.js
 *  jquery.ui.mouse.js
 */
!function(t){var o,e,u,n;function c(o,t){var e,u;1<o.originalEvent.touches.length||(o.preventDefault(),e=o.originalEvent.changedTouches[0],(u=document.createEvent("MouseEvents")).initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),o.target.dispatchEvent(u))}t.support.touch="ontouchend"in document,t.support.touch&&(o=t.ui.mouse.prototype,e=o._mouseInit,u=o._mouseDestroy,o._touchStart=function(o){!n&&this._mouseCapture(o.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,c(o,"mouseover"),c(o,"mousemove"),c(o,"mousedown"))},o._touchMove=function(o){n&&(this._touchMoved=!0,c(o,"mousemove"))},o._touchEnd=function(o){n&&(c(o,"mouseup"),c(o,"mouseout"),this._touchMoved||c(o,"click"),n=!1)},o._mouseInit=function(){var o=this;o.element.on({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),e.call(o)},o._mouseDestroy=function(){var o=this;o.element.off({touchstart:t.proxy(o,"_touchStart"),touchmove:t.proxy(o,"_touchMove"),touchend:t.proxy(o,"_touchEnd")}),u.call(o)})}(jQuery);
// source --> https://lgx.com.ua/wp-content/plugins/woocommerce-currency-switcher/js/price-slider_33.js?ver=2.3.8 
"use strict";

/* global woocommerce_price_slider_params, accounting */
jQuery(function ($) {

    // woocommerce_price_slider_params is required to continue, ensure the object exists
    if (typeof woocommerce_price_slider_params === 'undefined') {
        return false;
    }

    $(document.body).on('price_slider_create price_slider_slide', function (event, min, max) {

        min = woocs_convert_price_slider(min);
        max = woocs_convert_price_slider(max);

        var woocs_format = "%v %s";
        if (woocs_current_currency.position === 'left') {
            woocs_format = "%s%v";
        } else if (woocs_current_currency.position === 'left_space') {
            woocs_format = "%s %v";
        } else if (woocs_current_currency.position === 'right') {
            woocs_format = "%v%s";

        } else if (woocs_current_currency.position === 'right_space') {
            woocs_format = "%v %s";
        }
        //woocommerce_price_slider_params.currency_format_num_decimals =woocs_current_currency.decimals;

        woocommerce_price_slider_params.currency_format_symbol = woocs_current_currency.symbol;
        woocommerce_price_slider_params.currency_format_num_decimals = woocs_current_currency.decimals;

        $('.price_slider_amount span.from').html(accounting.formatMoney(min, {
            symbol: woocommerce_price_slider_params.currency_format_symbol,
            decimal: woocommerce_price_slider_params.currency_format_decimal_sep,
            thousand: woocommerce_price_slider_params.currency_format_thousand_sep,
            precision: woocommerce_price_slider_params.currency_format_num_decimals,
            format: woocs_format
        }));

        $('.price_slider_amount span.to').html(accounting.formatMoney(max, {
            symbol: woocommerce_price_slider_params.currency_format_symbol,
            decimal: woocommerce_price_slider_params.currency_format_decimal_sep,
            thousand: woocommerce_price_slider_params.currency_format_thousand_sep,
            precision: woocommerce_price_slider_params.currency_format_num_decimals,
            format: woocs_format
        }));

        $(document.body).trigger('price_slider_updated', [min, max]);
    });

    function init_price_filter() {
        $('input#min_price, input#max_price').hide();
        $('.price_slider, .price_label').show();

        var min_price = $('.price_slider_amount #min_price').data('min'),
                max_price = $('.price_slider_amount #max_price').data('max'),
                current_min_price = $('.price_slider_amount #min_price').val(),
                current_max_price = $('.price_slider_amount #max_price').val();

        $('.price_slider:not(.ui-slider)').slider({
            range: true,
            animate: true,
            min: min_price,
            max: max_price,
            values: [current_min_price, current_max_price],
            create: function () {

                $('.price_slider_amount #min_price').val(current_min_price);
                $('.price_slider_amount #max_price').val(current_max_price);

                $(document.body).trigger('price_slider_create', [current_min_price, current_max_price]);
            },
            slide: function (event, ui) {

                $('input#min_price').val(ui.values[0]);
                $('input#max_price').val(ui.values[1]);

                $(document.body).trigger('price_slider_slide', [woocs_convert_price_slider(ui.values[0]), woocs_convert_price_slider(ui.values[1])]);
            },
            change: function (event, ui) {

                $(document.body).trigger('price_slider_change', [ui.values[0], ui.values[1]]);
            }
        });

    }

    init_price_filter();

    var hasSelectiveRefresh = (
            'undefined' !== typeof wp &&
            wp.customize &&
            wp.customize.selectiveRefresh &&
            wp.customize.widgetsPreview &&
            wp.customize.widgetsPreview.WidgetPartial
            );
    if (hasSelectiveRefresh) {
        wp.customize.selectiveRefresh.bind('partial-content-rendered', function () {
            init_price_filter();
        });
    }
});

function  woocs_convert_price_slider(price) {
    var label = price;

    if (woocs_current_currency.rate !== 1) {
        label = Math.ceil(label * parseFloat(woocs_current_currency.rate));
    }

    //+++
    return label;
};
// source --> https://lgx.com.ua/wp-content/plugins/woocommerce-currency-switcher/js/jquery.ddslick.min.js?ver=2.3.8 
"use strict";

(function (a) { function g(a, b) { var c = a.data("ddslick"); var d = a.find(".dd-selected"), e = d.siblings(".dd-selected-value"), f = a.find(".dd-options"), g = d.siblings(".dd-pointer"), h = a.find(".dd-option").eq(b), k = h.closest("li"), l = c.settings, m = c.settings.data[b]; a.find(".dd-option").removeClass("dd-option-selected"); h.addClass("dd-option-selected"); c.selectedIndex = b; c.selectedItem = k; c.selectedData = m; if (l.showSelectedHTML) { d.html((m.imageSrc ? '<img class="dd-selected-image' + (l.imagePosition == "right" ? " dd-image-right" : "") + '" src="' + m.imageSrc + '" />' : "") + (m.text ? '<label class="dd-selected-text">' + m.text + "</label>" : "") + (m.description ? '<small class="dd-selected-description dd-desc' + (l.truncateDescription ? " dd-selected-description-truncated" : "") + '" >' + m.description + "</small>" : "")) } else d.html(m.text); e.val(m.value); c.original.val(m.value); a.data("ddslick", c); i(a); j(a); if (typeof l.onSelected == "function") { l.onSelected.call(this, c) } } function h(b) { var c = b.find(".dd-select"), d = c.siblings(".dd-options"), e = c.find(".dd-pointer"), f = d.is(":visible"); a(".dd-click-off-close").not(d).slideUp(50); a(".dd-pointer").removeClass("dd-pointer-up"); if (f) { d.slideUp("fast"); e.removeClass("dd-pointer-up") } else { d.slideDown("fast"); e.addClass("dd-pointer-up") } k(b) } function i(a) { a.find(".dd-options").slideUp(50); a.find(".dd-pointer").removeClass("dd-pointer-up").removeClass("dd-pointer-up") } function j(a) { var b = a.find(".dd-select").css("height"); var c = a.find(".dd-selected-description"); var d = a.find(".dd-selected-image"); if (c.length <= 0 && d.length > 0) { a.find(".dd-selected-text").css("lineHeight", b) } } function k(b) { b.find(".dd-option").each(function () { var c = a(this); var d = c.css("height"); var e = c.find(".dd-option-description"); var f = b.find(".dd-option-image"); if (e.length <= 0 && f.length > 0) { c.find(".dd-option-text").css("lineHeight", d) } }) } a.fn.ddslick = function (c) { if (b[c]) { return b[c].apply(this, Array.prototype.slice.call(arguments, 1)) } else if (typeof c === "object" || !c) { return b.init.apply(this, arguments) } else {} }; var b = {}, c = { data: [], keepJSONItemsOnTop: false, width: 260, height: null, background: "#eee", selectText: "", defaultSelectedIndex: null, truncateDescription: true, imagePosition: "left", showSelectedHTML: true, clickOffToClose: true, onSelected: function () { } }, d = '<div class="dd-select"><input class="dd-selected-value" type="hidden" /><a class="dd-selected"></a><span class="dd-pointer dd-pointer-down"></span></div>', e = '<ul class="dd-options"></ul>', f = '<style id="css-ddslick" type="text/css">' + ".dd-select{ border-radius:2px; border:solid 1px #ccc; position:relative; cursor:pointer;}" + ".dd-desc { color:#aaa; display:block; overflow: hidden; font-weight:normal; line-height: 1.4em; }" + ".dd-selected{ overflow:hidden; display:block; padding:10px; font-weight:bold;}" + ".dd-pointer{ width:0; height:0; position:absolute; right:10px; top:50%; margin-top:-3px;}" + ".dd-pointer-down{ border:solid 5px transparent; border-top:solid 5px #000; }" + ".dd-pointer-up{border:solid 5px transparent !important; border-bottom:solid 5px #000 !important; margin-top:-8px;}" + ".dd-options{ border:solid 1px #ccc; border-top:none; list-style:none; box-shadow:0px 1px 5px #ddd; display:none; position:absolute; z-index:2000; margin:0; padding:0;background:#fff; overflow:auto;}" + ".dd-option{ padding:10px; display:block; border-bottom:solid 1px #ddd; overflow:hidden; text-decoration:none; color:#333; cursor:pointer;-webkit-transition: all 0.25s ease-in-out; -moz-transition: all 0.25s ease-in-out;-o-transition: all 0.25s ease-in-out;-ms-transition: all 0.25s ease-in-out; }" + ".dd-options > li:last-child > .dd-option{ border-bottom:none;}" + ".dd-option:hover{ background:#f3f3f3; color:#000;}" + ".dd-selected-description-truncated { text-overflow: ellipsis; white-space:nowrap; }" + ".dd-option-selected { background:#f6f6f6; }" + ".dd-option-image, .dd-selected-image { vertical-align:middle; float:left; margin-right:5px; max-width:64px;}" + ".dd-image-right { float:right; margin-right:15px; margin-left:5px;}" + ".dd-container{ position:relative;}​ .dd-selected-text { font-weight:bold}​</style>"; if (a("#css-ddslick").length <= 0) { a(f).appendTo("head") } b.init = function (b) { var b = a.extend({}, c, b); return this.each(function () { var c = a(this), f = c.data("ddslick"); if (!f) { var i = [], j = b.data; c.find("option").each(function () { var b = a(this), c = b.data(); i.push({ text: b.text().trim(), value: b.val(), selected: b.is(":selected"), description: c.description, imageSrc: c.imagesrc }) }); if (b.keepJSONItemsOnTop) a.merge(b.data, i); else b.data = a.merge(i, b.data); var k = c, l = a('<div id="' + c.attr("id") + '"></div>'); c.replaceWith(l); c = l; c.addClass("dd-container").append(d).append(e); var i = c.find(".dd-select"), m = c.find(".dd-options"); m.css({ width: b.width }); i.css({ width: b.width, background: b.background }); c.css({ width: b.width }); if (b.height != null) m.css({ height: b.height, overflow: "auto" }); a.each(b.data, function (a, c) { if (c.selected) b.defaultSelectedIndex = a; m.append("<li>" + '<a class="dd-option">' + (c.value ? ' <input class="dd-option-value" type="hidden" value="' + c.value + '" />' : "") + (c.imageSrc ? ' <img class="dd-option-image' + (b.imagePosition == "right" ? " dd-image-right" : "") + '" src="' + c.imageSrc + '" />' : "") + (c.text ? ' <label class="dd-option-text">' + c.text + "</label>" : "") + (c.description ? ' <small class="dd-option-description dd-desc">' + c.description + "</small>" : "") + "</a>" + "</li>") }); var n = { settings: b, original: k, selectedIndex: -1, selectedItem: null, selectedData: null }; c.data("ddslick", n); if (b.selectText.length > 0 && b.defaultSelectedIndex == null) { c.find(".dd-selected").html(b.selectText) } else { var o = b.defaultSelectedIndex != null && b.defaultSelectedIndex >= 0 && b.defaultSelectedIndex < b.data.length ? b.defaultSelectedIndex : 0; g(c, o) } c.find(".dd-select").on("click.ddslick", function () { h(c) }); c.find(".dd-option").on("click.ddslick", function () { g(c, a(this).closest("li").index()) }); if (b.clickOffToClose) { m.addClass("dd-click-off-close"); c.on("click.ddslick", function (a) { a.stopPropagation() }); a("body").on("click", function () { a(".dd-click-off-close").slideUp(50).siblings(".dd-select").find(".dd-pointer").removeClass("dd-pointer-up") }) } } }) }; b.select = function (b) { return this.each(function () { if (b.index) g(a(this), b.index) }) }; b.open = function () { return this.each(function () { var b = a(this), c = b.data("ddslick"); if (c) h(b) }) }; b.close = function () { return this.each(function () { var b = a(this), c = b.data("ddslick"); if (c) i(b) }) }; b.destroy = function () { return this.each(function () { var b = a(this), c = b.data("ddslick"); if (c) { var d = c.original; b.removeData("ddslick").unbind(".ddslick").replaceWith(d) } }) } })(jQuery);
// source --> https://lgx.com.ua/wp-content/plugins/woocommerce-currency-switcher/js/front.js?ver=2.3.8 
"use strict";
var woocs_loading_first_time = true;//simply flag var
var woocs_sumbit_currency_changing = true;//just a flag variable for drop-down redraws when prices redraws by AJAX

jQuery(function ($) {
    
    if(typeof woocs_array_of_get === 'undefined'){
        return;//to avoid notices and errors
    }

    woocs_array_of_get = JSON.parse(woocs_array_of_get);

    //wp-content\plugins\woocommerce\assets\js\frontend\cart.js
    if (Object.keys(woocs_array_of_get).length !== 0) {
        if ('currency' in woocs_array_of_get) {
            //this code nessesary for correct redrawing of the shipping methods while currency changes on the cart page
            $('body.woocommerce-cart .shop_table.cart').closest('form').find('input[name="update_cart"]').prop('disabled', false);
            $('body.woocommerce-cart .shop_table.cart').closest('form').find('input[name="update_cart"]').trigger('click');
        }
    }

    //keeps data of $_GET array

    if (Object.keys(woocs_array_of_get).length == 0) {
        woocs_array_of_get = {};
    }

    //***
    woocs_array_no_cents = JSON.parse(woocs_array_no_cents);

    //***

    //emptying cart widget after checkout
    if (!parseInt(woocs_get_cookie('woocommerce_items_in_cart'), 10)) {
        $('.widget_shopping_cart_content').empty();
        $(document.body).trigger('wc_fragment_refresh');
    }

    if (woocs_array_of_get.currency != undefined || woocs_array_of_get.removed_item != undefined || woocs_array_of_get.key != undefined)
    {
        woocs_refresh_mini_cart(555);
    }
    if (woocs_redraw_cart) {
        //intercept adding to cart event to redraw mini-cart widget
        jQuery(document).on("adding_to_cart", function () {
            woocs_refresh_mini_cart(999);
        });
    }

    //to make price popup mobile friendly
    jQuery('body').on('click', '.woocs_price_info', function () {
        return false;
    });

    //+++++++++++++++++++++++++++++++++++++++++++++++

    if (woocs_drop_down_view == 'chosen' || woocs_drop_down_view == 'chosen_dark') {
        try {
            if (jQuery("select.woocommerce-currency-switcher").length) {
                jQuery("select.woocommerce-currency-switcher").chosen({
                    disable_search_threshold: 10
                });

                jQuery.each(jQuery('.woocommerce-currency-switcher-form .chosen-container'), function (index, obj) {
                    jQuery(obj).css({'width': jQuery(this).prev('select').data('width')});
                });
            }
        } catch (e) {
            console.log(e);
        }
    }



    if (woocs_drop_down_view == 'ddslick') {
        try {
            woocs_init_ddslick_select();

        } catch (e) {
            console.log(e);
        }
    }

    woocs_loading_first_time = false;


    if (woocs_drop_down_view == 'wselect' && woocs_is_mobile != 1) {
        try {
            //https://github.com/websanova/wSelect#wselectjs
            jQuery('select.woocommerce-currency-switcher').wSelect({
                size: 7
            });
        } catch (e) {
            console.log(e);
        }
    }

    //for flags view instead of drop-down
    jQuery('.woocs_flag_view_item').on("click", function () {
        if (woocs_sumbit_currency_changing) {
            if (jQuery(this).hasClass('woocs_flag_view_item_current')) {
                return false;
            }
            //***

            if (Object.keys(woocs_array_of_get).length == 0) {
                window.location = window.location.href + '?currency=' + jQuery(this).data('currency');
            } else {

                woocs_redirect(jQuery(this).data('currency'));

            }
        }

        return false;
    });

    //for converter
    if (jQuery('.woocs_converter_shortcode').length) {
        jQuery('.woocs_converter_shortcode_button').on("click", function () {
            var amount = jQuery(this).parent('.woocs_converter_shortcode').find('.woocs_converter_shortcode_amount').eq(0).val();
            var from = jQuery(this).parent('.woocs_converter_shortcode').find('.woocs_converter_shortcode_from').eq(0).val();
            var to = jQuery(this).parent('.woocs_converter_shortcode').find('.woocs_converter_shortcode_to').eq(0).val();
            var precision = jQuery(this).parent('.woocs_converter_shortcode').find('.woocs_converter_shortcode_precision').eq(0).val();
            var results_obj = jQuery(this).parent('.woocs_converter_shortcode').find('.woocs_converter_shortcode_results').eq(0);
            jQuery(results_obj).val(woocs_lang_loading + ' ...');
            var data = {
                action: "woocs_convert_currency",
                amount: amount,
                from: from,
                to: to,
                precision: precision
            };

            jQuery.post(woocs_ajaxurl, data, function (value) {
                jQuery(results_obj).val(value);
            });

            return false;

        });
    }

    //for rates
    if (jQuery('.woocs_rates_shortcode').length) {
        jQuery('body').on('change', '.woocs_rates_current_currency', function () {
            var _this = this;
            var data = {
                action: "woocs_rates_current_currency",
                current_currency: jQuery(this).val(),
                precision: jQuery(this).data('precision'),
                exclude: jQuery(this).data('exclude')
            };

            jQuery.post(woocs_ajaxurl, data, function (html) {
                jQuery(_this).parent('.woocs_rates_shortcode').html(html);
            });

            return false;

        });
    }

    //if we using js price update while the site is cached
    if (typeof woocs_shop_is_cached !== 'undefined') {
        if (woocs_shop_is_cached) {

            setTimeout(function () {
                woocs_sumbit_currency_changing = false;
                if (typeof woocs_array_of_get.currency === 'undefined') {

                    if (jQuery('body').hasClass('single')) {
                        jQuery('.woocs_price_info').remove();
                    }

                    /****/
                    var custom_prices = [];
                    jQuery.each(jQuery('.woocs_amount_custom_price'), function (index, item) {
                        custom_prices.push(jQuery(item).data('value'));
                    });
                    if (custom_prices.length != 0) {

                        var data = {
                            action: "woocs_get_custom_price_html",
                            custom_prices: custom_prices
                        };
                        jQuery.post(woocs_ajaxurl, data, function (data) {
                            data = JSON.parse(data);

                            if (!jQuery.isEmptyObject(data)) {
                                jQuery.each(data, function (val, price) {
                                    jQuery(".woocs_amount_custom_price[data-value='" + val + "']").replaceWith(price);
                                });

                            }
                        });
                    }


                    /****/

                    var variation_ids = [];
                    var var_data = jQuery("form.variations_form").data("product_variations");
                    if (typeof var_data != "undefined") {
                        jQuery.each(var_data, function (indx, attr) {
                            variation_ids.push(attr['variation_id']);
                        });
                        if (variation_ids.length != 0) {
                            var data_var = {
                                action: "woocs_get_variation_products_price_html",
                                var_products_ids: variation_ids
                            };

                            jQuery.post(woocs_ajaxurl, data_var, function (data) {
                                data = JSON.parse(data);

                                if (!jQuery.isEmptyObject(data)) {
                                    jQuery.each(var_data, function (indx, attr) {
                                        if (typeof data[attr['variation_id']] != "undefined") {
                                            var_data[indx]['price_html'] = data[attr['variation_id']];
                                        }
                                    });
                                    jQuery("form.variations_form").data("product_variations", var_data);
                                }
                            });
                        }
                    }

                    //***
                    var products_ids = [];
                    jQuery.each(jQuery('.woocs_price_code'), function (index, item) {
                        products_ids.push(jQuery(item).data('product-id'));
                    });

                    //if no prices on the page - do nothing
                    if (products_ids.length === 0) {
                        woocs_sumbit_currency_changing = true;
                        return;
                    }


                    var data = {
                        action: "woocs_get_products_price_html",
                        products_ids: products_ids,
                    };

                    jQuery.post(woocs_ajaxurl, data, function (data) {

                        data = JSON.parse(data);
                        if (!jQuery.isEmptyObject(data)) {
                            jQuery('.woocs_price_info').remove();
			    jQuery('.woocs_price_approx.woocs_cart_item_price').remove();
                            jQuery.each(jQuery('.woocs_price_code'), function (index, item) {

                                if (data.ids[jQuery(item).data('product-id')] != undefined) {
                                    jQuery(item).replaceWith(data.ids[jQuery(item).data('product-id')]);
                                }

                            });
                            jQuery('.woocs_price_code').removeClass('woocs_preloader_ajax');
                            //***
                            jQuery('.woocommerce-currency-switcher').val(data.current_currency);
                            //***
                            if (woocs_drop_down_view == 'chosen' || woocs_drop_down_view == 'chosen_dark') {
                                try {
                                    if (jQuery("select.woocommerce-currency-switcher").length) {
                                        jQuery("select.woocommerce-currency-switcher").chosen({
                                            disable_search_threshold: 10
                                        });
                                        jQuery('select.woocommerce-currency-switcher').trigger("chosen:updated");
                                    }
                                } catch (e) {
                                    console.log(e);
                                }
                            }
                            if (typeof data.currency_data != "undefined") {
                                woocs_current_currency = data.currency_data;
                                /* Price  slider */
                                var min = jQuery('.price_slider_amount #min_price').val();
                                var max = jQuery('.price_slider_amount #max_price').val();
                                if (typeof max != 'undefined' && typeof min != 'undefined') {
                                    max = woocs_convert_price_slider(max);
                                    min = woocs_convert_price_slider(min);
                                    jQuery(document.body).trigger('price_slider_create', [min, max]);
                                }
                            }
                            //***
                            if (woocs_drop_down_view == 'ddslick') {
                                try {
                                    jQuery('div.dd-container').ddslick('destroy');
                                    jQuery('select.woocommerce-currency-switcher').val(data.current_currency);
                                    woocs_init_ddslick_select();
                                } catch (e) {
                                    console.log(e);
                                }
                            }
                            //***
                            if (woocs_drop_down_view == 'wselect' && woocs_is_mobile != 1) {
                                //https://github.com/websanova/wSelect
                                try {
                                    jQuery('select.woocommerce-currency-switcher').val(data.current_currency).change();
                                } catch (e) {
                                    console.log(e);
                                }
                            }
                            //***
                            /* auto switcher*/

                            var auto_switcher = jQuery('.woocs_auto_switcher');
                            if (auto_switcher.length > 0) {
                                woocs_auto_switcher_redraw(data.current_currency, auto_switcher);
                            }
                            woocs_sumbit_currency_changing = true;

                            var shortcode_currency = jQuery('strong.woocs_current_currency_code');
                            if (shortcode_currency.length) {
                                shortcode_currency.text(data.current_currency);
                            }


                            //***
                            //for another woocs switchers styles
                            document.dispatchEvent(new CustomEvent('after_woocs_get_products_price_html', {detail: {
                                    current_currency: data.current_currency
                                }}));
                        }

                    });

                } else {
                    woocs_sumbit_currency_changing = true;
                    jQuery('.woocs_price_code').removeClass('woocs_preloader_ajax');
                }
            }, 300);

        }
    }

    //***
    //removing price info on single page near variation prices
    setTimeout(function () {
        //jQuery('body.single-product .woocommerce-variation-price').find('.woocs_price_info').remove();
    }, 300);
    //***


});


function woocs_redirect(currency) {
    if (!woocs_sumbit_currency_changing) {
        return;
    }

    //***
    var l = window.location.href;
    //  l = l.replace('#', '');
    var l_tmp = l.split('#');
    l = l_tmp[0];
    var id_key = "";
    if (l_tmp.length > 1) {
        id_key = "#" + l_tmp[1]
    }
    //for #id navigation     l = l.replace(/(#.+$)/gi, '');

    l = l.split('?');
    l = l[0];
    var string_of_get = '?';
    woocs_array_of_get.currency = currency;

    /*
     l = l.replace(/(\?currency=[a-zA-Z]+)/g, '?');
     l = l.replace(/(&currency=[a-zA-Z]+)/g, '');
     */

    if (woocs_special_ajax_mode) {
        string_of_get = "";

        var data = {
            action: "woocs_set_currency_ajax",
            currency: currency
        };

        jQuery.post(woocs_ajaxurl, data, function (value) {
            location.reload();
        });

    } else {
        if (Object.keys(woocs_array_of_get).length > 0) {
            jQuery.each(woocs_array_of_get, function (index, value) {
                string_of_get = string_of_get + "&" + index + "=" + value;
            });

        }
        window.location = l + string_of_get + id_key;
    }


}

function woocs_refresh_mini_cart(delay) {
    /** Cart Handling */
    setTimeout(function () {
        try {

            //for refreshing mini cart
            $fragment_refresh = {
                url: wc_cart_fragments_params.ajax_url,
                type: 'POST',
                data: {action: 'woocommerce_get_refreshed_fragments', woocs_woocommerce_before_mini_cart: 'mini_cart_refreshing'},
                success: function (data) {
                    if (data && data.fragments) {

                        jQuery.each(data.fragments, function (key, value) {
                            jQuery(key).replaceWith(value);
                        });

                        try {
                            if ($supports_html5_storage) {
                                sessionStorage.setItem(wc_cart_fragments_params.fragment_name, JSON.stringify(data.fragments));
                                sessionStorage.setItem('wc_cart_hash', data.cart_hash);
                            }
                        } catch (e) {

                        }

                        jQuery('body').trigger('wc_fragments_refreshed');
                    }
                }
            };

            jQuery.ajax($fragment_refresh);


            /* Cart hiding */
            try {
                if (woocs_get_cookie('woocommerce_items_in_cart') > 0)
                {
                    jQuery('.hide_cart_widget_if_empty').closest('.widget_shopping_cart').show();
                } else {
                    jQuery('.hide_cart_widget_if_empty').closest('.widget_shopping_cart').hide();
                }
            } catch (e) {
                //***
            }


            jQuery('body').on('adding_to_cart', function () {
                jQuery('.hide_cart_widget_if_empty').closest('.widget_shopping_cart').show();
            });

        } catch (e) {
            //***
        }

    }, delay);

}

function woocs_get_cookie(name) {
    var matches = document.cookie.match(new RegExp(
            "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
            ));
    return matches ? decodeURIComponent(matches[1]) : undefined;
}

/*auto switcher*/

jQuery(function () {
    jQuery('.woocs_auto_switcher_link').on('click', function () {
        woocs_redirect(jQuery(this).data('currency'));
        return false;
    });

    jQuery('.woocs_auto_switcher li').on('click', function (e) {
        woocs_redirect(jQuery(this).find('a.woocs_auto_switcher_link').data('currency'));
        return false;
    });
});

function woocs_auto_switcher_redraw(curr_curr, switcher) {
    var view = switcher.data('view');
    switch (view) {
        case 'classic_blocks':
            switcher.find('a').removeClass('woocs_curr_curr');
            switcher.find('a[data-currency="' + curr_curr + '"]').addClass('woocs_curr_curr');
            break;
        case 'roll_blocks':
            switcher.find('a').removeClass('woocs_curr_curr');
            switcher.find('li').removeClass('woocs_auto_bg_woocs_curr_curr');
            var current_link = switcher.find('a[data-currency="' + curr_curr + '"]');
            current_link.addClass('woocs_curr_curr');
            current_link.parents('li').addClass('woocs_auto_bg_woocs_curr_curr');
            break;
        case 'round_select':
            switcher.find('a').removeClass('woocs_curr_curr');
            var current_link = switcher.find('a[data-currency="' + curr_curr + '"]');
            current_link.addClass('woocs_curr_curr');
            jQuery('.woocs_current_text').html(current_link.find('.woocs_base_text').html());
            break;
        default:
            break;
    }

}

function woocs_remove_link_param(key, sourceURL) {
    var rtn = sourceURL.split("?")[0],
            param,
            params_arr = [],
            queryString = (sourceURL.indexOf("?") !== -1) ? sourceURL.split("?")[1] : "";
    if (queryString !== "") {
        params_arr = queryString.split("&");
        for (var i = params_arr.length - 1; i >= 0; i -= 1) {
            param = params_arr[i].split("=")[0];
            if (param === key) {
                params_arr.splice(i, 1);
            }
        }
        rtn = rtn + "?" + params_arr.join("&");
    }
    return rtn;
}

function woocs_init_ddslick_select() {
    jQuery.each(jQuery('select.woocommerce-currency-switcher'), function (index, obj) {
        var width = jQuery(obj).data('width');
        var flag_position = jQuery(obj).data('flag-position');
        jQuery(obj).ddslick({
            //data: ddData,
            width: width,
            imagePosition: flag_position,
            selectText: "Select currency",
            //background:'#ff0000',
            onSelected: function (data) {
                if (!woocs_loading_first_time)
                {
                    var form = jQuery(data.selectedItem).closest('form.woocommerce-currency-switcher-form');
                    jQuery(form).find('input[name="woocommerce-currency-switcher"]').eq(0).val(data.selectedData.value);

                    if (Object.keys(woocs_array_of_get).length == 0) {
                        //jQuery(form).submit();
                        woocs_redirect(data.selectedData.value);
                    } else {
                        woocs_redirect(data.selectedData.value);
                    }
                }

            }
        });
    });
};
// source --> https://lgx.com.ua/wp-includes/js/jquery/ui/accordion.min.js?ver=1.13.1 
/*!
 * jQuery UI Accordion 1.13.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./core"],e):e(jQuery)}(function(o){"use strict";return o.widget("ui.accordion",{version:"1.13.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(e){return e.find("> li > :first-child").add(e.find("> :not(li)").even())},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=o(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():o()}},_createIcons:function(){var e,t=this.options.icons;t&&(e=o("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+t.header),e.prependTo(this.headers),e=this.active.children(".ui-accordion-header-icon"),this._removeClass(e,t.header)._addClass(e,null,t.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"!==e?("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons())):this._activate(t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!e)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var t=o.ui.keyCode,i=this.headers.length,a=this.headers.index(e.target),s=!1;switch(e.keyCode){case t.RIGHT:case t.DOWN:s=this.headers[(a+1)%i];break;case t.LEFT:case t.UP:s=this.headers[(a-1+i)%i];break;case t.SPACE:case t.ENTER:this._eventHandler(e);break;case t.HOME:s=this.headers[0];break;case t.END:s=this.headers[i-1]}s&&(o(e.target).attr("tabIndex",-1),o(s).attr("tabIndex",0),o(s).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===o.ui.keyCode.UP&&e.ctrlKey&&o(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=o()):!1===e.active?this._activate(0):this.active.length&&!o.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=o()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var i,e=this.options,t=e.heightStyle,a=this.element.parent();this.active=this._findActive(e.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=o(this),t=e.uniqueId().attr("id"),i=e.next(),a=i.uniqueId().attr("id");e.attr("aria-controls",a),i.attr("aria-labelledby",t)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(e.event),"fill"===t?(i=a.height(),this.element.siblings(":visible").each(function(){var e=o(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=o(this).outerHeight(!0)}),this.headers.next().each(function(){o(this).height(Math.max(0,i-o(this).innerHeight()+o(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.headers.next().each(function(){var e=o(this).is(":visible");e||o(this).show(),i=Math.max(i,o(this).css("height","").height()),e||o(this).hide()}).height(i))},_activate:function(e){e=this._findActive(e)[0];e!==this.active[0]&&(e=e||this.active[0],this._eventHandler({target:e,currentTarget:e,preventDefault:o.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):o()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&o.each(e.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var t=this.options,i=this.active,a=o(e.currentTarget),s=a[0]===i[0],n=s&&t.collapsible,h=n?o():a.next(),r=i.next(),h={oldHeader:i,oldPanel:r,newHeader:n?o():a,newPanel:h};e.preventDefault(),s&&!t.collapsible||!1===this._trigger("beforeActivate",e,h)||(t.active=!n&&this.headers.index(a),this.active=s?o():a,this._toggle(h),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),t.icons&&(i=i.children(".ui-accordion-header-icon"),this._removeClass(i,null,t.icons.activeHeader)._addClass(i,null,t.icons.header)),s||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),t.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,t.icons.header)._addClass(s,null,t.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var t=e.newPanel,i=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=t,this.prevHide=i,this.options.animate?this._animate(t,i,e):(i.hide(),t.show(),this._toggleComplete(e)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),t.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):t.length&&this.headers.filter(function(){return 0===parseInt(o(this).attr("tabIndex"),10)}).attr("tabIndex",-1),t.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,i,t){var a,s,n,h=this,r=0,o=e.css("box-sizing"),d=e.length&&(!i.length||e.index()<i.index()),c=this.options.animate||{},l=d&&c.down||c,d=function(){h._toggleComplete(t)};return s=(s="string"==typeof l?l:s)||l.easing||c.easing,n=(n="number"==typeof l?l:n)||l.duration||c.duration,i.length?e.length?(a=e.show().outerHeight(),i.animate(this.hideProps,{duration:n,easing:s,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:n,easing:s,complete:d,step:function(e,t){t.now=Math.round(e),"height"!==t.prop?"content-box"===o&&(r+=t.now):"content"!==h.options.heightStyle&&(t.now=Math.round(a-i.outerHeight()-r),r=0)}})):i.animate(this.hideProps,n,s,d):e.animate(this.showProps,n,s,d)},_toggleComplete:function(e){var t=e.oldPanel,i=t.prev();this._removeClass(t,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}})});
// source --> https://lgx.com.ua/wp-content/plugins/wc-dynamic-pricing-and-discounts/rightpress/jquery-plugins/rightpress-helper/rightpress-helper.js?ver=1025 
/**
 * RightPress Javascript Helper Functions
 */

(function () {

    'use strict';

    /**
     * Register functions
     */
    jQuery.extend({

        rightpress: {

            /**
             * Attempt to sanitize JSON response
             * For use as jQuery Ajax dataFilter
             * Response must start with {"result and end with ]}
             */
            sanitize_json_response: function(response) {

                try {

                    // Attempt to parse JSON
                    jQuery.parseJSON(response);

                    // Parsing succeeded
                    return response;
                }
                catch (e) {

                    // Attempt to fix malformed JSON string
                    var valid_response = response.match(/{"result.*]}/);

                    // Check if we were able to fix it
                    if (valid_response !== null) {
                        return valid_response[0];
                    }
                }
            },

            /**
             * Safely parse JSON Ajax response
             */
            parse_json_response: function (response, return_raw_data) {

                // Check if we need to return parsed object or potentially fixed raw data
                var return_raw_data = (typeof return_raw_data !== 'undefined') ?  return_raw_data : false;

                try {

                    // Attempt to parse data
                    var parsed = jQuery.parseJSON(response);

                    // Return appropriate value
                    return return_raw_data ? response : parsed;
                }
                catch (e) {

                    // Attempt to fix malformed JSON string
                    var regex = return_raw_data ? /{"result.*"}]}/ : /{"result.*"}/;
                    var valid_response = response.match(regex);

                    // Check if we were able to fix it
                    if (valid_response !== null) {
                        response = valid_response[0];
                    }
                }

                // Second attempt to parse response data
                return return_raw_data ? response : jQuery.parseJSON(response);
            },

            /**
             * Add nested object value
             */
            add_nested_object_value: function (object, path, value) {

                var last_key_index = path.length - 1;

                for (var i = 0; i < last_key_index; ++ i) {

                    var key = jQuery.isNumeric(path[i]) ? parseInt(path[i]) : path[i];

                    if (jQuery.isNumeric(path[i + 1])) {
                        if (typeof object[key] === 'undefined') {
                            object[key] = [];
                        }
                    }
                    else if (!(key in object)) {
                        object[key] = {};
                    }

                    object = object[key];
                }

                object[path[last_key_index]] = value;
            },

            /**
             * Nested object key existence check
             */
            object_key_check: function (object /*, key_1, key_2... */) {

                var keys = Array.prototype.slice.call(arguments, 1);
                var current = object;

                // Iterate over keys
                for (var i = 0; i < keys.length; i++) {

                    // Check if current key exists
                    if (typeof current[keys[i]] === 'undefined') {
                        return false;
                    }

                    // Check if all but last keys are for object
                    if (i < (keys.length - 1) && typeof current[keys[i]] !== 'object') {
                        return false;
                    }

                    // Go one step down
                    current = current[keys[i]];
                }

                // If we reached this point all keys from path
                return true;
            },

            /**
             * Clear field value
             */
            clear_field_value: function (field) {

                if (field.is('select')) {
                    field.prop('selectedIndex', 0);
                    if (field.hasClass('rightpress_select2')) {
                        field.val('').change();
                    }
                }
                else if (field.is(':radio, :checkbox')) {
                    field.removeAttr('checked');
                }
                else {
                    field.val('');
                }
            },

            /**
             * Check if field is multiselect
             */
            field_is_multiselect: function (field) {
                return (field.is('select') && typeof field.attr('multiple') !== 'undefined' && field.attr('multiple') !== false);
            },

            /**
             * Check if field is empty, i.e. does not contain text, is not checked, value is not selected etc.
             *
             * Accepts jQuery object with multiple elements for checkbox/radio sets and single element for all other input types
             *
             * TODO: REVIEW IF THIS IS OK, NEVER USED/TESTED THIS
             */
            field_is_empty: function (field) {

                // Multiple inputs - set of checkboxes or radio buttons
                if (field.length > 1) {

                    // No inputs can be checked
                    return !field.filter(':checked').length;
                }
                // No inputs
                else if (field.length < 1) {

                    // We should never end up here but lets treat this as empty just in case
                    return true;
                }
                // Single input
                else {

                    // Get field value
                    var value = field.val();

                    // Multiselect
                    if (jQuery.rightpress.field_is_multiselect(field)) {

                        // Default to empty array
                        value = value || [];

                        // No options can be selected
                        return !value.length;
                    }
                    // Radio or checkbox inputs
                    else if (field.is(':radio, :checkbox')) {

                        // Field must not be checked
                        return !field.is(':checked');
                    }
                    // Regular select fields and other inputs
                    else {

                        // Check if value is empty string or null
                        return (value === '' || value === null || value === undefined);
                    }
                }
            },

            /**
             * Get current page url with appended extra query var
             */
            get_current_url_with_query_var: function(key, value) {

                // Get current url
                var url = window.location.href;

                // Check if current url has query string
                var has_query = url.indexOf('?') > -1;

                // Get operator symbol
                var operator = has_query ? '&' : '?';

                // Append extra var if it does not exist yet
                // Note: This function currently does not check for differences in values
                if (!has_query || (url.indexOf(('?' + key + '=')) === -1 && url.indexOf(('&' + key + '=')) === -1)) {
                    url += operator + key + '=' + value;
                }

                // Return url
                return url;
            },

            /**
             * Serialize form including disabled inputs defined by selector
             */
            serialize_including_disabled: function(form, selector) {

                // Get disabled inputs and enable them
                var disabled = form.find(':input:disabled').filter(selector).removeAttr('disabled');

                // Serialize form
                var serialized = form.serialize();

                // Enable previously disabled inputs
                disabled.attr('disabled', 'disabled');

                // Return serialized data
                return serialized;
            }
    }

    });

}());
// source --> https://lgx.com.ua/wp-content/plugins/wc-dynamic-pricing-and-discounts/rightpress/jquery-plugins/rightpress-live-product-update/rightpress-live-product-update.js?ver=1025 
/**
 * RightPress Live Product Update
 */

(function () {

    'use strict';

    /**
     * Delay helper
     */
    var delay = (function(){

        var timers = {};

        return function(callback, ms, unique){
            clearTimeout(timers[unique]);
            timers[unique] = setTimeout(callback, ms);
        };
    })();

    /**
     * Register plugin
     */
    jQuery.fn.rightpress_live_product_update = function(params) {

        var self = this;
        var form = this.closest('.product').find('form.cart');

        // Unique id for each instance
        var unique = Math.random().toString(36).slice(2);

        // On input change
        form.find(':input').on('change keyup', function() {
            queue();
        });

        // Allow inputs to be attached on the fly
        form.on('rightpress_live_product_update_attach_input', function(event, element) {
            jQuery(element).find(':input').on('change keyup', function() {
                queue();
            });
        });

        // On variation select and our custom event
        form.on('found_variation, rightpress_live_product_update_trigger', function() {
            queue();
        });

        // Trigger now
        queue();

        /**
         * Make Ajax call
         */
        function call()
        {
            // Serialize form data
            var form_data = form.serialize();

            // Get product id
            var product_id = params.product_id !== undefined ? params.product_id : form.find('button[type="submit"][name="add-to-cart"]').val();

            // Add product id
            if (product_id) {
                form_data += (form_data !== '' ? '&' : '') + 'rightpress_reference_product_id=' + product_id;
            }

            // Compile a list of field names so that even empty fields (checkboxes, file uploads etc) are submitted
            form.find('input, textarea, select').each(function() {
                if (jQuery(this).is(':visible') && typeof jQuery(this).prop('name') !== 'undefined') {
                    form_data += (form_data !== '' ? '&' : '') + 'rightpress_complete_input_list[]=' + jQuery(this).prop('name');
                }
            });

            // Send request
            jQuery.ajax({
                type: 'POST',
                url: params.ajax_url,
                context: self,
                data: {
                    action: params.action,
                    data:   form_data
                },
                dataType: 'json',
                dataFilter: jQuery.rightpress.sanitize_json_response,
                beforeSend: params.before_send,
                success: params.response_handler
            });
        }

        /**
         * Queue call
         * Waits for 500 ms before actually executing, cancels any pending processes
         */
        function queue()
        {
            delay(function() {
                call();
            }, 500, unique);
        }


    };

}());
// source --> https://lgx.com.ua/wp-content/plugins/wc-dynamic-pricing-and-discounts/extensions/promotion-volume-pricing-table/assets/scripts.js?ver=2.4.3 
/**
 * WooCommerce Dynamic Pricing & Discounts - Volume Pricing Table Scripts
 */
jQuery(document).ready(function() {

    'use strict';

    var inhibit_live_product_update = false;

    /**
     * Individual volume pricing table loading for product variations
     */
    jQuery('#rp_wcdpd_pricing_table_variation_container').rightpress_live_product_update({

        // Params
        ajax_url:   rp_wcdpd_promotion_volume_pricing_table_scripts_vars.ajaxurl,
        action:     'rp_wcdpd_load_variation_pricing_table',

        // Before send
        before_send: function(xhr) {

            // Maybe inhibit request
            if (inhibit_live_product_update) {

                // Inhibit request
                xhr.abort();

                // Unset flag
                inhibit_live_product_update = false;

                // Do not proceed further
                return;
            }

            // Change opacity of the element
            jQuery(this).css('opacity', '0.25');
        },

        // Callback
        response_handler: function(response) {

            // Display pricing table
            if (typeof response === 'object' && typeof response.result !== 'undefined' && response.result === 'success' && response.display) {

                // Maybe update pricing table
                if (typeof jQuery(this).data('rp_wcdpd_html_hash') === 'undefined' || jQuery(this).data('rp_wcdpd_html_hash') !== response.html_hash) {

                    // Update content
                    jQuery(this).html(response.html);

                    // Set hash
                    jQuery(this).data('rp_wcdpd_html_hash', response.html_hash);

                    // Show
                    jQuery(this).show();

                    // Set up pricing table controls
                    set_up_pricing_table_controls();

                    // Trigger event
                    jQuery('body').trigger('rp_wcdpd_volume_pricing_table_updated', response);
                }

                // Change opacity of the element
                jQuery(this).css('opacity', '1.0');
            }
            // Hide pricing table
            else {

                // Hide
                jQuery(this).hide();

                // Unset hash
                jQuery(this).removeData('rp_wcdpd_html_hash');
            }
        }
    });

    /**
     * Set up pricing table controls
     */
    function set_up_pricing_table_controls()
    {

        /**
         * Quantity input control
         */
        jQuery('.rp_wcdpd_pricing_table_quantity[data-rp-wcdpd-from], .rp_wcdpd_pricing_table_product_price[data-rp-wcdpd-from]').on('click', function() {

            // Set flag to inhibit product update request
            inhibit_live_product_update = true;

            // Change quantity
            jQuery('form.cart input[name="quantity"]').val(jQuery(this).data('rp-wcdpd-from')).change();
        });

        /**
         * Variation input control
         */
        jQuery('.rp_wcdpd_pricing_table_product_name[data-rp-wcdpd-variation-attributes], .rp_wcdpd_pricing_table_product_price[data-rp-wcdpd-variation-attributes]').on('click', function() {

            // No attributes
            if (jQuery(this).data('rp-wcdpd-variation-attributes') === '') {
                return;
            }

            var attributes = {};

            // Get attributes
            var attributes_raw = jQuery(this).data('rp-wcdpd-variation-attributes').split('&');

            // Parse attributes
            jQuery.each(attributes_raw, function(index, attribute_raw) {

                // Split name and value
                var parts = attribute_raw.split('=');

                // Set to attributes object
                attributes[parts[0]] = parts[1];
            });

            // Iterate over attributes and reset values
            jQuery.each(attributes, function(attribute, value) {
                jQuery('form.cart .variations select[name="' + attribute + '"]').each(function() {
                    jQuery(this).val('').change();
                });
            });

            // Iterate over attributes and set new values
            jQuery.each(attributes, function(attribute, value) {
                jQuery('form.cart .variations select[name="' + attribute + '"]').each(function() {

                    var select = jQuery(this);

                    // Value present
                    if (value !== '') {
                        select.val(value);
                    }
                    // Any value
                    else {
                        select.find('option').each(function() {
                            if (jQuery(this).val() !== '') {
                                select.val(jQuery(this).val());
                                return false;
                            }
                        });
                    }

                    // Fire change event (delay is a fix for issue #501)
                    window.setTimeout(function() {
                        select.change();
                    }, 50);
                });
            });
        });

        /**
         * Modal control
         */
        jQuery('.rp_wcdpd_product_page_modal_link span').on('click', function() {

            if (!jQuery('#rp_wcdpd_modal_overlay').length) {
                jQuery('body').append('<div id="rp_wcdpd_modal_overlay" class="rp_wcdpd_modal_overlay"></div>');
            }

            jQuery('#rp_wcdpd_modal_overlay').on('click', function() {
                jQuery('#rp_wcdpd_modal_overlay').fadeOut();
                jQuery('.rp_wcdpd_modal').fadeOut();
            });

            var pricing_table = jQuery(this).closest('.rp_wcdpd_product_page').parent().find('.rp_wcdpd_modal');
            jQuery('#rp_wcdpd_modal_overlay').fadeIn();
            pricing_table.css('top', '50%').css('left', '50%').css('margin-top', -pricing_table.outerHeight()/2).css('margin-left', -pricing_table.outerWidth()/2).fadeIn();

            return false;
        });
    }

    // Call set up now
    set_up_pricing_table_controls();



});
// source --> https://lgx.com.ua/wp-content/plugins/wc-dynamic-pricing-and-discounts/extensions/promotion-product-banners/assets/scripts.js?ver=2.4.3 
/**
 * WooCommerce Dynamic Pricing & Discounts - Promotion - Product Banners - Scripts
 */
jQuery(document).ready(function() {

    'use strict';

    /**
     * Set up live update
     */
    jQuery('#rp_wcdpd_promotion_product_banners_container').rightpress_live_product_update({

        // Params
        ajax_url:   rp_wcdpd_promotion_product_banners_scripts_vars.ajaxurl,
        action:     'rp_wcdpd_load_product_banner',

        // Before send
        before_send: function(xhr) {

            // Reference container
            var container = jQuery(this);

            // Change opacity of the container
            container.css('opacity', '0.25');
        },

        // Callback
        response_handler: function(response) {

            // Reference container
            var container = jQuery(this);

            // Display banners
            if (typeof response === 'object' && typeof response.result !== 'undefined' && response.result === 'success' && response.display) {

                // Maybe update banners
                if (typeof container.data('rp_wcdpd_banners_hash') === 'undefined' || container.data('rp_wcdpd_banners_hash') !== response.banners_hash) {

                    // Clear container
                    container.html('');

                    // Iterate over banners
                    jQuery.each(response.banners, function(banner_hash, banner) {

                        // Add to container
                        container.append(banner.html);
                    });

                    // Set hash
                    container.data('rp_wcdpd_banners_hash', response.banners_hash);

                    // Show container
                    container.show();

                    // Trigger event
                    jQuery('body').trigger('rp_wcdpd_promotion_product_banners_updated', response);
                }

                // Change opacity of the container
                container.css('opacity', '1.0');
            }
            // Hide banners
            else {

                // Hide container
                container.hide();

                // Unset hash
                container.removeData('rp_wcdpd_banners_hash');
            }
        }
    });





});
// source --> https://lgx.com.ua/wp-content/plugins/vc-super-bundle/features/text-gradient/script.js?ver=text-gradient-vc 
(function() {
	var ready = function() {
		var gradientTexts = document.querySelectorAll( '.cg_color_gradient > * > [style*="text-align:"]' );
		Array.prototype.forEach.call( gradientTexts, function(el) {
			var wrapper = document.createElement('div');
			wrapper.style.textAlign = el.style.textAlign;
			wrapper.classList.add( 'cg_wrapper' );
			wrapper.style.display = 'block';
			el.parentNode.replaceChild(wrapper, el);
			wrapper.appendChild(el);
		} )
	}
  if (document.attachEvent ? document.readyState === 'complete' : document.readyState !== 'loading'){
	ready();
  } else {
	document.addEventListener('DOMContentLoaded', ready);
  }
})();