var Friends = Class.create({
		
	initialize: function(){
	},
	
	show: function(friends){
		if(friends){
			friends.each(function(el){		
				// create new friend li element
				var friend = new Element('li', {'class': 'friend'});
				
				// create the link, image and overlay elements
				friend_a = new Element('a', {'href': 'http://www.facebook.com/profile.php?id=' + el.id, 'style': 'width: 50px; height: 50px; float: left;'});
				var friend_img = new Element('img', {'src': 'http://graph.facebook.com/' + el.id + '/picture/', 'rel': el.id, 'title': el.name + ' | ' + el.id});
				
				// now create the name / id element
				var friend_p = new Element('p');
				
				// update the new element with the name / id
				friend_p.update(el.name + '<br />' + 'ID: ' + el.id);
		
				// construct rest of the elements for the friend li - just profile picture and link
				friend_a.insert(friend_img);
				friend.insert(friend_a);
				
				// insert element into friend overlay
				friend.insert(friend_p);
				
				// add all the elements to the friends ul
				$('friends').insert(friend);
				
				// show search box
				$('search').show();
			
			});
		} else {
			return false;
		}
	}
	
});
