This assumes you have jQuery accessible locally.
Well, I would suggest you "attempt" to load the script from the remote host via jQuery/Ajax, I think they have some tools to help you do this. Then check the response code... I think 200 is "OK", if it's not "OK", then proceed to load the local version.
<script>
$('body').getScript('<yourremotehostaddress>').fail(function(jqxhr, settings, exception) {
// Load your local script here.
});
</script>
Hope this helps :)
Also a solution from the comments above: You can try to load the script from the remote host and after the attempt try to access an object included in the script.. Assuming there is one.
Update: Sorry for the initial post, I didn't realize that the handler passed to getScript() only gets called if the request succeeds. We want to check for failure.