Old snake game written in javascript using jquery lib