Link to the IRS publication referred to previously:

http://www.irs.gov/publications/p550/ch04.html#en_US_2012_publink100010540