Got the following code for a project I'm working on but the JavaScript isnt working in IE7 and IE8

Code:
<script type="text/javascript">
var drinks = ['rum', 'le', 'montingo', 'tingquila', 'passionate'];

function openDrink(e) {
  $("div." + e.data).fadeIn("slow");
}

$(document).ready(function() {
  $.each(drinks, function(i, el) {
    $("div." + el + " > img.close").click(function(tar) {
      $(tar.currentTarget).parent().fadeOut("slow");
    });
    $('img.' + el).click(el, openDrink);
  });
});
</script>
anyone know of a fix for this.
thanks in advance