/* * * * * Misc. jQuery application of design * * * * */

/* SHARED PAGE TEMPLATE STYLES */

var enableBlurring = true;
$(document).ready(function() {
	$("a.loginBtn").click(function(e) {
		e.preventDefault();
		$(this).toggleClass("close");
		$("div.loginForm").slideToggle('500');
	});

	function ToggleMask($input) {
		$input.each(function (index) {
			$this = $(this);
			if ($this.val() != '')
				$this.prev("label").hide();
			else
				$this.prev("label").show();
		});
	}

	ToggleMask($(".masked label").next("input").keyup(function () {
		ToggleMask($(this));
	}));
	if (enableBlurring)
		$(".masked label").next("input").focus(function () {
			$(this).prev("label").addClass("blurred");
		}).blur(function () {
			$(this).prev("label").removeClass("blurred");
		});
});
