/*	jquery.emptyfield.js v0.1
	Developed by www.pasz.nl
	
	Usage:
	$('input, textarea').emptyfields();	// When empty set value to rel attribute
*/

(function(b){b.fn.emptyfields=function(){return this.each(function(){$this=b(this);$this.removeClass("empty");a($this);$this.bind("focus blur",function(c){a(b(this),c)})})};function a(c,d){if(d){if(d.type=="focus"){if(c.val()==""){c.removeClass("empty").val("")}if(c.val()==c.attr("rel")){c.removeClass("empty").val("")}}if(d.type=="blur"){if(c.val()==""||c.val()==c.attr("rel")){c.addClass("empty").val(c.attr("rel"))}}}else{if(c.val()==""||c.val()==c.attr("rel")){c.addClass("empty").val(c.attr("rel"))}}}})(jQuery);