Add before:show events