
var largeSponsors = new Array();
largeSponsors[0] = new Array();
largeSponsors[0]['image'] = { src: 'cache/images/68db297f15a3c6f7c8e11c8154acb959.jpg', alt: 'Creative Partnerships', title: 'Creative Partnerships' };
largeSponsors[0]['url'] = { href: 'http://www.creative-partnerships.com/' };
largeSponsors[1] = new Array();
largeSponsors[1]['image'] = { src: 'cache/images/24b046ffe4ab6d9feb1c898ba699b50a.jpg', alt: 'Heritage Lottery Fund', title: 'Heritage Lottery Fund' };
largeSponsors[1]['url'] = { href: 'http://www.hlf.org.uk/English/' };
largeSponsors[2] = new Array();
largeSponsors[2]['image'] = { src: 'cache/images/1b6f05cc5364c8f1aa6a07e6fd7c5311.jpg', alt: 'Jamiedia Internet', title: 'Jamiedia Internet' };
largeSponsors[2]['url'] = { href: 'http://www.jamiedia.co.uk' };
largeSponsors[3] = new Array();
largeSponsors[3]['image'] = { src: 'cache/images/9509a8b1e808383ce21fdde35b1d9491.jpg', alt: 'Victoria Hall', title: 'Victoria Hall' };
largeSponsors[3]['url'] = { href: 'http://www.theambassadors.com/victoriahall' };
largeSponsors[4] = new Array();
largeSponsors[4]['image'] = { src: 'cache/images/9dafd156cc74652c0bf2d3c62e02de5e.jpg', alt: 'Hanley Building Society', title: 'Hanley Building Society' };
largeSponsors[4]['url'] = { href: 'http://www.thehanley.co.uk/' };
largeSponsors[5] = new Array();
largeSponsors[5]['image'] = { src: 'cache/images/73b197ecbfe673d256e5d1c3e7036dbe.jpg', alt: 'Sponge Marketing', title: 'Sponge Marketing' };
largeSponsors[5]['url'] = { href: 'http://www.spongemarketing.co.uk' };
largeSponsors[6] = new Array();
largeSponsors[6]['image'] = { src: 'cache/images/5f753c4c3553f4ea8aa8aa3ee96bb3df.jpg', alt: 'KJD solicitors', title: 'KJD solicitors' };
largeSponsors[6]['url'] = { href: 'http://www.kjd.co.uk/' };
largeSponsors[7] = new Array();
largeSponsors[7]['image'] = { src: 'cache/images/a471ebbc7ed927fb4d0b4b1dfb75fe7c.jpg', alt: 'Stoke on Trent City Council', title: 'Stoke on Trent City Council' };
largeSponsors[7]['url'] = { href: 'http://www.stoke.gov.uk/' };
largeSponsors[8] = new Array();
largeSponsors[8]['image'] = { src: 'cache/images/503a749e58a586d0f96a7f9429e48889.jpg', alt: 'Arts Council England', title: 'Arts Council England' };
largeSponsors[8]['url'] = { href: 'http://www.artscouncil.org.uk/' };
largeSponsors[9] = new Array();
largeSponsors[9]['image'] = { src: 'cache/images/7af3d45f31d73895bcc0dbdab650ed2a.JPG', alt: 'NSRP', title: 'NSRP' };
largeSponsors[9]['url'] = { href: 'http://www.stoke.gov.uk/ccm/navigation/business/regeneration/business-regeneration-partnership/;jsessionid=biJxxHulYOoc' };
largeSponsors[10] = new Array();
largeSponsors[10]['image'] = { src: 'cache/images/c0abc4476cab90d45c610f212a0939d0.jpg', alt: 'Mitten Clarke', title: 'Mitten Clarke' };
largeSponsors[10]['url'] = { href: 'http://www.mittenclarke.co.uk/' };
largeSponsors[11] = new Array();
largeSponsors[11]['image'] = { src: 'cache/images/27b304e170396e4c252812d94e088dc3.jpg', alt: 'Staffordshire University', title: 'Staffordshire University' };
largeSponsors[11]['url'] = { href: 'http://www.staffs.ac.uk' };

var mediumSponsors = new Array();
mediumSponsors[0] = new Array();
mediumSponsors[0]['image'] = { src: 'cache/images/1b494ba56ff353eaad7a4f860804b672.jpg', alt: 'College in the Community', title: 'College in the Community' };
mediumSponsors[0]['url'] = { href: 'http://www.stoke.gov.uk/ccm/navigation/education/adult-education' };
mediumSponsors[1] = new Array();
mediumSponsors[1]['image'] = { src: 'cache/images/4d93ea29c295cbfc8476b4be437efcef.JPG', alt: 'Adgiftsonline', title: 'Adgiftsonline' };
mediumSponsors[1]['url'] = { href: 'http://www.adgiftsonline.co.uk' };
mediumSponsors[2] = new Array();
mediumSponsors[2]['image'] = { src: 'cache/images/1865e0fb97f6bae2fa5fbcea108ce501.jpg', alt: 'BA&CF', title: 'BA&CF' };
mediumSponsors[2]['url'] = { href: 'http://www.burslemfestival.org.uk' };
mediumSponsors[3] = new Array();
mediumSponsors[3]['image'] = { src: 'cache/images/3682fec0cdb2571778a781cec68ec967.jpg', alt: 'Stoke on Trent Festival', title: 'Stoke on Trent Festival' };
mediumSponsors[3]['url'] = { href: 'http://www.stokeontrentfestival.co.uk/' };
mediumSponsors[4] = new Array();
mediumSponsors[4]['image'] = { src: 'cache/images/4b6c30ec657bd47c00d1e754b9356d2e.jpg', alt: 'Signal', title: 'Signal' };
mediumSponsors[4]['url'] = { href: 'http://www.signal1.co.uk/' };
mediumSponsors[5] = new Array();
mediumSponsors[5]['image'] = { src: 'cache/images/7edad4438848cfcefa221f32a67950fd.jpg', alt: 'Burslem School of Art', title: 'Burslem School of Art' };
mediumSponsors[5]['url'] = { href: 'http://www.schoolofart.co.uk' };
mediumSponsors[6] = new Array();
mediumSponsors[6]['image'] = { src: 'cache/images/bf88f2f4f2b4cbde844c0e34ad799f6c.jpg', alt: 'The Sentinel', title: 'The Sentinel' };
mediumSponsors[6]['url'] = { href: 'http://www.thesentinel.co.uk' };
mediumSponsors[7] = new Array();
mediumSponsors[7]['image'] = { src: 'cache/images/d35599e640342cc62be1416d765bf2b2.jpg', alt: 'titanic brewery', title: 'titanic brewery' };
mediumSponsors[7]['url'] = { href: 'http://www.titanicbrewery.co.uk/' };
mediumSponsors[8] = new Array();
mediumSponsors[8]['image'] = { src: 'cache/images/b91b5acb8bf23b7be6f14a59e1a48029.jpg', alt: 'Sugarmill', title: 'Sugarmill' };
mediumSponsors[8]['url'] = { href: 'http://www.thesugarmill.co.uk/' };
mediumSponsors[9] = new Array();
mediumSponsors[9]['image'] = { src: 'cache/images/56f446f05890c1df96e5676c70c0f625.jpg', alt: 'UpStart', title: 'UpStart' };
mediumSponsors[9]['url'] = { href: 'http://www.upstartstoke.co.uk' };
mediumSponsors[10] = new Array();
mediumSponsors[10]['image'] = { src: 'cache/images/3e6f1862fe3c216b2f796b9ffdbd05fa.jpg', alt: 'wrenpark', title: 'wrenpark' };
mediumSponsors[10]['url'] = { href: 'http://phil.rawle@wrenpark.co.uk' };
mediumSponsors[11] = new Array();
mediumSponsors[11]['image'] = { src: 'cache/images/43cab5112251a6a3cf4e0c1013d6a1dc.JPG', alt: 'Business Brokers', title: 'Business Brokers' };
mediumSponsors[11]['url'] = { href: 'http://www.nscci.co.uk/businessbrokers' };
mediumSponsors[12] = new Array();
mediumSponsors[12]['image'] = { src: 'cache/images/f8c2022ba4bfecf34623d095882c1d91.jpg', alt: 'Advantage West Midlands', title: 'Advantage West Midlands' };
mediumSponsors[12]['url'] = { href: 'http://www.advantagewm.co.uk/' };

var smallSponsors = new Array();
smallSponsors[0] = new Array();
smallSponsors[0]['image'] = { src: 'cache/images/00aff23f38dfdb83cfd7f0e7ec71ae57.jpg', alt: 'Infinities', title: 'Infinities' };
smallSponsors[0]['url'] = { href: 'http://www.istaffordshire.co.uk/profile/198214/Stoke-on-Trent/Infinities/' };
smallSponsors[1] = new Array();
smallSponsors[1]['image'] = { src: 'cache/images/4c3227d380788117a045769f06f95815.jpg', alt: 'Stoke Film Theatre', title: 'Stoke Film Theatre' };
smallSponsors[1]['url'] = { href: 'http://www.stokefilmtheatre.fsnet.co.uk/' };
smallSponsors[2] = new Array();
smallSponsors[2]['image'] = { src: 'cache/images/601f00cffd3b008c6862ea174fc2e244.jpg', alt: 'Staffs Uni SU', title: 'Staffs Uni SU' };
smallSponsors[2]['url'] = { href: 'http://www.staffsunion.com/venues/emberlounge/' };
smallSponsors[3] = new Array();
smallSponsors[3]['image'] = { src: 'cache/images/fdb2a6ce2c1604cc4a8a20805d062ed4.JPG', alt: 'City Voices', title: 'City Voices' };
smallSponsors[3]['url'] = { href: 'http://www.stoke.gov.uk/ccm/navigation/leisure/libraries/city-central-library-hanley' };
smallSponsors[4] = new Array();
smallSponsors[4]['image'] = { src: 'cache/images/9dd69a917fd87929fb1030eb31fd5ef6.jpg', alt: 'The Leopard', title: 'The Leopard' };
smallSponsors[4]['url'] = { href: 'http://www.youtube.com/watch?v=loSSHO9vkRw' };
smallSponsors[5] = new Array();
smallSponsors[5]['image'] = { src: 'cache/images/39f2cd3963db08dd9253d095e2ec02f0.jpg', alt: 'Script', title: 'Script' };
smallSponsors[5]['url'] = { href: 'http://www.scriptonline.net/' };
smallSponsors[6] = new Array();
smallSponsors[6]['image'] = { src: 'cache/images/ebe08906ae7afe529232189f6426c527.jpg', alt: 'Airspace Gallery', title: 'Airspace Gallery' };
smallSponsors[6]['url'] = { href: 'http://www.airspacegallery.org' };
smallSponsors[7] = new Array();
smallSponsors[7]['image'] = { src: 'cache/images/5c198ea4c7bb9c8cfb3e781f70b0fc68.JPG', alt: 'Moat House', title: 'Moat House' };
smallSponsors[7]['url'] = { href: 'http://www.bestwestern.co.uk/Hotels/Best-Western-Stoke-on-Trent-Moat-House-83862/Hotel-Info/Default.aspx' };
smallSponsors[8] = new Array();
smallSponsors[8]['image'] = { src: 'cache/images/bfcd6222ef3246b72d77d52ae35588ae.JPG', alt: 'Urban Circus', title: 'Urban Circus' };
smallSponsors[8]['url'] = { href: 'http://www.youtube.com/watch?v=RfiZWzHdu80&amp;feature=related' };
smallSponsors[9] = new Array();
smallSponsors[9]['image'] = { src: 'cache/images/16d81f864be20f1b0bc7599dc36ec09f.JPG', alt: 'Parins', title: 'Parins' };
smallSponsors[9]['url'] = { href: 'http://www.parins.org' };
smallSponsors[10] = new Array();
smallSponsors[10]['image'] = { src: 'cache/images/e657f0192aafa5d55dec845fda80293e.jpg', alt: 'ATTP', title: 'ATTP' };
smallSponsors[10]['url'] = { href: 'http://www.attp.co.uk/' };
smallSponsors[11] = new Array();
smallSponsors[11]['image'] = { src: 'cache/images/f4abd30d89ba587bafe916a5f3f5fb4e.jpg', alt: 'Culturegen', title: 'Culturegen' };
smallSponsors[11]['url'] = { href: 'http://www.culturegen.org.uk' };
smallSponsors[12] = new Array();
smallSponsors[12]['image'] = { src: 'cache/images/2b3a4f2fbf3c123350f3efaea3a09bd2.JPG', alt: 'City Music and Performing Arts', title: 'City Music and Performing Arts' };
smallSponsors[12]['url'] = { href: 'http://www.stoke.gov.uk/ccm/navigation/education/music-centres/' };
smallSponsors[13] = new Array();
smallSponsors[13]['image'] = { src: 'cache/images/e0f6400a91aa4b613c419f74b00f8077.jpg', alt: 'Biddulph Up In Arms', title: 'Biddulph Up In Arms' };
smallSponsors[13]['url'] = { href: 'http://www.biddulphupinarms.com' };
smallSponsors[14] = new Array();
smallSponsors[14]['image'] = { src: 'cache/images/75aa2906b049e993ba2b1b365aa2534e.jpg', alt: 'Smiley Boy Photography', title: 'Smiley Boy Photography' };
smallSponsors[14]['url'] = { href: 'http://photography@smileyboy.co.uk' };
smallSponsors[15] = new Array();
smallSponsors[15]['image'] = { src: 'cache/images/52fa6127534be937d261a3e6da69dfd9.jpg', alt: 'Chamber of Commerce', title: 'Chamber of Commerce' };
smallSponsors[15]['url'] = { href: 'http://www.nscci.co.uk/' };
smallSponsors[16] = new Array();
smallSponsors[16]['image'] = { src: 'cache/images/0e594fbc5e847b25762d8777c083ac65.jpg', alt: 'Unsigned Guide', title: 'Unsigned Guide' };
smallSponsors[16]['url'] = { href: 'http://www.theunsignedguide.com' };
smallSponsors[17] = new Array();
smallSponsors[17]['image'] = { src: 'cache/images/575d7fbd6675eaad11820fecb09b6b82.JPG', alt: 'Dazed', title: 'Dazed' };
smallSponsors[17]['url'] = { href: 'http://drew.sanger@btopenworld.com' };
smallSponsors[18] = new Array();
smallSponsors[18]['image'] = { src: 'cache/images/c7801eadf0cd2f75e27abeed7b721d03.jpg', alt: 'Music Mania', title: 'Music Mania' };
smallSponsors[18]['url'] = { href: 'http://www.musicmaniauk.com/' };
smallSponsors[19] = new Array();
smallSponsors[19]['image'] = { src: 'cache/images/7b53116f49e77c16a83ffd082912ab3f.JPG', alt: 'Urban Lizard', title: 'Urban Lizard' };
smallSponsors[19]['url'] = { href: 'http://www.urbanlizard.co.uk' };
smallSponsors[20] = new Array();
smallSponsors[20]['image'] = { src: 'cache/images/62689e186c5ffcb008b5c473e0e88958.JPG', alt: 'Wardell Armstrong', title: 'Wardell Armstrong' };
smallSponsors[20]['url'] = { href: 'http://www.wardell-armstrong.com' };
smallSponsors[21] = new Array();
smallSponsors[21]['image'] = { src: 'cache/images/58033fcf6a39310a225134590b4aa091.JPG', alt: 'Wrongpop', title: 'Wrongpop' };
smallSponsors[21]['url'] = { href: 'http://www.wrongpop.co.nr' };
smallSponsors[22] = new Array();
smallSponsors[22]['image'] = { src: 'cache/images/289d454008737354f88d8c773f460e94.jpg', alt: 'Fat Cats', title: 'Fat Cats' };
smallSponsors[22]['url'] = { href: 'http://www.fatcatcafebars.co.uk/stoke/index.html' };
smallSponsors[23] = new Array();
smallSponsors[23]['image'] = { src: 'cache/images/5d3aa637060f6c5a719540a028f2d66f.jpg', alt: 'George Hotel', title: 'George Hotel' };
smallSponsors[23]['url'] = { href: 'http://www.georgehotelstoke.com' };
smallSponsors[24] = new Array();
smallSponsors[24]['image'] = { src: 'cache/images/a7e7f10a766dd7f79c90f37152f39243.jpg', alt: 'Jim Kirkpatrick', title: 'Jim Kirkpatrick' };
smallSponsors[24]['url'] = { href: 'http://www.jimkirkpatrick.com/' };
smallSponsors[25] = new Array();
smallSponsors[25]['image'] = { src: 'cache/images/9852fd522a247287b92d2bb06dbd5b1b.jpg', alt: 'Tremolo', title: 'Tremolo' };
smallSponsors[25]['url'] = { href: 'http://www.myspace.com/tremolorehearsals' };
smallSponsors[26] = new Array();
smallSponsors[26]['image'] = { src: 'cache/images/bb9247d441be34e66d8fd40d6099d9d3.JPG', alt: 'Pie Minister', title: 'Pie Minister' };
smallSponsors[26]['url'] = { href: 'http://www.pieminister.co.uk' };
smallSponsors[27] = new Array();
smallSponsors[27]['image'] = { src: 'cache/images/31a33f58fcc97fd978017f41db1802fe.jpg', alt: 'Room in the Roof', title: 'Room in the Roof' };
smallSponsors[27]['url'] = { href: 'http://www.roomintheroof.org' };
smallSponsors[28] = new Array();
smallSponsors[28]['image'] = { src: 'cache/images/54167240b1a39c70c100b9fdbc473796.jpg', alt: 'Shruthiuk', title: 'Shruthiuk' };
smallSponsors[28]['url'] = { href: 'http://www.shruthiuk.com/' };
smallSponsors[29] = new Array();
smallSponsors[29]['image'] = { src: 'cache/images/2a1511c1aeaeca38478a4b6785d8429f.jpg', alt: 'Finest', title: 'Finest' };
smallSponsors[29]['url'] = { href: 'http://www.finest.org.uk' };
smallSponsors[30] = new Array();
smallSponsors[30]['image'] = { src: 'cache/images/59d7550a10becda8cc047fc8233070b2.jpg', alt: 'Glebe', title: 'Glebe' };
smallSponsors[30]['url'] = { href: 'http://www.myspace.com/theglebelive' };
smallSponsors[31] = new Array();
smallSponsors[31]['image'] = { src: 'cache/images/a727fd56213467c3eacbc3a13767cdf9.JPG', alt: 'DJ School', title: 'DJ School' };
smallSponsors[31]['url'] = { href: 'http://www.axisfestival.co.uk' };
smallSponsors[32] = new Array();
smallSponsors[32]['image'] = { src: 'cache/images/d4a90e8297ab0cfccacd29f027a39581.jpg', alt: 'Richer Sounds', title: 'Richer Sounds' };
smallSponsors[32]['url'] = { href: 'http://www.richersounds.com' };
smallSponsors[33] = new Array();
smallSponsors[33]['image'] = { src: 'cache/images/fab7b65374122c9fe2e18743f12d3cc4.jpg', alt: 'front line dance', title: 'front line dance' };
smallSponsors[33]['url'] = { href: 'http://www.frontlinedance.org.uk' };
smallSponsors[34] = new Array();
smallSponsors[34]['image'] = { src: 'cache/images/0117b2f03ace01a458cc0ef28f8bf12f.jpg', alt: 'Webberleys', title: 'Webberleys' };
smallSponsors[34]['url'] = { href: 'http://www.webberleys.entadsl.com/' };
smallSponsors[35] = new Array();
smallSponsors[35]['image'] = { src: 'cache/images/a1117c4de7850ffcc25aad2fca8ae4cd.JPG', alt: 'Stoke on Trent College', title: 'Stoke on Trent College' };
smallSponsors[35]['url'] = { href: 'http://www.stokecoll.ac.uk/' };
smallSponsors[36] = new Array();
smallSponsors[36]['image'] = { src: 'cache/images/79cf142104457f16c464166195ba5340.jpg', alt: 'Inspired Film and Videp', title: 'Inspired Film and Videp' };
smallSponsors[36]['url'] = { href: 'http://www.inspiredfilmandvideo.co.uk' };
smallSponsors[37] = new Array();
smallSponsors[37]['image'] = { src: 'cache/images/d0348957b7a78dc7eb2db2cfaf2dc2cf.jpg', alt: 'Letting in the Light', title: 'Letting in the Light' };
smallSponsors[37]['url'] = { href: 'http://www.lettinginthelight.org.uk/' };
smallSponsors[38] = new Array();
smallSponsors[38]['image'] = { src: 'cache/images/b5d0ff1297520fcf3bf27a7cb0f74211.jpg', alt: 'Denise OSullivan', title: 'Denise OSullivan' };
smallSponsors[38]['url'] = { href: 'http://www.deniseosullivan.co.uk' };
smallSponsors[39] = new Array();
smallSponsors[39]['image'] = { src: 'cache/images/a7c0bfa0389cab08d7815c7ccdfa3db0.JPG', alt: 'Groove Academy', title: 'Groove Academy' };
smallSponsors[39]['url'] = { href: 'http://www.grooveacademy.co.uk' };
smallSponsors[40] = new Array();
smallSponsors[40]['image'] = { src: 'cache/images/c5cffa02852829a5ab5482d4a01d3835.jpg', alt: 'Love Music Hate Racism', title: 'Love Music Hate Racism' };
smallSponsors[40]['url'] = { href: 'http://www.lovemusichateracism.com' };
smallSponsors[41] = new Array();
smallSponsors[41]['image'] = { src: 'cache/images/b8a7939feea59d335feb801575a975e9.jpg', alt: 'Junction 15', title: 'Junction 15' };
smallSponsors[41]['url'] = { href: 'http://www.junction15.com' };
smallSponsors[42] = new Array();
smallSponsors[42]['image'] = { src: 'cache/images/5ec800099737a1f680fe266ac3e574f2.JPG', alt: 'Burslem Fringe', title: 'Burslem Fringe' };
smallSponsors[42]['url'] = { href: 'http://www.axisfestival.co.uk' };
smallSponsors[43] = new Array();
smallSponsors[43]['image'] = { src: 'cache/images/2f26f1c203940810c2b87fb668fd55b7.jpg', alt: 'Stage Coach', title: 'Stage Coach' };
smallSponsors[43]['url'] = { href: 'http://www.stagecoachbus.com' };
smallSponsors[44] = new Array();
smallSponsors[44]['image'] = { src: 'cache/images/7d6d4e40490690be8e22da42d4d0585a.jpg', alt: 'Soul Monkey', title: 'Soul Monkey' };
smallSponsors[44]['url'] = { href: 'http://www.soulmonkey.co.uk/' };
smallSponsors[45] = new Array();
smallSponsors[45]['image'] = { src: 'cache/images/c7ae40cf1f9c71c7c7e3da1fb8e9a88c.jpg', alt: 'Rotten Park', title: 'Rotten Park' };
smallSponsors[45]['url'] = { href: 'http://lynne.mcconnell@hotmail.co.uk' };
smallSponsors[46] = new Array();
smallSponsors[46]['image'] = { src: 'cache/images/a5ff0e6face9837feb7a72e690ca5d14.jpg', alt: 'future finest', title: 'future finest' };
smallSponsors[46]['url'] = { href: 'http://www.finest.org.uk' };

// Settings
var largeSponsorsOptions = new Object();
largeSponsorsOptions.fadeTime = 1000;		// Fade timer in miliseconds
largeSponsorsOptions.displayTime = 20000;	// Minimum display time for each sponsor
largeSponsorsOptions.extraTime = 0;			// Maximum for random extra time added to the display time (to prevent perfect syncing banners, looks daft

var mediumSponsorsOptions = new Object();
mediumSponsorsOptions.fadeTime = 1000;		// Fade timer in miliseconds
mediumSponsorsOptions.displayTime = 10000;	// Minimum display time for each sponsor
mediumSponsorsOptions.extraTime = 0;		// Maximum for random extra time added to the display time (to prevent perfect syncing banners, looks daft

var smallSponsorsOptions = new Object();
smallSponsorsOptions.fadeTime = 1000;		// Fade timer in miliseconds
smallSponsorsOptions.displayTime = 5000;	// Minimum display time for each sponsor
smallSponsorsOptions.extraTime = 0;			// Maximum for random extra time added to the display time (to prevent perfect syncing banners, looks daft

// Initialisation
largeSponsorsOptions.sponsorsCounter = 0;
largeSponsorsOptions.totalSponsors = largeSponsors.length;
largeSponsorsOptions.currentSponsor = 0;
mediumSponsorsOptions.sponsorsCounter = 0;
mediumSponsorsOptions.totalSponsors = mediumSponsors.length;
mediumSponsorsOptions.currentSponsor = 0;
smallSponsorsOptions.sponsorsCounter = 0;
smallSponsorsOptions.totalSponsors = smallSponsors.length;
smallSponsorsOptions.currentSponsor = 0;

function rand(limit)
{
	return Math.ceil(limit * Math.random());
}

function updateSponsor(sponsors, container, options)
{
	// WARNING: Can go wrong, multithreading wise!
	sponsor = sponsors[options.currentSponsor];
	options.currentSponsor = (options.currentSponsor + 1) % options.totalSponsors;

	container.hide();
	container.children('a').attr(sponsor['url']).children('img').attr(sponsor['image']);
	container.fadeIn(options.fadeTime, function() {
		$(this).animate({opacity: 1.0}, options.displayTime + rand(options.extraTime)).fadeOut(options.fadeTimer, function() {
			updateSponsor(sponsors, container, options);
		});
	});
}

$(document).ready(function() {
	$('#largeSponsors div').each(function() {
		updateSponsor(largeSponsors, $(this), largeSponsorsOptions);
	});
	$('#mediumSponsors div').each(function() {
		updateSponsor(mediumSponsors, $(this), mediumSponsorsOptions);
	});
	$('#smallSponsors div').each(function() {
		updateSponsor(smallSponsors, $(this), smallSponsorsOptions);
	});
});
