//javascript for the main work page listing all the companies

var div_duration = 100; //how fast to show and hide the divs
var curr2 = 0;
var tmbs = new Array();
var descs = new Array();

function init2() { 
	
	//grab everything that's getting an effect attached
	for (i=0; i < 15; i++){
		if($chk($('wd'+i))) descs[i] = $('wd'+i); //the descriptions
		if($chk($('wt'+i))) tmbs[i] = $('wt'+i); //the thumbnail images
	}
	
	for (i=0; i < descs.length; i++){
		//fix opacity, hidden at the start to reduce flickering
		descs[i].set("slide", {mode: 'vertical', duration: 500}).slide('hide');

		//add the thumbnail events
		tmbs[i].addEvents({
			'mouseover': function(){
				tmbs[curr2].className = "orangebox";
				descs[curr2].slide('out');
				this.className = "orangebox_on";
				var num = this.id.substr(2); 	
				descs[num].slide('in');
				curr2 = num;	
				
				killFilter(descs[num]);
			}
		});
	}
}

