// URL ÆĶó¹ÌÅÍ ºÒ·¯¿À±â 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]; } } }; // ¸ð¹ÙÀÏ Á¢¼Ó½Ã ¸ð¹ÙÀÏ À¥À¸·Î ¿¬°á var mobileKeyWords = new Array('iPhone', 'iPod', 'iPad', 'BlackBerry', 'Android', 'Windows CE', 'LG', 'MOT', 'SAMSUNG', 'SonyEricsson'); if (document.URL.match('move_pc')) mobile_keys = null; // ÆĶó¹ÌÅÍ¿¡ 'move_pc' °¡ Æ÷ÇԵǾîÀÖÀ» ¶© Àû¿ë ¾ÈÇÔ /* ----------------- ¸Þ´º °ü·Ã ½ºÅ©¸³Æ® ----------------- */ $(document).ready(function() { var allMenu = $("#all-menu"); var menuMask = $("#menuMask"); var wrapper = $("body"); var mnuEasing = "easeInOutExpo"; // Àüü¸Þ´º ¿±â function allMenuOpen() { if (!allMenu.hasClass('open')) { allMenu.addClass('open'); allMenu.stop().animate({ right: 0 }, 500, mnuEasing); menuMask.stop().fadeIn(500); } } // Àüü¸Þ´º ´Ý±â function allMenuClose() { var menuWidth = allMenu.outerWidth(); allMenu.removeClass('open'); allMenu.stop().animate({ right: -menuWidth + 'px' }, 500, mnuEasing); menuMask.stop().fadeOut(500); } $("#header .btn-allmenu").click(function() { allMenuOpen(); }); allMenu.find('.btnClose').click(function() { allMenuClose(); }); menuMask.click(function() { allMenuClose(); }); $("#all-menu > .inner > .depth1 > li > a").click(function(e) { if ($(this).next('ul').length) { e.preventDefault(); if (!$(this).parent().hasClass('active')) { $("#all-menu > .inner > .depth1 > li").removeClass('active'); $("#all-menu > .inner > .depth1 > li > ul").stop().slideUp(350); $(this).parent().addClass('active'); $(this).siblings('ul').stop().slideDown(350); } else { $("#all-menu > .inner > .depth1 > li").removeClass('active'); $("#all-menu > .inner > .depth1 > li > ul").stop().slideUp(350); } } }); }); /* ----------------- ¸Þ´º ¹× ÅÇ È°¼ºÈ ½ºÅ©¸³Æ® ----------------- */ $(document).ready(function() { var url = $(location).attr('href'); if (url.indexOf('member') < 0) { var depth1 = getUrlParameter('top') - 1; var depth2 = getUrlParameter('sub') - 1; $("#all-menu .depth1 > li").eq(depth1).addClass('on active'); $("#all-menu .depth1 > li").eq(depth1).find('ul').children().eq(depth2).addClass('active'); $("#all-menu .depth1 > li").eq(depth1).find('ul').css('display', 'block'); } }); /* ----------------- ¸ÞÀÎÆäÀÌÁö Àü¿ë ½ºÅ©¸³Æ® ----------------- */ // BEFORE&AFTER ¼½¼Ç ÅÇ ±â´É $(document).ready(function() { $("#section1 .tab-list > li").click(function() { var tab_index = $(this).index(); $("#section1 .tab-list > li").removeClass('active'); $(this).addClass('active'); $("#rollingBox > .rolling-box").removeClass('active'); $("#rollingBox > .rolling-box").eq(tab_index).addClass('active'); }); }); // BEFORE&AFTER ¼½¼Ç ·Ñ¸µ $(document).ready(function() { var slide_index = []; var count = []; var elem; var winWidth = $(window).width(); var item_size; var easeEffect = "easeInOutCubic"; // À妽º ¹è¿ ÃʱâÈ $("#rollingBox .rolling-box").each(function(i) { slide_index[i] = 0; count[i] = $(this).find('.imgList').children().length; i++; }); // ½½¶óÀÌ´õ »çÀÌÁî ó¸® function sliderSizing() { var wrapperWidth = $("#rollingBox").width(); $("#rollingBox .rolling-box").each(function(i) { $(this).find('.imgList').css({ 'width': count[i] * wrapperWidth + 'px', 'left': -slide_index[i] * wrapperWidth }); $(this).find('.imgList').children().css('width', wrapperWidth + 'px'); }); } // °³º° ÆäÀÌÁö³×ÀÌ¼Ç »ý¼º function initPaging() { var item = "
"; $("#rollingBox .rolling-box").each(function(i) { for (z = 0; z < count[i]; z++) { $(this).find('.pagination').append(item); } $(this).find('.pagination').children().eq(0).addClass('active'); }); } // ½½¶óÀ̵å ó¸® function slide(index) { elem = $("#rollingBox .rolling-box.active"); item_size = elem.width(); if (slide_index[index] < 0) { slide_index[index] = count[index] - 1; } else if (slide_index[index] >= count[index]) { slide_index[index] = 0; } elem.find('.imgList').stop().animate({ 'left': -(item_size * slide_index[index]) + 'px' }, 400, easeEffect); elem.find('.pagination').children().removeClass('active'); elem.find('.pagination').children().eq(slide_index[index]).addClass('active'); } // ÀÌÀü ¹öÆ° Ŭ¸¯ $("#section1 .control-box .prev").click(function() { elem = $("#rollingBox .rolling-box.active > .imgList"); var active_index = elem.index(); if (!elem.is(':animated')) { slide_index[active_index]--; slide(active_index); } }); // ´ÙÀ½ ¹öÆ° Ŭ¸¯ $("#section1 .control-box .next").click(function() { elem = $("#rollingBox .rolling-box.active > .imgList"); var active_index = elem.index(); if (!elem.is(':animated')) { slide_index[active_index]++; slide(active_index); } }); // ÆäÀÌÁö³×ÀÌ¼Ç Å¬¸¯ $(document).on('click touchend', '#rollingBox .rolling-box .pagination > li', function() { elem = $("#rollingBox .rolling-box.active > .imgList"); var active_index = elem.index(); var pindex = $(this).index(); if (!elem.is(':animated')) { slide_index[active_index] = pindex; slide(active_index); } }); initPaging(); sliderSizing(); $(window).resize(function() { sliderSizing(); }); }); // µÑ·¯º¸±â ½ºÅ©¸³Æ® $(document).ready(function() { var old_images = []; // ÃÖÃÊ »óÅÂÀÇ °¢ ÅÇ ¸ÞÀÎ ½æ³×ÀÏÀ» º¯¼ö¿¡ ÀúÀå $("#facilitySlider .big-thumb .thumb-list > li").each(function(i) { old_images[i] = $(this).find('img').attr('src'); i++; }); // 1´Ü°è : Ãþº° ÅÇ Å¬¸¯½Ã º¸¿©Áö´Â ÅÇ ³»¿ëÀ» ±³Ã¼ & °¢ ÃþÀÇ ´ëÇ¥ À̹ÌÁö·Î ÃʱâÈ $("#facilitySlider .big-thumb .floor-tab > li").click(function() { var tab_index = $(this).index(); $("#facilitySlider .big-thumb .floor-tab > li").removeClass('active'); $(this).addClass('active'); $("#facilitySlider .big-thumb .thumb-list > li").removeClass('active'); $("#facilitySlider .big-thumb .thumb-list > li").eq(tab_index).find('img').attr('src', old_images[tab_index]); $("#facilitySlider .big-thumb .thumb-list > li").eq(tab_index).addClass('active'); $("#facilitySlider .floor-container > .floor-info .thumb-list > li").removeClass('selected'); $("#facilitySlider .floor-container > .floor-info").removeClass('active'); $("#facilitySlider .floor-container > .floor-info").eq(tab_index).addClass('active'); }); // 2´Ü°è : °¢ Ãþº° ³»ºÎ ½æ³×ÀÏ Å¬¸¯½Ã ´ëÇü ½æ³×ÀÏ ±³Ã¼ $("#facilitySlider .floor-container > .floor-info .thumb-list > li").click(function() { var thumb_img = $(this).find('img').attr('src'); $("#facilitySlider .floor-container > .floor-info .thumb-list > li").removeClass('selected'); $(this).addClass('selected'); $("#facilitySlider .big-thumb .thumb-list > li.active").find('img').attr('src', thumb_img); }); }); // °Ô½ÃÆÇ Ä«Å×°í¸® ÀÚµ¿ »ý¼º $(document).ready(function() { var cate_link = [], cate_title = [], currentURL = $(location).attr('pathname'), param = "?&com_board_category_code=", currentParam = "", insertHTML = "", idx = 0; if ($("select[name='com_board_category_code']").length > 0) { currentParam = getUrlParameter('com_board_category_code'); $("select[name='com_board_category_code'] > option").each(function() { cate_link[idx] = $(this).val(); cate_title[idx] = $(this).text(); idx++; }); insertHTML = '