function siblingCheck( a, b ) {
	var cur = a && b && a.nextSibling;

	for ( ; cur; cur = cur.nextSibling ) {
		if ( cur === b ) {
			return -1;
		}
	}

	return a ? 1 : -1;
}
Sets document-related variables once based on the current document
@param {Element|Object} [doc] An element or document object to use to set the document
@returns {Object} Returns the current document