code: function(align, method, onComplete) {
          this.config.align = align;
          if(method == 'animate') {
          	this.select(this.clickedNode.id, onComplete);
          } else if(method == 'replot') {
          	this.onClick(this.clickedNode.id, onComplete);	
          }
         }
docs: /*
  Method: switchAlignment
  
  Switches the tree alignment.
  
  Parameters:
  
  align - (string) The new tree alignment. Possible values are "left", "center" and "right".
  method - (string) Set this to "animate" if you want to animate the tree after aligning its position. You can also set this parameter to "replot" to just replot the subtree.
  onComplete - (optional|object) This callback is called once the "switching" animation is complete.
  
  Example:
  
  (start code js)
  st.switchAlignment("right", "animate", {
  onComplete: function() {
  alert('completed!');
  }
  });
  (end code)