
if (window.disqus === undefined) {
	var disqus = {};
}
	
(function () {

	disqus.initialize = function () {
		getUnclaimed();
	};

	// private json calls.
	var urls = {
		'unclaimed': '/auth/json/get_comments_list/'
	};

	var getUnclaimed = function (email) {
		$.get(urls.unclaimed, {
			'username': context.user_hash
		}, function (data) {
			var i, comment;

			if (data.succeeded) {
				for (i=0; i<data.message.objects.length; i+=1) {
					comment = data.message.objects[i];
					$(comment.markup).appendTo('#claim-comments');
				}

				$('#claim-comments').find('button').remove();
				$('#claim-comments').show();
			}
		}, 'json');
	};
})();


$(document).ready(function () {
	disqus.initialize();
});
