Mobile fix of jquery magic