[SOLVED] toggle layer, click to show one and the rest hides

[SOLVED] toggle layer, click to show one and the rest hides

I use toggle in a menu to show submenus, but if I click on one and then click on some other link to toggle another submenu, the first submenu is still visible.

Is there someway to change my code so if I click to show one submenu, all the other submenus hides at the same time?

Now my code looks like this:

<script type="text/javascript">

    $(function() {
        $('a#m1toggle').click(function() {
            $('#m1').toggle();
        });
        $('a#m2toggle').click(function() {
            $('#m2').toggle();
        });
        $('a#m3toggle').click(function() {
            $('#m3').toggle();
        }); 
         
    });
</script>






    <li><a href="#" id="m1toggle">summer</a>
    <div id="m1">
    <a href="link">june</a>
   <a href="link">july</a>   
    </div></li>

   
    <li><a href="#" id="m2toggle">winter</a>
    <div id="m2">
    <a href="link">november</a>
   <a href="link">december</a>   
    </div></li>
   
    <li><a href="#" id="m3toggle">weather</a>
    <div id="m3">
    <a href="link">rain</a>
   <a href="link">sun</a>   
    </div></li>