$(document).ready(function(){	
    
    //banner principal
    $('.blocoImgBanner').cycle({
        fx: 'fade',
        pager: '#PagerTopo',
        timeout: 5000,
        posPager: function(){
            var dom_pag = $('#PagerTopo a');
            var qnt = dom_pag.length;
            var i, src;
            for(i=0; i < qnt ;i++){
                src = $('.blocoImgBanner').find('img').eq(i).attr('miniatura');

                $('.blocoImgBanner').find('div').css({
                    'background':'none'
                });
                $(dom_pag).eq(i).css({
                    'background':'url('+src+') no-repeat'
                });
            }
        }
    });
                        
    $('#BannerMeio').cycle({
        fx: 'scrollHorz',
        speed: 500,
        prev: '.btVoltarGaleria',
        next: '.btAvancarGaleria',
        timeout: 3000
    });
               
    $('.BtContatar').click(function(){
        $('.modal').windowModal({
            url: root+'teaser/home/sac.php',
            closeClass: '.replace',
            closeText: '',
            width: 741,
            onLoad: function(){
                loadSac();
                $('#closeSac').click(function(){
                    $('.modal').windowModalClose();
                });
            }
        });
                   
        return false;
    });
    
    $('#BannerMeio a').lightBox({
        imageLoading:			root+'teaser/_misc/img/lightbox/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
        imageBtnPrev:			root+'teaser/_misc/img/lightbox/lightbox-btn-prev.png',			// (string) Path and the name of the prev button image
        imageBtnNext:			root+'teaser/_misc/img/lightbox/lightbox-btn-next.png',			// (string) Path and the name of the next button image
        imageBtnClose:			root+'teaser/_misc/img/lightbox/lightbox-btn-close.png',		// (string) Path and the name of the close btn
        imageBlank:			root+'teaser/_misc/img/lightbox/lightbox-blank',
        fixedNavigation:true
    });
});
