var tabs = new Array();
function tabsInitialize(){

	dojo.query(".tab-selector").forEach(function(item){
		var tab = new Array(item,dojo.byId(item.href.split("#")[1]));
		tabs.push(tab);
		
		dojo.connect(item,"onclick",function (evt){
				evt.preventDefault();
				hideAll();
				evt.target.parentNode.className="selected";
				dojo.byId(evt.target.href.split("#")[1]).style.display="block";
			
			});
		}
	);
	
	tabs[0][1].style.display="block";
	tabs[0][0].parentNode.className="selected";
	
}

function hideAll(){
//	console.debug(tabs);
	dojo.forEach(tabs, 
	function (tab){
		tab[1].style.display="none";
		tab[0].parentNode.className=""
	}
	);
	
}
