function linkActions(){
	$('#navi-right a').click(function(e){
		e.preventDefault(); //Prevent click default actions, which means the browser will do nothing if you click the link.
		
		//Prevent to do anymore if the clicked link is already active
		if( $(this).hasClass('active') )
			return false;
		
		//remove links with class active and set clicked link as active
		$('#navi-right a[class~=active]').removeClass('active');
		$(this).addClass('active');
		
		//Remove content from content element
		$('#content').html('');
		
		
		//get href attribute from clicked link
		var href = $(this).attr('href');
		
		$.get(
			href,
			{},
			function(data){				
				//Put retrieved data to content element
				$('#content').html(data);
				$('#contenta').html(data);
				
				
			}
		);
	});
}

//event DOM is ready, and call linkActions function
$(function(){ linkActions(); });