	//EXTERNAL LINKS
	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";
	 }
	}
	window.onload = externalLinks;

	var cookie_name_font_size = 'font_size';
	
	function font_resize(size) {
		$.cookie(cookie_name_font_size, size, { expires: 7, path: '/' }) ;
		$("#ContentMiddle").css("fontSize", size + "pt");
		//$("#ContentRight").css("fontSize", size + "pt");
	}

	//$(window).load(function() {
	$(function(){
		
		var fontsize = 8;
		
		if($.cookie(cookie_name_font_size) != null) {
			fontsize = $.cookie(cookie_name_font_size);
		}
		font_resize(fontsize);	
		
		// VALIDATE NIEUWSBRIEFFORM
		$("#NieuwsbriefForm").validate({
			rules: {
				voornaam: {
					required: true,
					minlength: 2
				},
				achternaam: {
					required: true,
					minlength: 2
				},		
				abbo_email: {
					required: true,
					email: true
				}
			},
			messages: {
				voornaam: "Vul aub uw voornaam in",
				achternaam: "Vul aub uw achternaam in",
				abbo_email: "Vul aub een geldig e-mailadres in"	
			}
		});	
		
		$("#ContactForm").validate({
			rules: {
				email: {
					required: true,
					email: true
				},
				naam: {
					required: true,
					minlength: 2
				},
				telefoon: {
					required: true,
					minlength: 4
				}
			},
			messages: {
				email: "Vul aub een geldig e-mailadres in",
				naam: "Vul aub uw naam in",
				telefoon: "Vul aub uw telefoonnummer in"
			}
		});			

	});
	
	$('#CycleText').cycle({ timeout: 5000, cleartype: 1, speed: 400 });	
	
/*
Shadowbox.init({
	counterType: "skip",
	counterLimit: "20"
});	
*/
