Proxy Page Processing Of Another Web Page Questions

Proxy Page Processing Of Another Web Page Questions

I have an existing page on a website which I'm trying to hit from a proxy page using JQuery requests. The target page produces a list of data link results which are retrieved using two filter/select boxes. Sometimes the resulting list is a page (20 items) or less and sometimes it is multiple pages in length, which results in some paging links also being generated on the original target page. Currently my proxy page pulls in the data results just fine, as well as the original paging links with my first "(document).ready" request.
 
I'm having problems with synchronizing a second "(document).ready" request which will capture the text of the original paging links, so they can be changed to function properly and submit the proper JQuery paging requests again back to the original target page. If I put an alert at the top of my second "(document).ready" request code then I can see first the search results data and then a second or two later the paging links loaded onto my proxy page. With the alert coded my code finds and changes the paging links correctly. Wthout the alert my code does not find the original paging links text at all, when it executes, so I suspect that my code which is supposed to process the paging links needs to have a delay added tothe top of it, or at the end of the first "(document).ready" request which is suposed to pull in the links. So far I have tried several things like using ".delay() with a custom queue", and ".wait()" all to no avail. 
 
So can someone point me to a good working example of how to synchronize a "(document).ready" request to only start after the contents of an element on a proxy page have finished loading and being pulled from a target page? So I'm starting over with my second "(document).ready" request. My first request code cna be found here: http://pastebin.com/8tCWTt2q . Thanks for the help.