The tooltip is only initialized when threshold_lows != "". For the weighted_probability > 20 and weighted_probability < 30 if-blocks, the tooltip is not initialized.
I suggest that you move the tooltip initialization out of the window onload and put the innerHTML lines inside the document ready:
Actually, I think you don't need window.onload at all. You can put all the codes inside document ready. Window onload is triggered after all the resources such as images, css, js, etc are completely loaded. Whereas document ready is triggered when all the DOM elements are available (when </body> is rendered). So document ready is triggered first than window onload.
//set graphic innerHTML here
var targets = $( '[rel~=tooltip]' ),
target = false,
tooltip = false,
title = false;