/**
 * Realistic CSS3 Waterfall
 */

/* Container with the static waterfall background image */
.waterfall {
  position: relative;
  width: 960px;
  height: 801px;
  background-image: url("waterfall.jpg");
}

.waterfall > div {
  position: absolute;
}

/* The waterfall loop
Key ingredients:
- Vertically seamless bitmap
- Background repeat Y
- Infinite animation which shifts background position vertically
 */
.waterfall-loop {
  /* offset x of the mask */
  left: 367px;
  /* offset y of the mask */
  top: 87px;
  /* width of the mask */
  width: 221px;
  /* height of the mask */
  height: 620px;
  background: url("waterfall-loop.png") 0 0 repeat-y;
  -moz-animation: waterfallloop 5s infinite linear;
  -webkit-animation: waterfallloop 5s infinite linear;
  -ms-animation: waterfallloop 5s infinite linear;
  -o-animation: waterfallloop 5s infinite linear;
}

@-moz-keyframes waterfallloop {
  0% { background-position:0 0; }
  /* the end position y must equal bitmap's height */
  100% { background-position: 0 1112px; }
}

@-webkit-keyframes waterfallloop {
  0% { background-position:0 0; }
  100% { background-position: 0 1112px; }
}

@-ms-keyframes waterfallloop {
  0% { background-position:0 0; }
  100% { background-position: 0 1112px; }
}

@-o-keyframes waterfallloop {
  0% { background-position:0 0; }
  100% { background-position: 0 1112px; }
}

/* The mask overlay to soften borders */
.waterfall-mask {
  width: 960px;
  height: 801px;
  background: url("waterfall-mask.png") 367px 87px no-repeat;
}
