$(document).ready(function() { // ÆäÀÌÁöÀüȯ½Ã // $("body").fadeIn(1500, 'easeOutQuad'); // »ó´Ü¿µ¿ª // $(window).scroll(function() { if ($('.header').offset().top > 50) { $('#header').stop().css({ background : '#000' }); $('#header > .gnbMenu').stop().animate({ height : '70px' }, 350, 'easeOutQuad'); $('#header > .gnbMenu > dt').stop().animate({ paddingTop : '16px' }, 350, 'easeOutQuad'); $('#header > .gnbMenu > dt:last-child').stop().animate({ paddingTop : '18px' }, 350, 'easeOutQuad'); $('#header > .gnbMenu > dd > ul > li > a').stop().animate({ paddingTop : '28px', paddingBottom : '25px'}, 350, 'easeOutQuad'); $('#header_eng').stop().css({ background : '#000' }); $('#header_eng > .gnbMenu').stop().animate({ height : '70px' }, 350, 'easeOutQuad'); $('#header_eng > .gnbMenu > dt').stop().animate({ paddingTop : '16px' }, 350, 'easeOutQuad'); $('#header_eng > .gnbMenu > dt:last-child').stop().animate({ paddingTop : '18px' }, 350, 'easeOutQuad'); $('#header_eng > .gnbMenu > dd > ul > li > a').stop().animate({ paddingTop : '22px', paddingBottom : '27px'}, 350, 'easeOutQuad'); } else { $('#header').stop().css({ background : 'rgba(0,0,0,0.3)' }); $('#header > .gnbMenu').stop().animate({ height : '100px' }, 350, 'easeOutQuad'); $('#header > .gnbMenu > dt').stop().animate({ paddingTop : '30px' }, 350, 'easeOutQuad'); $('#header > .gnbMenu > dt:last-child').stop().animate({ paddingTop : '32px' }, 350, 'easeOutQuad'); $('#header > .gnbMenu > dd > ul > li > a').stop().animate({ paddingTop : '41px', paddingBottom : '42px'}, 350, 'easeOutQuad'); $('#header_eng').stop().css({ background : 'rgba(0,0,0,0.3)' }); $('#header_eng > .gnbMenu').stop().animate({ height : '100px' }, 350, 'easeOutQuad'); $('#header_eng > .gnbMenu > dt').stop().animate({ paddingTop : '30px' }, 350, 'easeOutQuad'); $('#header_eng > .gnbMenu > dt:last-child').stop().animate({ paddingTop : '32px' }, 350, 'easeOutQuad'); $('#header_eng > .gnbMenu > dd > ul > li > a').stop().animate({ paddingTop : '35px', paddingBottom : '44px'}, 350, 'easeOutQuad'); } }); // ÅäÅ»¸Þ´º // var openChk = 0; $('.tmOpen').click(function(){ if (openChk == 0){ $('#totalMenu').slideDown(500, 'easeOutQuad'); $('#header > dl > dd').animate({ opacity : '0' }, 800, 'easeOutQuad'); $('.tmOpen i').removeClass('fa fa-bars'); $('.tmOpen i').addClass('fa fa-times'); openChk = 1; var stepTime = 0; $('#totalMenu > ul > li').each(function (index) { var stepChk = 0+String(index); stepChk = setInterval(function() { $('#totalMenu > ul > li').eq(index).animate({ marginTop : '0', opacity : '1' }, 1200, 'easeOutQuad'); clearInterval(stepChk); }, stepTime); stepTime = stepTime+50; }); } else { stepChk = setInterval(function() { $('#totalMenu').slideUp(500, 'easeOutQuad'); $('#header > dl > dd').animate({ opacity : '1' }, 800, 'easeOutQuad'); $('.tmOpen i').removeClass('fa fa-times'); $('.tmOpen i').addClass('fa fa-bars'); clearInterval(stepChk); }, 650); openChk = 0; var stepTime = 0; $('#totalMenu > ul > li').each(function (index) { var stepChk = 0+String(index); stepChk = setInterval(function() { $('#totalMenu > ul > li').eq(index).animate({ marginTop : '-100px', opacity : '0' }, 1200, 'easeOutQuad'); clearInterval(stepChk); }, stepTime); stepTime = stepTime+50; }); } }); // »ó´Ü¼­ºê¸Þ´º // $('#menuArea > li > div').each(function (index) { $('#menuArea > li').eq(index).mouseenter(function(){ $('#menuArea > li > a').eq(index).stop().css('background', '#ff0000'); $('#menuArea > li > div').eq(index).stop().slideDown(400, 'easeOutQuad'); }); $('#menuArea > li').eq(index).mouseleave(function(){ $('#menuArea > li > a').eq(index).stop().css('background', 'none'); $('#menuArea > li > div').eq(index).stop().stop().slideUp(400, 'easeOutQuad'); }); }); // ¸ð¹ÙÀÏ ÅäÅ»¸Þ´º // $('#headerMobile .gnbMenu dt:nth-child(1)').click(function(){ $('#headerMobile .gnbTotal').animate({ marginLeft : '0' }, 350, 'easeOutQuad'); }); $('#headerMobile .gnbTotal > dl > dd').click(function(){ $('#headerMobile .gnbTotal').animate({ marginLeft : '-250px' }, 350, '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 == "company.php") { $("#menuSub01 a:nth-child(1)").attr("href", "javascript:scrollLink(1, 57);") $("#menuSub01 a:nth-child(2)").attr("href", "javascript:scrollLink(2, 57);") $("#menuSub01 a:nth-child(3)").attr("href", "javascript:scrollLink(3, 57);") } // ÀÚÁÖÇÏ´ÂÁú¹® // $('.faqArea > dl > dt').each(function (index) { var faqChk = 0+String(index); $('.faqArea > dl > dt').eq(index).click(function(){ if (faqChk == 0+String(index)) { //$('.faqArea > dd').slideUp(300, 'easeOutQuad'); $('.faqArea > dl > dd').eq(index).slideDown(300, 'easeOutQuad'); $('.faqArea > dl > dt').eq(index).css({ color : '#000', background : 'url(../../img/images/btnIcn/icn_faq_q.png) 20px 10px no-repeat, url(../../img/images/btnIcn/icn_arrUp.gif) right 20px no-repeat, #fff', border : '#eb4949 1px solid' }); faqChk = 1+String(index); } else { //$('.faqArea dd').slideUp(300, 'easeOutQuad'); $('.faqArea > dl > dd').eq(index).slideUp(300, 'easeOutQuad'); $('.faqArea > dl > dt').eq(index).css({ color : '#777', background : 'url(../../img/images/btnIcn/icn_faq_q.png) 20px 10px no-repeat, url(../../img/images/btnIcn/icn_arrDown.gif) right 20px no-repeat, #fff', border : '#e5e5e5 1px solid' }); faqChk = 0+String(index); } }); }); // ºÎÆ® ¹× ¿É¼Ç // $('[data-toggle="tooltip"]').tooltip(); // ±¸±Û¸Ê ½ºÅ©·Ñ ¹æÁö // $('#googleMap').click(function(){ $(this).find('iframe').addClass('clicked') }) .mouseleave(function(){ $(this).find('iframe').removeClass('clicked') }); // ¿À¸¥¸¶¿ì½º ±ÝÁö // $(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; }); // ¸ð´Þ - À¯Æ©ºê ÀÚµ¿Àç»ý // autoPlayYouTubeModal(); //FUNCTION TO GET AND AUTO PLAY YOUTUBE VIDEO FROM DATATAG function autoPlayYouTubeModal() { var trigger = $("body").find('[data-toggle="modal"]'); trigger.click(function () { var theModal = $(this).data("target"), videoSRC = $(this).attr("data-theVideo"), videoSRCauto = videoSRC + "?autoplay=1"; $(theModal + ' iframe').attr('src', videoSRCauto); $(theModal + ' button.close').click(function () { $(theModal + ' iframe').attr('src', videoSRC); }); $('.modal').click(function () { $(theModal + ' iframe').attr('src', videoSRC); }); }); } }); // 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; // »çÀÌÆ®º° /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// $(document).ready(function() { // ¸ÞÀÎ ºñÁÖ¾ó // $(".mainVegas").vegas({ slides: [ { src: "../../img/images/main/visual_img01.jpg" }, { src: "../../img/images/main/visual_img02.jpg" }, { src: "../../img/images/main/visual_img03.jpg" } ], animation: 'kenburns', delay: 7000, overlay: '../../img/images/btnIcn/overlay_07.png' }); $('.mvPrev').on('click', function () { $(".mainVegas").vegas('options', 'transition', 'fade').vegas('previous'); }); $('.mvNext').on('click', function () { $(".mainVegas").vegas('options', 'transition', 'fade').vegas('next'); }); $('.mvBtm').click(function(){ $('html, body').animate({ scrollTop : $(window).height()-51 }, 900, 'easeOutQuad'); }); // ¸ÞÀÎ Ä«ÇÇ // $('.mvCopy > h1').textillate(); $('.mvCopy > h2').textillate(); $('.mvCopy > h3').textillate(); // ¸ÞÀÎ ¾Æ·¡·Î À̵¿¹öÆ° // $('.crosscover-island > div').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%' }, 500, 'easeOutQuad'); }, function (event) { $(this).find('p img').stop().animate({ width : '100%', margin : '0' }, 500, 'easeOutQuad'); }); // ¸ÞÀÎ °¶·¯¸® // var $mainGallery = $('.mainGallery > div > ul').isotope({ itemSelector: '.item', layoutMode: 'masonry' }); $mainGallery.imagesLoaded().progress( function() { $mainGallery.isotope('layout'); }); $('.mainGallery > div > ul > li').hover(function (event) { $(this).find('p img').stop().animate({ width : '105%', margin : '-2.5% 0 0 -2.5%' }, 500, 'easeOutQuad'); }, function (event) { $(this).find('p img').stop().animate({ width : '100%', margin : '0' }, 500, 'easeOutQuad'); }); // ¼­ºê ºñÁÖ¾ó // $(".visualSub").vegas({ slides: [ { src: "../../img/images/content/visualSub01.jpg" }, { src: "../../img/images/content/visualSub02.jpg" }, { src: "../../img/images/content/visualSub03.jpg" }, { src: "../../img/images/content/visualSub04.jpg" } ], animation: 'kenburns', delay: 7000, overlay: '../../img/images/btnIcn/overlay_01.png' }); // Á¦Ç°¼Ò°³1 // var $productArea1 = $('.productArea1 > ul').isotope({ itemSelector: '.item', layoutMode: 'masonry' }); $productArea1.imagesLoaded().progress( function() { $productArea1.isotope('layout'); }); });