    
    var rotatingproducts = new Array();
    
    /** definir quantidade de rotativos **/
    rotatingproducts[0] = new Array();
    rotatingproducts[1] = new Array();
	rotatingproducts[2] = new Array();
    rotatingproducts[3] = new Array();
    // ...
    
    /** definir cada rotativo com 2 produtos cada com imagem e link
     *
     * a soma do tamanho das duas imagens por rotativo deve ser no máximo 575 pixeis.
     * não interessa qual delas é a maior ou menor desde que a soma dê o valor referido.
     * a altura de cada imagem deve ser sempre de 400 pixeis.
     * as imagens devem ser subidas à pasta: /files/rotativos/... 
     * o campo link deverá ser em formato relativo, por exemplo:
     *      em vez de http://www.droper.pt/perfumes-senhora/halloween?product=472
     *      deve ser só /perfumes-senhora/halloween?product=472
     * o campo imagem deve ser só o nome da imagem c/ extensão, por exemplo:
     *      halloween-edtvap-30.png
     * definir sempre o objecto 0 e o objecto 1 para cada rotativo (2 produtos por rotativo).
     * 
     **/
    
    // rotativo 0 --------------------------------------------------
    rotatingproducts[0][0] = new Object();
    rotatingproducts[0][0]['image'] = 'Boss_Botled_edtvap_100ml_01.png';
    rotatingproducts[0][0]['link'] = '/perfumes-homem/boss-bottled?product=660';
    
    rotatingproducts[0][1] = new Object();
    rotatingproducts[0][1]['image'] = 'Boss_Botled_edtvap_100ml_02.png';
    rotatingproducts[0][1]['link'] = '/perfumes-homem/boss-bottled?product=660';
    
    // rotativo 1 --------------------------------------------------   
    rotatingproducts[1][0] = new Object();
    rotatingproducts[1][0]['image'] = 'Dolce_Gabana_lightBlue_edtap50ml_01.png';
    rotatingproducts[1][0]['link'] = '/perfumes-senhora/dolce-and-gabbana-light-blue?product=336';
    
    rotatingproducts[1][1] = new Object();
    rotatingproducts[1][1]['image'] = 'Dolce_Gabana_lightBlue_edtap50ml_02.png';
    rotatingproducts[1][1]['link'] = '/perfumes-senhora/dolce-and-gabbana-light-blue?product=336';
    
    // rotativo 2 --------------------------------------------------   
    rotatingproducts[2][0] = new Object();
    rotatingproducts[2][0]['image'] = 'Moschino_I_Love_Love_edtvap30ml_01.png';
    rotatingproducts[2][0]['link'] = '/perfumes-senhora/moschino-i-love-love?product=600';
    
    rotatingproducts[2][1] = new Object();
    rotatingproducts[2][1]['image'] = 'Moschino_I_Love_Love_edtvap30ml_02.png';
    rotatingproducts[2][1]['link'] = '/perfumes-senhora/moschino-i-love-love?product=600';
    
	    // rotativo 3 --------------------------------------------------   
    rotatingproducts[3][0] = new Object();
    rotatingproducts[3][0]['image'] = '1_Million_edtvap100ml_01.png';
    rotatingproducts[3][0]['link'] = '/perfumes-homem/paco-rabanne-1-million?product=341';
    
    rotatingproducts[3][1] = new Object();
    rotatingproducts[3][1]['image'] = '1_Million_edtvap100ml_02.png';
    rotatingproducts[3][1]['link'] = '/perfumes-homem/paco-rabanne-1-million?product=341';
    
    /** definir variáveis **/
    // os seguintes campos podem ser alterados
    var rotatingtext = '1 de Fevereiro a 15 de Março 2012';
    var fadetime = 300;         // milisegundos (segundos x 1000)
    var rotatingtime = 3000;    // milisegundos (segundos x 1000)
    
    
    // não alterar daqui para baixo -------------------------------------------------- x --------------------------------------------------
    var lastrotating = -1;
    var currentrotating = 0;
    var maxrotating = rotatingproducts.length;
    
    
    /** função que inicia rotativos quando a página é carregada **/
    $(document).ready(function() {
        // criar elementos rotativos
        $('#fadeshow1').html('');
        
        $('#fadeshow1').append('<div class="rotatingtext">'+rotatingtext+'</div>');
        
        for(i = 0; i < maxrotating; i++) {
            
            var txt = '<div class="rotatingdiv n_'+i+'">';
            txt += '<a href="'+rotatingproducts[i][0]['link']+'" class="rotatingimg"><img src="/files/rotativos/'+rotatingproducts[i][0]['image']+'" /></a>';
            txt += '<a href="'+rotatingproducts[i][1]['link']+'" class="rotatingimg"><img src="/files/rotativos/'+rotatingproducts[i][1]['image']+'" /></a>';
            txt += '</div>';
            
            $('#fadeshow1').append(txt);
        }

        // iniciar rotação
        rotateit();
    });
    

    /** função que processa rotativos 1 a 1 **/ 
    function rotateit() {
        
        if(lastrotating != -1)
            $('.rotatingdiv.n_'+lastrotating).fadeOut(fadetime);
        
        $('.rotatingdiv.n_'+currentrotating).fadeIn(fadetime);
        
        lastrotating = currentrotating;
        
        if(++currentrotating == maxrotating)
            currentrotating = 0;
        
        setTimeout('rotateit()', rotatingtime);
    }
    
    
