$j(document).ready(function() {
    // wasserzeichen
	(function($j) {
		$j.fn.watermark = function(c, t) {
			var e = function(e) {
				var i = $j(this);
				if (!i.val()) {
					var w = t || i.attr('title'), $jc = $j($j("<div />").append(i.clone()).html().replace(/type=\"?password\"?/, 'type="text"')).val(w).addClass(c);
					i.replaceWith($jc);
					$jc.focus(function() {
						$jc.replaceWith(i); setTimeout(function() {i.focus();}, 1);
					})
					.change(function(e) {
						i.val($jc.val()); $jc.val(w); i.val() && $jc.replaceWith(i);
					})
					.closest('form').submit(function() {
						$jc.replaceWith(i);
					});
				}
			};
			return $j(this).live('blur change', e).change();
		};
	})(jQuery);
	$j('.wpcf7-use-title-as-watermark').watermark('watermark');
});
