var viso = 3;

var dabar = 1;

$(document).ready(function(){
	
	$('#bot').click(function() {
		if (dabar-1>=1) {
		$('#scontent').animate({top: parseInt($('#scontent').css('top')) + 180 + "px"}, 'normal');
		--dabar;
		
		if (dabar==1){
		$('#bot').css("cursor","default");
		$('#bot').css("color","#75705f");
		$('#bot').addClass('title_news_jsbutton_no_underline');
		$('#bot').removeClass('title_news_jsbutton_underline');
		}
		else {
		$('#bot').css("cursor","pointer");
		$('#bot').css("color","#3A372E");
		$('#bot').addClass('title_news_jsbutton_underline');
		$('#bot').removeClass('title_news_jsbutton_no_underline');
		}
		
		if (dabar==viso) {
		$('#top').css("cursor","default");
		$('#top').css("color","#75705f");
		$('#top').addClass('title_news_jsbutton_no_underline');
		$('#top').removeClass('title_news_jsbutton_underline');
		}
		else {
		$('#top').css("cursor","pointer");
		$('#top').css("color","#3A372E");
		$('#top').addClass('title_news_jsbutton_underline');
		$('#top').removeClass('title_news_jsbutton_no_underline');
		}
		}
	});
	
	$('#top').click(function() {
		if (dabar+1<=viso){
		$('#scontent').animate({top: parseInt($('#scontent').css('top')) - 180 + "px"}, 'normal');
		++dabar;
		
		if (dabar==1){
		$('#bot').css("cursor","default");
		$('#bot').css("color","#75705f");
		$('#bot').addClass('title_news_jsbutton_underline');
		$('#bot').removeClass('title_news_jsbutton_no_underline');
		}
		else {
		$('#bot').css("cursor","pointer");
		$('#bot').css("color","#3A372E");
		$('#bot').addClass('title_news_jsbutton_underline');
		$('#bot').removeClass('title_news_jsbutton_no_underline');
		}


		if (dabar==viso) {
		$('#top').css("cursor","default");
		$('#top').css("color","#75705f");
		$('#top').addClass('title_news_jsbutton_no_underline');
		$('#top').removeClass('title_news_jsbutton_underline');
		}
		else {
		$('#top').css("cursor","pointer");
		$('#top').css("color","#3A372E");
		$('#top').addClass('title_news_jsbutton_underline');
		$('#top').removeClass('title_news_jsbutton_no_underline');
		}
		}
	});
	
});