function playEdit(e) {
    $("input[type=text],input[type=password],textarea").css("border", "solid 1px gray").focusin(function () { $(window).scrollTop($(this).offset().top - parseInt($(window).height() / 2, 10) + 30) }).each(function () {
        typeof $(this).attr("mask") == "string" && $(this).attr("mask") != "" && $(this).keydown(function (e) {
            var b = e.which, g = $(this).attr("id"), a = $("#" + g).val(), h = parseInt($(this).attr("maxlength"), 10), c = $(this).attr("mask"), f = "", d = ""; b != 9 && b != 13 && b != 46 && b != 39 && e.preventDefault(); if (b == 8) a = a.slice(0,
a.length - 1), c.charAt(a.length - 1) != "9" && c.charAt(a.length - 1) != "A" && c.charAt(a.length - 1) != "X" && c.charAt(a.length - 1) != "W" && c.charAt(a.length - 1) != "?" && c.charAt(a.length - 1) != "" && (a = a.slice(0, a.length - 1)); else if (a.length < h) if (d = f = "", c.charAt(a.length) == "") d = String.fromCharCode(b), a += d; else {
                c.charAt(a.length) != "9" && c.charAt(a.length) != "A" && c.charAt(a.length) != "X" && c.charAt(a.length) != "W" && c.charAt(a.length) != "?" && (f = c.charAt(a.length), a += f); if ("9X".indexOf(c.charAt(a.length)) != -1 && (b >= 48 && b <= 57 || b >= 96 &&
b <= 105)) b >= 96 && b <= 105 && (b -= 48), d = String.fromCharCode(b), a += d; if (d == "" && "AX".indexOf(c.charAt(a.length)) != -1 && (b >= 65 && b <= 90 || b >= 97 && b <= 122)) d = String.fromCharCode(b), a += d; d == "" && "W".indexOf(c.charAt(a.length)) != -1 && b >= 32 && b <= 126 && (d = String.fromCharCode(b), a += d); d == "" && "?".indexOf(c.charAt(a.length)) != -1 && b >= 32 && b <= 254 && (d = String.fromCharCode(b), a += d); f != "" && d == "" && (a = a.slice(a, a.length - 1))
            } $("#" + g).val(a)
        }); wMessage = typeof $(this).attr("message") == "string" && $(this).attr("message") != "" ? $(this).attr("message") :
""; wError = typeof $(this).attr("error") == "string" && $(this).attr("error") != "" ? $(this).attr("error") : "Conte\u00fado inv\u00e1lido"; $(this).after('<div class="taskmessage" style="padding-left:10px;display:inline;height:14px;font-family:verdana;font-size:11px;color:blue;">' + wMessage + "</div>").after('<div class="taskerror" style="padding-left:10px;display:none;height:14px;font-family:verdana;font-size:11px;color:red;">' + wError + "</div>").after('<div class="taskok" style="padding-left:10px;display:none;height:14px;font-family:verdana;font-size:11px;color:green;">OK</div>');
        typeof $(this).attr("regexp") == "string" && $(this).focusout(function () {
            RegExp($(this).attr("regexp")).test($(this).val()) ? $(this).after('<img class="taskimg" style="height:14px;margin-left:-8px;position:relative;top:3px;padding-right:4px;" src="' + e.validPicture + '">').siblings(".taskok").css("padding-left", "0px").css("display", "inline").end().siblings(".taskerror,.taskmessage").hide() : $(this).css("border", "solid 1px red").after('<img class="taskimg" style="height:14px;margin-left:-8px;position:relative;top:3px;padding-right:4px;" src="' +
e.invalidPicture + '">').siblings(".taskerror").css("display", "inline").css("padding-left", "0px").end().siblings(".taskmessage,.taskok").hide()
        }).focusin(function () { $(this).css("border", "solid 1px gray").siblings(".taskimg").remove().end().siblings(".taskmessage").css("padding-left", "10px").css("display", "inline").end().siblings(".taskerror,.taskok").hide() })
    }); $("form").submit(function () {
        $(this).find("input,textarea").focusin().focusout(); if ($(this).find(".taskerror:visible").size() > 0) return alert("Verifique os erros nos campos antes de proseguir!"),
$(this).find(".taskerror:visible").eq(0).siblings("input").focusin().focus(), !1; else hideBody() && hideBody()
    })
};
