Confluence 4.X ship with jquery version v1.6.4 and the jquery object can be used in Macro(s) and the Global Layout and Global Layouts
Se the jquery Styling samples pages for some sporadic examples