$(document).ready(function(){ /*============================================================== filter ==============================================================*/ $grid_filter = $('.grid'); $grid_filter.imagesLoaded(function () { $grid_filter.isotope({ itemSelector: 'li', layoutMode: 'masonry' }); }); $grid_selectors = $('.grid-filter > li > a'); $grid_selectors.on('click', function () { $grid_selectors.parent().removeClass('active'); $(this).parent().addClass('active'); var selector = $(this).attr('data-filter'); $grid_filter.isotope({filter: selector}); return false; }); $(window).resize(function () { setTimeout(function () { $grid_filter.isotope('layout'); }, 500); }); /*============================================================== lightbox gallery ==============================================================*/ $('.lightbox-gallery').magnificPopup({ delegate: 'a', type: 'image', tLoading: 'Loading image #%curr%...', mainClass: 'mfp-fade', fixedContentPos: true, closeBtnInside: true, gallery: { enabled: true, navigateByImgClick: true, preload: [0, 1] // Will preload 0 - before current, and 1 after the current image } }); /*============================================================== ajax aagnific popup for onepage portfolio ==============================================================*/ $('.work-details-popup').on('click', function () { $.magnificPopup.open({ items: { src: $(this).parents('li').find('.popup-main'), }, type: 'inline', fixedContentPos: true, closeOnContentClick: true, }); }); /*============================================================== Owl ==============================================================*/ $('#owl-img-text').owlCarousel({ smartSpeed:660, nav : false, dots:true, loop:true, items : 1, autoplay:true, autoplayTimeout:5000, autoplaySpeed:500, thumbs: false, responsive : { 0 : { stagePadding: 0, margin :-30, }, 992 : { stagePadding: 0, } } }); $('#owl-gallery').owlCarousel({ smartSpeed:660, nav : false, dots:true, loop:true, margin:10, autoplay:true, autoplayTimeout:5000, autoplaySpeed:500, thumbs: false, responsive : { 0 : { items : 1, stagePadding: 20, }, 768 : { items : 2, stagePadding: 35, }, 1200 : { items : 4, stagePadding: 50, }, } }); /*============================================================== imgBg ==============================================================*/ $('.imgBg-holder').each(function () { var b = $(this).children('img').attr('src'); $(this).css('background','url("' + b + '")') }) }); // Main $(document).ready(function(){ $('#owl-intro').owlCarousel({ smartSpeed:660, nav : true, navText: ["
","
"], dots:true, loop:true, items : 1, autoplay:true, autoplayTimeout:5000, thumbs: false, }); }); // Default $(document).ready(function(){ $('.owl-default').owlCarousel({ nav : true, // Show next and prev buttons navText: ["",""], loop:true, items : 1, autoplay:true, autoplayTimeout:6000, autoplayHoverPause:true, thumbs: false, }); }); // innerBox $(document).ready(function(){ $('#owl-innerbox').owlCarousel({ nav : true, // Show next and prev buttons navText: ["",""], loop:true, items : 1, autoplay:true, autoplayTimeout:3000, autoplayHoverPause:true, thumbs: false, transitionStyle : 'fade' }); }); // Padding $(document).ready(function(){ $('#owl-padding').owlCarousel({ nav : true, // Show next and prev buttons navText: ["",""], stagePadding: 250, margin:50, loop:true, items : 1, autoplay:true, autoplayTimeout:3000, autoplayHoverPause:true, thumbs: false, responsive : { // breakpoint from 0 up 0 : { stagePadding: 0, margin:0, }, // breakpoint from 768 up 768 : { stagePadding: 100, margin:30, }, // breakpoint from 992 up 992 : { stagePadding: 170, margin:50, }, // breakpoint from 992 up 1200 : { stagePadding: 250, margin:50, } } }); }); // Thumb $(document).ready(function(){ $('#owl-thumb').owlCarousel({ nav : false, dots:false, loop:true, items : 1, autoplay:true, autoplayTimeout:3000, thumbs: true, thumbImage: true, thumbContainerClass: 'owl-thumbs', thumbItemClass: 'owl-thumb-item' }); }); // inner Text $(document).ready(function(){ $('#owl-text').owlCarousel({ smartSpeed:650, nav : false, loop:true, items : 1, autoplay:true, autoplayTimeout:4000, autoplayHoverPause:true, thumbs: false, }); }); // inner Content $(document).ready(function(){ $('#owl-content').owlCarousel({ smartSpeed:650, nav : true, navText: ["",""], navSpeed:650, loop:true, dots:false, items : 1, autoplay:true, autoplayTimeout:4000, autoplayHoverPause:true, thumbs: false, animateOut: 'fadeOut', }); }); // Navbar Scrolling $(window).scroll(function() { if ($(document).scrollTop() > 50) { $('.scrolling-navbar').addClass('navbar-scroll'); } else { $('.scrolling-navbar').removeClass('navbar-scroll'); } }); // Mobile Full Navbar $(function(){ $('.navbar-toggle-full, .nav-full').click(function(){ $('.navbar-toggle-full').toggleClass('navbar-on'); $('.nav-full').fadeToggle(); $('.nav-full').removeClass('nav-hide'); }); });