function bookingCalendarBind() {
	var theDate = new Date();
	
	$("#bookingcalendar").removeClass("bcloading");
	
	$("#bookboxleft table td a").click(function() {
		$("#bookingcalendar table td a").removeClass("selecteddate");
		$(this).addClass("selecteddate");
	
		$.get($(this).attr("href") + "&js=1&r=" + theDate.getTime(),function(responseText) {
			$("#bookingcalendar").addClass("bcloading").load(responseText,bookingCalendarBind);
		});
		
		return false;
	});
	
	$("#bookingcalendar table caption a").click(function() {
		$("#bookingcalendar").addClass("bcloading").load("inc_availability.asp?" + $(this).attr("rel") + "&r=" + theDate.getTime(),bookingCalendarBind);
		return false;
	});
}

$(document).ready(function() {
	// APPLY LINKS TO BOOKING CALENDAR STUFFS
	bookingCalendarBind();
});
