// ISOTOPE FILTER jQuery(document).ready(function($){ if ( $('.iso-box-wrapper').length > 0 ) { var $container = $('.iso-box-wrapper'), $imgs = $('.iso-box img'); $container.imagesLoaded(function () { $container.isotope({ layoutMode: 'fitRows', itemSelector: '.iso-box' }); $imgs.load(function(){ $container.isotope('reLayout'); }) }); //filter items on button click $('.filter-wrapper li a').click(function(){ var $this = $(this), filterValue = $this.attr('data-filter'); $container.isotope({ filter: filterValue, animationOptions: { duration: 750, easing: 'linear', queue: false, } }); // don't proceed if already selected if ( $this.hasClass('selected') ) { return false; } var filter_wrapper = $this.closest('.filter-wrapper'); filter_wrapper.find('.selected').removeClass('selected'); $this.addClass('selected'); return false; }); } }); // MAIN NAVIGATION $('.main-navigation').onePageNav({ scrollThreshold: 0.2, // Adjust if Navigation highlights too early or too late scrollOffset: 75, //Height of Navigation Bar filter: ':not(.external)', changeHash: true }); /* NAVIGATION VISIBLE ON SCROLL */ mainNav(); $(window).scroll(function () { mainNav(); }); function mainNav() { var top = (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop; if (top > 40) $('.sticky-navigation').stop().animate({ "opacity": '1', "top": '0' }); else $('.sticky-navigation').stop().animate({ "opacity": '0', "top": '-75' }); } // HIDE MOBILE MENU AFTER CLIKING ON A LINK $('.navbar-collapse a').click(function(){ $(".navbar-collapse").collapse('hide'); }); // postweb 170612 아래 전체 추가 ;(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 170612 추가 }); }());