// JavaScript Document

$(document).ready(function() {

	jQuery.fn.mailto = function() {
		return this.each(function(){
			var email = $(this).html().replace(/\s*\(.+\)\s*/, "@");
			$(this).before('<a href="mailto:' + email + '" rel="nofollow" title="Email ' + email + '" id="contact-email">' + email + '</a>').remove();
		});
	};
	
	if ($('#contact-email').length > 0){
		$('#contact-email').mailto();
	}
	
	if ($('img').length > 0){
		$('img').parent().css('text-align', 'center');
	}
});

