(function($){
  $.fn.pager = function(options) {
		if(typeof options == 'undefined') options = [];
		$.extend({
			pager		: '.pager'
		},options);
		
		var pager = $(options.pager);
		var lis = $(this).find('li');
		var currentShowing = lis.eq(0).attr('id');
		
		var showComment = function(id) {
			$(this).find('#'+currentShowing).hide('fast');
			$(this).find('#'+id).show('fast');
			currentShowing = id;
		};
		
		function buildPager(){
			var i=1;
			lis.each(function(){
				pager.append('<a href="javascript:;" onclick="showComment('+$(this).attr('id')+')">'+i+'</a> | ');
				i++;
			});
			pager.show();
		}
		buildPager();
		
	};  
})(jQuery); 
