/**
 * FRONT-OFFICE script for horizontal menu navigation.
 *
 * Requires Prototype 1.6.
 */


/**
 * Show/hide submenu items on mouseover/mouseout
 */
function bindHorizontalMenu() {
	var menu = $('menuHorizontal');
	if (!menu) return;
	menu.childElements().each(function(li) {
		var ul = li.down('ul');
		if (ul) {
			li.observe('mouseover', function(e) { ul.show(); });
			li.observe('mouseout', function(e) { ul.hide(); });
		}
	});
} // bindMainMenu

document.observe('dom:loaded', function() {
	bindHorizontalMenu();
});
