function parseNavigation(id) {
	$("#"+id+" li").each(function(){
		if ($('ul',this).length != 0) {
			$(this).addClass("hassub");
						
			$(this).bind("mouseover",function(){
				$(this).addClass("hover");
				$("ul:first",this).addClass("over");
			})
			//si c'est ie on utilise mouseleave pour eviter le flickering
			if (brows.indexOf("microsoft") != -1 || brows.indexOf("msie") != -1) {
				$(this).bind("mouseleave",function(){
					$(this).removeClass("hover");
					$("ul:first",this).removeClass("over");
				})
			} else {
				$(this).bind("mouseout",function(){
					$(this).removeClass("hover");
					$("ul:first",this).removeClass("over");
				})
			}
		} else {
			this.onmouseover = function() {	$(this).addClass("hover"); }
			
			//si c'est ie on utilise mouseleave pour eviter le flickering
			if (brows.indexOf("microsoft") != -1 || brows.indexOf("msie") != -1) {
				this.onmouseleave = function() { $(this).removeClass("hover"); }
			} else {
			 	this.onmouseout = function() {	$(this).removeClass("hover"); }
			}
		}
	});
}

$(function(){
	brows = navigator.appName.toLowerCase();
	parseNavigation("nav");
	parseNavigation("docs");
	
});


