$(document).ready(function(){

function onAfter(curr, next, opts) {
    var index = opts.currSlide;
    $('#prev')[index == 0 ? 'hide' : 'show']();
    $('#next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
	$('#counter').text(index + 1);
}

	$('#showcase').cycle({ 
  	  fx:    'fade', 
   	 speed:  500,
	 timeout: 0,
	 width: 720,
	 height: 400,
	 prev: '#prev', 
     next: '#next',
	 after: onAfter 
 	});

});
