Added class media to widget to render css and js

in a more practical way.