$(function() {
    labels = $('label.inset');
    for(i=0; i<labels.length; i++){
        label = labels[i];
        $input = $('#' + label.htmlFor);
        if ($input.length > 0) {
            if ($input[0].value!='') {
                label.style.visibility = 'hidden';
            } else {
                label.style.visibility = 'visible';
            }
            $input.focus(function() {
                $("label[for='" + this.id + "']", this.form)[0].style.visibility = 'hidden';
            })
            $input.blur(function() {
                if (this.value=='') {
                    $("label[for='" + this.id + "']", this.form)[0].style.visibility = 'visible';
                }
            })
        }
    }
});