Invisible buttons on mouse move, help

I’m trying to accomplish the effect i saw at:
(the next/prev button inside the portfolio, when the big picture loads).
I need a next/prev button that divides half of the image area according to the mouse position while having the fade effect.
I can’t figure out the trick behind this. i have tried different methods like startDrag, onMouseMove , setInterval … but i always get stuck in some loop and can’t get it to work.
Any ideas on how to accomplish this button effect would be greatly appreciated.