Wrapped pulsing in closure to fix mutable key variable.

Hey David,

Every time the `for` loop spins, `key` gets updated with the new value. That value is then accessed by all the setInterval callbacks, which then all point to the same `<div>` to flash. What's needed is a copy of the `key` that is scoped inside the loop, so I've just chosen to wrap pulsing in a closure.