Camera zoom out on follow

hey guys

I have this really simple camera follow script set up.

How would I implement something where the camera zooms out as the character moves, reaches a max limit, then when the character stops moving the camera zooms back in again?

using UnityEngine;

public class CameraFollow : MonoBehaviour {
	public Transform Player;
	public Vector3 Offset;

	void LateUpdate ()
	{
		if (Player != null)
			transform.position = Player.position + Offset;
		
	}
}

doh, just found this.

http://wiki.unity3d.com/index.php/CarSmoothFollow

Thought I’d post it here in case anyone finds the question and is left without an answer.