code: function hookIt(rs){
    hookRemote(rs);
    if (rs.sync) {
      hookSync(rs);
    } else {
      // when sync is not available yet, we hook the syncCycle function which is called
      // right after sync is initialized
      hookSyncCycle(rs);
    }
    hookGetItemURL(rs);
  }
docs: TODO: document