/*
 * Twitual front-end javascript
 *
 * Copyright 2009 Dougal Campbell
 */
$(document).ready( function() {
	// delegate events for better performance on large lists:
	$('.section ol').delegate('a', 'mouseover mouseout', function() {
		// Find the class given to this twitter user:
		var cls = $(this).parent().attr('class');
		// Make a selector to match it in all lists:
		var sel = '.' + cls + ' a';
		// Highlight the users and their containers:
		$(sel).toggleClass('over');
		$(sel).parents('.section').toggleClass('over');
	}
	); // delegate

	$('form#userform input')[0].focus();

}); // ready
