'use strict'; // Cache var body = $('body'); var mainSlider = $('#main-slider'); var imageCarousel = $('.img-carousel'); var partnersCarousel = $('#partners'); var testimonialsCarousel = $('#testimonials'); var testimonialsCarouselAlt = $('#testimonials-alt'); var carCarousel = $('.car-carousel'); var topProductsCarousel = $('#top-products-carousel'); var featuredProductsCarousel = $('#featured-products-carousel'); var sidebarProductsCarousel = $('#sidebar-products-carousel'); var hotDealsCarousel = $('#hot-deals-carousel'); var owlCarouselSelector = $('.owl-carousel'); var isotopeContainer = $('.isotope'); var isotopeFiltrable = $('#filtrable a'); var toTop = $('#to-top'); var hover = $('.thumbnail'); var navigation = $('.navigation'); var superfishMenu = $('ul.sf-menu'); var priceSliderRange = $('#slider-range'); var swiperOffersBest = $('.swiper--offers-best .swiper-container'); var swiperOffersPopular = $('.swiper--offers-popular .swiper-container'); var swiperOffersEconomic = $('.swiper--offers-economic .swiper-container'); var swiperSlider12614x12615_12610 = $('#swiperSlider12614x12615_12610'); var swiperSlider12614x12616_12610 = $('#swiperSlider12614x12616_12610'); var swiperSlider12614x12619_12610 = $('#swiperSlider12614x12619_12610'); var swiperSlider12614x12623_12610 = $('#swiperSlider12614x12623_12610'); var swiperSlider12614x12624_12610 = $('#swiperSlider12614x12624_12610'); var swiperSlider12614x12635_12610 = $('#swiperSlider12614x12635_12610'); var swiperSlider12614x12627_12610 = $('#swiperSlider12614x12627_12610'); var swiperSlider12614x12628_12610 = $('#swiperSlider12614x12628_12610'); var swiperSlider12614x12629_12610 = $('#swiperSlider12614x12629_12610'); var swiperSlider12614x12633_12610 = $('#swiperSlider12614x12633_12610'); var swiperSlider12614x12631_12610 = $('#swiperSlider12614x12631_12610'); var swiperSlider12614x12634_12610 = $('#swiperSlider12614x12634_12610'); var swiperSlider12614x12615_12611 = $('#swiperSlider12614x12615_12611'); var swiperSlider12614x12616_12611 = $('#swiperSlider12614x12616_12611'); var swiperSlider12614x12619_12611 = $('#swiperSlider12614x12619_12611'); var swiperSlider12614x12623_12611 = $('#swiperSlider12614x12623_12611'); var swiperSlider12614x12624_12611 = $('#swiperSlider12614x12624_12611'); var swiperSlider12614x12635_12611 = $('#swiperSlider12614x12635_12611'); var swiperSlider12614x12627_12611 = $('#swiperSlider12614x12627_12611'); var swiperSlider12614x12628_12611 = $('#swiperSlider12614x12628_12611'); var swiperSlider12614x12629_12611 = $('#swiperSlider12614x12629_12611'); var swiperSlider12614x12633_12611 = $('#swiperSlider12614x12633_12611'); var swiperSlider12614x12631_12611 = $('#swiperSlider12614x12631_12611'); var swiperSlider12614x12634_12611 = $('#swiperSlider12614x12634_12611'); var swiperSlider12614x12615_12612 = $('#swiperSlider12614x12615_12612'); var swiperSlider12614x12616_12612 = $('#swiperSlider12614x12616_12612'); var swiperSlider12614x12619_12612 = $('#swiperSlider12614x12619_12612'); var swiperSlider12614x12623_12612 = $('#swiperSlider12614x12623_12612'); var swiperSlider12614x12624_12612 = $('#swiperSlider12614x12624_12612'); var swiperSlider12614x12635_12612 = $('#swiperSlider12614x12635_12612'); var swiperSlider12614x12627_12612 = $('#swiperSlider12614x12627_12612'); var swiperSlider12614x12628_12612 = $('#swiperSlider12614x12628_12612'); var swiperSlider12614x12629_12612 = $('#swiperSlider12614x12629_12612'); var swiperSlider12614x12633_12612 = $('#swiperSlider12614x12633_12612'); var swiperSlider12614x12631_12612 = $('#swiperSlider12614x12631_12612'); var swiperSlider12614x12634_12612 = $('#swiperSlider12614x12634_12612'); var swiperSlider12614x12615_12613 = $('#swiperSlider12614x12615_12613'); var swiperSlider12614x12616_12613 = $('#swiperSlider12614x12616_12613'); var swiperSlider12614x12619_12613 = $('#swiperSlider12614x12619_12613'); var swiperSlider12614x12623_12613 = $('#swiperSlider12614x12623_12613'); var swiperSlider12614x12624_12613 = $('#swiperSlider12614x12624_12613'); var swiperSlider12614x12635_12613 = $('#swiperSlider12614x12635_12613'); var swiperSlider12614x12627_12613 = $('#swiperSlider12614x12627_12613'); var swiperSlider12614x12628_12613 = $('#swiperSlider12614x12628_12613'); var swiperSlider12614x12629_12613 = $('#swiperSlider12614x12629_12613'); var swiperSlider12614x12633_12613 = $('#swiperSlider12614x12633_12613'); var swiperSlider12614x12631_12613 = $('#swiperSlider12614x12631_12613'); var swiperSlider12614x12634_12613 = $('#swiperSlider12614x12634_12613'); // Slide in/out with fade animation function jQuery.fn.slideFadeToggle = function (speed, easing, callback) { return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback); }; // jQuery.fn.slideFadeIn = function (speed, easing, callback) { return this.animate({opacity: 'show', height: 'show'}, speed, easing, callback); }; jQuery.fn.slideFadeOut = function (speed, easing, callback) { return this.animate({opacity: 'hide', height: 'hide'}, speed, easing, callback); }; jQuery(document).ready(function () { // Prevent empty links // --------------------------------------------------------------------------------------- $('a[href=#]').on('click', function (event) { event.preventDefault(); }); // Sticky header/menu // --------------------------------------------------------------------------------------- if ($().sticky) { $('.header.fixed').sticky({topSpacing: 0}); //$('.header.fixed').on('sticky-start', function() { console.log("Started"); }); //$('.header.fixed').on('sticky-end', function() { console.log("Ended"); }); } // SuperFish menu // --------------------------------------------------------------------------------------- if ($().superfish) { superfishMenu.superfish(); } $('ul.sf-menu a').on('click', function () { body.scrollspy('refresh'); }); // Fixed menu toggle $('.menu-toggle').on('click', function () { if (navigation.hasClass('opened')) { navigation.removeClass('opened').addClass('closed'); } else { navigation.removeClass('closed').addClass('opened'); } }); $('.menu-toggle-close').on('click', function () { if (navigation.hasClass('opened')) { navigation.removeClass('opened').addClass('closed'); } else { navigation.removeClass('closed').addClass('opened'); } }); // if ($('.content-area.scroll').length) { $('.open-close-area').on('click', function () { if ($('.wrapper').hasClass('opened')) { $('.wrapper').removeClass('opened').addClass('closed'); } else { $('.wrapper').removeClass('closed').addClass('opened'); } }); } // Smooth scrolling // ---------------------------------------------------------------------------------------- $('.sf-menu a, .scroll-to').on('click', function () { $('.sf-menu a').removeClass('active'); $(this).addClass('active'); $('html, body').animate({ scrollTop: $($(this).attr('href')).offset().top - 43 }, { duration: 1200, easing: 'easeInOutExpo' }); return false; }); // BootstrapSelect // --------------------------------------------------------------------------------------- if ($().selectpicker) { $('.selectpicker').selectpicker(); } // prettyPhoto // --------------------------------------------------------------------------------------- if ($().prettyPhoto) { $("a[data-gal^='prettyPhoto']").prettyPhoto({ theme: 'dark_square' }); } // Scroll totop button // --------------------------------------------------------------------------------------- $(window).scroll(function () { if ($(this).scrollTop() > 1) { toTop.css({bottom: '15px'}); } else { toTop.css({bottom: '-100px'}); } }); toTop.on('click', function () { $('html, body').animate({scrollTop: '0px'}, 800); return false; }); // Add hover class for correct view on mobile devices // --------------------------------------------------------------------------------------- /*hover.on('hover', function () { $(this).addClass('hover'); }, function () { $(this).removeClass('hover'); } );*/ // Ajax / load external content in tabs // --------------------------------------------------------------------------------------- $('[data-toggle="tabajax"]').on('click', function (e) { e.preventDefault(); var loadurl = $(this).attr('href'); var targ = $(this).attr('data-target'); $.get(loadurl, function (data) { $(targ).html(data); }); $(this).tab('show'); }); // Sliders // --------------------------------------------------------------------------------------- if ($().owlCarousel) { var owl = $('.owl-carousel'); owl.on('changed.owl.carousel', function (e) { // update prettyPhoto if ($().prettyPhoto) { $("a[data-gal^='prettyPhoto']").prettyPhoto({ theme: 'dark_square' }); } }); // Main slider if (mainSlider.length) { mainSlider.owlCarousel({ //items: 1, autoplay: false, autoplayHoverPause: true, loop: true, margin: 0, dots: true, nav: true, navText: [ "", "" ], responsiveRefreshRate: 100, responsive: { 0: {items: 1}, 479: {items: 1}, 768: {items: 1}, 991: {items: 1}, 1024: {items: 1} } }); } // Top products carousel if (topProductsCarousel.length) { topProductsCarousel.owlCarousel({ autoplay: false, loop: true, margin: 30, dots: false, nav: true, navText: [ "", "" ], responsive: { 0: {items: 1}, 479: {items: 2}, 768: {items: 3}, 991: {items: 4}, 1024: {items: 5}, 1280: {items: 6} } }); } // Featured products carousel if (featuredProductsCarousel.length) { featuredProductsCarousel.owlCarousel({ autoplay: false, loop: true, margin: 30, dots: false, nav: true, navText: [ "", "" ], responsive: { 0: {items: 1}, 479: {items: 1}, 768: {items: 2}, 991: {items: 3}, 1024: {items: 4} } }); } // Sidebar products carousel if (sidebarProductsCarousel.length) { sidebarProductsCarousel.owlCarousel({ autoplay: false, loop: true, margin: 30, dots: true, nav: false, navText: [ "", "" ], responsive: { 0: {items: 1}, 479: {items: 1}, 768: {items: 1}, 991: {items: 1}, 1024: {items: 1} } }); } // Partners carousel if (partnersCarousel.length) { partnersCarousel.owlCarousel({ autoplay: false, loop: true, margin: 30, dots: false, nav: true, navText: [ "", "" ], responsive: { 0: {items: 1}, 479: {items: 2}, 768: {items: 3}, 991: {items: 4}, 1024: {items: 5}, 1280: {items: 6} } }); } // Testimonials carousel if (testimonialsCarousel.length) { testimonialsCarousel.owlCarousel({ autoplay: false, loop: true, margin: 0, dots: true, nav: false, navText: [ "", "" ], responsive: { 0: {items: 1}, 479: {items: 1}, 768: {items: 1}, 991: {items: 1}, 1024: {items: 1}, 1280: {items: 1} } }); } // Testimonials carousel alt version if (testimonialsCarouselAlt.length) { testimonialsCarouselAlt.owlCarousel({ autoplay: false, loop: true, margin: 0, dots: true, nav: false, navText: [ "", "" ], responsive: { 0: {items: 1}, 479: {items: 1}, 768: {items: 1}, 991: {items: 2}, 1024: {items: 2}, 1280: {items: 2} } }); } // Images carousel if (imageCarousel.length) { imageCarousel.owlCarousel({ autoplay: false, loop: true, margin: 0, dots: true, nav: true, navText: [ "", "" ], responsiveRefreshRate: 100, responsive: { 0: {items: 1}, 479: {items: 1}, 768: {items: 1}, 991: {items: 1}, 1024: {items: 1} } }); } // Car carousel if (carCarousel.length) { carCarousel.owlCarousel({ autoplay: false, loop: true, margin: 30, dots: false, nav: true, navText: [ "", "" ], responsiveRefreshRate: 100, responsive: { 0: {items: 1}, 479: {items: 1}, 768: {items: 2}, 991: {items: 3}, 1024: {items: 3} } }); } // on tab click $('a[data-toggle="tab"]').on('show.bs.tab', function (e) { updater(); }); $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { updater(); }); } // Sliders // --------------------------------------------------------------------------------------- if ($().swiper) { if (swiperOffersBest.length) { swiperOffersBest = new Swiper(swiperOffersBest, { direction: 'horizontal', slidesPerView: 3, spaceBetween: 30, //autoplay: 2000, loop: true, paginationClickable: true, pagination: '.swiper-pagination', nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev' }); } if (swiperOffersPopular.length) { swiperOffersPopular = new Swiper(swiperOffersPopular, { direction: 'horizontal', slidesPerView: 3, spaceBetween: 30, //autoplay: 2000, loop: true, paginationClickable: true, pagination: '.swiper-pagination', nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev' }); } if (swiperOffersEconomic.length) { swiperOffersEconomic = new Swiper(swiperOffersEconomic, { direction: 'horizontal', slidesPerView: 3, spaceBetween: 30, //autoplay: 2000, loop: true, paginationClickable: true, pagination: '.swiper-pagination', nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev' }); } var swiper = new Swiper('.navigation', { scrollbar: '.swiper-scrollbar', direction: 'vertical', slidesPerView: 'auto', mousewheelControl: true, freeMode: true }); if ($('.content-area.scroll').length) { var swiper2 = new Swiper('.content-area.scroll', { scrollbar: '.swiper-scrollbar', direction: 'vertical', slidesPerView: 'auto', mousewheelControl: true, freeMode: true }); } // swiper in tabs if (swiperSlider12614x12615_12610.length) { swiperSlider12614x12615_12610 = new Swiper(swiperSlider12614x12615_12610, { pagination: '#swiperSlider12614x12615_12610 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12616_12610.length) { swiperSlider12614x12616_12610 = new Swiper(swiperSlider12614x12616_12610, { pagination: '#swiperSlider12614x12616_12610 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12619_12610.length) { swiperSlider12614x12619_12610 = new Swiper(swiperSlider12614x12619_12610, { pagination: '#swiperSlider12614x12619_12610 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12623_12610.length) { swiperSlider12614x12623_12610 = new Swiper(swiperSlider12614x12623_12610, { pagination: '#swiperSlider12614x12623_12610 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12624_12610.length) { swiperSlider12614x12624_12610 = new Swiper(swiperSlider12614x12624_12610, { pagination: '#swiperSlider12614x12624_12610 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12635_12610.length) { swiperSlider12614x12635_12610 = new Swiper(swiperSlider12614x12635_12610, { pagination: '#swiperSlider12614x12635_12610 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12627_12610.length) { swiperSlider12614x12627_12610 = new Swiper(swiperSlider12614x12627_12610, { pagination: '#swiperSlider12614x12627_12610 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12628_12610.length) { swiperSlider12614x12628_12610 = new Swiper(swiperSlider12614x12628_12610, { pagination: '#swiperSlider12614x12628_12610 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12629_12610.length) { swiperSlider12614x12629_12610 = new Swiper(swiperSlider12614x12629_12610, { pagination: '#swiperSlider12614x12629_12610 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12633_12610.length) { swiperSlider12614x12633_12610 = new Swiper(swiperSlider12614x12633_12610, { pagination: '#swiperSlider12614x12633_12610 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12631_12610.length) { swiperSlider12614x12631_12610 = new Swiper(swiperSlider12614x12631_12610, { pagination: '#swiperSlider12614x12631_12610 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12634_12610.length) { swiperSlider12614x12634_12610 = new Swiper(swiperSlider12614x12634_12610, { pagination: '#swiperSlider12614x12634_12610 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12615_12611.length) { swiperSlider12614x12615_12611 = new Swiper(swiperSlider12614x12615_12611, { pagination: '#swiperSlider12614x12615_12611 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12616_12611.length) { swiperSlider12614x12616_12611 = new Swiper(swiperSlider12614x12616_12611, { pagination: '#swiperSlider12614x12616_12611 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12619_12611.length) { swiperSlider12614x12619_12611 = new Swiper(swiperSlider12614x12619_12611, { pagination: '#swiperSlider12614x12619_12611 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12623_12611.length) { swiperSlider12614x12623_12611 = new Swiper(swiperSlider12614x12623_12611, { pagination: '#swiperSlider12614x12623_12611 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12624_12611.length) { swiperSlider12614x12624_12611 = new Swiper(swiperSlider12614x12624_12611, { pagination: '#swiperSlider12614x12624_12611 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12635_12611.length) { swiperSlider12614x12635_12611 = new Swiper(swiperSlider12614x12635_12611, { pagination: '#swiperSlider12614x12635_12611 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12627_12611.length) { swiperSlider12614x12627_12611 = new Swiper(swiperSlider12614x12627_12611, { pagination: '#swiperSlider12614x12627_12611 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12628_12611.length) { swiperSlider12614x12628_12611 = new Swiper(swiperSlider12614x12628_12611, { pagination: '#swiperSlider12614x12628_12611 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12629_12611.length) { swiperSlider12614x12629_12611 = new Swiper(swiperSlider12614x12629_12611, { pagination: '#swiperSlider12614x12629_12611 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12633_12611.length) { swiperSlider12614x12633_12611 = new Swiper(swiperSlider12614x12633_12611, { pagination: '#swiperSlider12614x12633_12611 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12631_12611.length) { swiperSlider12614x12631_12611 = new Swiper(swiperSlider12614x12631_12611, { pagination: '#swiperSlider12614x12631_12611 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12634_12611.length) { swiperSlider12614x12634_12611 = new Swiper(swiperSlider12614x12634_12611, { pagination: '#swiperSlider12614x12634_12611 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12615_12612.length) { swiperSlider12614x12615_12612 = new Swiper(swiperSlider12614x12615_12612, { pagination: '#swiperSlider12614x12615_12612 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12616_12612.length) { swiperSlider12614x12616_12612 = new Swiper(swiperSlider12614x12616_12612, { pagination: '#swiperSlider12614x12616_12612 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12619_12612.length) { swiperSlider12614x12619_12612 = new Swiper(swiperSlider12614x12619_12612, { pagination: '#swiperSlider12614x12619_12612 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12623_12612.length) { swiperSlider12614x12623_12612 = new Swiper(swiperSlider12614x12623_12612, { pagination: '#swiperSlider12614x12623_12612 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12624_12612.length) { swiperSlider12614x12624_12612 = new Swiper(swiperSlider12614x12624_12612, { pagination: '#swiperSlider12614x12624_12612 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12635_12612.length) { swiperSlider12614x12635_12612 = new Swiper(swiperSlider12614x12635_12612, { pagination: '#swiperSlider12614x12635_12612 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12627_12612.length) { swiperSlider12614x12627_12612 = new Swiper(swiperSlider12614x12627_12612, { pagination: '#swiperSlider12614x12627_12612 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12628_12612.length) { swiperSlider12614x12628_12612 = new Swiper(swiperSlider12614x12628_12612, { pagination: '#swiperSlider12614x12628_12612 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12629_12612.length) { swiperSlider12614x12629_12612 = new Swiper(swiperSlider12614x12629_12612, { pagination: '#swiperSlider12614x12629_12612 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12633_12612.length) { swiperSlider12614x12633_12612 = new Swiper(swiperSlider12614x12633_12612, { pagination: '#swiperSlider12614x12633_12612 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12631_12612.length) { swiperSlider12614x12631_12612 = new Swiper(swiperSlider12614x12631_12612, { pagination: '#swiperSlider12614x12631_12612 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12634_12612.length) { swiperSlider12614x12634_12612 = new Swiper(swiperSlider12614x12634_12612, { pagination: '#swiperSlider12614x12634_12612 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12615_12613.length) { swiperSlider12614x12615_12613 = new Swiper(swiperSlider12614x12615_12613, { pagination: '#swiperSlider12614x12615_12613 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12616_12613.length) { swiperSlider12614x12616_12613 = new Swiper(swiperSlider12614x12616_12613, { pagination: '#swiperSlider12614x12616_12613 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12619_12613.length) { swiperSlider12614x12619_12613 = new Swiper(swiperSlider12614x12619_12613, { pagination: '#swiperSlider12614x12619_12613 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12623_12613.length) { swiperSlider12614x12623_12613 = new Swiper(swiperSlider12614x12623_12613, { pagination: '#swiperSlider12614x12623_12613 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12624_12613.length) { swiperSlider12614x12624_12613 = new Swiper(swiperSlider12614x12624_12613, { pagination: '#swiperSlider12614x12624_12613 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12635_12613.length) { swiperSlider12614x12635_12613 = new Swiper(swiperSlider12614x12635_12613, { pagination: '#swiperSlider12614x12635_12613 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12627_12613.length) { swiperSlider12614x12627_12613 = new Swiper(swiperSlider12614x12627_12613, { pagination: '#swiperSlider12614x12627_12613 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12628_12613.length) { swiperSlider12614x12628_12613 = new Swiper(swiperSlider12614x12628_12613, { pagination: '#swiperSlider12614x12628_12613 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12629_12613.length) { swiperSlider12614x12629_12613 = new Swiper(swiperSlider12614x12629_12613, { pagination: '#swiperSlider12614x12629_12613 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12633_12613.length) { swiperSlider12614x12633_12613 = new Swiper(swiperSlider12614x12633_12613, { pagination: '#swiperSlider12614x12633_12613 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12631_12613.length) { swiperSlider12614x12631_12613 = new Swiper(swiperSlider12614x12631_12613, { pagination: '#swiperSlider12614x12631_12613 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } if (swiperSlider12614x12634_12613.length) { swiperSlider12614x12634_12613 = new Swiper(swiperSlider12614x12634_12613, { pagination: '#swiperSlider12614x12634_12613 .row.car-thumbnails', paginationClickable: true //paginationBulletRender: function (index, className) { //return '
'; //} }); } // /swiper in tabs } // countdown // --------------------------------------------------------------------------------------- if ($().countdown) { var austDay = new Date(); austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26); $('#dealCountdown1').countdown({until: austDay}); $('#dealCountdown2').countdown({until: austDay}); $('#dealCountdown3').countdown({until: austDay}); } // Google map // --------------------------------------------------------------------------------------- if (typeof google === 'object' && typeof google.maps === 'object') {} // Price range / need jquery ui // --------------------------------------------------------------------------------------- if ($.ui) { if ($(priceSliderRange).length) { $(priceSliderRange).slider({ range: true, min: 0, max: 500, values: [75, 300], slide: function (event, ui) { $("#amount").val("$" + ui.values[0] + " - $" + ui.values[1]); } }); $("#amount").val( "$" + $("#slider-range").slider("values", 0) + " - $" + $("#slider-range").slider("values", 1) ); } } // Shop categories widget slide in/out // --------------------------------------------------------------------------------------- $('.car-categories .arrow').on('click', function (event) { $(this).parent().parent().find('ul.children').removeClass('active'); $(this).parent().parent().find('.fa-angle-up').addClass('fa-angle-down').removeClass('fa-angle-up'); if ($(this).parent().find('ul.children').is(":visible")) { //$(this).find('.fa-angle-up').addClass('fa-angle-down').removeClass('fa-angle-up'); //$(this).parent().find('ul.children').removeClass('active'); } else { $(this).find('.fa-angle-down').addClass('fa-angle-up').removeClass('fa-angle-down'); $(this).parent().find('ul.children').addClass('active'); } $(this).parent().parent().find('ul.children').each(function () { if (!$(this).hasClass('active')) { $(this).slideFadeOut(); } else { $(this).slideFadeIn(); } }); } ); $('.car-categories ul.children').each(function () { if (!$(this).hasClass('active')) { $(this).hide(); } }); // Ripple effect on click for buttons // --------------------------------------------------------------------------------------- $(".ripple-effect").on('click', function (e) { var rippler = $(this); // create .ink element if it doesn't exist if (rippler.find(".ink").length == 0) { rippler.append(""); } var ink = rippler.find(".ink"); // prevent quick double clicks ink.removeClass("animate"); // set .ink diametr if (!ink.height() && !ink.width()) { var d = Math.max(rippler.outerWidth(), rippler.outerHeight()); ink.css({height: d, width: d}); } // get click coordinates var x = e.pageX - rippler.offset().left - ink.width() / 2; var y = e.pageY - rippler.offset().top - ink.height() / 2; // set .ink position and add class .animate ink.css({ top: y + 'px', left: x + 'px' }).addClass("animate"); }) updater(); }); jQuery(window).load(function () { // Preloader $('#status').fadeOut(); $('#preloader').delay(200).fadeOut(200); // Isotope if ($().isotope) { isotopeContainer.isotope({// initialize isotope itemSelector: '.isotope-item' // options... //,transitionDuration: 0 // disable transition }); isotopeFiltrable.on('click', function () { // filter items when filter link is clicked var selector = $(this).attr('data-filter'); isotopeFiltrable.parent().removeClass('current'); $(this).parent().addClass('current'); isotopeContainer.isotope({filter: selector}); return false; }); isotopeContainer.isotope('reLayout'); // layout/reLayout } // Scroll to hash if (location.hash != '') { var hash = '#' + window.location.hash.substr(1); if (hash.length) { body.delay(0).animate({ scrollTop: jQuery(hash).offset().top }, { duration: 1200, easing: "easeInOutExpo" }); } } // OwlSliders if ($().owlCarousel) { // Hot deal carousel // must initialized after counters if (hotDealsCarousel.length) { hotDealsCarousel.owlCarousel({ autoplay: false, loop: true, margin: 30, dots: true, nav: false, navText: [ "", "" ], responsive: { 0: {items: 1}, 479: {items: 1}, 768: {items: 1}, 991: {items: 1}, 1024: {items: 1} } }); } } updater(); }); function updater() { if ($().sticky) { $('.header.fixed').sticky('update'); } // refresh swiper slider if ($().swiper) { // if (typeof (swiperOffersBest.length) == 'undefined') { swiperOffersBest.update(); swiperOffersBest.onResize(); if ($(window).width() > 991) { swiperOffersBest.params.slidesPerView = 3; //swiperOffersBest.stopAutoplay(); //swiperOffersBest.startAutoplay(); } else { if ($(window).width() < 768) { swiperOffersBest.params.slidesPerView = 1; //swiperOffersBest.stopAutoplay(); //swiperOffersBest.startAutoplay(); } else { swiperOffersBest.params.slidesPerView = 2; //swiperOffersBest.stopAutoplay(); //swiperOffersBest.startAutoplay(); } } } // if (typeof (swiperOffersPopular.length) == 'undefined') { swiperOffersPopular.update(); swiperOffersPopular.onResize(); if ($(window).width() > 991) { swiperOffersPopular.params.slidesPerView = 3; //swiperOffersPopular.stopAutoplay(); //swiperOffersPopular.startAutoplay(); } else { if ($(window).width() < 768) { swiperOffersPopular.params.slidesPerView = 1; //swiperOffersPopular.stopAutoplay(); //swiperOffersPopular.startAutoplay(); } else { swiperOffersPopular.params.slidesPerView = 2; //swiperOffersPopular.stopAutoplay(); //swiperOffersPopular.startAutoplay(); } } } // if (typeof (swiperOffersEconomic.length) == 'undefined') { swiperOffersEconomic.update(); swiperOffersEconomic.onResize(); if ($(window).width() > 991) { swiperOffersEconomic.params.slidesPerView = 3; swiperOffersEconomic.stopAutoplay(); swiperOffersEconomic.startAutoplay(); } else { if ($(window).width() < 768) { swiperOffersEconomic.params.slidesPerView = 1; swiperOffersEconomic.stopAutoplay(); swiperOffersEconomic.startAutoplay(); } else { swiperOffersEconomic.params.slidesPerView = 2; swiperOffersEconomic.stopAutoplay(); swiperOffersEconomic.startAutoplay(); } } } // swiper in tabs if (typeof (swiperSlider12614x12615_12610.length) == 'undefined') { swiperSlider12614x12615_12610.update(); swiperSlider12614x12615_12610.onResize(); } if (typeof (swiperSlider12614x12616_12610.length) == 'undefined') { swiperSlider12614x12616_12610.update(); swiperSlider12614x12616_12610.onResize(); } if (typeof (swiperSlider12614x12619_12610.length) == 'undefined') { swiperSlider12614x12619_12610.update(); swiperSlider12614x12619_12610.onResize(); } if (typeof (swiperSlider12614x12623_12610.length) == 'undefined') { swiperSlider12614x12623_12610.update(); swiperSlider12614x12623_12610.onResize(); } if (typeof (swiperSlider12614x12624_12610.length) == 'undefined') { swiperSlider12614x12624_12610.update(); swiperSlider12614x12624_12610.onResize(); } if (typeof (swiperSlider12614x12635_12610.length) == 'undefined') { swiperSlider12614x12635_12610.update(); swiperSlider12614x12635_12610.onResize(); } if (typeof (swiperSlider12614x12627_12610.length) == 'undefined') { swiperSlider12614x12627_12610.update(); swiperSlider12614x12627_12610.onResize(); } if (typeof (swiperSlider12614x12628_12610.length) == 'undefined') { swiperSlider12614x12628_12610.update(); swiperSlider12614x12628_12610.onResize(); } if (typeof (swiperSlider12614x12629_12610.length) == 'undefined') { swiperSlider12614x12629_12610.update(); swiperSlider12614x12629_12610.onResize(); } if (typeof (swiperSlider12614x12633_12610.length) == 'undefined') { swiperSlider12614x12633_12610.update(); swiperSlider12614x12633_12610.onResize(); } if (typeof (swiperSlider12614x12631_12610.length) == 'undefined') { swiperSlider12614x12631_12610.update(); swiperSlider12614x12631_12610.onResize(); } if (typeof (swiperSlider12614x12634_12610.length) == 'undefined') { swiperSlider12614x12634_12610.update(); swiperSlider12614x12634_12610.onResize(); } if (typeof (swiperSlider12614x12615_12611.length) == 'undefined') { swiperSlider12614x12615_12611.update(); swiperSlider12614x12615_12611.onResize(); } if (typeof (swiperSlider12614x12616_12611.length) == 'undefined') { swiperSlider12614x12616_12611.update(); swiperSlider12614x12616_12611.onResize(); } if (typeof (swiperSlider12614x12619_12611.length) == 'undefined') { swiperSlider12614x12619_12611.update(); swiperSlider12614x12619_12611.onResize(); } if (typeof (swiperSlider12614x12623_12611.length) == 'undefined') { swiperSlider12614x12623_12611.update(); swiperSlider12614x12623_12611.onResize(); } if (typeof (swiperSlider12614x12624_12611.length) == 'undefined') { swiperSlider12614x12624_12611.update(); swiperSlider12614x12624_12611.onResize(); } if (typeof (swiperSlider12614x12635_12611.length) == 'undefined') { swiperSlider12614x12635_12611.update(); swiperSlider12614x12635_12611.onResize(); } if (typeof (swiperSlider12614x12627_12611.length) == 'undefined') { swiperSlider12614x12627_12611.update(); swiperSlider12614x12627_12611.onResize(); } if (typeof (swiperSlider12614x12628_12611.length) == 'undefined') { swiperSlider12614x12628_12611.update(); swiperSlider12614x12628_12611.onResize(); } if (typeof (swiperSlider12614x12629_12611.length) == 'undefined') { swiperSlider12614x12629_12611.update(); swiperSlider12614x12629_12611.onResize(); } if (typeof (swiperSlider12614x12633_12611.length) == 'undefined') { swiperSlider12614x12633_12611.update(); swiperSlider12614x12633_12611.onResize(); } if (typeof (swiperSlider12614x12631_12611.length) == 'undefined') { swiperSlider12614x12631_12611.update(); swiperSlider12614x12631_12611.onResize(); } if (typeof (swiperSlider12614x12634_12611.length) == 'undefined') { swiperSlider12614x12634_12611.update(); swiperSlider12614x12634_12611.onResize(); } if (typeof (swiperSlider12614x12615_12612.length) == 'undefined') { swiperSlider12614x12615_12612.update(); swiperSlider12614x12615_12612.onResize(); } if (typeof (swiperSlider12614x12616_12612.length) == 'undefined') { swiperSlider12614x12616_12612.update(); swiperSlider12614x12616_12612.onResize(); } if (typeof (swiperSlider12614x12619_12612.length) == 'undefined') { swiperSlider12614x12619_12612.update(); swiperSlider12614x12619_12612.onResize(); } if (typeof (swiperSlider12614x12623_12612.length) == 'undefined') { swiperSlider12614x12623_12612.update(); swiperSlider12614x12623_12612.onResize(); } if (typeof (swiperSlider12614x12624_12612.length) == 'undefined') { swiperSlider12614x12624_12612.update(); swiperSlider12614x12624_12612.onResize(); } if (typeof (swiperSlider12614x12635_12612.length) == 'undefined') { swiperSlider12614x12635_12612.update(); swiperSlider12614x12635_12612.onResize(); } if (typeof (swiperSlider12614x12627_12612.length) == 'undefined') { swiperSlider12614x12627_12612.update(); swiperSlider12614x12627_12612.onResize(); } if (typeof (swiperSlider12614x12628_12612.length) == 'undefined') { swiperSlider12614x12628_12612.update(); swiperSlider12614x12628_12612.onResize(); } if (typeof (swiperSlider12614x12629_12612.length) == 'undefined') { swiperSlider12614x12629_12612.update(); swiperSlider12614x12629_12612.onResize(); } if (typeof (swiperSlider12614x12633_12612.length) == 'undefined') { swiperSlider12614x12633_12612.update(); swiperSlider12614x12633_12612.onResize(); } if (typeof (swiperSlider12614x12631_12612.length) == 'undefined') { swiperSlider12614x12631_12612.update(); swiperSlider12614x12631_12612.onResize(); } if (typeof (swiperSlider12614x12634_12612.length) == 'undefined') { swiperSlider12614x12634_12612.update(); swiperSlider12614x12634_12612.onResize(); } if (typeof (swiperSlider12614x12615_12613.length) == 'undefined') { swiperSlider12614x12615_12613.update(); swiperSlider12614x12615_12613.onResize(); } if (typeof (swiperSlider12614x12616_12613.length) == 'undefined') { swiperSlider12614x12616_12613.update(); swiperSlider12614x12616_12613.onResize(); } if (typeof (swiperSlider12614x12619_12613.length) == 'undefined') { swiperSlider12614x12619_12613.update(); swiperSlider12614x12619_12613.onResize(); } if (typeof (swiperSlider12614x12623_12613.length) == 'undefined') { swiperSlider12614x12623_12613.update(); swiperSlider12614x12623_12613.onResize(); } if (typeof (swiperSlider12614x12624_12613.length) == 'undefined') { swiperSlider12614x12624_12613.update(); swiperSlider12614x12624_12613.onResize(); } if (typeof (swiperSlider12614x12635_12613.length) == 'undefined') { swiperSlider12614x12635_12613.update(); swiperSlider12614x12635_12613.onResize(); } if (typeof (swiperSlider12614x12627_12613.length) == 'undefined') { swiperSlider12614x12627_12613.update(); swiperSlider12614x12627_12613.onResize(); } if (typeof (swiperSlider12614x12628_12613.length) == 'undefined') { swiperSlider12614x12628_12613.update(); swiperSlider12614x12628_12613.onResize(); } if (typeof (swiperSlider12614x12629_12613.length) == 'undefined') { swiperSlider12614x12629_12613.update(); swiperSlider12614x12629_12613.onResize(); } if (typeof (swiperSlider12614x12633_12613.length) == 'undefined') { swiperSlider12614x12633_12613.update(); swiperSlider12614x12633_12613.onResize(); } if (typeof (swiperSlider12614x12631_12613.length) == 'undefined') { swiperSlider12614x12631_12613.update(); swiperSlider12614x12631_12613.onResize(); } if (typeof (swiperSlider12614x12634_12613.length) == 'undefined') { swiperSlider12614x12634_12613.update(); swiperSlider12614x12634_12613.onResize(); } } // refresh waypoints //$.waypoints('refresh'); // refresh owl carousels/sliders //owlCarouselSelector.trigger('refresh'); //owlCarouselSelector.trigger('refresh.owl.carousel'); $('.datepicker').datetimepicker(); } jQuery(window).resize(function () { // Refresh isotope if ($().isotope) { isotopeContainer.isotope('reLayout'); // layout/relayout on window resize } updater(); }); jQuery(window).scroll(function () { if ($().sticky) { $('.header.fixed').sticky('update'); } });