$(document).ready(function() {
	// put all your jQuery goodness in here.
	$('.pics').cycle({
		fx:     'fade',
		speed:   800,
		timeout: 5000,
		next:   '#next',
		prev:   '#prev',
		after:  onAfter ,
		pause: 1
	});

	function onAfter(curr,next,opts) {
		var caption = (opts.currSlide + 1) + ' of ' + opts.slideCount;
		$('#caption').html(caption);
	}

	$('#pause').click(function() { 
		$('.pics').cycle('toggle'); 
	});

});
