The code (with all the percent discussion) isn't done yet/doesn't do anything yet. It'll go inside the
setFavPetSB() we made, inside the else half of the if statement, all this inside class_sidebar.php.
Sorry, I've had along day and don't think I can work on this tonight - good news is that I don't have work again until at least Sunday so I'll have a few days to think on all of this.
edit - @HoF, I vaguely remember this issue but I'm not sure how it was resolved. =/