var autoplay = 0;

	$(document).ready(function() {

		$('#slideshow').cycle({
			fx:     'fade', 
			speed:  'slow', 
			timeout: 0, 
			next:   '#next_hover', 
			prev:   '#prev_hover' 
		});
		/*
		$("#slideshow").scrollable({
			circular: 	true,
			next:   	'#next_hover', 
			prev:   	'#prev_hover' 
		});*/

		$("#next").mouseover(function(){
			$('.nav').css('display', 'block');
			$("#prev_hover").css('display', 'none');
			$("#next_hover").fadeIn('slow');
		});

		$("#next_hover").mouseout(function(){
			$(this).fadeOut('slow', function(){
				$('.nav').css('display', 'none');
			});
		});

		$("#prev").mouseover(function(){
			$('.nav').css('display', 'block');
			$("#next_hover").css('display', 'none');
			$("#prev_hover").fadeIn('slow');
		});

		$("#prev_hover").mouseout(function(){
			$(this).fadeOut('slow', function(){
				$('.nav').css('display', 'none');
			});
		});

		$("#slideshow").mouseover(function(){
			clearInterval(autoplay);
		});

		$("#slideshow").css('display', 'block');
		$("#navigation").css('display', 'block');
	});
	
$(window).load(function(){
	autoplay = setInterval(function(){
		$("#next_hover").trigger('click');
	}, 3000);
});

