Updated innerText to innerContent for correct work in FF
Change behavior of pop-up window in case of page bottom;
Minor changes in CSS.