.mouseover/.hover help!

.mouseover/.hover help!

OK So I got 5 images, 3 are headers and layered using z-index(head, head-templates, head-projects) to be on-top of each other; the other 2 are just images for the mouseover(templates, projects). What I want to happen is when you hover over the image templates I want it to animate head to head-templates and when you put your mouse over projects it animates head to head-projects. When your mouse take your mouse off, so mouseout is used, I want it to animate back to head. The code for my website is as follows:
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <link rel="stylesheet" href="style.css" media="screen" />
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>PRENTICE.tk</title>
  7. <script type="text/javascript" src="jquery.min.js"></script>
  8. <script type="text/javascript">
  9. $(function() {
  10.     $('img.head-templates,img.head-projects').hide();
  11.     $('img.templates').hover(function() {
  12.         fadeBetween('img.head', 'img.head-templates');
  13.     },function() {
  14.         fadeBetween('img.head-templates', 'img.head');
  15.     });
  16.     $('img.projects').hover(function() {
  17.         fadeBetween('img.head', 'img.head-projects');
  18.     },function() {
  19.         fadeBetween('img.head-projects', 'img.head');
  20.     });
  21. });

  22. function fadeBetween(from, to) {
  23.     $(from).stop(true, true).fadeOut();
  24.     $(to).stop(true, true).fadeIn();
  25. }
  26. </script>
  27. <script type="text/javascript" src="rollover.js"></script>
  28. </head>
  29. <body onload="MM_preloadImages('images/navbar/home-hover.png','images/navbar/templates-hover.png','images/navbar/projects-hover.png','images/navbar/blog-hover.png','images/navbar/contact-hover.png')">
  30. <div id="header">
  31.      <img src="images/header.png" class="head" alt="HEADER" height="200px"  />
  32.         <img src="images/header-templates.png" class="head-templates" alt="HEADER" height="200px"  />
  33.         <img src="images/header-projects.png" class="head-projects" alt="HEADER" height="200px"  />
  34.     </div>
  35. <div id="navbar">
  36.      <a href="index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','images/navbar/home-hover.png',1)"><img src="images/navbar/home.png" name="Home" width="100" height="50" border="0" id="Home" class="first"/></a>
  37.         <a href="templates.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Templates','','images/navbar/templates-hover.png',2,'Head','','images/head-templates.png')"><img src="images/navbar/templates.png" alt="Templates" name="Templates" width="120" height="50" border="0" id="Templates" class="templates"/></a>
  38.         <a href="projects.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Projects','','images/navbar/projects-hover.png',1)"><img src="images/navbar/projects.png" alt="Projects" name="Projects" width="110" height="50" border="0" id="Projects" class="projects"/></a>
  39.         <a href="http://blog.prentice.tk" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Blog','','images/navbar/blog-hover.png',1)"><img src="images/navbar/blog.png" alt="Blog" name="Blog" width="90" height="50" border="0" id="Blog" /></a>
  40. <a href="contact.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Contact','','images/navbar/contact-hover.png',1)"><img src="images/navbar/contact.png" alt="Contact" name="Contact" width="110" height="50" border="0" id="Contact" /></a>
  41. </div>
  42. </body>
  43. </html>
And the css
  1. @charset "utf-8";
  2. /* CSS Document */
  3. body {
  4. background:url(images/bg.png) repeat;
  5. width: 1000px;
  6. margin-left:auto;
  7. margin-right:auto;
  8. text-align:center;
  9. }
  10. #navbar {
  11. width:1000px;
  12. border:1px #000 solid;
  13. background-image:url(images/navbar/bg.png);
  14. height:50px;
  15. text-align:left;
  16. }
  17. #navbar img{
  18. border-right:1px #000 solid;
  19. border-left:1px #3C3C3C solid;
  20. margin-right:-4px;
  21. }
  22. .first {
  23. border-left:none;
  24. }
  25. #header{
  26. position: relative;
  27. height:200px;
  28. }
  29. #bookmark img{
  30. padding:5px;
  31. }
  32. .head{
  33. position: absolute;
  34. left: 0;
  35. top: 0;
  36. z-index: 10;
  37. }
  38. .head-templates{
  39. position: absolute;
  40. left: 0;
  41. top: 0;
  42. z-index:9;
  43. }
  44. .head-projects{
  45. position: absolute;
  46. left: 0;
  47. top: 0;
  48. z-index:8;
  49. }
Please help I dunno what to do?