Should be space after "if" and brackets block
<code>if(settings.ajaxVar)</code> => <code>if (settings.ajaxVar) {</code>