Update jquery.pageflip.js: refactor