This part could cause problems -- it will re-assign uPortal's jQuery instance to the global variable '$' (if I'm reading it right).  I think it needs to be moved 1 line down... within the ready() function.