$(function () {
    function setLabel() {
        if (this.value == "") {
            this.value = this.title;
        }
    }
    
    function clearLabel() {
        if (this.value == this.title) {
            this.value = "";
        }
    }
    
    $(".ctrlHolder:has(.textInput)").find("label").hide().end().find("input").each(setLabel).focus(clearLabel).parents("form").submit(function () {
        $(this).find(".ctrlHolder:has(.textInput) input").each(clearLabel);
    });
});