$(document).ready(function() {


    $('.slideshow').cycle({
		
		 fx:     'fade', 
		  
    prev:   '#prev', 
    next:   '#next', 
	pause:  true, 
    after:   onAfter
    //timeout: 5000
});

     function onAfter(curr, next, opts) {
    var index = opts.currSlide;
    $('#prev')[index == 0 ? 'hide' : 'show']();
    $('#next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
}
}); 
