Cycle through images with fade in/out

Cycle through images: http://stackoverflow.com/questions/8469907/running-continuous-events-after-each-other

HTML

<div id="images">    
    <img...

JavaScript

function switchImage(){
    $('#images img:visible').fadeOut(function(){
        $(this).next().length ? $(this).next().fadeIn() : $('#images img').eq(0).fadeIn();
    });
};
$('#images img').hide().eq(0).show(); // show only the first image
setInterval(switchImage, 5000);