Event.observe(document, 'dom:loaded', function() {
	$$('.more-profile').each(function(el){
		el.observe('click', function(){
			// get id we'll use
			var id = el.identify();
			id = id.substr(id.length - 1, 1);
			
			// close any open ones
			$$('.profile').each(function(elm){
				// get id for this element
				var pid = elm.identify().substr(elm.identify().length - 1, 1);
				
				// if this element is the one the user wants to show do nothing
				if(pid == id) return;
				
				// if this elemnet is currently showing hide it
				if(elm.getStyle('display')== "block")
					new Effect.BlindUp('profile_' + pid);
			});
			
			// make it drop down
			var prof = $('profile_' + id);
			if(prof){
				if(prof.getStyle('display')!= "block")
					new Effect.BlindDown('profile_' + id);
				else
					new Effect.BlindUp('profile_' + id);
			}
		});
	});
});
