Call jquery function in Wordpress correctly
===

i'm developing a website through wordpress source code. I'm using a child theme for twenty ten, and i have a jquery file with a function that i want to incorporate in the website. My problem is: how can i call this file through "functions.php" and not by pasting the script on the html page? 


I found i should use something like this:

             function my_scripts() {
             wp_enqueue_script( 'my-sweet-script', get_bloginfo('template_directory') . '/script.js', array('jquery') );
         }
     
     add_action('template_redirect', 'my_scripts');



And where should i put the .js file so that he doesn't get replaced with wordpress updates?

