Timing issue with jQuery.ready