Move media container split outside of for loop.