$(function() {
	// get the current datetime
	var date = new Date();
	
	// create the default string and append it
	var month = String(date.getMonth()+1);	//FORCE VAR TO BE STRING IN CASE LEADING 0 IS NEEDED
	var day = String(date.getDate());				//FORCE VAR TO BE STRING IN CASE LEADING 0 IS NEEDED
	var year = String(date.getFullYear()).substring(2);	//ONLY GET LAST 2 DIGITS
	
	if (month.length < 2) { month = "0" + month; }	//ADD LEADING 0 TO MONTH IF SINGLE DIGIT
	if (day.length < 2) { day = "0" + day; }	//ADD LEADING 0 TO DAY IF SINGLE DIGIT
	var dateString = month + "/" + day + "/" + year;	//CREATE FULL DATE
	
	$("#datebox").attr("value",dateString);
	
	// find today's date and subtract one so we can click it
	date.setDate(date.getDate()-1);
	
	// fire off the calendar with all the appropriate  switches
	$("#datebox").datepicker({showOn:'focus', buttonText: '', speed: '', closeAtTop: false, useShortYear: true, showOtherMonths: true, changeMonth: false, changeYear: false, minDate: date, currentText: "Today"});
});