$(document).ready(function() {
	
	// hide confirm and error boxes after 3 seconds
	setTimeout ( "hideConfirmBoxes()", 3000 );
	setTimeout ( "hideErrorBoxes()", 3000 );
	
	// if there is a username text input, give it focus
	$('#username').focus();
	
	// supposed to fix .png transparency in IE 6
	$('body').supersleight({shim: 'x.gif'});
	
	// when the showlogin link is pressed
	$('#showlogin').click(function (){
		if ($(this).hasClass('on')){
			$('#topLoginForm').slideDown();
			$(this).removeClass('on');
			$(this).addClass('off');
		} else {
			$('#topLoginForm').slideUp();
			$(this).addClass('on');
			$(this).removeClass('off');
		}
		return false;
	});
	
	// when the showlogin link is pressed
	$('#showregister').click(function (){
		return true;
	});

});
function hideConfirmBoxes(){ $('.confirm ').slideUp('slow'); }
function hideErrorBoxes(){ $('.error ').slideUp('slow'); }