If you use jQuery for example, take a look at these:
http://docs.jquery.com/Selectors
http://docs.jquery.com/Attributes
http://docs.jquery.com/Traversing
You can do it with pure javascript also without any libraries, but those are faster / easier to use.. although give little overhead to page load.
anyways, if you have the html source like in the link above, eg:
<div id="gal_enlarge_container"><img src="gallery/images/01.jpg" alt="" border="0" name="enlarge" /></div>
<ul id="gal_thumb_container">
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/01.jpg',0)"><img src="gallery/thumbnails/01.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/02.jpg',1)"><img src="gallery/thumbnails/02.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/03.jpg',1)"><img src="gallery/thumbnails/03.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/04.jpg',1)"><img src="gallery/thumbnails/04.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/05.jpg',1)"><img src="gallery/thumbnails/05.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/06.jpg',1)"><img src="gallery/thumbnails/06.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/07.jpg',1)"><img src="gallery/thumbnails/07.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/08.jpg',1)"><img src="gallery/thumbnails/08.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/09.jpg',1)"><img src="gallery/thumbnails/09.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/10.jpg',1)"><img src="gallery/thumbnails/10.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/11.jpg',1)"><img src="gallery/thumbnails/11.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/12.jpg',1)"><img src="gallery/thumbnails/12.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/13.jpg',1)"><img src="gallery/thumbnails/13.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/14.jpg',1)"><img src="gallery/thumbnails/14.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/15.jpg',1)"><img src="gallery/thumbnails/15.jpg" alt="" name="a1" border="0" /></a></li>
<li><a href="#" onMouseOver="MM_swapImage('enlarge','','gallery/images/16.jpg',1)"><img src="gallery/thumbnails/16.jpg" alt="" name="a1" border="0" /></a></li>
</ul>
You can access for example the url of the first thumbnail in jQuery like this:
var src = $("#gal_thumb_container li:first-child a img").attr("src");
But because the normal image url is in the onMouseOver attribute, getting is a bit more complex:
var onmouseover = $("#gal_thumb_container li:first-child a").attr("onMouseOver");
var arr = onmouseover.split("'"); //url is in arr[5]
and you can put that url to the image placeholder by adding this to the above code:
$("#gal_enlarge_container img").attr("src", arr[5]);
That should work.. try it.
If you don’t like to use js, you can run another maxigallery call with custom templates and with &limit=`1` parameter to get just the first image and then in your custom gallerypicturetpl just output the url of the normal image, nothing else.