$(document).ready(setup);

var $links;

function setup()
{
	createObjects();
	attachEvents();
}

function createObjects()
{
	$tools = $('a.tool');
	$tools.each(function(index, item) {
		$(this).attr("title", $(this).text());
	});
}

function attachEvents()
{
	$links.click(selectLink);
}

function selectLink(context)
{
	$links.removeClass('selected');
	$(this).addClass('selected');
	return true;
}