define(function(require, exports, module) {
  "use strict";

  // External dependencies.
  var _ = require("underscore");
  var $ = require("jquery");
  var jQuery = require("jquery");
  var Backbone = require("backbone");
  var Layout = require("layoutmanager");

  // TODO: use requre.js correctly to set "jquery" as a dependency to "bootstrap"
  $().ready(function() {
    require("bootstrap");
  });

  // Alias the module for easier identification.
  var app = module.exports;

  // The root path to run the application through.
  app.root = "/";

  app.imgRoot = app.root + "app/img/";

  // API endpoint.
  /*
  var localhostPattern = /(localhost|0\.0\.0\.0|127\.0\.0\.1)/;
  if (localhostPattern.test(window.location.href)) {
    app.api = "https://talkoohakemisto-api.herokuapp.com/";
  } else {
    app.api = "https://talkoohakemisto-api.herokuapp.com/";
  }
  */
  app.api = "http://192.168.1.101:5000/";

  app.helpers = {
    generateTypeIconUrl: function(name) {
      return app.imgRoot + 'icons/' + name.toLowerCase().replace("ö", "o").replace("ä", "a") + '.png';
    }
  };

  /* TAKEN FROM GITHUB-VIEWER by Albert
  // Useful defaults for GitHub Viewer.
  _.extend(Backbone.Collection.prototype, {
    cache: true,

    initialize: function(models, options) {
      // Automatically extend in passed options.
      _.extend(this, options);

      // Listen for request and sync events to control the `isRequest` flag.
      this.on({
        request: function() {
          this.isRequest = true;
        },

        sync: function() {
          this.isRequest = false;
        }
      });

      // By default the collection is not in a request.
      this.isRequest = false;
    },

    parse: function(obj) {
      // Safety check ensuring only valid data is used.
      if (obj.data.message !== "Not Found") {
        return obj.data;
      }

      return this.models;
    }
  });*/
});

@@ -609,13 +609,8 @@
 nt.%0A
-  /*%0A
   va
@@ -665,16 +665,27 @@
 .0%5C.0%5C.1
+%7C192%5C.168%5C.
 )/;%0A  if
@@ -756,45 +756,41 @@
 http
-s
 ://
-talkoohakemisto-api.herokuapp.com
+xdsl-250-35.nebulazone.fi:5000
 /%22;%0A
@@ -867,55 +867,8 @@
 %0A  %7D
-%0A  */%0A  app.api = %22http://192.168.1.101:5000/%22;
 %0A%0A  

Change staging backend url