require.config({
    paths: {
        // path configuration assumes .js suffix

        // Libraries
        'jquery': '../../libs/js/jquery-1.9.1',
        'underscore': '../../libs/js/lodash-1.3.1',
        'backbone': '../../libs/js/backbone',
        'backbone.wreqr': '../../libs/js/backbone.wreqr-1.3.1',
        'backbone.babysitter': '../../libs/js/backbone.babysitter-0.1.4',
        "marionette": "../../libs/js/backbone.marionette-1.8.8",
        'jquery.mobile': '../../libs/js/jquery.mobile-1.3.2',
        'jquery.mobile-datepicker': '../../libs/js/date-picker/jquery.accessibleDatePicker',
        'jquery.scrollstart': '../../libs/js/date-picker/jquery.scrollstart.scrollstop',
        'jquery.refresher': '../../libs/js/refresher/jquery.refresher',
        "jquery.mobile-autocomplete": "../../libs/js/autocomplete/jquery.mobile.accessible-autocomplete",
        "moment": "../../libs/js/moment-2.7.0",
        'utilities': '../../libs/js/utilities',
        'dataTables': '../../libs/js/jquery.dataTables.min',
        'Calendars': '../../libs/js/fullcalendar-custom',
        'Modules': '../../libs/js/modules',
        'Global': '../../libs/js/global',

        // Custom Helpers
        'App': 'app',
        'jqm-config': 'jqm-config', // Disables JQM Routing
        'plugins': 'plugins',
        'patient-search': 'utils/patient-search',
        'loadingSpinner': 'utils/loadingSpinner',

        // Models
        'AppointmentRequest': 'models/AppointmentRequest',
        'AppointmentRequestMessage': 'models/AppointmentRequestMessage',
        'ApptRequestDetails': 'models/apptRequestDetails',
        'BookedAppointment': 'models/BookedAppt',
        'BookingPurpose': 'models/bookingPurpose',
        'CalendarData': 'models/CalendarData',
        'CancelApptReason': 'models/CancelApptReason',
        'Clinic': 'models/Clinic',
//        'Consult': 'models/Consult',
//        'ConsultService': 'models/ConsultService',
	    'DesiredDate': 'models/DesiredDate',
//        'EWLDetails': 'models/EWLDetails',
        'FooterButton': 'models/footerButtonModel',
	    'NotificationPrefs': 'models/NotificationPrefs',
        'Patient': 'models/patient',
        'PatientContext': '../../libs/js/PatientContext',
        'PatientDemographics': 'models/PatientDemographics',
        'RequestMetaData': 'models/RequestMetaData',
        'ResourceLink': 'models/resourceLink',
        'SchedulingResourceDirectory': 'models/SchedulingResourceDirectory',
        'SearchModel': 'models/searchModel',
        'SelectedDetails': 'models/selectedDetails',
        'SendAppointment': 'models/sendAppointment',
        'Specialty': 'models/Specialty',
        'User': 'models/user',
        'UserSession': 'models/userSession',
	    'Version': 'models/version',
//        'WaitListEntry': 'models/WaitListEntry',
//        'WaitListEntryEWL': 'models/WaitListEntryEWL',
//        'WaitListEntryNEAR': 'models/WaitListEntryNEAR',
//        'WaitListEntryRecall': 'models/WaitListEntryRecall',

        // Collections
        'AppointmentRequests': 'collections/AppointmentRequests',
        'BookedAppointments': 'collections/BookedAppts',
        'BookingPurposes': 'collections/bookingPurposes',
        'CancelApptReasons': 'collections/CancelApptReasons',
        'Clinics': 'collections/Clinics',
//        'ConsultOrders': 'collections/ConsultOrders',
//        'ConsultServices': 'collections/ConsultServices',
        'FooterButtons': 'collections/footerButtons',
        'LocationServiceResources': 'collections/locationServiceResources',
        'Patients': 'collections/patients',
        'PatientSearchResource': 'collections/patientSearchResource',
        'Resources': 'collections/resources',
        'Specialties': 'collections/Specialties',
//        'WaitList': 'collections/WaitList',
//        'WaitListEWL': 'collections/WaitListEWL',
//        'WaitListNEAR': 'collections/WaitListNEAR',
//        'WaitListRecall': 'collections/WaitListRecall',

        // Views
        'AboutDialogView': 'views/aboutDialogView',
        'AccordionView': 'views/accordionView',
        'AppointmentRequestDetailsView': 'views/appointmentRequestDetailsView',
        'AppointmentRequestListView': 'views/appointmentRequestListView',
        'BookingDialogView': 'views/bookingDialogView',
        'BookingHeaderView': 'views/bookingHeaderView',
        'BookingMainView': 'views/bookingMainView',
        'CalendarContainerView': 'views/calendarContainerView',
        'CalendarFilterView': 'views/calendarFilterView',
        'CalendarView': 'views/calendarView',
        'ClinicsMenuView': 'views/clinicsMenuView',
//        'ConsultsDetailsFacilityView': 'views/consultsDetailsFacilityView',
//        'ConsultsDetailsPatientView': 'views/consultsDetailsPatientView',
//        'ConsultsFilterView': 'views/consultsFilterView',
//        'ConsultsMainView': 'views/consultsMainView',
        'DatatableView': 'views/datatableView',
        'DefaultView': 'views/defaultView',
        'ExitNavigationPopupView': 'views/exitNavigationPopupView',
        'ErrorDesiredDatePopup': 'views/errorDesiredDatePopup',
        'FooterView': 'views/footerView',
        'FutureApptDetailsView': 'views/futureApptDetailsView',
        'LeftPanelNavigationView': 'views/leftPanelNavigationView',
	    'LoadSearchView': 'views/loadSearchView',
        'HeaderView': 'views/headerView',
        'MainView': 'views/mainView',
        'MessagePopupView': 'views/messagePopupView',
        'MessagingView': 'views/messagingView',
	    'NotificationPrefView': 'views/notificationPrefView',
        'OverbookingHeaderView': 'views/overbookingHeaderView',
        'PatientDetailsPopupView': 'views/patientDetailsPopupView',
        'PatientSimpleDetailsView': 'views/patientSimpleDetailsView',
        'PatientView': 'views/patientView',
        'PrimaryView': 'views/primaryView',
	    'RightSubHeaderView': 'views/rightSubHeaderView',
        'SecondaryView': 'views/secondaryView',
        'SessionWarning': 'views/sessionWarningView',
        'SessionExpired': 'views/sessionExpiredView',
        'SplashDialogView': 'views/splashDialogView',
        'SubHeaderView': 'views/subHeaderView',
        'VAACCollapsibleView': 'views/vaacCollapsibleView',
        'VaacMainView': 'views/vaacMainView',
        'VAACPopupView': 'views/VAACPopupView',
//        'WaitListDetailsView': 'views/waitListDetailsView',
//        'waitListFilterView': 'views/waitListFilterView',
//        'WaitListMainView': 'views/waitListRouteView',

        // require js plugins
        'Text': '../../libs/js/text'
    },
    waitSeconds: 30,
    shim: {
        'dataTables': {
            deps: ['jquery']
        },
        'Calendars': {
            deps: ['jquery']
        }
    }
});

require(['plugins', 'router']);