var $j = jQuery.noConflict();
/*
$j(document).ready(function() {
	$j("ul#mainNav li").hover(
		function () {
			var ul = $j(this).children('.sublevel');
			if(ul && ul.css('display') == 'none') {
				ul.slideToggle(400);
				//ul.css({'display' : 'block'});
				window.setTimeout(function() {}, 400);
			}
		},
	
		function () {
			var ul = $j(this).children('.sublevel');
			if(ul) {
				//window.setTimeout(function() {ul.css({'display' : 'none'});}, 50);
				ul.css({'display' : 'none'});
			}
		}
	); 
});
*/

/*
addNaviHover = function() {
	var lisAll = $$('#mainNav li');
	var allULs = $$('#mainNav .sublevel');
	for(i=0; i < lisAll.length; i++) {
		li = lisAll[i];
		Event.observe(li, 'mouseover', function(event){
			hideElements(this, allULs);
			ul = this.descendants()[2];
			if(ul && ul.getStyle('display') == 'none'){
				Effect.BlindDown(ul, { duration: 0.4 });
				window.setTimeout(function() {ul.setStyle({height: 'auto', display: 'block'});}, 400);
				//ul.setStyle({display: 'block', height: 'auto', overflow: 'visible'});
				this.setStyle({display: 'block'});
			} 
		});
	}
}

hideElements = function(hoverElement, allULs) {
	ul = hoverElement.descendants()[2];
	for(j=0; j < allULs.length; j++) {
		if(allULs[j].getStyle('display') != 'none') {
			if(ul != allULs[j]) {
				if(allULs[j] == hoverElement.ancestors()[0] || allULs[j] == hoverElement.ancestors()[0].ancestors()[0].ancestors()[0]) {
					break;
				}
				
				allULs[j].setStyle({display: 'none', overflow: 'hidden'});
			}
		}
	}
}
*/
//document.observe("dom:loaded", addNaviHover); 
