// BensWidget
// to display Bens Bargains coupons on another site.
// relies on jQuery 1.3 and the xml-to-json plugin
// Authoed by J Dennis Riddle; copyright 2009 Internetbrands.com
var BensWidget = {
  storeHash : {
    "1-800 contacts" : 491,
    "1-800 contacts | world's largest contact lens" : 491,
    "1-800 contacts, inc." : 491,
    "1-800-contacts.com" : 491,
    "1800contacts.com" : 491,
    "1-800-flowers" : 258,
    "1-800-flowers.com" : 258,
    "1800flowers.com" : 258,
    "1-800-petmeds" : 701,
    "4inkjets!" : 583,
    "4inkjets" : 583,
    "4inkjets.com" : 583,
    "inkjet express" : 583,
    "4 inkjets" : 583,
    "4 wheel parts" : 794,
    "6ave.com" : 462,
    "www.6ave.com" : 462,
    "6pm" : 528,
    "6pm.com" : 528,
    "a1books" : 795,
    "aaa - american automobile association" : 467,
    "abcink" : 114,
    "abcink.com" : 114,
    "abc ink" : 114,
    "abebooks" : 796,
    "abe's of maine" : 421,
    "abes of maine" : 421,
    "abesofmaine" : 421,
    "abt" : 0,
    "abt electronics" : 0,
    "abt electronics & appliances" : 0,
    "abtelectronics.com" : 0,
    "ac lens" : 764,
    "accessory geeks" : 493,
    "accessorygeeks.com" : 493,
    "accstation" : 574,
    "accstation corp" : 574,
    "eforce trading co" : 574,
    "ace hardware" : 104,
    "acehardware.com" : 104,
    "acronis.com" : 797,
    "activa" : 534,
    "activa active gear for powerful women" : 534,
    "activa sports" : 534,
    "activasports.com" : 534,
    "term - activa sports" : 534,
    "adidas america inc." : 576,
    "adobe" : 360,
    "adorama camera" : 466,
    "adorama" : 466,
    "adorama.com" : 466,
    "aeropostale" : 251,
    "aeropostale.com" : 251,
    "a la zing" : 127,
    "alazing" : 127,
    "alazing.com" : 127,
    "alazing.com(omaha steaks, inc.)" : 127,
    "alienware" : 478,
    "all battery" : 357,
    "all - battery.com" : 357,
    "all brands" : 798,
    "allergybuyersclub.com" : 752,
    "alloy" : 401,
    "alloy.com" : 401,
    "store.alloy.com" : 401,
    "allposters.com" : 177,
    "all posters" : 177,
    "dish network satellite tv by allsat.com" : 198,
    "allsat.com" : 198,
    "altrec" : 549,
    "altrec.com" : 549,
    "altrec.com outdoors" : 549,
    "alwaysforme.com" : 921,
    "amazon" : 3,
    "amazon.com" : 3,
    "american eagle" : 768,
    "anastasiaweb" : 799,
    "andy's auto sport" : 800,
    "angie's list" : 801,
    "aol" : 117,
    "aperion audio" : 802,
    "apple store" : 68,
    "ashford" : 488,
    "astrology.com" : 803,
    "ivillage" : 803,
    "cingular wireless" : 354,
    "cingular.com" : 354,
    "wireless from at&t" : 354,
    "auditionsshoes.com" : 804,
    "autos.com" : 233,
    "auto barn" : 805,
    "auto parts giant" : 806,
    "avenue" : 591,
    "avenue.com" : 591,
    "avon" : 98,
    "avon products,inc." : 98,
    "avon.avon.com" : 98,
    "avon.com" : 98,
    "shop.avon.com" : 98,
    "b&amp;amp;h photo video" : 215,
    "babies r us" : 211,
    "babiesrus" : 211,
    "babiesrus.com" : 211,
    "babyage" : 292,
    "babyearth.com" : 807,
    "babytobee.com" : 808,
    "backcountry.com" : 280,
    "backcountry.com: incl backcountryoutlet, tramdock, &dogfunk" : 280,
    "bag borrow or steal" : 530,
    "bagborroworsteal.com" : 530,
    "baghaus" : 410,
    "baghaus.com" : 410,
    "bagsbuy.com" : 519,
    "banana republic" : 541,
    "bananarepublic.com" : 541,
    "bare necessities" : 702,
    "bargain outfitters" : 391,
    "bargainoutfitters.com" : 391,
    "barnes & noble" : 36,
    "barnes &amp; noble.com" : 36,
    "barnes and noble" : 36,
    "barnesandnoble.com" : 36,
    "bn.com" : 36,
    "bass pro shops" : 288,
    "bath and body works" : 769,
    "batteries.com" : 242,
    "bealls" : 809,
    "beauty" : 465,
    "belkin corporation" : 480,
    "bellacor.com" : 810,
    "bellagio" : 348,
    "bellagio hotel &amp; casino, las vegas" : 348,
    "bellagio hotel &amp;amp; casino, las vegas" : 348,
    "bellagio.com" : 348,
    "bestbuy" : 49,
    "best buy" : 49,
    "bestbuy.com" : 49,
    "best deal magazines" : 71,
    "bestdeal magazines" : 71,
    "bestdealmagazines.com" : 71,
    "betterworld.com" : 811,
    "biblio.com" : 812,
    "bidz" : 813,
    "biggerbooks.com" : 814,
    "blackforestdecor.com" : 815,
    "bike nashbar" : 183,
    "nashbar" : 183,
    "nashbar.com" : 183,
    "birthday express" : 792,
    "blades.com" : 239,
    "blair" : 312,
    "blair corporation" : 312,
    "blair.com" : 312,
    "blinds.com" : 362,
    "bliss" : 704,
    "blockbuster" : 111,
    "blockbuster online" : 111,
    "blockbuster total access" : 111,
    "blockbuster videos" : 111,
    "blockbuster.com" : 111,
    "bloomdepot.com" : 275,
    "bloomingdales" : 299,
    "bloomingdale's" : 299,
    "bloomingdales.com" : 299,
    "bluefly" : 164,
    "bluefly.com" : 164,
    "blue fly" : 164,
    "blue host" : 816,
    "blue nile" : 270,
    "blue nile us" : 270,
    "blue nile, inc." : 270,
    "bluenile.com" : 270,
    "bmg music service" : 70,
    "bmg music services" : 70,
    "bmgmusic.com" : 70,
    "boca java" : 340,
    "book closeouts" : 817,
    "borders" : 194,
    "borders.com" : 194,
    "boscov's" : 113,
    "boscov's department stores" : 113,
    "boscovs.com" : 113,
    "boscovs" : 113,
    "boston market" : 207,
    "bostonmarket.com" : 207,
    "brecks" : 516,
    "brecks.com" : 516,
    "brooks brothers" : 431,
    "brooksbrothers.com" : 431,
    "brookstone" : 230,
    "brookstone.com" : 230,
    "brylane home" : 495,
    "brylanehome" : 495,
    "brylanehome.com" : 495,
    "budget" : 492,
    "budget rent a car" : 492,
    "budget.com" : 492,
    "busted tees" : 515,
    "bustedtees.com" : 515,
    "butterfly photo" : 767,
    "buy.com" : 96,
    "buy.com usa and buy.com ca" : 96,
    "buy.com inc." : 96,
    "buycostumes" : 276,
    "buycostumes.com" : 276,
    "cabela's" : 766,
    "cambridge soundworks" : 231,
    "cambridgesoundworks.com" : 231,
    "camping world" : 423,
    "camping world, inc." : 423,
    "campingworld.com" : 423,
    "cars.com" : 819,
    "carsdirect.com" : 542,
    "cartoys.com" : 440,
    "car toys" : 440,
    "cascio interstate music" : 703,
    "casual male xl" : 705,
    "ccs" : 402,
    "ccs.com" : 402,
    "shop.ccs.com" : 402,
    "celebrate express" : 790,
    "cellularfactory" : 744,
    "census pc" : 23,
    "censuspc.com" : 23,
    "www.censuspc.com" : 23,
    "censuspc" : 23,
    "champs sports" : 471,
    "champs sports - where sport lives" : 471,
    "champssports.com" : 471,
    "chase manhattan bank" : 93,
    "cheap tickets.com" : 706,
    "chegg.com" : 821,
    "cheryl & co." : 337,
    "cheryl &amp; co." : 337,
    "cheryl and co." : 337,
    "cherylandco.com" : 337,
    "chico's" : 546,
    "chicos.com" : 546,
    "chiefvalue.com" : 311,
    "children's place" : 696,
    "cigarrest" : 822,
    "circuit city" : 145,
    "circuitcity.com" : 145,
    "circus circus" : 345,
    "circuscircus.com" : 345,
    "classic closeouts" : 765,
    "clubit.com" : 320,
    "clubmac" : 742,
    "coastalcontacts.com" : 496,
    "coastal contacts" : 496,
    "coca-cola store" : 438,
    "coca-colastore.com" : 438,
    "coffee for less.com" : 823,
    "compact appliance" : 509,
    "compactappliance.com" :549,
    "compusa" : 146,
    "compusa(systemax, inc.)" : 146,
    "compusa.com" : 146,
    "computers4sure" : 5,
    "computers4sure(4sure.com - an office depot co.)" : 5,
    "computers4sure.com" : 5,
    "cooking.com" : 389,
    "corel corporation" : 523,
    "corel.com" : 523,
    "corel" : 523,
    "costco" : 365,
    "costco online" : 365,
    "costume craze" : 434,
    "costumecraze.com" : 434,
    "costume express" : 789,
    "costume supercenter" : 458,
    "costumesupercenter.com" : 458,
    "couture candy" : 824,
    "creative" : 332,
    "creative.com" : 332,
    "cross.com" : 761,
    "crucial ballistix" : 25,
    "crucial technology" : 25,
    "crucial.com" : 25,
    "crucial" : 25,
    "crutchfield" : 125,
    "crutchfield electronics" : 125,
    "crutchfield.com" : 125,
    "csn stores" : 314,
    "currentcatalog.com" : 708,
    "cyberguys!" : 457,
    "cyberguys, inc." : 457,
    "cyberguys.com" : 457,
    "cyberguys" : 457,
    "dale &amp; thomas popcorn" : 261,
    "dale &amp;amp; thomas popcorn" : 261,
    "dale and thomas popcorn" : 261,
    "daleandthomaspopcorn.com" : 261,
    "dan's chocolates" : 81,
    "danschocolates.com" : 81,
    "david's cookies" : 551,
    "david's cookies (fairfield gourmet foods corporati " : 551,
    "david's cookies(fairfield gourmet foods corporation)" : 551,
    "david's cookies ? a bite above the rest.   " : 551,
    "davidscookies.com" : 551,
    "davids cookies" : 551,
    "dealsonic" : 8,
    "dealsonic.com" : 8, 
    "deepdiscount.com" : 315,
    "deep discount" : 315,
    "dela flowers" : 489,
    "delia*s" : 400,
    "delia's" : 400,
    "delias.com" : 400,
    "delias" : 400,
    "dellsmallbusiness.com" : 43,
    "dell small business " : 43,
    "configure.us.dell.com" : 6,
    "dell" : 6,
    "dell business" : 6,   
    "dell home" : 6,
    "dell home & home office" : 6,
    "dell small business" : 6,
    "dell.com" : 6,
    "dell outlet" : 216,
    "dentalplans.com" : 825,
    "derma doctor" : 709,
    "dhc usa incorporated" : 711,
    "diamond.com" : 248,
    "dick's sporting goods" : 150,
    "dicks sporting goods" : 150,
    "dickssportinggoods.com" : 150,
    "diettogo.com" : 826,
    "discount mags" : 160,
    "discountmags.com" : 160,
    "discount office supplies" : 265,
    "discountofficesupplies.com" : 265,
    "discount watch store" : 464,
    "discountwatchstore.com" : 464,
    "discover card" : 474,
    "discovercard.com" : 474,
    "discovery online" : 74,
    "discoverychannelstore.com" : 74,
    "dish network" : 525,
    "dish network official website" : 525,
    "dishnetwork.com" : 525,
    "disney" : 213,
    "disney shopping" : 213,
    "disneyshopping" : 213, 
    "disneyshopping.com" : 213,
    "www.disneyshopping.com" : 213,
    "doba" : 827,
    "dockers shoes" : 566,
    "doctors foster and smith" : 710,
    "dot photo" : 269,
    "dotphoto" : 269,
    "dotphoto.com" : 269,
    "dotster" : 399,
    "dotster.com" : 399,
    "driving comfort" : 355,
    "drivingcomfort.com" : 355,
    "drivingcomfort" : 355,
    "beauty.com" :  37,
    "drugstore.com" : 37,
    "drugstore.com, inc." : 37,
    "eaglebit" : 334,
    "eaglebit.com" : 334,
    "eastbay" : 147,
    "eastbay.com" : 147,
    "easternmountainsports.com" : 367,
    "easy cgi web hosting" : 828,
    "ebags" : 55,
    "ebags.com" : 55,
    "ebay" : 9,
    "eb games" : 44,
    "ebgames.com" : 55,
    "electronics boutique - ebgames" : 55,
    "ecampus.com" : 781,
    "ecost.com" : 25,
    "ecost" : 25,
    "eddie bauer" : 95,
    "eddiebauer.com" : 95,
    "eddie bauer outlet" : 342,
    "eddie bauer since 1920" : 95,  
    "eddiebaueroutlet.com" : 95,
    "eforcity" : 487,
    "eforcity.com" : 487,
    "eforcity" : 487,
    "empirecovers.com" : 829,
    "endless" : 407,
    "endless.com" : 407,
    "enterprise" : 373,
    "enterprise rent-a-car" : 373,
    "enterprise.com" : 373,
    "entertainment" : 85,
    "entertainment book" : 85,
    "entertainment.com" : 85,
    "entirely pets.com" : 745,
    "epsonstore" : 128,
    "epsonstore.com" : 128,
    "espn shop" : 386,
    "espnshop.com" : 386,
    "essential apparel.com" : 830,
    "essential aapparel.com" : 830,
    "etnies shoes" : 556,
    "etoys.com" : 163,
    "etoys.com (etoys direct, inc.)" : 163,
    "etoys.com (the parent company)" : 163,
    "etoys" : 163,
    "etronics" : 298,
    "etronics.com" : 298,
    "evaluezone.com" : 122,
    "evitamins" : 831,
    "expedia" : 159,
    "expedia, inc" : 159,
    "expedia.com" : 159,
    "extended auto warranties" : 832,
    "factory card outlet" : 266,
    "factorycard.com" : 266,
    "factory card" : 266,
    "factorydirectdeals.com" : 266,
    "fandango" : 268,
    "fandango.com" : 268,
    "fao schwarz inc." : 575,
    "faoschwarz" : 575,
    "fashion bug" : 712,
    "fastweb free scholarship search" : 833,
    "figleaves" : 325,
    "figleaves.com" : 325,
    "figleaves.com uk" : 325,
    "final-score.com" : 381,
    "fingerhut" : 326,
    "fingerhut direct marketing, inc" : 326,
    "fingerhut.com" : 326,
    "finish line" : 228,
    "finish line, inc" : 228,
    "finishline.com" : 228,
    "flipclips, inc." : 300,
    "flipclips" : 300,
    "flipclips.com" : 300,
    "florist" : 282,
    "florist.com" : 282,
    "flowers for special ocassions" : 282,
    "fogdog sports" : 79,
    "fogdog sports" : 79,
    "fogdog.com" : 79,
    "fogdog" : 79,
    "fonts.com" : 834,
    "football fanatics" : 788,
    "foot locker" : 103,
    "footlocker.com" : 103,
    "footsmart" : 380,
    "footsmart.com" : 380,
    "foot smart" : 380,
    "fragrance net.com" : 713,
    "frames direct.com" : 772,
    "franklin covey" : 499,
    "franklincovey" : 499,
    "franklincovey.com" : 499,
    "shopping.franklincovey.com" : 499,
    "fredericks of hollywood" : 450,
    "frederick's of hollywood" : 450,
    "frederick's of hollywood, inc." : 450,
    "fredericks.com" : 450,
    "freshpair" : 317,
    "freshpair.com" : 317,
    "fresh pair" : 317,
    "friend finder" : 835,
    "from you flowers" : 329,
    "from you flowers flower delivery" : 329,
    "from you flowers, llc" : 329,
    "fromyouflowers.com" : 329,
    "fromyouflowers" : 329,
    "fry's electronics" : 13,
    "frys" : 13,
    "ftd" : 281,
    "ftd florists" : 281,
    "ftd.com" : 281,
    "fujitsu" : 92,
    "fujitsu.com" : 92,
    "netphonenow" : 92,
    "fye" : 445,
    "fye.com" : 445,
    "gamefly" : 398,
    "gamefly - online video game rentals" : 398,
    "gamefly.com" : 398,
    "gamehouse.com" : 836,
    "gamestop" : 10,
    "gamestop, inc." : 10,
    "gamestop.com" : 10,
    "game stop" : 10,
    "gap" : 87,
    "gap.com" : 87,
    "gardener's supply company" : 714,
    "gateway" : 60,
    "gateway computers" : 60,
    "gateway.com" : 60,
    "computer geeks" : 26,
    "computergeeks.com" : 26,
    "geeks.com" : 26,
    "gevalia" : 105,
    "gevalia kaffe" : 105,
    "gevalia.com" : 105,
    "giftcertificates.com" : 61,
    "giga golf" : 361,
    "gigagolf" : 361,
    "gigagolf, inc." : 361,
    "gigagolf.com" : 361,
    "globat" : 226,
    "globat.com" : 226,
    "general nutrition companies, inc." : 352,
    "gnc" : 352,
    "gnc.com" : 352,
    "go daddy" : 123,
    "go daddy software" : 123,
    "godaddy" : 123,
    "godaddy.com" : 123,
    "gogamer.com" : 67,
    "golfsmith" : 837,
    "gordon's jewelers" : 749,
    "griffin technology" : 368,
    "griffin technology, inc." : 368,
    "griffintechnology.com" : 368,
    "growerflowers.com" : 353,
    "the gift isle" : 353,
    "gta hotels" : 838,
    "guess factory" : 420,
    "guess ? ip holder l.p., theresa mcmanus" : 420,
    "guessfactory.com" : 420,
    "h &amp; r block" : 672,
    "h&amp;amp;r block" : 672,
    "h&amp;r block" : 672,
    "h&r block" : 672,
    "taxcut from h&r block" : 672,
    "half.com" : 38,
    "hallmark" : 385,
    "hallmark flowers" : 385,
    "hallmark.com" : 385,
    "handango" : 535,
    "handango inc." : 535,
    "handhelditems" : 390,
    "handhelditems.com" : 390,
    "www.handhelditems.com" : 390,
    "hanes.com" : 476,
    "hanes" : 476,
    "hearthsong" : 715,
    "herrington" : 358,
    "herringtoncatalog.com" : 358,
    "hickory farms" : 148,
    "hickoryfarms.com" : 148,
    "highlights" : 291,
    "highlights catalog" : 291,
    "highlights.com" : 291,
    "hilton" : 175,
    "hirekogolf.com" : 839,
    "holabird sports" : 840,
    "home bistro" : 453,
    "homebistro.com" : 453,
    "home decorators collection" : 303,
    "home depot" : 118,
    "homedepot.com" : 118,
    "the home depot" : 118,
    "homestead" : 209,
    "homestead an intuit co." : 209,
    "homestead technologies inc." : 209,
    "hotels.com" : 313,
    "hot topic" : 533,
    "hottopic.com" : 533,
    "hotwire" : 256,
    "hotwire.com" : 256,
    "host gator" : 841,
    "hostrocket.com" : 842,
    "house of nutrition" : 843,
    "hp small business" : 89,
    "hp.com" : 89,
    "hpshopping" : 89,
    "hpshopping.com" : 89,
    "hp shopping" : 89,
    "hp shopping.com" : 89, 
    "shopping.hp.com" : 89,
    "home shopping network" : 59,
    "hsn.com" : 59,
    "hsn" : 59,
    "ibex" : 485,
    "ibexwear.com" : 485,
    "ice.com" : 45,
    "i chapters" : 844,
    "ing direct" : 109,
    "ink4art" : 324,
    "ink4art.com" : 324,
    "inkgrabber" : 274,
    "inkgrabber.com" : 274,
    "inkgrabber" : 274,
    "international jock" : 716,
    "iprint.com" : 227,
    "iprint.com affiliate program" : 227,
    "iprint.com, inc." : 227,
    "iprint" : 227,
    "irobot corporation" : 262,
    "irobot.com(roomba)" : 262,
    "island surf" : 847,
    "itunes" : 700,
    "ix web hosting" : 848,
    "jc penney" : 112,
    "jcp.com" : 112,
    "jcpenney" : 112,
    "jcpenny" : 112,
    "j.crew" : 54,
    "jcrew" : 54,
    "j.c.whitney &amp; co." : 424,
    "j.c.whitney &amp;amp; co." : 424,
    "jc whitney" : 424,
    "jcwhitney.com" : 424,
    "jensonusa.com" : 214,
    "jeep parts" : 849,
    "jetblue airways" : 351,
    "jetblue" : 351,
    "jitterbug" : 850,
    "johnston &amp; murphy" : 371,
    "johnston and murphy" : 371,
    "johnstonmurphy.com" : 371,
    "jos.a.bank clothiers" : 220,
    "jos a.bank" : 220,
    "j&amp;r - the internet's largest home entertainmen" : 11,
    "j&amp;r computer/music world" : 11,
    "j&r computer/music world" : 11,
    "justdeals.com" : 86,
    "justdeals" : 86,
    "justhost.com" : 851,
    "juse my size" : 717,
    "karmaloop" : 517,
    "karmaloop llc" : 517,
    "karmaloop.com" : 517,
    "kb toys" : 39,
    "kbtoys.com" : 39,
    "kbtoys.com (etoys direct, inc.)" : 39,
    "kbtoys.com (the parent company)" : 39,
    "klinq.com" : 514,
    "k mart" : 75,
    "kmart" : 75,  
    "kmart.com" : 75,
    "kodak easyshare gallery" : 178,
    "kodak gallery" : 178,
    "kodak imaging network, inc." : 178,
    "kodakgallery.com" : 178,
    "ofoto" : 178,
    "ofoto.com" : 178,
    "kodak" : 425,
    "kodak.com" : 425,
    "kohls" : 130,
    "kohl's" : 130,
    "kohls.com" : 130,
    "kraft" : 243,
    "lamps plus" : 290,
    "lampsplus.com" : 290,
    "lands' end" : 369,
    "lands' end inc" : 369,
    "landsend.com" : 369,
    "lands end " : 369,
    "lane bryant" : 718,
    "lane bryant catalog (arizona mail order)" : 719,
    "laplink" : 852,
    "laptops for less" : 853,
    "leapfrog toys" : 460,
    "leapfrog.com" : 460,
    "leapfrog" : 460,
    "lee" : 463,
    "lee jeans" : 463,
    "lego" : 720,
    "lego company ltd" : 720, 
    "lenovo" : 91,
    "lenovo canada" : 91, 
    "lenovo.com" : 91,
    "thinkpad thinkcentre" : 91,
    "lens.com" : 442,
    "lenscrafters.com" : 490,
    "lessno" : 416,
    "lets talk" : 482,
    "letstalk.com" : 482,
    "hat world / lids" : 415,
    "lids" : 415,
    "lids.com" : 415,
    "life lock" : 854,
    "life uniform" : 760,
    "lighting by gregory" : 388,
    "lightingbygregory.com" : 388,
    "lillian vernon" : 722,
    "limoges jewelry" : 501,
    "limogesjewelry.com" : 501,
    "lingo" : 855, 
    "logitech international s.a." : 569,
    "the london pass" : 856,
    "love and pride" : 857,
    "love-scent.com" : 858,
    "love toner" : 338,
    "lovetoner.com" : 338,
    "lucky brand jeans" : 513,
    "luckybrandjeans.com" : 513,
    "luggage pros" : 859,
    "lunarpages" : 166,
    "lunarpages.com" : 166,
    "luxor" : 344,
    "luxor las vegas" : 344,
    "luxor.com" : 344,
    "mac mall" : 296,
    "macmall" : 296,
    "macmall affiliate advantage network" : 296,
    "macmall.com" : 296,
    "macspeech" : 862,
    "macy*s" : 101,
    "macys" : 101,
    "macy's" : 101,
    "macys.com" : 101,
    "medifast" : 756,
    "magazinecity" : 863,
    "magazines.com" : 309,
    "magazines.com inc." : 309,
    "magazines.com, inc." : 309,
    "magellan's" : 687,
    "magellans.com" : 444,
    "magellans" : 444, 
    "mags for less" : 217,
    "magsforless" : 217,
    "magsforless.com" : 217,
    "maryland square" : 864,
    "b.a. mason shoe" : 865,
    "match.com" : 721,
    "matchmaker.com" : 866,
    "max & chloe" : 867,
    "mcafee" : 723,
    "mcm electronics" : 500,
    "medicus" : 868,
    "meijer" : 555,
    "meijer.com" : 555,
    "meritline.com" : 40,
    "meritline" : 40,
    "metrokitchen.com" : 564,
    "metrokitchen" : 564,
    "mgm grand" : 346,
    "mgmgrand.com" : 346,
    "microsoft adcenter" : 302,
    "microsoft store" : 557,
    "mikasa" : 293,
    "mikasa.com" : 293,
    "mileskimball.com" : 747,
    "mister art" : 869,
    "mlb.com" : 724,
    "modell's" : 726,
    "mondera" : 80,
    "mondera.com" : 80,
    "montgomery ward, llc" : 395,
    "montgomerywards.com" : 395,
    "montgomery wards" : 395,
    "moosejaw" : 554,
    "moosejaw.com" : 554,
    "morrell wine" : 157,
    "motorola" : 454,
    "motorola.com" : 454,
    "mrs. fields" : 727,
    "musician's friend" : 446,
    "musiciansfriend.com" : 446,
    "musicians friend" : 446,
    "mvixstore.com" : 562,
    "mwave" : 141,
    "mwave.com" : 141,
    "coca - cola company" : 439,
    "mycokerewards" : 439,
    "my wedding favors" : 870,
    "my wines direct" : 154,
    "mywinesdirect.com" : 154,
    "mywinesdirect" : 154,
    "nascar online" : 247,
    "nascar.com" : 247,
    "national business furniture, inc" : 728,
    "national geographic" : 579,
    "nationalgeographic.com" : 579,
    "the national geographic society" : 579,
    "nbastore.com" : 578,
    "nbc universal store" : 872,
    "the nba store" : 578,
    "nba store" : 578,
    "nba.com store" : 578,
    "netflix" : 62,
    "netflix, inc." : 62,
    "netflix.com" : 62,
    "netmagazines" : 149,
    "netmagazines.com" : 149,
    "netvision associates, inc." : 149,
    "net magazines" : 149,
    "network solutions" : 511,
    "networksolutions.com" : 511,
    "new egg" : 53,
    "newegg.com" : 53,
    "newegg" : 53,
    "neweggmall" : 526,
    "newport news" : 688,
    "newport news, inc." : 688,
    "newportnews" : 688,
    "new york & company" : 193,
    "new york &amp; company" : 193,
    "new york &amp;amp; company" : 193,
    "nyandcompany.com" : 193,
    "nflshop.com" : 252,
    "nfl shop" : 252,
    "nfl.com shop" : 252,
    "nike store" : 382,
    "nikestore.com" : 382,
    "nisim.com" : 873,
    "nitro-pak.com" : 874,
    "novica" : 51,
    "novica" : 51,
    "novica.com" : 51,
    "nuance" : 875,
    "nutrisystem" : 729,
    "office depot" : 29,
    "office depot, inc" : 29,
    "officedepot.com" : 29,
    "officedesigns.com" : 356,
    "office max" : 12,
    "officemax" : 12,
    "officemax.com" : 12,
    "old navy" : 236,
    "oldnavy" : 236,
    "oldnavy.com" : 236,
    "omaha steaks" : 94,
    "omahasteaks" : 94,
    "omahasteaks.com" : 94,
    "omahasteaks.com, inc." : 94,
    "one call" : 77,
    "onecall" : 77,
    "onecall.com" : 77,
    "onegreatfamily affiliate program" : 876,
    "one hanes place" : 730,
    "oneida" : 405,
    "oneida ltd - flatware" : 405,
    "oneida.com" : 405,
    "onlineshoes.com" : 278,
    "online shoes" : 278,
    "online tefl course" : 877,
    "only natural pet store" : 878,
    "onsale" : 121,
    "onsale.com" : 121,
    "orbitz" : 253,
    "orbitz.com" : 253,
    "oregon mountain community" : 879,
    "organica research" : 880,
    "orvis" : 316,
    "orvis.com" : 316,
    "the orvis company, inc." : 316,
    "overnight prints" : 531,
    "overstock" : 30,
    "overstock.com" : 30,
    "overstock.com, inc." : 30,
    "overton's" : 689,
    "packet8" : 461,
    "packet8.net" : 461,
    "pacific sunwear" : 560,
    "pacific sunwear affiliate program" : 560,
    "pac sun" : 560,
    "palm" : 22,
    "palm one" : 22,
    "palm.com" : 22,
    "store.palm.com" : 22,
    "paragon sports" : 272,
    "paragonsports.com" : 272,
    "parts express" : 322,
    "paul fredrick" : 56,
    "paul fredrick menstyle" : 56,
    "paulfredrick.com" : 56,
    "pc connection, inc." : 124,
    "pc connection / macconnection" : 124,
    "pcconnection.com" : 124,
    "pc connection" : 124,
    "pc mall" : 14,
    "pcmall.com" : 14,
    "pc microstore" : 32,
    "pcmicrostore.com" : 32,
    "the pfaltzgraff co." : 754,
    "performance bike" : 181,
    "performancebike.com" : 181,
    "perfume.com" : 411,
    "perfume worldwide.com" : 762,
    "personal creations" : 279,
    "personalcreations.com" : 279,
    "personalization mall.com" : 732,
    "petco" : 459,
    "petco animal supplies" : 459,
    "petco.com" : 459,
    "pet food direct" : 294,
    "petfooddirect.com" : 294,
    "petsmart" : 396,
    "petsmart.com" : 396,
    "pet street mall" : 881,
    "phantomplate. radar gps & red light detectors" : 883,
    "philips" : 255,
    "philips.com" : 255,
    "photoworks" : 191,
    "photoworks.com" : 191,
    "pingo" : 370,
    "pingo.com" : 370,
    "play-asia.com" : 483,
    "play-asia.com - video gaming &amp; beyond" : 483,
    "play-asia.com - video gaming &amp;amp; beyond" : 483,
    "plow & hearth" : 731,
    "powweb.com" : 884,
    "prep sportswear" : 271,
    "prepsportswear.com" : 271,
    "prescriptives (elc)" : 733,
    "proflowers" : 84,
    "proflowers.com" : 84,
    "progolf" : 240,
    "progolf.com" : 240,
    "pro golf" : 240,
    "prostores - an ebay company" : 886,
    "puma" : 429,
    "punch! software - 3d home & landscape design" : 887,
    "puritan's pride" : 734,
    "store.puma.com" : 429,
    "radio shack" : 15,
    "radioshack" : 15,
    "razorgator affiliate program" : 558,
    "razorgator.com" : 558,
    "razorgator" : 558,
    "realnetworks - music - news - sports - media player" : 451,
    "realplayer" : 451,
    "red envelope" : 330,
    "redenvelope" : 330,
    "redenvelope.com" : 330,
    "redoctane" : 522,
    "redoctane.com" : 522,
    "reebok" : 224,
    "reebok.com" : 224,
    "store.reebok.com" : 224,
    "register.com" : 536,
    "rei" : 76,
    "rei - outlet.com" : 76,
    "restaurant.com" : 187,
    "ritz camera" : 110,
    "ritzcamera.com" : 110,
    "ritzcamera.com, wolfcamera.com and cameraworld.com" : 110,
    "road runner sports" : 263,
    "roadrunner sports" : 263,
    "roadrunnersports" : 263,
    "roadrunnersports.com" : 263,
    "roaman's" : 690,
    "rockport" : 238,
    "rockport.com" : 238,
    "s&amp;amp;s worldwide" : 286,
    "s&amp;s worldwide" : 286,
    "s&s worldwide" : 286,
    "ssww.com" : 286,
    "safeway.com" : 778,
    "sam's club" : 413,
    "sams club" : 413,  
    "samsonite" : 328,
    "sbc" : 82,
    "sears" : 116,
    "sears, roebuck and co." : 116,  
    "sears.com" : 116,
    "second act" : 1,
    "secondact" : 1, 
    "secondact.biz" : 1,
    "sephora" : 735,
    "san francisco music box" : 484,
    "sfmusicbox.com" : 484,
    "sharpcast.com" : 417,
    "invisibleshield" : 254,
    "shoebuy" : 174,
    "shoebuy.com" : 174,
    "shoe mall" : 565,
    "shoemall" : 565,
    "shoemall.com" : 565,
    "shoes.com" : 244,
    "shoes.com, inc." : 244,
    "shop.com" : 305,
    "shop.com affiliate program  " : 305,
    "shop4tech" : 33,
    "shop4tech.com " : 33,
    "adidas" : 180,
    "adidas america" : 180,
    "adidas.com" : 180,
    "shopadidas.com" : 180,
    "shopbop" : 310,
    "shopbop.com" : 310,
    "shopkitchenaid.com" : 890,
    "shopnbc" : 28,
    "shopnbc.com" : 28,
    "shop pbs" : 273,
    "shoppbs" : 273,
    "shoppbs.org" : 273,
    "shopthebay.com" : 725,
    "shutterfly" : 129,
    "shutterfly.com" : 129,
    "sierra trading post" : 83,
    "sierratrading post" : 83,
    "signature days" : 287,
    "signature days llc" : 287,
    "signaturedays.com" : 287,
    "silhouettes" : 759,
    "sirius satellite radio" : 736,
    "sitesell" : 891,
    "skechers" : 229,
    "skechers footwear" : 229,  
    "skechers.com" : 229,
    "skype" : 532,
    "skype.com" : 532,
    "smart bargains" : 64,
    "smartbargains" : 64, 
    "smartbargains.com" : 64,
    "smarthome" : 151,
    "smarthome, inc." : 151,
    "smarthome.com" : 151,
    "smithmicro" : 892,
    "smoothfitness.com" : 753,
    "smug mug" : 893,
    "hp snapfish - the best value in photography" : 182,
    "snapfish" : 182,
    "snapfish.com" : 182,
    "sony" : 69,
    "sony - computers & electronics" : 69,
    "sony style" : 69, 
    "sonystyle.com" : 69,
    "sony style canada" : 518,
    "sonystyle.ca" : 518,
    "southwest airlines vacations" : 577,
    "southwest vacations" : 577,
    "southwestvacations.com" : 577,  
    "swavacations.com" : 577,
    "spa finder" : 404,
    "spa finder, inc" : 404,
    "spafinder" : 404,
    "spafinder.com" : 404,
    "spiegel" : 692,
    "spreadshirt" : 894,
    "spring hill nursery" : 693,
    "photostamps" : 397,
    "photostamps.com" : 397,
    "stamps.com" : 397,
    "stamps.com / photostamps.com" : 397,
    "stamps" : 397,
    "staples" : 16,
    "staples.com" : 16,
    "starbucks coffee" : 895,
    "starbucks store" : 895,
    "startec international long distance" : 896,
    "startlogic" : 897,
    "le meridien hotels and resorts" : 88,
    "luxury collection" : 88,   
    "sheraton" : 88,
    "starwood hotels" : 88,
    "starwood hotels & resorts" : 88,
    "starwood hotels &amp; resorts worldwide, inc." : 88,
    "starwood hotels &amp;amp; resorts worldwide, inc." : 88,
    "starwoodhotels.com" : 88,
    "the luxury collection" : 88,
    "the luxury collection - starwood" : 88,
    "the westin st. francis" : 88,
    "w hotels" : 88,
    "w hotels worldwide" : 88,
    "westin" : 88,
    "stauer" : 898,
    "steve madden" : 510,
    "sunglass hut/watch station" : 426,
    "sunglass hut" : 426,
    "sunglass hut international" : 426,
    "sunglasshut.com" : 426,
    "steven checn" : 184,
    "strawberrynet" : 899,
    "supergooddeal.com" : 184,
    "super media store" : 34,
    "supermediastore.com" : 34,
    "super warehouse" : 378,
    "sur la table" : 694,
    "surplus computers" : 17,
    "survey4profit.com" : 901,
    "swell" : 695,
    "swimsuits for all.com" : 902,
    "switch hits" : 447,
    "switch hits, inc." : 447,  
    "switchhits.com" : 447, 
    "symantec" : 520,
    "symantec uk" : 520,
    "symantec.com" : 520,
    "symantecstore.com" : 520,
    "szul" : 107,
    "szul online jewelry" : 107,
    "szul.com" : 107,
    "taca.com" : 903,
    "tafford.com" : 904,
    "target" : 18,
    "target.com" : 18,
    "taxbrain" : 349,
    "taxbrain online tax service" : 349,
    "taxbrain.com" : 349,
    "taylor gifts" : 321,
    "taylor gifts online" : 321,
    "taylorgifts.com" : 321,
    "team quick cash" : 906,
    "tech depot" :63,
    "tech depot - an office depot co." :63,
    "techdepot" :63,
    "teleflora" : 544,
    "teleflora.com" : 544,  
    "teleflora.com, teleflora" : 544,
    "teva" : 441,
    "teva.com" : 441,
    "containerstore.com" : 580,
    "the container store" : 580,
    "container store" : 580,
    "thecutekid" : 908,
    "the great indoors" : 502,
    "mirage" : 343,
    "mirage.com" : 343,
    "computer nerds international" : 470,
    "thenerds.net" : 470,
    "the popcorn factory" : 257,
    "thepopcornfactory" : 257,
    "thepopcornfactory.com" : 257,
    "the sedona method" : 907,
    "sharper image" : 72,
    "sharperimage.com" : 72,
    "the sharper image" : 72,
    "sports authority" : 42,
    "sportsauthority.com" : 42,
    "sportsman's guide" : 383,
    "sportsman's guide, inc." : 383,
    "sportsmansguide.com" : 383,
    "thetechgeek" : 167,
    "thetechgeek.com" : 167,
    "the wine messenger" : 158,
    "wine messenger" : 158,
    "winemessenger.com" : 158,
    "thinkgeek" : 552,
    "thinkgeek.com" : 552,
    "thrifty" : 283,
    "thrifty car rental" : 283,
    "thrifty rent - a - car system, inc." : 283,
    "thrifty.com" : 283,
    "tiger direct" : 19,
    "tigerdirect" : 19,
    "tigerdirect.com" : 19,
    "timberland" : 102,
    "timberland.com" : 102,
    "the tire rack" : 90,
    "tire rack" : 90,
    "tirerack.com" : 90,
    "tivo" : 223,
    "tivo affiliate program" : 223,
    "tivo.com" : 223,
    "t-mobile" : 403,
    "t-mobile.com" : 403,
    "t mobile" : 403,
    "toshiba" : 212,
    "tower records" : 41,
    "towerrecords.com" : 41,
    "toys r us" : 210,
    "leisure.travelocity.com" : 208,
    "travelocity" : 208,
    "travelocity.com" : 208,
    "treasure island" : 347,
    "treasureisland.com" : 347,
    "trustedid" : 740,
    "tumi" : 910,
    "turbo tax" : 475,
    "turbotax" : 475,
    "ujena" : 926,
    "ulta" : 758,
    "unbeatablesale.com" : 911,
    "under armour" : 468,
    "unity electronics" : 335,
    "upromise" : 912,
    "urban outfitters" : 770,
    "us search" : 913,
    "uso inc." : 914,
    "fhm promo" : 497,
    "vacation home rentals" : 915,
    "valuemags.com" : 497,
    "value mags" : 497,
    "vann's" : 21,
    "vann's inc." : 21,
    "vanns.com" : 21,
    "vans" : 438,
    "verizon wireless" : 119,
    "verizonwireless.com" : 119,
    "verseo" : 916,
    "viatalk" : 250,
    "viatalk.com " : 250,
    "vision direct" : 563,
    "visiondirect.com " : 563,
    "vista print holiday cards" : 189,
    "vista print offers" : 189,
    "vistaprint" : 189,
    "vistaprint.com" : 189,
    "vitamin world" : 739,
    "vonage" : 376,
    "vonage.com" : 376,
    "walgreens" : 743,
    "wal-mart" : 35,
    "wal-mart.com usa, llc" : 35,
    "walmart" : 35,
    "washington mutual" : 506,
    "wamu" : 506,
    "warner bros. tv shop" : 777,
    "water.com" : 917,
    "wayspa.com us and ca" : 249,
    "webroot software" : 738,
    "west marine" : 307,
    "westmarine.com" : 307,
    "westport big and tall" : 918,
    "wet seal" : 748,
    "whitesmoke" : 919, 
    "whoblinked.com" : 285, 
    "microsoft - windows marketplace" : 422,
    "willygoat inc." : 920,
    "wilsons leather" : 783,
    "windows marketplace" : 422,
    "windycityparrot.com" : 393,
    "wine.com" : 327,
    "wine enthusiast" : 697,
    "wirefly" : 120,
    "wirefly (inphonic)" : 120,
    "lane bryant catalog - woman within" : 698,
    "woot" : 168,
    "woot, inc" : 168,
    "worldofwarcraft.com" : 746,
    "wt direct" : 505,
    "wtdirect" : 505,
    "wynn las vegas" : 412,
    "welcome to x10.com" : 99,
    "x-10 wireless" : 99,
    "x10 wireless technology" : 99,
    "x10.com" : 99,
    "x10" : 99,
    "xheli.com" : 922,
    "extreme pc gear" : 138,
    "xpcgear.com" : 138,
    "x-treme geek" : 456,
    "x-tremegeek.com" : 456,
    "yesbuy.net" :359,
    "yoox" : 323,
    "yoox.com" : 323,
    "downtime.yorkphoto.com" : 171,
    "yahoo!" : 793,
    "york photo" : 171,  
    "yorkphoto.com" : 171,
    "yugster.com" : 176,
    "yves rocher" : 304,
    "yves rocher usa" : 304,
    "yvesrocherusa.com" : 304,
    "zagg.com" : 254,
    "zappos" : 169,
    "zappos.com" : 169,
    "zazzle" : 699,
    "zipzoomfly.com" : 313,
    "zip zoom fly" : 313,
    "zirh" : 377,
    "zirh" : 377,
    "zirh.com" : 377,
    "multiple zones international, inc." : 379,
    "zones" : 379,
    "zones.com" : 379
  },

  proxyUrl : "/ajax-proxy.php",
  bensMerUrl : "http://benscoupons.com/merchants_rss.xml/",
  bensCatUrl : "http://benscoupons.com/category_rss.xml/",
  bensRecUrl : "http://benscoupons.com/rss_widget.xml",
  init : function(storeName,divId) {
    BensWidget.storeName = storeName;
    var tempStoreName = storeName.toLowerCase();
    BensWidget.divId = divId;
    if(storeName == "mostrecent"){// || BensWidget.storeHash[tempStoreName] == null){
       // load the most recent coupons      
       jQuery.get( BensWidget.proxyUrl, { url : BensWidget.bensRecUrl },  function(xmlString){ BensWidget.processFeed(xmlString,"mostrecent"); });
    }
    else if (BensWidget.storeHash[tempStoreName] == null) {
      BensWidget.abort();
    } else {
      // load the merchant coupons
      jQuery.get( BensWidget.proxyUrl, { url : BensWidget.bensMerUrl + BensWidget.storeHash[tempStoreName] },  function(xmlString){ BensWidget.processFeed(xmlString); });
    }
  },
  processFeed : function(xmlString,doctype) {
    var doctype = doctype || "merchant";
    var jsonObj = jQuery.xml2json(xmlString);
    var title = jsonObj.channel.title.replace("BensCoupons.com ","");
    //alert(jsonObj.toSource());
    var header_text = (doctype == "mostrecent") ? "Hot Coupons" : "Hot " + title;
    var refer_string = "?referrer=Deal";
    var html_table_header = "<div class=\"rightsubcoupon\"><div class=\"bens_head\"><h2 class=\"shadow\">"+header_text+"</h2></div><table><tr><th class=\"coupon_column\">Coupon</th><th class=\"expiration_column\">Expires</th><th class=\"code_column\">Coupon Code</th></tr>";    var html_table_footer = "</table></div>";
    var html_table_content = "";
    var items = [];
    if(jsonObj.channel.item instanceof Array) items = jsonObj.channel.item;
    else items[0] = jsonObj.channel.item;
    if(items[0].title.indexOf("No") > -1 && items[0].title.indexOf("Headlines") > -1) {
      //if(doctype == "mostrecent"){
        BensWidget.abort();
      //}
      //else if(doctype == "category"){
      //  jQuery.get( BensWidget.proxyUrl, { url : BensWidget.bensRecUrl },  function(xmlString){ BensWidget.processFeed(xmlString,"mostrecent"); });
      //}
     // else {
        //doctype = "mostrecent";
     //   jQuery.get( BensWidget.proxyUrl, { url : BensWidget.bensRecUrl },  function(xmlString){ BensWidget.processFeed(xmlString,"mostrecent"); });
      //}
      return;
    }
    var limit = (doctype == "mostrecent") ? 8 : 4;
    var displayTotal = (items.length < limit) ? items.length : limit;
    if(displayTotal == 0){}
    else {
      for(var i=0;i<displayTotal;i++){
        var code = (items[i].codestring) ? items[i].codestring : "Click Here!";
        var expDateParts = items[i].expiration.split("/");
        var expDate = new Date(expDateParts[0],expDateParts[1]-1,expDateParts[2]);
        var today = new Date();
        var expMonth = expDate.getMonth() + 1;
        var expDayofMonth = expDate.getDate();
        var expYear = expDate.getFullYear().toString().replace("20","");
        var expDateString =  expMonth + "/" + expDayofMonth + "/" + expYear;
        if(today > expDate){ 
          if(today.getDate() == expDate.getDate()) expDateString = "<span style='color:red;font-weight:bold;'>Today</span>";
          else expDateString = "Expired";
        }
        html_table_content += "<tr><td class=\"coupon_column\"><a href=\""+items[i].guid+refer_string+"\" target=\"_blank\" rel=\"nofollow\">"+items[i].plaintitle+"</a></td><td class=\"expiration_column\"><a href=\""+items[i].guid+refer_string+"\" target=\"_blank\" rel=\"nofollow\">"+expDateString+"</a></td><td class=\"code_column\"><strong><a href=\""+items[i].guid+refer_string+"\" target=\"_blank\" rel=\"nofollow\">"+code+"</a></strong></td></tr>";
      }
      var html_table = html_table_header + html_table_content + html_table_footer;
      var widgetNode = document.getElementById(BensWidget.divId);
      widgetNode.innerHTML = html_table;
      widgetNode.style.display = "";
    }
  },
  abort : function() {
    var node = document.getElementById(BensWidget.divId);
    node.parentNode.removeChild(node);
  }
};  
