Replace jQuery Version in WordPress

// ******************************************************************
// ##################### LOAD ALTERNATE JQUERY ######################
// ******************************************************************

//Making jQuery Google API

function modify_jquery() {
    if (!is_admin()) {
        // comment out the next two lines to load the local copy of jQuery
        wp_deregister_script('jquery');
        wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', false, '1.8.1');
        wp_enqueue_script('jquery');
    }
}
add_action('init', 'modify_jquery');