$(function() {
    $("input[placeholder]").focus(function() {
        if (this.value == $(this).attr("placeholder")) {
            this.value = '';
        }
        $(this).removeClass('placeholder');
    }).blur(function() {
        if (this.value == '' || this.value == $(this).attr("placeholder")) {
            this.value = $(this).attr("placeholder");
            $(this).addClass('placeholder');
        }
    }).change(function() {
        if (this.value == $(this).attr("placeholder"))
            $(this).addClass('placeholder');
        else
            $(this).removeClass('placeholder');
    }).blur();
});

