Hi all this is my first post so be gentle

), I've been trying to create a simple banner that fades text in and out one sentence after another. Now the script I wrote uses jquery but I just can't seem to get it to work. I've read my book (as far as I've got anyhow), JavaScript published by O'Reilly and I'm just at a loss, as to the problems cause.
Basically when the script is run it should fade in and fadeout a series of sentences stored in an array. But in stead it prints the last sentence stored in the array 3 times, if there where 3 sentences in the array. If there where 5 it would print the fith sentence 5 times etc. I'll show you the code below.
Code:
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript">
$(document).ready( function() {
$('.msg').each(function () {
var ctr = 0; // ctr
var bannerMsgs = ['Sentence 1', 'Sentence 2', 'Sentence 3 etc']; //msgs stored in array
while ( ctr <= 3) {
$('.msg').text(bannerMsgs[ctr]);
$('.msg').hide();
$('.msg').fadeIn(3000);
$('.msg').fadeOut(1000);
ctr++;
}
});
}); // eof ready
.msg is a class given to a <span> tag in my HTML like:
Code:
<span class="msg"></span>
Any help would be much appreciated!
Dave