var topsyOtterapi = 'http://otter.topsy.com/trackbacks.js';
function twitterTrackbackList(post)
{
	var tweetHtml = '';

	jQuery.ajax({
		type: 'GET',
		url: topsyOtterapi,
    	cache: false,
		dataType: 'jsonp',
		data: {
			perpage: '100',
			order: 'date',
			url: post.url
		},
		success: function(trackbackData)
		{

			if(trackbackData.response.list.length == 0) {
				tweetHtml += ('<p>このページにはまだ Twitter からのトラックバックはありません。</p>');
			} else {
				jQuery.each(trackbackData.response.list, function(n)
				{
					tweetHtml += (
						'<li class="tweet' + n + '">' +
							'<a href="' + this.author.url + '"><img src="' + this.author.photo_url + '" alt="' + this.author.name + '" width="48" /></a>' +
							'<ul class="section">' +
								'<li class="nick"><a href="' + this.author.url + '">' + this.author.nick + '</a></li>' + 
								'<li class="content">' + this.content.replace(/((http:|https:)\/\/[\x21-\x7e]+)/gi, "<a href='$1'>$1</a>") + '</li>' +
								'<li class="date"><a href="' + this.permalink_url + '">' + this.date_alpha + '</a></li>' + 
							'</ul>' +
						'</li>'
					);
				});
			}
			jQuery(post.id).append('<ul>' + tweetHtml + '</ul>');
		},
		complete: function() {
		}
	});
}

