(function(e){e.fn.placeholderLabel=function(t){var n=e.extend({placeholderColor:"#898989",labelColor:"#4AA2CC",labelSize:this.css("font-size"),useBorderColor:true,inInput:true,timeMove:200},t);var r=function(e,t,r){var i=e.height();var s=Number(r.replace("px",""))+i/2;if(!n.inInput){s+=i/2;e.css("background-color","")}e.animate({marginTop:"-="+s,fontSize:n.labelSize},n.timeMove);t.keyup()};e(this).each(function(t,i){var s=e(i);if(s.attr("bind-placeholder-label")!=undefined){var o=s.css("padding-top");r(s.prev(),s,o)}var u=s.css("border-color");var a=s.css("font-size");if(s.attr("placeholder")){var f=e("<label></label>");f.css("position","absolute");f.css("cursor","initial");f.css("color",n.placeholderColor);f.css("font-size",a);var l=s.attr("placeholder");s.removeAttr("placeholder");f.text(l);var c=s.position().left;var o=s.css("padding-top");var h=s.css("padding-left");var p=s.css("margin-top");var d=s.css("margin-left");f.css("margin-top",Number(o.replace("px",""))+Number(p.replace("px","")));f.css("margin-left",Number(h.replace("px",""))-5+Number(d.replace("px","")));f.css("padding-left","5px");f.css("padding-right","5px");f.css("background-color",s.css("background-color"));var s=s;f.click(function(){s.focus()});s.focus(function(){if(n.useBorderColor){s.css("border-color",n.labelColor)}f.css("color",n.labelColor);if(!s.val().length){var e=f.height();var t=Number(o.replace("px",""))+e/2;if(!n.inInput){t+=e/2;f.css("background-color","")}f.animate({marginTop:"-="+t,fontSize:n.labelSize},n.timeMove)}});s.blur(function(){if(n.useBorderColor){s.css("border-color",u)}f.css("color",n.placeholderColor);if(!s.val().length){var e=f.height();var t=Number(o.replace("px",""))+e/2;if(!n.inInput){t+=e/2;f.css("background-color","")}f.animate({marginTop:"+="+t,fontSize:a},n.timeMove)}});if(s.attr("alt")){var v=s.attr("alt");var m=f.text();s.removeAttr("alt");s.keyup(function(){if(s.val().length){f.text(v)}else{f.text(m)}})}s.before(f);if(s.val().length){r(f,s,o)}return s.attr("bind-placeholder-label","true")}else{return null}})}})(jQuery)