var hideCollapsed = function() {	$('fieldset.collapsed:not(.search-advanced)').each(function (i) {		var fs = $(this);		$(this).children('*:not(legend)').hide();		$(this).find('legend').css({			cursor: 'pointer'		}).click(function(){			fs.children('*:not(legend)').slideToggle();			fs.toggleClass('collapsed');		});	});}var sitemap = function() {	$('.article li.expanded').each(function (i) {		$(this).css('position', 'relative').append(			$('<a/>').attr('title', 'Open en sluit dit deel van de sitemap').css({				display: 'block',				position: 'absolute',				left: '0',				top: '0',				cursor: 'pointer',				width: '12px',				height: '15px'			}).click(function(){				$(this.parentNode).children('ul').slideToggle();				$(this.parentNode).toggleClass('expanded');			})		);	});}var externalLinks = function() {	$('#main a[href^="http://"]:not(.extlightbox), #main a[href^="https://"]:not(.extlightbox)').each(function(){		if ($(this).attr('href').indexOf(location.hostname) < 0) {			$(this).addClass('external').attr({				title: this.title + ' (opent in een nieuw scherm)'			}).click(function(){				var newwin = window.open($(this).attr('href'), '_blank');				return false;			});		}	});}function smoothAnchors() {	$('a[href*=#]').click(function() {		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')		&& location.hostname == this.hostname) {			var h = this.hash;			var $target = $(this.hash);			$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');			if ($target.length) {				var targetOffset = $target.offset().top;				$('html,body').animate({scrollTop: targetOffset}, 750, function(){					document.location.hash = h;				});				return false;			}		}	});}function addPrint() {	$('#extranav').prepend('<li class="nav-print"><a href="#">Print</a></li>');	$('#extranav .nav-print a').click(function() {		if (window.print)			window.print();	});}function checkSize() {	if ($(window).width() < 956)		$('body').addClass('smallscreen');	else		$('body').removeClass('smallscreen');}function focusLogin() {	$('#edit-name').focus();	$('#edit-name').select();}function clickPanel(){				   	$("#block-block-10, #block-block-11").each(function(){		var anchors = $(this).find("a");		if (anchors.length == 1) {			var a = anchors.eq(0);			$(this).addClass('clickblock');			$(this).attr('title', a.attr("title"));			$(this).click(function(){				window.location = a.attr("href");			});		}	})}$(document).ready(function() {	$('body').addClass('js-active');	checkSize();	addPrint();	externalLinks();	smoothAnchors();	hideCollapsed();	sitemap();	focusLogin();	clickPanel();	$('.slideshow').cycle({		timeout:       4000,  // milliseconds between slide transitions (0 to disable auto advance) 		speed:         1000,  // speed of the transition (any valid fx speed value) 		pause:         1     // true to enable "pause on hover" 	})});$(window).resize(function() {	checkSize();});
