$(document).ready(function() {
    $('#pictures').cycle({ 
    fx:     'fade', 
    speed:  '1000', 
    timeout: 0, 
    next:   '#next,#pictures',
    prev:   '#prev', 
    after: onAfter
});
});
function onAfter(curr,next,opts) {
	var caption = 'Image ' + (opts.currSlide + 1) + ' of ' + opts.slideCount;
	$('#caption').html(caption);
}
