Initialise.addEvent(function() {
		row = $$('a.job');
		
		// Add event listener to every link.
		row.each(function (a) {
		a.observe('click',Job.show,false);
	});

});

var Job = {

	id : null,
	
	show : function(){
			TDiv = $('showjob');
			
    this.href = '#';
    
		if ( Job.id != this.id )
		{
			// Save current div bzw. job id ...
			Job.id = this.id;
			
			var loc = this.readAttribute('name');
		
			TDiv.innerHTML = 
				'<img src="http://vkf-renzel.konzeptionen.de/img/misc/loading.gif"'+
					'width="32" height="32" class="loader">';
			
			// Throw an request...
			new Ajax.Updater({ success: TDiv },
				'http://'+location.hostname+'/xhr/jobs/show.php?id='+this.id+'&loc='+loc,
				{
				asynchronous:true,
				evalScripts:true
				}
			);
		}	
	}
}

