if(jQuery.browser.msie==true&&jQuery.browser.version.substr(0,1)<7){var isIE6=true}if(isIE6==true)document.execCommand('BackgroundImageCache',false,true);(function($){$.fn.ngwBanner=function(settings){var config={bannerNav:({use:false}),width:500,height:300,animation:"show",speed:1000,delay:5000};if(settings)$.extend(config,settings);if(isIE6==true&&config.bannerNav.use==true&&(config.bannerNav.navOffURL.indexOf(".png")>-1||config.bannerNav.navOnURL.indexOf(".png")>-10)){config.bannerNav.navOnURL=config.bannerNav.navOnURL.replace(".png",".gif");config.bannerNav.navOffURL=config.bannerNav.navOffURL.replace(".png",".gif")};this.each(function(){var el="#"+jQuery(this).attr("id");if(config.max!=null)$(el).find("> div:gt("+(config.max-1)+")").remove();$(el).css({"position":"relative","overflow":"hidden","width":config.width+"px","height":config.height+"px"});$(el).wrapInner("<div />");var bannerArray=$(el).find("> div > div");var idxTemp=0;var animating=false;if(config.bannerNav.use==true){if(config.bannerNav.left!=null)$(el).append("<p style='position:absolute;z-index:31;left:"+config.bannerNav.left+"px;top:"+config.bannerNav.top+"px;' />");if(config.bannerNav.right!=null)$(el).append("<p style='position:absolute;z-index:31;width:"+(config.width-config.bannerNav.right)+"px;left:0px;top:"+config.bannerNav.top+"px;text-align:right;' />");bannerArray.each(function(index){$(el).find("> p").append("<img src='"+config.bannerNav.navOffURL+"' style='cursor:pointer;' alt='' /> ")});function bannerNavOn(idx){$(el).find("> p > img").attr("src",config.bannerNav.navOffURL);$(el).find("> p > img").eq(idx).attr("src",config.bannerNav.navOnURL)}$(el).find("> p > img").click(function(){if(animating==false)runBanner($(el).find("> p > img").index(this),config.animation)})};function runBanner(idx,animation){if(animation=="init"){if(config.animation=="show")bannerArray.css({"position":"absolute","left":"0","top":"0"}).hide().eq(idx).show();if(config.animation=="fade")bannerArray.css({"position":"absolute","left":"0","top":"0"}).hide().eq(idx).show();if(config.animation.indexOf("slide")>-1)bannerArray.css({"position":"absolute","left":"0","top":"0","z-index":"29"}).hide().eq(idx).show()}if(animation=="show"){bannerArray.hide().eq(idx).show()}if(animation=="fade"){bannerArray.not(bannerArray.eq(idx)).not(bannerArray.eq(idxTemp-1)).hide();bannerArray.eq(idxTemp-1).fadeOut(config.speed);bannerArray.eq(idx).fadeIn(config.speed)}if(animation.indexOf("slide")>-1){animating=true;if(animation=="slideLeft"){bannerArray.eq(idx).show().css({"left":config.width+"px","z-index":"30"});bannerArray.eq(idx).animate({"left":"0"},config.speed,function(){bannerArray.not(bannerArray.eq(idx)).hide();bannerArray.css({"z-index":"29"});animating=false})}if(animation=="slideRight"){bannerArray.eq(idx).show().css({"left":"-"+config.width+"px","z-index":"30"});bannerArray.eq(idx).animate({"left":"0"},config.speed,function(){bannerArray.not(bannerArray.eq(idx)).hide();bannerArray.css({"z-index":"29"});animating=false})}if(animation=="slideUp"){bannerArray.eq(idx).show().css({"top":config.height+"px","z-index":"30"});bannerArray.eq(idx).animate({"top":"0"},config.speed,function(){bannerArray.not(bannerArray.eq(idx)).hide();bannerArray.css({"z-index":"29"});animating=false})}if(animation=="slideDown"){bannerArray.eq(idx).show().css({"top":"-"+config.width+"px","z-index":"30"});bannerArray.eq(idx).animate({"top":"0"},config.speed,function(){bannerArray.not(bannerArray.eq(idx)).hide();bannerArray.css({"z-index":"29"});animating=false})}}if(config.bannerNav.use==true)bannerNavOn(idx);idxTemp=idx;(idxTemp+1)%bannerArray.size()==0?idxTemp=0:idxTemp=idxTemp+1}if(bannerArray.size()>1){$(el).mouseover(function(){clearInterval(banInterval)});$(el).mouseout(function(){banInterval=setInterval(function(){runBanner(idxTemp,config.animation)},config.delay)});var banInterval=setInterval(function(){runBanner(idxTemp,config.animation)},config.delay)}runBanner(idxTemp,"init")});return this};$.fn.ngwLeftMenu=function(settings){var config={listType:"ul",eventStyle:"mouseover",speed:1000};if(settings)$.extend(config,settings);this.each(function(){var el="#"+jQuery(this).attr("id");$(el).find("> "+config.listType).find(config.listType).hide();if(config.eventStyle=="click"){$(el).find("a:has(+ul)").bind(config.eventStyle,function(){$(this).next(config.listType).slideToggle(config.speed);return false})};if(config.eventStyle=="mouseover"){$(el).find("a:has(+"+config.listType+")").parent("li").bind("mouseenter",function(){$(this).find("> "+config.listType).slideDown(config.speed)});$(el).find("a:has(+"+config.listType+")").bind("focus",function(){$(this).next(config.listType).slideDown(config.speed)});$(el).find("a:has(+"+config.listType+")").parent("li").bind("mouseleave",function(){$(this).find(config.listType).slideUp(config.speed)})};$(el).find("> "+config.listType).find(config.listType).each(function(){if($(this).prev().find("img").attr("src").indexOf("_on")>-1){$(this).show();$(this).prev().unbind("click focus");$(this).parent("li").unbind("mouseenter mouseleave")}})});return this};$.fn.ngwResizeImage=function(settings){var config={wrapperWidth:1000,contentWidth:700,opacityAlpha:70};if(settings)$.extend(config,settings);this.each(function(){var el="#"+jQuery(this).attr("id");wrapperWidth=config.wrapperWidth;contentWidth=config.contentWidth;$(el).css({"width":contentWidth+"px","overflow-x":"hidden"});$(el).find("img").each(function(index){var thisImg=$(this);function chkResizeImg(){if(thisImg.width()>contentWidth){thisImg.attr({"width":thisImg.width(),"height":thisImg.height()}).css({"width":contentWidth+"px","height":"auto","cursor":"pointer"});thisImg.click(function(){if(isIE6==true)ngwSelectVis("hidden");$("body object.ngwMPlayer").css("visibility","hidden");$("body").append("<div id='opacityResizeImageDiv' style='position:absolute;z-index:99999;top:0;left:0;width:100%;height:"+$(document).height()+"px;background-color:#000;filter:alpha(opacity="+config.opacityAlpha+");-moz-opacity:."+config.opacityAlpha+";-khtml-opacity: ."+config.opacityAlpha+";opacity:."+config.opacityAlpha+";cursor:pointer;'></div><div id='resizeImageDiv' style='position:absolute;z-index:100000;width:100%;left:0;top:0;text-align:center;cursor:pointer;'></div>");thisImg.clone().css({"position":"relative","z-index":"10001","width":"","height":""}).appendTo("#resizeImageDiv");$("#opacityResizeImageDiv,#resizeImageDiv").click(function(){if(isIE6==true)ngwSelectVis("visible");$("body object.ngwMPlayer").css("visibility","visible");$("#opacityResizeImageDiv, #resizeImageDiv").remove();$(window).unbind("resize",chkChangeImg)});$(window).resize(chkChangeImg);chkChangeImg()})};clearInterval(imgInterval)}if(this.complete!=null){var imgInterval;if(this.complete==true){chkResizeImg()}else{imgInterval=setInterval(chkResizeImg,1000)}}else{chkChangeImg()}});function chkChangeImg(){$("#resizeImageDiv img").css({"width":"","height":""});if($("#resizeImageDiv img").width()>$(window).width()&&$(window).width()>wrapperWidth){$("#opacityResizeImageDiv, #resizeImageDiv").css({"width":"100%"});$("#resizeImageDiv img").css({"width":$(window).width()+"px","height":"auto"})}if($("#resizeImageDiv img").width()>$(window).width()&&$(window).width()<=wrapperWidth){$("#opacityResizeImageDiv, #resizeImageDiv").css({"width":wrapperWidth+"px"});$("#resizeImageDiv img").css({"width":wrapperWidth+"px","height":"auto"})}if($("#resizeImageDiv img").height()>$(window).height())$("#resizeImageDiv").css({"top":$(window).scrollTop()+"px"});else $("#resizeImageDiv").css({"top":$(window).scrollTop()+($(window).height()/2-$("#resizeImageDiv img").height()/2)+"px"})}});return this};$.fn.ngwBoardMovie=function(settings){var config={downloadPage:"/gwfile/download/moviedownloader.aspx"};if(settings)$.extend(config,settings);this.each(function(){var el="#"+jQuery(this).attr("id");$(this).find("div[id^=_MOVIE_]").each(function(index){var oidFile=$(this).attr("id").split("_MOVIE_")[1].split(":")[0];$(this).after("<div id='boardMovie"+index+"'></div>");$(this).remove();$.ajax({url:config.downloadPage+"?oidFile="+oidFile,success:function(data){response=data;ngwMPlayer({url:response,width:"540",height:"360",autostart:"false",elementId:"boardMovie"+index})}})});$(this).find("span.oidMovieFile").each(function(index){$(this).parent("div.editorMovieArea").css({"width":"540px","height":"360px"});$(this).after("<div id='boardMovie"+index+"'></div>");$.ajax({url:config.downloadPage+"?oidFile="+$(this).text(),success:function(data){response=data;ngwMPlayer({url:response,width:"540",height:"360",autostart:"false",elementId:"boardMovie"+index})}})})});return this};$.fn.ngwTabCon=function(settings){var config={};if(settings)$.extend(config,settings);this.each(function(){var el="#"+jQuery(this).attr("id");$(el).find("> .heading a").bind("click focus",function(){runTab($(el).find("> .heading a").index(this));return false});function runTab(idx){$(el).find("> .heading img").each(function(){$(this).attr("src",$(this).attr("src").replace("_on","_off"))});$(el).find("> .heading").eq(idx).find("img").attr("src",$(el).find("> .heading").eq(idx).find("img").attr("src").replace("_off","_on"));$(el).find("> .tabCon").hide();$(el).find("> .tabCon").eq(idx).show()}runTab(0)});return this}})(jQuery);function ngwPopup(url,w,h,s,name){if(w==null)w='100%';if(h==null)h='100%';var l,t='0';if(screen.width&&screen.height){l=(screen.width-w)/2;t=(screen.height-h)/2}if(s==null)s='0';if(name==null)name='';window.open(url,name,'width='+w+',height='+h+',left='+l+',top='+t+',resizable=0,menubar=0,toolbar=0,scrollbars='+s+',status=0')}function ngwCopy(text){if(window.clipboardData){window.clipboardData.setData("Text",text);alert('³»¿ëÀÌ º¹»çµÇ¾ú½À´Ï´Ù.')}else{alert('Å¬¸³º¸µå¸¦ Áö¿øÇÏÁö ¾Ê½À´Ï´Ù. ´ÙÀ½ ³»¿ë¸¦ Á÷Á¢ »ç¿ëÇÏ¼¼¿ä\n'+text)}}function ngwLabel(el){if(navigator.appVersion.indexOf('MSIE')!=-1){var labelFor=el.getAttribute("for")?el.getAttribute("for"):el.getAttribute("htmlFor");$("#"+labelFor).focus();$("#"+labelFor).click()}}function ngwSelectVis(vis){$("select").css("visibility",vis)}function ngwMPlayer(settings){var config={width:540,height:360,type:"video/x-ms-wmv",className:"ngwMPlayer",autostart:"true"};if(settings)$.extend(config,settings);var objectStr=''+'<!--[if IE]>'+'<object class="'+config.className+'" width="'+config.width+'" height="'+config.height+'" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="'+config.type+'" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">'+'<param name="windowlessVideo" value="true" />'+'<![endif] -->'+'<!--[if !IE]> <-->'+'<object class="'+config.className+'" width="'+config.width+'" height="'+config.height+'" type="'+config.type+'" data="'+config.url+'">'+'<!--><![endif]-->'+'<param name="url" value="'+config.url+'" />'+'<param name="showcontrols" value="true" />'+'<param name="autostart" value="'+config.autostart+'" />'+'<embed class="'+config.className+'" width="'+config.width+'" height="'+config.height+'" src="'+config.url+'"></embed>'+'</object>';if(!config.elementId)document.write(objectStr);else{if(document.getElementById(config.elementId)){document.getElementById(config.elementId).innerHTML=objectStr}}}
