$(function() {
    $('#newsCarousel').cycle({
        fx: 'fade',
        timeout: 0,
		speed: 300,
		prev: '.zurueck',
        next: '.weiter',
		cleartypeNoBg: true,
        after: onAfter
    });
});
function onAfter(curr,next,opts) {
	var caption = 'Seite ' + (opts.currSlide + 1) + ' von ' + opts.slideCount;
	$('.pages').html(caption);
	//get the height of the current slide
	var $ht = $(this).height();
	//set the container's height to that of the current slide
	$(this).parent().animate({height: $ht});
}
