[jQuery] replacing src with attr works fine in FF and fail in IE7 ( for a little galery of pictures )

[jQuery] replacing src with attr works fine in FF and fail in IE7 ( for a little galery of pictures )


Hi,
You'll find below my code.
This code works fine in FF2 et FF3 but not in IE7 .
I ll take any idea
I tried with the document ready tag and it's the same .
<script type="text/javascript">
$(function()
{
$("#productContentInnerGallery a").click(function()
{
     var mysrc = $(this).attr("href");
// var imageSource2 = $(this).children("img").attr(mysrc);
$("#productContentInnerLeftImage img").fadeOut("slow").remove();
$("#productContentInnerLeftImage").addClass('loading');
// alert(mysrc);
showImage(mysrc);
return false;
});
    });
function showImage(src)
{
largeImage = new Image();
var extension=src.substring(src.lastIndexOf("src="));
var mlength = extension.length;
var bigimage =
extension.substring(4,mlength);
$(largeImage).attr("src", src).load(function()
    { //alert(src);
         mytest = $(largeImage).attr("src");
     //    alert(mytest);
$(largeImage).remove();
$("#productContentInnerLeftImage a").remove();
$
("#productContentInnerLeftImage").removeClass("loading").append(largeImage);
$(largeImage).fadeIn("slow");
// alert(bigimage);
$("#productContentInnerLeftImage
img").wrap("<a href=\""+bigimage+"\" class =\"thickbox\"></a>");
// $("#productContentInnerLeftImage img").wrap("<a
href='#' onclick = \"javascript:tb_show("+src+","+src+",false)\"></
a>");
tb_init('a.thickbox');
});
}
</script>