function include(script_filename) {
  document.write('<' + 'script');
  document.write(' language="javascript"');
  document.write(' type="text/javascript"');
  document.write(' src="' + script_filename + '">');
  document.write('</' + 'script' + '>');
}

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
} 

$(document).ready(function(){
	externalLinks();
	$('#ministries').tabs({ fxAutoHeight: true });
	$('#ministries').disableTab(6);
	
	$(".staff").each(function() {
	  $(this).children("div:even").addClass("alt");
	});
	
	$(".ministries").each(function() {
	  $(this).children("div:even").addClass("alt");
	});
	
    $(".staff div").each(function(i) {
		 var emaillink = $(this).children("a").eq(0).attr("href");
         $(this).click ( function() { 
		  location.href = emaillink;
		  return false;
		});
		$(this).hover(function() { 
			$(this).addClass("highlight");
			window.status = emaillink;
		  }, 
		  function() { 
			$(this).removeClass("highlight");
			window.status = '';
		});	
	});
});