It has nothing to do with the "double slashes", remove the semicolon
(options.parent) ? top = options.parent.height / 2
:top = parent.height() / 2;
Semicolon was meant to define end of statement(optional), the ternary operator is treated as a single statement.
(options.parent) ? top = options.parent.height / 2; : top = parent.height() / 2;
// ^------ Wrong!