EDITABLE CODE:
LiveDemo:jQuery - width() and height() Method using function
Note: The function reduces the value of width and height on each invocation.