function init() {
	var myAccordion = new Spry.Widget.Accordion("myAccordion", {
		verticalDirection :false,
		duration :1100,
		defaultPanel :5,
		enableAnimation :true,
		// wordt gedaan met keydown event hieronder
		enableKeyboardNavigation :false
			});

	var myPhotoGallery = [];

	myPhotoGallery[0] = new PhotoGallery('photogallery0');
	myPhotoGallery[1] = new PhotoGallery('photogallery1');
	myPhotoGallery[2] = new PhotoGallery('photogallery2');
	myPhotoGallery[3] = new PhotoGallery('photogallery3');
	myPhotoGallery[4] = new PhotoGallery('photogallery4');
	myPhotoGallery[5] = null;
	myPhotoGallery[6] = new PhotoGallery('photogallery7');
	myPhotoGallery[7] = new PhotoGallery('photogallery8');
	myPhotoGallery[8] = new PhotoGallery('photogallery9');
	myPhotoGallery[9] = new PhotoGallery('photogallery10');
	myPhotoGallery[10] = new PhotoGallery('photogallery11');
	myPhotoGallery[11] = new PhotoGallery('photogallery12');

	// doe alle keyboard navigatie op het hoogste niveau, dan luistert
	// het niet zo nauw welk deel van het accordion aangeklikt is

	Spry.Utils.addEventListener("myAccordion", "keydown", function(e) {
		var key = e.keyCode;
		if (key == 38) { // cursor up
				myPhotoGallery[myAccordion.getCurrentPanelIndex()].gThumbViewer
						.previous();
			} else if (key == 40) { // cursor down
				myPhotoGallery[myAccordion.getCurrentPanelIndex()].gThumbViewer
						.next();
			} else if (key == 37 || key == 33) { // cursor left or page up
				myAccordion.openPreviousPanel();
			} else if (key == 39 || key == 34) { // cursor right or page down
				myAccordion.openNextPanel();
			} else if (key == 32) { // space
				myPhotoGallery[myAccordion.getCurrentPanelIndex()].gSlideShowControl.toggle();
			} else if (key == 36) { // home
				myAccordion.openPanel(myAccordion.defaultPanel);
			} else {
				return true;
			}
			// voorkomt 'meescrollen' met cursor toetsen als browserscherm
			// te klein is voor accordion
			return false;
		}, false);

	myAccordion.addObserver( function(notificationType, notifier, data) {
				if (notificationType == "onPanelOpen") {
					if (myPhotoGallery[data]
							&& myPhotoGallery[data].gSlideShowControl) {
						myPhotoGallery[data].gSlideShowControl.start();
					}
				} else if (notificationType == "onPanelClose") {
					if (myPhotoGallery[data]
							&& myPhotoGallery[data].gSlideShowControl) {
						myPhotoGallery[data].gSlideShowControl.stop();
					}
				}
			});
}
