make hide on scroll optional
add direction normalization for popups

it makes possible to set x/y values in any order i.e. 'left top ..' and
'top left ..' is equivalent
and now only correct sequence may be used for direction