Although I appreciated the other comments submitted to this point, I saw this movie at the Cleveland International Film Festival and was terribly perplexed by what it meant to convey.
Initially it's a comedy, and a wonderful one at that. Then the characters get hit hard by life's events. Then they change. Unusual events occur, but we don't know why.
It's not until the end that we're left with the magical part of the story the movie is telling. As the main character, Daniel undergoes a slow but significant metamorphosis from a bum (but a lucky one) to a character who cares about others and has become responsible.
Although at first a minor character, the judge is a sort of doppelganger for Daniel. We first see him in the sleep clinic, then in the court where he pronounces Daniel's sentence. The near-collision with Daniel seems to trigger "the switch", where the judge then steals a gift for his child. By the time we see him staying at the airport instead of going to a meeting we're not even remotely surprised that he runs into Daniel. By the time his wife is confronted with the evidence of his theft the translation to bum is complete.
Now to see the movie paying attention to how and when the magic takes effect: is it the near-accident or when the elephants parade by? What about the flash of color? Is there something else?
A good watch to begin with and a better watch the second time around!