Added appcache dialog and on/offline events. Disabled sharing and links when offline.