(function(e){var d=!e.browser.msie&&("placeholder" in document.createElement("input")),f,g=[],a=function(){var k=0,h,j;for(;k<g.length;k++){h=g[k].input;j=g[k].holder;if(!h[0]||!j[0]){g.splice(k,1)}else{j[e.trim(h.val()).length?"hide":"show"]()}}if(g.length==0&&f){window.clearInterval(f);f=0}},c=function(h,k){if(!f){f=window.setInterval(a,200)}var l=g.length,j=0;for(;j<l;j++){if(g[j].input[0]==h[0]){return}}g.push({input:h,holder:k})};var b=function(h){return e(h).each(function(){var m=e(this),i=m[0].tagName.toLowerCase()=="input"?m:m.find("input"),k;if(i[0]){k=i.attr("myholder")||"";if(k){if(d){i[0].placeholder=k;return}i.after("<i class='placeholder'>"+k+"</i>");var l=i.parent().addClass("holderBox"),j=l.find(".placeholder");i.bind("keypress keyup",function(){j[e.trim(this.value).length?"hide":"show"]()});j.bind("click mousedown mouseup",function(n){n.stopPropagation();switch(n.type){case"mousedown":case"mouseup":i.triggerHandler(n.type);break;case"click":i.trigger(n.type);i[0].focus();break}});c(i,j)}}})};e.fn.placeholder=function(){return b(this)}})(jQuery);