<!--//
function animated(){
	$(function(){
		var header = $(".sidenav .subnavlevel2");
		var list = $(".sidenav div");
		header.click(function(){
			list.slideUp("medium");
			if($(this).next().css("display") == 'none')
			{	$(this).next().slideDown("medium");	};
			return false;
		});
	});
};

function nonanimated(){
	$(function(){
		var header = $(".sidenav .subnavlevel2");
		var list = $(".sidenav div");
		header.click(function(){
			list.css("display","none");
			$(this).parent("li").children("div").css("display","block");
			return false;
		});
	});
};
	
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //Search :: MSIE x.x
	var ieversion = new Number(RegExp.$1) // Store version number if found
	if(ieversion >= 7){	animated();	}else{	if (window.attachEvent) window.attachEvent("onload", nonanimated);	}
}else if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //If not IE then search :: Firefox/x.x
	var ffversion = new Number(RegExp.$1) // Store version number if found
	if(ffversion >= 2){	animated();	}else{	if (window.attachEvent) window.attachEvent("onload", nonanimated);	}
}else if (/Safari[\/\s](\d+\.\d+)/.test(navigator.userAgent)){
	animated();
}else{
	//not IE or Firefox, start Non Animated menu
	if (window.attachEvent) {window.attachEvent("onload", nonanimated);}
	else if (window.addEventListener) {window.addEventListener("load", nonanimated, false);}
	else {document.addEventListener("load", nonanimated, false);}
};
//-->