$(document).ready(function() { // »ó´Ü¿µ¿ª // $(window).scroll(function() { if ($("#header").offset().top > 50) { $('.gnbTop').stop().animate({ height : '0px', marginTop : '-1px' }, 350, 'easeOutQuad'); if ($(window).width() > 989) { $('#header').stop().animate({ left : '0%', top : '0px', width : '100%', marginLeft : '0px', borderRadius : '0px' }, 350, 'easeOutQuad'); } else { $('#header').stop().animate({ left : '0%', top : '0px', marginLeft : '0px', borderRadius : '0px' }, 350, 'easeOutQuad'); } } else { $('.gnbTop').stop().animate({ height : '50px', marginTop : '0px' }, 350, 'easeOutQuad'); if ($(window).width() > 769 && $(window).width() < 1140) { $('#header').stop().animate({ left : '0px', top : '0px', width : '100%', marginLeft : '0px', borderRadius : '0px' }, 350, 'easeOutQuad'); } else { $('#header').stop().animate({ left : '50%', top : '50px', width : '1140px', marginLeft : '-570px', borderRadius : '4px' }, 350, 'easeOutQuad'); } } }); // ºê¶ó¿ìÁ® â ¿òÁ÷À϶§ // $(window).bind('resize', function(e){ window.resizeEvt; $(window).resize(function(){ clearTimeout(window.resizeEvt); window.resizeEvt = setTimeout(function(){ if ($(window).width() > 769 && $(window).width() < 1140) { $('#header').stop().animate({ left : '0px', top : '0px', width : '100%', marginLeft : '0px', borderRadius : '0px' }, 350, 'easeOutQuad'); } else { $('#header').stop().animate({ left : '50%', top : '50px', width : '1140px', marginLeft : '-570px', borderRadius : '4px' }, 350, 'easeOutQuad'); } }, 50); }); }); // ¼­ºê¸Þ´º // $('#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 sPath = window.location.pathname; var sPage = sPath.substring(sPath.lastIndexOf( '/') + 1); //alert(sPage); if (sPage == "company.php") { $("#menuSub01 a:nth-child(1)").attr("href", "javascript:scrollLink(1, 80);") $("#menuSub01 a:nth-child(2)").attr("href", "javascript:scrollLink(2, 80);") $("#menuSub01 a:nth-child(3)").attr("href", "javascript:scrollLink(3, 80);") $("#menuSub01 a:nth-child(4)").attr("href", "javascript:scrollLink(4, 80);") $("#menuSub01 a:nth-child(5)").attr("href", "javascript:scrollLink(5, 80);") } if (sPage == "business.php") { $("#menuSub02 a:nth-child(1)").attr("href", "javascript:scrollLink(1, 80);") $("#menuSub02 a:nth-child(2)").attr("href", "javascript:scrollLink(2, 80);") $("#menuSub02 a:nth-child(3)").attr("href", "javascript:scrollLink(3, 80);") } // ¸ð¹ÙÀÏ ÅäÅ»¸Þ´º // $('#headerMobile .gnbTotal').css({height : $(window).height()-80}); $(window).resize(function() { $('#headerMobile .gnbTotal').css({height : $(window).height()-80}); }); var gnbTotal = 0; $('#headerMobile .gnbMenu dt').eq(0).click(function(){ if (gnbTotal == 0) { $('.gnbTotal').slideDown(300, 'easeOutQuad'); gnbTotal = 1; } else { $('.gnbTotal').slideUp(300, 'easeOutQuad'); gnbTotal = 0; } }); // ¸ÞÀÎ ºñÁÖ¾ó // $('.crosscover').crosscover({ controller: true, dotNav: true }); // ¸ÞÀÎ ¾Æ·¡·Î À̵¿¹öÆ° // $('.crosscover-island > p').click(function(){ $('html, body').animate({ scrollTop : 580 }, 900, 'easeOutQuad'); }); // ¸ÞÀÎ Á¤º¸¿µ¿ª - ¿À¹ö // $('.mainInfo > 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'); }); // ȸ»ç¼Ò°³ °³¿ä - ¿À¹ö // $('.introOverview > 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'); }); // Á¦Ç°¸Þ´º - ¿À¹ö // $('.productMenu > 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.4' }, 500, 'easeOutQuad'); }); // A/S // var asChk = 0; $('.supportAS02 dt').each(function (index) { $('.supportAS02 dt').eq(index).click(function(){ if (asChk == 0) { //$('.supportAS02 dd').slideUp(300, 'easeOutQuad'); $('.supportAS02 dd').eq(index).slideDown(300, 'easeOutQuad'); $('.supportAS02 dt').eq(index).css({ color : '#fff', background : '#c69c6d' }); $('.supportAS02 dt i').eq(index).addClass('fa-minus-square'); asChk = 1; } else { //$('.supportAS02 dd').slideUp(300, 'easeOutQuad'); $('.supportAS02 dd').eq(index).slideUp(300, 'easeOutQuad'); $('.supportAS02 dt').eq(index).css({ color : '#333', background : '#eee' }); $('.supportAS02 dt i').eq(index).removeClass('fa-minus-square'); $('.supportAS02 dt i').eq(index).addClass('fa-plus-square'); asChk = 0; } }); }); // ºÎÆ® ¹× ¿É¼Ç // $('[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;