﻿(function ($) {

    $.fn.focusText = function () {
		this.each(function() {
			var rel = $(this).attr("rel");

			$(this).val(rel);

			$(this).blur(function () {
				if ($(this).val() == "") {
					$(this).val(rel);
					$(this).removeClass("focused");
				}
			});
			$(this).focus(function () {
				if ($(this).val() == rel) {
					$(this).val("");
					$(this).addClass("focused");
				}
			});
		});

    };
})(jQuery);
