$(function() {

    $('#slideshow').cycle({
        fx:      'scrollHorz',
        timeout:  0,
        prev:    '#right',
        next:    '#left',
				after:   onAfter,
				easing:  'backinout'
    });
});

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