Object height and position change on window when scrolling document

Object height and position change on window when scrolling document

Hello,

I have a fixed object which is let's say at original-top : '50px' (from document top) and original-height : '10px'. I would like that when scrolling down the document, the object scrolls to down as well and it grows its height in the meantime. So when we arrive at the bottom of the document, the object stops at finish-bottom : '80px' from the window/document bottom and height stops at finish-height : '100px' of height. And back way, when we scroll upto the document top, it finishes at 'top : 50px' and 'height : 10px'.

Can you tell me how to do it ? I am quiet zero in jquery...