HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/shoetique/wp-content/themes/north-wp/assets/js/app.min.js
!function($, window, _) {
    "use strict";
    for (var lastTime = 0, vendors = [ "ms", "moz", "webkit", "o" ], x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) window.requestAnimationFrame = window[vendors[x] + "RequestAnimationFrame"], 
    window.cancelAnimationFrame = window[vendors[x] + "CancelAnimationFrame"] || window[vendors[x] + "CancelRequestAnimationFrame"];
    window.requestAnimationFrame || (window.requestAnimationFrame = function(callback, element) {
        var currTime = new Date().getTime(), timeToCall = Math.max(0, 16 - (currTime - lastTime)), id = window.setTimeout(function() {
            callback(currTime + timeToCall);
        }, timeToCall);
        return lastTime = currTime + timeToCall, id;
    }), window.cancelAnimationFrame || (window.cancelAnimationFrame = function(id) {
        clearTimeout(id);
    });
    var $doc = $(document), win = $(window), Modernizr = window.Modernizr, SITE = SITE || {};
    SITE = {
        init: function() {
            var obj, self = this;
            for (obj in self) if (self.hasOwnProperty(obj)) {
                var _method = self[obj];
                void 0 !== _method.selector && void 0 !== _method.init && $(_method.selector).length > 0 && _method.init();
            }
        },
        headRoom: {
            selector: ".header",
            init: function() {
                var base = this, container = $(base.selector);
                win.scroll(function() {
                    base.scroll(container);
                });
            },
            scroll: function(container) {
                var animationOffset = container.data("offset"), wOffset = win.scrollTop(), stick = container.data("stick-class"), unstick = container.data("unstick-class");
                wOffset > animationOffset ? (container.removeClass(unstick), container.hasClass(stick) || setTimeout(function() {
                    container.addClass(stick);
                }, 10)) : animationOffset > wOffset && wOffset > 0 ? container.hasClass(stick) && (container.removeClass(stick), 
                container.addClass(unstick)) : (container.removeClass(stick), container.removeClass(unstick));
            }
        },
        responsiveNav: {
            selector: "#wrapper",
            init: function() {
                var base = this, container = $(base.selector), cc = $(".click-capture"), children = ($("#quick_cart, .mobile-toggle").data("target"), 
                $("#mobile-menu").find(".animation")), span = $("#mobile-menu").find('.mobile-menu li:has(".sub-menu")>a span');
                $("#quick_cart, .mobile-toggle").on("click", function() {
                    var that = $(this), target = that.data("target"), t = -1, z = -1;
                    return container.removeClass("open-menu open-cart").addClass(target), children.removeClass("animate").delay(450).each(function() {
                        var that = $(this);
                        t++, setTimeout(function() {
                            that.addClass("animate");
                        }, 200 * t);
                    }), $("#side-cart").find(".animation").removeClass("animate").delay(450).each(function() {
                        var that = $(this);
                        z++, setTimeout(function() {
                            that.addClass("animate");
                        }, 200 * z);
                    }), SITE.customScroll.init(), !1;
                }), cc.on("click", function() {
                    container.removeClass("open-menu open-cart"), children.find(".sub-menu").hide();
                }), span.on("click", function(e) {
                    var that = $(this), parent = that.parents("a"), menu = parent.next(".sub-menu");
                    parent.hasClass("active") ? (parent.removeClass("active"), menu.slideUp("200", function() {
                        setTimeout(function() {
                            window.menuscroll.refresh();
                        }, 10);
                    })) : (parent.addClass("active"), menu.slideDown("200", function() {
                        setTimeout(function() {
                            window.menuscroll.refresh();
                        }, 10);
                    })), e.stopPropagation(), e.preventDefault();
                });
            }
        },
        updateCart: {
            selector: "#quick_cart",
            init: function() {
                var base = this;
                $(base.selector);
                $("body").bind("added_to_cart", SITE.updateCart.update_cart_dropdown);
            },
            update_cart_dropdown: function(event) {
                $("body").hasClass("woocommerce-cart") ? location.reload() : $("#quick_cart").trigger("click");
            }
        },
        navDropdown: {
            selector: ".sf-menu",
            init: function() {
                var base = this, container = $(base.selector), item = container.find("li.menu-item-has-children:not(.menu-item-mega-child)");
                item.each(function() {
                    var that = $(this), dropdown = (that.offset(), that.find(">.sub-menu"));
                    that.find("li.menu-item-has-children");
                    that.hoverIntent(function() {
                        var window_width = parseInt(win.outerWidth(), 10), dropdown_width = parseInt(dropdown.outerWidth(), 10), dropdown_offset_left = parseInt(that.offset().left, 10), dropdown_move = window_width - dropdown_width - dropdown_offset_left;
                        that.addClass("sfHover"), 0 > dropdown_move && dropdown.css("left", dropdown_move - 30 + "px"), 
                        dropdown.fadeIn(), $(this).find(">a").addClass("active");
                    }, function() {
                        that.removeClass("sfHover"), dropdown.hide(), $(this).find(">a").removeClass("active");
                    });
                });
            }
        },
        fullWidth: {
            selector: ".full-width-section",
            init: function() {
                var base = this, container = $(base.selector);
                base.resize(container), win.resize(function() {
                    base.resize(container);
                });
            },
            resize: function(container) {
                var body = $("body"), outerContainer = body.hasClass("boxed") ? $("#wrapper") : win, w = outerContainer.width(), OutMargin = Math.floor((w - Math.floor(container.parents(".post-content").width())) / 2);
                container.each(function() {
                    var that = $(this);
                    body.hasClass("rtl") ? that[0].style.setProperty("margin-right", -OutMargin + "px", "important") : that[0].style.setProperty("margin-left", -OutMargin + "px", "important"), 
                    that[0].style.setProperty("padding-left", OutMargin + "px", "important"), that[0].style.setProperty("padding-right", OutMargin + "px", "important"), 
                    that[0].style.setProperty("visibility", "visible");
                });
            }
        },
        fullWidthContent: {
            selector: ".full-width-content",
            init: function() {
                var base = this, container = $(base.selector);
                base.resize(container), win.resize(function() {
                    base.resize(container);
                });
            },
            resize: function(container) {
                var body = $("body"), outerContainer = body.hasClass("boxed") ? $("#wrapper") : win, w = outerContainer.width(), OutMargin = Math.ceil((w - Math.floor(container.parents(".post").width())) / 2);
                body.hasClass("snap") || container.each(function() {
                    body.hasClass("rtl") ? $(this).css({
                        "margin-right": -OutMargin,
                        width: w
                    }) : $(this).css({
                        "margin-left": -OutMargin,
                        width: w
                    });
                });
            }
        },
        fullHeightContent: {
            selector: ".full-height-content",
            init: function() {
                var base = this, container = $(base.selector);
                base.resize(container), win.resize(function() {
                    base.resize(container);
                });
            },
            resize: function(container) {
                container.height(win.outerHeight());
            }
        },
        carousel: {
            selector: ".owl",
            init: function() {
                var base = this, container = $(base.selector);
                container.each(function() {
                    var that = $(this), columns = that.data("columns"), center = that.data("center") === !0 ? !0 : !1, navigation = that.data("navigation") === !0 ? !0 : !1, autoplay = that.data("autoplay") === !1 ? !1 : !0, autowidth = (that.data("pagination") === !0 ? !0 : !1, 
                    that.data("autowidth") === !0 ? !0 : !1), bgcheck = that.data("bgcheck") ? that.data("bgcheck") : !1, loop = that.data("loop") === !0 ? !0 : !1, thumbs = $("#product-thumbnails");
                    that.find("img").length < 2 && (loop = !1, navigation = !1), that.owlCarousel({
                        nav: navigation,
                        dots: !0,
                        autoplayHoverPause: !0,
                        autoplay: autoplay,
                        autoplayTimeout: 5e3,
                        center: center,
                        loop: loop,
                        navSpeed: 1200,
                        autoWidth: autowidth,
                        items: columns,
                        URLhashListener: !1,
                        responsiveRefreshRate: 100,
                        responsive: {
                            0: {
                                items: 1
                            },
                            768: {
                                items: 2 > columns ? columns : 2
                            },
                            980: {
                                items: 3 > columns ? columns : 3
                            },
                            1200: {
                                items: columns
                            }
                        },
                        onInitialized: function() {
                            bgcheck && BackgroundCheck.init({
                                targets: base.selector,
                                images: base.selector + " img",
                                minComplexity: 80,
                                maxDuration: 1500,
                                minOverlap: 0
                            }), that.hasClass("lookbook-container") && (that.on("mousewheel", ".owl-stage", function(e) {
                                e.deltaY > 0 ? that.trigger("next.owl") : that.trigger("prev.owl"), e.preventDefault();
                            }), that.find(".look, img").height(win.outerHeight()));
                        },
                        onChanged: function() {
                            that.hasClass("lookbook-container") && (that.find(".look").removeClass("active"), 
                            that.find(".look, img").height(win.outerHeight()));
                        },
                        onResized: function() {
                            that.hasClass("lookbook-container") && (that.find(".look").removeClass("active"), 
                            that.find(".look, img").height(win.outerHeight()));
                        }
                    }).on("changed.owl.carousel", function(e) {
                        that.hasClass("product-images") && thumbs && $(".product-thumbnails").trigger("to.owl.carousel", [ e.item.index, 400, !0 ]);
                    }), thumbs.on("click", ".owl-item", function() {
                        var target = $(this).index();
                        $(".product-images").trigger("to.owl.carousel", [ target, 400, !0 ]);
                    });
                });
            }
        },
        thumbnailGallery: {
            selector: ".thumbnail_gallery",
            init: function() {
                var base = this, container = $(base.selector);
                container.each(function() {
                    var that = $(this), columns = that.data("columns"), center = that.data("center") === !0 ? !0 : !1, navigation = that.data("navigation") === !0 ? !0 : !1, autoplay = that.data("autoplay") === !1 ? !1 : !0, autowidth = (that.data("pagination") === !0 ? !0 : !1, 
                    that.data("autowidth") === !0 ? !0 : !1), loop = (that.data("bgcheck") ? that.data("bgcheck") : !1, 
                    that.data("loop") === !0 ? !0 : !1), duration = 300, thumbs = $(that.data("thumbs"));
                    that.find("img").length < 2 && (loop = !1, navigation = !1), that.owlCarousel({
                        nav: navigation,
                        dots: !0,
                        autoplayHoverPause: !0,
                        autoplay: autoplay,
                        autoplayTimeout: 5e3,
                        center: center,
                        loop: loop,
                        navSpeed: 1200,
                        autoWidth: autowidth,
                        items: columns,
                        responsiveRefreshRate: 100,
                        responsive: {
                            0: {
                                items: 1
                            },
                            768: {
                                items: 2 > columns ? columns : 2
                            },
                            980: {
                                items: 3 > columns ? columns : 3
                            },
                            1200: {
                                items: columns
                            }
                        }
                    }).on("changed.owl.carousel", function(e) {
                        thumbs.trigger("to.owl.carousel", [ e.item.index, duration, !0 ]);
                    }), thumbs.on("click", ".owl-item", function() {
                        var target = $(this).index();
                        that.trigger("to.owl.carousel", [ target, duration, !0 ]);
                    });
                });
            }
        },
        toggle: {
            selector: ".toggle .title",
            init: function() {
                var base = this, container = $(base.selector);
                container.each(function() {
                    var that = $(this);
                    that.on("click", function() {
                        that.hasClass("toggled") ? that.removeClass("toggled").closest(".toggle").find(".inner").slideUp(200) : that.addClass("toggled").closest(".toggle").find(".inner").slideDown(200);
                    });
                });
            }
        },
        masonry: {
            selector: ".masonry:not(.posts)",
            init: function() {
                var base = this, container = $(base.selector);
                container.each(function() {
                    var that = $(this), fitwidth = that.hasClass("blog-section") ? 0 : 1;
                    win.load(function() {
                        that.isotope({
                            itemSelector: ".item",
                            transitionDuration: "0.5s",
                            masonry: {
                                columnWidth: ".item",
                                isFitWidth: fitwidth
                            }
                        }), that.isotope("on", "layoutComplete", function() {
                            SITE.carousel.init(), SITE.magnificImage.init();
                        });
                    });
                });
            }
        },
        grid: {
            selector: ".grid",
            init: function() {
                var base = this, container = $(base.selector);
                container.each(function() {
                    var that = $(this);
                    win.load(function() {
                        that.isotope({
                            masonry: {
                                columnWidth: ".grid-sizer"
                            },
                            itemSelector: ".item",
                            transitionDuration: "0.5s"
                        });
                    });
                });
            }
        },
        infiniteScroll: {
            selector: "#infinitescroll",
            init: function() {
                var base = this, container = $(base.selector), count = (container.data("loading"), 
                container.data("nomore"), container.data("count")), total = container.data("total"), style = container.data("type"), page = 2, scrollFunction = _.debounce(function() {
                    win.scrollTop() >= $doc.height() - win.height() - 60 && (win.off("scroll", scrollFunction), 
                    container.addClass("loading"), $.post(themeajax.url, {
                        action: "thb_ajax",
                        count: count,
                        page: page,
                        style: style
                    }, function(data) {
                        var d = $.parseHTML(data);
                        ($(d).length - 1) / 2;
                        return container.removeClass("loading"), win.on("scroll", scrollFunction), page > total ? (win.off("scroll", scrollFunction), 
                        !1) : (page++, void $(d).appendTo(container).hide().imagesLoaded(function() {
                            $(d).show(), container.data("isotope") && (container.isotope("appended", $(d)), 
                            container.isotope("layout")), SITE.equalHeights.init();
                        }));
                    }));
                }, 30);
                win.scroll(scrollFunction);
            }
        },
        shareThisArticle: {
            selector: "#product_share",
            init: function() {
                var base = this, container = $(base.selector), fb = container.data("fb"), tw = container.data("tw"), pi = container.data("pi"), li = container.data("li"), gp = container.data("gp"), boxed = container.data("boxed"), temp = "";
                fb && (temp += '<a href="#" class="' + (boxed ? "boxed-icon " : "") + 'facebook"><i class="fa fa-facebook"></i></a> '), 
                tw && (temp += '<a href="#" class="' + (boxed ? "boxed-icon " : "") + 'twitter"><i class="fa fa-twitter"></i></a> '), 
                pi && (temp += '<a href="#" class="' + (boxed ? "boxed-icon " : "") + 'pinterest"><i class="fa fa-pinterest"></i></a> '), 
                li && (temp += '<a href="#" class="' + (boxed ? "boxed-icon " : "") + 'linkedin"><i class="fa fa-linkedin"></i></a> '), 
                gp && (temp += '<a href="#" class="' + (boxed ? "boxed-icon " : "") + 'google-plus"><i class="fa fa-google-plus"></i></a> '), 
                container.find(".placeholder").sharrre({
                    share: {
                        facebook: fb,
                        twitter: tw,
                        pinterest: pi,
                        linkedin: li
                    },
                    buttons: {
                        pinterest: {
                            media: container.find(".placeholder").data("media")
                        }
                    },
                    urlCurl: $("body").data("sharrreurl"),
                    template: temp,
                    enableHover: !1,
                    enableTracking: !1,
                    render: function(api) {
                        $(api.element).on("click", ".twitter", function() {
                            api.openPopup("twitter");
                        }), $(api.element).on("click", ".facebook", function() {
                            api.openPopup("facebook");
                        }), $(api.element).on("click", ".pinterest", function() {
                            api.openPopup("pinterest");
                        }), $(api.element).on("click", ".linkedin", function() {
                            api.openPopup("linkedin");
                        }), $(api.element).on("click", ".google-plus", function() {
                            api.openPopup("googlePlus");
                        });
                    }
                });
            }
        },
        parallax_bg: {
            selector: 'div[role="main"]',
            init: function() {
                var base = this;
                $(base.selector);
                Modernizr.touch || $.stellar({
                    horizontalScrolling: !1,
                    verticalOffset: 40
                });
            }
        },
        customScroll: {
            selector: ".no-touch .custom_scroll",
            init: function() {
                var base = this, container = $(base.selector);
                container.each(function() {
                    var that = $(this);
                    that.perfectScrollbar({
                        wheelPropagation: !1,
                        suppressScrollX: !0,
                        scrollYMarginOffset: 10,
                        scrollXMarginOffset: 10
                    });
                }), win.resize(function() {
                    base.resize(container);
                });
            },
            resize: function(container) {
                container.perfectScrollbar("update");
            }
        },
        wpml: {
            selector: "#thb_language_selector",
            init: function() {
                var base = this, container = $(base.selector);
                container.on("change", function() {
                    var url = $(this).val();
                    return url && (window.location = url), !1;
                });
            }
        },
        shop: {
            selector: ".products .product",
            init: function() {
                var base = this, container = $(base.selector);
                container.each(function() {
                    var that = $(this);
                    that.find(".add_to_cart_button").on("click", function() {
                        "" !== $(this).data("added-text") && $(this).text($(this).data("added-text"));
                    });
                });
            }
        },
        variations: {
            selector: ".variations_form input[name=variation_id]",
            init: function() {
                var base = this, container = $(base.selector), org = $(".single-price.single_variation").html();
                container.on("change", function() {
                    var phtml, that = $(this), val = that.val(), images = $("#product-images");
                    images.data("owl.carousel");
                    if (setTimeout(function() {
                        phtml = val ? that.parents(".variations_form").find(".single_variation span.price").html() : org, 
                        $(".price.single_variation").html(phtml);
                    }, 100), $(".variations_form").length) {
                        var values, variations = [];
                        $(".variations_form").find("select").each(function() {
                            variations.push(this.value);
                        }), values = variations.join(",");
                        var v = $(".variations_form select option:selected").val(), i = images.find('figure[data-variation="' + values + '"]').parents(".owl-item").index();
                        v && images.trigger("to.owl.carousel", [ i, 400, !0 ]);
                    }
                });
            }
        },
        quantity: {
            selector: ".quantity",
            init: function() {
                var base = this;
                $(base.selector);
                $("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />'), 
                $doc.on("click", ".plus, .minus", function() {
                    var $qty = $(this).closest(".quantity").find(".qty"), currentVal = parseFloat($qty.val()), max = parseFloat($qty.attr("max")), min = parseFloat($qty.attr("min")), step = $qty.attr("step");
                    currentVal && "" !== currentVal && "NaN" !== currentVal || (currentVal = 0), ("" === max || "NaN" === max) && (max = ""), 
                    ("" === min || "NaN" === min) && (min = 0), ("any" === step || "" === step || void 0 === step || "NaN" === parseFloat(step)) && (step = 1), 
                    $(this).is(".plus") ? max && (max === currentVal || currentVal > max) ? $qty.val(max) : $qty.val(currentVal + parseFloat(step)) : min && (min === currentVal || min > currentVal) ? $qty.val(min) : currentVal > 0 && $qty.val(currentVal - parseFloat(step)), 
                    $qty.trigger("change");
                });
            }
        },
        reviews: {
            selector: "#comment_popup",
            init: function() {
                var base = this, container = $(base.selector);
                container.on("click", "p.stars a", function() {
                    var that = $(this);
                    setTimeout(function() {
                        that.prevAll().addClass("active");
                    }, 10);
                });
            }
        },
        checkout: {
            selector: ".woocommerce-checkout",
            init: function() {
                $(".woocommerce>.notification-box").prependTo("#checkout_login"), $("#shippingsteps a").on("click", function() {
                    var that = $(this), target = that.data("target") ? $("#" + that.data("target")) : !1;
                    return target && ($("#shippingsteps li").removeClass("active"), that.parents("li").addClass("active"), 
                    $(".section").hide(), target.show(), SITE.magnificInline.init()), $("body").trigger("country_to_state_changed"), 
                    !1;
                }), $("#createaccount", "#checkout_login").on("click", function() {
                    return $("#checkout_register", "#checkout_login").slideToggle(), !1;
                }), $("#guestcheckout", "#checkout_login").on("click", function() {
                    return $("#shippingsteps a").eq(1).trigger("click"), !1;
                }), $(".continue_shipping").on("click", function() {
                    return $("form.checkout .billing").find(".input-text, select").trigger("change"), 
                    $("form.checkout .shipping_address").is(":visible") && $("form.checkout .shipping_address").find(".input-text, select").trigger("change"), 
                    0 === $("form.checkout .billing").find(".woocommerce-invalid-required-field").length && $("#shippingsteps a").eq(2).trigger("click"), 
                    SITE.magnificInline.init(), !1;
                }), $("#ship-to-different-address-checkbox").on("change", function() {
                    return $(".shipping_address").slideToggle("slow", function() {
                        $(".shipping_address").is(":hidden") && $("form.checkout .shipping_address").find("p.form-row").removeClass("woocommerce-invalid-required-field");
                    }), $("body").trigger("country_to_state_changed"), !1;
                }), $("#have_coupon").on("click", function() {
                    return $(".coupon-container.margin").slideToggle(), !1;
                });
            }
        },
        myaccount: {
            selector: "#my-account-main",
            init: function() {
                var base = this, container = $(base.selector), tabs = $(".tab-pane, #my-account-main");
                container.find(".account-icon-box:not(.logout)").on("click", function() {
                    var that = $(this), target = $(that.attr("href"));
                    return container.hide(0, function() {
                        target.fadeIn();
                    }), !1;
                }), $(".back_to_account").on("click", function() {
                    return tabs.hide(0, function() {
                        container.fadeIn();
                    }), !1;
                }), $("#changepassword_btn").on("click", function() {
                    return $("#changeit").trigger("click"), !1;
                });
            }
        },
        magnificImage: {
            selector: '[rel="magnific"], .wp-caption a',
            init: function() {
                var stype, base = this, container = $(base.selector);
                container.each(function() {
                    stype = $(this).hasClass("video") ? "iframe" : "image", $(this).magnificPopup({
                        type: stype,
                        closeOnContentClick: !0,
                        fixedContentPos: !0,
                        closeBtnInside: !1,
                        closeMarkup: '<button title="%title%" class="mfp-close"></button>',
                        mainClass: "mfp",
                        removalDelay: 250,
                        overflowY: "scroll",
                        image: {
                            verticalFit: !1
                        }
                    });
                });
            }
        },
        magnificInline: {
            selector: '[rel="inline"]',
            init: function() {
                var base = this, container = $(base.selector);
                container.each(function() {
                    var eclass = $(this).data("class") ? $(this).data("class") : "";
                    $(this).magnificPopup({
                        type: "inline",
                        midClick: !0,
                        mainClass: "mfp " + eclass,
                        removalDelay: 250,
                        closeBtnInside: !0,
                        overflowY: "scroll",
                        closeMarkup: '<button title="%title%" class="mfp-close"></button>'
                    });
                });
            }
        },
        magnificGallery: {
            selector: '[rel="gallery"]',
            init: function() {
                var base = this, container = $(base.selector);
                container.each(function() {
                    $(this).magnificPopup({
                        delegate: "a",
                        type: "image",
                        closeOnContentClick: !0,
                        fixedContentPos: !0,
                        mainClass: "mfp",
                        removalDelay: 250,
                        closeBtnInside: !1,
                        overflowY: "scroll",
                        gallery: {
                            enabled: !0,
                            navigateByImgClick: !1,
                            preload: [ 0, 1 ]
                        },
                        image: {
                            verticalFit: !1,
                            titleSrc: function(item) {
                                return item.el.attr("title");
                            }
                        }
                    });
                });
            }
        },
        magnificAuto: {
            selector: '[rel="inline-auto"]',
            init: function() {
                var base = this, container = $(base.selector);
                container.each(function() {
                    var _this = $(this), eclass = _this.data("class") ? _this.data("class") : "", target = "#" + _this.attr("id");
                    $.magnificPopup.open({
                        type: "inline",
                        items: {
                            src: target,
                            type: "inline"
                        },
                        midClick: !0,
                        mainClass: "mfp " + eclass,
                        removalDelay: 250,
                        closeBtnInside: !0,
                        overflowY: "scroll",
                        closeMarkup: '<button title="%title%" class="mfp-close"></button>'
                    });
                });
            }
        },
        newsletterForm: {
            selector: "#newsletter-form",
            init: function() {
                var base = this, container = $(base.selector), url = container.data("target");
                container.submit(function() {
                    return container.find(".result").load(url, {
                        email: $("#widget_subscribe").val()
                    }, function() {
                        $(this).fadeIn(200).delay(3e3).fadeOut(200);
                    }), !1;
                });
            }
        },
        upSells: {
            selector: "#upsell-trigger",
            init: function() {
                var base = this, container = $(base.selector);
                $(".product-information .notification-box.success").length && $("#upsell-popup").imagesLoaded(function() {
                    container.trigger("click");
                });
            }
        },
        shopSidebar: {
            selector: ".woo.sidebar .widget.woocommerce",
            init: function() {
                var base = this, container = $(base.selector);
                container.each(function() {
                    var that = $(this), t = that.find(">h6");
                    t.append($("<span/>")).on("click", function() {
                        t.toggleClass("active"), t.next().animate({
                            height: "toggle",
                            opacity: "toggle"
                        }, 300), $(".woo.sidebar").find(".custom_scroll").perfectScrollbar("update");
                    });
                });
            }
        },
        parsley: {
            selector: ".comment-form, .wpcf7-form",
            init: function() {
                var base = this, container = $(base.selector);
                $.fn.parsley && container.parsley();
            }
        },
        commentToggle: {
            selector: "#commenttoggle",
            init: function() {
                var base = this, container = $(base.selector), respond = $("#respond");
                respond.find("#comment_parent");
                container.on("click", function() {
                    return respond.slideToggle(), !1;
                });
            }
        },
        page_scroll: {
            selector: ".page_scroll",
            init: function() {
                var base = this, nav = ($(base.selector), $(".header nav"));
                nav.onePageNav({
                    currentClass: "current-menu-item",
                    changeHash: !1,
                    topOffset: 100,
                    scrollSpeed: 750
                });
            }
        },
        colorCheck: {
            selector: ".header",
            check: function() {
                var base = this, container = $(base.selector), body = $("body"), pagi = $(".onepage-pagination");
                container.hasClass("background--light") ? body.add(pagi).addClass("background--light").removeClass("background--dark") : container.hasClass("background--dark") && body.add(pagi).addClass("background--dark").removeClass("background--light");
            }
        },
        revslider: {
            selector: "#home-slider",
            init: function() {
                var node, base = this, revid = ($(base.selector), "revapi" + $("body").data("revslider"));
                $("body").data("revslider") && (window[revid].bind("revolution.slide.onloaded", function(e) {
                    BackgroundCheck.init({
                        targets: ".header",
                        images: ".tp-bgimg",
                        minComplexity: 80,
                        maxDuration: 1500,
                        minOverlap: 0
                    }), SITE.colorCheck.check();
                }), window[revid].bind("revolution.slide.onchange", function(e, data) {
                    node = ".rev_slider ul li:nth-child(" + data.slideIndex + ") .tp-bgimg";
                }), window[revid].bind("revolution.slide.onafterswap, revolution.slide.onafterswap", function(e, data) {
                    BackgroundCheck.set("images", node), SITE.colorCheck.check();
                }));
            }
        },
        snap_scroll: {
            selector: ".snap_scroll",
            init: function() {
                var base = this, container = $(base.selector);
                SITE.snap_scroll.setHeight(), container.imagesLoaded(function() {
                    container.addClass("loaded").find(">.row").each(function() {
                        var that = $(this);
                        that.removeClass("row").find(">.columns").wrapAll('<div class="row"></div>');
                    }).end().onepage_scroll({
                        sectionContainer: ".snap_scroll>.vc_row-fluid",
                        animationTime: 1e3,
                        pagination: !0,
                        loop: !1,
                        keyboard: !1,
                        responsiveFallback: 768,
                        afterMove: function(index) {
                            SITE.animation.control(), setTimeout(function() {
                                BackgroundCheck.refresh(), SITE.colorCheck.check();
                            }, 1050);
                        }
                    }), setTimeout(function() {
                        SITE.animation.control(), BackgroundCheck.init({
                            targets: ".header",
                            images: ".snap_scroll .section",
                            minComplexity: 80,
                            maxDuration: 1250,
                            threshold: 50,
                            minOverlap: 10
                        }), SITE.colorCheck.check();
                    }, 500);
                });
            },
            setHeight: function() {
                var base = this, container = $(base.selector), children = container.find(".section>.row");
                win.width() > 768 && container.add(children).height(win.height());
            }
        },
        contact: {
            selector: ".contact_map",
            init: function() {
                var base = this, container = $(base.selector);
                container.each(function() {
                    var mapstyle, that = $(this), mapzoom = that.data("map-zoom"), maplat = that.data("map-center-lat"), maplong = that.data("map-center-long"), pinlatlong = that.data("latlong"), pinimage = that.data("pin-image"), style = that.data("map-style");
                    switch (style) {
                      case 0:
                        break;

                      case 1:
                        mapstyle = [ {
                            featureType: "administrative",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        }, {
                            featureType: "poi",
                            stylers: [ {
                                visibility: "simplified"
                            } ]
                        }, {
                            featureType: "road",
                            stylers: [ {
                                visibility: "simplified"
                            } ]
                        }, {
                            featureType: "water",
                            stylers: [ {
                                visibility: "simplified"
                            } ]
                        }, {
                            featureType: "transit",
                            stylers: [ {
                                visibility: "simplified"
                            } ]
                        }, {
                            featureType: "landscape",
                            stylers: [ {
                                visibility: "simplified"
                            } ]
                        }, {
                            featureType: "road.highway",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        }, {
                            featureType: "road.local",
                            stylers: [ {
                                visibility: "on"
                            } ]
                        }, {
                            featureType: "road.highway",
                            elementType: "geometry",
                            stylers: [ {
                                visibility: "on"
                            } ]
                        }, {
                            featureType: "road.arterial",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        }, {
                            featureType: "water",
                            stylers: [ {
                                color: "#5f94ff"
                            }, {
                                lightness: 26
                            }, {
                                gamma: 5.86
                            } ]
                        }, {}, {
                            featureType: "road.highway",
                            stylers: [ {
                                weight: .6
                            }, {
                                saturation: -85
                            }, {
                                lightness: 61
                            } ]
                        }, {
                            featureType: "road"
                        }, {}, {
                            featureType: "landscape",
                            stylers: [ {
                                hue: "#0066ff"
                            }, {
                                saturation: 74
                            }, {
                                lightness: 100
                            } ]
                        } ];
                        break;

                      case 2:
                        mapstyle = [ {
                            featureType: "water",
                            elementType: "all",
                            stylers: [ {
                                hue: "#e9ebed"
                            }, {
                                saturation: -78
                            }, {
                                lightness: 67
                            }, {
                                visibility: "simplified"
                            } ]
                        }, {
                            featureType: "landscape",
                            elementType: "all",
                            stylers: [ {
                                hue: "#ffffff"
                            }, {
                                saturation: -100
                            }, {
                                lightness: 100
                            }, {
                                visibility: "simplified"
                            } ]
                        }, {
                            featureType: "road",
                            elementType: "geometry",
                            stylers: [ {
                                hue: "#bbc0c4"
                            }, {
                                saturation: -93
                            }, {
                                lightness: 31
                            }, {
                                visibility: "simplified"
                            } ]
                        }, {
                            featureType: "poi",
                            elementType: "all",
                            stylers: [ {
                                hue: "#ffffff"
                            }, {
                                saturation: -100
                            }, {
                                lightness: 100
                            }, {
                                visibility: "off"
                            } ]
                        }, {
                            featureType: "road.local",
                            elementType: "geometry",
                            stylers: [ {
                                hue: "#e9ebed"
                            }, {
                                saturation: -90
                            }, {
                                lightness: -8
                            }, {
                                visibility: "simplified"
                            } ]
                        }, {
                            featureType: "transit",
                            elementType: "all",
                            stylers: [ {
                                hue: "#e9ebed"
                            }, {
                                saturation: 10
                            }, {
                                lightness: 69
                            }, {
                                visibility: "on"
                            } ]
                        }, {
                            featureType: "administrative.locality",
                            elementType: "all",
                            stylers: [ {
                                hue: "#2c2e33"
                            }, {
                                saturation: 7
                            }, {
                                lightness: 19
                            }, {
                                visibility: "on"
                            } ]
                        }, {
                            featureType: "road",
                            elementType: "labels",
                            stylers: [ {
                                hue: "#bbc0c4"
                            }, {
                                saturation: -93
                            }, {
                                lightness: 31
                            }, {
                                visibility: "on"
                            } ]
                        }, {
                            featureType: "road.arterial",
                            elementType: "labels",
                            stylers: [ {
                                hue: "#bbc0c4"
                            }, {
                                saturation: -93
                            }, {
                                lightness: -2
                            }, {
                                visibility: "simplified"
                            } ]
                        } ];
                        break;

                      case 3:
                        mapstyle = [ {
                            featureType: "poi",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        }, {
                            stylers: [ {
                                saturation: -70
                            }, {
                                lightness: 37
                            }, {
                                gamma: 1.15
                            } ]
                        }, {
                            elementType: "labels",
                            stylers: [ {
                                gamma: .26
                            }, {
                                visibility: "off"
                            } ]
                        }, {
                            featureType: "road",
                            stylers: [ {
                                lightness: 0
                            }, {
                                saturation: 0
                            }, {
                                hue: "#ffffff"
                            }, {
                                gamma: 0
                            } ]
                        }, {
                            featureType: "road",
                            elementType: "labels.text.stroke",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        }, {
                            featureType: "road.arterial",
                            elementType: "geometry",
                            stylers: [ {
                                lightness: 20
                            } ]
                        }, {
                            featureType: "road.highway",
                            elementType: "geometry",
                            stylers: [ {
                                lightness: 50
                            }, {
                                saturation: 0
                            }, {
                                hue: "#ffffff"
                            } ]
                        }, {
                            featureType: "administrative.province",
                            stylers: [ {
                                visibility: "on"
                            }, {
                                lightness: -50
                            } ]
                        }, {
                            featureType: "administrative.province",
                            elementType: "labels.text.stroke",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        }, {
                            featureType: "administrative.province",
                            elementType: "labels.text",
                            stylers: [ {
                                lightness: 20
                            } ]
                        } ];
                        break;

                      case 4:
                        mapstyle = [ {
                            featureType: "landscape",
                            elementType: "labels",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        }, {
                            featureType: "transit",
                            elementType: "labels",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        }, {
                            featureType: "poi",
                            elementType: "labels",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        }, {
                            featureType: "water",
                            elementType: "labels",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        }, {
                            featureType: "road",
                            elementType: "labels.icon",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        }, {
                            stylers: [ {
                                hue: "#00aaff"
                            }, {
                                saturation: -100
                            }, {
                                gamma: 2.15
                            }, {
                                lightness: 12
                            } ]
                        }, {
                            featureType: "road",
                            elementType: "labels.text.fill",
                            stylers: [ {
                                visibility: "on"
                            }, {
                                lightness: 24
                            } ]
                        }, {
                            featureType: "road",
                            elementType: "geometry",
                            stylers: [ {
                                lightness: 57
                            } ]
                        } ];
                        break;

                      case 5:
                        mapstyle = [ {
                            featureType: "landscape",
                            stylers: [ {
                                hue: "#F1FF00"
                            }, {
                                saturation: -27.4
                            }, {
                                lightness: 9.4
                            }, {
                                gamma: 1
                            } ]
                        }, {
                            featureType: "road.highway",
                            stylers: [ {
                                hue: "#0099FF"
                            }, {
                                saturation: -20
                            }, {
                                lightness: 36.4
                            }, {
                                gamma: 1
                            } ]
                        }, {
                            featureType: "road.arterial",
                            stylers: [ {
                                hue: "#00FF4F"
                            }, {
                                saturation: 0
                            }, {
                                lightness: 0
                            }, {
                                gamma: 1
                            } ]
                        }, {
                            featureType: "road.local",
                            stylers: [ {
                                hue: "#FFB300"
                            }, {
                                saturation: -38
                            }, {
                                lightness: 11.2
                            }, {
                                gamma: 1
                            } ]
                        }, {
                            featureType: "water",
                            stylers: [ {
                                hue: "#00B6FF"
                            }, {
                                saturation: 4.2
                            }, {
                                lightness: -63.4
                            }, {
                                gamma: 1
                            } ]
                        }, {
                            featureType: "poi",
                            stylers: [ {
                                hue: "#9FFF00"
                            }, {
                                saturation: 0
                            }, {
                                lightness: 0
                            }, {
                                gamma: 1
                            } ]
                        } ];
                        break;

                      case 6:
                        mapstyle = [ {
                            stylers: [ {
                                hue: "#2c3e50"
                            }, {
                                saturation: 250
                            } ]
                        }, {
                            featureType: "road",
                            elementType: "geometry",
                            stylers: [ {
                                lightness: 50
                            }, {
                                visibility: "simplified"
                            } ]
                        }, {
                            featureType: "road",
                            elementType: "labels",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        } ];
                        break;

                      case 7:
                        mapstyle = [ {
                            stylers: [ {
                                hue: "#16a085"
                            }, {
                                saturation: 0
                            } ]
                        }, {
                            featureType: "road",
                            elementType: "geometry",
                            stylers: [ {
                                lightness: 100
                            }, {
                                visibility: "simplified"
                            } ]
                        }, {
                            featureType: "road",
                            elementType: "labels",
                            stylers: [ {
                                visibility: "off"
                            } ]
                        } ];
                    }
                    var centerlatLng = new google.maps.LatLng(maplat, maplong), mapOptions = {
                        center: centerlatLng,
                        styles: mapstyle,
                        zoom: mapzoom,
                        mapTypeId: google.maps.MapTypeId.ROADMAP,
                        scrollwheel: !1,
                        panControl: !1,
                        zoomControl: !1,
                        mapTypeControl: !1,
                        scaleControl: !1,
                        streetViewControl: !1
                    }, map = new google.maps.Map(document.getElementById("contact-map"), mapOptions);
                    google.maps.event.addListenerOnce(map, "tilesloaded", function() {
                        if (pinimage.length > 0) {
                            var pinimageLoad = new Image();
                            pinimageLoad.src = pinimage, $(pinimageLoad).load(function() {
                                base.setMarkers(map, pinlatlong, pinimage);
                            });
                        } else base.setMarkers(map, pinlatlong, pinimage);
                    });
                });
            },
            setMarkers: function(map, pinlatlong, pinimage) {
                function showPin(i) {
                    var latlong_array = pinlatlong[i].lat_long.split(","), marker = new google.maps.Marker({
                        position: new google.maps.LatLng(latlong_array[0], latlong_array[1]),
                        map: map,
                        animation: google.maps.Animation.DROP,
                        icon: pinimage,
                        optimized: !1
                    }), contentString = '<div class="marker-info-win"><img src="' + pinlatlong[i].image + '" class="image" /><div class="marker-inner-win"><h1 class="marker-heading">' + pinlatlong[i].title + "</h1><p>" + pinlatlong[i].information + "</p></div></div>", infowindow = new InfoBox({
                        alignBottom: !0,
                        content: contentString,
                        disableAutoPan: !1,
                        maxWidth: 380,
                        closeBoxMargin: "10px 10px 10px 10px",
                        closeBoxURL: "http://www.google.com/intl/en_us/mapfiles/close.gif",
                        pixelOffset: new google.maps.Size(-195, -43),
                        zIndex: null,
                        infoBoxClearance: new google.maps.Size(1, 1)
                    });
                    infoWindows.push(infowindow), google.maps.event.addListener(marker, "click", function(marker, i) {
                        return function() {
                            infoWindows[i].open(map, this);
                        };
                    }(marker, i));
                }
                for (var infoWindows = [], i = 0; i + 1 <= pinlatlong.length; i++) setTimeout(showPin, 250 * i, i);
            }
        },
        footerProducts: {
            selector: "#footer",
            init: function() {
                var base = this, footer = ($(base.selector), $("#footer")), wrapper = $("#wrapper"), cc = $(".click-capture"), products = $("#footer_products"), section = products.find(".carousel-container"), links = $("#footer_tabs").find("a");
                $("#footer-toggle").on("click", function() {
                    return footer.toggleClass("active"), wrapper.toggleClass("open-footer"), !1;
                }), links.on("click", function() {
                    var that = $(this), type = that.data("type");
                    return that.hasClass("active") || (links.removeClass("active"), that.addClass("active"), 
                    section.addClass("loading").height(section.outerHeight()), $.post(themeajax.url, {
                        action: "thb_product_ajax",
                        type: type
                    }, function(data) {
                        var d = $.parseHTML(data);
                        $(d).imagesLoaded(function() {
                            section.html(d), SITE.carousel.init(), section.removeClass("loading");
                        });
                    })), !1;
                }), cc.on("click", function() {
                    wrapper.removeClass("open-footer"), footer.removeClass("active");
                });
            }
        },
        equalHeights: {
            selector: "[data-equal]",
            init: function() {
                var base = this, container = $(base.selector);
                window.innerWidth < 767 || (container.each(function() {
                    var that = $(this), children = that.data("equal"), row = that.data("row-detection") ? that.data("row-detection") : !1;
                    that.find(children).matchHeight({
                        byRow: row,
                        property: "min-height"
                    }), that.waitForImages(function() {
                        that.find(children).matchHeight({
                            byRow: row,
                            property: "min-height"
                        });
                    });
                }), $(".shipping-calculator-button").on("click", function() {
                    setTimeout(function() {
                        base.init();
                    }, 800);
                }));
            }
        },
        animation: {
            selector: "#content-container .animation",
            init: function() {
                var base = this, container = $(base.selector);
                base.control(container), win.scroll(function() {
                    base.control(container);
                });
            },
            control: function(element) {
                var t = -1, snap = $(SITE.snap_scroll.selector);
                snap.length > 0 ? snap.find(".section.active").find(".animation").each(function() {
                    var that = $(this);
                    t++, setTimeout(function() {
                        that.addClass("animate");
                    }, 200 * t);
                }) : element.filter(":in-viewport").each(function() {
                    var that = $(this);
                    t++, setTimeout(function() {
                        that.addClass("animate");
                    }, 200 * t);
                });
            }
        },
        styleSwitcher: {
            selector: "#style-switcher",
            init: function() {
                var base = this, container = $(base.selector), toggle = container.find(".style-toggle"), onoffswitch = container.find(".switch");
                toggle.on("click", function() {
                    return container.add($(this)).toggleClass("active"), !1;
                }), onoffswitch.each(function() {
                    var that = $(this);
                    that.find("a").on("click", function() {
                        var dataclass = $(this).data("class");
                        return that.find("a").removeClass("active"), $(this).addClass("active"), "boxed" === $(this).parents("ul").data("name") && ($(document.body).removeClass("boxed"), 
                        $(document.body).addClass(dataclass)), "header_grid" === $(this).parents("ul").data("name") && ($(".header .row, #subheader .row").removeClass("notgrid"), 
                        $(".header .row, #subheader .row").addClass(dataclass)), !1;
                    });
                });
                var style = $('<style type="text/css" id="theme_color" />').appendTo("head");
                container.find(".first").minicolors({
                    defaultValue: $(".first").data("default"),
                    change: function(hex) {
                        style.html(".badge.onsale, .price_slider .ui-slider-range { background:" + hex + "; } .product-category > a:after { border-color: " + hex + "; } a:hover, #nav .sf-menu > li > a:hover, .post .post-meta ul li a, .post .post-title a:hover, .more-link, #comments ol.commentlist .comment-reply-link, .price ins, .price > .amount, .product_meta p a, .shopping_bag tbody tr td.order-status.approved, .shopping_bag tbody tr td.product-name .posted_in a, .shopping_bag tbody tr td.product-quantity .wishlist-in-stock, .lost_password, #my-account-main .account-icon-box:hover, .lookbook-container .look .info a .amount { color: " + hex + "; }");
                    }
                });
            }
        }
    }, win.resize(function() {
        SITE.snap_scroll.setHeight();
    }), win.scroll(function() {}), $doc.ready(function() {
        SITE.init();
    });
    const oldOrderLinks = document.querySelectorAll(".shopping_bag .link--inactive"), popupErrorMessage = document.querySelector(".popup-error-message");
    if (oldOrderLinks.length > 0) for (var i = 0; i < oldOrderLinks.length; i++) oldOrderLinks[i].removeAttribute("href"), 
    oldOrderLinks[i].addEventListener("click", function() {
        popupErrorMessage.classList.contains("active") ? (popupErrorMessage.classList.add("exists"), 
        setTimeout(function() {
            popupErrorMessage.classList.remove("exists");
        }, 300)) : (popupErrorMessage.classList.add("active"), setTimeout(function() {
            popupErrorMessage.classList.remove("active");
        }, 4e3));
    });
}(jQuery, this, _);