  var currentCfi = (params && params.get("cfi")) ? params.get("cfi") : undefined;
    var currentSectionIndex = (params && params.get("loc")) ? parseInt(params.get("loc")) : undefined;

    // Load the opf
    var book = ePub(url || "https://s3.amazonaws.com/moby-dick/");
    var rendition = book.renderTo(document.body, {
      manager: "continuous",
      snap: true
    });

    rendition.display(currentCfi || currentSectionIndex);


    rendition.on("rendered", function(section){
      // console.log("ren