What trick does tom play on Jim?

Tom simly play a trick by putting Jim's hat on a tree branch over Jim's head.