$(document).ready(function() {
	$('#slideshow')
	.before('<ul id="nav">')
	.cycle({ 
	    fx:    'fade', 
	    speed:  2500, // milliseconds of transition
		timeout: 6000, // milliseconds of static
		pause:  1, // pause on hover
		pager:  '#nav',
		// callback fn that creates a thumbnail to use as pager anchor 
	    pagerAnchorBuilder: function(idx, slide) { 
	        return '<li><a href="#"><img src="thumbs.php/' + $(slide).find('img').attr('src') + '?part(40x40)" width="40" height="40" /></a></li>'; 
	    }
	 });
});

$('#pauseButton').click(function() { 
    $('#slideshow').cycle('pause'); 
});

$('#resumeButton').click(function() { 
    $('#slideshow').cycle('resume'); 
});