var obj = null;

function checkHover() {
	if (obj) {
		obj.find('ul').css("display", "none");
	} //if
} //checkHover

$(document).ready(function() {
	$('#Nav > li').hover(function() {
		if (obj) {
			obj.find('ul').css("display", "none");
			obj = null;
		} //if
		
		$(this).find('ul').css("display", "block");
	}, function() {
		obj = $(this);
		setTimeout(
			"checkHover()",
			0); // si vous souhaitez retarder la disparition, c'est ici
	});
	$('#slider_caroussel').cycle({ 
		fx:    'fade', 
		speed:  'fast', 
    	timeout: 4000,
		pager:  '#menu_caroussel',
		pagerAnchorBuilder: function (idx, slide) {
        	var $limit = 25;                // The number of characters to show
        	var $str = slide.title;// Getting the text
			var $strLength = $str.length;
        	if($strLength >= $limit){
				var $strtemp = $str.substr(0,$limit);   // Get the visible part of the string
        		$str = $strtemp + '';  // Recompose the string with the span tag wrapped around the hidden part of it
			}
			
        return '<a href="" class="">'+$str.toUpperCase()+'</a>';
		}
    });
	
});	
