Game Object Not destroying

What I want this to do is destroy the game object when the animation is finished, so far I tried every method imaginable, but I need help:

[28382-unity+2014-06-27+16-33-02-91.jpg|28382]

Destroy GameObject at end of animation:

if(transform.animation["YourAnimation"].time > 1) { 
	Destroy(gameObject); 
}