If we get to a point where the client js is being refactored, I think it would be good to wrap everything up as properties of a single global fotonotes object rather than the 40+ variables and functions currently being added to the global scope. Some -- especially the DragResize code -- could quite easily conflict with other applications on the page.