jQuery(function($){ 'use strict'; /* ============================================== Plugins Call =============================================== */ /* Counter */ $('.counter').find('h2').counterUp({ time:2000 }); /* Owl Carousel */ $('.businessone-carousel').find('.carousel-wrap').owlCarousel({ loop:false, margin:30, responsiveClass:true, navSpeed:500, navText:['',''], responsive:{ 0:{ items:1, nav:false }, 767:{ items:2, nav:false }, 991:{ items:3, nav:true, loop:false }, 1199:{ items:4, nav:true, loop:false } } }); $('.businessone-testi-carousel').owlCarousel({ loop:false, margin:30, responsiveClass:true, dots:true, nav:false, autoplay:true, responsive:{ 0:{ items:1, }, 991:{ items:1, loop:false }, } }); $('body').fitVids(); /* ============================================== Gallery =============================================== */ $('.section-gallery.front').find('.scaffholding').on('mouseenter',function(){ $(this).find('.hover-content').stop().fadeIn(500); }); $('.section-gallery.front').find('.scaffholding').on('mouseleave',function(){ $(this).find('.hover-content').stop().fadeOut(); }); $('.businessone-mgn').magnificPopup({ type: 'image', mainClass: 'mfp-with-zoom', // this class is for CSS animation below zoom: { enabled: false, // By default it's false, so don't forget to enable it duration: 300, // duration of the effect, in milliseconds easing: 'ease-in-out', // CSS transition easing function } }); /* ============================================== Menu =============================================== */ $('.nav-menu').find('li').hover(function(){ $(this).children('ul').stop().fadeToggle(); }); $('.mobile-menu-wrap').find('.fa').on('click',function(){ $(this).siblings('.mobile-menu').stop().slideToggle(200); }); /* ============================================== Team =============================================== */ var teamH = $('.block-team').find('.hover-content').outerHeight(); $('.block-team').on('mouseenter',function(){ $(this).find('.first-wrap').stop().animate({ top:-100 },300); $(this).find('.second-wrap').stop().animate({ top:10 },300); }); $('.block-team').on('mouseleave',function(){ $(this).find('.first-wrap').stop().animate({ top:14 },300); $(this).find('.second-wrap').stop().animate({ top:100 },300); }); /* ============================================== Front Shop / Shop =============================================== */ $('.front-shop').find('.h-product').on('mouseenter',function(){ $(this).find('.hover-content').stop().fadeIn(400); }); $('.front-shop').find('.h-product').on('mouseleave',function(){ $(this).find('.hover-content').stop().fadeOut(300); }); $('.ajax_add_to_cart').on('click',function(){ $(this).children('.fa').removeClass('fa-shopping-bag').addClass('fa-circle-o-notch fa-spin'); }); $(document).ajaxComplete(function(){ $('.ajax_add_to_cart.added').children('.fa').removeClass('fa-circle-o-notch fa-spin').addClass('fa-check'); }); /* Cart Icon */ $(document).on('click',function(){ $('.shop-bag-container').stop().fadeOut(); }); $('.shop-bag').find('.cart-toggle').on('click',function(e){ e.stopPropagation(); $('.shop-bag-container').stop().fadeToggle(); }); $('.shop-bag-container').on('click',function(e){ e.stopPropagation(); }); /* ============================================== Search Form =============================================== */ $('.searchform').find('.icon').on('click',function(){ $('.searchform').submit(); }); });