function update_tree(uncollapsed)
{
	var first = $('first_album');
	
	first.select('a').each(function(s, index) {
		/* If they're not leaves then they'r just collections of albums - allow for toggling*/
		if (s.up() && s.up().next() && s.up().next().nodeName == "UL")
		{
			s.observe('click', function(event) {
				var elem = Event.element(event);
				var toToggle = s.up().next();
//				toToggle.toggle();
				Effect.toggle(toToggle, 'blind', { duration: 0.5 });
				Event.stop(event);
			});
		}	
	});
	
	Element.select('ul#first_album', 'ul ul li a').each(function(s, index) {
		/* If they're leaves then they're photo albums - click should take user to the photos */
//		s.observe('click', function(event) {
//			var elem = Event.element(event);
//
//			new Ajax.Updater('photos', s.href, {asynchronous:true, evalScripts:true});
//
//			Event.stop(event);
//		})
	});

	if (uncollapsed && $('uncollapsed'))
	{
		var aObj = $('uncollapsed');
		if (aObj.up().next().visible())
		{
			Effect.toggle(toToggle, 'blind', { duration: 0.5 });
		}
	}	
}

