problem with object embed

problem with object embed

hi

i have problem with put value into embed object

<div class="movie">                             
    <div class="youtube">
    <object width="$Width" height="$Height">
       <embed src="" type="application/x-shockwave-flash" allowfullscreen="true" width="$Width" height="$Height" wmode="transparent"></embed>
       <param value="transparent" name="wmode"></param>
       <param name="movie" value=""></param>
       <param name="allowFullScreen" value="true"></param>
       <param name="allowscriptaccess" value="always"></param>
    </object>
    </div>

<ul>
<li>
     <img title="$Title" src="http://i4.ytimg.com/vi/$VideoID/default.jpg" alt="$Title" width="114" height="94" class="miniimage" />
     <span class="http://www.youtube.com/v/lb6jQZHb4ys" ></span>
</li>

<li>.....
...
</ul>


and now in jQuery i have

$(".miniimage").click(function() {     
        $(".movie .youtube object embed").attr("src", $(this).next("span").attr("class"));
})


but this code doesn't work