(function($){ 'use strict'; jQuery(document).ready(function(){ jQuery(window).load(function(){ jQuery('#loading').remove('.animated_bg'); }); $('.carousel.slide').carousel({ interval: 1000 * 5 }); jQuery('.testimonial-container-owl').owlCarousel({ items: 3, margin: 50, autoplay:true, autoplayTimeout:5000, autoplayHoverPause:true, navigation : true, pagination : true, responsive:{ 0:{ items:1 }, 1024:{ items:2 }, 1400:{ items:3 } } }); // testimonial container v3 var swiper = new Swiper('.testimonial-container-v3', { spaceBetween: 30, pagination: '.swiper-pagination2', paginationClickable: true, grabCursor: false, autoplay: 3000, slidesPerView: 1 }); jQuery('.widget_search .search-form .search-submit').attr('value', ''); jQuery('#myTab a').click(function (e) { e.preventDefault(); jQuery(this).tab('show'); }); jQuery('#myTab1 a').click(function (e) { e.preventDefault(); jQuery(this).tab('show'); }); //load counters countdown_init('#header-counter1'); countdown_init('#header-counter2'); countdown_init('#header-counter3'); countdown_init('#header-counter4'); countdown_init('#header-counter5'); countdown_init('#section-countdown'); //counter for upcoming event var countUcEvent = $('#uc-event').data( "eventValue" ); var c = 0; for (c = 0; c <= countUcEvent; c++) { countdown_init('#event-count-'+c); } var slideCount = $('#slide-carousel').data( "slidecountValue" ); var s = 0; for (s = 0; s <= slideCount; s++) { countdown_init('#slide-count-'+s); } jQuery(window).on('scroll', function(){ if ( jQuery(window).scrollTop() > 60 ) { jQuery('.primary-menu').addClass('animated fadeInDown fixed-top-menu'); } else { jQuery('.primary-menu').removeClass('animated fadeInDown fixed-top-menu'); } }); var $iW = jQuery(window).innerWidth(); if ($iW <= 990){ jQuery('.menu-area .navbar-nav>li.menu-item-has-children>a.dropdown-toggle').attr("href", "#"); jQuery('.menu-area .navbar-nav>li.menu-item-has-children>a.dropdown-toggle').attr("data-toggle", "dropdown"); jQuery('.menu-area .navbar-nav>li.menu-item-has-children>a.dropdown-toggle').attr("aria-haspopup", "true"); jQuery('.menu-area .navbar-nav>li.menu-item-has-children>a.dropdown-toggle').attr("aria-expanded", "false"); jQuery('.menu-area .navbar-nav>li.menu-item-has-children>a.dropdown-toggle').on('click', function() { jQuery(this).attr("aria-expanded", "true"); }); } jQuery('.related-product.ccr-section .shop-product-list .col-sm-6.col-md-4').removeClass('col-sm-6 col-md-4').addClass('col-sm-6 col-md-3'); jQuery('.checkout>a.checkout-button').removeClass('checkout-button button alt wc-forward').addClass('custom-btn hvr-bounce-to-bottom'); // fbi sponsor var swiper = new Swiper('.fbi-sponsor-container1', { pagination: '.swiper-pagination', paginationClickable: true, autoplay: 5000, autoplayDisableOnInteraction: false, slidesPerView: 3, breakpoints: { 1200: { slidesPerView: 3 }, 768: { slidesPerView: 2 } } }); // fbi sponsor var swiper = new Swiper('.fbi-sponsor-container2', { pagination: '.swiper-pagination', paginationClickable: true, autoplay: 4500, autoplayDisableOnInteraction: false, slidesPerView: 4, breakpoints: { 1200: { slidesPerView: 4 }, 768: { slidesPerView: 2 } } }); // fbi sponsor var swiper = new Swiper('.fbi-sponsor-container3', { pagination: '.swiper-pagination', paginationClickable: true, autoplay: 3500, autoplayDisableOnInteraction: false, slidesPerView: 5, breakpoints: { 1200: { slidesPerView: 5 }, 768: { slidesPerView: 3 } } }); // sponsor version 3 // client section var swiper = new Swiper('.platinum-sponsor-container', { spaceBetween: 50, pagination: '.swiper-pagination', paginationClickable: true, grabCursor: false, autoplay: 3000, slidesPerView: 3, breakpoints: { 1200: { slidesPerView: 2 }, 768: { slidesPerView: 1 } } }); // client section var swiper = new Swiper('.gold-sponsor-container', { spaceBetween: 50, pagination: '.swiper-pagination', paginationClickable: true, grabCursor: false, autoplay: 5000, slidesPerView: 4, breakpoints: { 1200: { slidesPerView: 3 }, 990: { slidesPerView: 2 }, 768: { slidesPerView: 1 } } }); // client section var swiper = new Swiper('.silver-sponsor-container', { spaceBetween: 50, pagination: '.swiper-pagination', paginationClickable: true, grabCursor: false, autoplay: 6000, slidesPerView: 5, breakpoints: { 1200: { slidesPerView: 4 }, 990: { slidesPerView: 3 }, 768: { slidesPerView: 2 }, 400: { slidesPerView: 1 } } }); // external js: isotope.pkgd.js // init Isotope jQuery(window).on("load",function() { var $grid = $('.grid').isotope({ itemSelector: '.element-item', layoutMode: 'fitRows' }); // filter functions var filterFns = { // show if number is greater than 50 numberGreaterThan50: function() { var number = $(this).find('.number').text(); return parseInt( number, 10 ) > 50; }, // show if name ends with -ium ium: function() { var name = $(this).find('.name').text(); return name.match( /ium$/ ); } }; // bind filter button click jQuery('#filters').on( 'click', 'button', function() { var filterValue = $( this ).attr('data-filter'); // use filterFn if matches value filterValue = filterFns[ filterValue ] || filterValue; $grid.isotope({ filter: filterValue }); }); }); jQuery('a[data-rel^=lightcase]').lightcase(); // mobile menu jQuery(".mobile-btn").click(function(){ $("body").toggleClass("open-menu"); }); $('.mobile-menu>ul>li>a').on('click', function(e) { var element = $(this).parent('li'); if (element.hasClass('open')) { element.removeClass('open'); element.find('li').removeClass('open'); element.find('ul').slideUp(1500,"swing"); } else { element.addClass('open'); element.children('ul').slideDown(1500,"swing"); element.siblings('li').children('ul').slideUp(1500,"swing"); element.siblings('li').removeClass('open'); element.siblings('li').find('li').removeClass('open'); element.siblings('li').find('ul').slideUp(1500,"swing"); } }); }); } (jQuery));