function slideForward() {
  var $active = $('#images .active');
  if ( $active.length === 0 ) { $active = $('#images img:first'); }
  var $next = $active.next().length ? $active.next() : $('#images img:first' );
  $active.removeClass('active').fadeOut();
  $next.addClass('active').fadeIn();
}

$(window).ready( function() {
  intervalID = setInterval( function() { slideForward(); }, 3000 );
});
