$(document).ready(function(){var today=new Date();var maxville=new Date(2012,7,3,8,30);if(today.getMonth()==7&&maxville<today)
{console.log(today.getMonth());$("div#MaxvilleCounter div#Counter").html("<h3>Maxville is here!</h3>");}
else{maxville.setFullYear(2012,7,3);$("div#MaxvilleCounter div#Counter").countdown({until:maxville});}
$("div#MaxvilleCounter span#Date").html(maxville.dayOfWeek()+", "+
maxville.getDate()+" "+
maxville.getMonthName()+" "+
maxville.getFullYear()+", "+
maxville.getHours()+":"+maxville.getMinutes()+" "+maxville.timeOfDay());});Date.prototype.setLastDay=function(Day){var lastDay=this.daysInMonth();do
{this.setDate(lastDay);if(this.getDay()!=Day)
{lastDay--;}}while(this.getDay()!=Day);};Date.prototype.dayOfWeek=function()
{var days=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];return days[this.getDay()];};Date.prototype.getMonthName=function()
{var months=["January","February","March","April","May","June","July","August","September","October","November","December"];return months[this.getMonth()];};Date.prototype.timeOfDay=function()
{if(this.getHours()>=12){return"PM";}
else{return"AM";}};Date.prototype.daysInMonth=function()
{return 32-new Date(this.getFullYear(),this.getMonth(),32).getDate();};

