/*
 * Copyright 2014-2015 Hewlett-Packard Development Company, L.P.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
 */

define([
    'backbone',
    'find/app/util/test-browser',
    'find/app/vent'
], function(Backbone, testBrowser, vent) {
    return Backbone.View.extend({

        el: '.page',

        initialize: function() {
            jQuery.ajaxSetup({ cache: false });

            this.render();

            Backbone.history.start();

            if (!window.location.hash || window.location.hash === "#undefined" || window.location.hash === "undefined") {
                vent.navigate(this.defaultRoute);
            }

            testBrowser();
        },

        render: function() {
            this.$el.html(this.template(this.getTemplateParameters()));

            this.pages.render();

            this.$('.content').append(this.pages.el);
        },

        getTemplateParameters: function() {
            return {};
        }
    });
});

@@ -207,16 +207,30 @@
 kbone',%0A
+    'jquery',%0A
     'fin
@@ -296,16 +296,19 @@
 ackbone,
+ $,
  testBro
@@ -317,24 +317,25 @@
 er, vent) %7B%0A
+%0A
     return B
@@ -356,17 +356,16 @@
 xtend(%7B%0A
-%0A
         
@@ -427,14 +427,9 @@
     
-jQuery
+$
 .aja
@@ -494,16 +494,35 @@
         
+ var matchedRoute =
  Backbon
@@ -562,109 +562,20 @@
 f (!
-window.location.hash %7C%7C window.location.hash === %22#undefined%22 %7C%7C window.location.hash === %22undefined%22
+matchedRoute
 ) %7B%0A
@@ -965,12 +965,13 @@
     %7D);%0A
+%0A
 %7D);%0A

Check if Backbone.history matches a route when started. [rev: alex.scown]