$(function(){
	
	var note = $('#note'),
		ts = new Date(2012, 0, 19, 21),
		newYear = true;
	
	if((new Date()) > ts){
		// The new year is here! Count towards something else.
		// Notice the *1000 at the end - time must be in milliseconds
		ts = (new Date()).getTime() + 10*24*60*60*1000;
		newYear = false;
	}
		
	$('#countdown').countdown({
		timestamp	: ts,
		callback	: function(days, hours, minutes, seconds){
			
			var message = "";
			
			message += "<span class='unit'>DAY" + ( days==1 ? '':'S' ) + "</span> ";
			message += "<span class='unit'>HR" + ( hours==1 ? '':'S' ) + "</span> ";
			message += "<span class='unit'>MIN" + ( minutes==1 ? '':'S' ) + "</span> ";
			message += "<span class='unit'>SEC" + ( seconds==1 ? '':'S' )+ "</span> ";
			

			
			note.html(message);
		}
	});
	
});

