n endAnimationOnNewSlide() {
      this.removeEventListener("webkitAnimationEnd", endAnimationOnNewSlide);
      this.classList.remove(transition.forward.in);
      this.classList.remove(transition.backwards.in);
    }

    function resize() {
      var content       = this.shadowRoot.getElementById("content"),
          widthContent  = content.offsetWidth,
          heightContent = content.offsetHeight,
          xScale        = this.offsetWidth / widthContent,
          yScale        = this.offsetHeight /