Conditionally load jQuery instead of loading everywhere.
Merge pull request #1815 from darkwing/conditional-jquery-ui

Only load jQuery UI resources when required