//메뉴 /*$(function(){ var marker = $('#nav .bar'), menuList = $('#nav .depth1'); marker.css({ left: menuList.position().left, width: menuList.outerWidth(), opacity:0, }); $('#nav .depth1').mouseover(function () { marker.css({ opacity:1, }); $(this).addClass('active'); var self = $(this), offsetLeft = self.position().left, width = self.outerWidth() || current.outerWidth(), left = offsetLeft == 0 ? 0 : offsetLeft || current.position().left; $('#nav .depth1').removeClass('active'); self.addClass('active'); marker.stop().animate({ left: left, width: width, }, 700); }); // When the mouse leaves the menu $('#nav .depth1').mouseleave(function () { marker.css({ opacity:0, }); }); });*/ $(function(){ //fullpage var $fullpage = $('.fullpage'); var main_fullpage_slider = new Swiper($fullpage, { direction: "vertical", effect: "slide", touchRatio:1, autoplay: false, slidesPerView: 'auto', speed:700, parallax: true, mousewheel: { releaseOnEdges: true }, touchStartPreventDefault:false, mousewheelControl: true, watchSlidesProgress: true, pagination: { el: '.fullpage_pagination', clickable: true, }, on: { slideChangeTransitionEnd: function () { if(this.activeIndex == 1){ $('.sec1').addClass('fix'); }else if(this.activeIndex <= 1){ $('.sec1').removeClass('fix'); } if(this.activeIndex == 2){ setTimeout(function() { $('.sec3').addClass('type1'); }, 2000); } }, touchEnd: function () { if(this.activeIndex == 1){ $('.sec1').addClass('fix'); }else if(this.activeIndex <= 1){ $('.sec1').removeClass('fix'); } }, transitionStart : function () { var secNum = this.activeIndex+1 $('.sec'+secNum).addClass('on'); if($('.section.dark').hasClass('swiper-slide-active')){ $('header').addClass('dark'); $('.fullpage_pagination').addClass('dark'); }else{ $('header').removeClass('dark'); $('.fullpage_pagination').removeClass('dark'); } if($('.sec6').hasClass('swiper-slide-active')){ $('header').fadeOut(); }else{ $('header').fadeIn(); } if(this.activeIndex == 1){ setTimeout(function() { $('.sec2 .has-animation').addClass('animate-in'); $('.sec2 .has-animation').addClass('animate-type2'); }, 300); } if(this.activeIndex == 4){ $('.sec5 .has-animation').addClass('animate-in'); } }, } }); //sec1 main_slider var main_slider = new Swiper('.main_slider', { effect: 'fade', speed: 1000, loop:true, autoplay: { delay: 7000, disableOnInteraction: false, }, pagination: { el: '.main_slider .pagination', clickable: true, }, navigation: { nextEl: '.main_slider .button_next', prevEl: '.main_slider .button_prev', }, on: { slideChangeTransitionEnd: function () { }, }, }); ///////////////// //sec3 gallery_slider var info_slider = new Swiper('.info_slider', { effect: 'fade', fadeEffect: { crossFade: true }, allowTouchMove:false, loop:true, freeMode: true, watchSlidesVisibility: true, watchSlidesProgress: true, }); var gallery_slider = new Swiper('.gallery_slider', { loop:true, speed: 1000, fadeEffect: { crossFade: true }, effect: "fade", /*autoplay: { delay: 5000, disableOnInteraction: false, },*/ thumbs: { swiper: info_slider }, pagination: { el: '.info_nav .pagination', clickable: true, }, navigation: { nextEl: '.info_nav .button_next', prevEl: '.info_nav .button_prev', }, on: { init: function () { $('.gallery_slider .item').removeClass('motion'); }, transitionStart: function () { $('.gallery_slider .item').addClass('motion'); }, transitionEnd: function () { var ItemNum = this.activeIndex setTimeout(function() { $('.info_slider .item').removeClass('motion'); $('.info_slider .item'+ItemNum).addClass('motion'); }, 1400); }, }, }); if($(window).width() <= 1279){ $('.promotion_wrap').slick({ speed: 700, slidesToShow: 1, variableWidth: true, infinite: false, arrows: false, touchMove:true, swipe:true, }); $('.banquet_list').slick({ speed: 700, slidesToShow: 1, slidesToScroll: 1, fade: true, infinite: false, touchMove:true, swipe:true, dots: true, appendDots: $('.banquet_nav .pagination'), prevArrow: $('.banquet_nav').find('.button_prev'), nextArrow: $('.banquet_nav').find('.button_next'), }); } $(window).on('resize', _.debounce(function() { if($(window).width() <= 1279){ $('.promotion_wrap').slick({ speed: 700, slidesToShow: 1, variableWidth: true, infinite: false, arrows: false, touchMove:true, swipe:true, }); $('.banquet_list').slick({ speed: 700, slidesToShow: 1, slidesToScroll: 1, fade: true, infinite: false, touchMove:true, swipe:true, dots: true, appendDots: $('.banquet_nav .pagination'), prevArrow: $('.banquet_nav').find('.button_prev'), nextArrow: $('.banquet_nav').find('.button_next'), }); }else{ $('.promotion_wrap').slick('unslick'); $('.banquet_list').slick('unslick'); } }, 0)); });