// Changes the text box based on focus.
// Based on buildinternet http://buildinternet.com/2009/01/changing-form-input-styles-on-focus-with-jquery/
$(document).ready(function() {
	// When field is in focus, changes class. Removes default value unless there is text in there.
	$('input#search').focus(function() {  
		if (this.value == this.defaultValue){  
			this.value = '';  
		}  
		if(this.value != this.defaultValue){  
			this.select();  
		}  
	});
	
	// When field is no longer focus, reverts back if field is empty. 
	$('input#search').blur(function() {
		if (this.value == ''){
			this.value = this.defaultValue;
		}
	});
});

