walk to run animation

how can i make this code that when i press T its switches the animation to run and when i press T again it changes back the animation to walk this is what i got now and if you can help me that will be great if your confused just comment

animation.wrapMode = WrapMode.Loop;

animation["jump"].wrapMode = WrapMode.Clamp;
animation["shoot"].wrapMode = WrapMode.Clamp;
animation["grab"].wrapMode = WrapMode.Clamp;

animation["idle"].layer = -1;
animation["walk"].layer = -1;
animation["run"].layer = -1;

animation.Stop();

function Update () {
    if (Mathf.Abs(Input.GetAxis("Vertical")) > 0.1)
        animation.CrossFade("walk");
    else
        animation.CrossFade("idle");
        if(Input.GetKeyDown("t"))
        animation.CrossFade("run");

    if (Input.GetButtonDown ("Jump"))
        animation.CrossFade("jump");

    if (Input.GetButtonDown ("grab"))
        animation.CrossFadeQueued("grab", 0.08, QueueMode.PlayNow);

    if (Input.GetButtonDown ("Fire1"))
        animation.CrossFadeQueued("shoot", 0.3, QueueMode.PlayNow);

}

    if(Input.GetKeyDown("t"){
    if(animation.CrossFade == "run"){
       animation.CrossFade("walk");
    }
    else{
    animation.CrossFade("run");
    }
  }

if (Mathf.Abs(Input.GetAxis("Vertical")) > 0.1)
    animation.CrossFade("walk");
else
    animation.CrossFade("idle");

You need to change this code. Basically you're crossfading to "idle" every frame that you're not moving and not pressing down on T.

You need to add another variable to set the "idle but running" state when you press T so you're not crossfading to idle every frame.