
var active_color = '#000'; // Colour of user provided text
var inactive_color = '#999'; // Colour of default text

jQuery.noConflict();

jQuery(document).ready(function(){

 jQuery(".default-value").css("color", inactive_color);
    var default_values = new Array();                      
 
    jQuery('input[type="text"]').focus(function() {
        if (this.value == this.defaultValue){
        this.value = '';
            this.style.color = active_color;
    }
    if(this.value != this.defaultValue){
        this.select(); 
        this.style.color = active_color;
    }
    });
    jQuery('input[type="text"]').blur(function() {
        if (this.value == ''){
        this.value = (this.defaultValue ? this.defaultValue : '');
        this.style.color = inactive_color;
    }
    });

    jQuery('textarea').focus(function() {
        if (this.value == this.defaultValue){
        this.value = '';
            this.style.color = active_color;
    }
    if(this.value != this.defaultValue){
        this.select(); 
        this.style.color = active_color;
    }
    });
    
    jQuery('textarea').blur(function() {
        if (this.value == ''){
        this.value = (this.defaultValue ? this.defaultValue : '');
        this.style.color = inactive_color;
    }
    });
});