adapt jquery version < 1.7.0