$(document).ready( function() {
	set_day_hover();
});

function set_day_hover() {
	$('.Calendar1 td .day').hover( function() {
		var day = $(this).find('a:eq(0)');
		var offset = $(this).offset();
		offset.top += 30;
		$('#fix').show().offset(offset).html( $(this).children('.popup').html() );
		$('#fix').unbind('mouseenter').unbind('mouseleave'); // so arrows don't show on other days
		$('#fix').hover(
			function() {
				day.addClass('over');
				$(this).show();
			},
			function() {
				day.removeClass('over')
				$(this).hide();
			}
		);
	}, function() {
		$('#fix').hide();
	});
}
