Added responsive design

added responsive design and also the js  now checks for the document
width in order to append the functions