code: function(index) {
              Kinetic.Node.prototype.setZIndex.call(this, index);
              var stage = this.getStage();
              if(stage) {
                  stage.content.removeChild(this.getCanvas()._canvas);
  
                  if(index < stage.getChildren().length - 1) {
                      stage.content.insertBefore(this.getCanvas()._canvas, stage.getChildren()[index + 1].getCanvas()._canvas);
                  }
                  else {
                      stage.content.appendChild(this.getCanvas()._canvas);
                  }
              }
              return this;
          }
docs: extend Node.prototype.setZIndex