Added jquery and jquery-ui via bower. Moved js to separate file.

NOTE: there's still a bug in the injection of new tiles (keep going the
same direction)