(function(a){a.fn.mask=function(f){var e=this;this.unmask();if(this.css("position")=="static"){this.addClass("masked-relative")}this.addClass("masked");var g=a('<div class="loadmask"></div>');if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){g.height(this.height()+parseInt(this.css("padding-top"))+parseInt(this.css("padding-bottom")));g.width(this.width()+parseInt(this.css("padding-left"))+parseInt(this.css("padding-right")))}if(navigator.userAgent.toLowerCase().indexOf("msie 6")>-1){this.find("select").addClass("masked-hidden")}this.append(g);if(typeof f=="string"){var c=a('<div class="loadmask-msg" style="display:none;"></div>');c.append("<div>"+f+"</div>");this.append(c);var b=70;var d=30;c.css("top",d+"px");c.css("left",b+"px");c.css("width",Math.round(this.width()-(b*2)-parseInt(c.css("padding-left"))-parseInt(c.css("padding-right")))+"px");c.css("height",Math.round(this.height()-(d*2)-parseInt(c.css("padding-top"))-parseInt(c.css("padding-bottom")))+"px");c.click(function(){e.unmask()});c.show()}};a.fn.unmask=function(b){this.find(".loadmask-msg,.loadmask").remove();this.removeClass("masked");this.removeClass("masked-relative");this.find("select").removeClass("masked-hidden")};a.fn.updateMask=function(b){this.find(".loadmask-msg").html(b)}})(jQuery);