Uncaught SyntaxError: Unexpected token function