[jQuery] Animating height but closing any already open (like an accordion)

[jQuery] Animating height but closing any already open (like an accordion)

<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi all!
I have anywhere from 3 - 8 DIVs on a page that I open/close (animate height toggle) via a button and want to close any (one) that are already open when another is opened - just like an accordion.
How do I either determine the current open state of a DIV so I know which to close, or maybe close all of them (less efficient) before opening a new one?
I can't use the UI accordion because of the way the DIVs are separated and nested deep within a bunch of other stuff.
The code I am using to toggle them is:
onclick="$('#slideblock_<?php echo $group['id'] ?>').animate({height:'toggle',opacity:'toggle'}, 'fast')"
Any help would be great. Thanks!!
<br /><hr />Windows Live™ SkyDrive™: Get 25 GB of free online storage. <a href='http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_042009' target='_new'>Check it out.</a></body>
</html>