Improved script order (jquery)