var headline_count;
var headline_interval;
var old_headline = 0;
var current_headline = 0;
	
function headline_rotate() {
    current_headline = (old_headline + 1) % headline_count;
    $("div.headline:eq(" + old_headline + ")")
  	.animate({top: -25},"slow", function() {
  	  $(this).css('top', '25px');
	});
    $("div.headline:eq(" + current_headline + ")").animate({top: 2},"slow");
    old_headline = current_headline;
}
   

function headline_back() {
      
    old_headline = current_headline;
    current_headline = (current_headline - 1);
       
    if(current_headline < 0){
       current_headline = headline_count-1;
    }
       
    $("div.headline:eq(" + old_headline + ")")
  	.animate({top: -25},"slow", function() {
   	  $(this).css('top', '25px');
   	});
    $("div.headline:eq(" + current_headline + ")").animate({top: 2},"slow");
    old_headline = current_headline;
}