check if JQuery is loaded

some modules added and a functionality to check if JQuery, and JQuery UI
are loaded before executing the script