
jQuery(document).ready(function () {

    jQuery("#login-close").click(function(event) {
        jQuery("#login-window").css('display', 'none');
        jQuery("#material-object").css('visibility', 'visible');
    });

    jQuery("#login-button").click(function(event) {
        jQuery("#login-window").css('display', 'block');
        jQuery("#login-userid").focus();
        jQuery("#material-object").css('visibility', 'hidden');
        return false;
    });

    jQuery("#login-userid").focus(function(event) {
        this.background_value = this.style.backgroundImage;
        this.style.backgroundImage = 'none';
    });

    jQuery("#login-userid").blur(function(event) {
        if (this.background_value)
            this.style.backgroundImage = this.background_value;
    });

    jQuery("#login-password").focus(function(event) {
        this.background_value = this.style.backgroundImage;
        this.style.backgroundImage = 'none';
    });

    jQuery("#login-password").blur(function(event) {
        if (this.background_value)
            this.style.backgroundImage = this.background_value;
    });

});
