
/**************************************************
* smart rollover
**************************************************/
function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}



/**************************************************
* window pop up
**************************************************/
$(function() {
	$(".popup").click(function(){
		window.open(this.href, "WindowName","width=640,height=650,resizable=yes,scrollbars=yes");
		return false;
	});
});

$(function() {
	$(".popup02").click(function(){
		window.open(this.href, "WindowName","width=1000,height=600,toolbar=1,resizable=yes,scrollbars=yes");
		return false;
	});
});

$(function() {
	$(".popup03").click(function(){
		window.open(this.href, "WindowName","width=850,height=660,resizable=yes,scrollbars=yes");
		return false;
	});
});




/**************************************************
* css for last element
**************************************************/
$(function(){
	$("#hNavi li:last-child").css("background", "none");
	$("#footer li:last-child").css("margin", "0");
	$("#bnrList li:last-child").css("margin", "0");
	$("#campaignBox .campaignList:last").css({background:"none", margin:"0", padding:"0"});
	$("#infoBox dd:last-child").css({background:"none", margin:"0", padding:"0"});
	$("#bnrList li:last-child").css({margin:"0"});
	$("#groupSite li:last-child").css({margin:"0"});
	$("dl.porList dd:last-child").css({margin:"0"});
	$("dl#polList dd:last-child").css({margin:"0"});
	$("ul.searchNavi:first").css({margin:"0 0 35px 0"});
	$("ul.searchNavi li:last-child").css({margin:"0"});
	$("ul#planList li:last-child").css({margin:"0"});
	$("#ashitaBox02 ul.list li:last-child").css({margin:"0"});
	$(".ashitaBox03 ul.list li:last-child").css({margin:"0"});
	$("ul#planList02Cap li:last-child").css({padding:"0 0 0 0.8em", textIndent:"-0.8em"});
	$("#pBnrList li:last-child").css({margin:"0"});
	$("#document03 li:last-child").css({margin:"0"});
	$("#document04 li:last-child").css({margin:"0"});
	$("#csdBox li:last-child").css({margin:"0"});
	$("ul#cspList li:last-child").css({background:"none", margin:"0", padding:"0 2px"});
	$("#qaNavi li:last-child").css({margin:"0"});
	$(".qaBox dl:last").css({margin:"0"});
	$(".iBox:last").css({margin:"-5px 0 40px 0"});
	$("dl#apply dd:last-child").css({margin:"0 0 30px -5px"});
	$(".olBox02:last").css({margin:"0"});
	$(".meritBox:odd").css({margin:"0 0 20px 0"});
	$("#cInfo li:last-child").css({background:"none"});
});



