$(function() {
	$('#slideshow').cycle({
    	fx:     'scrollVert',
    	prev:   '#prev',
   	 	next:   '#next',
   	 	after:   onAfter,
		timeout: 8000,
		delay:  -2000  	
	});
});
function onAfter(curr, next, opts) {
    var index = opts.currSlide;
    $('#prev')[index == 0 ? 'hide' : 'show']();
    $('#next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
}
