How I can find the complete event of my animation

I am creating a demo in which I play two animation one is default which always run in background and one is when I clicked on my button. I want my default animation stops until my clicked animation not completed and when my clicked animation is complete i will play my default animation again.

using UnityEngine;
using System.Collections;

public class hump_movement : MonoBehaviour {

	// Use this for initialization
	public GUITexture humpbutton;
	public AnimationClip humpanim;
	public AnimationClip idle;
	public bool myvar= false;
	
	
	void Start () {
	}
	
	// Update is called once per frame
	void Update () {

		if (Input.GetMouseButton (0) && humpbutton.HitTest (Input.mousePosition)) {

			animation.Play(humpanim.name);
			Debug.Log("1");
			}  

		else if(!Input.GetMouseButton (0) && humpbutton.HitTest (Input.mousePosition)){
			animation.Play (idle.name);
			Debug.Log("2");
			
	              }
          }
}

Try to use coroutines. Or look at this THREAD HERE

void Update () 
{
 
       if (Input.GetMouseButton (0) && humpbutton.HitTest (Input.mousePosition)) 
	   { 
         StartCoroutine(PlayAnimation(humpanim.name));         
       }  
}

IEnumerator PlayAnimation(string animationName)
    {        
        animation.CrossFade(animationName, 0.3f);        
        yield return new WaitForSeconds(animation.GetClip(animationName).length); // wait untill animation ends        
        animation.Play(idle.name);        
    }