image gallery not working in IE

image gallery not working in IE

Hi guys, 

      Just wondering if you can help me out with this problem, i'm trying to use a jquery slider which i downloaded from one of jquery sites.. Slider works fine in all browsers except I.E.. The problem only occurs once a integrate javascript codes with php.. See codes below:

      //my codes
      <?php
echo<<<EOD
<script type='text/javascript'>
if(!window.slider)
var slider={};
slider.data=[
EOD;

$query = "select id, item_name, description from items where brand_id='$_GET[id]'";
$result = mysql_query($query) or die(mysql_error());
while($row=mysql_fetch_array($result)) {
list($id, $item, $desc)=$row;
echo "{'id':'".$row['id']."','client':'".$row['item_name']."','desc':'".$row['description']."'},";
}
echo<<<EOD
                ];
</script>
EOD;
?>

      //original codes

      <script type="text/javascript">
    if(!window.slider)
var slider={};
slider.data=[{"id":"slide-img-1","client":"nature beauty","desc":"nature beauty photography"},{"id":"slide-img-2","client":"nature beauty","desc":"add your description here"}];

   </script>

     When i also went to the developer's tool of IE, getting an error  'id' is null or not an object" which is at line 86. Please see below some of my javascript codes..

                    var d=slider.data;
                    slider.num=d.length;
                    var pos=Math.floor(Math.random()*1);//slider.num);
                        for(var i=0;i<slider.num;i++){
line 86-->         $('#'+d[i].id).css({left:((i-pos)*1000)});
                     $('#slide-nav').append('<a id="slide-link-'+i+'" href="#" onclick="slider.slide('+i+');return false;" onfocus="this.blur();">'+(i+1)+'</a>');

      If you could help me out with this, that will be greatly appreciated.. Thanks!