this looks good except for the formatting. fix your indentation (4 spaces for JS) and make sure that closing brace is lined up in the right column.

otherwise ACK