(function ($) { "use strict"; // Sticky menu var $window = $(window); $window.on('scroll', function () { var scroll = $window.scrollTop(); if (scroll < 300) { $(".sticky").removeClass("is-sticky"); } else { $(".sticky").addClass("is-sticky"); } }); // tooltip active js $('[data-toggle="tooltip"]').tooltip(); // Background Image JS start var bgSelector = $(".bg-img"); bgSelector.each(function (index, elem) { var element = $(elem), bgSource = element.data('bg'); element.css('background-image', 'url(' + bgSource + ')'); }); // Off Canvas Open close $(".mobile-menu-btn").on('click', function () { $("body").addClass('fix'); $(".off-canvas-wrapper").addClass('open'); }); $(".btn-close-off-canvas,.off-canvas-overlay").on('click', function () { $("body").removeClass('fix'); $(".off-canvas-wrapper").removeClass('open'); }); // offcanvas mobile menu var $offCanvasNav = $('.mobile-menu'), $offCanvasNavSubMenu = $offCanvasNav.find('.dropdown'); /*Add Toggle Button With Off Canvas Sub Menu*/ $offCanvasNavSubMenu.parent().prepend('
'); /*Close Off Canvas Sub Menu*/ $offCanvasNavSubMenu.slideUp(); /*Category Sub Menu Toggle*/ $offCanvasNav.on('click', 'li a, li .menu-expand', function(e) { var $this = $(this); if ( ($this.parent().attr('class').match(/\b(menu-item-has-children|has-children|has-sub-menu)\b/)) && ($this.attr('href') === '#' || $this.hasClass('menu-expand')) ) { e.preventDefault(); if ($this.siblings('ul:visible').length){ $this.parent('li').removeClass('active'); $this.siblings('ul').slideUp(); } else { $this.parent('li').addClass('active'); $this.closest('li').siblings('li').removeClass('active').find('li').removeClass('active'); $this.closest('li').siblings('li').find('ul:visible').slideUp(); $this.siblings('ul').slideDown(); } } }); // hero slider active js $('.hero-slider-active').slick({ fade: true, speed: 1000, dots: false, autoplay: true, prevArrow: '', nextArrow: '', responsive: [{ breakpoint: 992, settings: { arrows: false, dots: true } }] }); // Hero main slider active js $('.hero-slider-active-4').slick({ autoplay: true, speed: 1000, arrows: false, slidesToShow: 4, responsive: [{ breakpoint: 1200, settings: { slidesToShow: 3, } }, { breakpoint: 992, settings: { slidesToShow: 2, } }, { breakpoint: 768, settings: { slidesToShow: 1, dots: true } } ] }); // product carousel active js $('.product-carousel-4').slick({ speed: 1000, autoplay: true, slidesToShow: 4, adaptiveHeight: true, prevArrow: '', nextArrow: '', responsive: [{ breakpoint: 992, settings: { slidesToShow: 3 } }, { breakpoint: 768, settings: { slidesToShow: 2, arrows: false } }, { breakpoint: 480, settings: { slidesToShow: 1, arrows: false } }] }); // product carousel active $('.product-carousel-4_2').slick({ speed: 1000, slidesToShow: 4, autoplay: true, rows: 2, adaptiveHeight: true, prevArrow: '', nextArrow: '', responsive: [{ breakpoint: 992, settings: { slidesToShow: 3 } }, { breakpoint: 768, settings: { slidesToShow: 2, arrows: false, rows: 1 } }, { breakpoint: 480, settings: { slidesToShow: 1, arrows: false, rows: 1 } }] }); // product banner active js $('.product-banner-carousel').slick({ autoplay: true, speed: 1000, arrows: false, slidesToShow: 4, adaptiveHeight: true, responsive: [{ breakpoint: 992, settings: { slidesToShow: 3 } }, { breakpoint: 768, settings: { slidesToShow: 2 } }, { breakpoint: 480, settings: { slidesToShow: 1 } }] }); // group product carousel active $('.group-list-carousel').each(function () { var $this = $(this); var $arrowContainer = $(this).parent().siblings('.section-title-append').find('.slick-append'); $this.slick({ infinite: true, rows: 4, prevArrow: '', nextArrow: '', appendArrows: $arrowContainer, responsive: [{ breakpoint: 992, settings: { slidesToShow: 2, } }, { breakpoint: 768, settings: { slidesToShow: 1, } }] }); }); // blog carousel active start $('.group-list-carousel--3').slick({ autoplay: true, speed: 1000, rows: 3, slidesToShow: 3, adaptiveHeight: true, prevArrow: '', nextArrow: '', responsive: [{ breakpoint: 992, settings: { slidesToShow: 2 } }, { breakpoint: 768, settings: { arrows: false, slidesToShow: 1 } }] }); // blog carousel active start $('.blog-carousel-2').slick({ speed: 1000, dots: true, arrows: false, autoplay: true, }); // testimonial cariusel active js $('.testimonial-content-carousel').slick({ arrows: false, asNavFor: '.testimonial-thumb-carousel' }); // product details slider nav active $('.testimonial-thumb-carousel').slick({ slidesToShow: 3, asNavFor: '.testimonial-content-carousel', centerMode: true, arrows: false, centerPadding: 0, focusOnSelect: true }); // blog carousel active $('.blog-carousel-active').slick({ autoplay: true, speed: 1000, slidesToShow: 3, adaptiveHeight: true, prevArrow: '', nextArrow: '', responsive: [{ breakpoint: 992, settings: { slidesToShow: 2 } }, { breakpoint: 768, settings: { arrows: false, slidesToShow: 1 } }] }); // Hot deals carousel active start $('.deals-carousel-active').slick({ autoplay: true, speed: 1000, slidesToShow: 3, adaptiveHeight: true, prevArrow: '', nextArrow: '', responsive: [{ breakpoint: 992, settings: { slidesToShow: 2 } }, { breakpoint: 768, settings: { arrows: false, slidesToShow: 2 } }, { breakpoint: 576, settings: { arrows: false, slidesToShow: 1 } }] }); // Hot deals carousel active start $('.deals-carousel-active--two').slick({ autoplay: true, speed: 1000, slidesToShow: 4, adaptiveHeight: true, prevArrow: '', nextArrow: '', responsive: [{ breakpoint: 992, settings: { slidesToShow: 2 } }, { breakpoint: 768, settings: { arrows: false, slidesToShow: 2 } }, { breakpoint: 576, settings: { arrows: false, slidesToShow: 1 } }] }); // brand logo carousel active js $('.brand-logo-carousel').slick({ speed: 1000, slidesToShow: 5, adaptiveHeight: true, prevArrow: '', nextArrow: '', responsive: [{ breakpoint: 1200, settings: { slidesToShow: 4 } }, { breakpoint: 992, settings: { slidesToShow: 3, arrows: false } }, { breakpoint: 768, settings: { slidesToShow: 2, arrows: false } }, { breakpoint: 480, settings: { slidesToShow: 1, arrows: false } }] }); // prodct details slider active $('.product-large-slider').slick({ fade: true, arrows: false, speed: 1000, asNavFor: '.pro-nav' }); // product details slider nav active $('.pro-nav').slick({ slidesToShow: 4, asNavFor: '.product-large-slider', centerMode: true, speed: 1000, centerPadding: 0, focusOnSelect: true, prevArrow: '', nextArrow: '', responsive: [{ breakpoint: 576, settings: { slidesToShow: 3, } }] }); //nice select active start //$('.select').niceSelect(); // Image zoom effect $('.img-zoom').zoom(); // offcanvas minicart button js $(".minicart-btn").on('click', function(){ $("body").addClass('fix'); $(".minicart-inner").addClass('show') }) $(".offcanvas-close, .minicart-close,.offcanvas-overlay").on('click', function(){ $("body").removeClass('fix'); $(".minicart-inner").removeClass('show') }) // Data countdown active js $('[data-countdown]').each(function () { var $this = $(this), finalDate = $(this).data('countdown'); $this.countdown(finalDate, function (event) { $this.html(event.strftime('