/*
 * Written by Rob Schmitt, The Web Developer's Blog
 * http://webdeveloper.beforeseven.com/
 */
 
var active_color = '#006091'; // Colour of user provided text
var inactive_color = '#8ea8c5'; // Colour of default text
var g_default_values = new Array();

$(document).ready(function() {

    $("input.default-value").css("color", inactive_color);

    var default_values = new Array();

    $("input.default-value").focus(function() {

        if (!default_values[this.id]) {
            default_values[this.id] = this.value;
        }

        if (this.value == default_values[this.id]) {
            this.value = '';
            this.style.color = active_color;
        }

        $(this).blur(function() {
            if (this.value == '') {
                this.style.color = inactive_color;
                this.value = default_values[this.id];
            }
        });
    });

    //Lorand:
    $("input.default-value").each(function() {

        g_default_values[this.id] = this.value;

    });


});
