Why the following jquery code crashing in IE8 but working fine in other browsers like chrome and firefox
<p>I am trying to play a video when an image is clicked. I have browsed lots of sites and gathered bits and pieces here and there. I have not done much jquery before and at the moment I am learning it.</p>

<p>The code that is marked in between commented lines is crashing in IE 8, I am using JQuery 1.5.1</p>

<pre><code>var img_container = $(document.createElement('div')).addClass('ad-image');
var img = $(new Image()).attr('src', image.image);            
img_container.append(img);

this.image_wrapper.prepend(img_container);

/*****************************************/
img_container.click(function () {
      $('&lt;object&gt; &lt;/object&gt;', { class: 'videoContainer', id: 'vid' }
       ).append = $('&lt;param name="movie" value="http://youtube.com/v/jxXukpxNSx4&amp;hl=en&amp;fs=1&amp;autoplay=1"/&gt;' +
      '&lt;param name="allowFullScreen" value="true"/&gt;' +
      '&lt;param name="height" value="344"/&gt;' +
      '&lt;param name="width" value="425"/&gt;' +
      '&lt;param name="allowscriptaccess" value="always"/&gt;').prependTo('.ad-image-wrapper');
});
        /********************************************/
</code></pre>
