check that jquery is loaded before using