How to tell if a rigidbody2d has stopped in unity2d?

I want to be able to tell if a rigidbody has stopped moving on one axis, is there anyway i can do this? Thanks, and i have added some sample code to show what i am trying to accomplish

 *	public Rigidbody2D speed;
 * speed = rigidbody2d.velocity; //This is the part i dont get

 *if(speed == 0){
				Application.LoadLevel ("Lose");
			jump = false;


Speed should be a float

void Update () {
         speed = rigidbody.velocity.magnitude;
         if(speed <= 0) {
             //your code

Since velocity is a Vector2D object, you can check its x or y component regarding which direction you want to check. For example to check whether your object stopped moving sideways you can use (0 == rigidbody2D.velocity.x). For the vertical movement use the y axis.