$(document).ready(function()
{
	$('body *').each(function()
	{
		var removeRegexp = /^([^\@\s]+)\@\[remove\-this\]\.(.*?)$/i;
		if($(this).attr('href') && removeRegexp.test($(this).attr('href')))
			$(this).attr({href: $(this).attr('href').replace(removeRegexp, '$1@$2')});
		if($(this).text() && removeRegexp.test($(this).text()))
			$(this).text($(this).text().replace(removeRegexp, '$1@$2'));
	});
	
	// Unobscure href obscured email addresses
	/*$("a[href*='mailto:']").each(function()
	{
		var removeRegexp = /\[remove\-this\]\./i;
		// Get the correct link
		var linkHref = $(this).attr('href').replace(removeRegexp, '');
		
		// Set the href attribute
		$(this).attr({href: linkHref});
		
		// Unobcure the link text, if its got remove message in it
		if(removeRegexp.test($(this).text())) $(this).text($(this).text().replace(removeRegexp, ''));
			
	});*/
	
	// Make rel="ext" links open in new window
	$('a, .new-window').each(function()
	{
		if($(this).attr('rel') && $(this).attr('rel').match(/ext/i))
			this.target = '_blank';
	});
});