$(document).ready(function () { $("#menu ul li a").click(function () { // $("html, body").animate({ // scrollTop: $($.attr(this, "href")).offset().top // }, 500); // return false; $($.attr(this, "href")).offset().top + 100 }); var swiper = new Swiper('.swiper1', { autoplay: { delay: 5000, }, loop: true, speed: 800, spaceBetween: 20, observer: true, observeParents: true, // If we need pagination pagination: { el: '.swiper-pagination', clickable: true, }, // Navigation arrows navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', } }); var swiper = new Swiper('.swiper2', { autoplay: { delay: 5000, }, loop: true, speed: 800, slidesPerView: 1, slidesPerGroup: 1, spaceBetween: 20, observer: true, observeParents: true, // If we need pagination pagination: { el: '.swiper-pagination', clickable: true, }, // Navigation arrows navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', } }); lightGallery(document.getElementById('lightgallery'), { plugins: [lgZoom], licenseKey: 'your_license_key' }); lightGallery(document.getElementById('lightgallery2'), { plugins: [lgZoom], licenseKey: 'your_license_key' }); }); // 사람들 팝업 //팝업 열기 function openModal(modalname,e) { document.get $("." + modalname).fadeIn(300); document.body.classList.add("stop-scroll"); // 팝업 닫기 $('#popup .btn_close').click(function () { $(this).parent().fadeOut(300); $('.popup_back').fadeOut(300); document.body.classList.remove("stop-scroll"); }); } $(window).load(function () { $('.flexslider').flexslider({ animation: "slide" }); }); function setPage(arg) { //navigation hn:1depth, sn:2depth, cn:3depth 를 받음 page = jQuery.extend({ hn: "", sn: "", cn: "" }, arg || {}); if (window.console) { console.log("hn : " + page.hn + "\nsn : " + page.sn + "\ncn : " + page.cn); } if (page.hn != 10) { $("#gnb > ul > li.hn" + page.hn + " a").addClass("on"); //1depth 활성 } if (page.hn >= 11) { $("#gnb > ul > li.hn" + page.hn + " a").addClass("on"); //유틸 1depth 활성 } $(".snb ul li.sn" + page.sn).find(" a").addClass("on").end().find("> ul").addClass("on").find("> li.cn" + page.cn + " a").addClass("on"); //2depth 활성 }