finished porting Comps sample to html/JQuery style