small fix on options.init() callback

options.init function was not being invoked due to a typo on the condition:
```javascript
if (options.init === "function")
```
should be
```javascript
if (typeof options.init === "function")
```