Simple javascript that mimicks fireflies