changed code to use AngularUI tabs (type = pills)