Best way to animate a guy putting on a hat

How to animate a guy putting on a hat?
In the beginning, the hat is on his hand. After a while the hat is on hid head.
This means the hat will get different parents during this animation
What is the easiest way to do that?

Best way I know of is too make an animation of him putting the hat on his head. Then in UnityScript or C# keep track of the state[in hand or on head] with a boolean variable or something then after the animation plays change the parent. You could then even play the animation in reverse to have him take the hat off. That should work.