To tell DNN that your code needs jQueryUI, you must use RequestRegistration. Add this code:

@using DotNetNuke.Framework.JavaScriptLibraries;
@{   JavaScript.RequestRegistration(CommonJs.jQueryUI);
}

You probably also want to request jQuery as well.