$(document).ready(function() {
	$('.slideshow').cycle({ 
    	fx: 'fade', 
    	speed: 500,
    	timeout: 10000,
    	next: '.next a', 
		prev: '.back a',
		after: onAfter
    });
    
    $('.controls td a').click(function() { 
    	$('.slideshow').cycle('pause'); 
    	return false;
	});

    function onAfter(curr,next,opts) {
		var numStr = String(opts.currSlide + 1);
		var count = numStr + ' of ' + opts.slideCount;
		$('.number').html(count);
	}

});

