Implemented ajax calls when a tile is clicked on