document.observe("dom:loaded", function() {
  if ($('flash')!=null) {
    Element.hide.delay(5, "flash");
  }

	var navEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<(navEls.length); i++) {
		navEls[i].onmouseover=function() {
			this.className += " hover";
		}
		navEls[i].onmouseout=function() {
//			this.className = this.className.replace(new RegExp('hover\\b'), ''));
			this.className = this.className.replace('hover', '');
		}
	}
});
