Fix jQuery / $ usages of jQuery

If jQuery was loaded in noconflict mode some usage of $ would not work. Now jQuery is passed to the closure and received as $ as parameter so we can use $ safely in all the situations.