(function(n){"use strict";function t(n,t,i){return n.addEventListener?n.addEventListener(t,i,!1):n.attachEvent?n.attachEvent("on"+t,i):void 0}function i(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return!0;return!1}function r(n,t){var i;n.createTextRange?(i=n.createTextRange(),i.move("character",t),i.select()):n.selectionStart&&(n.focus(),n.setSelectionRange(t,t))}function u(n,t){try{return n.type=t,!0}catch(i){return!1}}n.Placeholders={Utils:{addEventListener:t,inArray:i,moveCaret:r,changeType:u}}})(this),function(n){"use strict";function nt(){}function tt(){try{return document.activeElement}catch(n){}}function v(n,t){var i,r,f=!!t&&n.value!==t,e=n.value===n.getAttribute(u);return(f||e)&&n.getAttribute(h)==="true"?(n.removeAttribute(h),n.value=n.value.replace(n.getAttribute(u),""),n.className=n.className.replace(gt,""),r=n.getAttribute(y),parseInt(r,10)>=0&&(n.setAttribute("maxLength",r),n.removeAttribute(y)),i=n.getAttribute(l),i&&(n.type=i),!0):!1}function b(n){var t,r,f=n.getAttribute(u);return n.value===""&&f?(n.setAttribute(h,"true"),n.value=f,n.className+=" "+k,r=n.getAttribute(y),r||(n.setAttribute(y,n.maxLength),n.removeAttribute("maxLength")),t=n.getAttribute(l),t?n.type="text":n.type==="password"&&i.changeType(n,"text")&&n.setAttribute(l,"password"),!0):!1}function it(n,t){var r,s,f,o,h,l,i;if(n&&n.getAttribute(u))t(n);else for(f=n?n.getElementsByTagName("input"):e,o=n?n.getElementsByTagName("textarea"):c,r=f?f.length:0,s=o?o.length:0,i=0,l=r+s;i<l;i++)h=i<r?f[i]:o[i-r],t(h)}function rt(n){it(n,v)}function at(n){it(n,b)}function vt(n){return function(){p&&n.value===n.getAttribute(u)&&n.getAttribute(h)==="true"?i.moveCaret(n,0):v(n)}}function yt(n){return function(){b(n)}}function pt(n){return function(t){return d=n.value,n.getAttribute(h)==="true"&&d===n.getAttribute(u)&&i.inArray(dt,t.keyCode)?(t.preventDefault&&t.preventDefault(),!1):void 0}}function wt(n){return function(){v(n,d),n.value===""&&(n.blur(),i.moveCaret(n,0))}}function bt(n){return function(){n===tt()&&n.value===n.getAttribute(u)&&n.getAttribute(h)==="true"&&i.moveCaret(n,0)}}function kt(n){return function(){rt(n)}}function ut(n){n.form&&(s=n.form,typeof s=="string"&&(s=document.getElementById(s)),s.getAttribute(et)||(i.addEventListener(s,"submit",kt(s)),s.setAttribute(et,"true"))),i.addEventListener(n,"focus",vt(n)),i.addEventListener(n,"blur",yt(n)),p&&(i.addEventListener(n,"keydown",pt(n)),i.addEventListener(n,"keyup",wt(n)),i.addEventListener(n,"click",bt(n))),n.setAttribute(ot,"true"),n.setAttribute(u,r),(p||n!==tt())&&b(n)}var ft=["text","search","url","tel","email","password","number","textarea"],dt=[27,33,34,35,36,37,38,39,40,8,46],k="placeholdersjs",gt=new RegExp("(?:^|\\s)"+k+"(?!\\S)"),e,c,u="data-placeholder-value",h="data-placeholder-active",l="data-placeholder-type",et="data-placeholder-submit",ot="data-placeholder-bound",y="data-placeholder-maxlength",ni=document.createElement("input"),st=document.getElementsByTagName("head")[0],ht=document.documentElement,o=n.Placeholders,i=o.Utils,p,ct,d,a,g,r,lt,s,t,w,f;if(o.nativeSupport=ni.placeholder!==void 0,!o.nativeSupport){for(e=document.getElementsByTagName("input"),c=document.getElementsByTagName("textarea"),p=ht.getAttribute("data-placeholder-focus")==="false",ct=ht.getAttribute("data-placeholder-live")!=="false",a=document.createElement("style"),a.type="text/css",g=document.createTextNode("."+k+" { color:#ccc; }"),a.styleSheet?a.styleSheet.cssText=g.nodeValue:a.appendChild(g),st.insertBefore(a,st.firstChild),f=0,w=e.length+c.length;f<w;f++)t=f<e.length?e[f]:c[f-e.length],r=t.attributes.placeholder,r&&(r=r.nodeValue,r&&i.inArray(ft,t.type)&&ut(t));lt=setInterval(function(){for(f=0,w=e.length+c.length;f<w;f++)t=f<e.length?e[f]:c[f-e.length],r=t.attributes.placeholder,r?(r=r.nodeValue,r&&i.inArray(ft,t.type)&&(t.getAttribute(ot)||ut(t),r===t.getAttribute(u)&&(t.type!=="password"||t.getAttribute(l))||(t.type==="password"&&!t.getAttribute(l)&&i.changeType(t,"text")&&t.setAttribute(l,"password"),t.value===t.getAttribute(u)&&(t.value=r),t.setAttribute(u,r)))):t.getAttribute(h)&&(v(t),t.removeAttribute(u));ct||clearInterval(lt)},100)}i.addEventListener(n,"beforeunload",function(){o.disable()}),o.disable=o.nativeSupport?nt:rt,o.enable=o.nativeSupport?nt:at}(this)