$(document).ready(function(){ try { researchOption = contentMenuCode+"/"+contentTableName+"/"+contentIdx; Ivy.researchResultList(researchOption); } catch(e) {} try { contentIndexCount = $("ul.ContentIndex").children().length; orgIndexHeight = $("ul.ContentIndex").height(); if ( contentIndexCount > 4 ) { $("ul.ContentIndex").css({"height":"90px","overflow":"hidden"}); conindeMore = $("
",{"class":"moreInde"}).appendTo( $("ul.ContentIndex").parent() ); conindeMoreA = $("",{"href":""}).appendTo( conindeMore ); $("",{"src":"/Ivyimages/common/sub/indexMore_open.gif","alt":"추가 목차 열기"}).appendTo(conindeMoreA); conindeMoreA.bind("click",function(){ if ( $("ul.ContentIndex").height() <= 90 ) { $("ul.ContentIndex").animate({"height":orgIndexHeight+"px"},function(){ $(this).css({"overflow":"auto"}); $(".moreInde > a > img").attr({"src":"/Ivyimages/common/sub/indexMore_close.gif","alt":"목차 닫기"}) }); } else { $("ul.ContentIndex").animate({"height":"90px"},function(){ $(this).css({"overflow":"hidden"}); $(".moreInde > a > img").attr({"src":"/Ivyimages/common/sub/indexMore_open.gif","alt":"추가 목차 열기"}) }); } return false; }); } } catch(e) {} $("ul.optionTopNode > li > ul").hover( function(){ }, function(){ $("ul.optionTopNode > li > ul").hide(); } ); }); function ncontOptionShow( obj ) { $("ul.optionTopNode > li > ul").hide(); if ( obj == "closeqr" ) $(".qra").focus(); else if ( obj != undefined ) $(obj).parent().children("ul").slideDown(); return false; } function contOptionShow( obj, event ) { if ( event.type == "mouseover" ) contOptionViewTF = false; else contOptionViewTF = true; $(".contOptionChild").each(function( index ) { if ( $(this).css("display") == "block" ) contOptionViewTF = true; }); if ( contOptionViewTF ) { if ( $(obj).parent().children("ul").css("display") != "block" ) { if ( $("ul.optionTopNode > li > ul > li > div").css("display") == "block" ) { $("ul.optionTopNode > li > ul > li > div").slideUp(function(){ $("ul.optionTopNode > li > ul").css({"display":"none"}); $("ul.optionTopNode > li > ul > li > div").css({"display":"none"}); contOptionShowUp( obj ); }); } else { $("ul.optionTopNode > li > ul").slideUp(); contOptionShowUp( obj ); } } } } function contOptionShowUp( obj ) { if ( obj != undefined ) { if ( $(obj).hasClass("divExists") ) { $(obj).parent().children("ul").slideDown(); $("ul.optionTopNode .qr_box").slideDown(); } else $(obj).parent().children("ul").slideDown(); } } function contAllimShow( obj ) { $("ul.alrim > li").removeClass("select"); $("ul.alrim > li > ul").css({"display":"none"}); $(obj).parent().addClass("select"); $(obj).parent().children("ul").css({"display":"block"}); } function contentManageBtRoll( obj, evt ) { var objsrc = $(obj).children("img").attr("src"); if ( evt.type == "mouseover" || evt.type == "focus" ) { if ( !/_on\.gif$/.test(objsrc) ) $(obj).children("img").attr("src", objsrc.replace("\.gif","_on\.gif")); } else { if ( /_on\.gif$/.test(objsrc) ) $(obj).children("img").attr("src", objsrc.replace("_on\.gif","\.gif")); } } var contentAccessoriesPopupSc = null; function contOptionAction( act ) { var pam = Ivy.getParamsAr(); pamlen = pam.length; murl = url = (location.href).split("#")[0]; if ( pamlen > 0 ) url += "&"; else url += "?"; if ( contentTableName != "contents" ) intype = "board"; else intype="content"; switch( act ) { case 'pdf' : { url += "ivyscreenprint=false&pid="+contentIdx+"&makeExt="+act+"&intype="+intype+"&rurl="+Ivy.encode64Prc(murl)+"&sti="+Math.random(); Ivy.openWindow(url, "OPT"); } break; case 'image' : { url += "ivyscreenprint=false&pid="+contentIdx+"&makeExt=png&intype="+intype+"&rurl="+Ivy.encode64Prc(murl)+"&sti="+Math.random(); Ivy.openWindow(url, "OPT"); } break; case 'print' : { url += "ivyscreenprint=false&makeExt=print&sti="+Math.random(); Ivy.centerpopup(url, "OPTP", 740, 600, 0, 1); } break; case 'fax' : { url += "ivyscreenprint=false&pid="+contentIdx+"&makeExt=fax&surl="+contentSurl+"&title="+encodeURIComponent(contentTitle)+"&sti="+Math.random(); contentAccessoriesPopup = Ivy.divpoopup('page', url, 'FAX 정보공유', 400, 200, 'center', 'center', false, true, true); } break; case 'sms' : { url += "ivyscreenprint=false&pid="+contentIdx+"&makeExt=sms&surl="+contentSurl+"&title="+encodeURIComponent(contentTitle)+"&sti="+Math.random(); contentAccessoriesPopup = Ivy.divpoopup('page', url, 'SMS 정보공유', 400, 270, 'center', 'center', false, true, true); } break; case 'email' : { url += "ivyscreenprint=false&pid="+contentIdx+"&makeExt=email&surl="+contentSurl+"&title="+encodeURIComponent(contentTitle)+"&sti="+Math.random(); contentAccessoriesPopup = Ivy.divpoopup('page', url, 'E-MAIL 정보공유', 400, 200, 'center', 'center', false, true, true); } break; case 'rss' : { url += "ivyscreenprint=false&pid="+contentIdx+"&contentTableName="+contentTableName+"&contentLangType="+contentLangType+"&makeExt=rss&surl="+contentSurl+"&title="+encodeURIComponent(contentTitle)+"&sti="+Math.random(); Ivy.openWindow(url, "OPT"); } break; case 'atom' : { url += "ivyscreenprint=false&pid="+contentIdx+"&contentTableName="+contentTableName+"&contentLangType="+contentLangType+"&makeExt=atom&surl="+contentSurl+"&title="+encodeURIComponent(contentTitle)+"&sti="+Math.random(); Ivy.openWindow(url, "OPT"); } break; case 'scrap' : { var enableParam = ["mode","idx"]; var selfurl = (murl.split("?")[0]).replace(/^(http(s)?:\/\/([a-z0-9_-]+(\.)?)+)/i,""); var selfparam = ""; var params = Ivy.getParams(); $.each(params, function(k,v){ if ( Ivy.in_array(k, enableParam) ) { if ( selfparam != "" ) selfparam += "&"; selfparam += k+"="+v; } }); if ( selfparam != "" ) selfparam = "?"+selfparam; var reurl = selfurl+selfparam; var redomain = location.hostname; url = "/_Lib/modulesext/XNMScrap.php?domain="+encodeURIComponent(redomain)+"&target="+encodeURIComponent(reurl)+"&title="+encodeURIComponent($("meta[name=subject]").attr("content"))+"&menucode="+contentMenuCode+"&tablename="+contentTableName+"&tablecode="+contentIdx+"&sti="+Math.random(); contentAccessoriesPopupSc = Ivy.divpoopup('page', url, '스크랩', 300, 400, 'center', 'center', false, true, true); contentAccessoriesPopupSc.bind("dialogclose",function(){ $("a.scrapa").focus(); }); } break; } }