(function($) { 'use strict'; // Mean Menu JS jQuery('.mean-menu').meanmenu({ meanScreenWidth: "991" }); // Header Sticky $(window).on('scroll',function() { if ($(this).scrollTop() > 120){ $('.navbar-area').addClass("is-sticky"); } else{ $('.navbar-area').removeClass("is-sticky"); } }); // Search Menu JS $(".search-box i").on("click", function(){ $(".search-overlay").toggleClass("search-overlay-active"); }); $(".search-overlay-close").on("click", function(){ $(".search-overlay").removeClass("search-overlay-active"); }); // Hero slider $('.hero-slider').owlCarousel({ items: 1, loop: true, margin: 0, nav: true, autoHeight: true, autoplay: true, autoplayHoverPause: true, dots: true, navText: [ "", "" ] }) // Popup Video $('.popup-youtube').magnificPopup({ disableOn: 320, type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false }); // Odometer JS $('.odometer').appear(function(e) { var odo = $(".odometer"); odo.each(function() { var countNumber = $(this).attr("data-count"); $(this).html(countNumber); }); }); // Partner Slider $('.partner-slider').owlCarousel({ loop: true, dots: false, margin: 30, nav: false, autoplay: true, autoplayHoverPause: true, responsive:{ 0:{ items:2 }, 576:{ items:3 }, 768:{ items:4 }, 1200:{ items:5 } } }) // Testimonials Slider $('.testimonials-slider').owlCarousel({ loop: true, dots: false, margin: 30, nav: true, autoplay: true, autoplayHoverPause: true, navText: [ "", "" ], responsive:{ 0:{ items:1 }, 576:{ items:1 }, 768:{ items:1 }, 992:{ items:2 } } }) // Gallery JS $('.atorn-gallery').magnificPopup({ delegate: 'a', type: 'image', tLoading: 'Loading image #%curr%...', mainClass: 'mfp-img-mobile', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] } }); // Count Time JS function makeTimer() { var endTime = new Date("november 30, 2023 17:00:00 PDT"); var endTime = (Date.parse(endTime)) / 1000; var now = new Date(); var now = (Date.parse(now) / 1000); var timeLeft = endTime - now; var days = Math.floor(timeLeft / 86400); var hours = Math.floor((timeLeft - (days * 86400)) / 3600); var minutes = Math.floor((timeLeft - (days * 86400) - (hours * 3600 )) / 60); var seconds = Math.floor((timeLeft - (days * 86400) - (hours * 3600) - (minutes * 60))); if (hours < "10") { hours = "0" + hours; } if (minutes < "10") { minutes = "0" + minutes; } if (seconds < "10") { seconds = "0" + seconds; } $("#days").html(days + "Days"); $("#hours").html(hours + "Hours"); $("#minutes").html(minutes + "Minutes"); $("#seconds").html(seconds + "Seconds"); } setInterval(function() { makeTimer(); }, 300); // FAQ Accordion $(function() { $('.accordion').find('.accordion-title').on('click', function(){ // Adds Active Class $(this).toggleClass('active'); // Expand or Collapse This Panel $(this).next().slideToggle('fast'); // Hide The Other Panels $('.accordion-content').not($(this).next()).slideUp('fast'); // Removes Active Class From Other Titles $('.accordion-title').not($(this)).removeClass('active'); }); }); // Preloader JS jQuery(window).on('load',function(){ jQuery(".preloader").fadeOut(500); }); // Go to Top $(window).on('scroll', function() { if ($(this).scrollTop() > 0) { $('.go-top').addClass('active'); } else { $('.go-top').removeClass('active'); } }); $(function(){ $(window).on('scroll', function(){ var scrolled = $(window).scrollTop(); if (scrolled > 600) $('.go-top').addClass('active'); if (scrolled < 600) $('.go-top').removeClass('active'); }); $('.go-top').on('click', function() { $("html, body").animate({ scrollTop: "0" }, 500); }); }); })(jQuery);