Converting jQuery function to be reused easily without repetition
<p>I have the following function that fades each line of an unordered-list in and out. Right now it works for #skills_hints but I want to use it for other #named_hints. Is there a way I can reuse this code over multiple unordered lists without copying and pasting the <strong>entire</strong> code and just changing the IDs?</p>

<pre><code>$(document).ready(function(){
    $('#skills_hints .hint');
    setInterval(function(){
        $('#skills_hints .hint').filter(':visible').fadeOut(800,function(){
            if($(this).next('li.hint').size()){
                $(this).next().fadeIn(800);
            }
            else{
                $('#skills_hints .hint').eq(0).fadeIn(800);
            }
        });
    },7000);    
});
</code></pre>
