Add code to new HTML5 branch for the popup solution