
$(window).load(function() { $('#slider').nivoSlider({controlNav: false, effect: 'fade', pauseTime: 5000, directionNavHide: false}); });
$(function(){
  Validation.ActivateErrorLookup();
  $('a[href*=#]').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 - 150; /* on soustrait la hauteur du header */
        $('html,body').animate({scrollTop: targetOffset}, 1000);
        _gaq.push(['_trackPageview', '/' + this.hash]);
        return false;
      }
    }
  });
  $('#bouton-formulaire').click(function() {
    return Validation.CheckForm('#formulaire');
  });
});
