The Dow Jones index flirted with an all-time high Thursday, but closed the day slightly in the red after a sell-off in the last 10 minutes. At the closing bell, the Dow Jones Industrial Average stood at 14,054.79, down 20.58 (0.15 percent). The Dow got as high as 14,149.15 at midday, not far from the all-time record of 14,164.53 of October 9, 2007. But the market retreated and then sold into negative territory in the waning minutes of the session. The broad-based S&P 500 dropped 1.43 points (0.09 percent) to 1,514.56, while the tech-rich Nasdaq Composite Index fell 2.07 (0.07 percent) to 3,160.19.