Made main.js jQuery-friendly