!function(a){function b(){var b=a("#dia").val(),c=a("#mes").val(),d=a("#ano").val(),e=31;""!=c?(c=parseInt(c),0>c?(c=1,a("#mes").val(c)):c>12&&(c=12,a("#mes").val(c)),2!=c?e=7>=c?0==c%2?30:31:0==c%2?31:30:""!=d?4==d.length&&(d=parseInt(d),e=0==d%4&&0!=d%100||0==d%400?29:28):4==d.length&&(e=28)):e=31,""!=b&&(b=parseInt(b),0>b?a("#dia").val(1):b>e&&a("#dia").val(e))}function c(a){return b(),8!=a.which&&0!=a.which&&(a.which<48||a.which>57)?!1:void 0}a(".small-text").keypress(c),a("#document-upload").submit(function(){return""==a("#file").val()?(alert("Insira um documento"),!1):void 0})}(jQuery);