add header and footer and media events on them