
var xpProfile = {

	sort: 'newest',
	curPage: 1,
	initHTML: '',
	
	init: function() {
	
		xpProfile.render(1);
	
		return;
	},

	render: function(page){

		if(page) xpProfile.curPage = page;
		
		bCommon.windowScrollToTop();

		jQuery('#explore-content-div').html(
			'<div id="explore-content-loading" style="font-family:arial;font-size:8pt;text-align:center;padding:24px;">'+
			'<img src="/style/blogster/gfx/process/thinking1.gif" /><br />'+
			'	One Moment...'+
			'</div>'
		);

		jQuery.get(
			'/a/user-list.api/' + getTime(),
			{ 'type':xpProfile.sort,'page':xpProfile.curPage,'num':49,'special':'true' },
			function(json) {
			
				var html = new String;
			
				jQuery(json.userlist).each(function(){
				
					html += '<div class="user-icon" style="width:104px;">'+
						'<a href="' + this.profileURL + '"><img style="width:96px;height:96px;" src="' + this.avatarURL + '" alt="" /></a><br />'+
						'<a href="' + this.profileURL + '">' + this.username.replace(/-/g,'&#8209;') + '</a><br />'+
						this.subinfo +
						'</div>';
				
					return;
				});
				
				jQuery('#explore-content-div').html(html);
				
				var pagetool = new bPageTool(json.page,json.pageCount,xpProfile.render);
				jQuery('#explore-pagetool').html(pagetool.get());
			
				return;
			},'json'
		);

		return;
	}

}

