adding getMiddlePos to options.fn object