local storage functions

needs jquery for JSON parsing