wrap as a jquery plugin