//<![CDATA[

var _loader         = {
    init          : function() {
        this.core();
    },
    core          : function() {
        var i;

        for (i in libraries) {
            if (libraries[i].init && libraries[i].before) {
                this.array.before.push(libraries[i].url);
            } else if( libraries[i].init && !libraries[i].before) {
                this.array.after.push(libraries[i].url);
            }

            libraries[i].init    = false;
        }

        this.require(this.array.before);
        this.array.before = new Array();
    },
    array         : {
        before    : [],
        after     : []
    },
    require       : function(libs) {
        var i     = 0;
        var limit = libs.length;
        var html  = ''

        for (i; i < limit; i++) {
            html  += '<script src="' + libs[i] + '" type="text/javascript"></script>';
        }

        document.write(html);
    },
    after         : function() {
        _loader.require(_loader.array.after);
        this.array.after         = new Array();
    }

};


var def             = {
    project         : {
        name        : 'centro-universitario-fei',
        path        : '/Style%20Library/fei/',
        pathJs      : '/Style%20Library/fei/js/',
        pathSwf     : '/Style%20Library/fei/swf/',
        pathFlv     : '/Style%20Library/fei/flv/',
        pathJson    : '/Style%20Library/fei/json/',
        pathImg     : '/Style%20Library/fei/img/'
    },
    
    MOSS			: {
    	isEditMode	: false
    }
};


var libraries       = {

    core            : {
        init        : true,
        before      : true,
        url         : def.project.pathJs + 'global/_core.js'
    },

    jQuery          : {
        init        : true,
        before      : true,
        url         : def.project.pathJs + 'lib/jquery-1.3.2.min.js'
    },

    jCorner         : {
        init        : true,
        before      : false,
        url         : def.project.pathJs + 'lib/jquery.corner.js'
    },

    jQswfObject     : {
        init        : true,
        before      : false,
        url         : def.project.pathJs + 'lib/jquery.swfobject.1-0-5.min.js'
    },

    jeasing         : {
        init        : true,
        before      : false,
        url         : def.project.pathJs + 'lib/jquery.easing.1.3.js'
    },

    jUIDatePicker   : {
        init        : true,
        before      : false,
        url         : def.project.pathJs + 'lib/jquery-ui-1.7.2.custom.min.js'
    },

    jUIDatePickerEN : {
        init        : false,
        before      : false,
        url         : def.project.pathJs + 'lib/jquery.ui.datepicker-en-GB.js'
    },

    jUIDatePickerBR : {
        init        : true,
        before      : false,
        url         : def.project.pathJs + 'lib/ui.datepicker-pt-BR.js'
    },

/*    jMaps           : {
        init        : true,
        before      : false,
        url         : def.project.pathJs + 'lib/jquery.jmap2.min.js'
    },

    jMapsAPI        : {
        init        : true,
        before      : false,
        url         : 'http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAIj_LjTrrp9F89shtfN0W4hTJWJsC65Sr-tZsNuapKtznfLxJdRRUqOnzFDqEh8Qsfni3_St1IO4Q3g'
    },*/

    jSexyalert      : {
        init        : true,
        before      : true,
        url         : def.project.pathJs + 'lib/sexyalertbox.v1.2.jquery.js'
    },

/*    gAnalytics      : {
        init        : false,
        before      : false,
        url         : 'https:' == document.location.protocol ? 'https://ssl.google-analytics.com/ga.js' : 'http://www.google-analytics.com/ga.js',
		code        : 'UA-2039129-17',
        domain      : '.fei.edu.br'
    },*/
    
	nuovaFlash      : {
        init        : true,
        before      : true,
        url         : def.project.pathJs + 'global/flashs.js'
    }


};


_loader.init();


//]]>