<script type="text/javascript">
$(function()
{
$('.more').live("click",function()
{
var ID = $(".bubble:last").attr("id");
if(ID)
{
$("#more"+ID).html('<img src="http://127.0.0.1/locomo/cdn/images/bigLoader.gif" />');

$.ajax({
type: "POST",
url: "<?=base_url();?><?=index_page();?>/welcome/group_get_more_updates/<?=$list_msgs->row('group_id');?>/",
data: "lastmsg="+ ID,
cache: false,
success: function(html){
$("ol#updates").append(html);
$("#more"+ID).remove(); // removing old more button
}
});
}
else
{
$(".morebox").html('The End');// no results
}

return false;
});
});
</script>



<div id='container'>


<div class="entry">

<ol class="timeline" id="updates">
<?php

if($list_msgs->num_rows() > 0 )
{

foreach($list_msgs->result() as  $row )
{

$ttt = NULL;
error_reporting(0);
$text = $row->txt;
$ex = explode('#',$text);

if(count($ex)>2)
	{
		$ttt = $ex[2];
	//	print_r($ex);
	}
else
	$ttt = $text;
?>	
	<li>
	
			  <div class="bubble" id="<?=$row->id;?>"  style="width:100%; overflow:hidden;" >
		<blockquote>
<p style="font-size:12px"><img  height="50" width="50" src="<?=base_url();?>uploads/<?=$this->Message->getPhoto($row->member_uid);?>" />   <?=$ttt?></p>

		</blockquote>
<cite><strong> <?=$this->Message->usernameByUID($row->member_uid);?></strong>   <?=$this->Message->Timesince($row->time_stamp);?>  <?php echo "ago"; ?>
</cite>
	</div>
	
	
	</li>
	
	
	<?php
}


?>

</ol>
<div id="more<?=$row->id;?>" class="morebox">
<a href="#" class="more" id="<?=$row->id;?>">more</a>
</div>
<?php
}
else
{
?>
	
<?php
}
?>


</div>
</div>
