jQuery(function($){ //검색 $('#searchWrap .searchCate').click(function(){ $('#ly_searchCate').fadeIn(); }) //$('.visualUL li:last-child').addClass('last'); $('#searchWrap a').click(function(){ if(!$(this).is('#btnMainSearch')){ $('#ly_searchCate').hide(); if($(this).is('#searchCate1')) { var searchCate_txt = $(this).text() $('#searchWrap .searchCate').text(searchCate_txt) } else if($(this).is('#searchCate2')) { var searchCate_txt = $(this).text() $('#searchWrap .searchCate').text(searchCate_txt) } else { var searchCate_txt = $(this).text() $('#searchWrap .searchCate').text(searchCate_txt) } } }) //검색 조직도 $('#orgChartBox .searchCate2').click(function(){ $('#ly_searchCate2').show(); }) $('#ly_searchCate2 a').click(function(){ $('#ly_searchCate2').hide(); if($(this).is('#searchCate2_1')) { var searchCate_txt = $(this).text() $('.searchCate2').text(searchCate_txt) } else { var searchCate_txt = $(this).text() $('.searchCate2').text(searchCate_txt) } }) // 생방송 더보기 버튼 $('#notice').hover(function(){ $('#notice #plus').animate({ right:"0px" },500) }, function(){ $('#notice #plus').animate({ right:"-34px" },500) }) // 시민발언대 신청하기 버튼 /*$('#speech').hover(function(){ $('#speech #plus2').animate({ right:"-7px" },500) }, function(){ $('#speech #plus2').animate({ right:"-49px" },500) })*/ // 온라인청책워크숍 버튼 $('#online-ws').hover(function(){ $('#online-ws #plus3').animate({ right:"0px" },500) }, function(){ $('#online-ws #plus3').animate({ right:"-53px" },500) }) //동영상 제목 전체보기 $('#movieWrap span.txt').hover(function(){ $(this).attr('class','txton') },function(){ $(this).attr('class','txt') }) //메인하단 자주찾는 서비스 $('.utilUL3 li.favor').mouseover(function(){ $('.utilUL3 li .utilUL4').removeClass('w-2line'); $(this).children('.utilUL4').addClass('w-2line'); }) //등록일순/마감일순 $('#banCtrl span').click(function(){ if (!$(this).is('on')){ $('#banCtrl span').removeClass() $(this).addClass('on') } }) /*$('#btnReg').click(function(){ $('#expList').hide(); $('#regList').show(); return false; }) jQuery('#btnExp').click(function(){ $('#regList').hide(); $('#expList').show(); return false; })*/ //QR코드 $('#bntQR').hover( function(){$('#bntQR_on').show()}, function(){$('#bntQR_on').hide()} ) /* $('.minwon_graph').hover( function(){$('#min_popup').show()}, function(){$('#min_popup').hide()} ) */ $('#site_2_link').click(function(){ if($('.site_2_link').css('display') == 'block'){ $('.site_2_link').hide(); } else { $('.site_1_link').hide(); $('.site_2_link').show(); } }) $('.site_2_link .close a').click(function(){ $('.site_2_link').hide(); }) $('#site_1_link').click(function(){ if($('.site_1_link').css('display') == 'block'){ $('.site_1_link').hide(); } else { $('.site_2_link').hide(); $('.site_1_link').show(); } }) $('.site_1_link .close a').click(function(){ $('.site_1_link').hide(); }) /*$('#snsTabUL img').each(function(){ $(this).hover(function(){ $(this).attr('src',function(){return $(this).attr('src').replace('_off.gif','_on.gif')}) },function(){ $(this).attr('src',function(){return $(this).attr('src').replace('_on.gif','_off.gif')}) }) })*/ /* $('.snsmap a').click(function(){ deemed_show(); $('#frmWrap').show(); }) */ $('.btndeemed').click(function(){ $('#deemed').hide(); $('#frmWrap').hide(); $('#seoultalktalkemail').hide(); }) $('#deemed').click(function(){ $('#deemed').hide(); $('#frmWrap').hide(); $('#seoultalktalkemail').hide(); }) $('.seoultalktalkemail').click(function(){ deemed_show(); $('#seoultalktalkemail').show(); }) $('.issue2').hover(function(){ $('.issue_box div.more a').animate({ right:"0px" },300) },function(){ $('.issue_box div.more a').animate({ right:"-32px" },200) }) $('#banUL2Wrap').hover(function(){ },function(){ $('#banUL2Wrap').animate({top:"120px"},300); setTimeout(banUL2WrapHide,300); }); $('#ctrlList').click(function(){ $('#banUL2WrapWrap').show(); $('#banUL2Wrap').animate({top:"0"},300); return false; }) $('#banUL2WrapClose').click(function(){ $('#banUL2Wrap').animate({top:"120px"},300); setTimeout(banUL2WrapHide,300); return false; }) $('.visualUL li span.pic').hide(); $('.banPicUL li span.pic').hide(); }) function banUL2WrapHide(){ $('#banUL2WrapWrap').hide(); } function errimg(e){ e.src='/v2012/images/main/img_err.gif'; $(e).parent().css('border','1px solid #ddd'); } function deemed_show(){ $('#deemed').show(); var deemedH = $('body').height(); // alert(deemedH); $('#deemed').css('height',deemedH); $('#deemed').css('opacity','0.5'); } function PopupZone() { var Play = null; this.init = function( CreateName, ZoneName, ControlName, Height, Delay ) { // 생성된 객체 이름 this.CreateName = CreateName; // 팝업존 이름 this.ZoneName = ZoneName; // 팝업존 컨트롤 이름 this.ControlName = ControlName; // 팝업존 높이 this.Height = Height; // 팝업존 딜레이 시간 this.Delay = Delay * 1000; // 현재 팝업 this.CurrentPop = 0 this.RollFlag = true; //alert(document.getElementById(this.ZoneName)); // 팝업존 오브젝트 this.Zone = document.getElementById(this.ZoneName).getElementsByTagName("ul")[0].getElementsByTagName("li"); // 팝업존 컨트롤 오브젝트 this.Control = document.getElementById(this.ControlName).getElementsByTagName("li"); // 팝업존 내용 수 this.Length = this.Zone.length - 1; // 시작버튼 this.StartButton = this.Control[0].getElementsByTagName("img")[0]; // 중지버튼 this.StopButton = this.Control[1].getElementsByTagName("img")[0]; // 이전버튼 this.PrevButton = this.Control[2].getElementsByTagName("img")[0]; // 다음버튼 this.NextButton = this.Control[3].getElementsByTagName("img")[0]; // 전체보기 //this.ListButton = this.Control[4].getElementsByTagName("img")[0]; // 시작엥커 this.StartAnchor = this.Control[0].getElementsByTagName("a")[0]; // 종료엥커 this.StopAnchor = this.Control[1].getElementsByTagName("a")[0]; // 이전엥커 this.PrevAnchor = this.Control[2].getElementsByTagName("a")[0]; // 다음엥커 this.NextAnchor = this.Control[3].getElementsByTagName("a")[0]; // 전체보기 //this.ListAnchor = this.Control[4].getElementsByTagName("a")[0]; // function 에서 사용할 객체 저장 var PopupZoneThis = this; // 이벤트 설정 -------------------------------------------------------------------------------------------- // 시작버튼 On this.StartAnchor.onclick = function() { eval( PopupZoneThis.CreateName + ".Start()" ); }; // 멈춤버튼 On this.StopAnchor.onclick = function() { eval( PopupZoneThis.CreateName + ".Stop()" ); }; // 이전버튼 IN this.PrevAnchor.onmouseover = this.PrevAnchor.onfocus = function() { eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".PrevButton,true)" ); }; // 이전버튼 OUT this.PrevAnchor.onmouseout = this.PrevAnchor.onblur = function() { eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".PrevButton,false)" ); }; // 이전버튼 On this.PrevAnchor.onclick = function(event) { eval( PopupZoneThis.CreateName + ".Prev()" ); }; // 다음버튼 IN this.NextAnchor.onmouseover = this.NextAnchor.onfocus = function() { eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".NextButton,true)" ); }; // 다음버튼 OUT this.NextAnchor.onmouseout = this.NextAnchor.onblur = function() { eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".NextButton,false)" ); }; // 다음버튼 On this.NextAnchor.onclick = function() { eval( PopupZoneThis.CreateName + ".Next()" ); }; // 전체보기버튼 IN // this.ListAnchor.onmouseover = this.ListAnchor.onfocus = function() { // eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".ListButton,true)" ); // }; // 전체보기버튼 OUT // this.ListAnchor.onmouseout = this.ListAnchor.onblur = function() { // eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".ListButton,false)" ); // }; // 전체보기버튼 On // this.ListAnchor.onclick = function() { // eval( PopupZoneThis.CreateName + ".ListOpen()" ); // }; // 팝업내용 이벤트 ----------------------------------------------------------------------------------------- for( var LoopI=0; LoopI<=this.Length; LoopI++ ) { this.PopupLink = this.Zone[LoopI].getElementsByTagName("a")[0]; this.PopupLink.LoopI = LoopI; this.PopupLink.CreateName = this.CreateName; this.PopupLink.onfocus = function() { eval( this.CreateName + ".On(" + this.LoopI + ")" ); }; this.PopupLink.onmouseover = function() { eval( this.CreateName + ".Stop()" ); }; this.PopupLink.onmouseout = function() { eval( this.CreateName + ".Start()" ); }; } }; this.ListOpen = function() { document.getElementById("popup_list").style.display = 'block'; }; this.ListClose = function() { document.getElementById("popup_list").style.display = 'none'; }; // 이미지 변환 this.ImageReplace = function( ImgObject, Type ) { if( Type ) { ImgObject.src = ImgObject.src.replace("_off.gif","_on.gif"); } else { ImgObject.src = ImgObject.src.replace("_on.gif","_off.gif"); } }; // 시작 this.Start = function() { if( this.Length >= 0 ) { this.ImageReplace(this.StartButton,true); this.ImageReplace(this.StopButton,false); this.RollFlag = true; var RollThis = this; var Action = function() { if( RollThis.RollFlag ) { RollThis.Next(); } }; Play = window.setInterval(Action,this.Delay); } }; // 멈춤 this.Stop = function() { if( this.Length >= 0 ) { this.ImageReplace(this.StartButton,false); this.ImageReplace(this.StopButton,true); this.RollFlag = false; if( Play ) window.clearInterval(Play); Play = null; } }; // 이전 this.Prev = function() { if( this.Length >= 0 ) { this.CurrentPop = ( this.CurrentPop <= 0 ) ? this.Length : --this.CurrentPop; this.Move(); } }; // 다음 this.Next = function() { if( this.Length >= 0 ) { this.CurrentPop = ( this.CurrentPop >= this.Length ) ? 0 : ++this.CurrentPop; this.Move(); } }; // 활성화 this.On = function( intPop ) { this.CurrentPop = intPop; this.Move(); }; // 이동 this.Move = function() { var tmpTop = 0 - this.CurrentPop * this.Height; document.getElementById(this.ZoneName).getElementsByTagName("ul")[0].style.top = tmpTop+ "px"; }; } function PopupZone2() { var Play2 = null; this.init = function( CreateName, ZoneName, ControlName, Height, Delay ) { // 생성된 객체 이름 this.CreateName = CreateName; // 팝업존 이름 this.ZoneName = ZoneName; // 팝업존 컨트롤 이름 this.ControlName = ControlName; // 팝업존 높이 this.Height = Height; // 팝업존 딜레이 시간 this.Delay = Delay * 1000; // 현재 팝업 this.CurrentPop = 0 this.RollFlag = true; // 팝업존 오브젝트 this.Zone = document.getElementById(this.ZoneName).getElementsByTagName("ul")[0].getElementsByTagName("li"); // 팝업존 컨트롤 오브젝트 this.Control = document.getElementById(this.ControlName).getElementsByTagName("li"); // 팝업존 내용 수 this.Length = this.Zone.length - 1; // 시작버튼 this.StartButton = this.Control[0].getElementsByTagName("img")[0]; // 중지버튼 this.StopButton = this.Control[1].getElementsByTagName("img")[0]; // 이전버튼 this.PrevButton = this.Control[2].getElementsByTagName("img")[0]; // 다음버튼 this.NextButton = this.Control[3].getElementsByTagName("img")[0]; // 전체보기 //this.ListButton = this.Control[4].getElementsByTagName("img")[0]; // 시작엥커 this.StartAnchor = this.Control[0].getElementsByTagName("a")[0]; // 종료엥커 this.StopAnchor = this.Control[1].getElementsByTagName("a")[0]; // 이전엥커 this.PrevAnchor = this.Control[2].getElementsByTagName("a")[0]; // 다음엥커 this.NextAnchor = this.Control[3].getElementsByTagName("a")[0]; // 전체보기 //this.ListAnchor = this.Control[4].getElementsByTagName("a")[0]; // function 에서 사용할 객체 저장 var PopupZoneThis = this; // 이벤트 설정 -------------------------------------------------------------------------------------------- // 시작버튼 On this.StartAnchor.onclick = function() { eval( PopupZoneThis.CreateName + ".Start()" ); }; // 멈춤버튼 On this.StopAnchor.onclick = function() { eval( PopupZoneThis.CreateName + ".Stop()" ); }; // 이전버튼 IN this.PrevAnchor.onmouseover = this.PrevAnchor.onfocus = function() { eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".PrevButton,true)" ); }; // 이전버튼 OUT this.PrevAnchor.onmouseout = this.PrevAnchor.onblur = function() { eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".PrevButton,false)" ); }; // 이전버튼 On this.PrevAnchor.onclick = function(event) { eval( PopupZoneThis.CreateName + ".Prev()" ); }; // 다음버튼 IN this.NextAnchor.onmouseover = this.NextAnchor.onfocus = function() { eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".NextButton,true)" ); }; // 다음버튼 OUT this.NextAnchor.onmouseout = this.NextAnchor.onblur = function() { eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".NextButton,false)" ); }; // 다음버튼 On this.NextAnchor.onclick = function() { eval( PopupZoneThis.CreateName + ".Next()" ); }; // 전체보기버튼 IN // this.ListAnchor.onmouseover = this.ListAnchor.onfocus = function() { // eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".ListButton,true)" ); // }; // 전체보기버튼 OUT // this.ListAnchor.onmouseout = this.ListAnchor.onblur = function() { // eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".ListButton,false)" ); // }; // 전체보기버튼 On // this.ListAnchor.onclick = function() { // eval( PopupZoneThis.CreateName + ".ListOpen()" ); // }; // 팝업내용 이벤트 ----------------------------------------------------------------------------------------- for( var LoopI=0; LoopI<=this.Length; LoopI++ ) { this.PopupLink = this.Zone[LoopI].getElementsByTagName("a")[0]; this.PopupLink.LoopI = LoopI; this.PopupLink.CreateName = this.CreateName; this.PopupLink.onfocus = function() { eval( this.CreateName + ".On(" + this.LoopI + ")" ); }; this.PopupLink.onmouseover = function() { eval( this.CreateName + ".Stop()" ); }; this.PopupLink.onmouseout = function() { eval( this.CreateName + ".Start()" ); }; } }; this.ListOpen = function() { document.getElementById("popup_list").style.display = 'block'; }; this.ListClose = function() { document.getElementById("popup_list").style.display = 'none'; }; // 이미지 변환 this.ImageReplace = function( ImgObject, Type ) { if( Type ) { ImgObject.src = ImgObject.src.replace("_off.gif","_on.gif"); } else { ImgObject.src = ImgObject.src.replace("_on.gif","_off.gif"); } }; // 시작 this.Start = function() { if( this.Length >= 0 ) { this.ImageReplace(this.StartButton,true); this.ImageReplace(this.StopButton,false); this.RollFlag = true; var RollThis = this; var Action2 = function() { if( RollThis.RollFlag ) { RollThis.Next(); } }; Play2 = window.setInterval(Action2,this.Delay); } }; // 멈춤 this.Stop = function() { if( this.Length >= 0 ) { this.ImageReplace(this.StartButton,false); this.ImageReplace(this.StopButton,true); this.RollFlag = false; if( Play2 ) window.clearInterval(Play2); Play2 = null; } }; // 이전 this.Prev = function() { if( this.Length >= 0 ) { this.CurrentPop = ( this.CurrentPop <= 0 ) ? this.Length : --this.CurrentPop; this.Move(); } }; // 다음 this.Next = function() { if( this.Length >= 0 ) { this.CurrentPop = ( this.CurrentPop >= this.Length ) ? 0 : ++this.CurrentPop; this.Move(); } }; // 활성화 this.On = function( intPop ) { this.CurrentPop = intPop; this.Move(); }; // 이동 this.Move = function() { var tmpTop = 0 - this.CurrentPop * this.Height; document.getElementById(this.ZoneName).getElementsByTagName("ul")[0].style.top = tmpTop+ "px"; }; } function PopupZone3() { var Play2 = null; this.init = function( CreateName, ZoneName, ControlName, Height, Delay, totcnt ) { // 생성된 객체 이름 this.CreateName = CreateName; // 팝업존 이름 this.ZoneName = ZoneName; // 팝업존 컨트롤 이름 this.ControlName = ControlName; // 팝업존 높이 this.Height = Height; // 팝업존 딜레이 시간 this.Delay = Delay * 1000; // 현재 팝업 this.CurrentPop = 0 this.RollFlag = true; // 팝업존 오브젝트 this.Zone = document.getElementById(this.ZoneName).getElementsByTagName("ul")[0].getElementsByTagName("li"); // 팝업존 컨트롤 오브젝트 this.Control = document.getElementById(this.ControlName).getElementsByTagName("li"); // 팝업존 내용 수 //this.Length = this.Zone.length - 1; this.Length = totcnt; // 시작버튼 this.StartButton = this.Control[0].getElementsByTagName("img")[0]; // 중지버튼 this.StopButton = this.Control[1].getElementsByTagName("img")[0]; // 이전버튼 this.PrevButton = this.Control[2].getElementsByTagName("img")[0]; // 다음버튼 this.NextButton = this.Control[3].getElementsByTagName("img")[0]; // 전체보기 //this.ListButton = this.Control[4].getElementsByTagName("img")[0]; // 시작엥커 this.StartAnchor = this.Control[0].getElementsByTagName("a")[0]; // 종료엥커 this.StopAnchor = this.Control[1].getElementsByTagName("a")[0]; // 이전엥커 this.PrevAnchor = this.Control[2].getElementsByTagName("a")[0]; // 다음엥커 this.NextAnchor = this.Control[3].getElementsByTagName("a")[0]; // 전체보기 //this.ListAnchor = this.Control[4].getElementsByTagName("a")[0]; // function 에서 사용할 객체 저장 var PopupZoneThis = this; // 이벤트 설정 -------------------------------------------------------------------------------------------- // 시작버튼 On this.StartAnchor.onclick = function() { eval( PopupZoneThis.CreateName + ".Start()" ); }; // 멈춤버튼 On this.StopAnchor.onclick = function() { eval( PopupZoneThis.CreateName + ".Stop()" ); }; // 이전버튼 IN this.PrevAnchor.onmouseover = this.PrevAnchor.onfocus = function() { eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".PrevButton,true)" ); }; // 이전버튼 OUT this.PrevAnchor.onmouseout = this.PrevAnchor.onblur = function() { eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".PrevButton,false)" ); }; // 이전버튼 On this.PrevAnchor.onclick = function(event) { eval( PopupZoneThis.CreateName + ".Prev()" ); }; // 다음버튼 IN this.NextAnchor.onmouseover = this.NextAnchor.onfocus = function() { eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".NextButton,true)" ); }; // 다음버튼 OUT this.NextAnchor.onmouseout = this.NextAnchor.onblur = function() { eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".NextButton,false)" ); }; // 다음버튼 On this.NextAnchor.onclick = function() { eval( PopupZoneThis.CreateName + ".Next()" ); }; // 전체보기버튼 IN // this.ListAnchor.onmouseover = this.ListAnchor.onfocus = function() { // eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".ListButton,true)" ); // }; // 전체보기버튼 OUT // this.ListAnchor.onmouseout = this.ListAnchor.onblur = function() { // eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".ListButton,false)" ); // }; // 전체보기버튼 On // this.ListAnchor.onclick = function() { // eval( PopupZoneThis.CreateName + ".ListOpen()" ); // }; // 팝업내용 이벤트 ----------------------------------------------------------------------------------------- for( var LoopI=0; LoopI<=this.Length; LoopI++ ) { this.PopupLink = this.Zone[LoopI].getElementsByTagName("a")[0]; this.PopupLink.LoopI = LoopI; this.PopupLink.CreateName = this.CreateName; this.PopupLink.onfocus = function() { eval( this.CreateName + ".On(" + this.LoopI + ")" ); }; this.PopupLink.onmouseover = function() { eval( this.CreateName + ".Stop()" ); }; this.PopupLink.onmouseout = function() { eval( this.CreateName + ".Start()" ); }; } }; this.ListOpen = function() { document.getElementById("popup_list").style.display = 'block'; }; this.ListClose = function() { document.getElementById("popup_list").style.display = 'none'; }; // 이미지 변환 this.ImageReplace = function( ImgObject, Type ) { if( Type ) { ImgObject.src = ImgObject.src.replace("_off.gif","_on.gif"); } else { ImgObject.src = ImgObject.src.replace("_on.gif","_off.gif"); } }; // 시작 this.Start = function() { if( this.Length >= 0 ) { this.ImageReplace(this.StartButton,true); this.ImageReplace(this.StopButton,false); this.RollFlag = true; var RollThis = this; var Action2 = function() { if( RollThis.RollFlag ) { RollThis.Next(); } }; Play3 = window.setInterval(Action2,this.Delay); } }; // 멈춤 this.Stop = function() { if( this.Length >= 0 ) { this.ImageReplace(this.StartButton,false); this.ImageReplace(this.StopButton,true); this.RollFlag = false; if( Play3 ) window.clearInterval(Play3); Play3 = null; } }; // 이전 this.Prev = function() { if( this.Length >= 0 ) { this.CurrentPop = ( this.CurrentPop <= 0 ) ? this.Length : --this.CurrentPop; this.Move(); } }; // 다음 this.Next = function() { if( this.Length >= 0 ) { this.CurrentPop = ( this.CurrentPop >= this.Length ) ? 0 : ++this.CurrentPop; this.Move(); } }; // 활성화 this.On = function( intPop ) { this.CurrentPop = intPop; this.Move(); }; // 이동 this.Move = function() { var tmpTop = 0 - this.CurrentPop * this.Height; document.getElementById(this.ZoneName).getElementsByTagName("ul")[0].style.top = tmpTop+ "px"; }; }