I'm having trouble adding this feature to my site, should be pretty easy.

I've got a shopping cart that reads my inventory to show customers how much stuff I have, there's a script in there so that if the cart says 0 it will display a message that it will be a special order.

I have some items that I ship from other locations that come in and show a quantity of 999 I want a little note to pop up when the qty is 999 too but I can't figure out how to get it to work?

here's the code

Code:
jQuery(document).ready(function() {
        jQuery('table.ys_basket th:contains("Qty.")').text('Qty. Ordered');
        var msg = jQuery("#stockmessage").html();
        jQuery('table.ys_basket th:contains("In Stock")').text('Qty. Available').append('<br><a class=stocktip title="' + msg + '">Click For Shipping Time</a>');
  jQuery('a.stocktip').cluetip({
    splitTitle: '|', 
    closeText: 'Close',
    activation: 'click',
    sticky: true,
    closePosition: 'title',
    positionBy: 'bottomTop',
    width: 500
  });
	jQuery("td.ys_inStock").each( function(intIndex) {
		//if (jQuery(this).text() == '5000') {
		//	jQuery(this).text('Usually ships in 1-3 days');
		//}
		if (jQuery(this).text() == '0') {
			jQuery(this).html('<font color="red"><strong>SPECIAL ORDER</strong></font><br>This item will be ordered for you, usually ships out in 0-3 weeks.');
	}
   });
});
Thanks guys