(function(b){function a(e){var c,d;this.$el=b(e);this.$placeholder=b('<div class="placeholder"></div>');this.$placeholder.html(this.$el.attr("placeholder"));c=this.$el.position();this.$placeholder.css({position:"absolute",top:c.top,left:c.left,width:this.$el.outerWidth(),lineHeight:this.$el.outerHeight()+"px"});this.$el.before(this.$placeholder);d=2*this.$placeholder.width()-this.$placeholder.outerWidth();this.$placeholder.width(d);this.$placeholder.click(b.proxy(this.focus,this));this.$el.focus(b.proxy(this.focus,this));this.$el.blur(b.proxy(this.blur,this));if(this.$el.val()){this.$placeholder.hide()}}a.prototype.focus=function(c){this.$placeholder.hide();if(c.target!=this.$el[0]){this.$el.focus()}};a.prototype.blur=function(c){if(!this.$el.val()){this.$placeholder.show()}};b(function(){if(Modernizr&&Modernizr.input.placeholder){return}b("input[placeholder]").each(function(c,d){new a(d)})})})(jQuery);
