//<![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      : 'link2.0',
        path      : '/tecnologia/link/',
        pathJs    : '/estadao/js/tecnologia/link/',
        pathApp   : '/link-app/'
    }
};


var libraries     = {
    core          : {
        init      : true,
        before    : false,
        url       : def.project.pathJs + '_core.js'
    },
    comVVC        : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'com/com.vvc.js'
    },
    comLogin      : {
        init      : true,
        before    : false,
        url       : def.project.pathJs + 'com/com.login.js'
    },
    comNews       : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'com/com.news.js'
    },
    comTop        : {
        init      : true,
        before    : false,
        url       : def.project.pathJs + 'com/com.top.js'
    },
    comTags       : {
        init      : true,
        before    : false,
        url       : def.project.pathJs + 'com/com.tags.js'
    },
    jQuery        : {
        init      : true,
        before    : true,
        url       : def.project.pathJs + 'lib/jquery-1.2.6.pack.js'
    },
    jQueryTwitter : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'lib/jquery.twitter.js'
    },
    swfObject     : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'lib/swfobject.js',
        version   : '9.0.0'
    },
    jqModal       : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'lib/jqmodal.js'
    },
    jQueryForm    : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'lib/jquery.form.pack.js'
    },
    jQueryQuery   : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'lib/jquery.query-2.0.1.js'
    },
    uiCore        : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'lib/jquery-ui-personalized-1.5.3.packed.js'
    },
    uiStars       : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'lib/ui.stars.pack.js'
    },
    jQueryCookie  : {
        init      : true,
        before    : false,
        url       : def.project.pathJs + 'lib/jquery.cookie.js'
    },
    jQCharcounter : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'lib/jquery.charcounter.js'
    },
    jQAlphanum    : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'lib/jquery.alphanumeric.pack.js'
    },
    toplinks      : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'lib/jquery-1.2.5.min.js'
    },
    gAnalytics    : {
        init      : true,
        before    : false,
        url       : 'https:' == document.location.protocol?'https://ssl.':'http://www.' + 'google-analytics.com/ga.js',
		code      : 'UA-166963-4'
    },
    OESP1         : {
        init      : true,
        before    : false,
        url       : '/js/lib/cookies.js'
    },
    OESP2           : {
        init      : true,
        before    : false,
        url       : '/js/zparse/zparse.js'
    },
    OESP3           : {
        init      : true,
        before    : false,
        url       : '/js/zparse/implementation.js'
    },
    OESP4           : {
        init      : true,
        before    : false,
        url       : '/js/ajax/lib/iframeRequest.js'
    },
    OESP5           : {
        init      : true,
        before    : false,
        url       : '/js/ajax/lib/includeLibIframe.js'
    },
    OESP6           : {
        init      : true,
        before    : false,
        url       : '/js/lib/functions.js'
    },
    OESP7           : {
        init      : true,
        before    : false,
        url       : '/js/ajax/modulos/componentes2.js'
    },
    font_control  : {
        init      : false,
        before    : false,
        url       : def.project.pathJs + 'font_control.js'
    },
    ad1           : {
        init      : true,
        before    : true,
        url       : def.project.pathJs + 'lib/add.sense.link.js'
    },
    ad2           : {
        init      : true,
        before    : true,
        url       : 'http://www.estadao.com.br/estadao/js/modules/AdBanner.js'
    }
};


loader.init();

/*function Banner(){

    this.showArroba  = function() {};
    
    this.showFull    = function() {};
    
    this.showFrame   = function() {};

}*/


//]]>

