docs: function(newRoot, p) {
  
              var self = this;
  
              if (document.documentElement.__transition__) return;
  
              // Rescale outside angles to match the new layout.
              var enterArc,
                  exitArc,
                  outsideAngle = d3.scale.linear().domain([0, 2 * Math.PI]);
  
              function insideArc(d) {
                  return p.key > d.key
                      ? {depth: d.depth - 1, x: 0, dx: 0} : p.key < d.key
                      ? {depth: d.depth - 1, x: 2 * Math.PI, dx: 0}
                      : {depth: 0, x: 0, dx: 2 * Math.PI};
              }
  
              function outsideArc(d) {
                  return {
                      depth: d.depth + 1, 
                      x: outsideAngle(d.x), 
                      dx: outsideAngle(d.x + d.dx) - outsideAngle(d.x)
                      };
              }
  
              function arcTween(b) {
                  var i = d3.interpolate(this._current, b);
                  this._current = i(0);
                  return function(t) {
                      return self.arc(i(t));
                  };
              }
  
              self.center.datum(newRoot);
              //console.log("newRoot");
              //console.log(newRoot);
  
              // When zooming in, 
              // arcs enter from the outside and exit to the inside.
              // Entering outside arcs start from the old layout.
              if (newRoot === p) {
                  enterArc = outsideArc;
                  exitArc = insideArc;
                  outsideAngle.range([p.x, p.x + p.dx]);
              }
  
              self.path = self.path.data(self.partition.nodes(newRoot)
                                         .slice(1), function(d) { 
                                             return d.key; 
                                         });
  
              // When zooming out, 
              // arcs enter from the inside and exit to the outside.
              // Exiting outside arcs transition to the new layout.
              if (newRoot !== p) {
                  enterArc = insideArc;
                  exitArc = outsideArc;
                  outsideAngle.range([p.x, p.x + p.dx]);
              }
  
              d3.transition()
                .duration(d3.event.altKey ? 7500 : 750)
                .each(function() {
                    self.path.exit().transition()
                        .style("fill-opacity", function(d) { 
                            return d.depth === 1 + (newRoot === p) ? 
                                   1 : 0;
                        })
                        .attrTween("d", function(d) { 
                            return arcTween.call(this, exitArc(d));
                        })
                        .remove();
  
                    self.path.enter().append("path")
                        .style("fill-opacity", function(d) { 
                            return d.depth === 2 - (newRoot === p) ? 
                                   1 : 0;
                        })
                        .style("fill", function(d) { 
                            return d.fill; 
                        })
                        .on("click", function(d, i) {
                            self.zoomIn(d);
                        })
                        .each(function(d) { 
                            this._current = enterArc(d);
                        });
                    // add the tooltip
                    self.path.append("title")
                        .text(function(d) {
                            return d.name + "\n" + 
                                   self.formatNumber(d.value) + 
                                   " Pageviews\n" +
                                   self.formatPercentage(d.value / self.totalValue) + 
                                   " of total pageviews";
                        });
  
                    self.path.transition()
                        .style("fill-opacity", 1)
                        .attrTween("d", function(d) { 
                            return arcTween.call(this, 
                                                  self.updateArc(d)); 
                        });
                });
          }