$(function() {
    // Text boxes and textfields

    $('input[type=text], input[type=password], textarea').focus(function () {
        var textObj = $(this);
        if (textObj.val() == textObj[0].defaultValue) {
            textObj.val('');
        }
    }).blur(function () {
        var textObj = $(this);
        if ($.trim(textObj.val()) == '') {
            textObj.val(textObj[0].defaultValue);
        }
    });
});
