function frontpage_images() {
    var $current = $('div.iimage div.active');
    var $next =  $current.next().length ? $current.next()
        : $('div.iimage div:first');

    $next.addClass('active');
    $next.show();
    $next.css({opacity: 0.0})
        .animate({opacity: 1.0}, 1000, function() {
            $current.removeClass('active');
	});
    $current.hide();
};

(function($) {
    if ($('div.iimage').length) {
	setInterval( "frontpage_images()", 5000 );
    }
})($);



