rails: loading image before page load
===

Could you guys point me in the right direction? Ive got a rails application that utilizes some jquery and javascript. It is taking awhile to load the page. Most likely because I make several SQL queries with embedded ruby code in my javascript. 

Right now when users click on a link to go to that particular site, nothing happens for a few seconds and then the whole page loads. 