gallery wordpress & javascript, media queries and styling