Loading jQuery With Two Fallbacks
<p>CSS-Tricks suggests <a href="http://css-tricks.com/snippets/wordpress/include-jquery-in-wordpress-theme/" rel="nofollow">this code</a> to load jQuery.</p>

<p>However, I'm curious if anybody has done the same thing in functions.php with <strong>two fallbacks: the Microsoft hosted jQuery being the first option and locally hosted jQuery being the second</strong>, that is, in the case the Google library decides not to load/crashes/gets eaten by a polar bear/etc.</p>

<pre><code>if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11);
function my_jquery_enqueue() {
   wp_deregister_script('jquery');
   wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false, null);
   wp_enqueue_script('jquery');
}
</code></pre>
