Rajapaksa elected Sri Lankan president