text: !(function(u) {
    "use strict";
    var p = {
      initialised: !1,
      mobile: !1,
      init: function() {
        this.initialised ||
          ((this.initialised = !0),
          this.checkMobile(),
          this.stickyHeader(),
          this.headerSearchToggle(),
          this.mMenuIcons(),
          this.mMenuToggle(),
          this.mobileMenu(),
          this.scrollToTop(),
          this.quantityInputs(),
          this.countTo(),
          this.tooltip(),
          this.popover(),
          this.changePassToggle(),
          this.changeBillToggle(),
          this.catAccordion(),
          this.toggleFilter(),
          this.toggleSidebar(),
          this.productTabSroll(),
          this.scrollToElement(),
          this.loginPopup(),
          this.modalView(),
          this.productManage(),
          this.ratingTooltip(),
          this.windowClick(),
          this.popupMenu(),
          this.topNotice(),
          this.ratingForm(),
          this.parallax(),
          this.sideMenu(),
          u.fn.superfish && this.menuInit(),
          u.fn.owlCarousel && this.owlCarousels(),
          "object" == typeof noUiSlider && this.filterSlider(),
          u.fn.themeSticky && this.stickySidebar(),
          u.fn.magnificPopup && this.lightBox(),
          u.fn.Morphext && this.wordRotate(),
          u.fn.isotope && this.isotopes(),
          u.fn.elevateZoom && this.zoomImage());
      },
      checkMobile: function() {
        /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
          navigator.userAgent
        )
          ? (this.mobile = !0)
          : (this.mobile = !1);
      },
      menuInit: function() {
        u(".menu:not(.menu-vertical)").superfish({
          popUpSelector: "ul, .megamenu",
          hoverClass: "show",
          delay: 0,
          speed: 80,
          speedOut: 80,
          autoArrows: !0,
        }),
          u(".menu.menu-vertical").superfish({
            popUpSelector: "ul, .megamenu",
            hoverClass: "show",
            delay: 0,
            speed: 200,
            speedOut: 200,
            autoArrows: !0,
            animation: { left: "100%", opacity: "show" },
            animationOut: { left: "90%", opacity: "hide" },
          });
        function e() {
          u(".menu:not(.menu-vertical) .megamenu-fixed-width").each(function() {
            var e = u(this),
              t = e.parent().offset().left,
              o = e.outerWidth(),
              i = u(window).width() - 45 - t - o;
            i < 0 ? e.css("left", "-" + t + "px") : e.css("left", "0px"),
              console.log(t, 0, i);
          });
        }
        e(),
          u.fn.smartresize ? u(window).smartresize(e) : u(window).on("resize", e);
      },
      stickyHeader: function() {
        function l(o, e) {
          o.hasClass("fixed") &&
            (o.removeClass("fixed"),
            o.css("top", ""),
            e.changes &&
              e.changes.forEach(function(e) {
                e.removeClass && o.find(e.item).addClass(e.removeClass),
                  e.addClass && o.find(e.item).removeClass(e.addClass);
              }),
            e.move &&
              e.move.forEach(function(e) {
                var t;
                e.clone
                  ? o.find(e.item).hide()
                  : ((t = 0),
                    o.find(e.item).each(function() {
                      u(
                        '.sticky-placeholder[data-sticky-placeholder="' +
                          (e.indexStart + ++t) +
                          '"]'
                      ).replaceWith(u(this));
                    }));
              }),
            o.parent().css("min-height", ""));
        }
        function e() {
          var a, r, i;
          u(window).width() < 992
            ? c &&
              t.each(function(e) {
                l(u(this), d[e]);
              })
            : (c ||
                ((i = 0),
                (d = []),
                (t = u(".sticky-header").each(function() {
                  var e = u(this),
                    t = e.data("sticky-options"),
                    o = {};
                  t && (o = JSON.parse(t.replace(/'/g, '"').replace(";", ""))),
                    o.move &&
                      o.move.forEach(function(e) {
                        e.clone || ((e.indexStart = i), (i += u(e.item).length));
                      }),
                    (o.height = e.outerHeight()),
                    (o.offset = e.offset().top),
                    (o.paddingTop = parseInt(e.css("padding-top"))),
                    d.push(o),
                    e.wrap('<div class="sticky-wrapper"></div>');
                })),
                (c = !0)),
              (a = u(window).scrollTop()),
              (r = 0),
              t.each(function(e) {
                var n,
                  s,
                  t,
                  o = u(this),
                  i = d[e];
                a + r >= i.offset + i.paddingTop
                  ? (o.hasClass("fixed") ||
                      ((s = i),
                      (t = r),
                      (n = o).hasClass("fixed") ||
                        (n.parent().css("min-height", s.height),
                        s.move &&
                          s.move.forEach(function(t) {
                            var o, i;
                            t.clone
                              ? n.find(t.item).show()
                              : ((o = n.find(s.moveTo)),
                                (i = 0),
                                u(t.item).each(function() {
                                  var e = u(this);
                                  e.wrap(
                                    '<div class="sticky-placeholder" style="width:' +
                                      e.outerWidth() +
                                      "px;height:" +
                                      e.outerHeight() +
                                      "px;margin:" +
                                      e.css("margin") +
                                      ';" data-sticky-placeholder="' +
                                      (t.indexStart + ++i) +
                                      '"></div>'
                                  ),
                                    "end" == t.position
                                      ? e.appendTo(o)
                                      : e.prependTo(o);
                                }));
                          }),
                        s.changes &&
                          s.changes.forEach(function(e) {
                            e.removeClass &&
                              n.find(e.item).removeClass(e.removeClass),
                              e.addClass && n.find(e.item).addClass(e.addClass);
                          }),
                        n
                          .addClass("fixed")
                          .css("top", -s.height)
                          .animate({ top: t }))),
                    (r += o.outerHeight()))
                  : (!o.hasClass("fixed") && c) || l(o, i);
              }));
        }
        var c = !1,
          t = null,
          d = null;
        //setTimeout(e, 500), u(window).smartresize(e), u(window).on("scroll", e);
      },
      headerSearchToggle: function() {
        u(".header-search").length &&
          u("body")
            .on("click", ".header-search", function(e) {
              e.stopPropagation();
            })
            .on("click", ".search-toggle", function(e) {
              var t = u(this).closest(".header-search");
              t.toggleClass("show"),
                u(".header-search-wrapper").toggleClass("show"),
                t.hasClass("show") && t.find("input.form-control").focus(),
                e.preventDefault();
            })
            .on("click", function(e) {
              u(".header-search").removeClass("show"),
                u(".header-search-wrapper").removeClass("show"),
                u("body").removeClass("is-search-active");
            });
        function e() {
          u(".header-search").each(function() {
            var e = u(this);
            e.find(".header-search-wrapper").css(
              u(window).width() < 576
                ? {
                    left: 15 - e.offset().left + "px",
                    right:
                      15 + e.offset().left + e.width() - u(window).width() + "px",
                  }
                : { left: "", right: "" }
            );
          });
        }
        e(),
          u.fn.smartresize ? u(window).smartresize(e) : u(window).on("resize", e);
      },
      mMenuToggle: function() {
        u(".mobile-menu-toggler").on("click", function(e) {
          u("body").toggleClass("mmenu-active"),
            u(this).toggleClass("active"),
            e.preventDefault();
        }),
          u(".menu-toggler").on("click", function(e) {
            992 <= u(window).width()
              ? u(".main-dropdown-menu").toggleClass("show")
              : u("body").toggleClass("mmenu-active"),
              e.preventDefault();
          }),
          u(".mobile-menu-overlay, .mobile-menu-close").on("click", function(e) {
            u("body").removeClass("mmenu-active"),
              u(".menu-toggler").removeClass("active"),
              e.preventDefault();
          });
      },
      mMenuIcons: function() {
        u(".mobile-menu")
          .find("li")
          .each(function() {
            var e = u(this);
            e.find("ul").length &&
              u("<span/>", { class: "mmenu-btn" }).appendTo(e.children("a"));
          });
      },
      mobileMenu: function() {
        u(".mmenu-btn").on("click", function(e) {
          var t = u(this).closest("li"),
            o = t.find("ul").eq(0);
          t.hasClass("open")
            ? o.slideUp(300, function() {
                t.removeClass("open");
              })
            : o.slideDown(300, function() {
                t.addClass("open");
              }),
            e.stopPropagation(),
            e.preventDefault();
        });
      },
      owlCarousels: function() {
        function t(e, t) {
          var o = t ? u.extend(!0, {}, n, t) : n;
          e.hasClass("nav-thin") &&
            (o.navText = [
              '<i class="icon-left-open-big">',
              '<i class="icon-right-open-big">',
            ]);
          var i = e.data("owl-options");
          "string" == typeof i &&
            ((i = JSON.parse(i.replace(/'/g, '"').replace(";", ""))),
            (o = u.extend(!0, {}, o, i))),
            e.owlCarousel(o);
        }
        var n = {
            loop: !0,
            margin: 0,
            responsiveClass: !0,
            nav: !1,
            navText: [
              '<i class="icon-angle-left">',
              '<i class="icon-angle-right">',
            ],
            dots: !0,
            autoplay: !0,
            autoplayTimeout: 15e3,
            items: 1,
          },
          o = {
            ".home-slider": {
              lazyLoad: !0,
              autoplay: !1,
              dots: !1,
              nav: !0,
              autoplayTimeout: 12e3,
              animateOut: "fadeOut",
              navText: [
                '<i class="icon-angle-left">',
                '<i class="icon-angle-right">',
              ],
              loop: !0,
            },
            ".testimonials-carousel": {
              lazyLoad: !0,
              autoHeight: !0,
              responsive: { 992: { items: 2 } },
            },
            ".featured-products": {
              loop: !1,
              margin: 30,
              autoplay: !1,
              responsive: {
                0: { items: 2 },
                700: { items: 3, margin: 15 },
                1200: { items: 4 },
              },
            },
            ".cats-slider": {
              loop: !1,
              margin: 20,
              autoplay: !1,
              nav: !0,
              dots: !1,
              items: 2,
              responsive: {
                576: { items: 3 },
                992: { items: 4 },
                1200: { items: 5 },
                1400: { items: 6 },
              },
            },
            ".products-slider": {
              loop: !1,
              margin: 20,
              autoplay: !1,
              dots: !0,
              items: 2,
              responsive: { 576: { items: 3 }, 992: { items: 4 } },
            },
            ".categories-slider": {
              loop: !1,
              margin: 20,
              autoplay: !1,
              nav: !0,
              dots: !1,
              items: 2,
              responsive: { 576: { items: 3 }, 992: { items: 5 } },
            },
            ".quantity-inputs": {
              items: 2,
              margin: 20,
              dots: !1,
              nav: !0,
              responsive: { 992: { items: 4 }, 768: { items: 3 } },
              onInitialized: function() {
                this.$element.find(".horizontal-quantity").val(1);
              },
            },
            ".banners-slider": {
              dots: !0,
              loop: !1,
              margin: 20,
              responsive: { 576: { items: 2 }, 992: { items: 3 } },
            },
            ".brands-slider": {
              loop: !1,
              margin: 20,
              autoHeight: !0,
              autoplay: !1,
              dots: !1,
              items: 2,
              responsive: { 576: { items: 4 }, 768: { items: 6 } },
            },
            ".widget-featured-products": {
              lazyLoad: !0,
              nav: !0,
              navText: [
                '<i class="icon-angle-left">',
                '<i class="icon-angle-right">',
              ],
              dots: !1,
              autoHeight: !0,
            },
            ".entry-slider": { margin: 2, lazyLoad: !0 },
            ".related-posts-carousel": {
              loop: !1,
              margin: 30,
              autoplay: !1,
              responsive: { 480: { items: 2 }, 1200: { items: 3 } },
            },
            ".boxed-slider": {
              lazyLoad: !0,
              autoplayTimeout: 2e4,
              animateOut: "fadeOut",
              dots: !1,
            },
            ".about-slider": { margin: 2, lazyLoad: !0 },
            ".product-single-default .product-single-carousel": {
              nav: 0,
              dotsContainer: "#carousel-custom-dots",
              autoplay: !1,
              onInitialized: function() {
                // var e = this.$element;
                // u.fn.elevateZoom &&
                //     e.find("img").each(function () {
                //         var e = u(this),
                //             t = { responsive: !0, zoomWindowFadeIn: 350, zoomWindowFadeOut: 200, borderSize: 0, zoomContainer: e.parent(), zoomType: "inner", cursor: "grab" };
                //         e.elevateZoom(t);
                //     });
              },
            },
            ".product-single-extended .product-single-carousel": {
              dots: !1,
              autoplay: !1,
              center: !0,
              items: 1,
              responsive: { 768: { items: 3 } },
            },
          };
        Object.keys(o).forEach(function(e) {
          u(e).each(function() {
            t(u(this), o[e]);
          });
        }),
          u(".owl-carousel").each(function() {
            u(this).data("owl.carousel") || t(u(this), t);
          }),
          u(".home-slider").on("loaded.owl.lazy", function(e) {
            u(e.element)
              .closest(".home-slide")
              .addClass("loaded"),
              u(e.element)
                .closest(".home-slider")
                .addClass("loaded");
          }),
          u(".boxed-slider").on("loaded.owl.lazy", function(e) {
            u(e.element)
              .closest(".category-slide")
              .addClass("loaded");
          }),
          u(".about-slider").on("loaded.owl.lazy", function(e) {
            u(e.element)
              .closest("div")
              .addClass("loaded");
          }),
          u(".carousel-custom-dots .owl-dot").click(function() {
            u(".product-single-carousel").trigger("to.owl.carousel", [
              u(this).index(),
              300,
            ]);
          });
      },
      filterSlider: function() {
        var e = document.getElementById("price-slider");
        null != e &&
          (noUiSlider.create(e, {
            start: [200, 700],
            connect: !0,
            step: 100,
            margin: 100,
            range: { min: 0, max: 1e3 },
          }),
          e.noUiSlider.on("update", function(e, t) {
            (e = e.map(function(e) {
              return "$" + e;
            })),
              u("#filter-price-range").text(e.join(" - "));
          }));
      },
      stickySidebar: function() {
        var e = 10;
        u(".header .sticky-header").each(function() {
          e += u(this).height();
        }),
          u(".sidebar-wrapper, .sticky-slider").themeSticky({
            autoInit: !0,
            minWidth: 991,
            containerSelector: ".row, .container",
            paddingOffsetBottom: 10,
            paddingOffsetTop: e,
          });
      },
      countTo: function() {
        u.fn.countTo
          ? u.fn.waypoint
            ? u(".count").waypoint(
                function() {
                  u(this.element).countTo();
                },
                { offset: "90%", triggerOnce: !0 }
              )
            : u(".count").countTo()
          : u(".count").each(function() {
              var e = u(this),
                t = e.data("to");
              e.text(t);
            });
      },
      tooltip: function() {
        u.fn.tooltip &&
          u('[data-toggle="tooltip"]').tooltip({ trigger: "hover focus" });
      },
      popover: function() {
        u.fn.popover &&
          u('[data-toggle="popover"]').popover({ trigger: "focus" });
      },
      changePassToggle: function() {
        u("#change-pass-checkbox").on("change", function() {
          u("#account-chage-pass").toggleClass("show");
        });
      },
      changeBillToggle: function() {
        u("#change-bill-address").on("change", function() {
          u("#checkout-shipping-address").toggleClass("show"),
            u("#new-checkout-address").toggleClass("show");
        });
      },
      catAccordion: function() {
        u(".catAccordion")
          .on("shown.bs.collapse", function(e) {
            var t = u(e.target).closest("li");
            t.hasClass("open") || t.addClass("open");
          })
          .on("hidden.bs.collapse", function(e) {
            var t = u(e.target).closest("li");
            t.hasClass("open") && t.removeClass("open");
          });
      },
      scrollBtnAppear: function() {
        400 <= u(window).scrollTop()
          ? u("#scroll-top").addClass("fixed")
          : u("#scroll-top").removeClass("fixed");
      },
      scrollToTop: function() {
        u("#scroll-top").on("click", function(e) {
          u("html, body").animate({ scrollTop: 0 }, 1200), e.preventDefault();
        });
      },
      newsletterPopup: function() {
        u.magnificPopup.open({
          items: { src: "#newsletter-popup-form" },
          type: "inline",
          mainClass: "mfp-newsletter",
          removalDelay: 350,
          callbacks: {
            open: function() {
              var e;
              u(".sticky-header.fixed").css("margin-right") &&
                ((e =
                  Number(
                    u(".sticky-header.fixed")
                      .css("margin-right")
                      .slice(0, -2)
                  ) +
                  17 +
                  "px"),
                u(".sticky-header.fixed").css("margin-right", e),
                u(".sticky-header.fixed-nav").css("margin-right", e),
                u("#scroll-top").css("margin-right", e));
            },
            afterClose: function() {
              var e;
              u(".sticky-header.fixed").css("margin-right") &&
                ((e =
                  Number(
                    u(".sticky-header.fixed")
                      .css("margin-right")
                      .slice(0, -2)
                  ) -
                  17 +
                  "px"),
                u(".sticky-header.fixed").css("margin-right", e),
                u(".sticky-header.fixed-nav").css("margin-right", e),
                u("#scroll-top").css("margin-right", e));
            },
          },
        });
      },
      lightBox: function() {
        document.getElementById("newsletter-popup-form") &&
          setTimeout(function() {
            var e = u.magnificPopup.instance;
            e.isOpen
              ? (e.close(),
                setTimeout(function() {
                  p.newsletterPopup();
                }, 360))
              : p.newsletterPopup();
          }, 1e4);
        var o = [],
          i = u(
            0 === u(".product-single-carousel .owl-item:not(.cloned) img").length
              ? ".product-single-gallery img"
              : ".product-single-carousel .owl-item:not(.cloned) img"
          );
        i.each(function() {
          o.push({ src: u(this).attr("data-zoom-image") });
        }),
          // u(".prod-full-screen").click(function (e) {
          //     var t = e.currentTarget.closest(".product-slider-container")
          //         ? (u(".product-single-carousel").data("owl.carousel").current() + i.length - Math.ceil(i.length / 2)) % i.length
          //         : u(e.currentTarget).closest(".product-item").index();
          //     u.magnificPopup.open({ items: o, navigateByImgClick: !0, type: "image", gallery: { enabled: !0 } }, t);
          // }),
          u("body").on("click", "a.btn-quickview", function(e) {
            e.preventDefault(), p.ajaxLoading();
            var t = u(this).attr("href");
            var d = u(this).data("id");
  
            setTimeout(function() {
              u.magnificPopup.open({
                type: "ajax",
                mainClass: "mfp-ajax-product",
                tLoading: "",
                preloader: !1,
                removalDelay: 350,
                items: { src: t },
                ajax: {
                  settings: {
                    type: "GET",
                    data: {
                      id: d,
                    },
                  },
                },
                callbacks: {
                  open: function() {
                    var e;
                    u(".sticky-header.fixed").css("margin-right") &&
                      ((e =
                        Number(
                          u(".sticky-header.fixed")
                            .css("margin-right")
                            .slice(0, -2)
                        ) +
                        17 +
                        "px"),
                      u(".sticky-header.fixed").css("margin-right", e),
                      u(".sticky-header.fixed-nav").css("margin-right", e),
                      u("#scroll-top").css("margin-right", e));
                  },
                  ajaxContentAdded: function() {
                    p.owlCarousels(),
                      p.quantityInputs(),
                      "undefined" != typeof addthis
                        ? addthis.layers.refresh()
                        : u.getScript("");
                  },
                  beforeClose: function() {
                    u(".ajax-overlay").remove();
                  },
                  afterClose: function() {
                    var e;
                    u(".sticky-header.fixed").css("margin-right") &&
                      ((e =
                        Number(
                          u(".sticky-header.fixed")
                            .css("margin-right")
                            .slice(0, -2)
                        ) -
                        17 +
                        "px"),
                      u(".sticky-header.fixed").css("margin-right", e),
                      u(".sticky-header.fixed-nav").css("margin-right", e),
                      u("#scroll-top").css("margin-right", e));
                  },
                },
                ajax: { tError: "" },
              });
            }, 500);
          });
      },
      productTabSroll: function() {
        u(".rating-link").on("click", function(e) {
          if (u(".product-single-tabs").length)
            u("#product-tab-reviews").tab("show");
          else {
            if (!u(".product-single-collapse").length) return;
            u("#product-reviews-content").collapse("show");
          }
          u("#product-reviews-content").length &&
            setTimeout(function() {
              var e = u("#product-reviews-content").offset().top - 60;
              u("html, body")
                .stop()
                .animate({ scrollTop: e }, 800);
            }, 250),
            e.preventDefault();
        });
      },
      quantityInputs: function() {
        u.fn.TouchSpin &&
          (u(".vertical-quantity").TouchSpin({
            verticalbuttons: !0,
            verticalup: "",
            verticaldown: "",
            verticalupclass: "icon-up-dir",
            verticaldownclass: "icon-down-dir",
            buttondown_class: "btn btn-outline",
            buttonup_class: "btn btn-outline",
            initval: 1,
            min: 1,
          }),
          u(".horizontal-quantity").TouchSpin({
            verticalbuttons: !1,
            buttonup_txt: "",
            buttondown_txt: "",
            buttondown_class: "btn btn-outline btn-down-icon",
            buttonup_class: "btn btn-outline btn-up-icon",
            initval: 1,
            min: 1,
          }));
      },
      ajaxLoading: function() {
        u("body").append(
          "<div class='ajax-overlay'><i class='porto-loading-icon'></i></div>"
        );
      },
      wordRotate: function() {
        u(".word-rotater").each(function() {
          u(this).Morphext({ animation: "bounceIn", separator: ",", speed: 2e3 });
        });
      },
      toggleFilter: function() {
        u(".filter-toggle a").click(function(e) {
          e.preventDefault(),
            u(".filter-toggle").toggleClass("opened"),
            u("main").toggleClass("sidebar-opened");
        }),
          u(".sidebar-overlay").click(function(e) {
            u(".filter-toggle").removeClass("opened"),
              u("main").removeClass("sidebar-opened");
          }),
          u(".sort-menu-trigger").click(function(e) {
            e.preventDefault(),
              u(".select-custom").removeClass("opened"),
              u(e.target)
                .closest(".select-custom")
                .toggleClass("opened");
          });
      },
      toggleSidebar: function() {
        u(".sidebar-toggle").click(function() {
          u("main").toggleClass("sidebar-opened");
        });
      },
      scrollToElement: function() {
        u('.scrolling-box a[href^="#"]').on("click", function(e) {
          var t = u(this.getAttribute("href"));
          t.length &&
            (e.preventDefault(),
            u("html, body")
              .stop()
              .animate({ scrollTop: t.offset().top - 90 }, 700));
        });
      },
      loginPopup: function() {
        u(".login-link").click(function(e) {
          e.preventDefault(),
            p.ajaxLoading(),
            setTimeout(function() {
              u.magnificPopup.open({
                type: "ajax",
                mainClass: "login-popup",
                tLoading: "",
                preloader: !1,
                removalDelay: 350,
                items: { src: "ajax/login-popup.html" },
                callbacks: {
                  open: function() {
                    var e;
                    u(".sticky-header.fixed").css("margin-right") &&
                      ((e =
                        Number(
                          u(".sticky-header.fixed")
                            .css("margin-right")
                            .slice(0, -2)
                        ) +
                        17 +
                        "px"),
                      u(".sticky-header.fixed").css("margin-right", e),
                      u(".sticky-header.fixed-nav").css("margin-right", e),
                      u("#scroll-top").css("margin-right", e));
                  },
                  beforeClose: function() {
                    u(".ajax-overlay").remove();
                  },
                  afterClose: function() {
                    var e;
                    u(".sticky-header.fixed").css("margin-right") &&
                      ((e =
                        Number(
                          u(".sticky-header.fixed")
                            .css("margin-right")
                            .slice(0, -2)
                        ) -
                        17 +
                        "px"),
                      u(".sticky-header.fixed").css("margin-right", e),
                      u(".sticky-header.fixed-nav").css("margin-right", e),
                      u("#scroll-top").css("margin-right", e));
                  },
                },
                ajax: { tError: "" },
              });
            }, 1500);
        });
      },
      modalView: function() {
        u("body").on("click", ".btn-add-cart", function(e) {
          var t;
          u(".add-cart-box #productImage").attr(
            "src",
            u(this)
              .parents(".product-default")
              .find("figure img")
              .attr("src")
          ),
            u(".add-cart-box #productTitle").text(
              u(this)
                .parents(".product-default")
                .find(".product-title")
                .text()
            ),
            u(".sticky-header.fixed").css("margin-right") &&
              ((t =
                Number(
                  u(".sticky-header.fixed")
                    .css("margin-right")
                    .slice(0, -2)
                ) +
                17 +
                "px"),
              u(".sticky-header.fixed").css("margin-right", t),
              u(".sticky-header.fixed-nav").css("margin-right", t),
              u("#scroll-top").css("margin-right", t));
        }),
          u(".modal#addCartModal").on("hidden.bs.modal", function(e) {
            var t;
            u(".sticky-header.fixed").css("margin-right") &&
              ((t =
                Number(
                  u(".sticky-header.fixed")
                    .css("margin-right")
                    .slice(0, -2)
                ) -
                17 +
                "px"),
              u(".sticky-header.fixed").css("margin-right", t),
              u(".sticky-header.fixed-nav").css("margin-right", t),
              u("#scroll-top").css("margin-right", t));
          });
      },
      productManage: function() {
        u(".product-select").click(function(e) {
          u(this)
            .parents(".product-default")
            .find("figure img")
            .attr("src", u(this).data("src")),
            u(this)
              .addClass("checked")
              .siblings()
              .removeClass("checked");
        });
      },
      ratingTooltip: function() {
        u("body").on("mouseenter touchstart", ".product-ratings", function(e) {
          var t =
            (u(this)
              .find(".ratings")
              .width() /
              u(this).width()) *
            5;
          u(this)
            .find(".tooltiptext")
            .text(t ? t.toFixed(2) : t);
        });
      },
      windowClick: function() {
        u(document).click(function(e) {
          u(e.target).closest(".toolbox-item.select-custom").length ||
            u(".select-custom").removeClass("opened");
        });
      },
      popupMenu: function() {
        var e, t;
        u(".popup-menu").length <= 0 ||
          (0 <=
            (t =
              (e = u(".popup-menu-ul")).parent().width() -
              e.children().width()) && e.css("margin-right", "-" + t + "px"),
          e.css("margin-top", t + "px"),
          u(".popup-menu-toggler").on("click", function(e) {
            e.preventDefault(),
              u(this)
                .siblings(".popup-menu")
                .addClass("open"),
              u(document).on("keydown.popup-menu", function(e) {
                27 == e.which &&
                  (u(".popup-menu").removeClass("open"),
                  u(document).off("keydown.popup-menu"));
              });
          }),
          u("body").on("click", ".popup-menu-close", function(e) {
            u(".popup-menu").removeClass("open"),
              u(document).off("keydown.popup-menu"),
              e.preventDefault();
          }),
          u("body").on("click", ".popup-menu a", function(e) {
            var t = u(this).siblings("ul");
            t.length && t.toggleClass("open"), e.preventDefault();
          }));
      },
      topNotice: function() {
        u(".top-notice .mfp-close").length &&
          u("body").on("click", ".top-notice .mfp-close", function() {
            u(this).height(),
              u(this)
                .closest(".top-notice")
                .fadeOut(function() {
                  u(this).addClass("closed");
                });
          });
      },
      ratingForm: function() {
        u("body").on("click", ".rating-form .rating-stars > a", function(e) {
          var t = u(this);
          t
            .addClass("active")
            .siblings()
            .removeClass("active"),
            t.parent().addClass("selected"),
            t
              .closest(".rating-form")
              .find("select")
              .val(t.text()),
            e.preventDefault();
        });
      },
      parallax: function() {
        var e = u("[data-parallax]"),
          d = {
            speed: 1.5,
            horizontalPosition: "50%",
            offset: 0,
            enableOnMobile: !0,
          };
        e.length &&
          e.each(function() {
            var e,
              t,
              o,
              i,
              n = u(this),
              s =
                (s = n.data("parallax")) &&
                JSON.parse(s.replace(/'/g, '"').replace(";", "")),
              a = u.extend(!0, {}, d, s),
              r = u(window),
              l = u('<div class="parallax-background"></div>'),
              c = n.data("image-src")
                ? "url(" + n.data("image-src") + ")"
                : n.css("background-image");
            l.css({
              "background-image": c,
              "background-size": "cover",
              "background-position": "50% 0%",
              position: "absolute",
              top: 0,
              left: 0,
              width: "100%",
              height: 100 * a.speed + "%",
            }),
              n.prepend(l),
              n.css({ position: "relative", overflow: "hidden" }),
              !p.mobile || a.enableOnMobile
                ? ((i = function() {
                    (e = n.offset()),
                      (t = -(r.scrollTop() - (e.top - 100)) / (a.speed + 2)),
                      (o = t < 0 ? Math.abs(t) : -Math.abs(t)),
                      l.css({
                        transform:
                          "translate3d(0, " + (o - 50 + a.offset) + "px, 0)",
                        "background-position-x": a.horizontalPosition,
                      });
                  }),
                  u(window).on("scroll resize", i),
                  i())
                : n.addClass("parallax-disabled");
          });
      },
      isotopes: function() {
        var s = {
          itemsSelector: ".grid-item",
          masonry: { columnWidth: ".grid-col-sizer" },
          percentPosition: !0,
          sortBy: "original-order",
          getSortData: { "md-order": "[data-md-order] parseInt" },
          sortReorder: !1,
        };
        u(".grid").each(function() {
          var e,
            t = u(this),
            o =
              (o = t.data("grid-options")) &&
              JSON.parse(o.replace(/'/g, '"').replace(";", "")),
            i = u.extend(!0, {}, s, o),
            n = t.isotope(i);
          i.sortReorder &&
            ((e = function() {
              var e = u(window).width();
              n.isotope({
                sortBy: e < 768 && 400 < e ? "md-order" : "original-order",
              });
            }),
            u.fn.smartresize
              ? u(window).smartresize(e)
              : u(window).on("resize", e));
        });
      },
      zoomImage: function() {
        u(".product-single-grid .product-single-gallery img").each(function() {
          var e = u(this),
            t = {
              responsive: !0,
              zoomWindowFadeIn: 350,
              zoomWindowFadeOut: 200,
              borderSize: 0,
              zoomContainer: e.parent(),
              zoomType: "inner",
              cursor: "grab",
            };
          e.elevateZoom(t);
        });
      },
      sideMenu: function() {
        u(".side-menu").length &&
          u("body").on("click", ".side-menu-toggle", function(e) {
            u(this)
              .siblings("ul")
              .slideToggle("fast"),
              u(this)
                .parent()
                .toggleClass("show"),
              e.stopPropagation();
          });
      },
    };
    u("body").prepend("");
    u(".loadmore");
    jQuery(document).ready(function() {
      p.init();
    }),
      u(window).on("load", function() {
        u("body").addClass("loaded"), p.scrollBtnAppear();
      }),
      u(window).on("scroll", function() {
        p.scrollBtnAppear();
      });
  })(jQuery),
    $(".megamenu-fixed-width").css("width", $(document).width());
  // console.log( $(document).width())
  