
$(document).ready(function() {






//CLEAR SEARCH BOX

/*
    $('input[name=s]').bind("focus blur",function(){
        if ($(this).attr("value") == 'SEARCH')
        {
            $(this).attr("value","");
        }
        else if ($(this).attr("value") == '')
        {
            $(this).attr("value","SEARCH");
        }
    });

  */ 
    
    //CV form functions
    
    $("form.wpcf7-form input, form.wpcf7-form textarea").focus(function(){
        var newValue = '';
        
        if ($(this).attr("name") == 'cv_name' && $(this).attr("value") == 'Name') {
                $(this).attr("value",newValue);
        }
        
        if ($(this).attr("name") == 'cv_email' && $(this).attr("value") == 'Email') {
                $(this).attr("value",newValue);
        }

        
        if ($(this).attr("name") == 'cv_subject' && $(this).attr("value") == 'Subject') {
                $(this).attr("value",newValue);
        }
        
        if ($(this).attr("name") == 'cv_comments' && $(this).attr("value") == 'Comments') {
                $(this).attr("value",newValue);
        }
        
    });

    $("form.wpcf7-form input, form.wpcf7-form textarea").blur(function(){
        if ($(this).attr("name") == 'cv_name' && $(this).attr("value") == '') {
                $(this).attr("value","Name");
        }

        if ($(this).attr("name") == 'cv_email' && $(this).attr("value") == '') {
                $(this).attr("value","Email");
        }
        if ($(this).attr("name") == 'cv_subject' && $(this).attr("value") == '') {
                $(this).attr("value","Subject");
        }
        if ($(this).attr("name") == 'cv_comments' && $(this).attr("value") == '') {
                $(this).attr("value","Comments");
        }
    });


})//END




