Added zIndex option to prevent performance impact on documents with large DOM tree.

In order to set the zIndex value, the DOM tree is being searched on every call, it may cause performance issues in large documents. I have added the zIndex parameter, allowing the developer to set it's value manually, in order to skip the inefficient calculations. If the parameter is not set, the value is calculated the same way it was earlier.