var headline2_count;
var headline2_interval;
var old_headline2 = 0;
var current_headline2 = 0;
$(document).ready(function(){
  headline2_count = $("div.headline2").size();
  $("div.headline2:eq("+current_headline2+")").css('top', '2px');
  headline2_interval = setInterval(headline2_rotate,6000);
  $('#marquee').hover(function() {
 clearInterval(headline2_interval);
  }, function() {
 headline2_interval = setInterval(headline2_rotate,6000);
 headline2_rotate();
  });
});
function headline2_rotate() {
  current_headline2 = (old_headline2 + 1) % headline2_count;
  $("div.headline2:eq(" + old_headline2 + ")")
 .animate({top: -20},"slow", function() {
   $(this).css('top', '20px');
 });
  $("div.headline2:eq(" + current_headline2 + ")")
 .animate({top: 2},"slow");
  old_headline2 = current_headline2;
}