var number_slides;
var count = 1;
var down_up;

$(document).ready(function() {
	
	number_slides = Math.ceil($(".newsslider_inner div.newsslider_link").length/2);
	//count = 2;
	if(number_slides > 1){
		window.setInterval("sliderNews()", 5000);
	}
});

function sliderNews(){
	if(count == number_slides){
		down_up = 'down';
	}
	
	if(count == 1){
		down_up = 'up';
	}
	
	if (down_up == 'down'){
		$(".newsslider_inner").animate({
		    top: '+=80px',
		  }, 1500 );
		
		count--;
		
	}else{
		$(".newsslider_inner").animate({
		    top: '-=80px',
		  }, 1500 );
		
		count++;
	}
	
}
