pass javascript variable to jquery function