/*
 *	Javascript for ColourFish 
 *	(c) 2007 by T-SIGN Studios, http://www.t-sign.com
 *	Authors: Bartosz Stankiewicz (bartosz@t-sign.com)
*/

function arrayShuffle() {
  	
	var tmp, rand;
  	for(var i =0; i < this.length; i++) {
   	 	rand = Math.floor(Math.random() * this.length);
    	tmp = this[i]; 
    	this[i] = this[rand]; 
    	this[rand] = tmp;
  	}
	
	Array.prototype.shuffle = arrayShuffle;
}

/**
 *	Function for sliding background images 	
 */
function initPage() { 

	var img = new Array(8);
	arrayShuffle();

	for(i = 0; i < 9; i++) {

		img[i] = '' + (i + 1) + '.jpg';
	}

	img.shuffle();
	$('visual').style.backgroundImage = 'url(/design/default/img/content/visuals/visual' + img[0] + ')';

	img.shuffle();
	myShow = new Slideshow('visual', {type: 'fade', duration: [3000, 7000], width: 1280, height: 285, hu: '/design/default/img/content/visuals/visual', images: new Array(img[0], img[1], img[2], img[3], img[4], img[5], img[6], img[7], img[8])});
}

