$(document).ready(function(){
	$.getJSON("/members.json",
	function(data){
		$.each(data.members, function(i,item){
			var member = '<li><div class="userpic"><a class="userpic-link source-user-avatar" href="' + item.url + '"><span></span><img src="' + item.userpic + '" alt="' + item.name + '" title="' + item.name + '" width="30" height="30" class="photo" /></a></div></li>';
			$(member).appendTo("ul.members");
		});
		$('<li class="more"><a href="/members">Members</a></li>').appendTo("ul.members");
	});
	
	
	
	$("a.comment-count").each(function(i){
		if (!$(this).html().match(/comment/)) {
			regex = /[0-9]{1,5}/;
			re = regex.exec($(this).html());
			totalComments = parseInt(re) + parseInt($(this).attr("at:comment-count"));
			$(this).html(totalComments);
		}
	});
	
	if ($("#tpe-comments-content").length > 0) {
		$("#tpe-comments-content").prepend($("#mt-comments").html());
	}
});
function newsletterPop() {
	window.open('http://www.rstar.net/newsletter/','signupForm','width=390,height=500,status=no');
}
