the basic problem is that document.documentMode was introduced in ie8, so on ie7 or ie6 we compare undefined < 8 which will be false.
i'm not sure if this is the most elegant solution, but it solves the problem.
undefined < 8
document.documentMode does not exist in ie<8
getPos() wrong on ie6/7. Close #565, #566.