/*
	Rutgers University Student Assembly Calendar Javascript Functions
	Created by Rohit Sodhia
*/

function revealInfoDiv() {
	var location = $(this).position();
	$('#infoDiv').mouseover(keepInfoDiv).mouseout(hideInfoDiv).css(
		{
			top: (location['top'] + ($(this).outerHeight() / 2) + 15) + "px",
			left: (location['left'] + ($(this).outerWidth() / 2) + 15) + "px"
		}
	);
	
	var date = new Date(this.id.substring(4,8), this.id.substring(0,2) - 1, this.id.substring(2,4));
	$("#infoDivTitle").html(date.getDayName() + " " + date.getMonthName() + " " + date.getDate() + ", " + date.getFullYear());
	
	setEvents(this.id);
	$('#infoDiv').show();
}

function keepInfoDiv() {
	$(this).show();
}

function hideInfoDiv() {
	$('#infoDiv').hide();
}