$(document).ready(function(){ /* calendar */ $(".cSorting").each(function(){ $(this).addClass("useJs"); $(this).find("label").bind("click" , function (){ $(this).parents("ul").find("img").each(function(){this.src = this.src.replace("_on.gif", "_off.gif");}); $(this).find("img").each(function(){this.src = this.src.replace("_off.gif", "_on.gif");}); $(this).parents("ul").find("label").removeClass("on"); $(this).addClass("on"); $(this).find("input").attr("checked", "checked"); }); }); /* input radio */ $(".radio").each(function(){ $(this).find("input:radio").addClass("blind"); $(this).find("label").click(function (){ $(this).parents(".radio").find("label").removeClass("on"); $(this).addClass("on"); $(this).find("input").attr("checked", "checked"); }); }); /* input checkbox */ $(".check").each(function(){ $(this).find("input:checkbox").addClass("blind"); $(this).find("label").click(function (e){ e.preventDefault(); if ($(this).hasClass("on")){ $(this).find("img").each(function(){this.src = this.src.replace("_on", "_off");}); $(this).removeClass("on"); } else { $(this).find("img").each(function(){this.src = this.src.replace("_off", "_on");}); $(this).addClass("on"); } //$("#" + $(this).attr("for")).click(); }); }); // img rollover $(".yearTab li.tit").mouseover(function(){ $(this).parents(".yearTab").find(".depth1").each(function(){this.src = this.src.replace("_on", "_off");}); $(this).find(".depth1").each(function(){this.src = this.src.replace("_off", "_on");}); $(".yearTab li.tit").removeClass("on"); $(this).addClass("on"); if($(".yearTab li.on ul").css("display") == "block") { $(".yearTab").height(88); } else { $(".yearTab").height(41); } }); $(".yearTab li").each(function(){ $(this).find("li").mouseover(function(){ $(this).parent("ul").find("img").each(function(){this.src = this.src.replace("_on", "_off");}); $(this).find("img").each(function(){this.src = this.src.replace("_off", "_on");}); $(this).parent("ul").find("li").removeClass("on"); $(this).addClass("on"); }); }); var docHeight = $(document).height(); $(".grayBg").css({"height" : docHeight }) }); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* ÁÂÃø Æîħ¸Þ´º 3depth °¡´É */ (function($) { /*********************** ¿Â·Îµå ½ÇÇà ÇÔ¼ö ***********************/ $(function() { /* body addClass */ if($.browser.name == 'msie') { $('body').addClass($.browser.className); } else { $('body').addClass($.browser.name); } /* ajax¿ë ¸µÅ© À̺¥Æ® ¼³Á¤*/ $('a.call-ajax').live('click', function(ev) { ev.preventDefault(); $.ajax({ beforeSend : function() {}, url : $(this).attr('href'), success : function(data) { $('body').append(dataProcessing(data)); } }); }); /* ie6 png À̹ÌÁöó¸®*/ if($.browser.className=="msie6"){ DD_belatedPNG.fix('.png'); } explicitLabel("label-wrap"); /* LNB */ $lnb = $(".lnb"); //lnb Ãʱ⼳Á¤ $lnb.find("ul").hide(); $lnb.find("li.on").parent("ul").show(); $lnb.find(">ul>li").each(function(){ if($(this).find("ul").length) $(this).find(">a").addClass("sub"); }); //ÇöÀçÆäÀÌÁö ½ºÅ¸ÀÏ º¯°æ $lnb_thispage = $lnb.find(".on"); $lnb_thispage.find(">a img").attr("src", function(){return $(this).attr("src").replace("_off","_on")}); //1Â÷Ä«Å×°í¸® Ŭ¸¯À̺¥Æ® $lnb.find("h2:not(.on)").bind("click",function(){ if($(this).find(">a").attr("href")!="#none"){ return true; } else{ $lnb .find("h2:not(.on)") .removeClass("active") .removeClass("hover") .next("ul").slideUp() .end() .find("img").attr("src", function(){return $(this).attr("src").replace("_on","_off")}); if($(this).next("ul:visible").length){ $(this).next("ul").slideUp(); $(this).find("img").attr("src", function(){return $(this).attr("src").replace("_on","_off")}); $(this).removeClass("active"); } else{ $(this).next("ul").slideDown(); $(this).find("img").attr("src", function(){return $(this).attr("src").replace("_off","_on")}); $(this).addClass("active"); } } }); //2Â÷Ä«Å×°í¸® Ŭ¸¯À̺¥Æ® $lnb.find(">ul>li:not(.on)>a").bind("click",function(){ if($(this).attr("href")!="#none"){ return true; }else{ $lnb.find("ul>li:not(.on)").find("ul").slideUp(); if($(this).parent().find("ul:visible").length) $(this).find("ul").slideUp(); else $(this).parent().find("ul").slideDown(); return false; } }); //À̹ÌÁö¿À¹ö¼³Á¤ $lnb.find("h2").bind("focus mouseover",function(){ $(this).find("img").attr("src", function(){return $(this).attr("src").replace("_off","_on")}); $(this).addClass("hover"); }); $lnb.find("h2:not(.on)").bind("blur mouseout",function(){ if(!$(this).hasClass("active")){ $(this).find("img").attr("src", function(){return $(this).attr("src").replace("_on","_off")}); } $(this).removeClass("hover"); }); $lnb.find("ul li:not(.on) a").hover(function(){ $(this).addClass('hover'); $(this).find("img").attr("src", function(){return $(this).attr("src").replace("_off","_on")}); },function(){ $(this).removeClass('hover'); $(this).find("img").attr("src", function(){return $(this).attr("src").replace("_on","_off")}); }); /* footer family site */ $(".family-site").hover(function(){ if($(".family-site>ul:visible").length) $(".family-site>ul").hide(); else $(".family-site>ul").show(); }, function() { $(".family-site>ul").hide(); }); $(".family-site").find("li>a").bind('click',function(){ $(".family-site").find("li>a").removeClass("on"); $(".family-site").find("ul").hide(); }); if($(".list-type1").length){ $(".list-type1>li:even").addClass("first"); $(".list-type1>li:nth-child(4n-1)").addClass("bg"); $(".list-type1>li:nth-child(4n)").addClass("bg"); } }); /* //¿Â·Îµå ½ÇÇà ÇÔ¼ö */ var $ajaxStatus = $('
'); $ajaxStatus .bind('ajaxStart', function() { $('body').append($ajaxStatus); $ajaxStatus.css({ 'top' : ($(window).height() / 2) - ($ajaxStatus.outerHeight() / 2), 'left' : ($(window).width() / 2) - ($ajaxStatus.outerWidth() / 2) }); $(this).show(); }) .bind('ajaxStop', function() { var t = this; setTimeout(function() { $(t).hide(); }, 1500); }) .bind('ajaxSend', function(evt, xhr, ajaxOptions) { //alert(ajaxOptions.url); }) .bind('ajaxComplete', function(evt, xhr, ajaxOptions) { //alert(ajaxOptions.url); }); $.ajaxSetup({ cache : true, dataType : 'html', error : function(xhr, status, error) { alert('An error occurred: ' + error); }, timeout : 60000, // 60ÃÊ type : 'POST', url : '/html_guide/ajax-gateway.html' }); /* default tab */ $.fn.defaultTab = function(options) { return this.each(function() { options = options || {}; var $cont = $(this); var parentSelecter = $cont.attr('class'); var opts = $.extend({}, $.fn.defaultTab.defaults, options || {}); var $eventEls = $(opts.eventEls, $cont); var $eventChildren = $(opts.eventChildren, $cont) var $ajaxTarget = $('div #' + opts.ajaxTarget); tabActive($eventEls.eq(0), $eventEls); //tabActive($eventChildren.eq(0), $eventChildren); $eventEls.bind('click focus', function(ev) { tabActive($(this), $eventEls); if ($eventChildren.size()) { var target = $(this).attr('href'); if ($(target).find('a:first')[0]) { target = $(target).find('a:first'); tabActive(target, $eventChildren); } else { tabActive(false, $eventChildren); } } ev.preventDefault(); }); $eventEls.hover( function() { $(this).parent().addClass(opts.hoverClass); }, function() { $(this).parent().removeClass(opts.hoverClass); } ); if ($eventChildren) { $eventChildren.bind('focus', function(ev) { $parents = $(this).parents(); $parents = $parents.filter(function() {return $(this).attr('id')}); $target = $('a[href*=' + $parents.eq(0).attr('id') + ']'); tabActive($target, $eventEls); ev.preventDefault(); }); } function tabActive(obj, eventEls) { var self = obj; var current = $(eventEls).index($(self)[0]); if(!self) current = -1; //if ($(self).parent().hasClass(opts.tabOnClass)) return false; $(eventEls).each(function(n) { var href = $(this).attr('href'); // URL À» Ç¥ÁØ ¸µÅ©·Î ¸¸µç´Ù if (!$.support.herfNormalized) { var loc = window.location; href = href.replace(loc.protocol + '//' + loc.host + loc.pathname, ''); } if(current == n) { $(this).parent().addClass(opts.tabOnClass); $(this).children('img').attr('src', function() {return this.src.replace(opts.offimg, opts.onimg);}); $cont.find(href).removeClass(opts.hiddenClass); if(href.indexOf('html') != -1) { var target = href.replace(/.+\.html/,''); if(target) href = href.split('#')[0]; /* $ajaxTarget.load(href , function() { if(opts.clickCallback) opts.clickCallback($cont); }); */ $.ajax({ beforeSend : function() {}, url : href, success : function(data) { var html = dataProcessing(data); //alert($('#kwcag-1-1', html).text()); $ajaxTarget.html(html); }, complete : function() { //if(opts.clickCallback) opts.clickCallback($cont); } }); } } else { $(this).parent().removeClass(opts.tabOnClass); $(this).children('img').attr('src', function() {return this.src.replace(opts.onimg, opts.offimg);}); $cont.find(href).addClass(opts.hiddenClass); } }); } }); }; $.fn.defaultTab.defaults = { ajaxTarget : 'AjaxContentWrap', eventEls : 'a', eventChildren : false, tabOnClass : 'on', hoverClass : 'hover', onimg : '_on.gif', offimg : '_off.gif', hiddenClass : 'display-none', clickCallback : false //testTabFunction } /*// img tab */ $.fn.modal = function(options) { return this.each(function(n) { options = options || {}; var $cont = $(this); var opts = $.extend({}, $.fn.modal.defaults, options || {}); var $overlay; if (opts.modal) { $overlay = $('
'); $overlay.addClass(opts.modal_class); $('body').append($overlay); } setSize(); function setSize() { var browser_width = $(window).width(); var browser_height = $(window).height(); var cont_width = $cont.outerWidth(); var cont_height = $cont.outerHeight(); var margin_top = Math.floor(cont_height /2) * (-1) + 'px'; var margin_left = Math.floor(cont_width /2) * (-1) + 'px'; var modal_width = Math.floor(browser_width) + 'px'; var modal_height = Math.floor(browser_height) + 'px'; var top = $(window).scrollTop() + (browser_height /2); var left = '50%'; if (opts.view_port) { if (browser_height < opts.view_height) { margin_top = 0; top = (opts.view_height /2) - (Math.floor(cont_height /2)); modal_height = opts.view_height; } if (browser_width < opts.view_width) { margin_left = 0; left = (opts.view_width /2) - (Math.floor(cont_width /2)); modal_width = opts.view_width; } } if(opts.position_top) top = opts.position_top, margin_top = 0; if(opts.position_left) left = opts.position_left, margin_left = 0; $cont.css({'position' : 'absolute', 'z-index' : opts.z_index,'top' : top, 'left' : left, 'margin-top' : margin_top, 'margin-left' : margin_left}); if (opts.modal) $overlay.css({'width' : modal_width, 'height' : modal_height, 'z-index' : opts.z_index - 1}); }; $(window).bind('resize', function() { if (opts.view_port) { setSize(); } }); $(opts.close_trigger, $cont).focus(); if (opts.draggable) { $('.draggable-handle', $cont).click(function() { var temp = 0; $('div.dialog-type-A').each(function(n) { if ($cont.attr('id') == $(this).attr('id')) return; if (Number($cont.css('z-index')) <= Number($(this).css('z-index'))) { temp = Number($(this).css('z-index')) + 1; $cont.css('z-index', temp); }; }); }); $cont.draggable({ handle: '.draggable-handle', containment: '#wrapper', scroll: false }); } else { $('.draggable-handle', $cont).css('display', 'none'); } $(opts.close_trigger, $cont).live('click', function() { modalRemove(); }); function modalRemove() { if (opts.beforeclose) opts.beforeclose(); $cont.remove(); if (opts.modal) $overlay.remove(); } }); }; $.fn.modal.defaults = { beforeclose : false, close_trigger : '.btn-close', draggable : false, modal : false, modal_class : 'modal-overlay', position_left : false, position_top : false, view_port : true, view_width : 980, view_height : false, z_index : 9999 } })(jQuery); // ¾Ï½ÃÀû ·¹ÀÌºí ¹æ½Ä ¸í½ÃÀûÀ¸·Î Àû¿ë function explicitLabel(cssName, margin) { $('.'+cssName+" label").each(function(){ $(this).css('padding-left', function() {return $(this).next().outerWidth(true)}); $("#"+$(this).attr("for")).css({ 'margin-left' : function() { return -$(this).prev().outerWidth(true) }, 'margin-right' : function() { if (margin) { return $(this).prev().width() + margin; } else { return $(this).prev().width()+15; } } }); }); } ////////////////////////////////////////////////////////////////////////////////////////////// //Æ÷Åä½½¶óÀ̵å function hiddenZoom() { $('#zoomDiv').css('display', 'none'); //var expandSize = 385; //$('.viewZoom').css('display', 'none'); //$('#zoomDiv').animate({ height: '-=' + expandSize + 'px' }, 800); //setTimeout(displayNoneZoom, 800); } function displayNoneZoom() { $('#zoomDiv').css('display', 'none'); } $(document).ready(function() { $('#reserveBtn').click(function() { if ('Session("sesUserId")'=='') { $('#reserve').val('Y'); } Move_ticket('grpm1111010928001'); }); //½ºÆ¿ÄÆ µ¿¿µ»ó À̹ÌÁö À̵¿ $('#nextImg').bind('click', moveImgList) $('#prevImg').bind('click', moveImgList) $('.imgList').click(function() { /* if (parseFloat($('#zoomDiv').css('height').replace('px', '')) <= 380) { var expandSize = 385; $('#zoomDiv').animate({ height: '+=' + expandSize + 'px' }, 800); $('#zoomDiv').css({'display':'block', 'height': '385px'}); } */ $('#zoomDiv').css('display', 'block'); var thisId = $(this).attr('id').replace('imgList', ''); var $viewZoom = $('.viewZoom'); var viewZoomLen = $viewZoom.length; for (var i = 0; i < viewZoomLen; i++) { var viewZoomId = $viewZoom.eq(i).attr('id').replace('steelcutCnt', ''); if (viewZoomId == thisId) { $viewZoom.eq(i).css('display', 'block'); } else { $viewZoom.eq(i).css('display', 'none'); } } }); }); function moveImgList() { var maxCnt = $('#imgCount').val(); var startVal = $('#startImg').val(); var gubun; if (maxCnt < 6) return false; gubun = $(this).attr('id').replace('Img',''); if (gubun == 'next') { if (startVal == (maxCnt - 1)) return false; $('#img' + ++startVal).parent('a').parent('li').removeClass('on'); $('#startImg').val(startVal); $('#img' + startVal).parent('a').parent('li').addClass('on'); $('.imgList').animate({ left: '-=' + '105px' }, 500); } else { if (startVal == 1) return false; $('#img' + --startVal).parent('a').parent('li').removeClass('on'); $('#startImg').val(startVal); $('#img' + startVal).parent('a').parent('li').addClass('on'); $('.imgList').animate({ left: '+=' + '105px' }, 500); } return true; }