// Generated by CoffeeScript 1.4.0
(function() {
  "use strict";
  var Navigator, exports, _ref;

  var exports = (_ref = window.mocks) != null ? _ref : window.mocks = {};

  Navigator = (function() {

    function Navigator() {}

    Navigator.prototype.useMock = function() {
      return this.onLine = true;
    };

    Navigator.prototype.goOnline = function() {
      var wasOffline;
      wasOffline = !this.onLine;
      this.onLine = true;
      if (wasOffline) {
        return $(window).trigger('online');
      }
    };

    Navigator.prototype.goOffline = function() {
      var wasOnline;
      wasOnline = this.onLine;
      this.onLine = false;
      if (wasOnline) {
        return $(window).trigger('offline');
      }
    };

    Navigator.prototype.onLine = true;

    return Navigator;

  })();

  exports.navigator = new Navigator;

}).call(this);
