Fox TV and Columbia Records knew they had something special when “Don’t Stop Believing” — from the pilot finale of “Glee” — shot to the top of the iTunes charts overnight and quickly sold 350,000 downloads.

“Glee,” which launches with new episodes Sept. 9 (the pilot repeats Sept. 2), is the kind of series that almost never works: a weekly musical. But clearly this is no “Cop Rock.” “Glee,” from “Nip/Tuck” creator Ryan Murphy, is poised to break new ground in the intersecting 21st-century worlds of TV, music and the Internet.

“I saw the pilot and said, ‘We’ve got to do this,'” says Rob Stringer, chairman of the Columbia/Epic Label Group, Fox’s partner in distributing the music of “Glee.” “It’s got all the elements of recent pop-cultural trends, but they found a new niche. It’s got a touch of the ‘American Idol’ process, the recent phenomenon of ‘High School Musical’ and such, but shaken up and made completely cool and contemporary.”

“Glee” is set in an Ohio high school where the tiny show choir consists of outcasts whose fortunes brighten when a dedicated teacher takes over and, against the odds, turns them into a tight, competitive singing ensemble. The pilot, which aired after the “Idol” finale in May, scored the season’s second-highest series debut.

But months before that, the studio partnered with Columbia and Apple and talked marketing strategy, which will reach fruition in the next four months as “Glee’s” first 13 episodes air.

Columbia soundtrack consultant Glen Brunman — an industry vet whose track record includes multiple hit albums from TV’s “Ally McBeal” and “The Sopranos” — brought the project to Stringer.

Says Geoff Bywater, senior VP of Twentieth Television music: “Plenty of labels wanted this, but it ended up with Columbia because of Rob Stringer’s unbridled enthusiasm.”

Details are still being worked out, Bywater says, but Fox and the label are talking about making iTunes downloads available the day before each Wednesday telecast (“it could be one song, or three or four, individual tracks or maybe a themed EP of four or five songs”).

In terms of physical product, the first “Glee” soundtrack is slated to ship in early November, the second in early December. A video of “Bust Your Windows,” which Stringer calls “a visual sample of the music to come,” has already garnered nearly 300,000 plays on Hulu.

Columbia has signed all the young actors to “360” recording deals, meaning the label gets first rights to sign them as artists. And music publishers are keen on the series, too, says Bywater: “This is a potential windfall for the industry because we’re utilizing well-known copyrights but bringing new life to them through the recordings. A great portion of those 50-plus songs we’ve recorded are slated to be released.”

The songs run the gamut from John Lennon’s “Imagine” to Queen’s “Somebody to Love”; from “Defying Gravity” from Broadway’s “Wicked” to the Rolling Stones’ “You Can’t Always Get What You Want.”

“I want to hit a four-quadrant demographic,” says creator Murphy, who chooses most of the tunes during the writing process. “So I put in an R&B song, a country song, a Broadway song, a pop song, a rock song. I make sure in the selection that there’s something for everybody.

“It’s sort of a postmodern musical,” Murphy adds. “It doesn’t just have people burst into song in the hallways, which people probably think is cheesy or a little artificial. It’s much more in the vein of ‘Chicago,’ where the musical numbers are either onstage or in a rehearsal room.”

Fox is insisting that Murphy bring in “Glee” for the same cost as any other first-year show despite the extra costs that music clearance and production add. “‘Fringe’ has special effects, we have music,” Murphy says.

The need to clear and produce an average of four to eight songs per episode is time-consuming and expensive. Murphy first alerts music supervisor PJ Bloom, who tackles the clearance job but also offers alternatives in case their first choices fall outside the show’s price range. Music producer Adam Anders (Backstreet Boys, Sheryl Crow) creates a demo for Murphy to make sure they’re on the same page; musicians lay down a track and the actors record vocals, which Murphy must also approve; then choreographer Zachary Woodlee designs dance steps — all before shooting.

“It’s a 24-hour-a-day music factory,” says Anders. “Logistically, it’s a mess. Sometimes we’re working on two or three episodes at the same time. And you’re dealing with modern music, which is so layered; it’s not like you go in with a three-piece band and play it. We’re re-creating Queen, Kelly Clarkson, Avril Lavigne. They’re massive productions.”

Come fall, however, Fox and Columbia are betting the gamble will pay off. If they’ve guessed correctly, “Glee” will not only attract audiences for what co-creator Ian Brennan calls “the snarkiness and the bite that really sets it apart,” but digital and physical music sales might rival anything on the charts.

And in a case of life imitating art, Bywater is heartened by scholastic reactions to the pilot. “We’re already seeing sheet-music requests,” he says, “and they’re even talking about making the show’s music tracks available for school choirs.”