/*
	Trapper - A simple Preload
	by Strangers and a bit Fou - The Untold license.
	Springtime two-o-o-seven
*/

window.onload = function() {
	cage = new Array(
		"workspace/img/planky.jp", 
		"workspace/img/flanky.jpg", 
		"workspace/img/dotty.gif", 
		"workspace/img/statement.gif", 
		"workspace/img/diggy1.gif", 
		"workspace/img/diggy1c.gif", 
		"workspace/img/diggy2.gif", 
		"workspace/img/digital-select.png", 
		"workspace/img/koils-select.png", 
		"workspace/img/guterrez.png", 
		"workspace/img/box/loading-spin.gif", 
		"workspace/img/box/nextlabel.png", 
		"workspace/img/box/prevlabel.png", 
		"workspace/img/box/closelabel.gif", 
		"workspace/img/bubble.png");
	trapper(cage, 'progress');
};

function trapper(cage_array, progress_id) {
	$(progress_id).toggleClass('loading');
	
	new Asset.images(cage_array, {
		onComplete: function(){
			$(progress_id).toggleClass('loaded');
		}
	});
};
