Passed jQuery $ into layout funcion

Refactored browsers.js to since closure.