Replaced all .size() by .length to do compatible with the last jquery devel code