Check the performance of this function in several diff browser sometimes jquery plays funny