code: function(pos, method, onComplete) {
            var Geom = this.geom, Plot = this.fx, that = this;
            if(!Plot.busy) {
                Plot.busy = true;
                this.contract({
                    onComplete: function() {
                        Geom.switchOrientation(pos);
                        that.compute('end', false);
                        Plot.busy = false;
                        if(method == 'animate') {
                      	  that.onClick(that.clickedNode.id, onComplete);  
                        } else if(method == 'replot') {
                      	  that.select(that.clickedNode.id, onComplete);
                        }
                    }
                }, pos);
            }
          }
docs: /*
  Method: switchPosition
  
  Switches the tree orientation.
  
  Parameters:
  
  pos - (string) The new tree orientation. Possible values are "top", "left", "right" and "bottom".
  method - (string) Set this to "animate" if you want to animate the tree when switching 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.switchPosition("right", "animate", {
  onComplete: function() {
  alert('completed!');
  }
  });
  (end code)