var siteFunctions = {

fontResize : function()  {

		$('#font-smaller').click(function() {
			$('.container').css({
					fontSize: "11px"
			});
			return false;
		});
		
		$('#font-larger').click(function() {
			$('.container').css({
					fontSize: "12px"
			});
			return false;
		});
		
		
		$('#font-largest').click(function() {
			$('.container').css({
					fontSize: "13px"
			});
			return false;
		});
	}
}

$(document).ready(
	function(){
	
		// Routebeschrijving alleen bij Contact weergeven
		if($('.navTreeCurrentNode span').html() != "Contact")
		{
			$('.routedescription-contentbox').remove();
		};
		
		if($('.navTreeCurrentNode span').html() == "Contact")
		{
			$('.routedescription-contentbox').css('display','block');
			if (GBrowserIsCompatible()) {
				var map = new GMap2(document.getElementById("map_canvas"));
				map.setCenter(new GLatLng(53.23802, 6.59395), 10);
				map.setMapType(G_PHYSICAL_MAP); 
				
				var point = new GLatLng(53.23802, 6.59395);
							map.addOverlay(new GMarker(point));
				map.addControl(new GSmallZoomControl());
			}
		};
		
	
		// controleren of er een tabel van openingstijden aanwezig is
		if($('table.openingstijdentabel').length > 0) {
			// zet functie op buttons wanneer er geklikt op wordt om eerst alle tabellen te hide'en en dan de huidige te showen
			$('a.timetable-button').click(function(){
				$('a.timetable-button').removeClass('active');
				$(this).addClass('active');
				
				$('table.openingstijdentabel').addClass('hide');
				
				var url = $(this).attr('href');
				var pos = url.indexOf('#');
				
				$('table.' + url.substr(pos + 1)).removeClass('hide');
				
				return false;
			});
		}
		
		$('.photoslider').innerfade({
			animationtype: 'fade',
			speed: 3000,
			timeout: 6000,
			type: 'sequence',
			containerheight: '400px'
		});
		$('.photoslider-large').innerfade({
			animationtype: 'fade',
			speed: 3000,
			timeout: 6000,
			type: 'sequence',
			containerheight: '400px'
		});
		
		
		siteFunctions.fontResize();
		
		$('#nav li').hover(
			function() {
				$(this).addClass('hover');
			},
			function() {
				$(this).removeClass('hover');
			}
		);
		
		// Links in de tabjes vervangen met interne links startend met #
		// Lege tabs verwijderen	
		$(".ui-tabs-nav li a").each(
			function(i, o){
				var url = "#tabtext" + i;
				$(this).attr('href', url);
				$(this).children().not("h2").parent().parent().remove();
			}
		);
		
		// Leeg submenu verwijderen
		$(".submenu").each(
			function(){
				$(this).children().not("li.navTreeItem").parent().parent().remove();
			}
		);
		// Lege Nieuwsbrief verwijderen
		$(".textbox-nieuwsbrief").parent().remove();

		
		//Lege contentbox verwijderen
		$('.roof-contentbox').children(".bezoekadres-theme").parent().remove();
		$('.roof-contentbox').children(".links-theme").parent().remove();
		$('.buttonholder').children(".aanmelden-theme").children(".formulier").parent().parent().remove();
		
		// Tabs inschakelen
		$('#tabs').tabs();
		
	}
);