﻿$(document).ready(function() {
    $.ajax({
        type: "POST",
        url: "/Service/Community.asmx/GetNewestVideos",
        data: "{'genreID':'0','count':'10'}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg) {
            var json = eval('(' + msg.d + ')');            
            $("#newestVideos").setTemplate($("#CommunityVideoTemplate").html());
            $("#newestVideos").processTemplate(json);
        }
    });  
    $.ajax({
        type: "POST",
        url: "/Service/Community.asmx/GetNewestCustomLists",
        data: "{'count':'10'}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg) {
            var json = eval('(' + msg.d + ')');
            
            $("#newestCollections").setTemplate($("#CommunityCustomListTemplate").html());
            $("#newestCollections").processTemplate(json);
        }
    });  
     $.ajax({
        type: "POST",
        url: "/Service/Community.asmx/GetNewestComments",
        data: "{'genreID':'0','count':'10'}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg) {
            var json = eval('(' + msg.d + ')');
            
            $("#newestComments").setTemplate($("#CommunityCommentsTemplate").html());
            $("#newestComments").processTemplate(json);
        }
    });  
});
