$(document).ready(function() {
	  jobSetup();
});

function reinitialiseScrollPane () {
	$('#jobHolder .jobContent').jScrollPane({scrollbarWidth:5, reinitialiseOnImageLoad:true, maintainPosition: false});
}


function jobSetup() {
	var showing = 0,
	jobs = $('#jobs');
	
	//setup scrolling
	$('#jobHolder .jobContent').jScrollPane({scrollbarWidth:5, reinitialiseOnImageLoad:true});

	$('#jobs tr').click(function(event) {
		 event.preventDefault();
		 
		 if (!$(this).hasClass('active')) {
			 loadJob($(this).find('a').attr('rel'));
			 jobs.find('tr').removeClass('active');
			 $(this).addClass('active');
		 }
	 });
}