function homeBanner() {
	var $active = $('#homeBannerContainer a.active');

	if ($active.length == 0) {
		$active = $('#homeBannerContainer a:last');
	}

	var $next = $active.next().length ? $active.next() : $('#homeBannerContainer a:first');
	$active.addClass('last-active');

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

$(function(){
	if ($('#homeBannerContainer a').length > 1) {
		// Only start fade banner if it contains more than 1 item to fade between
    setInterval("homeBanner()", 5000);
	}
});