animation priority

i have a basic human model with walk idle and attack animation to let the model walk i use animation cross fade
but my aim is to play the attack animation while walking so that the animations overlap but the attack animation should not be affected
the same for attacking while standing

thats the script idea without attacking

var xspeed = 0.1;
var rotateSpeed : float = 1.0;

function Update () 
{
	
	
 var xMove : float = Input.GetAxis("Vertical") * Time.deltaTime * xspeed;
 transform.Translate(Vector3(0,0,xMove));
 transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0); 
 
 
 if (Input.GetAxis("Vertical"))
       animation.CrossFade("walk"); 
      
      else
      
      animation.CrossFade("Idle");

	}

thanks for help

Look into animation layers and AddMixingTransform