//FancyLogin 1.0 jQuery Plugin
//Author: Patrick Rodgers
//URL: http://www.tgpo.org

$.fn.fancylogin = function() {
	$(this).each(function (i) {
	    var input = $(this);
	    // Set all the empty fields with a blank class...
		if ( input.val() == "" ) 
			input.addClass("blank");
		
		// Clicking on input field results in  the background.
		input.focus(function () {
			input.removeClass("blank");
		});
		
		// Clicking away, selectively restore the blank class...
		input.blur(function () {
			if ( !$(this).val() == "" ) {
				$(this).removeClass("blank");
			}
			else {
				$(this).addClass("blank");
			}
		});
	});
};
