more jquery style guide compliance - some ifs were left without curly braces