/*--- 
Copyright (c) Enigma Interactive 2005
Project:		SOM2 CASK
Filename:  		latest_jobs.js
Description:	Latest Jobs Javascript controller module

History
ver date  		who     	comment
-----------------------------------------------------------------------------
2	16Mar06		AJL			Switched from setInterval to setTimeout to overcome a weird FF timing bug
2	30Jan06		AJL			updated (removed the opacity stuff, caused problems with some graphics cards)
1	17Jan06		AJL			created
---*/

var LOCAL = LOCAL || { };

LOCAL.slController = function() {

}

LOCAL.slController.prototype = {
	initSelf: function() {
		var details,i = 1;
		this.details = [];
		while (detail = DHTML.bind('pd_'+i, DHTML.Anim)) {			
			link = document.getElementById('pl_'+i);
			link.parentRef = this;
			link.detailLink = i-1;
			link.onmouseover = function(){this.parentRef.linkOver(this.detailLink);};
			this.details.push(detail);
			i++;
			this.z = 1;		
		}

		this.current = 0;
		
	},
	
	linkOver: function(linkId){		
		for(var i = 0; i < this.details.length; i++){
			if(i != linkId){
				this.details[i].display('none');
			}
		}
		this.details[linkId].display('block');
	}
	

}

PAGE.onload(function() { LOCAL.sl = OO.create(LOCAL.slController); });