﻿$(document).ready(function() {
    

    $(".lerNoticia").livequery('click', function() {

        var codNoticia = $(this).attr("id");

        $.ajax({
            type: 'GET',
            cache: false,
            url: '/Noticias/SelecionaNoticia/?codNoticia=' + codNoticia,
            success: function(evento) {
                $("#divLerNoticia").empty().html(evento);
                $('#divLerNoticia').dialog('open');
            }
        });

    });


    $('#divLerNoticia').dialog({
        autoOpen: false,
        bgiframe: true,
        resizable: false,
        height: 400,
        width: 500,
        modal: true,
        overlay: {
            backgroundColor: '#000',
            opacity: 1
        },
        buttons: {
            'OK': function() {
                $(this).dialog('close');
            }
        },
        close: function() { $("#divLerNoticia").empty(); }
    });
});
