title: YouTube embeded player: change video link with javascript, dynamically
body: <p>Here is a part of my html code (video urls marked with a django-template language variables):</p>
  
  <pre><code>&lt;div class="mainPlayer"&gt;
          &lt;object width="580" height="326"&gt;
              &lt;param name="movie" value="{{main_video.video_url}}"&gt;&lt;/param&gt;
              &lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;
              &lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;
              &lt;embed src="{{main_video.video_url}}" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="580" height="326"&gt;&lt;/embed&gt;
          &lt;/object&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>and JS-code (using jQuery 1.4.x)</p>
  
  <pre><code>$(document).ready(function(){ .....
  $(".activeMovie img").live("click", function(){
      video_url = ($(this).parent().find('input').val());
      $('.mainPlayer').find('param:eq(0)').val(video_url);
      $('.mainPlayer').find('embed').attr('src', video_url);
  })
  ...
  })
  </code></pre>
  
  <p>Such a algorithm works fine in ff 3.6.3, but no luck in chrome4 or opera 10.x., <code>src</code> and <code>value</code> are changed, but youtube player still shows an old video.</p>