Clean up swicth statement and CustomEvent polyfill
Copy placeholder DIV's ID & classes to the IMG element - fixes #3