JQuery javascript argument undefined in IE and Chrome
<p>I have following script and it works fine with FF and Safari.</p>

<pre><code>function swapimage(cid) {
    jQuery('.imageshadowlg').attr("src", jQuery(cid).attr("src").replace('/thumb/', '/final/'));
                    }

&lt;a href='javascript:;' id='expic1link' onclick='swapimage(expic1)' &gt;&lt;img id='expic1' src='../gallery/pics/thumb/test.jpg' /&gt;&lt;/a&gt;
</code></pre>

<p>In IE, I'm getting following error</p>

<pre><code>SCRIPT5009: 'expic1' is undefined 
</code></pre>

<p>Chrome is giving following error</p>

<pre><code>Uncaught TypeError: Cannot call method 'replace' of undefined
swapimagegal.js:139
(anonymous function)s_gallery.aspx:1
onclick
</code></pre>

<p>These scripts are located in separate js file.</p>

<p>Any ideas?</p>
