.thumbnail{
position: relative;
z-index: 0;
}

.thumbnail:hover{
background-color: transparent;
z-index: 50;
color:black;
}

.thumbnail a:hover{
color:black;
z-index: 0;
}

.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: #FFF;
padding: 5px;
left: -1000px;
z-index: 10;
border: 1px dashed gray;
visibility: hidden;
color: black;
text-decoration: none;
}
/*CSS for enlarged image*/
.thumbnail span img{ 
border-width: 1;
background-color:#006;
z-index: 10;
padding: 1px;
}

/*CSS for enlarged image on hover*/
.thumbnail:hover span{ 
visibility: visible;
z-index: 50;
top: -50px;
left: 200px; /*position where enlarged image should offset horizontally */

}