added js for header buttons