// this function preserves the menu hover, while you hover its siblings(submenus) as it looses focus and looks normal
function preserveHoverState() {
	menu = document.getElementById('menu-wrapper');
	var listElementParents = menu.getElementsByTagName('li')
	for (i=0; i<listElementParents.length; i++) {
		current = listElementParents[i];
		if(current.className.indexOf('parent') != -1) {
			current.onmouseover = function() {
				this.className += ' selected';
			}
			current.onmouseout = function() {
				this.className = this.className.replace(' selected', '');
			}
		}
	}
}
function init() {
	preserveHoverState();
}
window.onload = init;