Control blocks do not define a new scope in JS so define the var inside the loop for readability.
s/spinnemr/spinner
JSHint and Mozilla codinsg standard fixes.