making the jquery more generic