/***
	swapImages()
	Rotating banner for the homepage
**/

function swapImages(){
	
	// Each image is wrapped within a div, this allows the use of other HTML elements
	// e.g. anchors, without messing up the rotation. 
		
	var $active = $('#rotator DIV.active');
	  
	var $next = $active.next().length ? $active.next() : $('#rotator DIV:first');
	  
	$active.fadeOut(function(){
		$active.removeClass('active');
		$next.fadeIn(1000).addClass('active');
	});
}
	
$(document).ready(function(){
	$('#rotator DIV:first').addClass('active'); // Add active class to first div block
	setInterval('swapImages()', 8000);
});
