Ultimos retoques para funcionar. Gracias a Gamewalker

https://gist.github.com/Gamewalker/30b818637e2302a2b67a/download#