Using JQuery with WordPress

Using JQuery with WordPress

I am new to both JQuery and Javascript. I write mostly in PHP. I have
a wordpress installation, and would like to add a page with dynamic
areas. If I hover the mouse over area1, the text in area2 will change
and the image in area3 will change.
Typically, this is the function I would write for something like this:
$(document).ready(function(){
$('#area1').moveover(function(){
$('#area2').html('my new text.');
$('#area3').html('<image src="image.jpg">');
});
});
HTML code:
<div id="area1">Area1</div>
<div id="area2">Area2</div>
<div id="area2">Area2</div>
But this is woordpress, so, gather that step1 is activate JQuery, and
I do that by including the following in the head section of the
theme's header.php file:
<?php
    wp_enqueue_script('jquery');
?>
What's next? where does my function go? in the page itself, or inside
the header.php file?
--