#viewer {
  /* Prevent override "block" by jQuery.show() */
  display: table-cell !important;
  position: relative;
  -moz-user-select: -moz-none;
  -webkit-user-select: none;
  user-select: none;
  -moz-transition-property: -moz-transform;
  -moz-transition-duration: 1000ms;
  -moz-transform-origin: center;
  -o-transition-property: -o-transform;
  -o-transition-duration: 1000ms;
  -webkit-transition-property: -webkit-transform;
  -webkit-transition-duration: 1000ms;
  transition-property: transform;
  transition-duration: 1000ms;
  -moz-transform: scale(0);
  -o-transform: scale(0);
  -webkit-transform: scale(0);
  vertical-align: middle;
}

#viewer.active {
  -moz-transform: scale(1);
  -o-transform: scale(1);
  -webkit-transform: scale(1);
}

#viewer.fullscreen {
  height: 100%;
  position: absolute;
  width: 100%;
}

#viewer .resource {
  background: #fff;
  border: none;
  color: #000;
  display: block;
  margin: auto;
  max-height: 40em;
  max-width: 50em;
  -moz-transition-property: -moz-transform;
  -moz-transition-duration: 500ms;
  -o-transition-property: -o-transform;
  -o-transition-duration: 500ms;
  -webkit-transition-property: -webkit-transform;
  -webkit-transition-duration: 500ms;
  transition-property: transform;
  transition-duration: 500ms;
}

#viewer.switching.previous .resource,
#viewer.switching.next .resource:nth-child(2) {
  -moz-transform: translateX(-300%);
  -o-transform: translateX(-300%);
  -webkit-transform: translateX(-300%);
  transform: translateX(-300%);
}

#viewer.switching.next .resource,
#viewer.switching.previous .resource:nth-child(2) {
  -moz-transform: translateX(300%);
  -o-transform: translateX(300%);
  -webkit-transform: translateX(300%);
  transform: translateX(300%);
}

#viewer.fullscreen .resource {
  max-height: 100%;
  max-width: 100%;
}

#viewer .controls {
  bottom: 1em;
  display: none;
  margin: 0;
  padding: 0;
  position: absolute;
  text-align: center;
  width: 100%;
}

#viewer.visible .controls {
  display: block;
}

/*#viewer .controls .action,
#viewer .controls .action[disabled]:hover {
  background-position: center;
  background-repeat: no-repeat;
  min-height: 32px;
  min-width: 32px;
  -khtml-opacity: 0.5;
  -moz-opacity: 0.5;
  -webkit-opacity: 0.5;
  opacity: 0.5;
}

#viewer .controls .action:hover {
  -khtml-opacity: 1;
  -moz-opacity: 1;
  -webkit-opacity: 1;
  opacity: 1;
}

#viewer .controls .action.previous {
  background-image: url(../../images/control-rewind.png);
}

#viewer .controls .action.next {
  background-image: url(../../images/control-fastforward.png);
}

#viewer .controls .action.fullscreen {
  background-image: url(../../images/control-enlarge.png);
}

#viewer .controls .action.restore {  
  background-image: url(../../images/control-shrink.png);
}

#viewer .action.play,
#viewer .action.pause,
#viewer .action.volume {
  background-position: center;
  height: 2em;
  text-indent: -10000px;
  width: 2em;
}

#viewer .action.play {
  background-image: url(../../images/play.png);
}

#viewer .action.pause {
  background-image: url(../../images/pause.png);
}

#viewer .action.volume {
  background-image: url(../../images/sound.png);
  margin-left: 0.5em;
}

#viewer .action.volume.active {
  background-image: url(../../images/sound-muted.png);
  -moz-box-shadow: inset 0.1em 0.1em 0.1em #999;
  -webkit-box-shadow: inset 0.1em 0.1em 0.1em #999;
  box-shadow: inset 0.1em 0.1m 0.1em #999;
}
*/