Adding check to make sure we use jQuery only if it is available.