Adds AMD Support for use with RequireJS

Checks to see if define exists and leverages AMD if possible, otherwise falls back to global jQuery object.