Fixes calcHalfRating Positioning

Updates calcHalfRating to work better when the rating widget is inside
a non-staticly positioned parent. This is done by using
getBoundingClientRect instead of using offsetLeft.

Updates example to prove that the problem is solved.