Pay attention to the "new Date" constructor at line 6. It HAS to be written like jakecigar did (new Date). Otherwise, "date" (lowercase) will be a variable.
If that wasn't a typo, it would probably be the problem the OP is facing in posting it. "date" written like that is stopping the script execution.
You can see what I mean here:
http://jsfiddle.net/noth1ng/BLgtg/