$(document).on('click', 'a[href="#none"]', function(e) { e.preventDefault(); }); //기본js function startJs(){ $(document).on('click', 'a[href="#none"]', function(e) {e.preventDefault()}); if($('html').is('.ie67, .ie7, .ie8, .ie9')) { $('div.ie_alert_text').show().html('현재 사이트는 IE9 미만의 하위브라우저를 지원하지 않습니다.
브라우저를 최신 버전으로 업데이트해 주세요.'); } WebFont.load({google: {families: ['Noto Sans KR', 'Montserrat']}}); } $(function(){ startJs(); headerJs(); mobile_allJS2(); var agent = navigator.userAgent.toLowerCase(); if ( (navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) || (agent.indexOf("msie") != -1) ) { $("body").addClass("ie"); } /* scroll */ var $animation_elements = $('.ani'); var $window = $(window); function check_if_in_view() { var window_height = $window.height(); var window_top_position = $window.scrollTop(); var window_bottom_position = (window_top_position + window_height); $.each($animation_elements, function() { var $element = $(this); var element_height = $element.outerHeight(); var element_top_position = $element.offset().top+200; var element_bottom_position = (element_top_position + element_height); //console.log(element_top_position); //check to see if this current container is within viewport if ((element_bottom_position >= window_top_position) && (element_top_position <= window_bottom_position)) { $element.addClass('in-view'); } else { //$element.removeClass('in-view'); } }); } $window.on('scroll resize', check_if_in_view); $window.trigger('scroll'); }); function headerJs(){ $("#wrap header .gnb>li").mouseover(function(){ var gnbHgt = $("#wrap header .gnb>li:nth-child(2) .depth2_l").height() + 50; $("header").addClass("on"); $("header .header_bg").css("height",gnbHgt); $("header .header_bg").css("transition","all","1.5s","1.5s"); $("header .header_bg").show(); }); $("#wrap .gnb").mouseleave(function(){ $("header").removeClass("on"); $("header .header_bg").hide(); }); $("header .lang .icon").click(function(){ $("header .lang_l").slideToggle(200); }); $("header .search .search_btn").click(function(){ $("header").toggleClass("find"); $(".search_pop").slideToggle(200); }); /*$(".pc_all .all_inner .left .gnb>li>a").mouseover(function(){ $(".pc_all .all_inner .left .gnb>li .lnb").hide(); $(this).next("ul").show(); });*/ $("#wrap header .menu_btn").click(function(){ $("body").addClass("all"); if($("body").hasClass("all")){ $(".mobile_all").addClass("show"); if($(window).width() >= 1263){ $("#bg").hide(); $("body").css("overflow","visible"); }else { $("#bg").fadeIn(300); $("body").css("overflow","hidden"); } }else { $(".mobile_all").removeClass("show"); $("#bg").hide(); } $(window).resize(function(){ if($("body").hasClass("all")){ $(".mobile_all").addClass("show"); if($(window).width() >= 1263){ $("#bg").hide(); $("body").css("overflow","visible"); }else { $("#bg").fadeIn(300); $("body").css("overflow","hidden"); } }else { $(".mobile_all").removeClass("show"); $("#bg").hide(); } }); $(".mobile_all .gnb_l>li .depth2").hide(); $(".mobile_all .gnb_l>li").removeClass("on"); $(".mobile_all .gnb_l>li .depth2>li .depth3").hide(); $(".mobile_all .gnb_l>li .depth2>li").removeClass("on"); }); $("#wrap header .close_btn,#bg").click(function(){ $("body").removeClass("all"); $("body").removeClass("depth"); $(".mobile_all").removeClass("show"); $("#bg").hide(); $("body").css("overflow","visible"); }); $(".all_menu .close_btn").click(function(){ $("body").removeClass("all"); }); $(window).resize(function(){ if($(window).width() > 1279){ $("body").removeClass("depth"); } }); } function mobile_allJS2(){ $(".mobile_all .gnb_l>li>strong").click(function(){ $(".mobile_all .gnb_l>li .depth2").stop().slideUp(300); $(".mobile_all .gnb_l>li .depth2").css("height","auto"); $(this).next().stop().slideToggle(300); $(this).parent().toggleClass("on"); $(this).parent().siblings().removeClass("on"); }); $(".mobile_all .gnb_l>li .depth2>li>a").click(function(){ $(".mobile_all .gnb_l>li .depth2>li .depth3").stop().slideUp(300); $(this).next().stop().slideToggle(300); $(this).parent().toggleClass("on"); $(this).parent().siblings().removeClass("on"); }); } $(function(){ custom_cursor(); }); function custom_cursor(){ var $cursor = null; var $inner = null; var $circle = null; var $txt = null; if( $('html').hasClass('mobile') || $('html').hasClass('ie10') ) { return; } $('body').mousemove(function(e) { TweenMax.to($('#custom_cursor, #custom_cursor_text'), 1.3, { x: e.clientX, y: e.clientY, ease: Power3.easeOut }); }); // global cursor $(document).on({ mouseenter: function(){ $cursor = $('#custom_cursor, #custom_cursor_text'); $inner = $cursor.find('.custom_cursor_inner'); $circle = $cursor.find('.custom_hover_circle'); $txt = $cursor.find('.custom_hover_text'); var $this = $(this); var words = ( $this.data('hover') != undefined ) ? $this.data('hover') : ''; if( $this.hasClass('drag') ){ $cursor.addClass('drag'); } if( $this.hasClass('custom_simple_cursor') ){ words = ''; var size = ( $this.data('size') != undefined ) ? $this.data('size') : '48'; TweenMax.to($inner, .1, {width: size,height: size,ease: Power0.easeNone}); } $txt.find('> span').text( words ); TweenMax.killTweensOf($circle, $txt); TweenMax.to($circle, .3, {width: '100%',height: '100%',autoAlpha: 1,ease: Power0.easeNone}); TweenMax.to($txt, .3, {width: '100%',height: '100%',autoAlpha: 1,ease: Power0.easeNone}); }, mouseleave: function(){ $cursor = $('#custom_cursor, #custom_cursor_text'); $inner = $cursor.find('.custom_cursor_inner'); $circle = $cursor.find('.custom_hover_circle'); $txt = $cursor.find('.custom_hover_text'); var $this = $(this); if( $this.hasClass('drag') ){ $cursor.removeClass('drag'); } if( $this.hasClass('custom_simple_cursor') ){ TweenMax.to($inner, .2, {width: '100%',height: '100%',ease: Power0.easeNone}); } TweenMax.killTweensOf($circle, $txt); TweenMax.to($circle, .2, {width: '0%',height: '0%',autoAlpha: 0,ease: Power0.easeNone}); TweenMax.to($txt, .2, {width: '0%',height: '0%',autoAlpha: 0,ease: Power0.easeNone}); } }, '.custom_hover'); }