There's no reason you couldn't code this up in JavaScript:
load jquery from google
- onload, set flag jquery_loaded
settimeout load_locally_if_not_flag 5sec