// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
window.onload = function() {
	$$("#mainnav li").each(function(node){
		var ul = node.down('ul');
		if (ul != null) {
			node.onmouseover = node.onmouseout = function(){
				Element.toggle(ul);
			}
			dropdownItems = node.descendants();
			if (dropdownItems != null) {
				dropdownItems.onmouseover = function(){
					Element.show(ul);
				}
			}
		}
	});
}