/*! * jQuery JavaScript Library v1.4 * http://jquery.com/ * Date: 2010-05-11 */// 이름의 규칙으로 만든 rollover  _on.gif$(document).ready(function(){	$("#lnbArea li a img").hover(		function() {			if ($(this).attr("src").substring($(this).attr("src").length-6,$(this).attr("src").length)=="on.gif"){				$(this).addClass ("over");			}else{				var currentImg = $(this).attr("src").replace(".gif", "on.gif");				$(this).attr("src", currentImg);			}		}, function() {			if($(this).hasClass("over")!=true){				var currentImg = $(this).attr("src").replace("on.gif", ".gif");				$(this).attr("src", currentImg);			}	});});/* ie6 호출 처리 */$(document).ready(function() {	if ($.browser.msie && $.browser.version == '6.0') {		jqPngFix();		firstChild();	}});/* png 호출 */function jqPngFix() {	try {		//ie6 png transperency fix		$.each($("img[src$=.png],img[src$=.PNG]"), function () {			var img = $(this);			img.css({"width": img.width(),"height": img.height(), "filter": "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.attr("src") + "', sizingMethod='scale')"});			img.attr("src","/images/common/blank.gif");		});	} catch(e) {		alert(e.description)	}}/* first-child의 처리  *//* 고정된 스크립트 [ class명 태그명 ] */function firstChild(){	var firstClassArr=new Array (	"#pageNum a",	"#topLink li",	"#topNavi li ul li",	".tblType1 thead th",	".commentTbl tr",	".memberlType1 thead th",	".memberTbl thead th",	".conditionArea>ul>li"	);	for (var i=0; i< firstClassArr.length ;i++ ){		$(firstClassArr[i]+":first-child").addClass("first-child");	}}/* 스크립트 호출 */$(document).ready(function() {	firstCheck(".registerArea li", 3);});// first line예외처리(블럭ID, 태그네임, 처리할 아이템 갯수) // 아이템번호는 0번부터 반환function firstCheck(El, Num){	var itemNum = Num;	var el = $(El);	for(i=0; i<itemNum; i++){		el.eq(i).addClass("first-line");	}}$(document).ready(function(){	lineFirst("#searchEvent ul li",3);});/* line-first */function lineFirst(selectEl,num){	var lineFirstArr = $(selectEl);	var lineNum = num;	for (var i=0; i<lineFirstArr.length; i++ ){		if(i%lineNum==0){			$(lineFirstArr[i]).addClass("line-first");		} else {		}	}}/* input 박스 value값 change */$(document).ready(function(){	$("input.text[value$=검색할 단어를 입력 해 주세요]").one('click', function(){		$(this).attr("value","");	});});//팝업띄우기function openPop(url,idn,intWidth,intHeight,scroll) {	//alert("pop_scroll");	window.open(url, idn,"width="+intWidth+", height="+intHeight+",resizable=0,scrollbars="+scroll) ;}/* Global Navigation Bar */$(document).ready(function() {	$("#topNavi>li").bind({		mouseover: function() {			$("#topNavi>li").contents("ul").hide();			$(this).contents("ul").show();			$(this).contents("ul").css("z-index", "15");		},		mouseout: function(){			$(this).contents("ul").hide();			$(this).contents("ul").css("z-index", "");		},		keyup: function(){			$(this).contents("ul").show();			$(this).contents("ul").css("z-index", "15");			$(this).prev().contents("ul").hide();			$(this).prev().contents("ul").css("z-index", "");			$(this).next().contents("ul").hide();			$(this).next().contents("ul").css("z-index", "");			$("#secNavi li").contents("ul").hide();		}	})	$("#secNavi li").keyup(function(){$("#topNavi>li").contents("ul").hide();})	$("#mainVisual").keyup(function(){$("#topNavi>li").contents("ul").hide();})	$("#topLink li").keyup(function(){$("#topNavi>li").contents("ul").hide();})});/* Table background Style */$(document).ready(function(){	$(".tblType1 tbody tr:odd").css('background','#fafafa');	$(".memberlType1 tbody tr:odd").css('background','#fafafa');	$(".projectArea li:odd").css('textAlign','right');	$(".imgListType1 li:even").css('background','#fafafa');	$(".imgListType2 li:even").css('background','#fafafa');});/* 달력 */$(document).ready(function(){	$(".tbwType1 .calenderBtn").click(function(){		$("#calendar").css('left','450px');	});	$(".tbwType1 .calenderBtn:first").click(function(){		$("#calendar").css('left','264px');	});});/* tab Style */function tabCheck(dotabid, num){		var inum=parseInt(num)-1;		var linkTab=document.getElementById(dotabid).getElementsByTagName("a");		for (i=0;i<linkTab.length;i++) {			var tabimg = linkTab.item(i).getElementsByTagName("img").item(0);			var  tabContents= document.getElementById(dotabid+(1+i));			if (i==inum) {				if(tabContents.style.display!="block"){					tabimg.src=tabimg.src.replace(".gif", "on.gif");					tabContents.style.display="block";				}		}else{			tabimg.src=tabimg.src.replace("on.gif", ".gif");			tabContents.style.display="none";		}	}}/* 의원소개 */$(document).ready(function(){	var currentPosition = 0;	var slideWidth = 62;	var slides = $('.councillorList ul li');	var numberOfSlides = slides.length;	$('.councillorList ul').wrapAll('<div id="slideInner"></div>')	.css({		'float' : 'left',		'position' : 'relative',		'width' : slideWidth	});	$('.councillorList').css('overflowX', 'hidden');	$('.councillorList').css('height', '70px');	$('.councillorList ul').css('width', slideWidth * numberOfSlides);	$('.councillorList')		.prepend('<a href="#prev" id="prevBtn" class="btn"><img src="/images/common/btn/btn_prev2.gif" alt="이전" /></a>')		.append('<a href="#Next" id="nextBtn" class="btn"><img src="/images/common/btn/btn_next2.gif" alt="다음" /></a>');	manageControls(currentPosition);	$('.btn')		.bind('click', function(){		currentPosition = ($(this).attr('id')=='nextBtn') ? currentPosition+1 : currentPosition-1;		manageControls(currentPosition);		$('.councillorList ul').animate({		'marginLeft' : slideWidth*(-currentPosition)		});		return false;	});	function manageControls(position){		if(position==0){ $('#prevBtn').hide() } else{ $('#prevBtn').show() }		if(position==numberOfSlides-1){ $('#nextBtn').hide() } else{ $('#nextBtn').show() }	}});
