Mark Twain is said to have remarked that a gold rush is a good time to be in the pick and shovel business. Investors may be able to apply that same bit of wisdom to the growing number of U.S. states that have legalized pot. Although federal law prohibits the sale or possession of marijuana, Massachusetts last week joined the ranks of states -- 18 plus Washington, D.C. -- that allow its use for people suffering from chronic illnesses like cancer, HIV/AIDS, multiple sclerosis and epilepsy. In Washington and Colorado, meanwhile, voters passed an initiative to allow pot for recreational use. How to invest in legalized Marijuana Several states made recreational use of marijuana last week, and there are several small-cap stocks that stand to gain from the drugs growing acceptance. Photo: AP. Those changes have kickstarted a small but fast-growing medical-marijuana industry, estimated to be worth about $1.7 billion as of 2011, according to See Change Strategy, an independent financial-analysis firm that specializes in new markets. In Colorado alone, sales topped $181 million in 2010, and the business employed 4,200 state-licensed workers, says Aaron Smith, executive director of the National Cannabis Industry Association , a nonprofit trade group that campaigns for marijuana's federal legalization. In addition to profiting itself from growing and selling marijuana, the industry benefits a slew of other businesses, such as insurers, lawyers and agricultural-equipment firms, experts say. "Call it the 'green rush,'" says Derek Peterson, CEO of GrowOp Technology, an online retailer of hydroponics --