swfobject.registerObject("slideshowmovie", "9.0.0", "../flash/expressInstall.swf");

function ShowJobDesc(index){
	
	// Remove all selected options
	$('#job_id option:selected').attr('selected', '');

	// Set the new selected item
	$('#job_id option').eq((index)).attr('selected', 'selected');

	$('.customSelect_310 li.selected').removeClass('selected');
	$('.customSelect_310 li').eq((index)).addClass('selected');
	$('.customSelect_310 div:first').text($('#job_id option:selected').text());

	// Hide the form
	$('#jobApplicationForm').hide();

	$('.jobDesc').each(function(i){
		if (i == index-1) {
			$(this).show();
		}
		else {
			$(this).hide();
		}
	});
	return false;
}

function ShowJobForm(index)
{
	// Hide any job descriptions
	$('.jobDesc').hide();

	// Show the form
	$('#jobApplicationForm').show();

	return false;
}

$(function(){
					 
	// Change the styles of given select boxes
	$('#job_id').jSelect({ className : 'customSelect_310'});
	
	/* SAFARI FIXES */
	if($.browser.safari){
		
		// GOOGLE CHROME FILTER
		var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
		if (!is_chrome) {
			$('.jFileStyle').css('marginTop', '3px');
		}
		
		$('.fileInput').css('line-height','14px');
		$('input.submitBtn').css('height','21px');
  }
	$('#jobApplicationForm input.file.fileInput').val('Attach your resume (Word or PDF)');
});

