/**
 * @author metafor
 */
$(document).ready(function() {
 	$('#play').hide();
	
	$(function() {
	    $('#pause').click(function() { 
			$('#pause').hide();
			$('#play').show();
			$('#slides').cycle('pause');
			$(this).blur();
			return false; 
		});
		
	    $('#play').click(function() { 
			$('#play').hide();
			$('#pause').show();
			$('#slides').cycle('resume'); 
			$(this).blur();
			return false; 
		});
		
		$('#next').click(function() { 
			$(this).blur();
		});
		
		$('#prev').click(function() { 
			$(this).blur();
		});
	    
	    $('#diashow').hover(
	        function() { $('#controls').fadeIn(); },
	        function() { $('#controls').fadeOut(); }
	    );
	    
	    $('#slides').cycle({
	        fx:     'fade',
	        speed:   400,
	        timeout: 8000,
	        next:   '#next',
	        prev:   '#prev'
	    });
	});
	
});




