/*
 * Shoppers Resource Landing Pages (based on UI Nano) using jQuery and jQuery Brokenimage Plugin
 */

// Get banners
function shoppersresource(name, loc, obj)
{
	// Default variables
	var defaults = {
		linking : false, 
		delay : 0, 
		speed : 500, 
		timeout : 20000, 
		reflectionHeight : 0.5,
		reflectionOpacity : 0.3, 
		dealer : "", 
		brands : "", 
		package : "", 
		dataDivDealer : "uinano_dealer", 
		dataDivBrands : "uinano_brands", 
		dataDivPackage : "uinano_package", 
		brokenimage : "http://images.brandsource.com/_layouts/images/UINano/broken_image.png", 
		xmlfault : "http://images.brandsource.com/_layouts/images/UINano/broken_image.png", 
		local : ["file://"], 
		proxy : "/proxy.aspx?url=", 
		//proxy : "", 
		method : "GET", 
		contentype : "text/xml", 
		dataformat : "xml", 
		cache : false, 
		appliancesBrands : [{name:"Abbaka", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Abbaka.png", link:"http://www.abbaka.com/"}, 
			{name:"Admiral", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Admiral.png", link:"http://www.admiral-appliances.co.uk/"}, 
			{name:"Aga", image:"http://images.brandsource.com/_layouts/images/UINano/logos/AGA.png", link:"http://www.aga-ranges.com/"}, 
			{name:"Air King", image:"http://images.brandsource.com/_layouts/images/UINano/logos/AirKing.png", link:"http://www.airkinglimited.com/"}, 
			{name:"Amana", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Amana.png", link:"http://www.amana.com/"}, 
			{name:"American Range", image:"http://images.brandsource.com/_layouts/images/UINano/logos/AmericanRange.png", link:"http://www.americanrange.com/"}, 
			{name:"Ariston", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Ariston.png", link:"http://www.aristonappliances.us/"}, 
			{name:"Artech", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Artech.png", link:"http://www.artechusa.net/"}, 
			{name:"ASKO", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ASKO.png", link:"http://www.askousa.com/"}, 
			{name:"Avanti", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Avanti.png", link:"http://www.avantiproducts.com/"}, 
			{name:"Bertazzoni", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Bertazzoni.png", link:"http://www.bertazzoni-italia.com/"}, 
			{name:"Blue Star", image:"http://images.brandsource.com/_layouts/images/UINano/logos/BlueStar.png", link:"http://www.bluestarcooking.com/"}, 
			{name:"Bosch", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Bosch.png", link:"http://www.boschappliances.com/"}, 
			//{name:"Brand Source", image:"http://images.brandsource.com/_layouts/images/UINano/logos/BrandSource.png", link:"http://www.brandsource.com/"},
			//{name:"BrandSource", image:"http://images.brandsource.com/_layouts/images/UINano/logos/BrandSource.png", link:"http://www.brandsource.com/"},
			{name:"Broan", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Broan.png", link:"http://www.broan.com/"}, 
			{name:"Brown", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Brown.png", link:"http://www.brownstoveworksinc.com/"}, 
			{name:"Capital", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Capital.png", link:"http://www.capital-cooking.com/"}, 
			{name:"Crosley", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Crosley.png", link:"http://www.crosley.com/"}, 
			{name:"Dacor", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Dacor.png", link:"http://www.dacor.com/"}, 
			{name:"Danby", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Danby.png", link:"http://www.danby.com/"}, 
			{name:"DCS", image:"http://images.brandsource.com/_layouts/images/UINano/logos/DCS.png", link:"http://www.dcsappliances.com/"}, 
			{name:"De'Longhi", image:"http://images.brandsource.com/_layouts/images/UINano/logos/DeLonghi.png", link:"http://www.delonghiusa.com/"}, 
			{name:"Diva de Provence", image:"http://images.brandsource.com/_layouts/images/UINano/logos/DivadeProvence.png", link:"http://www.divadeprovence.com/"}, 
			{name:"Dynasty", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Dynasty.png", link:"http://www.dynastystoves.com/"}, 
			{name:"Electrolux", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Electrolux.png", link:"http://www.electroluxusa.com/"}, 
			{name:"Electrolux Icon", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Electrolux_Icon.png", link:"http://www.electroluxicon.com/"}, 
			{name:"Elmira Stove Works", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ElmiraStoveWorks.png", link:"http://www.elmirastoveworks.com/"}, 
			{name:"Equator", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Equator.png", link:"http://www.equatorappliance.com/"}, 
			{name:"Estate", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Estate.png", link:"http://www.estateappliances.com/"}, 
			{name:"EuroChef", image:"http://images.brandsource.com/_layouts/images/UINano/logos/EuroChef.png", link:"http://www.eurochefusa.com/"}, 
			{name:"Eurotech", image:"http://images.brandsource.com/_layouts/images/UINano/logos/EuroTech.png", link:"http://www.eurotechappliances.com/"}, 
				{name:"Evo", image:"http://images.brandsource.com/_layouts/images/UINano/logos/BrandSource.png", link:"http://www.evoamerica.com/"}, 
			//{name:"Expert Warehouse", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ExpertWarehouse.png", link:"http://ew.expertoms.com/"}, 
			{name:"Faber", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Faber.png", link:"http://www.faberonline.com/"}, 
			{name:"Fagor", image:"http://images.brandsource.com/_layouts/images/UINano/logos/FAGOR.png", link:"http://www.fagoramerica.com/"}, 
			{name:"Fedders", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Fedders.png", link:"http://www.fedders.com/"}, 
			{name:"Fisher Paykel", image:"http://images.brandsource.com/_layouts/images/UINano/logos/FisherPaykel.png", link:"http://www.fisherpaykel.com/"}, 
			{name:"FiveStar", image:"http://images.brandsource.com/_layouts/images/UINano/logos/FiveStar.png", link:"http://www.fivestarrange.com/"}, 
			{name:"Friedrich", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Friedrich.png", link:"http://www.friedrich.com/"}, 
			{name:"Frigidaire", image:"http://images.brandsource.com/_layouts/images/UINano/logos/frigidaire.png", link:"http://www.frigidaire.com/"}, 
			{name:"Gaggenau", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Gaggenau.png", link:"http://www.gaggenau.com/"}, 
			{name:"GE", image:"http://images.brandsource.com/_layouts/images/UINano/logos/GE.png", link:"http://www.geappliances.com/"}, 
			{name:"GE Café", image:"http://images.brandsource.com/_layouts/images/UINano/logos/GECafe.png", link:"http://www.geappliances.com/products/cafe/"}, 
			{name:"GE Eterna", image:"http://images.brandsource.com/_layouts/images/UINano/logos/GEEterna.png"}, 
			{name:"GE Monogram", image:"http://images.brandsource.com/_layouts/images/UINano/logos/GEMonogram.png", link:"http://www.monogram.com/"}, 
			{name:"GE Profile", image:"http://images.brandsource.com/_layouts/images/UINano/logos/GEProfile.png", link:"http://www.geappliances.com/products/brands/profile.htm"}, 
			{name:"Gourmet Source", image:"http://images.brandsource.com/_layouts/images/UINano/logos/GourmetSource.png"}, 
			{name:"Haier", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Haier.png", link:"http://www.haieramerica.com/"}, 
			{name:"Hotpoint", image:"http://images.brandsource.com/_layouts/images/UINano/logos/HOTPOINT.png", link:"http://www.hotpoint.com/"}, 
			{name:"Imperial", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Imperial.png", link:"http://www.imperialrange.com/"}, 
				{name:"Independent", image:"http://images.brandsource.com/_layouts/images/UINano/logos/BrandSource.png", link:"http://www.kitchenhood.com/"}, 
			{name:"Jade", image:"http://images.brandsource.com/_layouts/images/UINano/logos/JADE.png", link:"http://www.jadeappliances.com/"}, 
			{name:"Jenn-Air", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Jenn-Air.png", link:"http://www.jennair.com/"}, 
			{name:"JetAir", image:"http://images.brandsource.com/_layouts/images/UINano/logos/JetAir.png"}, 
			{name:"KitchenAid", image:"http://images.brandsource.com/_layouts/images/UINano/logos/KitcheAid.png", link:"http://www.kitchenaid.com/"}, 
			{name:"Kobe", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Kobe.png", link:"http://www.koberangehoods.com/"}, 
			{name:"Kuppersbusch", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Kuppersbusch.png", link:"http://www.kuppersbuschusa.com/"}, 
			{name:"LG", image:"http://images.brandsource.com/_layouts/images/UINano/logos/LG.png", link:"http://www.lg.com/"}, 
			{name:"Liebherr", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Liebherr.png", link:"http://www.liebherr-appliances.com/"}, 
			{name:"Magic Chef", image:"http://images.brandsource.com/_layouts/images/UINano/logos/MagicChef.png", link:"http://www.mcappliance.com/"}, 
			{name:"Marvel", image:"http://images.brandsource.com/_layouts/images/UINano/logos/MARVEL.png", link:"http://www.lifeluxurymarvel.com/"}, 
			{name:"Maytag", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Maytag.png", link:"http://www.maytag.com/"}, 
			{name:"Miele", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Miele.png", link:"http://www.miele.com/"}, 
			{name:"NuTone", image:"http://images.brandsource.com/_layouts/images/UINano/logos/NuTone.png", link:"http://www.nutone.com/"}, 
			//{name:"Panasonic", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Panasonic.png", link:"http://www.panasonic.com/"}, 
			{name:"Premier Pro-Series", image:"http://images.brandsource.com/_layouts/images/UINano/logos/PremierProSeries.png", link:"http://www.premierrange.com/"}, 
			{name:"ProFire", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ProFire.png"}, 
			{name:"Quietline", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Quietline.png"}, 
			{name:"Roper", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Roper.png", link:"http://www.roperappliances.com/"}, 
			{name:"Samsung", image:"http://images.brandsource.com/_layouts/images/UINano/logos/SamsungAppliances.png", link:"http://www.samsung.com/"}, 
			{name:"Sanyo", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Sanyo.png", link:"http://us.sanyo.com/"}, 
			{name:"Scotsman", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Scotsman.png", link:"http://www.scotsman-ice.com/"}, 
			//{name:"Sharp", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Sharp.png", link:"http://www.sharpusa.com/"}, 
			{name:"Siemens", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Siemens.png", link:"http://www.usa.siemens.com/"}, 
				{name:"SIRIUS", image:"http://images.brandsource.com/_layouts/images/UINano/logos/BrandSource.png", link:"http://www.sirius.com/"}, 
			{name:"Smeg", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Smeg.png", link:"http://www.smegusa.com/"}, 
			{name:"Speed Queen", image:"http://images.brandsource.com/_layouts/images/UINano/logos/SpeedQueen.png", link:"http://www.speedqueen.com/"}, 
			{name:"Sub-Zero", image:"http://images.brandsource.com/_layouts/images/UINano/logos/SubZero.png", link:"http://www.subzero.com/"}, 
			{name:"Tappan", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Tappan.png", link:"http://www.tappan.net/	"}, 
			{name:"Thermador", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Thermador.png", link:"http://www.thermador.com/"}, 
			{name:"TMIO", image:"http://images.brandsource.com/_layouts/images/UINano/logos/TMIO.png", link:"http://www.tmio.com/"}, 
			{name:"Trade-Wind", image:"http://images.brandsource.com/_layouts/images/UINano/logos/TradeWind.png", link:"http://www.tradewindsappliance.com/"}, 
			{name:"U-Line", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ULine.png", link:"http://www.u-line.com/"}, 
			{name:"Vent-A-Hood", image:"http://images.brandsource.com/_layouts/images/UINano/logos/VentAHood.png", link:"http://www.ventahood.com/"}, 
			{name:"Viking", image:"http://images.brandsource.com/_layouts/images/UINano/logos/VIKING.png", link:"http://www.vikingrange.com/"}, 
			{name:"W.C. Woods", image:"http://images.brandsource.com/_layouts/images/UINano/logos/WCWoods.png", link:"http://www.wcwood.com/"}, 
			{name:"Waste King", image:"http://images.brandsource.com/_layouts/images/UINano/logos/WasteKing.png", link:"http://www.anaheimmfg.com/"}, 
			{name:"Whirlpool", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Whirlpool.png", link:"http://www.whirlpool.com/"}, 
			{name:"White Westinghouse", image:"http://images.brandsource.com/_layouts/images/UINano/logos/WW.png", link:"http://www.whitewestinghouse.com/"}, 
			{name:"Wind Crest Induction", image:"http://images.brandsource.com/_layouts/images/UINano/logos/WindCrest.png", link:"http://www.windcrestcnp.com/"}, 
			{name:"Wolf", image:"http://images.brandsource.com/_layouts/images/UINano/logos/WOLF.png", link:"http://www.wolfappliance.com/"}, 
			{name:"ZEPHYR", image:"http://images.brandsource.com/_layouts/images/UINano/logos/zephyr.png", link:"http://www.zephyronline.com/"}], 
		electronicsBrands : [{name:"Bose", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Bose.png"}, 
			{name:"Boston Acoustics", image:"http://images.brandsource.com/_layouts/images/UINano/logos/BostonAcoustics.png"}, 
			{name:"Bryston", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Bryston.png"}, 
			{name:"CE labs", image:"http://images.brandsource.com/_layouts/images/UINano/logos/CELabs.png"}, 
			{name:"Cable Pro", image:"http://images.brandsource.com/_layouts/images/UINano/logos/CablePro.png"}, 
			{name:"Cambridge SoundWorks", image:"http://images.brandsource.com/_layouts/images/UINano/logos/CambridgeSoundworks.png"}, 
			{name:"Channel Master", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ChannelMaster.png"}, 
			{name:"Channel Vision", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ChannelVision.png"}, 
			{name:"Chief Manufacturing", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ChiefManufacturing.png"}, 
			{name:"CinemaTech", image:"http://images.brandsource.com/_layouts/images/UINano/logos/CinemaTech.png"}, 
			{name:"Classe", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Classe.png"}, 
				{name:"Color Vision", image:"http://images.brandsource.com/_layouts/images/UINano/logos/BrandSource.png"}, 
			{name:"Control4", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Control4.png"}, 
			{name:"Crestron", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Crestron.png"}, 
			{name:"Crosley Electronics", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Crosley.png"}, 
				{name:"D-Tool", image:"http://images.brandsource.com/_layouts/images/UINano/logos/BrandSource.png"}, 
			{name:"DIRECTV", image:"http://images.brandsource.com/_layouts/images/UINano/logos/DirectTV.png"}, 
			{name:"DVDO", image:"http://images.brandsource.com/_layouts/images/UINano/logos/DVDO.png"}, 
			{name:"DWIN", image:"http://images.brandsource.com/_layouts/images/UINano/logos/DWIN.png"}, 
			{name:"Da-Lite", image:"http://images.brandsource.com/_layouts/images/UINano/logos/DaLite.png"}, 
			{name:"Definitive Technology", image:"http://images.brandsource.com/_layouts/images/UINano/logos/DefinitiveTechnology.png"}, 
			{name:"Denon", image:"http://images.brandsource.com/_layouts/images/UINano/logos/DENON.png"}, 
			{name:"Dish Network", image:"http://images.brandsource.com/_layouts/images/UINano/logos/DishNetwork.png"}, 
			{name:"Draper", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Draper.png"}, 
			{name:"Dreamseat", image:"http://images.brandsource.com/_layouts/images/UINano/logos/DreamSeat.png"}, 
			{name:"Dymo", image:"http://images.brandsource.com/_layouts/images/UINano/logos/DYMO.png"}, 
			{name:"Dynaudio", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Dynaudio.png"}, 
			{name:"ELAN", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ELAN.png"}, 
				{name:"Energy", image:"http://images.brandsource.com/_layouts/images/UINano/logos/BrandSource.png"}, 
			{name:"Escient", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Escient.png"}, 
			//{name:"Expert Warehouse", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ExpertWarehouse.png"}, 
			{name:"Faroudja", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Faroudja.png"}, 
			{name:"Final Sound", image:"http://images.brandsource.com/_layouts/images/UINano/logos/FinalSound.png"}, 
			{name:"Fujitsu", image:"http://images.brandsource.com/_layouts/images/UINano/logos/FUJITSU.png"}, 
				{name:"Go Video", image:"http://images.brandsource.com/_layouts/images/UINano/logos/BrandSource.png"}, 
			{name:"HAI", image:"http://images.brandsource.com/_layouts/images/UINano/logos/HAI.png"}, 
			{name:"Harman Kardon", image:"http://images.brandsource.com/_layouts/images/UINano/logos/harmonkardon.png"}, 
			{name:"Harmony Remotes", image:"http://images.brandsource.com/_layouts/images/UINano/logos/HarmonyRemotes.png"}, 
			{name:"Hitachi", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Hitachi.png"}, 
			{name:"Hitachi Directors Series", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Hitachi.png"}, 
			{name:"Honeywell Cable", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Honeywell.png"}, 
			{name:"Hoover Central Vac", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Hoover.png"}, 
				{name:"IXOS", image:"http://images.brandsource.com/_layouts/images/UINano/logos/BrandSource.png"}, 
			{name:"Ideal", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Ideal.png"}, 
			{name:"Image Crafters", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ImageCrafters.png"}, 
			{name:"InFocus", image:"http://images.brandsource.com/_layouts/images/UINano/logos/InFocus.png"}, 
			{name:"Integra", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Integra.png"}, 
			{name:"Irwin Seating", image:"http://images.brandsource.com/_layouts/images/UINano/logos/IrwinSeating.png"}, 
			{name:"JVC", image:"http://images.brandsource.com/_layouts/images/UINano/logos/JVC.png"}, 
			{name:"KEF", image:"http://images.brandsource.com/_layouts/images/UINano/logos/KEF.png"}, 
			{name:"Kenwood", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Kenwood.png"}, 
			{name:"Key Digital Systems", image:"http://images.brandsource.com/_layouts/images/UINano/logos/KeyDigital.png"}, 
			{name:"Kimber Kable", image:"http://images.brandsource.com/_layouts/images/UINano/logos/KimberCable.png"}, 
			{name:"Klipsch", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Klipsch.png"}, 
			{name:"Krell", image:"http://images.brandsource.com/_layouts/images/UINano/logos/KRELL.png"}, 
			{name:"LG Electronics", image:"http://images.brandsource.com/_layouts/images/UINano/logos/LG.png"}, 
			{name:"MicroGEM", image:"http://images.brandsource.com/_layouts/images/UINano/logos/MicroGem.png"}, 
			{name:"Mitsubishi", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Mitsubishi.png"}, 
			{name:"NAD", image:"http://images.brandsource.com/_layouts/images/UINano/logos/NAD.png"}, 
 			{name:"Niles", image:"http://images.brandsource.com/_layouts/images/UINano/logos/NILES.png"}, 
			{name:"OmniMount", image:"http://images.brandsource.com/_layouts/images/UINano/logos/OmniMount.png"}, 
			{name:"On-Q", image:"http://images.brandsource.com/_layouts/images/UINano/logos/OnQ.png"}, 
			{name:"Onkyo", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ONKYO.png"}, 
			{name:"Optoma", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Optoma.png"}, 
			{name:"PSB", image:"http://images.brandsource.com/_layouts/images/UINano/logos/PSB.png"}, 
			{name:"Panamax", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Panamax.png"}, 
			{name:"Panamax/Furman", image:"http://images.brandsource.com/_layouts/images/UINano/logos/PanamaxFurman.png"}, 
			{name:"Panasonic", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Panasonic.png", link:"Panasonic http://www.panasonic.com/"}, 
			{name:"Paradigm", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Paradigm.png"}, 
			{name:"Parasound", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Parasound.png"}, 
			{name:"Phase Technology", image:"http://images.brandsource.com/_layouts/images/UINano/logos/PhaseTechnology.png"}, 
			{name:"Philips", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Philips.png"}, 
			{name:"Pioneer", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Pioneer.png"}, 
			{name:"Pioneer Elite", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Pioneer_Elite.png"}, 
			{name:"Proficient", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Proficient.png"}, 
			{name:"RCA", image:"http://images.brandsource.com/_layouts/images/UINano/logos/RCA.png"}, 
			{name:"RPG", image:"http://images.brandsource.com/_layouts/images/UINano/logos/RPG.png"}, 
			{name:"RTI Remotes", image:"http://images.brandsource.com/_layouts/images/UINano/logos/RTIRemotes.png"}, 
			{name:"Revel", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Revel.png"}, 
			{name:"Richard Gray's Power Company", image:"http://images.brandsource.com/_layouts/images/UINano/logos/RichardGraysPowerCompany.png"}, 
			{name:"Rotel", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ROTEL.png"}, 
			{name:"Runco", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Runco.png"}, 
			{name:"Russound", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Russound.png"}, 
			{name:"SIM2/Seleco", image:"http://images.brandsource.com/_layouts/images/UINano/logos/SIM2Seleco.png"}, 
			{name:"Salamander Designs", image:"http://images.brandsource.com/_layouts/images/UINano/logos/SalamanderDesigns.png"}, 
			{name:"Samsung Electronics", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Samsung.png", link:"Samsung http://www.samsung.com/"}, 
			{name:"Sanus", image:"http://images.brandsource.com/_layouts/images/UINano/logos/SanusSystems.png", link:"Sanus http://www.sanus.com/"}, 
			{name:"Screen Dreams", image:"http://images.brandsource.com/_layouts/images/UINano/logos/ScreenDreams.png"}, 
			{name:"Sharp", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Sharp.png", link:"Sharp http://www.sharpusa.com/"}, 
			{name:"Sonance", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Sonance.png"}, 
			{name:"Sony", image:"http://images.brandsource.com/_layouts/images/UINano/logos/SONY.png"}, 
			{name:"Sony ES", image:"http://images.brandsource.com/_layouts/images/UINano/logos/SonyES.png"}, 
			{name:"Sony XBR", image:"http://images.brandsource.com/_layouts/images/UINano/logos/SonyXBR.png"}, 
			{name:"Speakercraft", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Speakercraft.png"}, 
			{name:"Spectrum", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Spectrum.png"}, 
			{name:"Stewart Filmscreen", image:"http://images.brandsource.com/_layouts/images/UINano/logos/StewartFilmscreen.png"}, 
			{name:"Sylvania", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Sylvania.png"}, 
			{name:"TechCraft", image:"http://images.brandsource.com/_layouts/images/UINano/logos/TechCraft.png"}, 
			{name:"Terk", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Terk.png"}, 
			{name:"Testum", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Testum.png"}, 
			{name:"Theil", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Thiel.png"}, 
			{name:"Tivoli", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Tivoli.png"}, 
			{name:"Toshiba", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Toshiba.png", link:"Toshiba http://www.toshiba.com/"}, 
			{name:"Triad", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Triad.png"}, 
			{name:"Tributaries", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Tributaries.png"}, 
			{name:"Tripp Lite", image:"http://images.brandsource.com/_layouts/images/UINano/logos/TrippLite.png"}, 
			{name:"Universal Remote", image:"http://images.brandsource.com/_layouts/images/UINano/logos/UniversalRemote.png"}, 
			{name:"Vantage", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Vantage.png"}, 
			{name:"Velodyne", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Velodyne.png"}, 
			{name:"Vidikron", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Vidikron.png"}, 
			{name:"Xantech", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Xantech.png"}, 
			{name:"Yamaha", image:"http://images.brandsource.com/_layouts/images/UINano/logos/Yamaha.png"}], 
		imgPrev: "http://www.brandsource.com/_layouts/IMAGES/BrandSource/shoppers_resource/prev.png", 
		imgNext: "http://www.brandsource.com/_layouts/IMAGES/BrandSource/shoppers_resource/next.png", 
		titleA: "http://www.brandsource.com/_layouts/IMAGES/BrandSource/shoppers_resource/Shop_app.png", 
		titleE: "http://www.brandsource.com/_layouts/IMAGES/BrandSource/shoppers_resource/Shop_ele.png", 
		overrides: "", 
		test: true
	}
	// Pull in text from divs
	defaults.brands = jQuery.trim($("#" + defaults.dataDivBrands).text().toLowerCase());
	defaults.dealer = jQuery.trim($("#" + defaults.dataDivDealer).text().toLowerCase());
	defaults.package = jQuery.trim($("#" + defaults.dataDivPackage).text().toLowerCase());
	// Default object in case nothing is passed
	obj = obj || {};
	// Apply new values
	jQuery.each(obj, function(i, val)
	{
		defaults[i] = val;
	});
	// Fix the path
	// .com
	var dotCom = "brandsource.com";
	if(loc.indexOf(dotCom) != -1)
	{
		//loc = loc.slice(loc.indexOf(dotCom) + dotCom.length);
	}
	// .ca
	var dotCa = "brandsource.ca";
	if(loc.indexOf(dotCa) != -1)
	{
		//loc = loc.slice(loc.indexOf(dotCa) + dotCa.length);
	}
	// Add div and location to defaults
	defaults.div = name
	defaults.location = uinano_proxy(loc, defaults.proxy, defaults.local);
	// Load XML
	shoppersresource_call(defaults);
}


// Retrieve XML
function shoppersresource_call(obj)
{
	// Get XML
	jQuery.ajax({
		cache: obj.cache, 
		timeout: obj.timeout, 
		contentType: obj.contenttype, 
		type: obj.method, 
		url: obj.location,
		dataType: obj.dataformat, 
		error: function(xhrObj, textStatus, errorThrown)
		{
			shoppersresource_fault(obj.div, obj.xmlfault, xhrObj, textStatus, errorThrown);
		}, 
		success: function(data)
		{
			shoppersresource_result(obj, data);
		}
	});
}


// Fault
function shoppersresource_fault(div, xhrObj, textStatus, errorThrown)
{
	// Clear the div
	$("#" + div).empty();
	// Failed message
	$("#" + div).append("<p>Failed to load Shoppers Resource data</p>");
}


// Result
function shoppersresource_result(obj, data)
{
	// Root
	var root = $(data).find("content");
	// Category type
	var type = shoppersresource_node($(root).eq(0), "type");
	// Empty div
	$("#" + obj.div).empty();
	// Set up current item
	$("#" + obj.div).data("current", 0);
	// Title image
	var titleImg = (type.toLowerCase() == "electronics") ? obj.titleE : obj.titleA;
	// Build container
	var container = $.create("div", {"class":"srlanding"}, [
		"div", {"class":"content"}, [
			
			"table", {"width":"100%", "height":"100%", "border":"0", "cellspacing":"1", "cellpadding":"0"}, [
				"tr", {}, [
					"td", {"class":"display"}, [
						"div", {"class":"displaycontainer maxheight relative"}, [
							"div", {"class":"displaycontent maxheight maxwidth relative"}, [
								"div", {"class":"head absolute maxwidth"}, [
									"img", {"src":titleImg}, []	
								], 
								"div", {"class":"contents"}, [
									"div", {"class":"contents"}, ["Loading content..."]
								]
							]
						]
					], 
					"td", {"class":"brands"}, [
						"div", {"class":"brandcontainer maxheight tablecell sidewidth"}, [	
							"div", {"class":"brandlist sidewidth", "id":"brandlist"}, ["Loading brands..."]	
						]
					]
				]																							 
			]	
		], 
		"div", {"class":"subnav"}, [
			"div", {"class":"subitem"}, ["Loading navigation..."]
		]
	]);
	$("#" + obj.div).append($(container));
	// Build arraycollection of overrides
	var overrides = $($(data).find("overrides")).find("override");
	obj.overrides = new Array();
	jQuery.each(overrides, function(i, val)
	{
		var o = new Object();
			o.brand = shoppersresource_property($(val), "brand");
			o.link = shoppersresource_property($(val), "link");
		obj.overrides.push(o);
	});
	// Package
	var p = obj.package.split(",");
	jQuery.each(p, function(i, val)
	{
		p[i] = jQuery.trim(val);
	});
	// Create brands
	$(".brandlist").empty();
	if(obj.brands.toString().length == 0)
	{
		jQuery.each(((type.toLowerCase() == "electronics") ? obj.electronicsBrands : obj.appliancesBrands), function(i, val)
		{
			// Logo
			$(".brandlist").append("<div class='brand'>" + brandStartLink(obj.linking, val.name, val.link, obj.overrides) + "<img src='" + val.image + "' alt='" + val.name + "' title='" + val.name + "' border='0'>" + brandEndLink(obj.linking, val.link) + "</div>");
		});
	}
	else
	{
		// Remove white space from items
		var b = obj.brands.split(",");
		jQuery.each(b, function(i, val)
		{
			b[i] = jQuery.trim(val);
		});
		// Unique brands
		b = b.uinano_unique();
		// List of all brands
		var allbrands = [];
		jQuery.each((type.toLowerCase() == "electronics") ? obj.electronicsBrands : obj.appliancesBrands, function(i, val)
		{
			allbrands.push(jQuery.trim(val.name.toLowerCase()));
		});
		// Unique brands
		allbrands = allbrands.uinano_unique();
		// Accessible brands
		jQuery.each(b.sort(), function(i, val)
		{
			if(jQuery.inArray(val.toLowerCase(), allbrands) != -1)
			{
				// Logo
				var t = (type.toLowerCase() == "electronics") ? obj.electronicsBrands : obj.appliancesBrands
				$(".brandlist").append("<div class='brand'>" + brandStartLink(obj.linking, t[jQuery.inArray(val, allbrands)].name, t[jQuery.inArray(val, allbrands)].link, obj.overrides) + "<img src='" + t[jQuery.inArray(val, allbrands)].image + "' alt='" + t[jQuery.inArray(val, allbrands)].name + "' title='" + t[jQuery.inArray(val, allbrands)].name + "'  border='0'>" + brandEndLink(obj.linking, t[jQuery.inArray(val, allbrands)].link) + "</div>");
			}
		});
	}
	// Create sub nav and content
	var items = $(data).find("item");
	$(".contents").empty();
	$(".subnav").empty();
	jQuery.each(items, function(i, val)
	{
		// Content
		var main = $.create("div", {"class":"maxwidth maxheight hidden relative"}, [
			"div", {"class":"img maxheight tablecell maxwidth"}, [	
				"div", {"class":"reflectcontainer table"}, [
					"img", {"class":"reflect", "src":shoppersresource_node($(val), 'image')}, []
				]	
			], 
			"div", {"class":"absolute bottom"}, [
				"div", {"class":"title"}, [shoppersresource_node($(val), 'title')], 
				"div", {"class":"description"}, [shoppersresource_node($(val), 'description')]	
			]
		]);
		$(".contents").append($(main));
		// Sub nav
		var subitems = $(val).find("category");
		var subcatStr = "";
		jQuery.each(subitems, function(j, val)
		{
			var divider = (j == 0) ? "" : " | ";
			subcatStr = subcatStr + divider + "<a href='" + testing(shoppersresource_node($(val), 'link'), obj.dealer) + "'>" + shoppersresource_node($(val), 'name') + "</a>";
		});
		$(".subnav").append("<div class='subitem'>" + subcatStr + "</div>");
	});
	// Create main rotation
	$(".contents").cycle(
	{
		timeout: obj.delay, 
		speed: obj.speed, 
		cleartype: 1
	});
	// Create sub rotation
	$(".subnav").cycle(
	{ 
		timeout: obj.delay, 
		speed: obj.speed, 
		cleartype: 1 
	});
	// Previous
	var nP = $.create("div", {"class":"navprev"}, [
		"a", {"id":"prev", "href":"javascript:shoppersresource_prev(\"" + obj.div + "\");"}, [
			"img", {"border":"0", "src":obj.imgPrev}, []	
		]
	]);
	$(".displaycontainer").append($(nP));
	// Next
	var nN = $.create("div", {"class":"navnext"}, [
		"a", {"id":"next", "href":"javascript:shoppersresource_next(\"" + obj.div + "\");"}, [
			"img", {"border":"0", "src":obj.imgNext}, []	
		]
	]);
	$(".displaycontainer").append($(nN));
}

// Brand start link
function brandStartLink(linking, brand, link, overrides)
{
	var isGold = (linking) ? true : false;
	if(isGold)
	{
		// Link
		var lnk = link;
		// Override link
		jQuery.each(overrides, function(i, val)
		{
			if(jQuery.trim(brand.toLowerCase()) == jQuery.trim(val.brand.toLowerCase()))
			{
				lnk = val.link;
			}
		});
		// Target
		var tgt = (lnk == undefined || lnk.indexOf("/") == 0 || lnk.indexOf(".brandsource.c") != -1) ? "" : "target='_blank'";
		// Return
		if(lnk == undefined)
		{
			return "";
		}
		else
		{
			return "<a href='" + lnk + "' " + tgt + ">";
		}
	}
	// Return nothing
	return "";
}

// Brand end link
function brandEndLink(linking, link)
{
	// It's a gold site so it has a link on it
	return (link != undefined && linking) ? "</a>" : "";
}

// Rig for testing pages
function testing(loc, dealer)
{
	if(loc.slice(0, 1) == "/" && loc.toLowerCase().indexOf("/dealers/") == -1 && dealer.length != 0 && document.location.toString().toLowerCase().indexOf("www.") != -1)
	{
		return "/Dealers/" + dealer + loc;
	}
	return loc;
}


// Prev
function shoppersresource_prev(tgt)
{
	// Find prev
	var n = ($("#" + tgt).data("current") == 0) ? $(".contents").children().length - 1 : $("#" + tgt).data("current") - 1;
	// Update
	shoppersresource_display(tgt, n);
}


// Next
function shoppersresource_next(tgt)
{
	// Find next
	var n = ($("#" + tgt).data("current") == $(".contents").children().length - 1) ? 0 : $("#" + tgt).data("current") + 1;
	// Update
	shoppersresource_display(tgt, n);
}


// Next
function shoppersresource_display(tgt, n)
{
	// Set next
	$("#" + tgt).data("current", n);
	// Update to next
	$(".contents").cycle(n); 
	$(".subnav").cycle(n);
}


// Get appropriate node
function shoppersresource_node(scope, name)
{
	return scope.find(name).text();
}

// Get appropriate node attribute
function shoppersresource_property(scope, name)
{
	return scope.attr(name);
}