window.$ may not be defined so use window.jQuery

In some environments (eg WordPress) window.$ not defined so use window.jQuery