Thread:MateyY/@comment-4298791-20120706212402/@comment-4777191-20120706212539

A part of it is currently under discussion to be used on Avatar Wikia (see here). Otherwise, you can use the rest of the code. I'll add it to your global.js.