function onBefore(curr, next, opts) 
{ 
	var index = $(this).parent().children().index(this);
	var title = $('#rotatorimageid'+ index).attr('title'); 
	var alt = $('#rotatorimageid'+ index).attr('alt'); 
	var link = $('#rotatorimageid'+ index).attr('link'); 
 
	
	$('#rotatortitle').fadeOut('slow', function() { 
			$('#rotatortitle').html(title); 
			$('#rotatortitle').fadeIn('slow'); 
	}); 
	$('#rotatorsubtitle').fadeOut('slow', function() { 
			$('#rotatorsubtitle').html(alt); 
			$('#rotatorsubtitle').fadeIn('slow'); 
	}); 
	
	
} 
	
	$('#slideshow').cycle({ speed: 2400, timeout: 10000, continuous: 0, before: onBefore, pager: '#rotatorpages' , next:   '#rotatornext',     prev:   '#rotatorprev'  }); 
	$('#rotatorpause').click(function() { $('#slideshow').cycle('pause'); }); 
	$('#rotatorresume').click(function() { $('#slideshow').cycle('resume', true); }); 