try running this and get the idea:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("div").click(function () {
// this is the dom element clicked
var index = $("div").index(this);
$("span").text("That was div index #" + index);
});
});
</script>
<style>
div { background:yellow; margin:5px; }
span { color:red; }
</style>
</head>
<body>
<span>Click a div!</span>
<div>First div</div>
<div>Second div</div>
<div>Third div</div>
</body>
</html>
a demo and documentation can be found here.
edit
$('#pic .control').click(function () {
var imgUrl = $('#view').attr("src");
// why not erase the next two lines... then
//var indexLink = $('#minia .holder a').index('#minia .holder a[href="'+imgUrl+'"]');
//$('#minia .holder a:eq('+indexLink+')').click();
// use this
$('#minia .holder a[href="'+imgUrl+'"]').trigger('click'); // if you wanted a click..
})