(function($){ "use strict"; // search option $( document ).ready(function() { $('.search-option').click(function(){ $('.top-search-open').toggleClass('visible'); }) $('.fa-close').click(function(){ $('.top-search-open').removeClass('visible'); }) }); $('.carousel').carousel({ interval: false }) // sticky nav $(window).scroll(function(){ if($(this).scrollTop()>40){ $('.primary-menu').addClass("sticky"); } else{ $('.primary-menu').removeClass("sticky"); } }) //Countdown value if ($('#wrapper').length) { var dataCountdown = $('#wrapper').data("counterValue"); $('#wrapper').countdown( dataCountdown, function(event) { $('#clock-a').html(event.strftime('%D')); $('#clock-b').html(event.strftime('%H')); $('#clock-c').html(event.strftime('%M')); $('#clock-d').html(event.strftime('%S')); }); } // carosel $(function(){ $('.carousel').carousel({ interval: 500 }) }); // gallery item jQuery(document).ready(function($) { // init Isotope var $grid = $('.masonary-grid').isotope({ itemSelector: '.masonary-item', percentPosition: true, masonry: { // use outer width of grid-sizer for columnWidth columnWidth: 1 } }) // filter items on button click $('.gallery-menu').on( 'click', 'button', function() { var filterValue = $(this).attr('data-filter'); $grid.isotope({ filter: filterValue }); }); $('.gallery-menu button').on('click', function(event) { $(this).siblings('.active').removeClass('active'); $(this).addClass('active'); event.preventDefault(); }) }); // animation new WOW().init(); $(window).load(function() { // The slider being synced must be initialized first $('#carousel').flexslider({ animation: "slide", controlNav: false, animationLoop: false, slideshow: false, itemWidth: 90, itemMargin: 5, asNavFor: '#slider' }); $('#slider').flexslider({ animation: "slide", controlNav: false, animationLoop: false, slideshow: false, sync: "#carousel" }); }); $(".progress-bar1").loading(); })(jQuery);