/*! http://mths.be/placeholder v2.0.7 by @mathias */(function(e,t,n){function l(e){var t={},r=/^jQuery\d+$/;return n.each(e.attributes,function(e,n){n.specified&&!r.test(n.name)&&(t[n.name]=n.value)}),t}function c(e,t){var r=this,i=n(r);if(r.value==i.attr("placeholder")&&i.hasClass("placeholder"))if(i.data("placeholder-password")){i=i.hide().next().show().attr("id",i.removeAttr("id").data("placeholder-id"));if(e===!0)return i[0].value=t;i.focus()}else r.value="",i.removeClass("placeholder"),r==p()&&r.select()}function h(){var e,t=this,r=n(t),i=this.id;if(t.value==""){if(t.type=="password"){if(!r.data("placeholder-textinput")){try{e=r.clone().attr({type:"text"})}catch(s){e=n("<input>").attr(n.extend(l(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-password":r,"placeholder-id":i}).bind("focus.placeholder",c),r.data({"placeholder-textinput":e,"placeholder-id":i}).before(e)}r=r.removeAttr("id").hide().prev().attr("id",i).show()}r.addClass("placeholder"),r[0].value=r.attr("placeholder")}else r.removeClass("placeholder")}function p(){try{return t.activeElement}catch(e){}}var r="placeholder"in t.createElement("input"),i="placeholder"in t.createElement("textarea"),s=n.fn,o=n.valHooks,u=n.propHooks,a,f;r&&i?(f=s.placeholder=function(){return this},f.input=f.textarea=!0):(f=s.placeholder=function(){var e=this;return e.filter((r?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":c,"blur.placeholder":h}).data("placeholder-enabled",!0).trigger("blur.placeholder"),e},f.input=r,f.textarea=i,a={get:function(e){var t=n(e),r=t.data("placeholder-password");return r?r[0].value:t.data("placeholder-enabled")&&t.hasClass("placeholder")?"":e.value},set:function(e,t){var r=n(e),i=r.data("placeholder-password");return i?i[0].value=t:r.data("placeholder-enabled")?(t==""?(e.value=t,e!=p()&&h.call(e)):r.hasClass("placeholder")?c.call(e,!0,t)||(e.value=t):e.value=t,r):e.value=t}},r||(o.input=a,u.value=a),i||(o.textarea=a,u.value=a),n(function(){n(t).delegate("form","submit.placeholder",function(){var e=n(".placeholder",this).each(c);setTimeout(function(){e.each(h)},10)})}),n(e).bind("beforeunload.placeholder",function(){n(".placeholder").each(function(){this.value=""})}))})(this,document,kQuery);