var total = 0;
var indx  = 0;
var cols  = 4;

$(document).ready(function(){
	var $next = jQuery(".next > a", this );
	var $back = jQuery(".back > a", this );
	var $box  = jQuery("#news_slider > .box", this);


	$next.click(function() {
		indx += cols;
		$box.load("/top/", {pos:indx});
		return false;
	});
	$back.click(function() {
		indx -= cols;
		$box.load("/top/", {pos:indx});
		return false;
	});

	$box.ajaxSuccess(function(){
		if (total > 0) $next.css("display", "block");
		if (indx == 0) $back.css("display", "none");
		if (indx > 0) $back.css("display", "block");

		$(this).show();
	});

	$next.css("display", "block");
});