added jQuery and created Annoy class
beforeUnload function