document.ready error in IE 7

document.ready error in IE 7

Hi,
 
I am trying to use the Multi Drop Down Menu plugin available at CodeNothing.com. However the problem is occuring even without calling the functions in the plugin. (It occurs when I call the functions in the plugin as well but that doesn't matter)
 
I am experiencing some very strange behaviour. I have some standard nested unordered lists where the top list is given the id multi-ddm. Now when I run the code below I get 1 alert (which is correct as I only have 1 child li element) saying hello.
 
<script>
  $('#multi-ddm > li').each(function(){
   alert('Hello');
  });
</script>



 
However, if I change this code to
 
<script>
 $(document).ready(function(){
  $('#multi-ddm > li').each(function(){
   alert('Hello');
  });
 });
</script>





 
I get an error in IE saying 'Object does not support this property or method'. Strange but it gets weirder.
 
If I remove the > li from the statement so it reads:
 
<script>
 $(document).ready(function(){
  $('#multi-ddm').each(function(){
   alert('Hello');
  });
 });
</script>





 
no error appears and the alert appears once, which is correct.
 
So is it the $(document).ready that is causing the problem or the '> li'. I cannot work it out and have been at it chopping and changing for ages.
 
Please help!!
 
If you would like some source code please let me know.