jQuery(document).ready(function($) { if ($(window).width() > 768) { $('.nav li.dropdown').hover(function() { $(this).addClass('open'); }, function() { $(this).removeClass('open'); }); $('.nav li.dropdown-menu').hover(function() { $(this).addClass('open'); }, function() { $(this).removeClass('open'); }); } $('.nav li.dropdown').find('.caret').each(function() { $(this).on('click', function() { if ($(window).width() < 768) { $(this).parent().next().slideToggle(); } return false; }); }); /* Photo Box*/ $('.blog_gallery').photobox('.photobox_a'); $('.blog_gallery').photobox('.photobox_a:first', { thumbs: false, time: 0 }, imageLoaded); function imageLoaded() { console.log('image has been loaded...'); } /* Photo Box*/ $(window).scroll(function() { if ($(window).width() > 768) { if ($(this).scrollTop() > 100) { $('header').addClass('sticky-head'); } else { $('header').removeClass('sticky-head'); } } else { if ($(this).scrollTop() > 100) { $('header').addClass('sticky-head'); } else { $('header').removeClass('sticky-head'); } } }); /* Slider */ var swiper = new Swiper('.home-swiper', { pagination: '.swiper-pagination', effect: 'flip', grabCursor: true, nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', /*autoplay:2000,*/ loop: true }); /* Testimonail */ var swiper = new Swiper('.swiper2', { paginationClickable: true, slidesPerView: '2', spaceBetween: 30, autoPlay: 3000, loop: true }); /* Testimonail */ /* Clients */ var swiper = new Swiper('.swiper3', { paginationClickable: true, nextButton: '.swiper-button-next1', prevButton: '.swiper-button-prev1', slidesPerView: '4', spaceBetween: 30, autoPlay: 3000, loop: true }); /* Clients */ }); new WOW().init();