﻿
$.fn.exists = function () { return $(this).length !== 0; }

$(document).ready(function () {
    creatNamespace();
    $.apr.proxy = {
        dealService: null,
        entityService: null,
        publishService: null,
        reportService: null,
        securityService: null,
        systemService: null,
        userService: null,
        init: function () {
            _.extend(this, Backbone.Events);

            try { this.dealService = new APR.Services.Contracts.IDealService(); } catch (e) { }
            try { this.entityService = new APR.Services.Contracts.IEntityService(); } catch (e) { }
            try { this.publishService = new APR.Services.Contracts.IPublishService(); } catch (e) { }
            try { this.reportService = new APR.Services.Contracts.IReportService(); } catch (e) { }
            try { this.securityService = new APR.Services.Contracts.ISecurityService(); } catch (e) { }
            try { this.systemService = new APR.Services.Contracts.ISystemService(); } catch (e) { }
            try { this.userService = new APR.Services.Contracts.IUserService(); } catch (e) { }
        }
    };
});


