var table;
var tableLength = 50;

// DEV
// 29580037

var cols = [
  {p:'userProfileImage', handler: getProfileName, title:'', type:'userProfileImage', sort:false},
  {p:'artists', className:'mouseover', title:'MATCH', type:'match', defaultsort: true},
  {p:'artists', className:'artists mouseover', title:'JULLIE LUISTEREN GRAAG NAAR', type:'commaList'}
];


var tabs1 = [
	{
	name: 'RATED',
	columns: cols,
	find: function(callback){return communityFunctionalityService.findMusicalNeigbours(profileName, callback);},
	count: function(c){return c(1);},
	sortOnLoad: false
	}       
];

function getProfileName(param){
	var profile = param['profile'];
	var url, html = '';
	if(profile.showSite){
		url = profile.image ? profile.image.URL+'+s(30)+part(0x0x30x20)+s(!30x!20)+f(asis)' : '/pix/iconen/user-lichtrood-op-fff.gif';
	}
	else{
		url = '/pix/iconen/user-999-op-fff.gif';
	}
	html += '<div class="profileImage mouseover" style="background-image: url(\''+url+'\')"><a href="/mijn3voor12/'+profile.profileName+'/profiel">'+profile.profileName+'</a></div>';
	return html;
}

function init() {
	waitStart("666666");
	table = new TabTable('tabtable', tabs1);
	table.setOnloadHandler(tableReady);
	table.setSortOnLoad(false);
	table.setSortable(false);
	table.show();
}

function tableReady(){
  attach('div.mouseover', rowhighlight);  
}
