﻿
if(typeof $!='undefined'){if(typeof String.prototype.startsWith=='undefined'){String.prototype.startsWith=function(s){return this.indexOf(s)==0;}}
mslPageTools={init:function(params){var emailTarget=(params)?params.emailTarget:'#page-tools a.email';$(emailTarget).bind('click',function(){mslPageTools.mailtoLink(this);return false;});},mailtoLink:function(This){if(!This){return false;}
var urlArr=$(This).attr('href').split('http%3a%2f%2f')||false;if(!urlArr||urlArr.length==0){return false;}
var current=this._getUrl();if(current){window.location=urlArr[0]+this._encode(String(current).toLowerCase().replace(/%3e/g,"").replace(/%22/g,"").replace(/%3c/g,"").replace(/javascript:/g,""));}},_getUrl:function(){return window.location||false;},_encode:function(str){if(!str||str==''){return false;}
return encodeURIComponent(str);},_decode:function(str){if(!str||str==''){return false;}
return decodeURIComponent(str);}};$(document).ready(function(){mslPageTools.init();});};
