var TeamOverviewOnLoad = function(){
		
	$('.selectActivity').click(function(){						

		$('.selectActivity').removeClass('selected');
		$(this).addClass('selected');
		
		$('.teamContainer').children('.teamMate').fadeOut(10);
		LoadTeamView();		
	});	
	
	
	UTILS.compileDustTemplates();
	$('#selectAllActivity').click();
}


	$('.select .currentChoices').change(function(){  
		LoadTeamView();	
	});

var LoadTeamView = function(){	
	
	var activityId = $('.selectActivity.selected').attr('data-id');
	var national = $('#pays').val();
	Web_TeamOverview.getTeams(UTILS.universId, UTILS.language, UTILS.country,UTILS.universName,activityId, national,function(result, event){     //PARAMS: universId, languagecode, country,isGlobal,activityId,nationality		
		if(event.status){
			$('#teamContainer').html(''); 
			$.map( result, function( val, i ) {
				val.activityName = $('.radio[data-id="' + val.Id + '"]  span.radioText').text();
			});
			
			UTILS.dustRender('tmpl_teamItem',result, $('#teamContainer'));
			
		}
	},{escape:false});	
}
