Caution: attr('src', 'blah') will SET the src TO blah... I don't think that's what you want here are some alternatives:
Why don't you have all those images share a class name, then you remove the need for the for loop, and you can simply fade all the images using the class name?
$('.chosenImage', '.stretch').fadeOut(5000);
The above is equivalent to using the CSS
$('.stretch .chosenImage').fadeOut(5000);
Just be careful that you put the parent first in the CSS version, and the child first in the comma separated JQuery syntax version.
The above will go to work on all of the chosenImage class items that are children of a stretch class item.
You can use regex:
This will get all helloXX where XX is a one or two digit number... you can refine the regex to only pick up 1 - 24 if you want.
$('img', '.stretch').filter(function(){
return $(this).attr('src').match(/images\/hello[0-9]{1,2}.jpg/);
}).fadeOut(5000);
This code takes all the IMGs within the .stretch class and it filters them using a regular expression on each IMGs src attribute.
To have them fade one after another, you would just target each image one by one and put an increasing delay on them... something like this:
var delayIt = -1000;
$('img', '.stretch').each(function(){
delayIt += 1000;
$(this).delay(delayIt).fadeOut(5000);
});
This will fade each image in the class stretch one after another.
Some pertinent JQuery references:
attr()
delay()
each()
fadeOut()