/*placeholder*/
(function(B){var C="placeholder",A=C in document.createElement("input");B.fn.placeholder=function(D){return this.each(function(){var E=B(this);if(typeof D==="string"){D={text:D}}var L=B.extend({text:"",style:{},namespace:"placeholder",useNative:true,hideOnFocus:true},D||{});if(!L.text){L.text=E.attr(C)}if(!L.useNative){E.removeAttr(C)}else{if(A){E.attr(C,L.text);return}}var F=E.outerWidth(),R=E.outerHeight();var P=["marginTop","marginLeft","paddingLeft"];var J=function(){I.show()};var K=function(){I.hide()};var M=function(){return !E.val()};var Q=function(){M()?J():K()};var G=function(){var S=E.position();if(!L.hideOnFocus){S.left+=2}I.css(S);B.each(P,function(U,T){I.css(T,E.css(T))})};var O={color:"#808080",cursor:"text",textAlign:"left",position:"absolute",fontSize:E.css("fontSize"),fontFamily:E.css("fontFamily"),display:M()?"block":"none"};var N={text:L.text,width:F,height:"auto"};var H="."+L.namespace,I=E.data("layer"+H);if(!I){E.data("layer"+H,I=B("<div>",N).appendTo(E.offsetParent()))}I.css(B.extend(O,L.style)).unbind("click"+H).bind("click"+H,function(){L.hideOnFocus&&K();E.focus()});E.unbind(H).bind("blur"+H,Q);if(L.hideOnFocus){E.bind("focus"+H,K)}else{E.bind("keypress keydown"+H,function(T){var S=T.keyCode;if(T.charCode||(S>=65&&S<=90)){K()}}).bind("keyup"+H,Q)}E.get(0).onpropertychange=Q;G();Q()})}})(jQuery);

