$(document).ready(function() {
	$('.jobfinder input.text').css('background-position','0px 0px');
	$('.jobfinder input.text').focus(function() { $(this).css('background-position','0 -23px'); });
	$('.jobfinder input.text').blur(function() { 
		if ($(this).val() == "") $(this).css('background-position','0px 0px');
	});
	$('.slideshow').cycle();
	$('a').focus(function() { this.blur(); });
	$('.uls').children('ul').eq(-1).css('margin-right','0');
	$('.story').eq(-1).css('border-bottom','none');
	$('#industry').change(function() {
		if($(this).val() == '0') {
			$('#jobtype').html('<option value="0"> -- Please Select --</option>');
		}
		else {
			$.ajax({
				url: '/wp-admin/admin-ajax.php',
				type: 'POST',
				data: 'action=change_jobtype&cat_id=' + $(this).val(),
				success: function(data) { $('#jobtype').html(data); }
			});
		}
	});
	if ($('#annual').attr('checked') == true) change_salarytype($('#annual'));
	if ($('#monthly').attr('checked') == true) change_salarytype($('#monthly'));
	$("input[name='rate']").change(function() { change_salarytype($(this)) });

});

function change_salarytype(input) {
	$.ajax({
		url: '/wp-admin/admin-ajax.php',
		type: 'POST',
		data: 'action=change_salaryrange&salarytype=' + input.val(),
		success: function(data) { $('#salary').html(data); }
	});
}
