jquery playing nice with timing functions