jQuery(document).ready(function(){
    contactForm.initialize();
})
var contactForm = new Object();

contactForm.lastValue = '';
contactForm = {

    initialize: function(){

        $('input').unbind('click');
        $('input').unbind('focusout');
        $('textarea').unbind('click');
        $('textarea').unbind('focusout');
        $('input').click(function(){
            contactForm.lastValue = $(this).attr('value');
            $(this).css('color','#000');
            if($(this).val() != ''){
                $(this).attr('value','');
            }
        });
        $('input').focusout(function(){
            if($(this).val() == ''){
                $(this).val(contactForm.lastValue);
                $(this).css('color','#CCC');
            }
        });
        $('textarea').click(function(){
            contactForm.lastValue = $(this).attr('value');
            $(this).css('color','#000');
            if($(this).val() != ''){
                $(this).attr('value','');
            }
        });
        $('textarea').focusout(function(){
            if($(this).val() == ''){
                $(this).val(contactForm.lastValue);
                $(this).css('color','#CCC');
            }
        });
        
    }


}



