$().ready(function() {	
        // menu
        $("#tree").treeview({
            collapsed: true,
            animated: "medium",
            control:"#sidetreecontrol",
            persist: "location"
        });		
        
        $("#sidetree").show('fast');
        
         //fonction pour vider tous les champs
        $.fn.clearForm = function() {
          return this.each(function() {
         var type = this.type, tag = this.tagName.toLowerCase();
         if (tag == 'form')
           return $(':input',this).clearForm();
         if (type == 'text' || type == 'password' || tag == 'textarea')
           this.value = '';
         else if (type == 'checkbox' || type == 'radio')
           this.checked = false;
         else if (tag == 'select')
           this.selectedIndex = -1;
          });
        };
        
        
        // rollovers
        /*
		$("#nav img").each(function() {
			// on garde la source originale
			rollsrc = $(this).attr("src");
			// on remplace par src_over
			rollON = rollsrc.replace(/.gif$/ig,"_over.gif");
			$("<img>").attr("src", rollON);
		});
		
		// Navigation rollovers
		$("#nav a").mouseover(function(){
			imgsrc = $(this).children("img").attr("src");
			matches = imgsrc.match(/_over/);
			
			// fait rien si c'est dŽja ˆ ON
			if (!matches) {
			imgsrcON = imgsrc.replace(/.gif$/ig,"_over.gif"); // strip l'extension
			$(this).children("img").attr("src", imgsrcON);
			}
			
		});
		$("#nav a").mouseout(function(){
			$(this).children("img").attr("src", imgsrc);
		});
	    */

	     
});
