Creating a rotation effect

Creating a rotation effect

I have written the following Jquery code to change an image and text on mouseover, what I want it for it to also rotate every 5 seconds automatically. Is there a way I can adapt this code to do that? Any help will be great.

   $("#main_nav li").mouseover( function() {
      $(".navigation_main, .main_info").each (function() {
         $(this).removeClass("on").addClass("off");
                              });
      $("#"+$(this).attr("id")).removeClass("off").addClass("on");
      $("#"+$(this).attr("id")+"_images").removeClass("off").addClass("on");
      $("#"+$(this).attr("id")+"_text").removeClass("off").addClass("on");
      $("#"+$(this).attr("id")+"_a").removeClass("off").addClass("on");
                         });


Thanks
Steve