$(document).ready(function() { 
$('#slideshow').cycle({
    fx:     'fade',
    speed:  '1000',
    prev:   '#prev',
    next:   '#next',
    after:   onAfter,
    timeout: 4000
});

function onAfter(curr, next, opts) {
  var $j = jQuery.noConflict();
   // var index = $(this).parent().children().index(this);
   // $('#prev')[index == 0 ? 'hide' : 'show']();
   // $('#next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
   
    $j('#info').html('<small>' + $j('#slideshow').children(':visible').find('img').attr('alt') + '</small>');
}
});
