(function(e){var g="PLACEHOLDER-INPUT";var f="PLACEHOLDER-LABEL";var a=false;var d={labelClass:"placeholder"};var i=document.createElement("input");if("placeholder" in i){e.fn.placeholder=e.fn.unplaceholder=function(){};delete i;return;}delete i;e.fn.placeholder=function(j){c();var k=e.extend(d,j);this.each(function(){var n=Math.random().toString(32).replace(/\./,""),l=e(this),m=e('<label style="position:absolute;display:none;top:0;left:0;"></label>');if(!l.attr("placeholder")||l.data(g)===g){return;}if(!l.attr("id")){l.attr("id")="input_"+n;}m.attr("id",l.attr("id")+"_placeholder").data(g,"#"+l.attr("id")).attr("for",l.attr("id")).addClass(k.labelClass).addClass(k.labelClass+"-for-"+this.tagName.toLowerCase()).addClass(f).text(l.attr("placeholder"));l.data(f,"#"+m.attr("id")).data(g,g).addClass(g).after(m);b.call(this);h.call(this);});};e.fn.unplaceholder=function(){this.each(function(){var j=e(this),k=e(j.data(f));if(j.data(g)!==g){return;}k.remove();j.removeData(g).removeData(f).removeClass(g);});};function c(){if(a){return;}e("."+g).live("click",b).live("focusin",b).live("focusout",h);bound=true;a=true;}function b(){var j=e(this),k=e(j.data(f));k.css("display","none");}function h(){var j=this;setTimeout(function(){var k=e(j);e(k.data(f)).css("top",k.position().top+"px").css("left",k.position().left+"px").css("display",!!k.val()?"none":"block");},200);}}(jQuery));
