/**
 * Main entrypoint for banknote.
 *
 * Copyright 2015 Ethan Smith
 */

var Backbone = require('backbone'),
    Marionette = require('backbone.marionette'),
    $ = require('jquery'),
    _ = require('underscore'),
    MainLayout = require('./src/view/MainLayout'),
    RegionModal = require('./src/common/modal/RegionModal.js'),
    CategorizedController = require('./src/controller/CategorizedController');
require('./src/common/library/CurrencyInputStyler');


var Banknote = new Marionette.Application();

Banknote.addRegions({
   central: '#app',
   modal: RegionModal
});

Banknote.addInitializer(function(options) {
   $.getJSON('demo.json', function(data) {

      var incomeCollection = new AmountEntryCollection(_.map(data.income, function(note) {
         return new AmountEntry(note);
      }));

      var controller = new CategorizedController({
         title: 'Income Totals'
      });
      Banknote.central.show(controller.render(incomeCollection));
   });
});

Banknote.start();

// Make Banknote available globally
global.Banknote = Banknote;

@@ -722,14 +722,8 @@
 ion(
-_.map(
 data
@@ -733,74 +733,8 @@
 come
-, function(note) %7B%0A         return new AmountEntry(note);%0A      %7D)
 );%0A%0A

Remove unneeded map for collection model