Added configurable conditions (into jquery plugin)