$(document).ready(function(){//runs when DOM has loaded
        $(".info").fadeIn(700);
           
            set_focus()
            set_blur();
            
            $('input')[3].onclick = function(){
                clear_blur();
                focus_all();
                if ($('input')[0].value != "" && $('input')[1].value != "" && $('textarea')[0].value != "" ){   
                    $('form')[0].submit();    
                    }
                else {set_blur(); }
                }
});
   
        
        function message(obj) {
            obj.show('slow');
            var t=setTimeout(function(){obj.hide('slow');}, 5000);
        }
        function set_focus(){
            $('input')[0].onfocus = function(){if (this.value == "name") {this.value =""}}            
            $('input')[1].onfocus = function(){if (this.value == "email") {this.value =""}}            
            $('textarea')[0].onfocus = function(){if (this.value == "message") {this.value =""}}
            
        }
        function set_blur() {
            $('input')[0].onblur = function(){if (this.value == "") {this.value ="name"}}            
            $('input')[1].onblur = function(){if (this.value == "") {this.value ="email"}}            
            $('textarea')[0].onblur = function(){if (this.value == "") {this.value ="message"}}
        }
        
        function clear_blur() {
            $('input')[0].onblur = ""; $('input')[1].onblur = ""; $('textarea')[0].onblur = ""; //remove "onblur" function

        }
        
        function focus_all() {
            $('input')[0].onfocus(); $('input')[1].onfocus(); $('textarea')[0].onfocus(); //run "onfocus" functions to remove default values

        }
