Problem with Interchange and jquery function

Hi there,

We're having a problem with an program using Interchange and a jquery function. We have a set of thumbnails we click to change the main image. When we click the image our interchange image-swapping stops working. If we refresh the page interchange once again functions. How can we get interchange working after the swap image function is executed? 

Here is our code:

```
<SCRIPT type=text/javascript>
	function returnimgcode(theimg){
	var imghtml=""
	imghtml='<img src="http://domainname.com/images/store/smallest/'+theimg[0]+'" data-interchange="[/images/store/smallest/'+theimg[0]+', (default)],[/images/store/smallest/'+theimg[0]+', (smallest)],[/images/store/small/'+theimg[0]+', (medium)],[/images/store/big/'+theimg[0]+', (large)]" border="'+imgborderwidth+'" style="margin-top:1px" data-reveal-id="myModal"  /><br>'+theimg[4]+'';
	return imghtml
	}
	
	function modifyimage(loadarea, imgindex){
		if (document.getElementById){
			var imgobj=document.getElementById(loadarea);
			$(imgobj).html(returnimgcode(dynimages[imgindex]))
			return false
		}
	}	
</SCRIPT>
<!-- this is container for big image -->
<div id="dynloadarea" style="text-align:center;">
<img src="/images/store/smallest/138121034112.jpg" data-interchange="[/images/store/smallest/138121034112.jpg, (default)],[/images/store/smallest/138121034112.jpg, (smallest)],[/images/store/small/138121034112.jpg, (medium)],[/images/store/big/138121034112.jpg, (large)]"  style="margin-top:1px"  alt="cat one cat one cat one"  />
</div> 	

<!-- 
"dynloadarea" load from this function onclick="modifyimage('dynloadarea',0)" 
-->
<ul id="carousel" class="elastislide-list" >
<li><img src="/images/store/thumb/138121033969.jpg" data-interchange="[/images/store/smallest/138121033969.jpg, (only screen and (max-width: 568px)],[/images/store/small/138121033969.jpg, (only screen and (max-width: 768px)], [/images/store/big/138121033969.jpg, (only screen and (max-width: 1000px)], [/images/store/thumb/138121033969.jpg, (only screen and (max-width: 110px)]" onclick="modifyimage('dynloadarea',0)" alt="" style="padding:3px;" /></li>
<li><img src="/images/store/thumb/138121034330.jpg" data-interchange="[/images/store/smallest/138121034330.jpg, (only screen and (max-width: 568px)],[/images/store/small/138121034330.jpg, (only screen and (max-width: 768px)], [/images/store/big/138121034330.jpg, (only screen and (max-width: 1000px)], [/images/store/thumb/138121034330.jpg, (only screen and (max-width: 110px)]" onclick="modifyimage('dynloadarea',1)" alt="" style="padding:3px;" /></li>
<li><img src="/images/store/thumb/138121034112.jpg" data-interchange="[/images/store/smallest/138121034112.jpg, (only screen and (max-width: 568px)],[/images/store/small/138121034112.jpg, (only screen and (max-width: 768px)], [/images/store/big/138121034112.jpg, (only screen and (max-width: 1000px)], [/images/store/thumb/138121034112.jpg, (only screen and (max-width: 110px)]" onclick="modifyimage('dynloadarea',2)" alt="" style="padding:3px;" /></li>
</ul>
```

Thank you for any help!

Sean