added jquery dist and greatly simplified the require logic