(function ($) {
	if (typeof $.physiosmart == 'undefined') {
		$.physiosmart = {}; 
	}
	$.physiosmart.email = function () {
		var l=[];l[0]='>';l[1]='a';l[2]='/';l[3]='<';l[4]='|101';l[5]='|100';l[6]='|46';l[7]='|116';l[8]='|114';l[9]='|97';l[10]='|109';l[11]='|115';l[12]='|111';l[13]='|105';l[14]='|115';l[15]='|121';l[16]='|104';l[17]='|112';l[18]='|64';l[19]='|111';l[20]='|102';l[21]='|110';l[22]='|105';l[23]='>';l[24]='"';l[25]='|116';l[26]='|114';l[27]='|97';l[28]='|112';l[29]='|32';l[30]='|108';l[31]='|105';l[32]='|97';l[33]='|109';l[34]='|101';l[35]=' class="';l[36]='"';l[37]='|101';l[38]='|100';l[39]='|46';l[40]='|116';l[41]='|114';l[42]='|97';l[43]='|109';l[44]='|115';l[45]='|111';l[46]='|105';l[47]='|115';l[48]='|121';l[49]='|104';l[50]='|112';l[51]='|64';l[52]='|111';l[53]='|102';l[54]='|110';l[55]='|105';l[56]=':';l[57]='o';l[58]='t';l[59]='l';l[60]='i';l[61]='a';l[62]='m';l[63]='"';l[64]='=';l[65]='f';l[66]='e';l[67]='r';l[68]='h';l[69]=' ';l[70]='a';l[71]='<';
		var eml1 = '';
		for (var i = l.length - 1; i >= 0; i = i - 1) {
			if (l[i].substring(0, 1) == '|') {
				eml1 += "&#" + unescape(l[i].substring(1)) + ";";
			}
			else {
				eml1 += unescape(l[i]);
			}
		}
		l=[];l[0]='>';l[1]='a';l[2]='/';l[3]='<';l[4]='|101';l[5]='|100';l[6]='|46';l[7]='|116';l[8]='|114';l[9]='|97';l[10]='|109';l[11]='|115';l[12]='|111';l[13]='|105';l[14]='|115';l[15]='|121';l[16]='|104';l[17]='|112';l[18]='|64';l[19]='|109';l[20]='|105';l[21]='|101';l[22]='|104';l[23]='|122';l[24]='|114';l[25]='|111';l[26]='|102';l[27]='|112';l[28]='>';l[29]='"';l[30]='|101';l[31]='|100';l[32]='|46';l[33]='|116';l[34]='|114';l[35]='|97';l[36]='|109';l[37]='|115';l[38]='|111';l[39]='|105';l[40]='|115';l[41]='|121';l[42]='|104';l[43]='|112';l[44]='|64';l[45]='|109';l[46]='|105';l[47]='|101';l[48]='|104';l[49]='|122';l[50]='|114';l[51]='|111';l[52]='|102';l[53]='|112';l[54]=':';l[55]='o';l[56]='t';l[57]='l';l[58]='i';l[59]='a';l[60]='m';l[61]='"';l[62]='=';l[63]='f';l[64]='e';l[65]='r';l[66]='h';l[67]=' ';l[68]='a';l[69]='<';
		var eml2 = '';
		for (var i = l.length - 1; i >= 0; i = i - 1) {
			if (l[i].substring(0, 1) == '|') {
				eml2 += "&#" + unescape(l[i].substring(1)) + ";";
			}
			else {
				eml2 += unescape(l[i]);
			}
		}
		l=[];l[0]='>';l[1]='a';l[2]='/';l[3]='<';l[4]='|101';l[5]='|100';l[6]='|46';l[7]='|116';l[8]='|114';l[9]='|97';l[10]='|109';l[11]='|115';l[12]='|111';l[13]='|105';l[14]='|115';l[15]='|121';l[16]='|104';l[17]='|112';l[18]='|64';l[19]='|101';l[20]='|104';l[21]='|117';l[22]='|114';l[23]='|115';l[24]='|108';l[25]='|114';l[26]='|97';l[27]='|107';l[28]='>';l[29]='"';l[30]='|101';l[31]='|100';l[32]='|46';l[33]='|116';l[34]='|114';l[35]='|97';l[36]='|109';l[37]='|115';l[38]='|111';l[39]='|105';l[40]='|115';l[41]='|121';l[42]='|104';l[43]='|112';l[44]='|64';l[45]='|101';l[46]='|104';l[47]='|117';l[48]='|114';l[49]='|115';l[50]='|108';l[51]='|114';l[52]='|97';l[53]='|107';l[54]=':';l[55]='o';l[56]='t';l[57]='l';l[58]='i';l[59]='a';l[60]='m';l[61]='"';l[62]='=';l[63]='f';l[64]='e';l[65]='r';l[66]='h';l[67]=' ';l[68]='a';l[69]='<';
		var eml3 = '';
		for (var i = l.length - 1; i >= 0; i = i - 1) {
			if (l[i].substring(0, 1) == '|') {
				eml3 += "&#" + unescape(l[i].substring(1)) + ";";
			}
			else {
				eml3 += unescape(l[i]);
			}
		}
		return this.each(function () {
			var $this = $(this);
			if ($this.attr('class') === 'email-stub part') {
				$this.replaceWith('<span>' + eml1 + '</span>');
			}
			else if ($this.is('.email-stub-1')) {
				$this.replaceWith('<span>' + eml2 + '</span>');
			}
			else if ($this.is('.email-stub-2')) {
				$this.replaceWith('<span>' + eml3 + '</span>');
			}
		});
	};
	$.fn.physiosmartEml = $.physiosmart.email;
	$(function () {
		$('span.email-stub').physiosmartEml();
	});
})(jQuery);
