/**************************
FUNCOES JAVASRIPT
WWW.JORNALDEVALINHOS.COM.BR

DESENVOLVIDO POR MRHOSTING
WWW.MRHOSTING.COM.BR
***************************/

/* Banner animado da home - classificadao */
    function VoltaLupa() {
        $('#BannerClassificados').find('.Lupa').animate({ 'right': '0' }, 1800, function () {
            AnimaLupa();
        });
    }
    function VoltaJornal() {
        $('#BannerClassificados').find('img').animate({ 'margin-top': '0' }, 2000, function () {
            AnimaCapa();
        });
    }
    function AnimaCapa() {
        $('#BannerClassificados').find('img').animate({ 'margin-top': '-187px' }, 2000, function () {
            VoltaJornal();
        });
    };
    function AnimaLupa() {
        $('#BannerClassificados').find('.Lupa').animate({ 'right': '80px' }, 1800, function () {
            VoltaLupa();
        });
    };

$(function () {

    // Deixar elementos da mesma altura
    jQuery.fn.equalHeight = function () {
        var tallest = 0;
        this.each(function () {
            tallest = ($(this).height() > tallest) ? $(this).height() : tallest;
        });
        return this.height(tallest);
    }

    $("body.previsao-do-tempo-default .ColunaCentral ol li.FloatLeft").equalHeight();

    // Cycles dos banners
    $('.BannersCycle').cycle({
        timeout: 4000,
        speed: 580,
        requeueOnImageNotLoaded: false
    })

    // Cycle de noticias
    $('#CycleNoticias ul').cycle({
        next: '#Proxima',
        prev: '#Anterior',
        timeout: 4600,
        speed: 600,
        pause: 1,
        requeueOnImageNotLoaded: false
    })

    // Carousel home de Coluna Social
    var DestaquesCarousel = $('#CarouselSocial').find('li').size();
    if (DestaquesCarousel > 3) {
        $('#CarouselSocial').jCarouselLite({
            visible: 3,
            speed: 5000,
            auto: 800,
            scroll: 1
        });
    };

    // Lightbox
    $("a[rel^='ExpandeImagem']").prettyPhoto({ allow_resize: false, show_title: false, theme: 'facebook' }).click(function () {
        $('html, body').animate({ scrollTop: 0 }, 'slow');
    });

    /*
    $("a[rel^='prettyPhoto']").prettyPhoto({ show_title: false, theme: 'facebook' }).click(function () {
        $('html, body').animate({ scrollTop: 0 }, 'slow');
    });
    */

	// Make all images animate to the one visible thumbnail
/*	var miniGalleryOptions1 = {
		thumbnailId: 'thumb1'
	}*/
    
});


