$(function(){ $('body').addClass('on'); //service slide reset function resetJs() { service_bg.slideTo(0); service_con.slideTo(0); } //service text motion function serviceTextMotion() { tl.staggerFromTo($(".service .swiper-slide-active .title2"),1.2, {opacity:0,y:'60%'}, {opacity: 1,y:'0%', delay:0.2 ,ease: Power1.ease}); tl.staggerFromTo($(".service .swiper-slide-active .title2 p"),0.8, {opacity:0,y:'120%'}, {opacity: 1,y:'0%', delay:0.2,ease: Power1.easeInOut},0.05); tl.staggerFromTo($(".service .service_con .swiper-slide-active .con_title_g .title2 span:last-child"),0.7, {opacity:1}, {opacity: 0, delay:0.3, ease: Power1.easeInOut},0.05); tl.staggerFromTo($(".service .service_con .swiper-slide-active .con_title_g .txt1 p"),0.8, {opacity:0,y:'0%'}, {opacity: 1,y:'0%', delay:0.9,ease: Power1.easeInOut}); tl.staggerFromTo($(".service .service_con .swiper-slide-active .con_title_g .more_view"),0.5, {opacity:0}, {opacity: 1,delay:1.1,ease: Power1.easeInOut}); } function serviceTextMotionInit() { tl.staggerFromTo($(".service .swiper-slide-active .title2"),0, {opacity:0,y:'0%'}, {opacity: 0,y:'60%', ease: Power1.ease}); tl.staggerFromTo($(".service .swiper-slide-active .title2 p"),0, {opacity:0,y:'0%'}, {opacity: 0,y:'0%', ease: Power1.easeInOut}); tl.staggerFromTo($(".service .service_con .swiper-slide-active .con_title_g .title2 span:last-child"),0, {opacity:0}, {opacity: 0,ease: Power1.easeInOut}); tl.staggerFromTo($(".service .service_con .swiper-slide-active .con_title_g .txt1 p"),0.5, {opacity:0,y:'0%'}, {opacity: 0,y:'100%',ease: Power1.easeInOut}); tl.staggerFromTo($(".service .service_con .swiper-slide-active .con_title_g .more_view"),0, {opacity:0}, {opacity: 0,ease: Power1.easeInOut}); } //fullpage $('#fullpage').fullpage({ navigation: true, slidesToSections: true, scrollingSpeed: 750, // ** 페이지를 불러온 후 afterLoad : function(anchorLink, index){ //active class $('.sec'+index).addClass('ani'); tl.staggerFromTo($("header"), 0.7, {opacity: 0}, {opacity: 1, delay:0.2, ease: Power1.easeInOut}); tl.staggerFromTo($("#fp-nav.right,.scroll_wrap,.scroll_top_wrap"), 0.7, {opacity: 0}, {opacity: 1,delay:0.2, ease: Power1.easeInOut}); if(index == 1) {} //service if(index == 2){ //mousewheel if($(".service .service_slider .item:first-child").hasClass("swiper-slide-active")){ $(".service .service_slider .item:first-child").addClass("off"); }else{ $(".service .service_slider .item:first-child").removeClass("off"); } if($(".service .service_slider .item:last-child").hasClass("swiper-slide-active")){ $(".service .service_slider .item:last-child").addClass("off"); }else{ $(".service .service_slider .item:last-child").removeClass("off"); } }else{ $.fn.fullpage.setAllowScrolling(true); $(".service .service_slider .item:last-child").removeClass("off") } //merit if(index == 3){ } if(index >=3){ service_bg.slideTo(3); service_con.slideTo(3); } if(index == 6){ $(".scroll_top_wrap a").addClass("on"); $(".scroll_top_wrap .icon").addClass("on"); } else{ $(".scroll_top_wrap a").removeClass("on"); $(".scroll_top_wrap .icon").removeClass("on"); } if(index != 1){ $('.scroll_top_wrap').removeClass('down_btn'); $('.scroll_top_wrap').addClass('top_btn'); $('.scroll_top_wrap .txt').text('TOP'); }else{ $('.scroll_top_wrap').removeClass('top_btn'); $('.scroll_top_wrap').addClass('down_btn'); $('.scroll_top_wrap .txt').text('SCROLL'); } }, // ** 페이지를 떠날때 onLeave : function(anchorLink, destination, direction, index){ tl.staggerFromTo($("header"), 0.8, {opacity: 0}, {opacity: 0, ease: Power1.easeOut}); tl.staggerFromTo($("#fp-nav.right,.scroll_wrap,.scroll_top_wrap"), 0.8, {opacity: 0}, {opacity: 0, ease: Power1.easeOut}); //active class $('#side_nav li').removeClass('on'); $('#side_nav li:nth-child('+destination+')').addClass('on'); if(anchorLink == 1 && direction =='down'){ $('#fp-nav').addClass('act'); tl.staggerFromTo($(".service .service_con_wrap"),0.9, {opacity:0,x:'30px'}, {opacity: 1,x:'0px',delay:1 ,ease: Power1.ease}); } if(anchorLink == 2 && direction =='up'){ $('#fp-nav').removeClass('act'); } if(anchorLink == 2 && direction =='down'){ } if(anchorLink == 3 && direction =='down'){ } if(anchorLink == 3 && direction =='up'){ tl.staggerFromTo($(".service .service_con_wrap"),1.2, {opacity:0}, {opacity: 1,delay:0.3 ,ease: Power1.ease}); } //mousewheel if($(".service .service_slider .item:first-child").hasClass("swiper-slide-active")){ $(".service .service_slider .item:first-child").addClass("off"); }else{ $(".service .service_slider .item:first-child").removeClass("off"); } if($(".service .service_slider .item:last-child").hasClass("swiper-slide-active")){ $(".service .service_slider .item:last-child").addClass("off"); }else{ $(".service .service_slider .item:last-child").removeClass("off"); } }, }); //top button $('.scroll_top_wrap').click(function() { if($(this).hasClass('down_btn')){ $.fn.fullpage.moveTo(2); }else{ $.fn.fullpage.moveTo(1); } resetJs(); }); tl.staggerFromTo($("#wrap"),1, {opacity:0}, {opacity: 1,ease: Power1.easeInOut}); if($('.main_home').hasClass('ani')){ tl.staggerFromTo($(".video_wrap"),1.5, {opacity:0}, {opacity:1,delay:0.3,ease: Power1.easeInOut}); tl.staggerFromTo($(".main_home .con_title_g .title1"),1.5, {opacity:0,scale:'1.22'}, {opacity:1,scale:'1', ease: Power1.easeInOut}); tl.staggerFromTo($(".main_home .con_title_g .txt1"),1.3, {opacity:0,}, {opacity:1,delay:0.7,ease: Power1.easeInOut}); /*tl.staggerFromTo($("body.pc .main_home .con_title_g .title1 .t_f1"),0.8, {x:'39%'}, {x:'0%', delay:1.3,ease: Power1.easeInOut}); tl.staggerFromTo($("body.pc .main_home .con_title_g .title1 .t_f2"),0.8, {x:'6%'}, {x:'0%', delay:1.3,ease: Power1.easeInOut}); tl.staggerFromTo($("body.pc .main_home .con_title_g .title1 .t_f3"),0.8, {x:'-7%'}, {x:'0%', delay:1.3,ease: Power1.easeInOut});*/ } //side dot nav $(document).on('click',' #fp-nav li:first-child ', function () { $('#fp-nav').removeClass('act'); }); $(document).on('click',' #fp-nav li:last-child ', function () { }); $(document).on('click',' #fp-nav li', function () { resetJs(); }); //메인비쥬얼 모바일 높이 대응 function resetHeight(){ $('.sec1').css('height', $(window).innerHeight()); $('.pc .service .service_bg').css('height', $(window).innerHeight()); $('.tm .service .service_bg').css('height', '58%'); } window.addEventListener("resize", resetHeight); resetHeight(); tl = TweenMax; //////////////////////////////////////////// 비지니스 ////////////////////////////////////////////////// //service_contents var secNavName = ["Sell Side","Buy Side","Growth Capital","Pre-Deal Advisory"]; var service_con = new Swiper('.service_con', { speed:1100, loop:false, effect: 'fade', autoplay: false, fadeEffect: { crossFade: true }, allowTouchMove:false, simulateTouch:false, grabCursor: false, mousewheel: { releaseOnEdges: true }, pagination: { el: '.service_pagination', clickable: true, renderBullet: function (index, className) { return '
'+ '
'+(secNavName[index])+'
'+ '
' } }, navigation: { prevEl: '.service .button_prev', nextEl: '.service .button_next', }, mousewheel: true, watchSlidesVisibility: true, watchSlidesProgress: true, on: { init: function () { $(window).on("resize",function(){ if($(window).width() >= 1280){ serviceTextMotion(); serviceTextMotionInit(); } }).resize(); }, transitionStart: function () { $(window).on("resize",function(){ if($(window).width() >= 1280){ serviceTextMotion(); serviceTextMotionInit(); } }).resize(); }, transitionEnd: function () { if($(".service .service_slider .item:first-child").hasClass("swiper-slide-active")){ $(".service .service_slider .item:first-child").addClass("off"); }else{ $(".service .service_slider .item:first-child").removeClass("off"); } if($(".service .service_slider .item:last-child").hasClass("swiper-slide-active")){ $(".service .service_slider .item:last-child").addClass("off"); }else{ $(".service .service_slider .item:last-child").removeClass("off"); } }, slideChange: function () { $(window).on("resize",function(){ if($(window).width() >= 1280){ serviceTextMotion(); serviceTextMotionInit(); } }).resize(); }, slidePrevTransitionStart:function () { }, slidePrevTransitionEnd: function () { }, }, }); //service_bg img var service_bg = new Swiper('.service_bg', { direction: "vertical", effect: "slide", loop:false, speed: 1100, parallax: true, autoplay: false, allowTouchMove:false, simulateTouch:false, grabCursor: false, mousewheel: { releaseOnEdges: true }, mousewheel: true, watchSlidesVisibility: true, watchSlidesProgress: true, on: { slidePrevTransitionEnd:function () { }, slideNextTransitionEnd: function () { }, }, }); ////service mousewheel $(".service").on("DOMMouseScroll mousewheel wheel", function(event,delta){ if (delta > 0) { //마우스 휠을 올렸을때 if($(".service_slider .item:first-child").hasClass("off")){ $.fn.fullpage.moveTo(1); //$.fn.fullpage.setAllowScrolling(true); } if($(".service_slider .item:last-child").hasClass("off")){ $.fn.fullpage.setAllowScrolling(false); } }else if (delta < 0) { //마우스 휠을 내렸을때 if($(".service_slider .item:last-child").hasClass("off")){ //$.fn.fullpage.setAllowScrolling(true); $.fn.fullpage.moveTo(3); }else{ $.fn.fullpage.setAllowScrolling(false); } } }); service_bg.controller.control = service_con; service_con.controller.control = service_bg; $(".news .formarea .con .bottom .f_agree button").click(function(){ $(".pop").show(); $(".dim").show(); }); $(".pop .btn a").click(function(){ $(".pop").hide(); $(".dim").hide(); }); $(".dim").click(function(){ $(".pop").hide(); $(".dim").hide(); }); });