﻿function Home() {
    this.loadRssItems = function LoadRssItems() {
        $.post(netil.urls.rRequestGetRssItems,
                {
            },
                function (results) {
                    netil.home.loadRssItemsCallBack(results);
                },
                "json"
        );
    };

    this.loadRssItemsCallBack = function LoadRssItemsCallBack(data) {
        if (data.State == "OK") {
            $("#list3").html("");

            var html = "";
            for (var i = 0; i < data.Items.length; i++) {
                html += "<li>";

                html += "<h5 title='" + data.Items[i].Title + "'>";
                html += "<a href='" + data.Items[i].Url + "' target='_blank'>" + data.Items[i].Title + "</a>";
                html += "</h5>";

                html += "</li>";
            }
            $("#list3").html(html);

            $("#blog_loading").hide();
        } else {
            $("#list3").html("<i>Aucune news disponible ...</i>");
        }

        $('#news').jScrollPane();
    };
};
NETil.prototype.home = new Home();
