$(function(){ //¿ìŬ¸¯ ¹× µå·¹±× ¹æÁö //$(this).bind("contextmenu selectstart dragstart", function(e) { //return false; //}); //¸ð¹ÙÀϸ޴º Ãâ·Â var winW = $(window).width(); $("a.open_m_menu").click(function(){ var temp_w = $(window).width()*0.3; if(winW<=1000){ var temp_w = $(window).width()*0.8; } if(winW<=1400){ var temp_w = $(window).width()*0.6; } if(winW<=1600){ var temp_w = $(window).width()*0.8; } $(".mobile_menu").animate({width:temp_w+"px"},500,"easeOutQuart"); return false; }); $("a.close_m_menu").click(function(){ $(".mobile_menu").animate({width:"1px"},500,"easeOutQuart"); return false; }); //open_rquest(0:requdst,1:contact, 2:recruit) $("a.open_request0").click(function(){ openR(0); return false; }); $("a.open_request1").click(function(){ openR(1); return false; }); $("a.open_request2").click(function(){ openR(2); return false; }); //close_rquest $(".close_r").click(function(){ closeR(); return false; }); //open_r category btn $("#navi_win_request li").click(function() { $("#navi_win_request li a").removeClass("selected"); $("a", this).addClass("selected"); $("#request_title>div").hide(); $("#title_sect"+$(this).attr("link-data")).show(); $("#request_content>div").hide(); $("#content_sect"+$(this).attr("link-data")).show(); return false; }); //input file µðÀÚÀÎ $("input[type=file]").filestyle({ image: "/img/jquery/btn_inputfile.gif", imageheight : 34, imagewidth : 80, width : 215 }); }); //right contents open function openR(num){ ck_openR = "y"; var tr = $("#win_request") var trW = tr.width(); tr.animate({right:"0px"},1500,"easeInOutQuart"); $("#navi_win_request li a").removeClass("selected"); $("#navi_win_request li a").eq(num).addClass("selected"); $("#request_title>div").hide(); $("#request_content>div").hide(); $("#title_sect"+num).show(); $("#content_sect"+num).show(); //bg_show $("#win_request_bg").show(); //body scrollbar disable $('body').css('positon','fixed') $('body').css('overflow','hidden') $(".mobile_menu").animate({width:"1px"},500,"easeOutQuart"); } //right contents close function closeR(){ ck_openR = "n"; var tr = $("#win_request") var trW = tr.width(); tr.animate({right:"-100%"},700,"easeInOutQuart"); //$("#scroll_navi").show(); //bg_hide $("#win_request_bg").hide(); //body scrollbar able $('body').css('positon','relative') $('body').css('overflow','auto') } //right contents resize function resizeR(){ if(ck_openR == "y"){ var tm = $("#inner_wrap"); var tr = $("#win_request") var winW = $(window).width(); var tmW = tm.width(); var trW = tr.width(); tm.css({width:tmW, marginLeft:-(tmW-(winW-trW))}); //tr.css({right:"0px"}); } } //input file µðÀÚÀÎ function designInputfile(){ $("input[type=file]").filestyle({ image: "/img/jquery/btn_inputfile.gif", imageheight : 34, imagewidth : 80, width : 215 }); } // PC ÇØ»óµµ ¿©ºÎ üũ ÇÔ¼ö function isPC() { var $winWidth = $(window).width(); if($winWidth > 1024) { return true; } else { return false; } } // ÆĶó¸ÞÅÍ °ª °¡Á®¿À±â var getUrlParameter = function getUrlParameter(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.split('&'), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParameterName = sURLVariables[i].split('='); if (sParameterName[0] === sParam) { return sParameterName[1] === undefined ? true : sParameterName[1]; } } }; $(document).ready(function() { var depth1 = getUrlParameter('top') - 1; var depth2 = getUrlParameter('sub') - 1; $("#gnb > li").eq(depth1).addClass('active123'); $("#gnb > li").eq(depth1).find('ul').children().eq(depth2).addClass('on'); }); // Çì´õ ¹× GNB °ü·Ã °øÅë ½ºÅ©¸³Æ® $(function() { var $gnb = $("#gnbWrapper"); var $gnbTrigger = $("#gnbTrigger"); var $gnbTrigger_shop = $("#gnbTrigger_shop"); var $logo = $("#logo"); // GNB È°¼ºÈ­ $("#gnb > li").each(function() { var $currIndex = getUrlParameter('top') - 1; if($(this).index() == $currIndex) $(this).addClass('open'); }); // GNB ºñÈ°¼ºÈ­ function gnbdeActive() { $("#gnb > li").removeClass('open'); $("#gnb > li > ul").removeAttr('style'); $gnbTrigger.removeClass('open'); $gnbTrigger_shop.removeClass('open'); $("body").removeClass('lock'); } // GNB ¸¶¿ì½º¿À¹ö $("#gnb > li").mouseenter(function() { var $option = { 'display':'block', 'top':'80px', 'opacity':'0' } if(isPC() === true) { if(!$(this).hasClass('on')) { $(this).addClass('on'); if($(this).find('ul').length > 0) { $(this).find('ul').css($option); TweenMax.to($(this).find('ul'), 0.25, {'opacity':1, 'top':'67px'}); } } } }); // GNB ¸¶¿ì½º¾Æ¿ô $("#gnb > li").mouseleave(function() { var $idx = $(this).index(); var $option = { 'display':'', 'top':'', 'opacity':'' } if(isPC() === true) { $(this).removeClass('on'); if($(this).find('ul').length > 0) { TweenMax.to($(this).find('ul'), 0.25, {'opacity':0, 'top':'80px', onComplete:function() { $("#gnb > li").eq($idx).find('ul').css($option); }}); } } }); // GNB ¸¶¿ì½º¿À¹ö $("#gnb_shop > li").mouseenter(function() { var $option = { 'display':'block', 'top':'80px', 'opacity':'0' } if(isPC() === true) { if(!$(this).hasClass('on')) { $(this).addClass('on'); if($(this).find('ul').length > 0) { $(this).find('ul').css($option); TweenMax.to($(this).find('ul'), 0.25, {'opacity':1, 'top':'80px'}); } } } }); // GNB ¸¶¿ì½º¾Æ¿ô $("#gnb_shop > li").mouseleave(function() { var $idx = $(this).index(); var $option = { 'display':'', 'top':'', 'opacity':'' } if(isPC() === true) { $(this).removeClass('on'); if($(this).find('ul').length > 0) { TweenMax.to($(this).find('ul'), 0.25, {'opacity':0, 'top':'80px', onComplete:function() { $("#gnb_shop > li").eq($idx).find('ul').css($option); }}); } } }); // GNB Ŭ¸¯ $("#gnb > li > a").click(function(e) { if(isPC() === false) { if(!$(this).parent().hasClass('open')) { if($(this).next('ul').length > 0) { e.preventDefault(); $("#gnb > li > ul").stop().slideUp(250); $("#gnb > li").removeClass('open'); $(this).parent().addClass('open'); $(this).next('ul').stop().slideDown(350, 'easeInOutExpo'); } } else { if($(this).next('ul').length > 0) { e.preventDefault(); $(this).parent().removeClass('open'); $(this).next('ul').stop().slideUp(250); } } } }); // ¸ð¹ÙÀϸ޴º Åä±Û¹öÆ° Ŭ¸¯ $gnbTrigger.click(function() { if(!TweenMax.isTweening($gnb)) { if(!$(this).hasClass('open')) { $(this).addClass('open'); $("body").addClass('lock'); TweenMax.to($gnb, 0.5, {left:0, ease:Expo.easeInOut, onComplete:function() { $logo.stop().fadeIn(200); }}); } else { $(this).removeClass('open'); $("body").removeClass('lock'); TweenMax.to($gnb, 0.5, {left:'-100%', ease:Expo.easeInOut}); $logo.stop().fadeOut(100); } } }); // ¸ð¹ÙÀϸ޴º Åä±Û¹öÆ° Ŭ¸¯ $gnbTrigger_shop.click(function() { if(!TweenMax.isTweening($gnb)) { if(!$(this).hasClass('open')) { $(this).addClass('open'); $("body").addClass('lock'); TweenMax.to($gnb, 0.5, {left:0, ease:Expo.easeInOut, onComplete:function() { $logo.stop().fadeIn(200); }}); } else { $(this).removeClass('open'); $("body").removeClass('lock'); TweenMax.to($gnb, 0.5, {left:'-100%', ease:Expo.easeInOut}); $logo.stop().fadeOut(100); } } }); // À©µµ¿ì ¸®»çÀÌ¡ ó¸® $(window).bind('resize', function() { var $winWidth = $(this).width(); if($winWidth > 1024) { $logo.removeAttr('style'); $gnb.removeAttr('style'); gnbdeActive(); } else { if(!$gnbTrigger.hasClass('open')) { $logo.removeAttr('style'); } } }); }); // À©µµ¿ì À̺¥Æ® $(window).load(function() { var elem = $(".scrollreveal"); var sty = { 'opacity':'0', 'transition':'none' } elem.css(sty); $("html, body").animate({scrollTop:'10'}, 10, function() { $("html, body").animate({scrollTop:'0'}, 0); }); // ½ºÅ©·Ñ½Ã ¾Ö´Ï¸ÞÀÌ¼Ç Ã³¸® $(window).bind('scroll', function() { var winWidth = $(this).width(); var winTop = $(this).scrollTop(); var winHeight = $(this).height(); var docHeight = $(document).height(); var hdHeight = $("#header").height(); var elemHeight; var showDelay = 0; if(winWidth > 1024) { if(winTop >= hdHeight) { if(!$("#header").hasClass('fixed')) { $("#header").addClass('fixed'); $("#scrollTop").stop(true,false).fadeIn(300); $("#scrollTop_shop").stop(true,false).fadeIn(300); } } else { $("#header").removeClass('fixed'); $("#scrollTop").stop(true,false).fadeOut(300); $("#scrollTop_shop").stop(true,false).fadeOut(300); } } elem.each(function() { var etop = $(this).offset().top; var eh = $(this).height(); var delay = $(this).data('delay'); if(delay == null) { delay = 100; } if(winTop >= etop - winHeight) { if(!$(this).hasClass('animated')) { var aniOptions; var styR = { 'position':'relative', 'top':'30px' } var sty = { 'top':'30px' } if($(this).css('position') == 'static') { aniOptions = { 'opacity':'1', 'top':'0' } $(this).css(styR); } else if($(this).css('position') == 'absolute') { aniOptions = { 'opacity':'1', } } else { aniOptions = { 'opacity':'1', 'top':'0' } $(this).css(sty); } showDelay += delay; $(this).stop().delay(showDelay).animate(aniOptions, 500, function() { var sty = { 'position':'', 'top':'', 'opacity':'', 'transition':'' } $(this).css(sty); }); $(this).addClass('animated'); } } }); }); });