$(document).ready(function(){
	newAdd();

	$(".roll").mouseover(function(){
		mo = $(this).attr("src");
		$(this).attr("src",$(this).attr("src").replace(/(\.png|\.gif|\.jpg)/, "_on" + "$1"));
	});
	$(".roll").mouseout(function(){
		if(typeof(mo) != "undefined") $(this).attr("src",mo);
	});

$('.eyeCatch').cycle({ 
    fx:     'fade', 
    speed:  'fast', 
    timeout: 3000, 
    next:   '.next', 
    prev:   '.prev' ,
    pause:   1 
});

	$('a[href^="#"]').click(function(){
		$.scrollTo( $($(this).attr("href")), {speed:1000,axis:'y', queue:true} );
		return false;
	});


  });

function newAdd(){
	o = new Date();
	oD = 60 * 60 * 24 * 1000 * 10; //10日とする
	o = o * 1 - oD;

	$(".entryList li").each(function(){
		yy = $(this).find("input").attr("value").substring(0,4);
		mm = Number($(this).find("input").attr("value").substring(4,6)) -1;
		dd =  $(this).find("input").attr("value").substring(6,8);
		
		h = new Date(yy,mm,dd);
		if(o < h * 1) $(this).addClass("new");
		h = new Date(yy,mm,dd);
	});

}


