// validate layout contact us fields values

var contact_us_bottom_full_name=null;
var contact_us_bottom_email=null;
var contact_us_bottom_phone=null;
var contact_us_bottom_purpose=null;

var contact_us_leftnav_full_name=null;
var contact_us_leftnav_email=null;
var contact_us_leftnav_phone=null;
var contact_us_leftnav_message=null;

$(document).ready( function() {
    
   /* contact us bottom */
   contact_us_bottom_full_name=$('body #contact_us_bottom_full_name').val();
   contact_us_bottom_email=$('body #contact_us_bottom_email').val();
   contact_us_bottom_phone=$('body #contact_us_bottom_phone').val();
   contact_us_bottom_purpose=$('body #contact_us_bottom_purpose').val();
   
   $('body #contact_us_bottom_full_name').focus(function(){
        if($(this).val()==contact_us_bottom_full_name){$(this).removeAttr("value")}}).blur(function(){if($(this).val()==""){$(this).val(contact_us_bottom_full_name)}
    });   
   $('body #contact_us_bottom_email').focus(function(){
        if($(this).val()==contact_us_bottom_email){$(this).removeAttr("value")}}).blur(function(){if($(this).val()==""){$(this).val(contact_us_bottom_email)}
    });
   $('body #contact_us_bottom_phone').focus(function(){
        if($(this).val()==contact_us_bottom_phone){$(this).removeAttr("value")}}).blur(function(){if($(this).val()==""){$(this).val(contact_us_bottom_phone)}
    });
   /* /contact us bottom */
   
   /* leftnav bottom */
   contact_us_leftnav_full_name=$('body #contact_us_leftnav_full_name').val();
   contact_us_leftnav_email=$('body #contact_us_leftnav_email').val();
   contact_us_leftnav_phone=$('body #contact_us_leftnav_phone').val();
   contact_us_leftnav_message=$('body #contact_us_leftnav_message').val();
   
   $('body #contact_us_leftnav_full_name').focus(function(){
        if($(this).val()==contact_us_leftnav_full_name){$(this).removeAttr("value")}}).blur(function(){if($(this).val()==""){$(this).val(contact_us_leftnav_full_name)}
    });
   $('body #contact_us_leftnav_email').focus(function(){
        if($(this).val()==contact_us_leftnav_email){$(this).removeAttr("value")}}).blur(function(){if($(this).val()==""){$(this).val(contact_us_leftnav_email)}
    });
   $('body #contact_us_leftnav_phone').focus(function(){
        if($(this).val()==contact_us_leftnav_phone){$(this).removeAttr("value")}}).blur(function(){if($(this).val()==""){$(this).val(contact_us_leftnav_phone)}
    });
   $('body #contact_us_leftnav_message').focus(function(){
        if($(this).val()==contact_us_leftnav_message){$(this).removeAttr("value")}}).blur(function(){if($(this).val()==""){$(this).val(contact_us_leftnav_message)}
    });
   /* /leftnav bottom */
   
   
});

function validate_contact_us_bottom_full_name()
{
    if( $('body #contact_us_bottom_full_name').val() == contact_us_bottom_full_name ) return false;
    return true;
}

function validate_contact_us_bottom_email()
{
    if( $('body #contact_us_bottom_email').val() == contact_us_bottom_email ) return false;
    return true;
}

function validate_contact_us_bottom_phone()
{
    if( $('body #contact_us_bottom_phone').val() == contact_us_bottom_phone ) return false;
    return true;
}

function validate_contact_us_bottom_purpose()
{
    if( $('body #contact_us_bottom_purpose').val() == contact_us_bottom_purpose ) return false;
    return true;
}

function validate_contact_us_leftnav_full_name()
{
    if( $('body #contact_us_leftnav_full_name').val() == contact_us_leftnav_full_name ) return false;
    return true;
}

function validate_contact_us_leftnav_email()
{
    if( $('body #contact_us_leftnav_email').val() == contact_us_leftnav_email ) return false;
    return true;
}

function validate_contact_us_leftnav_phone()
{
    if( $('body #contact_us_leftnav_phone').val() == contact_us_leftnav_phone ) return false;
    return true;
}

function validate_contact_us_leftnav_message()
{
    if( $('body #contact_us_leftnav_message').val() == contact_us_leftnav_message ) return false;
    return true;
}
