You should be setting the src using this:
document["pic1"].src = searchPic.src;
or
$("#pic1").attr("src", searchPic.src);
You should be setting the src using this:
document["pic1"].src = searchPic.src;
or
$("#pic1").attr("src", searchPic.src);