function showOver(nr,wat){
	var mom = document.getElementById('mom').value;
	
	document.getElementById('werk_'+nr).src = mom+'work/thumb/'+wat+'.png';
}

function setSchets(schets,naam,datum){
	var mom = document.getElementById('mom').value;
	
	document.getElementById('schets_naam').innerHTML = naam+"&nbsp;|&nbsp;";
	document.getElementById('schets_datum').innerHTML = datum;
	document.getElementById('de_schets').src = mom+'schetsen/big_'+schets;
	
}

$(function() {
	$.nyroModalSettings({
		debug: false,
		width: null,
		height: null,
		minWidth:1024,
		minHeight: 600,
		processHandler: function(settings) {
			var url = settings.url;
			if (url && url.indexOf('http://www.youtube.com/watch?v=') == 0) {
				$.nyroModalSettings({
					type: 'swf',
					width: null,
					height: null,
					minWidth: 800,
					minHeight: 600,
					url: url.replace(new RegExp("watch\\?v=", "i"), 'v/')
				});
			}
		},
		endShowContent: function(elts, settings) {
			$('.resizeLink', elts.contentWrapper).click(function(e) {
				e.preventDefault();
				$.nyroModalSettings({
				width: null,
				height: null,
			    minWidth: 800,
			    minHeight: 600,
				});
				return false;
			});
			$('.bgLink', elts.contentWrapper).click(function(e) {
				e.preventDefault();
				$.nyroModalSettings({
					bgColor: '#'+parseInt(255*Math.random()).toString(16)+parseInt(255*Math.random()).toString(16)+parseInt(255*Math.random()).toString(16)
				});
				return false;
			});
		}
	});
	
	function preloadImg(image) {
		var img = new Image();
		img.src = image;
	}
	var mom = document.getElementById('mom').value;
	preloadImg(mom+'img/modal/ajaxLoader.gif');
	preloadImg(mom+'img/modal/prev.gif');
	preloadImg(mom+'img/modal/close.gif');
	preloadImg(mom+'img/modal/next.gif');
	
	
});
