$(document).ready(function() {

	$.nyroModalSettings({
		minWidth: 300, // Minimum width
  		minHeight: 200 // Minimum height
	});
	
	$(document).pngFix();
	
	$('#maincontainer').css({'height': $(document).height() - $('#topcontainer').height() + 'px'});
	//$(window).resize(function () { 
		//$('#maincontainer').css({'height': $(body).height() - $('#topcontainer').height() + 'px'});
    //});
	
	$('#nieuwsdiv').css({'margin-top': Math.floor((190 - $('#nieuwsdiv').height())/2) + 'px'});
	
	$('.siterubrieken_links:not(.custom) a').click(function () {
		$("#webpagina_links").load("/__webpaginas_links.asp?siterubriek=" + $(this).attr('siterubriek'));
	});
	
	
	$('.siterubrieken a').prepend('<span>&raquo;</span>&nbsp;')
	$('.siterubrieken_links a').prepend('<span>&raquo;</span>&nbsp;')
	$('.siterubrieken_top a').prepend('<span>&raquo;</span>&nbsp;')
	
	$("#webpagina_links").load("/__webpaginas_links.asp");
	
	$('a.email').each(function(){
		e = this.rel;
		e = splitext = e.split("");
		revertext = splitext.reverse();
		reversed = revertext.join("");
		reversed = reversed.replace('[a]','@');
		reversed = reversed.replace(/\[\!\]/g,'.');
		this.href = 'mailto:' + reversed + '?subject=' + $(this).attr('subject');
		$(this).text(reversed);
	});
	
	$("a.fancybox").fancybox({
		overlayOpacity: 0.7,
		overlayColor: '#000000',
		callbackOnClose: function (){
			$("#webpagina_links").load("/__webpaginas_links.asp");
		}
	});
	
	$("a.fancybox_fotoreportage").fancybox({
		overlayOpacity: 0.7,
		overlayColor: '#000000',
		frameWidth: 850,
		frameHeight: 590,
		callbackOnShow: function (){
			window.scrollTo($(window).scrollLeft() ,$(window).scrollTop()-1);
		}
	});
	
	$("a.fancybox_recept").fancybox({
		overlayOpacity: 0.7,
		overlayColor: '#000000',
		frameWidth: 500,
		frameHeight: 650,
		callbackOnShow: function (){
			window.scrollTo($(window).scrollLeft() ,$(window).scrollTop()-1);
		}
	});
	
	$('.sitemap').hide();


});

