$(document).ready(function(){
	
	/* Open Designated Links in New Windows */
	$("a[@rel='external']").click(function() { window.open(this.href); return false; });
	
	/* Popup Email Form Links */
	$('a[@href*="/info/email"]').click(function() { window.open(this.href, 'emailform', 'width=345,height=520,resizable=yes,status=yes'); return false; });
	
	/* Identify and Tag All External Links */
	allowedDomains = ['cathedralshelter.org']; 
	$('a[@href^="http"]').each(function(){ 
	       var isExt = true; 
	       for(var i=0;i<allowedDomains.length;i++){ 
	               if(this.href.indexOf(allowedDomains[i])>-1){ 
	                       isExt=false; 
	                       break; 
	               } 
	       } 
	       if(isExt){                       
	   /*            $(this).click(function(){ 
	                       window.open(this.href); 
	                       return false; 
	               }); */
					$(this).after("<div class='external'></div>");
	       } 

	});
	
	/* Disable sign up links in Volunteer App Positions */
	$('#formvolunteer #position .detailsdiv a[@href*="/volunteer/apply"]').remove();
	
});
