refactor: use semicolons

because conservatives :)
refactor: $bg should not be dollar variable

beause it's not a jquery object, we shouldn't be using prefix the var
with `$`.
refactor: if/else structure

i've changed tastes