Vid 1976

Refactoring the new media galleries so they are rendered client side. This handles issues surrounding lazy loading. 
Is this galleries array being used for anything? It looks like rendered galleries are appended to it, but then nothing is done afterwards.