most possible reason is ui.cascade is not defined by the time u call the above line of code. If ui.cascade is defined in an external js file (sorry i never used this plugin) then the file must have been included after calling this line of code.
other possibility being... you are using frames/iframes. the above code is in the child while the js file is included in the parent.