
$(document).ready(function () {


    //DOES INPUTFIELDS NEED TO BE STYLED?
    if ($("form input[type='text'], form textarea").size() > 0) {
        
        //HANDLE ORIGINAL TEXT ON INPUTS AND TEXTAREAS
        // SET ON FOCUS VALUES FOR ALL TEXTFIELDS
        $(".textfield").each(function () {
            if ($(this).val() == "") {
                $(this).val($(this).attr("alt"));
            }
        });
        $(".textfield[required='true']").each(function () {
        });
        // CLEAR VALUES ON FOCUS FOR ALL TEXTFIELDS
        $(".textfield").focus(function () {
            if ($(this).val() == $(this).attr("alt")) {
                $(this).val("");
            }
        });
        // ADD ORIGINAL VALUE IF EMPTY FOR ALL TEXTFIELDS
        $(".textfield").blur(function () {
            if ($(this).val() == "") {
                $(this).val($(this).attr("alt"));
            }
        });
    }
});

