made plugin jQuery compatible