jQuery(document).ready(function(){jQuery("#signup_password_confirm").after('<div id="pass-strength-result">'+pwsL10n.title+"</div><p>"+pwsL10n.desc+"</p>");jQuery("#signup_password").val("").keyup(b);jQuery("#signup_password_confirm").val("").keyup(b);function b(){var e=jQuery("#signup_password").val(),d=jQuery("#signup_username").val(),c=jQuery("#signup_password_confirm").val(),f;jQuery("#pass-strength-result").removeClass("short bad good strong");if(!e){jQuery("#pass-strength-result").html(pwsL10n.empty);return}f=a(e,d,c);switch(f){case 2:jQuery("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:jQuery("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:jQuery("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:jQuery("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:jQuery("#pass-strength-result").addClass("short").html(pwsL10n["short"])}}function a(h,k,f){var m=1,j=2,d=3,c=4,e=5,i=0,l,g;if((h!=f)&&f.length>0){return e}if(h.length<4){return m}if(h.toLowerCase()==k.toLowerCase()){return j}if(h.match(/[0-9]/)){i+=10}if(h.match(/[a-z]/)){i+=26}if(h.match(/[A-Z]/)){i+=26}if(h.match(/[^a-zA-Z0-9]/)){i+=31}l=Math.log(Math.pow(i,h.length));g=l/Math.LN2;if(g<40){return j}if(g<56){return d}return c}});