var counter;
var interval;
var previous = 0;
var current = 0;

var $j = jQuery.noConflict();
 
$j(document).ready(function(){
  counter = $j("#highlight div.item").size();
  $j("#highlight div.item:eq("+current+")").css('top', '10px');
 
  if(counter>1){
  	interval = setInterval(rotate,5000);
  	$j('#highlight').hover(function() {
  	  clearInterval(interval);
  	}, function() {
  	  interval = setInterval(rotate,5000);
  	  rotate();
  	});
  }
});
 
function rotate() {
  current = (previous + 1) % counter;
  $j("#highlight div.item:eq(" + previous + ")")
    .animate({top: -150},"slow", function() {
      $j(this).css('top', '170px');
    });
  $j("#highlight div.item:eq(" + current + ")")
    .animate({top: 0},"slow"); 
  previous = current;
}