Moved jQuery up in the call tree to improve preformance