This is the preferred way to do lambda scopes now (Rails 3.2)
Class methods, not instance methods (facepalm)
Defining class methods from a module
Refactor script.js to suppress error

The navigation-pinning code was producing JS errors on non-activity pages, so this shuts it off if there's no navigation to pin. Also, some variable renaming to be more Javascripty.
Fixing test we broke for save-on-change.js
Adds bg_source attribute to ImageQuestions

Using this to distinguish between Snapshot questions and blank-background Draw questions for [#58968010]. Using a string as the type so we can eventually allow users to specify for [#59358426].

https://www.pivotaltracker.com/story/show/58968010
https://www.pivotaltracker.com/story/show/59358426
Authors can select Shutterbug or Drawing; buttons

There's a select menu for picking if an ImageQuestion is from Shutterbug or from a Drawing, and the views render different buttons depending on the selection.
This was a premature optimization.
Open the image question window without snapshot

[#58968010] Opening the image question modal without first taking a DOM snapshot actually gets us all the behavior we want, with a few details still needed to account for this new use case.

https://www.pivotaltracker.com/story/show/58968010
Hide the "replace snapshot" if it isn't a snapshot

[#58968010]
Set buttons to edit existing drawing answer

[#58968010] Checking the thumbnail as well as the answer source to show us if there's an existing answer, and thus set the buttons properly. (Also, hide the "draw" button if we're showing "edit".)

https://www.pivotaltracker.com/story/show/58968010
Merge branch 'image-question'