Fix for 3.5 modal

This did it for me. I don't know why you have to click twice on the button, but it does work as expected.
Revert "Fix for 3.5 modal"

This reverts commit 6bcd8eb23111f1f0fce0b8df1ca977133fbf2855.
Fixes for 3.5 modal

Don't know exactly why, but you have to click twice the button. Anyway,
this works "almost" flawless for the new modal form.
fixed double click to open modal

Silly me.
Merge pull request #6 from LordZepto/3.5

3.5 - updates from LordZepto for media modal