My rotator plugin, need your opinion

My rotator plugin, need your opinion

Hi everyone,

i'm a new Jquery User and i need your opinion about my plugin, let me show you the code :

First, html code :
  1. <div class="rotator">
  2.         <ul>
  3.                 <li><p>First item</p></li>
  4.                 <li><p>Second item</p></li>
  5.                 <li><p>Third item</p></li>
  6.         </ul>
  7. </div>
Now, the rotator plugin :
  1. (function($) {
  2.         $.fn.rotator = function(params) {
  3.                 params = $.extend( { speed: 5000 }, params);
  4.                 var t = this;
  5.                 var nbItems = $("ul li", this).size();
  6.                 $("ul li:first", this).nextAll("li").fadeOut(0, 0);
  7.                 var i = (i > 0) ? i : 0;
  8.                
  9.                 rotator();

  10.                 function rotator()
  11.                         {
  12.                                 $("ul li:eq("+i+")", t).fadeIn("slow");
  13.                                 $("ul li:eq("+i+")", t).delay(params.speed).fadeOut("slow", function()
  14.                                         {
  15.                                                 $(this).hide(rotator);
  16.                                         });
  17.                                 if(i == (nbItems-1)) { i = 0; }
  18.                                 else { i++; }
  19.                         }
  20.                 return this;
  21.         };
  22. })(jQuery);
And now, i launch my plugin like that :
  1. $(document).ready(function() {
  2.         $(".rotator").rotator({ speed: 5000 });
  3. });
That's work fine but i want to know if this plugin can be optimized ?

Thank you so much for your help ;)