Add a play button to a jQuery slider
<p>I have the following code which works perfectly fine, however I would like to add a play and stop button to it. Any ideas on how to do this?</p>

<pre><code>$(document).ready(function () {
   var slides = $(".slide").length;

   $("#slidesContainer").css("overflow", "hidden");

   (function () {
      for (i = 0; i &lt; slides; i++) {
          var tabNumber = i + 1;
          $("#tabsstyle ul").append('&lt;li&gt;&lt;a href="#" rel="' + tabNumber + '"&gt;&lt;/a&gt;&lt;/li&gt;')
      }
      $("#tabsstyle li a").bind("click", function () {
         $("#tabsstyle li a").removeClass("active");
         $(this).addClass("active");

         var tabNumber = "n" + $(this).attr("rel");
         $("div.slide").delay(200).fadeOut();
         $("#" + tabNumber).delay(200).fadeIn(600)
      })
   })()

   $('#tabsstyle ul li a:first').addClass('active'); // first tab selected on doucment ready    
});
</code></pre>
