Вот ваш ответ:
$(document).ready(function() {
$('#slideshow').cycle({
fx: 'scrollHorz',
nowrap: false,
timeout: 0,
fx: 'scrollHorz',
next: '.next',
prev: '.prev',
after: onAfter,
onPrevNextEvent: function(isNext, zeroBasedSlideIndex) {
if(isNext && zeroBasedSlideIndex == 0)
{
document.location = 'http://www.google.ca';
}
}
});
function onAfter(curr, next, opts) {
var caption = (opts.currSlide + 1) + ' / ' + opts.slideCount;
$('#caption').html(caption); }
});