function init() {
	// this array consists of the id attributes of the divs we wish to fade between
	blurbs = new Array('bl-blurb', 'bm-blurb', 'brunei-blurb', 'dickens-blurb', 'courtauld-blurb', 'foundling-blurb', 'hunterian-blurb', 'freemasons-blurb', 'londontransport-blurb', 'royalopera-blurb', 'soane-blurb', 'ucl-blurb', 'wellcome-blurb');

	// the starting index in the above array.
	i = Math.ceil(Math.random()*blurbs.length-1);
	start_blurb = blurbs[i];

	// the number of milliseconds between swaps: 4 seconds
	wait = 4000;

	// show a starting blurb - using style.display because setting a class name fails using Scriptaculous ?!
	document.getElementById(start_blurb).style.display = 'block';
	startPage();
}

// the event handler that starts the fading.
function startPage() {
	setInterval('swapFade()',wait);
}

// the function that performs the fade
function swapFade() {
	Effect.Fade(blurbs[i], { duration:1, from:1.0, to:0.0 });
	i++;
	if (i == blurbs.length) i = 0;
	Effect.Appear(blurbs[i], { duration:1, from:0.0, to:1.0 });
}

window.onload = function() {
	init();
}