jquery versions < 1.8 fix

fixes issue some were having with jquery versions older than 1.8