Trying to load a video dynamincally from a gallery
<p>this code is suppose to do, is when the user clicks the image in the #thummbnails_div, the Text in #show_div is replaced with the youtube video with that ID . Since i am new here i can't post images. So the code to insert an image is incorrect i know. Thanks in advance.</p>

<pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){$("#thumbnails_div img").click(function(){ var youtubeID=$(this).attr("id"); $("#show_div").empty(); $("#show_div").append("&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/+youtubeID+rel=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.come/v/"+youtubeID+"$rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;"); });  }); &lt;/script&gt;       &lt;divid="show_div"&gt;Click pic below to see video&lt;/ div&gt; &lt;div id="thumbnails_div"&gt;&lt;image id="OrgSdZH_rkU" src="http://img.youtube.com/vi/OrgSdZH_rkU/default.jpg" /&gt;&lt;/div&gt; 
</code></pre>
