document.observe('dom:loaded', function(ev){

	hLinks = $$('div.highlights li a');
	highlights = $$('div.highlights div.highlight');
	if(hLinks.length != 0) {
		hLinks.each(function(link){
			link.observe('click', function(ev){
				ev.stop();
				li = link.up('li');
				index = li.previousSiblings().length;
				
				// remove active from all links
				$$('div.highlights li a.active').each(function(el){
					el.removeClassName('active');
				});
				
				// remove active from all highlights
				$$('div.highlight.active').each(function(el){
					el.removeClassName('active');
				});
				
				hLinks[index].addClassName('active');
				highlights[index].addClassName('active');
				
			});
		});
	}

});
