var $j = jQuery.noConflict(); /*this stops jquery conflicting with lightbox*/

$j(document).ready(function(){
	$next = 0;
	$prev = 1;
	
	$j("dt.fade").hover(function(){$j(this).fadeOut(0);$j(this).fadeIn(600);});    
						
	
	setInterval( "fade()", 5000 );
});
			
function fade() {
	$currentImg = $j("#mainPic img:eq(" + $prev + ")");    
	$nextImg = $j("#mainPic img:eq(" + $next + ")");

    $nextImg.hide();
			  
	$currentImg.removeClass("active");
	$nextImg.addClass("active");
				
	$nextImg.fadeIn("slow");
				
	$next += 1;
	$prev += 1;    

	if ( $next > 1 ) $next = 0;
	if ( $prev > 1 ) $prev = 0;
}			
