Bejewelled clone using Javascript