
$(document).ready(function () {

    $("input").focus( function() {
        $(this).css('borderWidth','2px');
    })

    $("input").blur( function() {
        $(this).css('borderWidth','1px');
    })


    $('.example-text').click(function() {
        $(this).val('');
        $(this).removeClass('example-text')
    })
    $('#submit').click( function(e) {
        $("input.required").each(function() {
            $(this).css('borderColor','#b6b7ba');
            $(this).css('backgroundColor','#ffffff');
        });
        var complete = -1;
        $("input.required").each(function() {
            if($(this).attr('value') == '' || $(this).attr('value') == 'This is a required field' ) {
                $(this).val('This is a required field');
                $(this).css('borderColor','red');
                $(this).css('backgroundColor','#fff7f7');
                $(this).addClass('error');
                complete = 0;
            } else { if (complete != 0) { complete = 1; } }
        });
        $("input.error").focus( function() {
            $(this).val('');
        })
        if( complete == 1 ) { return true } else { return false }
    });
});
