using jquery in service