Custom Jquery in admin breaks media-upload script

A lot of people think it’s a bad practice to deregister/reregister jQuery, despite the performance improvements c/o a CDNed version (and if you’re going for a CDN, I see Google’s version more often than jQuery’s). However, if you’re going to do that, you really should only do that on the front-end only so at least the admin can correctly assume that the current WP-preloaded jQuery version is being used.

So switch your script to this and I suspect your problems probably will end:

function my_custom_scripts() {
    if( !is_admin() ) {
        wp_deregister_script('jquery');
        wp_register_script('jquery', ("http://code.jquery.com/jquery-latest.min.js"), false, '');
        wp_enqueue_script('jquery');
    }
}
add_action( 'wp_enqueue_scripts', 'my_custom_scripts' );