Display popup on top if no space on bottom. Crazy margins from inner elements affects page scroll bar

* Popup goes under page margins when displayed at the bottom. This fix displays it on top of the element if has enough space.
* In my case page did not have scroll bars, but when popup shows, scroll bars appears. That was from the elements inside popup, they has too big margins, so I set overflow:hidden on parent and that margins does not affect page.

![image](http://static.md/ea0fbdc7327f6551f49386ce75f6c585.png)