﻿function carrega() {

    $(function () {
        $("span[rel]").overlay({ effect: 'apple', top: '10%', fixed: false });
    }
             );
}

function overlayProf() {
    $(function () {

        // if the function argument is given to overlay, it is assumed to be the onBeforeLoad event listener
        $("a[rel]").overlay({
            mask: 'darkred',
            effect: 'apple',

            onBeforeLoad: function () {
                // grab wrapper element inside content
                var wrap = this.getOverlay().find("#dtin");

                // load the page specified in the trigger
                wrap.load(this.getTrigger().attr("href"));
            }

        });
    });

}

function callMsg(nid) {

    $.ajax({
        type: "POST",
        url: "Default.aspx/getNoticia",
        data: "{id:'" + nid + "'}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (msg) { $("#dtin").html(msg.d); }
    });
}

function OpenModal(idmsg, titulo, data) {
    //funcionando corretamente
    $("#dtin").html(" ");
    callMsg(idmsg);
}

function WeatherModal(dados) {
    //funcionando corretamente
    $("#dtin").html("<iframe src='http://selos.climatempo.com.br/selos/MostraSelo.php?CODCIDADE=491,551,530&SKIN=azul' scrolling='no' frameborder='0' width=150 height='170' marginheight='0' marginwidth='0' style='padding-left:40%;'></iframe>");
    
}
