$(document).ready(function() {  

	var tempVal;

	$(".inputfield").focus(function() {
		if ($(this).attr('class').indexOf("password") >= 0) {
			var field = $(this).get(0);
			field.type = 'password';
		}
		
		tempVal = $(this).attr('value');
		$(this).attr('value', '');	
	});
	
	$(".inputfield").blur(function() {
		if($(this).attr('value') == "") {
			if ($(this).attr('class').indexOf("password") >= 0) {
				var field = $(this).get(0);
				field.type = 'text';
			}
			
			$(this).attr('value', tempVal);	
		}
	});
  
});  
