﻿$(document).ready(function() {
	$('input[type="text"], textarea').addClass("inactive");
	$('input[type="text"], textarea').focus(function() {
		$(this).removeClass("inactive").addClass("active");
	    if (this.value == this.defaultValue){ 
	    	this.value = '';
		}
		if(this.value != this.defaultValue){
			this.select();
		}
	});
	$('input[type="text"], textarea').blur(function() {
		$(this).removeClass("active").addClass("inactive");
	    if ($.trim(this.value) == ''){
	    	this.value = (this.defaultValue ? this.defaultValue : '');
		}
	});
});			
