Fix jquery issues

Fixes some issues found on the jQuery bridge.
There's still an issue on the Dialog samples, because the JQuery UI library is not on the jQuery180 project. If it is cleared fo the COO we should include the jQuery UI library so that we can use it for the dialogs.