﻿$(function() {
    $(".loginTextBox").focus(function(e) {
        switch (this.value) {
            case "type in a username":
                this.value = "";
                break;
            case "type in a password":
                var name = $(this).attr('name');
                var id = $(this).attr('id');
                var css = $(this).attr('class');
                var style = $(this).attr('style');

                var html = '<input type="password" name="' + name + '" value="" id="' + id + '" class="' + css + ' password" style="' + style + '" />';

                $(this).after(html).remove();

                $(".password").focus();
                break;
            case "your name":
                this.value = "";
                break;
            case "your age":
                this.value = "";
                break;
        }
    });
});