Each Squarespace site comes with YUI3 built in and a script loader that minifies and combines your custom scripts.
Using the Script Loader
Squarespace Script Loader
<squarespace:script src="plugin.js" combo="true" />
<squarespace:script src="site.js" combo="true" />
Each site comes with YUI3 built in. All Squarespace engineers use the library. Although not as popular as JQuery, YUI3 is a modern, fully-featured library. If you're a JQuery developer who'd like to get started coding in YUI3, check out the JQuery - YUI3 Rosetta Stone.
You can use JQuery, or any other library, on your Squarespace site. We recommend using the Google CDN hosted version of JQuery with a local fallback file. This method has been adopted by HTML5 boilerplate.
<script>window.jQuery || document.write('<script src="scripts/jquery-2.0.0.min.js"><\/script>')</script>