VID-2009 not using JSSnippets for media gallery

There's a lot of whitespace diffs so it's easier to read with https://github.com/Wikia/app/pull/4912/files?w=1. 
@hakubo, does this change look okay to you? The problem was that if an element had an ```offsetTop``` of 0, and ```elem.y``` was undefined, top would be ```NaN``` and the element would never get loaded.