Adding ebook:before and ebook:after hooks