split out jquery functions