$(document).ready(function(){
	$('.applicant_type').click(function(){
		var applicant_type = $(this).val();
		var applicant_id =  $('#applicant_id').val();
		$.post('/scripts/ajaxChangeUserType.php', {id:applicant_id, type:applicant_type}, function(data){
			window.location.reload();
		});
	});
	$('.password_real').each(function(){
		if ($(this).val() == '') {
			$(this).hide();
			$(this).next().show();
		} else {
			$(this).prev().show();
			$(this).show();
		}
	});
	$('.password_fake').focus(function(){
		$(this).hide();
		$(this).prev().show().focus().css({'color':'#000'});
	});
	$('.password_real').blur(function(){
		if ($(this).val() == '') {
			$(this).hide();
			$(this).next().show();
		}
	});
	$('.place_hold').each(function(){
		if ($(this).val() == '')
			$(this).val($(this).attr('placeholder')).css({'color':'#888'}); 
	});
	$('.place_hold').blur(function(){
		if ($(this).val() == '') 
			$(this).val($(this).attr('placeholder')).css({'color':'#888'});
		else
			$(this).css({'color':'#000'});
	});
	$('.place_hold').focus(function(){
		if ($(this).val() == $(this).attr('placeholder')) 
			$(this).val('');
		$(this).css({'color':'#000'});
	});
});


