if(location.protocol == "https:"){
	document.write('<script type="text/javascript" src="https://secure138.chicappa.jp/chicappa.jp-webridge-kagawa/cssnite/shared/js/yuga.js"></script>');
} else{
	document.write('<script type="text/javascript" src="/shared/js/yuga.js"></script>');
}

//----------------------------------------------
// countdown
//----------------------------------------------
function xDay(y,m,d) { 
	today = new Date(); xday = new Date(y,m-1,d);
	dayMS = 24*60*60*1000; 
	n =	Math.floor((xday.getTime()-today.getTime())/dayMS)+1; 
	if(n<1){ n = 0; }
	n += ""; 
	if(location.protocol == "https:"){
		sslPath = "https://secure138.chicappa.jp/chicappa.jp-webridge-kagawa/cssnite";
	} else{
		sslPath = "";
	}
	for	(i=0; i<n.length; i++) {
		document.write('<img src="'+sslPath+'/shared/img/img-countdown-'+n.charAt(i)+'.gif" alt="' + n.charAt(i) + '" width="40" height="60" />'); 
	}
}

//--------------------------
//SmartRollover
//--------------------------
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);
}

//-------------------------
$(function(){
	$("#archives li:last-child").addClass("last-child");
	$(".faq dd:last-child").addClass("last-child");
});
