"2nd" filed 2 years before refied "1st"...which has precedence?

I have a question regarding an NTS on a property.
Original first was filed in 2001 for $253K by Ameriquest.
2nd for $50K filed in 2003 by Wells Fargo.
It appears that Wells then refied the 1st from Ameriquest in 2005 and increased it from $253K to $460K.
Now both the 2003 “2nd” for $50K, and the 2005 “1st” for $460K are both going to NTS, only the 2003 “2nd” is due to go to auction 1 week before the 2005 “1st”.
If I were to win the auction for “2nd” of $50K from 2003, would I be liable to payoff the “1st” from 2005 for $460K since it is the now same lender?
If there was a “reconveyance” of the original 2001 “1st” from Ameriquest to Wells Fargo in 2005, is that enough to bump the 2003 “2nd”?
How can I determine which is 1st in line? What should I look for in the 2003 equity line docs for $48K that would subordinate it to the 2005 “1st” ?
The property is only worth $300K, so I don’t want to be stuck paying $500K for it.

See: http://www.foreclosureradar.com/forum/general/foreclosure-housing-markets/equity-lines-foreclosure#comment-13349