Pop! goes Jack in the Box (NYSE:JBX). That's what's supposed to happen when you wind it up. Unfortunately for the restaurant franchise named after the old-fashioned toy, this quarter's results did anything but pop its stock price. While the Motley Fool Hidden Gems Pay Dirt recommendation beat analyst earnings expectations by a penny, the stock fell more than 10% on the news.

Total sales increased 5%, as Jack's Mexican-food Qdoba Grill chain spiced up growth, posting 2.4% comps, while Jack in the Box stores reported a 0.1% drop in comps. Management tried to reduce costs with lower labor and other restaurant-related expenses, but that wasn't enough to offset higher food and packing costs. Accordingly, the operating margin slipped from 7.2% to 6.9%. And while the bottom line fell 2.9% from last year, share buybacks helped boost earnings per share by 10%.

Jack has another trick up his sleeve to help investors endure a challenging dining-out environment, which is squeezing operators due to higher commodity costs. In a similar fashion to rivals IHOP (NYSE:IHP), and McDonald's (NYSE:MCD), Jack in the Box is focusing on selling existing company-owned stores to franchisees (freeing up capital to buy back shares) which will help improve margins. It also expects these sales to result in $65 million to $75 million in additional cash flow.

Since management implemented its current remodeling program in 2006, the company has redone more than 500 establishments, redesigning the dining room and common areas, graphics, landscaping, and more. While this has required substantial capital, it will pay off in the long run; kitchen enhancements should increase the restaurant capacity, and new energy-efficient equipment will reduce utility expenses.

Ample cash generation, healthy growth prospects at the namesake stores, and even more exciting expansion opportunities at Qdoba make Jack in the Box an interesting play in the industry. I'd recommend sticking with those with plenty of real estate to expand into, such as Jack, Sonic (NYSE:SONC), and Chipotle (NYSE:CMG.B), as opposed to the more expansion-challenged players like Wendy's (NYSE:WEN) and Burger King (NYSE:BKC). Given the near-term hiccup in the share price, I'm finding Jack in the Box a particularly tasty opportunity right now for patient investors.       

For related Foolishness: