fixing jquery functions for tabs