JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr/* jQuery Nice Select - v1.0 https://github.com/hernansartorio/jquery-nice-select Made by Hernán Sartorio */ !function (e) { e.fn.niceSelect = function (t) { function s(t) { t.after(e("
").addClass("nice-select").addClass(t.attr("class") || "").addClass(t.attr("disabled") ? "disabled" : "").attr("tabindex", t.attr("disabled") ? null : "0").html('')); var s = t.next(), n = t.find("option"), i = t.find("option:selected"); s.find(".current").html(i.data("display") || i.text()), n.each(function (t) { var n = e(this), i = n.data("display"); s.find("ul").append(e("
  • ").attr("data-value", n.val()).attr("data-display", i || null).addClass("option" + (n.is(":selected") ? " selected" : "") + (n.is(":disabled") ? " disabled" : "")).html(n.text())) }) } if ("string" == typeof t) return "update" == t ? this.each(function () { var t = e(this), n = e(this).next(".nice-select"), i = n.hasClass("open"); n.length && (n.remove(), s(t), i && t.next().trigger("click")) }) : "destroy" == t ? (this.each(function () { var t = e(this), s = e(this).next(".nice-select"); s.length && (s.remove(), t.css("display", "")) }), 0 == e(".nice-select").length && e(document).off(".nice_select")) : console.log('Method "' + t + '" does not exist.'), this; this.hide(), this.each(function () { var t = e(this); t.next().hasClass("nice-select") || s(t) }), e(document).off(".nice_select"), e(document).on("click.nice_select", ".nice-select", function (t) { var s = e(this); e(".nice-select").not(s).removeClass("open"), s.toggleClass("open"), s.hasClass("open") ? (s.find(".option"), s.find(".focus").removeClass("focus"), s.find(".selected").addClass("focus")) : s.focus() }), e(document).on("click.nice_select", function (t) { 0 === e(t.target).closest(".nice-select").length && e(".nice-select").removeClass("open").find(".option") }), e(document).on("click.nice_select", ".nice-select .option:not(.disabled)", function (t) { var s = e(this), n = s.closest(".nice-select"); n.find(".selected").removeClass("selected"), s.addClass("selected"); var i = s.data("display") || s.text(); n.find(".current").text(i), n.prev("select").val(s.data("value")).trigger("change") }), e(document).on("keydown.nice_select", ".nice-select", function (t) { var s = e(this), n = e(s.find(".focus") || s.find(".list .option.selected")); if (32 == t.keyCode || 13 == t.keyCode) return s.hasClass("open") ? n.trigger("click") : s.trigger("click"), !1; if (40 == t.keyCode) { if (s.hasClass("open")) { var i = n.nextAll(".option:not(.disabled)").first(); i.length > 0 && (s.find(".focus").removeClass("focus"), i.addClass("focus")) } else s.trigger("click"); return !1 } if (38 == t.keyCode) { if (s.hasClass("open")) { var l = n.prevAll(".option:not(.disabled)").first(); l.length > 0 && (s.find(".focus").removeClass("focus"), l.addClass("focus")) } else s.trigger("click"); return !1 } if (27 == t.keyCode) s.hasClass("open") && s.trigger("click"); else if (9 == t.keyCode && s.hasClass("open")) return !1 }); var n = document.createElement("a").style; return n.cssText = "pointer-events:auto", "auto" !== n.pointerEvents && e("html").addClass("no-csspointerevents"), this } }(jQuery); $(document).ready(function () { //nice select $('select').niceSelect(); /********* On scroll header Sticky *********/ $(window).scroll(function () { if ($(window).scrollTop() >= 100) { $('header').addClass('header-sticky'); } else { $('header').removeClass('header-sticky'); } }); var headerHeight = $('header').outerHeight(); // Get the height of the header // Select the first section after the header and set its margin-top //$('header').nextAll('section').first().css('margin-top', headerHeight + 'px'); $('header').nextAll().first().css('margin-top', headerHeight + 'px'); $('.back-to-top').hide(); $(window).scroll(function () { if ($(this).scrollTop() >= 300) { $('.back-to-top').fadeIn(); } else { $('.back-to-top').fadeOut(); } }); // Click event to scroll to top $('.back-to-top').click(function () { $('html, body').animate({ scrollTop: 0 }); return false; }); // Mobile Menu $(".mobile-menu-button").on("click", function () { $(".mobile-menu-wrapper, body").toggleClass("active-menu"); }); $(".menu-close-icon svg").on("click", function () { $(".mobile-menu-wrapper, body").toggleClass("active-menu"); }); // card hover effect $('.main-card .inner-card').mouseenter(function () { $(this).parent().find('.plant-img').css({ 'margin-left': '35px' }); }); $('.main-card .inner-card').mouseleave(function () { $(this).parent().find('.plant-img').css({ 'margin-left': '0px' }); }); initializeThemeSliders(); // Header Search Popup $("#header-search").click(function () { $(".search-popup").toggleClass("active"); $("body").toggleClass("no-scroll"); }); $(".close-search, .search-form-wrapper #btn-submit").click(function () { $(".search-popup").removeClass("active"); $("body").removeClass("no-scroll"); }); // Cart Popup $('.cart-header').on('click', function (e) { e.preventDefault(); setTimeout(function () { $('body').addClass('no-scroll cartOpen'); $('.overlay').addClass('cart-overlay'); }, 50); }); $('body').on('click', '.overlay.cart-overlay, .closecart', function (e) { e.preventDefault(); $('.overlay').removeClass('cart-overlay'); $('body').removeClass('no-scroll cartOpen'); }); // Subscribe popup Js $('.close-sub-btn').click(function () { $('.subscribe-popup').slideUp(); $(".subscribe-overlay").removeClass("open"); }); /********* Cart Popup ********/ $('.wish-header').on('click', function (e) { e.preventDefault(); setTimeout(function () { $('body').addClass('no-scroll wishOpen'); $('.overlay').addClass('wish-overlay'); }, 50); }); $('body').on('click', '.overlay.wish-overlay, .closewish', function (e) { e.preventDefault(); $('.overlay').removeClass('wish-overlay'); $('body').removeClass('no-scroll wishOpen'); }); /********* wish Popup end ********/ // increment decrement var quantity = 0; $('.quantity-increment').click(function () { var t = $(this).siblings('.quantity'); var quantity = parseInt($(t).val()); $(t).val(quantity + 1); }); $('.quantity-decrement').click(function () { var t = $(this).siblings('.quantity'); var quantity = parseInt($(t).val()); if (quantity > 1) { $(t).val(quantity - 1); } }); //video-play //video-play $('.play-vid').on('click', function () { if ($(this).attr('data-click') == 1) { $(this).attr('data-click', 0) $('#img-vid')[0].pause(); $(".play-vid").css("opacity", "1"); } else { $(this).attr('data-click', 1) $('#img-vid')[0].play(); $(".play-vid").css("opacity", "1"); $(".play-vid").css("opacity", "0"); } }); $('.play-btn').click(function (m) { $('body,html').addClass('no-scroll popupopen'); $('#popup-box.overlay-popup').addClass('popup-show'); }); $('.variant-play-btn').click(function (m) { $('body,html').addClass('no-scroll popupopen'); $('#variant-popup-box.overlay-popup').addClass('popup-show'); }); $('.close-popup').click(function (m) { $('body,html').removeClass('no-scroll popupopen'); $('.overlay-popup').removeClass('popup-show'); }); // number counter function inVisible(element) { var WindowTop = $(window).scrollTop(); var WindowBottom = WindowTop + $(window).height(); var ElementTop = element.offset().top; var ElementBottom = ElementTop + element.height(); if ((ElementBottom <= WindowBottom) && ElementTop >= WindowTop) animate(element); } function animate(element) { if (!element.hasClass('ms-animated')) { var maxval = element.data('max'); var html = element.html(); element.addClass("ms-animated"); $({ countNum: element.html() }).animate({ countNum: maxval }, { duration: 5000, easing: 'linear', step: function () { element.html(Math.floor(this.countNum) + html); }, complete: function () { element.html(this.countNum + html); } }); } } //When the document is ready $(function () { $(window).scroll(function () { $("h2[data-max]").each(function () { inVisible($(this)); }); }); }); // number counter end // TAB Js filter gallary $('ul.tabs li').click(function () { var tab_id = $(this).attr('data-tab'); $('ul.tabs li').removeClass('active'); $('.tab-content').removeClass('active'); $(this).addClass('active'); $("#" + tab_id).addClass('active'); $('.shop-protab-slider').slick('refresh'); }) // product list page start $('.acnav-label').click(function () { var label = $(this); var parent = label.parent('.has-children'); var list = label.siblings('.acnav-list'); if (parent.hasClass('is-open')) { list.slideUp('fast'); parent.removeClass('is-open'); } else { list.slideDown('fast'); parent.addClass('is-open'); } }); // Mobile Filter Popup $('.filter-icn').on('click', function (e) { e.preventDefault(); setTimeout(function () { $('body').addClass('no-scroll filter-open'); $('.overlay').addClass('active'); }, 50); }); $('body').on('click', '.overlay.active, .close-filter', function (e) { e.preventDefault(); $('.overlay').removeClass('active'); $('body').removeClass('no-scroll filter-open'); }); $('ul.tabs li').click(function () { var $this = $(this); var $theTab = $(this).attr('data-tab'); console.log($theTab); if ($this.hasClass('active')) { } else { $this.closest('.tabs-wrapper').find('ul.tabs li, .tabs-container .tab-content').removeClass('active'); $('.tabs-container .tab-content[id="' + $theTab + '"], ul.tabs li[data-tab="' + $theTab + ']').addClass('active'); } $('.shop-protab-slider').slick('refresh'); $('ul.tabs li').removeClass('active'); $(this).addClass('active'); }); if ($(".my-acc-column").length > 0) { jQuery(function ($) { var topMenuHeight = $("#daccount-nav").outerHeight(); $("#account-nav").menuScroll(topMenuHeight); $(".account-list li:first-child").addClass("active"); }); // COPY THE FOLLOWING FUNCTION INTO ANY SCRIPTS jQuery.fn.extend({ menuScroll: function (offset) { // Declare all global variables var topMenu = this; var topOffset = offset ? offset : 0; var menuItems = $(topMenu).find("a"); var lastId; // Save all menu items into scrollItems array var scrollItems = $(menuItems).map(function () { var item = $($(this).attr("href")); if (item.length) { return item; } }); // When the menu item is clicked, get the #id from the href value, then scroll to the #id element $(topMenu).on("click", "a", function (e) { var href = $(this).attr("href"); var offsetTop = href === "#" ? 0 : $(href).offset().top - topOffset; function checkWidth() { var windowSize = $(window).width(); if (windowSize <= 767) { $('html, body').stop().animate({ scrollTop: offsetTop - 200 }, 300); } else { $('html, body').stop().animate({ scrollTop: offsetTop - 100 }, 300); } } // Execute on load checkWidth(); // Bind event listener $(window).resize(checkWidth); e.preventDefault(); }); // When page is scrolled $(window).scroll(function () { function checkWidth() { var windowSize = $(window).width(); if (windowSize <= 767) { var nm = $("html").scrollTop(); var nw = $("body").scrollTop(); var fromTop = (nm > nw ? nm : nw) + topOffset; // When the page pass one #id section, return all passed sections to scrollItems and save them into new array current var current = $(scrollItems).map(function () { if ($(this).offset().top - 250 <= fromTop) return this; }); // Get the most recent passed section from current array current = current[current.length - 1]; var id = current && current.length ? current[0].id : ""; if (lastId !== id) { lastId = id; // Set/remove active class $(menuItems) .parent().removeClass("active") .end().filter("[href='#" + id + "']").parent().addClass("active"); } } else { var nm = $("html").scrollTop(); var nw = $("body").scrollTop(); var fromTop = (nm > nw ? nm : nw) + topOffset; // When the page pass one #id section, return all passed sections to scrollItems and save them into new array current var current = $(scrollItems).map(function () { if ($(this).offset().top <= fromTop) return this; }); // Get the most recent passed section from current array current = current[current.length - 1]; var id = current && current.length ? current[0].id : ""; if (lastId !== id) { lastId = id; // Set/remove active class $(menuItems) .parent().removeClass("active") .end().filter("[href='#" + id + "']").parent().addClass("active"); } } } // Execute on load checkWidth(); // Bind event listener $(window).resize(checkWidth); }); } }); } initializeThemeSliders(); }); function initializeThemeSliders() { // Slick lightbox if ($('.lightbox').length > 0) { $('.lightbox').slickLightbox({ itemSelector: 'a.open-lightbox', caption: 'caption', prevArrow: '', nextArrow: '', navigateByKeyboard: true, layouts: { closeButton: '' } }); } // hero slider $('.hero-main-slider').slick({ arrows: true, dots: true, autoplay: false, speed: 2000, autoplaySpeed: 1000, swipeToSlide: true, swipeToSlide: true, }); // article sec slider $('.article-slider').slick({ infinite: true, slidesToShow: 4, speed: 800, autoplaySpeed: 1000, // autoplay: true, slidesToScroll: 4, // initialSlide: 3, swipeToSlide: true, centerMode: false, responsive: [ { breakpoint: 992, settings: { slidesToShow: 3, slidesToScroll: 3, } }, { breakpoint: 767, settings: { slidesToShow: 2, slidesToScroll: 2, } }, { breakpoint: 500, settings: { slidesToShow: 1, slidesToScroll: 1, } }], }); // best-seller-slider $('.best-seller-slider').slick({ infinite: true, slidesToShow: 4, speed: 800, autoplaySpeed: 1500, // autoplay: true, slidesToScroll: 4, // initialSlide: 3, swipeToSlide: true, arrows: true, responsive: [ { breakpoint: 992, settings: { slidesToShow: 3, slidesToScroll: 3, } }, { breakpoint: 767, settings: { slidesToShow: 2, slidesToScroll: 2, } }, { breakpoint: 500, settings: { slidesToShow: 1, slidesToScroll: 1, } }], }); // testimonials slider $('.testi-slider').slick({ arrows: true, dots: false, slidesToShow: 1, // autoplay: true, speed: 1000, autoplaySpeed: 1000, swipeToSlide: true, asNavFor: '.right-slide-slider', }); // right-slide-slider $('.right-slide-slider').slick({ arrows: false, dots: false, slidesToShow: 1, speed: 1000, autoplaySpeed: 1000, swipeToSlide: true, asNavFor: '.testi-slider', responsive: [ { breakpoint: 992, settings: { slidesToShow: 3, } }, { breakpoint: 768, settings: { slidesToShow: 2, } }, { breakpoint: 450, settings: { slidesToShow: 1, } }, ] }); // fifth-sec-right-slider $('.fifth-sec-right-slider').slick({ arrows: true, dots: false, slidesToShow: 2, speed: 1000, autoplaySpeed: 1000, swipeToSlide: true, responsive: [ { breakpoint: 992, settings: { slidesToShow: 3, } }, { breakpoint: 768, settings: { slidesToShow: 2, } }, { breakpoint: 450, settings: { slidesToShow: 1, } }, ] }); // product slider $('.product-main-slider').slick({ slidesToShow: 1, slidesToScroll: 1, arrows: true, dots: true, infinite: true, speed: 1000, loop: true, asNavFor: '.product-thumb-slider', autoplay: false, responsive: [{ breakpoint: 576, settings: { arrows: false, dots: false, } }] }); $('.product-thumb-slider').slick({ slidesToShow: 4, arrows: false, asNavFor: '.product-main-slider', dots: false, speed: 1000, slidesToScroll: 1, touchMove: true, focusOnSelect: true, loop: true, infinite: true, vertical: true, responsive: [{ breakpoint: 576, settings: { vertical: false, } }] }); if ($('.shop-protab-slider').length > 0) { $('.shop-protab-slider').slick({ // rows: 2, arrows: false, dots: false, infinite: true, speed: 800, slidesToShow: 4, slidesToScroll: 4, arrows: true, responsive: [ { breakpoint: 992, settings: { slidesToShow: 3, slidesToScroll: 3, } }, { breakpoint: 768, settings: { slidesToShow: 2, slidesToScroll: 2, } }, { breakpoint: 575, settings: { slidesToShow: 1, slidesToScroll: 1, } } ] }); } }