
var jMain=function(){var that={};$(document).ready(function(){$('#selectJobRoles').attr('disabled','disabled');$('.smallButton').addClass('hidden');$('#viewJobSubmit').click(function(){that.viewJobDetails();return false;});$('#selectIndustries').change(function(){$('.jobWarning').remove();that.selectIndustry();});$('#selectJobRoles').change(function(){that.selectJob();});});that.selectIndustry=function(){var folderId=$('#selectIndustries option:selected').attr('rel');if(folderId!='none'){$.get('/get_jobs_for_folder/'+folderId+'/',function(r){$('#selectJobRoles').html(r);$('#selectJobRoles').removeAttr('disabled');});}
else{$('#selectJobRoles').html('<option>Select Job</option>');$('#selectJobRoles').attr('disabled','disabled');}
$('.breaker').show();$('.weeDesc').html('').addClass('hidden');$('.smallButton').addClass('hidden');};that.selectJob=function(){var jobId=$('#selectJobRoles option:selected').attr('rel');if(jobId!='none'){$.get('/get_description_for_job/'+jobId+'/',function(r){$('.breaker').hide();$('.weeDesc').html(r).removeClass('hidden');$('.smallButton').removeClass('hidden');});}
else{$('.breaker').show();$('.weeDesc').html('').addClass('hidden');$('.smallButton').addClass('hidden');}};that.viewJobDetails=function(){var jobId=$('#selectJobRoles option:selected').attr('rel');if(jobId!='none'&&jobId!=undefined){window.location='/view_job/'+jobId+'/';}
else{$('<p class="jobWarning">Please select a job first!</p>').insertAfter('#smallstaircase');}
return false;};that.showStairway=function(){SimpleModal.open('/stairway/',560,743,function(id){if(id){window.location='http://'+window.location.host+'/view_job/'+id+'/';}});return false;};return that;}();
