function randOrd(){
return (Math.round(Math.random())-0.5); }

var projects = new Array();

/***** projectimages 1 begin *****/
if (current_project != 'project01') {

projects.push({url:'project01.html', image:'projectimages/01/000.jpg'});
projects.push({url:'project01.html', image:'projectimages/01/001.jpg'});
projects.push({url:'project01.html', image:'projectimages/01/002.jpg'});
projects.push({url:'project01.html', image:'projectimages/01/003.jpg'});

}
/***** projectimages 1 end   *****/

/***** projectimages 2 begin *****/
if (current_project != 'project02') {

projects.push({url:'project02.html', image:'projectimages/02/000.jpg'});
projects.push({url:'project02.html', image:'projectimages/02/001.jpg'});
projects.push({url:'project02.html', image:'projectimages/02/002.jpg'});
projects.push({url:'project02.html', image:'projectimages/02/003.jpg'});
projects.push({url:'project02.html', image:'projectimages/02/004.jpg'});

}
/***** projectimages 2 end   *****/

/***** projectimages 3 begin *****/
if (current_project != 'project03') {

projects.push({url:'project03.html', image:'projectimages/03/000.jpg'});
projects.push({url:'project03.html', image:'projectimages/03/001.jpg'});
projects.push({url:'project03.html', image:'projectimages/03/002.jpg'});
projects.push({url:'project03.html', image:'projectimages/03/003.jpg'});
projects.push({url:'project03.html', image:'projectimages/03/004.jpg'});

}
/***** projectimages 3 end   *****/

/***** projectimages 4 begin *****/
if (current_project != 'project04') {

projects.push({url:'project04.html', image:'projectimages/04/000.jpg'});
projects.push({url:'project04.html', image:'projectimages/04/001.jpg'});
projects.push({url:'project04.html', image:'projectimages/04/002.jpg'});

}
/***** projectimages 4 end   *****/

/***** projectimages 5 begin *****/
if (current_project != 'project05') {

projects.push({url:'project05.html', image:'projectimages/05/000.jpg'});
projects.push({url:'project05.html', image:'projectimages/05/001.jpg'});
projects.push({url:'project05.html', image:'projectimages/05/002.jpg'});
projects.push({url:'project05.html', image:'projectimages/05/003.jpg'});

}
/***** projectimages 5 end   *****/

/***** projectimages 6 begin *****/
if (current_project != 'project06') {

projects.push({url:'project06.html', image:'projectimages/06/000.jpg'});
projects.push({url:'project06.html', image:'projectimages/06/001.jpg'});
projects.push({url:'project06.html', image:'projectimages/06/002.jpg'});
projects.push({url:'project06.html', image:'projectimages/06/003.jpg'});
projects.push({url:'project06.html', image:'projectimages/06/004.jpg'});
projects.push({url:'project06.html', image:'projectimages/06/005.jpg'});

}
/***** projectimages 6 end   *****/

/***** projectimages 7 begin *****/
if (current_project != 'project07') {

projects.push({url:'project07.html', image:'projectimages/07/000.jpg'});
projects.push({url:'project07.html', image:'projectimages/07/001.jpg'});
projects.push({url:'project07.html', image:'projectimages/07/002.jpg'});

}
/***** projectimages 7 end   *****/

/***** projectimages 8 begin *****/
if (current_project != 'project08') {

projects.push({url:'project08.html', image:'projectimages/08/000.jpg'});
projects.push({url:'project08.html', image:'projectimages/08/001.jpg'});
projects.push({url:'project08.html', image:'projectimages/08/002.jpg'});
projects.push({url:'project08.html', image:'projectimages/08/003.jpg'});

}
/***** projectimages 8 end   *****/

/***** projectimages 9 begin *****/
if (current_project != 'project09') {

projects.push({url:'project09.html', image:'projectimages/09/000.jpg'});
projects.push({url:'project09.html', image:'projectimages/09/001.jpg'});
projects.push({url:'project09.html', image:'projectimages/09/002.jpg'});
projects.push({url:'project09.html', image:'projectimages/09/003.jpg'});
projects.push({url:'project09.html', image:'projectimages/09/004.jpg'});

}
/***** projectimages 9 end   *****/



projects.sort(randOrd);

var myimages = new Array(); 

for(var i=0; i<projects.length; i++){
    myimages.push(projects[i].image);
}

var mybasicimages = new Array();
	mybasicimages.push('global/images/wachten_aub.jpg');

var mystaticimages = new Array(); 

	mystaticimages[8] = ''; // deze is altijd nodig om de lengte van de array te forceren t.b.v. samenstellen itemstoAnimate loops

if (current_project == 'project00') {
	mystaticimages[0] = 'global/images/empty.gif'; 
	mystaticimages[1] = 'global/images/empty.gif'; 
	mystaticimages[2] = 'global/images/empty.gif'; 
	mystaticimages[3] = ''; 
	mystaticimages[4] = ''; 
	mystaticimages[5] = ''; 
	mystaticimages[6] = ''; 
	mystaticimages[7] = ''; 
	mystaticimages[8] = ''; 

    mystaticimages.sort(randOrd);
}

if (current_project == 'project01') {
	mystaticimages[3] = 'projectimages/01_big/004.jpg'; 
	mystaticimages[4] = 'projectimages/01_big/005.jpg'; 
	mystaticimages[5] = 'projectimages/01_big/006.jpg'; 
	mystaticimages[6] = 'projectimages/01_big/007.jpg'; 
	mystaticimages[7] = 'projectimages/01_big/008.jpg'; 
}

if (current_project == 'project02') {
var mystaticimages = new Array(); 
	mystaticimages[3] = 'projectimages/02_big/004.jpg'; 
	mystaticimages[4] = 'projectimages/02_big/005.jpg'; 
	mystaticimages[5] = 'projectimages/02_big/006.jpg'; 
	mystaticimages[7] = 'projectimages/02_big/008.jpg'; 
	mystaticimages[8] = 'projectimages/02_big/009.jpg'; 
}

if (current_project == 'project03') {
	mystaticimages[4] = 'projectimages/03_big/005.jpg'; 
	mystaticimages[5] = 'projectimages/03_big/006.jpg'; 
	mystaticimages[6] = 'projectimages/03_big/007.jpg'; 
	mystaticimages[7] = 'projectimages/03_big/008.jpg'; 
	mystaticimages[8] = 'projectimages/03_big/009.jpg'; 
}

if (current_project == 'project04') {
	mystaticimages[0] = 'projectimages/04_big/001.jpg'; 
	mystaticimages[1] = 'projectimages/04_big/002.jpg'; 
	mystaticimages[2] = 'projectimages/04_big/003.jpg'; 
	mystaticimages[3] = 'projectimages/04_big/004.jpg'; 
	mystaticimages[4] = 'projectimages/04_big/005.jpg'; 
	mystaticimages[5] = 'projectimages/04_big/006.jpg'; 
	mystaticimages[6] = 'projectimages/04_big/007.jpg'; 
}

if (current_project == 'project05') {
	mystaticimages[2] = 'projectimages/05_big/003.jpg'; 
	mystaticimages[3] = 'projectimages/05_big/004.jpg'; 
	mystaticimages[4] = 'projectimages/05_big/005.jpg'; 
	mystaticimages[5] = 'projectimages/05_big/006.jpg'; 
	mystaticimages[6] = 'projectimages/05_big/007.jpg'; 
	mystaticimages[7] = 'projectimages/05_big/008.jpg'; 
	mystaticimages[8] = 'projectimages/05_big/009.jpg'; 
}

if (current_project == 'project06') {
	mystaticimages[3] = 'projectimages/06_big/004.jpg'; 
	mystaticimages[4] = 'projectimages/06_big/005.jpg'; 
	mystaticimages[5] = 'projectimages/06_big/006.jpg'; 
	mystaticimages[6] = 'projectimages/06_big/007.jpg'; 
	mystaticimages[7] = 'projectimages/06_big/008.jpg'; 
}

if (current_project == 'project07') {
	mystaticimages[3] = 'projectimages/07_big/004.jpg'; 
	mystaticimages[4] = 'projectimages/07_big/005.jpg'; 
	mystaticimages[5] = 'projectimages/07_big/006.jpg'; 
	mystaticimages[7] = 'projectimages/07_big/008.jpg'; 
	mystaticimages[8] = 'projectimages/07_big/009.jpg'; 
}

if (current_project == 'project08') {
	mystaticimages[3] = 'projectimages/08_big/004.jpg'; 
	mystaticimages[4] = 'projectimages/08_big/005.jpg'; 
	mystaticimages[5] = 'projectimages/08_big/006.jpg'; 
	mystaticimages[6] = 'projectimages/08_big/007.jpg'; 
	mystaticimages[7] = 'projectimages/08_big/008.jpg'; 
}

if (current_project == 'project09') {
	mystaticimages[3] = 'projectimages/09_big/004.jpg'; 
	mystaticimages[4] = 'projectimages/09_big/005.jpg'; 
	mystaticimages[5] = 'projectimages/09_big/006.jpg'; 
	mystaticimages[7] = 'projectimages/09_big/008.jpg'; 
	mystaticimages[8] = 'projectimages/09_big/009.jpg'; 
}

var mystaticimagestoload = new Array(); 

for(var i=0; i<mystaticimages.length; i++){
	if(mystaticimages[i])
		{
		mystaticimagestoload.push(mystaticimages[i])
		}
	}

//alert(mystaticimagestoload);

var	availableCanvases1 = new Array('canvas01','canvas02','canvas03','canvas04','canvas05','canvas06','canvas07','canvas08','canvas09');

var itemstoAnimate1 = new Array();

for(var i=0; i<mystaticimages.length; i++){
	if(mystaticimages[i]==undefined || mystaticimages[i]=='')
		{
		itemstoAnimate1.push(availableCanvases1[i])
		// alert(availableCanvases1[i]);
		}
    }

itemstoAnimate1.sort( randOrd );

var itemstoAnimate = new Array();

//itemstoAnimate = itemstoAnimate.concat(itemstoAnimate1,itemstoAnimate2,itemstoAnimate3);
itemstoAnimate = itemstoAnimate1;


var myprojectimagestoload = new Array(); 

for(var i=0; i<itemstoAnimate.length; i++){
		myprojectimagestoload.push(projects[i].image)
	}

//alert(myprojectimagestoload);


var projindex = 0;

function mywriter()
{
document.write('<a href="'+projects[projindex].url+'"><img src="'+projects[projindex].image+'" alt="" height="144" width="264" onmouseover="$(this).fadeTo(100,0.8)" onmouseout="$(this).fadeTo(100,1.0)" /></a>');
if(projindex<projects.length-1)
	{
	projindex = projindex+1;
	}
}

var staticindex = 0;

function mystaticwriter()
{
if (mystaticimages[staticindex])
	{
	//alert(mystaticimages[staticindex]);
	document.write('<div class="canvas" style="display:block;background-color:transparent"><img src="'+mystaticimages[staticindex]+'" alt="" height="144" width="264" /></div>');
	}
if(staticindex<8)
	{
	staticindex = staticindex+1;
	}
}


var basisvertraging = 2000; 		// wanneer start de animatie
var overgang = 600;				// hoe lang duurt de fade
var tussenvertraging = 1000;		// hoe lang duurt het tussen twee overgangen in

function myanim(id_current)
{
    $("#" + itemstoAnimate[id_current]).fadeIn(overgang);
    
    itemcount = id_current+1;

    setTimeout('myanim(itemcount)', overgang+tussenvertraging);
}

// myanim END

Preloader.add(mybasicimages); // mybasicimages is een array met paden naar de afbeeldingen die eerder is gedefinieerd

Preloader.add(mystaticimagestoload); // mystaticimagestoload is een array met paden naar de afbeeldingen die eerder is gedefinieerd

Preloader.add(myprojectimagestoload); // mystaticimagestoload is een array met paden naar de afbeeldingen die eerder is gedefinieerd

// Preloader.add(myimages); // myimages is een array met paden naar de afbeeldingen die eerder is gedefinieerd

var finishFunc = function()
    {
    setTimeout('myanim(0)', basisvertraging);
    }
Preloader.onFinish(finishFunc);
Preloader.load();

$(document).ready(function(){
}); // end document ready
