jQuery(function(){
	jQuery('.seeAllComments').click(function(){
		var ol = jQuery('.commentlist');
		var li = jQuery('<li class="loading comment"></li>').appendTo(ol);
		jQuery(this).parent().parent().parent().remove();
		jQuery('.post').each(function(){
			var id = this.id.match(/post-([0-9]+)/)[1];
			jQuery.get('/wp-admin/admin-ajax.php?action=get_all_comments&post='+id, function(data, textStatus){
				if(textStatus == 'success'){
					li.remove();
					ol.append(data);
				}
			}, 'html');
			return false;
		});
		return false;
	});
});