/*
 * jquery email antispam
 * Written 2007 by sunfish
 */
 
 
 function mail(a,b) {
	 parent.location = 'mailto:'+a+'@'+b;
	 return false;
 }
 
$(document).ready(function(){		

		// email adress antispam - needs jquery
		// eg. write in html info<span> |at| </span>naturkooperation.org
	$("p:contains('(at)'),td:contains('(at)')").each(function(){
		// alert($(this).html());
		var filter = /([a-zA-Z0-9_\.\-]+)(<span> \(at\) <\/span>)([a-zA-Z0-9_\-\.]+\.[a-zA-Z]{2,3})/ig;
		var newLink = "<a onclick=\"mail('$1','$3')\" class=\"email\">$1<span> (at) </span>$3</a>";
		$(this).html($(this).html().replace(filter, newLink));	
	});
	
	
		// open external links with target _blank	
	$("#content a[href$=.pdf], #content a[href^=http]").click(function(){ 															 
		this.target = "_blank";
	});
	
	
								
});