move is_mobile variable outside of jQuery conditional