$(document).ready(function() {
	// make the faq accordion style
	$('dl.faq dt').click(function(){
		$(this).siblings('dd:visible').hide();
		return !$(this).next('dd:hidden').show();
	});
	
	// add some mouseover magic and clickable rows
	$('ul.galleries li,ul.pictures li').mouseover(function(){
		$(this).addClass('over');
	}).mouseout(function(){
		$(this).removeClass('over');
	}).click(function(){
		location.href = $('a',this).attr('href');
	}).filter(':even').addClass('even');
	
	$('.searchresults li:even').addClass('even');
	
	$('.emotes img').click(function(){
		$('#message').val($('#message').val()+$(this).attr('alt'));
	});
	
	$('legend').remove();
	
	$('.errors ul li a').click(function(){
		return !$($(this).attr('href')).focus();
	});
});
