$(function(){
	$('.rap').cycle({
		fx: 'fade',
		speed:500,
		timeout: 4000,
		startingSlide: 0,
		after: onAfter
	});
	});

function onAfter(curr, next, opts) {

 var index = opts.currSlide;
 $('#banners li').removeClass('active');
 $('#banners li').eq(index).addClass('active');
}	

$(function() {
		   
$('#banners li').hover(function() {
	 var curIndex=$(this).index();	
	$('.rap').cycle(curIndex);
			   });	   
 });
