$(document).ready(function(){

	var nowdate = new Date();
	var year = nowdate.getFullYear(); // 年 
	var mon  = nowdate.getMonth() + 1; // 月 
	var date = nowdate.getDate(); // 日 

	$("#Info [setdate]").each(function(){
		if($(this).attr("setdate") != ""){
			var splitdate = $(this).attr("setdate").split("/");
			var targetdate = new Date(splitdate[0], splitdate[1]-1, splitdate[2]);
			var todaydate = new Date(year, mon-1, date);
			//過去掲載日付による書式変更
			setpattern(this,targetdate,todaydate);
		}
	});
});

//過去掲載日付による書式変更
function setpattern(settarget,targetdate,todaydate){
	if(targetdate >= todaydate){
		//過去掲載にする日付 <= 今日日付
		$(settarget).find("[name='topic_exp']").append('<img src="./images/common/new.gif"/>');
	}else{
		//過去掲載にする日付 > 今日日付
		$(settarget).find("[class='Dayt']").attr("class","Dayt old");
	}
}

