[Fix bug 1097315] Add gallery select when working with events

Ok so here goes. This PR adds the ability to select a image from a gallery when creating a new event.

![screen shot 2014-11-14 at 13 13 46](https://cloud.githubusercontent.com/assets/318208/5053512/01a55c14-6c00-11e4-93a1-13eb29f0873c.png)
![screen shot 2014-11-14 at 13 13 53](https://cloud.githubusercontent.com/assets/318208/5053511/01a534b4-6c00-11e4-9e0f-27a6cc55008c.png)

Keep in mind that I don't have an eye for design!

[Bug 1097315](https://bugzilla.mozilla.org/show_bug.cgi?id=1097315)
Let's change this to 
```javascript
$(function() {
```
That's by the way, the way it's done in all other places.