Could someone explain this animated gif to me in mathematical terms? I understand that the area of the two squares around the right triangle are the total area of the one that is the hypotenuse. Is this just a proof for the Pythagorean theorem or is there some other application for this?

link to animated gif
 A: As the comment notes it is no more and no less than a visual 'proof' of the Pythagorean theorem, $$a^2 + b^2 = c^2.  $$
The boxes associated with each side are cleverly constructed to be squares whose sides are, respectively, the lengths of the sides of the triangle. When boxes $a\cdot a$ and $b\cdot b$ are full, box $c\cdot c$ should be empty and v.v. Side $c$ is of course the hypotenuse. 
The boxes are not perfectly flat (they have to accommodate the fluid) so there is probably some distortion of the exact dimensions to account for this.
It's also really fun to watch.
Edit: In response to two comments, it is evidently worth pointing out that the water device does not give a proof of the Pythagorean theorem, which is why I enclosed the word 'proof' in quotes. I would go further than the comments. The device is an educational toy designed to arouse interest or pique curiosity. It does not prove, demonstrate, or verify. The root of the word 'demonstration' occurs in QED. We would not want to associate the word with this exhibit. To verify is also to prove, in some sense, and this is also too strong. So I completely agree with the comments and hoped the quotation marks were enough. I even avoided 'visual proof,' which might have been construed as a non-verbal proof, hence possibly valid. The device offers an idea or suggestion. It is about as far as one can get from a formal proof while conveying an idea in an interesting way.     
