moved directive from adverts.js to directives.js