langtrap

throw one's cap over the windmill

v.
(idiomatic, dated) To act in a bizarre, eccentric or immoral manner.