#gallery {
  text-align: center;
  width: 1000px;
  margin: 10px auto;
}

#gallery img {
  width: 175px;
  -webkit-transition-duration: 0.6s; /*Webkit: animation duration*/
  -moz-transition-duration: 0.6s; /*Mozilla: animation duration*/
  -o-transition-duration: 0.6s; /*Opera: animation duration*/
  opacity: 0.6; /*initial opacity of the image*/
  z-index: 0; /*place non-hover images behind the hover image*/
  margin: 1; /*remove default margin for images*/
  position: relative; /*solve the problem with z-index in Chrome*/
}



#gallery img:hover { 
  -webkit-transform: scale( 3 ); /*Webkit: increase size to 1.5x*/
  -moz-transform: scale( 3 ); /*Mozilla: scaling*/
  -o-transform: scale( 3 ); /*Opera: scaling*/
  box-shadow: 0px 0px 25px gray; /*CSS3 shadows: 25px fuzzy shadow around the entire image*/
  -webkit-box-shadow: 0px 0px 25px gray; /*Webkit: shadows*/
  -moz-box-shadow: 0px 0px 25px gray; /*Mozilla: shadows*/
  opacity: 1; /*default opacity*/
  object-position: 50% 50%;

  z-index: 5; /*place hover image in front the non-hover images*/
}



