(function(A){A.fn.pstrength=function(B){var B=A.extend({verdects:["very weak","weak","medium","strong","stronger"],scores:[16,25,35,45]},B);return this.each(function(){var C=A(this).attr("id");A(this).after('<div id="'+C+'_text"></div>');A(this).after('<div id="'+C+'_bar" style="border: 1px solid white; font-size: 1px; height: 2px; width: 0px;"></div>');A(this).keyup(function(){A.fn.runPassword(A(this).val(),C,B)})})};A.fn.runPassword=function(B,G,F){nPerc=A.fn.checkPassword(B,F);var H="#"+G+"_bar";var E="#"+G+"_text";var D=Math.round(nPerc*2.2);if(D<(B.length*5)){D+=B.length*5}if(D>100){D=100}A(H).css({width:D+"%"});if(nPerc<=F.scores[0]){strColor="red";strText=F.verdects[0]}else{if(nPerc>F.scores[0]&&nPerc<=F.scores[1]){strColor="#ffd801";strText=F.verdects[1]}else{if(nPerc>F.scores[1]&&nPerc<=F.scores[2]){strColor="#ffd801";strText=F.verdects[2]}else{if(nPerc>F.scores[2]&&nPerc<=F.scores[3]){strColor="orange";strText=F.verdects[3]}else{strColor="#3bce08";strText=F.verdects[4]}}}}A(H).css({backgroundColor:strColor});A(E).html("<span style='color: "+strColor+";'>"+strText+"</span>")};A.fn.checkPassword=function(E,B){var D=0;var F=B.verdects[0];if(E.length<5){D=(D+3)}else{if(E.length>4&&E.length<8){D=(D+6)}else{if(E.length>7&&E.length<16){D=(D+12)}else{if(E.length>15){D=(D+18)}}}}if(E.match(/[a-z]/)){D=(D+1)}if(E.match(/[A-Z]/)){D=(D+5)}if(E.match(/\d+/)){D=(D+5)}if(E.match(/(.*[0-9].*[0-9].*[0-9])/)){D=(D+5)}if(E.match(/.[!,@,#,$,%,^,&,*,?,_,~]/)){D=(D+5)}if(E.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/)){D=(D+5)}if(E.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)){D=(D+2)}if(E.match(/([a-zA-Z])/)&&E.match(/([0-9])/)){D=(D+2)}if(E.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/)){D=(D+2)}return D}})(jQuery)