jQuery(document).ready(function(a){ws_plugin__s2member_uniqueFilesDownloaded=[];if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN&&S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY1)?"s":"")+" in the last "+S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS+" days.\n\n";b+="You're entitled to "+((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED)?"UNLIMITED downloads though ( so, no worries ).":S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED+" unique downloads every "+S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS+" day period.");if(this.href.match(/s2member_skip_confirmation/i)||confirm(b)){if(a.inArray(this.href,ws_plugin__s2member_uniqueFilesDownloaded)===-1){ws_plugin__s2member_uniqueFilesDownloaded.push(this.href),S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY++}return true}else{return false}}else{return true}})}a("form#ws-plugin--s2member-profile").submit(function(){var e=this,d="",c="",g="";var b=a("input#ws-plugin--s2member-profile-password");var f=a("input#ws-plugin--s2member-profile-password-confirmation");a(":input",e).each(function(){if((d=a.trim(a(this).parent("label").children("strong").slice(0,1).text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){g+=c+"\n\n"}}});if(g=a.trim(g)){alert("Oops, you missed something:\n\n"+g);return false}else{if(a.trim(b.val())&&a.trim(b.val())!==a.trim(f.val())){alert("Oops, you missed something:\n\nPasswords do not match up. Please try again.");return false}}return true});if(location.href.match(/\/wp-signup\.php/)){a("div#content > div.mu_register > form#setupform").submit(function(){var d=this,c="",b="",e="";a("input#user_name, input#user_email, input#blogname, input#blog_title",d).each(function(){if((c=a.trim(a(this).prev("label").text().replace(/[\r\n\t]+/g," ")))){if(b=ws_plugin__s2member_validationErrors(c,this,d,true)){e+=b+"\n\n"}}else{if((c=a.trim(a(this).prev("span.prefix_address").prev("label").text().replace(/[\r\n\t]+/g," ")))){if(b=ws_plugin__s2member_validationErrors(c,this,d,true)){e+=b+"\n\n"}}}});a(":input",d).each(function(){if((c=a.trim(a(this).prev("label").text().replace(/[\r\n\t]+/g," ")))){if(b=ws_plugin__s2member_validationErrors(c,this,d)){e+=b+"\n\n"}}});if(e=a.trim(e)){alert("Oops, you missed something:\n\n"+e);return false}return true})}else{if(location.href.match(/\/wp-login\.php/)){a("div#login > form#registerform input#wp-submit").attr("tabindex","1000");a("div#login > form#registerform").submit(function(){var d=this,c="",b="",e="";a("input#user_login, input#user_email",d).each(function(){if((c=a.trim(a(this).parent("label").text().replace(/[\r\n\t]+/g," ")))){if(b=ws_plugin__s2member_validationErrors(c,this,d,true)){e+=b+"\n\n"}}});a(":input",d).each(function(){if((c=a.trim(a(this).parent("label").children("span").slice(0,1).text().replace(/[\r\n\t]+/g," ")))){if(b=ws_plugin__s2member_validationErrors(c,this,d)){e+=b+"\n\n"}}});if(e=a.trim(e)){alert("Oops, you missed something:\n\n"+e);return false}return true})}else{if(location.href.match(/\/wp-admin\/(user\/)?profile\.php/)){a("form#your-profile").submit(function(){var d=this,c="",b="",e="";a(':input[id^="ws-plugin--s2member-profile-"]',d).each(function(){if((c=a.trim(a(this).parent("td").prev("th").children("label").slice(0,1).text().replace(/[\r\n\t]+/g," ")))){if(b=ws_plugin__s2member_validationErrors(c,this,d)){e+=b+"\n\n"}}});if(e=a.trim(e)){alert("Oops, you missed something:\n\n"+e);return false}return true})}}}ws_plugin__s2member_validationErrors=function(l,k,c,g,f){if(typeof l==="string"&&l&&typeof k==="object"&&typeof c==="object"){if(typeof k.tagName==="string"&&k.tagName.match(/^(input|textarea|select)$/i)&&!k.disabled){var n=k.tagName.toLowerCase(),j=a(k),i=String(j.attr("type")).toLowerCase(),b=String(j.attr("name")),m=j.val();var g=(typeof g==="boolean")?g:(j.attr("aria-required")==="true"),f=(typeof f==="string")?f:j.attr("data-expected");if(n==="input"&&i==="checkbox"&&b.match(/\[\]$/)){if(typeof k.id==="string"&&k.id.match(/-0$/)){if(g&&!a('input[name="'+b.replace(/([\[\]])/g,"$1")+'"]:checked',c).length){return l+"\nPlease check at least one of the boxes."}}}else{if(n==="input"&&i==="checkbox"){if(g&&!k.checked){return l+"\nRequired. This box must be checked."}}else{if(n==="input"&&i==="radio"){if(typeof k.id==="string"&&k.id.match(/-0$/)){if(g&&!a('input[name="'+b.replace(/([\[\]])/g,"$1")+'"]:checked',c).length){return l+"\nPlease select one of the options."}}}else{if(n==="select"&&j.attr("multiple")){if(g&&(!(m instanceof Array)||!m.length)){return l+"\nPlease select at least one of the options."}}else{if(typeof m!=="string"||(g&&!(m=a.trim(m)).length)){return l+"\nThis is a required field, please try again."}else{if((m=a.trim(m)).length&&((n==="input"&&i.match(/^(text|password)$/i))||n==="textarea")&&typeof f==="string"&&f.length){if(f==="numeric-wp-commas"&&(!m.match(/^[0-9\.,]+$/)||isNaN(m.replace(/,/g,"")))){return l+"\nMust be numeric ( with or without decimals, commas allowed )."}else{if(f==="numeric"&&(!m.match(/^[0-9\.]+$/)||isNaN(m))){return l+"\nMust be numeric ( with or without decimals, no commas )."}else{if(f==="integer"&&(!m.match(/^[0-9]+$/)||isNaN(m))){return l+"\nMust be an integer ( a whole number, without any decimals )."}else{if(f==="integer-gt-0"&&(!m.match(/^[0-9]+$/)||isNaN(m)||m<=0)){return l+"\nMust be an integer > 0 ( whole number, no decimals, greater than 0 )."}else{if(f==="float"&&(!m.match(/^[0-9\.]+$/)||!m.match(/[0-9]/)||!m.match(/\./)||isNaN(m))){return l+"\nMust be a float ( floating point number, decimals required )."}else{if(f==="float-gt-0"&&(!m.match(/^[0-9\.]+$/)||!m.match(/[0-9]/)||!m.match(/\./)||isNaN(m)||m<=0)){return l+"\nMust be a float > 0 ( floating point number, decimals required, greater than 0 )."}else{if(f==="date"&&!m.match(/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/)){return l+"\nMust be a date ( required date format: dd/mm/yyyy )."}else{if(f==="email"&&!m.match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return l+"\nMust be a valid email address."}else{if(f==="url"&&!m.match(/^http(s?)\:\/\/(.{5,})$/i)){return l+"\nMust be a full URL ( starting with http or https )."}else{if(f==="domain"&&!m.match(/^([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return l+"\nMust be a domain name ( domain name only, without http )."}else{if(f==="phone"&&(!m.match(/^[0-9 \(\)\-]+$/)||m.replace(/[^0-9]/g,"").length!==10)){return l+"\nMust be a phone # ( 10 digits w/possible hyphens,spaces,brackets )."}else{if(f==="uszip"&&!m.match(/^[0-9]{5}(-[0-9]{4})?$/)){return l+"\nMust be a US zipcode ( 5-9 digits w/possible hyphen )."}else{if(f==="cazip"&&!m.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return l+"\nMust be a Canadian zipcode ( 6 alpha-numerics w/possible space )."}else{if(f==="uczip"&&!m.match(/^[0-9]{5}(-[0-9]{4})?$/)&&!m.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return l+"\nMust be a zipcode ( either a US or Canadian zipcode )."}else{if(f.match(/^alphanumerics-spaces-punctuation-([0-9]+)(-e)?$/)&&!m.match(/^[a-z 0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return l+"\nPlease use alphanumerics, spaces & punctuation only."}else{if(f.match(/^alphanumerics-spaces-([0-9]+)(-e)?$/)&&!m.match(/^[a-z 0-9]+$/i)){return l+"\nPlease use alphanumerics & spaces only."}else{if(f.match(/^alphanumerics-punctuation-([0-9]+)(-e)?$/)&&!m.match(/^[a-z0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return l+"\nPlease use alphanumerics & punctuation only ( no spaces )."}else{if(f.match(/^alphanumerics-([0-9]+)(-e)?$/)&&!m.match(/^[a-z0-9]+$/i)){return l+"\nPlease use alphanumerics only ( no spaces/punctuation )."}else{if(f.match(/^alphabetics-([0-9]+)(-e)?$/)&&!m.match(/^[a-z]+$/i)){return l+"\nPlease use alphabetics only ( no digits/spaces/punctuation )."}else{if(f.match(/^numerics-([0-9]+)(-e)?$/)&&!m.match(/^[0-9]+$/i)){return l+"\nPlease use numeric digits only."}else{if(f.match(/^(any|alphanumerics-spaces-punctuation|alphanumerics-spaces|alphanumerics-punctuation|alphanumerics|alphabetics|numerics)-([0-9]+)(-e)?$/)){var h=f.split("-"),d=Number(h[1]),e=(h.length>2)?Number(h[2]):"";if(e&&m.length!==d){return l+"\nMust be exactly "+d+" "+((h[0]==="numerics")?"digit":"character")+((d>1)?"s":"")+"."}else{if(m.length1)?"s":"")+"."}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return""}});