/*
Javascript function HASHes
copyright codemountain.ca 2009-2010


gotire

*/

/*****************************************************************/

var temoins = {

	init:function(){
		allLinks = $$('#temoin_index li');
		allSections = $$('.temoin1');

		allLinks.each(function(e){
			e.observe('click',function(evt) {temoins.show(this.id) });					   
							   
		});
		this.showFirst();
		
	},
	
	show:function(id){

		allSections.invoke('hide');

		Effect.Appear("t_"+id);

		this.activeMenu(id);
	},
	
	
	activeMenu:function(id){
		
		allLinks.each(function(e){
			e.removeClassName('active');
		});
		$(id).addClassName('active');
	},

	showFirst:function(){
		//find first menu a href id to run sections.show on first link
		var menuId = allLinks.first().id;
		this.show(menuId);
	}
	
}



