$(document).ready(function () {	
	$('#navigation>ul>li>a>span, .lv2').hover(
		function () {
			$(this).closest('li').find('ul').show();
		},
		function () {
			$(this).closest('li').find('ul').hide();
		}
	);
});

/* old code for the menu.


var navDelayFadeIn = 350;
var navDelayFadeOut = 200;
var elMenuOpen = null;

$('ul.lv2').each(function(){
	var elThis = $(this);
	$(this).hide();

	$(this).parent().find('a.lv1').hover(function(){
		$(elThis).fadeIn(navDelayFadeIn);
		elMenuOpen = elThis;
	},function(){});

	$(this).hover(function(){},function(){
		$(elThis).fadeOut(navDelayFadeOut);
		elMenuOpen = null;
	});
	
});

var modif_wrapper_width = false;
function wrapper_width(){
	var min_wrapper_width = 980;
	var wrapper_width = $('body').width();
	if(wrapper_width < min_wrapper_width){
		$('#wrapper').width(min_wrapper_width);
		modif_wrapper_width = true;
	}else{
		if(modif_wrapper_width == true){
			$('#wrapper').css({width: '100%'});
			modif_wrapper_width = false;
		}
	}
}
wrapper_width();

function windowOnResize(){
	wrapper_width();
}

var resizeTimer = null;
$(window).bind('resize', function() {
	if (resizeTimer) clearTimeout(resizeTimer);
	resizeTimer = setTimeout(windowOnResize, 100);
});

runOnLoad(function(){
	$('#content').hover(function(){
		if(elMenuOpen != null){
			$(elMenuOpen).fadeOut(navDelayFadeOut);
			elMenuOpen = null;
		}		
	},function(){});
});
*/
