// When the page has loaded, this script will hide all the service "tabs" in col2
// Then assign a new event to each service link, which switches out the inactive and active classes
// The original link is also set to # to stop the page jumping around when clicked
window.addEvent('domready', function() {
	var $activeTab = "#startup";
	$(document.body).getElements('div.service-tab').addClass('inactive');
	$$('#services a').each(function(tabLink){
		tabLink.set('href','#');
		tabLink.addEvent('click', function(e){
			var $selectedTab = this.get('rel');
			$$($activeTab).addClass('inactive').removeClass('active');
			$$($selectedTab).addClass('active').removeClass('inactive');
			$activeTab = $selectedTab;
		});
	});
	$('advice-link').set('href','#').addEvent('click', function(e){
		var $selectedTab = this.get('rel');
		$$($activeTab).addClass('inactive').removeClass('active');
		$$($selectedTab).addClass('active').removeClass('inactive');
		$activeTab = $selectedTab;
	});
});