$(document).observe('dom:loaded', function() {
	var clickHandler = function(event) {
		$$('#info-bar li').each(function(el){
			el.removeClassName('selected')
		});
		this.up().addClassName('selected');
		$$('.info').each(function(e) {
			e.removeClassName('show');
		})
		var id = this.href.split('#')[1];
		$$('#' + id + '.info').first().addClassName('show');
		if (event) { event.stop(); }
		new Effect.ScrollTo('info-bar');
		return false;
	}
	
	$$('#info-bar li a').each(function(el) {
		el.observe('click', clickHandler);
	});
	
	var split_location = document.location.toString().split('#');
	if(split_location.length == 2) {
		var info = split_location.pop().split('?').shift();
		var info_tab_link = $$('#info-bar li.' + info + ' a').first();
		if(info_tab_link) {
			clickHandler.bind(info_tab_link)();
		}
	}
	/*
	var team_list = $$('#who_we_are ol').first();
	team_list.observe('mouseenter', function() {
		$('team_pic').addClassName('hover');
	});
	team_list.observe('mouseleave', function() {
		$('team_pic').removeClassName('hover');
	});
	*/
});