[javascript] jQuery multiple conditions within if statement