added tile.js and updated docs to YUIDoc syntax