You can subscribe to two events in your onLoad (same place as your deviceready).
The two events are "online" and "offline":
document.addEventListener("offline", this.onReceivedOffline, false);
document.addEventListener("online", this.onReceivedOnline, false);
So it will be
document.addEventListener("offline", onOffline, false);
function onOffline()
{
window.location = "offline.html";
}
You can read more about it here: http://docs.phonegap.com/en/3.3.0/cordova_events_events.md.html#online