$(document).ready(function() {
	/* MENU HIGHLIGHT */
	$(function() {
		if (location.pathname.substring(1))
			$('#menu a[@href*="' + location.pathname.substring(1,location.pathname.indexOf("/",1)) + '"]').css({backgroundPosition: '0 100%'});	
	});

	/* MAILTO SCRIPT
	Syntax: <a href="#youremail(at)yourdomain.com" rel="email">youremail(at)yourdomain.com</a>
	*/

	$('a[rel=email]').each(function() {
		var email = this.innerHTML;
		var email = email.split('\(at\)');

		$(this).click(function () {       
			document.location = "mailto:" + email[0] + "@" + email[1];     
			return false;
		});
	});
});