People watching funny videos or surfing Hannah Montana websites for a good laugh at work may not be goofing off. They may be simply getting their mind in gear to do their work better, like an athlete during pre-game warm-ups.

Applying rules may sound fairly mundane and totally unrelated to creativity. But anyone who's tried to arrange their music CDs by type of music has found out that some of them just don't fit comfortably into any category.

Several theories of how the mind works suggest that a good mood leads to more flexible thinking. A team at the University of Western Ontario set out to test how mood affected the ability of people to learn and apply an intricate set of rules on how to classify sets of pictures with visually complex patterns.

The researchers used music and video clips to manipulate the mood of their subjects. First they had to find out how music and video affected their subjects: what made them sad and what made them happy. For this group, music by Mozart and a clip of a baby laughing made the subjects the happiest, while music from Schindler's List and a news report about an earthquake made them the saddest.

Naturally, what constitutes good music and what is and isn't funny will vary tremendously from person to person.

After soaking up music and video, the subjects then had to learn how to classify the visual patterns and apply this knowledge by classifying a set of them. The subjects who saw and heard the happy media did better than subjects who saw and heard sad or neutral media.

Applying rules may sound fairly mundane and totally unrelated to creativity. But anyone who's tried to arrange their music CDs by type of music has found out that some of them just don't fit comfortably into any category; classfying them requires quite a bit of creative thinking.

The researchers take these results to mean that "if you have a project where you want to think innovatively, or you have a problem to carefully consider, being in a positive mood can help you to do that."

Now all you have to do is convince your boss.

An article detailing the study appears in the December 2010 issue of Psychological Science.