(function($){
	
	$.fn.fbstatus = function(options) {
			
		set = jQuery.extend({
			username: 'rhonda.sciortino',
			count: 1,
			loading_text: null
		}, options);
	
		var url = "http://graph.facebook.com/"+set.username+"/feed?limit="+set.count+"&callback=?";
		
		$(this).each(function(i, widget){
			var loading = $('<p class="loading">'+set.loading_text+'</p>');
			var theObject = $(this);
			if (set.loading_text) $(widget).append(loading);
			
			$.getJSON(url,function(json){
			    var html = "<ul>";
					
					$.each(json.data,function(i,fb){
			      		
			      		if (fb.message) {
							html += "<li>" + fb.message + "</li>";
						}
						
			    	});
			    html += "</ul>";
			
				theObject.animate({opacity:0}, 0, function(){
			
						theObject.html(html);
			
				});
			
			    theObject.animate({opacity:1}, 0);
			  
			});
			
		});
		
	};
	
})(jQuery);
