
$(function(){
    
    // BANNER ANIMADO DA HOME
    $('.bannerBlocoInterno').cycle({
        fx:     'fade',
        speed:  1000,
        timeout: 5000,
        pager:  '.intBanner',
        activePagerClass: 'item-ativo',
        before: function(currSlideElement, nextSlideElement, options, forwardFlag){
        
        $("#linkBanner").attr('href', $(nextSlideElement).attr('link'));
        
        // COLOCANDO STYLE DE CURSOR PARA MOUSE
        if($(nextSlideElement).attr('link') != ''){
            $("#linkBanner").css('cursor', 'pointer');
        }
        else{
            $("#linkBanner").removeAttr('href');
            $("#linkBanner").css('cursor', 'default');
        }
        },
        pagerAnchorBuilder: function(index, e){
            
            return '<a href="javascript:void(0)" class="item png"><span class="imgBloco">\n\
            <img class="png" src="'+ window.root_path +'/arquivos/destaques/' + $('.a[rel=' + (index + 1) + ']').attr('img') + '" width="110" height="75" alt=""/>\n\
            </span></a>';
                    
            return "<a href='javascript: void(0);' class='banner-min-off'><div>" + arrThumbsBanner[index] + "</div></a>";
        }
    });
    
    $('.bannerBlocoInterno').css('visibility', 'visible');

});
