code: function (offset, item, sentinel) {
              var carousel = this,
                  animCfg  = carousel.get("animation"),
                  animObj  = null;
  
              if (carousel.get("isVertical")) {
                  animObj = new YAHOO.util.Motion(carousel._carouselEl,
                          { top: { to: offset } },
                          animCfg.speed, animCfg.effect);
              } else {
                  animObj = new YAHOO.util.Motion(carousel._carouselEl,
                          { left: { to: offset } },
                          animCfg.speed, animCfg.effect);
              }
  
              carousel._isAnimationInProgress = true;
              animObj.onComplete.subscribe(carousel._animationCompleteHandler,
                                           { scope: carousel, item: item,
                                             last: sentinel });
              animObj.animate();
          }
docs: /*
  Protected methods of the Carousel component
   
  Set the Carousel offset to the passed offset after animating.
  
  @method _animateAndSetCarouselOffset
  @param {Integer} offset The offset to which the Carousel has to be
  scrolled to.
  @param {Integer} item The index to which the Carousel will scroll.
  @param {Integer} sentinel The last element in the view port.
  @protected