function bannerator(targetDiv, rotateTime)
{
	$(targetDiv + ' img').css({ display: 'none' });
	
	// Auto size the height of the containing div
	var $height = $(targetDiv + " img").height();
	$(targetDiv).css({ height: $height });
    
	bannerSwitch(targetDiv);
    setInterval("bannerSwitch('" + targetDiv + "')", rotateTime);
}

function bannerSwitch(targetDiv) {
    var $active = $(targetDiv + ' img.active');

    if ($active.length == 0) $active = $(targetDiv + ' img:last');

    var $next = $active.next().length ? $active.next() : $(targetDiv + ' img:first');

    $next.addClass('active').fadeIn(1000);
    $active.removeClass('active').fadeOut(1000);
}
