code: function(li) {
        
        var isExpanded = Dom.hasClass(li, 'expanded');
        Dom.replaceClass(li, isExpanded ? 'expanded' : 'collapsed' , isExpanded ? 'collapsed':'expanded');
  
        var h = this.hash[li.id];
  
        if(isExpanded) {
           // hide the sub-branch
           h.expanded.style.display = 'none';
        }
        else {
           if(h.expanded === false) {
              // generate the sub-branch
              h.expanded = this.buildBranch(h.value, li);
           }
           // show the sub-branch
           h.expanded.style.display = '';
        }
     }
docs: expand the node given the li element