$(function() {

	$("a[rel=external]").attr('target', '_blank');

	$("div#text-size a#bigger").click(function(){
		
		$("body").addClass("biggerFont");
		
		$(this).addClass("active");
		$("div#text-size a#smaller").removeClass("active");
		
		return false;
		
	});
	
	
	$("div#text-size a#smaller").click(function(){
		$("body").removeClass("biggerFont");
		
		$(this).addClass("active");
		$("div#text-size a#bigger").removeClass("active");
		
		return false;
	}).not("a#smaller.active");
	
	$("ul#navigation li.menu").hover(
		function () {
			$(this).addClass('active').children('ul').show();
		}, 
		function () {
			$(this).children('ul').fadeOut(150);
			if ($(this).hasClass('current') == false) {
				$(this).removeClass('active');
			}
		}
	);
	
	$(".toggle-this").hide();
	$(".toggle-next").click(function(){
		$(this).next(".toggle-this").toggle();
		return false;
	});
	$(".close-this").click(function(){
		$(this).parent(".toggle-this").toggle();
		return false;
	});

	$("#username-link").click(function(){
		$("#login-form").css('display', 'none');
		$("#username-form").css('display', 'block');
		return false;
	});
	$("#password-link").click(function(){
		$("#login-form").css('display', 'none');
		$("#password-form").css('display', 'block');
		return false;
	});

});
