/**
 * whats_on_dropdown.js
 * JavaScript to make the What's On dropdown menu work
 * @author Luke Sneeringer
 * @author Copyright 2007, Live Oak Interactive
 */
//addEvent(window, 'DOMContentLoaded', function() {
Event.observe(document, 'dom:loaded', function() {
	// show the menu when the user mouses over the What's On button
	if ($('nav_whats_on')) {
		Event.observe($('nav_whats_on'), 'mouseover', function(ev) {
			$('wo_link').style.backgroundPosition = '0px -20px';
			$('nav_whats_on_dropdown').style.display = 'block';
		});

		// hide the menu when the user mouses off of the What's On button
		Event.observe($('nav_whats_on'), 'mouseout', function(ev) {
			$('wo_link').style.backgroundPosition = '0px 0px';
			$('nav_whats_on_dropdown').style.display = 'none';
		});
	}

	// make the search button work
	if ($('main_search_button')) {
		Event.observe($('main_search_button'), 'click', function(ev) {
			$('main_search_form').submit();
			Event.stop(ev);
		});
	}
});