document.observe("dom:loaded", function() {
		
		$$('.calendar_grid td.events ol').each(function(el){
		
			//setup the event handler when a user mouses over the td
			el.up().observe('mouseover', function(event){
				this.addClassName('mouseover');
			});
			
			// hide the dates when the user mouses out
			el.up().observe('mouseout', function(event){
				this.removeClassName('mouseover');
			});
		});
		
		$$('ul#fixturesteaser-links li a').each(function(element)
		{
			element.onclick = function()
			{
				var id = this.className;
				
				// Hide all elements
				for (var i = 0; $('fixturesteaser-' + i); i++)
				{
					$('fixturesteaser-' + i).hide();
				}
				
				
				// Remove select class from all li elements and then assign it to the selected one.
				$$('ul#fixturesteaser-links li').each(function(element)
				{
					element.removeClassName('selected');
				})
				this.parentNode.addClassName('selected');
				
				
				// Show the select element
				$(id).show();
				
				return false;
			}
		});

	});


