$(function() {

/* Pour les anchors. Ca fait plus smooth */
    $('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;
                $('html,body').animate({scrollTop: targetOffset}, 1000);
                return false;
                }
            }
      }); 
      
/* Le menu de gauche ( claque sur http://www.vimeo.com/116991 */

		$("#menu dd").not("dd.on").hide();
		$("#menu dt a").not(".direct5,.direct7").click(function(){
            $("#menu dd:visible").slideUp("fast"); /* Remonte tout ce qui est descendu */
			$(this).parent().next().not("dd:visible").slideToggle('fast'); /* Descend le sous menu */
			return false;
		});

/* Ajout d un comportement thickbox au document embedés aux articles */
$('dl.spip_documents.thickbox * a').addClass('thickbox');
TB_init('dl.spip_documents.thickbox * a.thickbox');

}); 