I assume you have written the logic for getting the image for particular id on server-side. See the below code:
<a href="#" data-id="2" class="empName">CodeProject</a>
$(".empName").hover(function() {
getEmpImg($(this).attr("data-id"));
});
$(".empName").mouseout(function() {
clrImage();
});
Hope this helps :)
-KR