/* jQuery Pre loader -----------------------------------------------*/ $(window).load(function(){ $('.preloader').fadeOut(1000); // set duration in brackets }); $(document).ready(function() { /* Hide mobile menu after clicking on a link -----------------------------------------------*/ $('.navbar-collapse a').click(function(){ $(".navbar-collapse").collapse('hide'); }); /* Smoothscroll js -----------------------------------------------*/ $(function() { $('.navbar-default a').bind('click', function(event) { var $anchor = $(this); $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top - 48 }, 1000); event.preventDefault(); }); }); /* Home Slideshow Vegas -----------------------------------------------*/ $(function() { $('body').vegas({ slides: [ { src: './img/designer24/main/slide-img1.jpg' }, { src: './img/designer24/main/slide-img2.jpg' }, { src: './img/designer24/main/slide-img3.jpg' } ], timer: false, transition: [ 'zoomIn', ], animation: ['kenburns'] }); }); /* Team carousel -----------------------------------------------*/ $(document).ready(function() { $("#team-carousel").owlCarousel({ items : 3, itemsDesktop : [1199,3], itemsDesktopSmall : [979,3], slideSpeed: 300, itemsDesktop : [1199,2], itemsTablet: [768,1], itemsTabletSmall: [985,2], itemsMobile : [479,1], }); }); /* Back to Top -----------------------------------------------*/ $(window).scroll(function() { if ($(this).scrollTop() > 200) { $('.go-top').fadeIn(200); } else { $('.go-top').fadeOut(200); } }); // Animate the scroll to top $('.go-top').click(function(event) { event.preventDefault(); $('html, body').animate({scrollTop: 0}, 300); }); /* wow -------------------------------*/ new WOW({ mobile: false }).init(); }); // postweb 170401 아래 전체 추가 ;(function () { // MagnificPopup var magnifPopup = function() { $('.image-popup').magnificPopup({ type: 'image', removalDelay: 300, mainClass: 'mfp-with-zoom', gallery:{ enabled:true }, zoom: { enabled: true, // 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 // The "opener" function should return the element from which popup will be zoomed in // and to which popup will be scaled down // By defailt it looks for an image tag: opener: function(openerElement) { // openerElement is the element on which popup was initialized, in this case its tag // you don't need to add "opener" option if this code matches your needs, it's defailt one. return openerElement.is('img') ? openerElement : openerElement.find('img'); } } }); }; // Document on load. $(function(){ magnifPopup(); // postweb 170401 추가 }); }());