	function imgRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("__roll."))
			{
				images[i].onmouseover = function() {
					if(this.getAttribute("className")!="noroll" && this.getAttribute("class")!="noroll"){
						this.setAttribute("src", this.getAttribute("src").replace("__roll.", "__rollon."));
					}
				}
				images[i].onmouseout = function() {
					if(this.getAttribute("className")!="onactive" && this.getAttribute("class")!="onactive"){
						this.setAttribute("src", this.getAttribute("src").replace("__rollon.", "__roll."));
					}
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", imgRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", imgRollover);
}
$(document).ready(function(){
	$("a img").hover(function(){
		if(!$(this).attr('src').match("__roll.")){
			$(this).parent().addClass('a_hover');
			$(this).animate({opacity:0.7},100);
		}
	},
	function(){
		$(this).animate({opacity:1.0},100,function(){$(this).parent().removeClass('a_hover');});
	}
	);
});
function imgActiveChg_with_Category(activeCategory) {
	if(activeCategory == ""){return;}
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match(activeCategory+"__roll."))
			{	
				images[i].setAttribute("src", images[i].getAttribute("src").replace("__roll.", "__rollon."));
				images[i].setAttribute("class", "onactive");
			}
		}
	}
}
if(window.addEventListener) {
	window.addEventListener("load", imgRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", imgRollover);
}
$(document).ready(function(){
	$('a[href*=#]').click(function() {  
		var target = $(this.hash);  
		target = target.length && target;  
		if (target.length) {  
			var sclpos = 30;  
			var scldurat = 1200;  
			var targetOffset = target.offset().top - sclpos;  
			$('html,body')  
				.animate({scrollTop: targetOffset},'slow');  
			return false;  
		}  
	});
	$("a img").hover(function(){
		if(!$(this).attr('src').match("__roll.")){
			$(this).parent().addClass('a_hover');
			$(this).animate({opacity:0.7},100);
		}
	},
	function(){
		$(this).animate({opacity:1.0},100,function(){$(this).parent().removeClass('a_hover');});
	}
	);
});
// newsColumn TabChange
$(function() {
    $("#tabs a[href=#entry]").click(function(event){
		$("#tabs dl[id^=index]").hide();
		$("#index1").fadeIn('slow');
		event.preventDefault();})
    $("#tabs a[href=#event]").click(function(event){
		$("#tabs dl[id^=index]").hide();
		$("#index2").fadeIn('slow');
		event.preventDefault();})
    $("#tabs a[href=#others]").click(function(event){
		$("#tabs dl[id^=index]").hide();
		$("#index3").fadeIn('slow');
		event.preventDefault();})
})
// rollOver Judgment
function imgChange(baseID,imgID){
	var selfImg = document.getElementById(imgID);
	var tag = document.getElementById(baseID);
	var otherImgs = tag.getElementsByTagName("img");
	for(var i = 0; i<otherImgs.length; i++ ){
		if(otherImgs[i].getAttribute("src").match("__roll"))
			{
		otherImgs[i].setAttribute("src", otherImgs[i].getAttribute("src").replace("__roll.", "__roll."));
		otherImgs[i].setAttribute("src", otherImgs[i].getAttribute("src").replace("__rollon.", "__roll."));
		if(otherImgs[i].getAttribute("className") == "onactive") {
		otherImgs[i].setAttribute("className",otherImgs[i].getAttribute("className").replace("onactive","active"));
		} else if(otherImgs[i].getAttribute("class") == "onactive") {
			otherImgs[i].setAttribute("class",otherImgs[i].getAttribute("class").replace("onactive","active"));
		}
	}
	}
	selfImg.setAttribute("src",selfImg.getAttribute("src").replace("__roll.","__rollon."));
	if(selfImg.getAttribute("className") == "active") {
	selfImg.setAttribute("className",selfImg.getAttribute("className").replace("active","onactive"));
	} else if(selfImg.getAttribute("class") == "active") {
	selfImg.setAttribute("class",selfImg.getAttribute("class").replace("active","onactive"));
	}
}
