$(document).ready(function() { // »ó´Ü¿µ¿ª // $(window).scroll(function() { if ($("#header").offset().top > 50) { $('#header').stop().animate({ marginTop : '-72px' }, 350, 'easeOutQuad'); $('.gnbTotalMenu').slideUp(400, 'easeOutQuad'); } else { $('#header').stop().animate({ marginTop : '0px' }, 350, 'easeOutQuad'); } }); // ÅäÅ»¸Þ´º // $('#tmOpen').click(function(){ $('.gnbTotalMenu').slideDown(400, 'easeOutQuad'); }); $('#tmClose1, #tmClose2').click(function(){ $('.gnbTotalMenu').slideUp(400, 'easeOutQuad'); }); // ¼­ºê¸Þ´º // $('#menuArea > li > div').each(function (index) { $('#menuArea > li').eq(index).mouseenter(function(){ $('#menuArea > li > div').eq(index).stop().slideDown(300, 'easeOutQuad'); }); $('#menuArea > li').eq(index).mouseleave(function(){ $('#menuArea > li > div').eq(index).stop().stop().slideUp(300, 'easeOutQuad'); }); }); // Äü¸Þ´º - µû¶ó´Ù´Ï´Â ¸Þ´º // var currentPosition = parseInt($("#quickMenu").css("top")); $(window).scroll(function() { var position = $(window).scrollTop(); $("#quickMenu").stop().animate({"top":position+currentPosition+"px"},1000); }); // ¼­ºê¸Þ´º - °æ·ÎÁöÁ¤ // var sPath = window.location.pathname; var sPage = sPath.substring(sPath.lastIndexOf( '/') + 1); //alert(sPage); if (sPage == "main.php") { $("#quickMenu").css("display", "none") } if (sPage == "about.php") { $("#menuSub01 a:nth-child(1)").attr("href", "javascript:scrollLink(1, 52);") $("#menuSub01 a:nth-child(2)").attr("href", "javascript:scrollLink(2, 52);") $("#menuSub01 a:nth-child(3)").attr("href", "javascript:scrollLink(3, 52);") $("#menuSub01 a:nth-child(4)").attr("href", "javascript:scrollLink(4, 52);") } if (sPage == "product.php") { $("#menuSub03 a:nth-child(1)").attr("href", "javascript:scrollLink(1, 52);") $("#menuSub03 a:nth-child(2)").attr("href", "javascript:scrollLink(2, 52);") $("#menuSub03 a:nth-child(3)").attr("href", "javascript:scrollLink(3, 52);") $("#menuSub03 a:nth-child(4)").attr("href", "javascript:scrollLink(4, 52);") } // ¸ð¹ÙÀÏ ÅäÅ»¸Þ´º // $('#headerMobile .gnbMenu dt').click(function(){ $('#headerMobile .gnbTotal').animate({ marginLeft : '0' }, 350, 'easeOutQuad'); }); $('#headerMobile .gnbTotal > dl > dd').click(function(){ $('#headerMobile .gnbTotal').animate({ marginLeft : '-200px' }, 350, 'easeOutQuad'); }); // ¸ÞÀÎ ºñÁÖ¾ó // $('.crosscover').crosscover({ controller: true, dotNav: true }); // ¸ÞÀÎ Ä«ÇÇ // /* $('.mainCopy > h1').textillate(); $('.mainCopy > h2').textillate(); $('.mainCopy > h3').textillate(); $('.mainCopy > h4').textillate(); */ // ¸ÞÀÎ ¾Æ·¡·Î À̵¿¹öÆ° // $('.crosscover-island > p').click(function(){ $('html, body').animate({ scrollTop : $(window).height()-51 }, 900, 'easeOutQuad'); }); // ¸ÞÀÎ ºñÁö´Ï½º¿µ¿ª - ¿À¹ö // $('.mainBusiness > div > ul > li').hover(function (event) { $(this).find('p img').stop().animate({ width : '105%', margin : '-2.5% 0 0 -2.5%', opacity: '0.4' }, 500, 'easeOutQuad'); }, function (event) { $(this).find('p img').stop().animate({ width : '100%', margin : '0', opacity: '1.0' }, 500, 'easeOutQuad'); }); // ºñÁö´Ï½º - ¸®Ä¿¹ö¸® ¸Þ´º // $(window).scroll(function(event) { if ($(window).width() > 767) { if($(window).scrollTop() > 600) { $('.businessVisual > h1').stop().css({ position:'fixed', top:'52px', borderBottom:'#e5e5e5 1px solid', background:'#f5f5f5' }, 800, 'easeOutQuad'); } else { $('.businessVisual > h1').stop().css({ position:'absolute', top:'558px', borderBottom:'none', background:'none' }, 800, 'easeOutQuad'); } } else if ($(window).width() < 767){ if($(window).scrollTop() > 460) { $('.businessVisual > h1').stop().css({ position:'fixed', top:'52px', borderBottom:'#e5e5e5 1px solid', background:'#f5f5f5' }, 800, 'easeOutQuad'); } else { $('.businessVisual > h1').stop().css({ position:'absolute', top:'374px', borderBottom:'none', background:'none' }, 800, 'easeOutQuad'); } } }); $(window).bind('resize', function(e){ window.resizeEvt; $(window).resize(function(){ clearTimeout(window.resizeEvt); window.resizeEvt = setTimeout(function(){ if ($(window).width() > 767) { if($(window).scrollTop() > 600) { $('.businessVisual > h1').stop().css({ position:'fixed', top:'52px', borderBottom:'#e5e5e5 1px solid', background:'#f5f5f5' }, 800, 'easeOutQuad'); } else { $('.businessVisual > h1').stop().css({ position:'absolute', top:'558px', borderBottom:'none', background:'none' }, 800, 'easeOutQuad'); } } else if ($(window).width() < 767){ if($(window).scrollTop() > 360) { $('.businessVisual > h1').stop().css({ position:'fixed', top:'52px', borderBottom:'#e5e5e5 1px solid', background:'#f5f5f5' }, 800, 'easeOutQuad'); } else { $('.businessVisual > h1').stop().css({ position:'absolute', top:'274px', borderBottom:'none', background:'none' }, 800, 'easeOutQuad'); } } }, 50); }); }); // Á¦Ç°¸Þ´º - ¿À¹ö // $('.productMenu1 > ul > li, .productMenu2 > ul > li').hover(function (event) { $(this).find('p img').stop().animate({ width : '105%', margin : '-2.5% 0 0 -2.5%', opacity: '1.0' }, 500, 'easeOutQuad'); }, function (event) { $(this).find('p img').stop().animate({ width : '100%', margin : '0', opacity: '0.7' }, 500, 'easeOutQuad'); }); // ÀÚÁÖÇÏ´ÂÁú¹® // $('.supportFaq > dl > dt').each(function (index) { var faqChk = 0+String(index); $('.supportFaq > dl > dt').eq(index).click(function(){ if (faqChk == 0+String(index)) { //$('.supportFaq > dd').slideUp(300, 'easeOutQuad'); $('.supportFaq > dl > dd').eq(index).slideDown(300, 'easeOutQuad'); $('.supportFaq > dl > dt').eq(index).css({ color : '#000', background : 'url(../img/images/btnIcn/icn_q.gif) 20px 20px no-repeat, url(../img/images/btnIcn/icn_arrUp.gif) right 26px no-repeat, #fff', border : '#2fafc4 1px solid' }); faqChk = 1+String(index); } else { //$('.supportFaq dd').slideUp(300, 'easeOutQuad'); $('.supportFaq > dl > dd').eq(index).slideUp(300, 'easeOutQuad'); $('.supportFaq > dl > dt').eq(index).css({ color : '#777', background : 'url(../img/images/btnIcn/icn_q.gif) 20px 20px no-repeat, url(../img/images/btnIcn/icn_arrDown.gif) right 26px no-repeat, #fff', border : '#e5e5e5 1px solid' }); faqChk = 0+String(index); } }); }); // ¹®ÀÇ ¹öÆ°// $('.inquiry > dl > dt > table div a:nth-child(1) img').attr('src','../img/images/btnIcn/btn_inquiry_write.png'); $('.inquiry > dl > dt > table div a:nth-child(2) img').attr('src','../img/images/btnIcn/btn_inquiry_cancel.png'); // ºÎÆ® ¹× ¿É¼Ç // $('[data-toggle="tooltip"]').tooltip(); // ¿À¸¥¸¶¿ì½º ±ÝÁö // $(document).bind("contextmenu", function(e) { return false; }); // Áñ°Üã±â // $('#favorite').on('click', function(e) { var bookmarkURL = window.location.href; var bookmarkTitle = document.title; var triggerDefault = false; if (window.sidebar && window.sidebar.addPanel) { // Firefox version < 23 window.sidebar.addPanel(bookmarkTitle, bookmarkURL, ''); } else if ((window.sidebar && (navigator.userAgent.toLowerCase().indexOf('firefox') > -1)) || (window.opera && window.print)) { // Firefox version >= 23 and Opera Hotlist var $this = $(this); $this.attr('href', bookmarkURL); $this.attr('title', bookmarkTitle); $this.attr('rel', 'sidebar'); $this.off(e); triggerDefault = true; } else if (window.external && ('AddFavorite' in window.external)) { // IE Favorite window.external.AddFavorite(bookmarkURL, bookmarkTitle); } else { // WebKit - Safari/Chrome alert((navigator.userAgent.toLowerCase().indexOf('mac') != -1 ? 'Cmd' : 'Ctrl') + '+D Å°¸¦ ´­·¯ Áñ°Üã±â¿¡ µî·ÏÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.'); } return triggerDefault; }); }); // getÆĶó¹ÌÅÍ °¡Á®¿À±â // var getParam = function(key){ var _parammap = {}; document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function () { function decode(s) { return decodeURIComponent(s.split("+").join(" ")); } _parammap[decode(arguments[1])] = decode(arguments[2]); }); return _parammap[key]; }; // ¼­ºê ¸Þ´º À̵¿ // function scrollLink(obj, num){ var position = $("#"+obj).offset(); $('html, body').animate({scrollTop : position.top-num}, 900, 'easeOutQuad'); } // ¸µÅ©Á¡¼± Á¦°Å // function bluring(){ if(event.srcElement.tagName=="A" || event.srcElement.tagName=="IMG") document.body.focus(); } document.onfocusin=bluring;