window.getSlug on client in autocomplete function