$(document).ready(function() { // »ó´Ü¿µ¿ª // $(window).scroll(function() { if ($("#header").offset().top > 50) { $('#header').stop().animate({ marginTop : '-83px' }, 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 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, 53);") $("#menuSub01 a:nth-child(2)").attr("href", "javascript:scrollLink(2, 53);") $("#menuSub01 a:nth-child(3)").attr("href", "javascript:scrollLink(3, 53);") } if (sPage == "enter.php") { $("#menuSub04 a:nth-child(1)").attr("href", "javascript:scrollLink(1, 53);") $("#menuSub04 a:nth-child(2)").attr("href", "javascript:scrollLink(2, 53);") $("#menuSub04 a:nth-child(3)").attr("href", "javascript:scrollLink(3, 53);") } // ¸ð¹ÙÀÏ ÅäÅ»¸Þ´º // $('#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 }); // ¸ÞÀÎ Ä«ÇÇ // $('.mainCopy01 > h1').textillate(); $('.mainCopy01 > h2').textillate(); // ¸ÞÀÎ ¾Æ·¡·Î À̵¿¹öÆ° // $('.crosscover-island > p').click(function(){ $('html, body').animate({ scrollTop : $(window).height()-51 }, 900, 'easeOutQuad'); }); // ¸ÞÀÎ Á¤º¸¿µ¿ª - ¿À¹ö // $('.mainInfo > 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'); }); // ½ºÅÇ - ¿­°í ´Ý±â // $('.introStaff .stView').each(function (index) { var scrtMerit = 0+String(index); $('.introStaff .stView > p').eq(index).click(function(){ if (scrtMerit == 0+String(index)) { $('.stView div').eq(index).slideDown(400, 'easeOutQuad'); $('.stView p i').eq(index).removeClass('fa-angle-down'); $('.stView p i').eq(index).addClass('fa-angle-up'); scrtMerit = 1+String(index); } else { $('.stView div').eq(index).slideUp(400, 'easeOutQuad'); $('.stView p i').eq(index).removeClass('fa-angle-up'); $('.stView p i').eq(index).addClass('fa-angle-down'); scrtMerit = 0+String(index); } }); }); // ½Ã¼³¼Ò°³ // var $facilitiesList = $('.facilitiesList').isotope({ itemSelector: '.item', layoutMode: 'masonry' }); $facilitiesList.imagesLoaded().progress( function() { $facilitiesList.isotope('layout'); }); $('.facilitiesList .item').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'); }); $('.facilitiesList').magnificPopup({ delegate: '.item', type: 'image', tLoading: 'Loading image #%curr%...', mainClass: 'mfp-img-mobile', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] // Will preload 0 - before current, and 1 after the current image }, image: { tError: 'The image #%curr% could not be loaded.', titleSrc: function(item) { return item.el.attr('title') + 'by Run Diet'; } } }); // ÇÁ·Î±×·¥ - ¿À¹ö // $('.programList > div > ul > li').hover(function (event) { $(this).find('p img').stop().animate({ width : '105%', margin : '-2.5% 0 0 -2.5%'}, 500, 'easeOutQuad'); $(this).find('h1').stop().animate({ opacity: '0.0' }, 500, 'easeOutQuad'); $(this).find('div').stop().animate({ opacity: '1.0' }, 500, 'easeOutQuad'); }, function (event) { $(this).find('p img').stop().animate({ width : '100%', margin : '0' }, 500, 'easeOutQuad'); $(this).find('h1').stop().animate({ opacity: '1.0' }, 500, 'easeOutQuad'); $(this).find('div').stop().animate({ opacity: '0.0' }, 500, 'easeOutQuad'); }); // ½Ä´Ü - ¿À¹ö // $('.programMenu > div > ul > li').hover(function (event) { $(this).find('p img').stop().animate({ width : '105%', margin : '-2.5% 0 0 -2.5%'}, 500, 'easeOutQuad'); $(this).find('div').stop().animate({ opacity: '1.0' }, 500, 'easeOutQuad'); }, function (event) { $(this).find('p img').stop().animate({ width : '100%', margin : '0' }, 500, 'easeOutQuad'); $(this).find('div').stop().animate({ opacity: '0.0' }, 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;