   function ColorChanger(elem, colors){
      this.root=elem;
      this.colors= colors || ["#ffffff","#ff0000","#ffff00","#00ff00","#00ffff"];
      this.colorIndex=0;
      this.changeColor();
   }

   ColorChanger.prototype={
     changeColor:function(){
         var me=this;
         me.colorIndex++;
         if(me.colorIndex>=me.colors.length) me.colorIndex=0; //Или зациклить me.colorIndex=0;
         this.root.animate({color:me.colors[me.colorIndex]}, 1500,function(){me.changeColor()});
     }
   }

      $(function(){
        new ColorChanger($('#blinks'));
        new ColorChanger($('#blinks1'));
      });
