/*
Author: Joe Tan (joetan54@gmail.com)
*/
jQuery(function($) {
});

$(document).ready(function(){
	$('.focusClear').focus(function(){
        
	  //assign a local variable so our function 
	  //will have its own unique original value per item
	  var originalValue = this.value;
	  
	  //first time we always clear
	  this.value = '';
	  
	  //unbind this jquery inline function
	  //because we want to set original value once
	  $(this).unbind('focus');
	  
	  //add an unique onblur per item
	  this.onblur = function(){
		if(this.value == ''){
		   this.value = originalValue;	
		}
		
		//attach the new unique onfocus per item
		this.onfocus = function(){
			 if(originalValue == this.value){
				this.value = '';	
			 }
		  }
	  }
	});
}

