>Finally found the issue, and yes - I feel like an idiot.
>
>Apparently, while trying various things I inadvertently capitalized the 'I' in 'If' and no one (including me) that was looking at it caught it for quite a while. Once I un-capitalized it, it worked exactly as it should. javascript - case insensitive, 'til it's not.
You'd be amazed how much of it can
http://jslint.com/ catch. Just try it.