Vid 1976

Refactoring the new media galleries so they are rendered client side. This handles issues surrounding lazy loading. 
Can you add types for the parameters (you got array, but two 'int' are missing) and add short description for each?