var lastFocus = "";
function getFocusBorder(elt) {
	if(lastFocus != ""){
		lastFocus.style.border='1px solid #e2e4dd';
	}
	elt.style.border='1px solid #e2007a';
	lastFocus = elt;
}

var obj = null;
var enCours = false;

$(document).ready(function() {
	// Sous menu
	$('#nav > li').hover(function() {		  
		$(this).find('ul').stop(true, true);
		if (obj) {
			obj.find('ul').hide();
			obj = null;
		}
		$(this).find('ul').show();
	}, function() {
		obj = $(this);
		obj.find('ul').hide();
	});

	$('a[href*=#]')
    .not('a[href=#]')
    .bind('click', function() {
      if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
        var $target = $(this.hash);
        $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
        if ($target.length) {
          var targetOffset = $target.offset().top;
          $('html,body').animate({scrollTop: targetOffset}, "normal");

          return false;
        }
      }});


});



