
function getTime() {
now = new Date();

//ENTER BELOW THE DATE YOU WISH TO COUNTDOWN TO
later = new Date("September 11 2011 08:00:00");
if (now > later)
{
	$("#sub-column").
		css({height:400});
//, 'background-image':'url(images/wrap-bgpr.jpg)'	
	$("#registration-button").children('a').children('img').attr('src', 'images/results-button.jpg');
	$("#registration-button").children('a').attr('href', 'results.html').attr('alt', 'Results Here').removeAttr('target');
	$("#countdown").html('Results Are Available').attr('class', 'main-column-title-1').css('color', 'black');
	$("#main-menu").find('a.registration').html('Results').css('background-image','url(images/main-menu-res.jpg)').attr('href','results.html');
	if (document.title == 'New Albany Walking Classic')
	{
		$("#main-column").append('<p><span class="main-column-title-1">Free Race Photo</span></p><p class="no-lineheight">Full resolution digital race images will be available to New Albany Walk participants for FREE DOWNLOAD at Fairfield Photography (<a target="_blank" href="http://www.FairfieldPhoto.com">www.FairfieldPhoto.com</a>) shortly after the race.  These digital images can be downloaded and printed for personal use and are just one more great benefit of participating in this year&#39;s walk.  Prints and other specialty products can be ordered from Fairfield Photography as well.  The free downloadable images will be online for 60 days after the race.</p><p class="no-lineheight">Race images will be organized by racer name where a race number can be seen, so be sure to have your race number visible on the front of your clothing so the photographers can get your photo near the finish line."</p><p class="no-lineheight"><a target="_blank" href="http://www.FairfieldPhoto.com"><img border=0 src="images/fairfield.jpg" /></a></p>');
	}
	if (document.title == 'New Albany Walking Classic | Results Information')
	{
		$("#main-column").append('<p><span class="main-column-title-1">Free Race Photo</span></p><p class="no-lineheight">FREE downloadable race photos are available by visiting at Fairfield Photography (<a target="_blank" href="http://www.FairfieldPhoto.com">www.FairfieldPhoto.com</a>)</p><p class="no-lineheight"><a target="_blank" href="http://www.FairfieldPhoto.com"><img border=0 src="images/fairfield.jpg" /></a></p>');
	}
}
else
{

days = (later - now) / 1000 / 60 / 60 / 24;
daysRound = Math.floor(days);
hours = (later - now) / 1000 / 60 / 60 - (24 * daysRound);
hoursRound = Math.floor(hours);
minutes = (later - now) / 1000 /60 - (24 * 60 * daysRound) - (60 * hoursRound);
minutesRound = Math.floor(minutes);
seconds = (later - now) / 1000 - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound);
secondsRound = Math.round(seconds);

//background-position: -10px 0px;

if (secondsRound <= 9) {
$("#g").css('background-position','0px 0px');
$("#h").css('background-position','-'+secondsRound+'0px 0px'); 
}
else {
$("#g").css('background-position','-'+Math.floor(secondsRound/10)+'0px 0px');
$("#h").css('background-position','-'+secondsRound%10+'0px 0px'); 
}
if (minutesRound <= 9) {
	$("#d").css('background-position','0px 0px');
	$("#e").css('background-position','-'+minutesRound+'0px 0px');
}
else {
	$("#d").css('background-position','-'+Math.floor(minutesRound/10)+'0px 0px');
	$("#e").css('background-position','-'+minutesRound%10+'0px 0px');
}
if (hoursRound <= 9) {
	$("#y").css('background-position','0px 0px');
	$("#z").css('background-position','-'+hoursRound+'0px 0px');
}
else {
	$("#y").css('background-position','-'+Math.floor(hoursRound/10)+'0px 0px');
	$("#z").css('background-position','-'+hoursRound%10+'0px 0px');
}
if (daysRound <= 9) {
$("#x").css('background-position','0px 0px');
$("#a").css('background-position','0px 0px');
$("#b").css('background-position','-'+daysRound+'0px 0px');
}
else if (daysRound <= 99) {
	$("#x").css('background-position','0px 0px');
$("#a").css('background-position','-'+Math.floor((daysRound/10)%10)+'0px 0px');
$("#b").css('background-position','-'+Math.floor(daysRound%10)+'0px 0px');
}
else {
	$("#x").css('background-position','-'+Math.floor(daysRound/100)+'0px 0px');
	$("#a").css('background-position','-'+Math.floor((daysRound/10)%10)+'0px 0px');
	$("#b").css('background-position','-'+Math.floor(daysRound%10)+'0px 0px');
}
if((jQuery.browser.msie == 'true') && (jQuery.browser.version == '6.0'))
{
	$("#g").remove();
	$("#h").remove();
	$("img[name=i]").remove();
	newtime = window.setTimeout("getTime();", 60000);
}
else newtime = window.setTimeout("getTime();", 1000);
}
}

        $("document").ready(function(){
            getTime();
            $("#navigation > li:last").addClass("endnav");
//              $(".nav").superfish({
//                    delay		: 400,
//                    animation	: {opacity:"show",height:"show"},
//                    speed		: "fast"
//                });
//                $('#gallery').innerfade({ 
//                animationtype: 'fade', 
//                speed: 2000, 
//                type:'random',
//                timeout: 10000, 
//                containerheight: '248px' 
//                 });	
//	     	$('img[@src$=.png], div#header, a.guitar, div.swirl1, div.swirl2, a.guitar').ifixpng();  
			$("h1:empty, h2:empty, h3:empty, h4:empty, h5:empty, h6:empty").remove();
        });
