function initMailCheck(n){$(n).on("blur",function(){$(this).mailcheck({suggested:function(n,t){var i=_globalJsTextResources.MailCheck_Suggestion_Message.replace("[SUGGESTION]",t.full);$(n).parent().find(".mailcheck-message").remove();$(n).after("<div class='mailcheck-message alert-warning' style='margin-top: 10px;padding: 10px;'>"+i+"<\/div>")},empty:function(n){$(n).parent().find(".mailcheck-message").remove()}})})}var Mailcheck={domainThreshold:4,topLevelThreshold:3,defaultDomains:["yahoo.com","google.com","hotmail.com","gmail.com","me.com","aol.com","mac.com","live.com","comcast.net","googlemail.com","msn.com","hotmail.co.uk","yahoo.co.uk","facebook.com","verizon.net","sbcglobal.net","att.net","gmx.com","mail.com","outlook.com","icloud.com"],defaultTopLevelDomains:["co.jp","co.uk","com","net","org","info","edu","gov","mil","ca"],run:function(n){n.domains=n.domains||Mailcheck.defaultDomains;n.topLevelDomains=n.topLevelDomains||Mailcheck.defaultTopLevelDomains;n.distanceFunction=n.distanceFunction||Mailcheck.sift3Distance;var t=function(n){return n},r=n.suggested||t,u=n.empty||t,i=Mailcheck.suggest(Mailcheck.encodeEmail(n.email),n.domains,n.topLevelDomains,n.distanceFunction);return i?r(i):u()},suggest:function(n,t,i,r){var u,f,e,o;if(n=n.toLowerCase(),u=this.splitEmail(n),f=this.findClosestDomain(u.domain,t,r,this.domainThreshold),f){if(f!=u.domain)return{address:u.address,domain:f,full:u.address+"@"+f}}else if(e=this.findClosestDomain(u.topLevelDomain,i,r,this.topLevelThreshold),u.domain&&e&&e!=u.topLevelDomain)return o=u.domain,f=o.substring(0,o.lastIndexOf(u.topLevelDomain))+e,{address:u.address,domain:f,full:u.address+"@"+f};return!1},findClosestDomain:function(n,t,i,r){var o,f,e,u;if(r=r||this.topLevelThreshold,f=99,e=null,!n||!t)return!1;for(i||(i=this.sift3Distance),u=0;u<t.length;u++){if(n===t[u])return n;o=i(n,t[u]);o<f&&(f=o,e=t[u])}return f<=r&&e!==null?e:!1},sift3Distance:function(n,t){var r;if(n==null||n.length===0)return t==null||t.length===0?0:t.length;if(t==null||t.length===0)return n.length;for(var i=0,u=0,f=0,e=0;i+u<n.length&&i+f<t.length;){if(n.charAt(i+u)==t.charAt(i+f))e++;else for(u=0,f=0,r=0;r<5;r++){if(i+r<n.length&&n.charAt(i+r)==t.charAt(i)){u=r;break}if(i+r<t.length&&n.charAt(i)==t.charAt(i+r)){f=r;break}}i++}return(n.length+t.length)/2-e},splitEmail:function(n){var u=n.trim().split("@"),t;if(u.length<2)return!1;for(t=0;t<u.length;t++)if(u[t]==="")return!1;var f=u.pop(),i=f.split("."),r="";if(i.length==0)return!1;if(i.length==1)r=i[0];else{for(t=1;t<i.length;t++)r+=i[t]+".";i.length>=2&&(r=r.substring(0,r.length-1))}return{topLevelDomain:r,domain:f,address:u.join("@")}},encodeEmail:function(n){var t=encodeURI(n);return t.replace("%20"," ").replace("%25","%").replace("%5E","^").replace("%60","`").replace("%7B","{").replace("%7C","|").replace("%7D","}")}};typeof module!="undefined"&&module.exports&&(module.exports=Mailcheck);typeof window!="undefined"&&window.jQuery&&function(n){n.fn.mailcheck=function(n){var t=this,i,r;n.suggested&&(i=n.suggested,n.suggested=function(n){i(t,n)});n.empty&&(r=n.empty,n.empty=function(){r.call(null,t)});n.email=this.val();Mailcheck.run(n)}}(jQuery);$(function(){Mailcheck.defaultTopLevelDomains.push("nl","de")})