//<![CDATA[


var _main                = {

    init      : function() {
        this.before();
    },

    before    : function() {
        // libraries.jQswfObject.init  = true;	
        _loader.core();
    },

    after     : function() {		
        swfhome.init();
    }
    
};


/*  Ambientação e banners da home   */
var swfhome              = {

    init      : function() {

        if (this.check()) this.core();

    },

    check     : function() {
		
        return (_exists('div.box-products,div.box-products_es,div.box-products_us') && typeof jQuery.fn.flash == 'function' ) ? true : false;

    },
    core      : function() {
        this.bannerValores();
        this.bannerProdutos();
        this.bannerAmbiente();
        this.bannerProdutividade();
        this.bannerLogistica();

    },

    bannerValores      : function() {
        $('div.box-values').flash({
            swf         : def.project.pathSwf + 'home/banner-nossos-valores-'+$('div.amb').attr('rel')+'.swf',
            wmode		:'transparent',
            width		: $('div.box-values').width(),
            height		: $('div.box-values').height()
        });

    },
    
    bannerProdutos     : function() {

        $('div.box-products').flash({
            swf         : def.project.pathSwf + 'home/destaque-produtos-home-'+$('div.amb').attr('rel')+'.swf',
            wmode		:'transparent',
            width		: $('div.box-products').width(),
            height		: $('div.box-products').height()
        });

    },   
    
    bannerAmbiente     : function() {
        $('div.box-environment').flash({
            swf         : def.project.pathSwf + 'home/banner-meio-ambiente-'+$('div.amb').attr('rel')+'.swf',
            wmode		:'transparent',
            width		: $('div.box-environment').width(),
            height		: $('div.box-environment').height()
        });

    },

    bannerProdutividade : function() {

        $('div.box-sifol').flash({
            swf         : def.project.pathSwf + 'home/aumente_produtividade-'+$('div.amb').attr('rel')+'.swf',
            wmode		:'transparent',
            width		: $('div.box-sifol').width(),
            height		: $('div.box-sifol').height()
        });

    },    

    bannerLogistica    : function() {

        $('div.box-logistics').flash({
            swf         : def.project.pathSwf + 'home/logistica-'+$('div.amb').attr('rel')+'.swf',
            wmode		:'transparent',
            width		: $('div.box-logistics').width(),
            height		: $('div.box-logistics').height()
        });

    }
};


_main.init();


//]]>
