Fix: the subImageBox can now expand up and left and stay correct when expanding the browser window when the view port is on the bottom or right edge.
Changed despeckle to have consistent style.

Even though doing var declarations like this doesn't change the scope of the variable from the entire function (it gets hoisted,) I find this style better because:
- you don't have to maintain the variable in two places: at the top of the function, and where it's used
- (readability:) the var declaration tells you that it's a new variable, so you can easily see whether a variable is being initialised or being updated/overwritten