$(document).ready(function(){
    
    $('#Name').focus();
    
    $("form input:text,#Message").focus(function(){
          $(this).css("border", "2px solid #000000");
    }).blur(function(){
          $(this).css("border", "2px solid #064d6b");
        }
    );
    
    $('#btnSubmit').click(function(){
        var isValid = true;
        $("form input:text,#Message").each(function(){
            if($(this).val() === ''){
                isValid = false;
                $(this).css('background-color', '#ffff99');
            }else{
                $(this).css('background-color', '#fff5dc');
            }
        });
        
        if(!isValid){
            $('#contactError').show();
            return false;
        }
    });
    
});
