$(document).ready(function() {
	
	$('a').click(function() {
		var href = $(this).attr('href');
		if(href.charAt(0) == "#") {
			document.location.hash = $(this).attr('href');
			return false;
		}
	});

	// unobfuscates email addresses
	$("a[href^='mailto:']").each(function() {
		var linkhtml = $(this).html();
		linkhtml = linkhtml.replace(/\[dot\]/, '.');
		linkhtml = linkhtml.replace(/\[at\]/, '@');
		$(this).html(linkhtml);
		var link = $(this).attr('href');
		link = link.replace(/([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+/,function(c){
			return c.replace(/[a-zA-Z]/g, function(c){ return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26); });
		});
		$(this).attr('href',link);
	});
	
	$('.js_hide').hide();
		
});
