I have found the answer here http://forum.joomla.org/viewtopic.php?t=444384. Here is the final solution code:
function pagination_list_render($list)
{
$lang =& JFactory::getLanguage();
$html = "<ul class=\"pagination\">";
$html .= '<li class="first">'.$list['start']['data'].'</li>';
$html .= '<li class="prev">'.$list['previous']['data'].'</li>';
foreach( $list['pages'] as $page )
{
$html .= '<li class="num">'.$page['data'].'</li>';
}
$html .= '<li class="next">'.$list['next']['data'].'</li>';
$html .= '<li class="end">'.$list['end']['data'].'</li>';
$html .= "</ul>";
return $html;
}
function pagination_item_active(&$item) {
return "<a href=\"".$item->link."\" class=\"active\" title=\"".$item->text."\">".$item->text."</a>";
}
function pagination_item_inactive(&$item) {
return "<span class=\"inactive\">".$item->text."</span>";
}
I use it to install infinite ajax scroll script, and it works perfectly.