Use variable $ which is passed to closure, jQuery var might be undefined
Do not use jQuery if it's undefined