There are strange and technically inadvisable JS shenanigans going on in the function.  Talked to Morgan he'll add an explanation.