function initMouseOver(elem, extension) {
	
	
	var location = document.location.href;
	var current_page = location.substring(location.lastIndexOf('/') + 1, location.length-4); // Huidige pagina zoeken
	var upper_current_page = current_page.substring(0,1).toUpperCase() + current_page.substring(1); // 1e letter moet uppercase zijn
	
	
	var image_over = '/images/buttons/' + elem.attr('alt') + '_over.'+extension
	var image = '/images/buttons/' + elem.attr('alt') + "."+extension
		
	/* OnMouseOver simuleren */
	if (elem.attr('alt') != upper_current_page) { // Als we al op de pagina zitten geen mouseover defineren
		elem.hover(
			function () {
				elem.attr('src', image_over);
			},
			function () {
				elem.attr('src', image);
			}
		);
	} else {
		elem.attr('src', image_over);
	}
}

function initMenu() {
	$('div#buttons a img').each(function() {
		initMouseOver($(this), 'gif');
	 });
	 
	 $('div#buttons_folders a img').each(function() {
		initMouseOver($(this), 'gif');
	 }); 
	 
	 $('div#buttons_nieuws a img').each(function() {
		initMouseOver($(this), 'jpg');
	 }); 
	
	$('div#HOME').click(function() {
		document.location.href = '/index.asp?home=set';
	});
	
	$('div#aktie').click(function() {
		document.location.href = '/folders.asp';
	});
}

$(document).ready(function() {
	initMenu();
});