(function($) {var externalLinks = function() {	$('#main a[href^="http://"], #main a[href^="https://"]').each(function(){		$(this.parentNode).addClass('external');		$(this).addClass('external').attr({			title: this.title + ' (wordt in een nieuw scherm geopend)'		}).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 anchorLinks() {	var $anchorNav = $('<ol />');	$('body:not(.page-taxonomy) #block-system-main h2').each(function(i){		$(this).attr('id', 'anchor'+i);		if (i > 0) {			$(this).before(				$('<p class="to-top" />').append(					$('<a />').text('Naar boven').attr('href', '#')				)			);		}		$anchorNav.append(			$('<li class="anchor" />').append(				$('<a />').text($(this).text()).attr('href', '#anchor'+i)			)		);	});	if ($anchorNav.find('li').length > 2) {		var $list = $('<div class="item-list anchor-nav" />').append(			$('<h2 />').text('Inhoudsopgave')		).append(			$('<div class="content"/>').append($anchorNav)		);		$('#block-system-main').prepend($list);	}}$(document).ready(function() {	anchorLinks();	smoothAnchors();});})(jQuery);;

