jQuery(function( $ ) {
	
	var methods =  {

		changemt: function()
		{
			$(this).find("*").filter( function()	{
				if(!$(this).attr('href')){ return false;}								
				if($(this).attr("href").match(/^[a-zA-Z0-9#*_-]+$/g) && $(this).attr("href").length>1) {
					var nh = $(this).attr("href").replace(/#/g,'.').replace(/\*/g,'@');					
					$(this).attr({'href':'ma'+'ilt'+'o:'+nh});
 					this.changemc = methods.changemc;
					this.changemc();
				} else {
					return false;
				}
			});
		},
		changemc: function()
		{
			var nr = new RegExp("[a-zA-Z#_-]{2,}\\*([a-zA-Z0-9_-]+#){1,7}[a-zA-Z]{2,3}","gi");
			$(this).filter(function(){
				var mx = 0;
				while(t = nr.exec($(this).html()))
				{
					var k = t[0].replace(/#/g,'.').replace(/\*/g,'@');
					$(this).html($(this).html().replace(t[0],k));
					mx++;
					if(mx>methods.max) break;
				}
				nr.lastIndex = 0;
			})
		},
		max:1000
	};
		
	$.fn.msecret = function( method )	{
		// Method calling logic
		if ( methods[method] ) {
		  return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 ));
		} else if ( typeof method === 'object' || ! method ) {
		  return methods.changemt.apply( this, arguments );
		}
	}
});
