m.koloskov,
Вариант...
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<style type="text/css">
.active a {background:red;}
</style>
<meta charset="utf-8" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(function(){
$('.next').click(function(){
var next = $('ul.pagination').find('li.active').removeClass('active').next()
next.index() < 0 &&(next = $("ul.pagination li:first"));
next.addClass('active');
return false;
});
$('.prev').click(function(){
var prev = $('ul.pagination').find('li.active').removeClass('active').prev()
prev.index() < 0 &&(prev = $("ul.pagination li:last"));
prev.addClass('active');
return false;
});
});
</script>
</head>
<body>
<ul class="pagination">
<li class="active"><a class="one" href="#">X</a></li>
<li><a class="two" href="#">X</a></li>
<li><a class="three" href="#">X</a></li>
</ul>
<a href="" class="next">Next</a>
<a href="" class="prev">Prev</a>
</body>
</html>