(function(){ sldnavDepth01 = { _queue : true, _duration : 300, sldnav : function(id) { $nav_slc = $("#"+id+">li"); $displayBox = $("#"+id).parent().parent(); $nav_slc.find(">a").mouseenter(function(){ sldnavDepth01.menu_open($(this)); }).focusin(function() { $(this).mouseenter(); }); $('a.sldnav_close').focusout(function() { sldnavDepth01.menu_close($(this)); }); $('a.sldnav_close').click(function() { sldnavDepth01.menu_close($(this)); return false; }); $displayBox.mouseleave(function() { sldnavDepth01.menu_close($(this)); }); }, menu_open : function(e) { var animatedObj = $(".dep02:animated"); animatedObj.stop(); var fromHeight = $(".dep02:visible").length>0?$(".dep02:visible").height():0; var toheight = e.next().children(".sub_nav").outerHeight(); $(".dep02").hide(); e.next().css("height", fromHeight +"px"); e.next().show(); $(".logo_img").attr("src", "../images/main/logo_on.png"); $(".gnb_wrap>ul>li").removeClass("on"); $(".gnb_wrap>ul>li").addClass("ov"); $(".gnb_all").addClass("on"); e.parent().addClass("on"); e.parent().parent().parent().parent().addClass("ov"); e.next().find(".sub_lft_nav").css("height", toheight +"px"); e.next().animate({height: toheight +"px"},{queue: this._queue, duration: this._duration, complete: function() {} }); $displayBox.css("height", (toheight + 88) +"px"); }, menu_close : function(e) { $(".dep02:visible").animate({height: 0},{queue: this._queue, duration: this._duration, complete: function() { $(".dep02").hide(); } }); $(".logo_img").attr("src", "../images/main/logo.png"); $(".gnb_wrap>ul>li").removeClass("on"); $(".gnb_wrap>ul>li").removeClass("ov"); $(".gnb_all").removeClass("on"); $("#gnb").removeClass("ov"); $displayBox.css("height", "88px"); } } })(); $(document).ready(function() { $('.dep02').each(function () { $(this).css("overflow", "hidden"); $(this).children('.sub_nav').height($(this).height()); $(this).find('.sub_lft_nav').height($(this).height()); }); sldnavDepth01.sldnav("gnb_menu"); $("ul.snb_wrap > li").each(function () { if ($(this).children("a").hasClass("hv") && $(this).children("ul").length > 0 && !$(this).children("ul").hasClass("on")) { $(this).bind("mouseenter", function () { $(this).css("overflow", "hidden"); var animatedObj = $("ul.snb_wrap > li:animated"); animatedObj.stop(); animatedObj.height($(this).children("a").outerHeight()); var toHeight = $(this).children("a").outerHeight() + $(this).children("ul").height() +1; //$(this).children("ul").css("display", "block"); $(this).animate({ height: toHeight +"px" }, { queue: true, duration: 300 } ); }); $(this).children("a").bind("focusin", function () { $(this).parent().css("overflow", "hidden"); var animatedObj = $("ul.snb_wrap > li:animated"); animatedObj.stop(); animatedObj.height($(this).outerHeight()); var toHeight = $(this).outerHeight() + $(this).parent().children("ul").height() +1; //$(this).children("ul").css("display", "block"); $(this).parent().animate({ height: toHeight +"px" }, { queue: true, duration: 300 } ); }); $(this).bind("mouseleave", function () { //$("ul.snb_wrap > li:animated").height(toHeight); //$("ul.snb_wrap > li:animated").stop(); if ($(this).is(":animated")) { $(this).stop(); } var toHeight = $(this).children("a").outerHeight(); $(this).animate({ height: toHeight +"px" }, { queue: true, duration: 100, complete: function() { //$(this).children("ul").css("display", "none"); } } ); }); } }); if ($('#monthList').length > 0) { $('#monthList > ul > li').each(function () { $(this).children("a").bind("focusin", function () { $('#monthList > ul > li > div').removeClass("calOn"); $(this).next().addClass("calOn"); }); }); } }); $(".gnb_all>a").click(function() { if ($(".all_list:visible").length < 1) { $(".all_list").fadeIn( "fast", function() { }); } else { $(".all_list").fadeOut( "fast", function() { $(".all_list").css("disply", "none"); }); } }); function viewfamilySiteUL() { if ($("#familySiteUL:visible").length < 1) { $("#familySiteUL").fadeIn( "fast", function() { }); } else { $("#familySiteUL").fadeOut( "fast", function() { $("#familySiteUL").css("disply", "none"); }); } } /** * @brief : 만족도 조사 **/ function satisfChk() { if (!$("#satis-form :input:radio[name=satpoint]").is(':checked')) { alert($("#satis-form :input:radio[name=satpoint]:checked").val()); } var cookName = "SATI_"+ $("#satmenu_key").val() +"_"+ $("#satmenu_id").val(); if (getCookie(cookName) == "DONE") { alert("1일 1회 등록이 가능합니다."); return; } var postData = { cmd: 'PointCUD', mode: 'C', POINT: $("#satis-form :input:radio[name=satpoint]:checked").val(), MEMO: $("#satmemo").val(), MENU_ID: $("#satmenu_id").val(), MENU_KEY: $("#satmenu_key").val(), HOME_SEQ:"2" }; $.ajax({ type: "POST", url: "/5331ADM/point/PointAction.do", data: postData, dataType: 'json', success: function(rtnVal) { if (rtnVal.insertPoint == "Y") { setCookie(cookName, "DONE", 1); alert("등록되었습니다."); } }, error: function (request, status, error) { alert(request.responseText); } }); }