Fixing syntax bug in accordion js