See demo below. Put some Quincy Jones as background music and tweak the values of the script for extra hilarity.
Here's the full code (not visible in RSS):I am quite certain the code can be optimized a lot. Now it does plenty of ineffective things. Some lookups could be memoized or even precalculated and so on.