﻿function Sucesso() {
    document.location.reload();
}
function SetResult(data) {
    $(document).ready(function () {
        $("#status").addClass(data.Class).text(data.Mensagem);
    });
}

function HideDiv() {
    if ($("#status").is(':visible')) {
        $("#status").hide();
    }
}
setInterval(HideDiv, 15000);

function OpenUrl(url){
    window.location.href = url;
}

function OpenNewUrl(url, titulo, dimensoes){
    window.open(url, titulo, dimensoes);
}

function Enquete(content) {
            $("#alerta").removeClass().addClass(content[0]).html(content[1]);
}

function Informativo(content) {
            $("#alerta-inf").removeClass().addClass(content[0]).html(content[1]);
}

$(document).ready(function () {

    $("#data").datepicker({
        dateFormat: 'dd/mm/yy',
        dayNames: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado', 'Domingo'],
        dayNamesMin: ['D', 'S', 'T', 'Q', 'Q', 'S', 'S', 'D'],
        dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb', 'Dom'],
        monthNames: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
        monthNamesShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
        nextText: 'Próximo',
        prevText: 'Anterior'
    });

    $("a[rel^='prettyPhoto']").prettyPhoto({
        animation_speed: 'fast',
        slideshow: false,
        autoplay_slideshow: false,
        opacity: 0.80,
        show_title: false,
        allow_resize: true,
        default_width: 600,
        default_height: 338,
        theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
        hideflash: false,
        wmode: 'opaque',
        autoplay: false,
        modal: true, /* If set to true, only the close button will close the window */
        overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */
        keyboard_shortcuts: false, /* Set to false if you open forms inside prettyPhoto */
    });
    var rand = Math.round(Math.random())-0.5;
    var efeitos = ["fadeZoom","cover","scrollDown","turnUp","uncover","growX"];
    var y = efeitos[Math.floor(Math.random()*efeitos.length)]
    $('.banner').cycle({
                fx: y,
                easing: 'bounceout',
                delay: -4000,
                cleartype: false
            });
   $(document).pngFix();

   $('.apoio').cycle({
                fx: 'scrollDown',
                delay: -4000,
                cleartype: false
            });

});


