// JavaScript Document

function countDownText(uniDateStamp){
	var now = new Date();
	now.setTime(uniDateStamp);
	var monthday = now.getDate();
	rv = 20 - monthday; 
	if(rv >= 2)return rv + " Days ";
	//return rv + " Day Left";
}
  function printCountDown(milisecsTo){
	secs = parseInt((milisecsTo / 1000));
	mins = parseInt((secs / 60));
	hours = parseInt(mins / 60);
	rv =  hours + ":";
	rv += ((mins % 60 + "").length == 2 ?  mins % 60 : "0" + mins % 60) + ":";
	rv += ((secs % 60 + "").length == 2 ?  secs % 60 : "0" + secs % 60);
	return rv;
}

function updateTimer(countDownMillis){
	if(countDownMillis >= 0 ){
		//if(countDownMillis / 1000 % 60 == 0)
		$("#topBannerMessage .countdownText").html(printCountDown(countDownMillis) + " Left");
	}/*else{
		$("#topBannerMessage .countdownText").html("Shipping Closed").siblings(".countdownText2").html("All orders will be shipped after we reopen.");
		$("p.timerTime").removeClass("timerTime").addClass("overTime");
	}*/
}
