1. Change the widget init event from $(document).ready() to $(window).load() to fully wait till all the images finish loading.
2. Previously it caculated the top position of tracking warning span while creating them. However, it seems that doing it simultaneously does not bring the correct result.
Instead first finish creating all the <span> first, then once they are attached to the main DOM tree, calculate the top position.