// 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]; } } }; // Çì´õ ¹× GNB °ü·Ã °øÅë ½ºÅ©¸³Æ® $(function() { var $gnb = $("#gnbWrapper"); var $gnbTrigger = $("#gnbTrigger"); var $gnbTrigger_shop = $("#gnbTrigger_shop"); //var $logo = $("#logo"); var $logo = $("#logo_m"); // 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':'67px'}); } } } }); // 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); $('#logo').hide(); }}); } else { $(this).removeClass('open'); $("body").removeClass('lock'); TweenMax.to($gnb, 0.5, {left:'-100%', ease:Expo.easeInOut}); $logo.stop().fadeOut(100); //$('#logo').show(); } } }); // ¸ð¹ÙÀϸ޴º Åä±Û¹öÆ° Ŭ¸¯ $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").stop(true,false).fadeIn(300); $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); } } else { if(winTop >= 20) { // ¸ð¹ÙÀÏ ·Î°í ¼û±è $("#logo").stop(true,false).fadeOut(300); console.log('hide'); } else if(winTop < 20) { $("#logo").stop(true,false).fadeIn(300); console.log('show'); }console.log(winTop); } 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, 250, function() { var sty = { 'position':'', 'top':'', 'opacity':'', 'transition':'' } $(this).css(sty); }); $(this).addClass('animated'); } } }); }); }); // ÆäÀÌÁö ·Îµù $(window).load(function() { /*$("#page-loader").fadeOut(250, function() { $("#page-loader").delay(100).remove(); }); ·ÎµùÀ̹ÌÁö ÁÖ¼® 2022-12-21 */ }); $(function() { // ½ºÅ©·Ñ ¹öÆ° À̺¥Æ® $("#scrollTop").bind('mouseenter mouseleave click', function(e) { if(e.type === 'mouseenter') { if(!$(this).hasClass('on')) { $(this).addClass('on'); } } else if(e.type === 'click') { $("html, body").stop().animate({scrollTop:'0'}, 500, 'easeInOutExpo'); } else { $(this).removeClass('on'); } }) }); $(function() { // ½ºÅ©·Ñ ¹öÆ° À̺¥Æ® $("#scrollTop_shop").bind('mouseenter mouseleave click', function(e) { if(e.type === 'mouseenter') { if(!$(this).hasClass('on')) { $(this).addClass('on'); } } else if(e.type === 'click') { $("html, body").stop().animate({scrollTop:'0'}, 500, 'easeInOutExpo'); } else { $(this).removeClass('on'); } }) }); // Æû¸ÞÀÏ placehold Ãß°¡ $(function() { if($(".tbl_formmail").length > 0) { var $form = $(".tbl_formmail"); $form.find('input[name=name]').attr('placeholder','Name'); $form.find('input[name=receiver_email]').attr('placeholder','Email'); $form.find('textarea[name=description]').attr('placeholder','Message'); } }); var lb_btn = { init : function(){ if($('.lb-btn').length > 0){ this.action(); } }, action : function(){ var spd = 500; $(document).on('click','.lb-btn',function(){ var href = $(this).attr('href'); var idx = $(this).data('idx'); var type = $(this).data('type'); if(type == undefined){ type = 'GET'; } $.ajax({ type: type, url: href, data : idx, success : function(data) { $('body').find('.lb_container').remove().end().append(data).find('.lb_container').fadeIn(spd); } }); return false; }); $(document).on('click','.lb_container ._bg, .lb_container ._close',function(){ $('.lb_container').fadeOut(spd,function(){$(this).remove()}); return false; }); } } $(document).ready(function(){ lb_btn.init(); }); // ·Ñ¿À¹ö function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&iflashWrite('./swf/main_mv.swf?','463','183') */ function swf(url,w,h,vars,bg,win){ var id=url.split("/")[url.split("/").length-1].split(".")[0]; //id´Â ÆÄÀϸíÀ¸·Î ¼³Á¤ if(vars==null) vars=''; if(bg==null) bg='#FFFFFF'; if(win==null) win='transparent'; // Ç÷¡½Ã ÄÚµå Á¤ÀÇ var flashStr= " "; flashStr+=" "; flashStr+=" "; flashStr+=" "; flashStr+=" "; flashStr+=" "; flashStr+="