function CxpRotator(wrapper, animationTime) {
  this.wrapper = $(wrapper);
  this.animationTime = animationTime;
  
  this.init = function() {
    this.container = this.wrapper.getElementsByTagName("UL")[0]
    this.items = this.container.getElementsByTagName("LI");
    if (!this.initialized) {
      var baseLength = this.items.length;
      this.container.startWidth = this.container.scrollWidth;
      for (var i=0;i<3;i++) {
        for (var j=0;j<baseLength;j++) {
          var dupItem = this.items[j].cloneNode(true);
          this.container.appendChild(dupItem);
        }
      }
      this.initialized = true;
      this.startAnim();
      var obj = this;
      this.container.parentNode.onmouseover = function() {
        if (obj.ROTATOR_INTERVAL) {
          clearInterval(obj.ROTATOR_INTERVAL);
        }
      }
      this.container.parentNode.onmouseout = function() {
        obj.startAnim();
      }
    }
  }
  
  this.startAnim = function() {
      var obj = this;  
      this.ROTATOR_INTERVAL = setInterval(function() {
        if (-parseInt(obj.container.style.marginLeft) >= obj.container.startWidth) {
          obj.container.style.marginLeft = "0px";
        } else {
          obj.container.style.marginLeft = parseInt(obj.container.style.marginLeft) - 2 +"px";
        }
      }, obj.animationTime);      
  }
  
  if (this.wrapper) {
    this.init();
  }
}