Event.observe(document,'dom:loaded',function(){
	$$('table').each(function(e){
		e.observe('click',function(e){
			var ele = Event.element(e);
			if ( ele.tagName.toLowerCase() != 'a' ) {
				document.location.href = ele.up('tr').select('a')[0].href;
			}
		});
	});
	
	
	$$('.tabs').invoke('observe','click',function(e) {
		e.stop();
		var li = Event.element(e).up('li');
		// Activate the right tab..
		$$('.tabs .active').invoke('removeClassName', 'active');
		li.addClassName('active');
		// hide all & show the right content.
		$$('.tab-content').invoke('hide');
		$('content_'+li.id).show();
		console.log($('content_'+li.id));
	});
	
	
})
