$(document).ready( function() {
	$(".targetArea").hide();
	$("#footer ul li a").click( function() {
		if ($(this).is('.current')) {
			$(this).toggleClass("current");
			$(".targetArea").hide();
			$("#"+this.innerHTML+" .bigcolumn").hide();
			$("#"+this.innerHTML+" .column").hide();
		} else {
			$(".targetArea div div.bigcolumn").hide();
			$(".targetArea div div.column").hide();
			$("li a.current").removeClass("current");
			$(this).toggleClass("current");
			$(".targetArea").show();
			$("#"+this.innerHTML+" .bigcolumn").show();
			$("#"+this.innerHTML+" .column").show();
			window.scroll(0,1000000);
		}
		return false;
	});
	
	$("#tag_cloud a").css({opacity: 0.3})
		.mouseover(	function(){ $(this).animate({opacity: 1}, 1000); })
		.mouseout ( function(){ $(this).animate({opacity: 0.3}, 1000); });

	setInterval(wave, 20000);
	function wave() {
		var i = 0;
		$("#tag_cloud a").each(function(){
			$(this).animate({opacity:0.3}, 200*i).animate({opacity:1}, 1000).animate({opacity:0.3},1000);
			i++;
		});
	}
});

function writeMail(t){var m=t+'@syndicat.nl';document.write('<a href="mailto:'+m+'">'+m+'</a>')}