;(function($){
    $.fn.wpSummary = function(options){
        var self = this;
        options = $.extend({cat: 1,count: 5 },options);
        $.ajax({
            url: "blog/?feed=atom&cat=" + options.cat,
            dataType: "xml",
            success: function(xml){
                var tag = "";
                $(xml).find("entry").each(function(count){
                	if( count >= options.count ){ return false; }
                    var title = $(this).find("title").text();
                    var date = $(this).find("published").text().substr(0,10).replace(/\-/g,"/");
                    var link = $(this).find("link[rel='alternate']").attr("href");
                    tag = tag + '<tr><td class="blog_date">' + date + "</td>" + '<td class="blog_text"><a href="' + link + '" >' + title + '</a></td>';
                });
                $(self).append("<table>" + tag + "</table>" );
            }
        });
    }
})(jQuery);
