$(document).ready(function(){	
	
	// Resize font
	var fontMin = 60;
	var fontMax = 120;
	var fontSize;
	var bodyElement = document.getElementsByTagName('body')[0];	
	$(".font_klein").click(function() {
		if (isNaN(getFontSize())) {
			fontSize = 80;
			bodyElement.style.fontSize = fontSize - 10 + '%';
		} else if (getFontSize() > fontMin) {
			fontSize = getFontSize();
			bodyElement.style.fontSize = fontSize - 10 + '%';
		}
	});
	$(".font_normaal").click(function() {
		bodyElement.style.fontSize = 80 + '%';
	});
	$(".font_groot").click(function() {
		if (isNaN(getFontSize())) {
			fontSize = 80;
			bodyElement.style.fontSize = fontSize + 10 + '%';
		} else if (getFontSize() < fontMax) {
			fontSize = getFontSize();
			bodyElement.style.fontSize = fontSize + 10 + '%';
		}		
	});
	
	function getFontSize() {
		return parseInt(bodyElement.style.fontSize);
	}
	
	// remove dotted border in links
	var theahrefs = document.getElementsByTagName("a"); 
	if (!theahrefs){return;} 
		for(var x=0;x!=theahrefs.length;x++){ 
		theahrefs[x].onfocus = function stopLinkFocus(){this.hideFocus=true;}; 
	}
	
	// add tags, input box
	$(".add_tag").click(function() {
		document.getElementById('input_tag').style.display = 'block';
	});
	
});