Imagine there are two neighborhoods, POOR and RICH. The Median in Poor in 2006 is 100k. The Median in Rich is 200k. In 2006, there are five sales, 4 in Poor, and 1 in Rich:
100k Poor
100k Poor
100k Poor
100k Poor
200k Rich
So the median is 100k.
In 2007, prices decline in both markets by 20%. Poor people stop buying, rich retirees jump in:
80k Poor
160k Rich
160k Rich
160k Rich
160k Rich
So the new median is 160k, up 60% from the previous year, although prices overall declined 20%.