using jquery defer object to handle page load.