Firefox delay in changing background-image during animation

I am trying to create a “flip” effect for images, so that, on click, you rotate the image to 90 degrees along the y axis, change the image, and rotate it back, so that it looks like it flips around to reveal a new image.

The problem: There is a delay when switching the image in Firefox. It works fine in Safari and Chrome.

This delay happens even while it is uploaded on a proper web server, using the .htaccess file here:

Here is a small demo of the issue: (warning: contains cute cat)

And the Hype source:

Any ideas what may be causing this and how I can fix it? Thanks.