Extended load detection for jQuery

Added some extra scripting that detects if jQuery is loaded and ensures
that proper functioning takes place