var bingoGames =[{src:"loughborough.png",gametype:"bingo",gamedesc:"&bull; 90 Ball<br/>&bull; Jackpots<br/>&bull; Advance Purchase"},
					{src:"cricklewood.png",gametype:"bingo",gamedesc:"&bull; Multi Variant<br/>&bull; Jackpots"},					
					{src:"american75.png",gametype:"bingo",gamedesc:"&bull; 75 Ball<br/>&bull; Jackpot<br/>&bull; Advance Purchase"},
					{src:"express.png",gametype:"bingo",gamedesc:"&bull; Speed Bingo<br/>&bull; 90 Ball<br/>&bull; Shorter game times = More prizes<br/>&bull; Jackpots<br/>&bull; Advance Purchase"},
					{src:"party80.png",gametype:"bingo",gamedesc:"&bull; 80 Ball<br/>&bull; Jackpots<br/>&bull; Advance Purchase"}];

var slotsGames =[{src:"Bouncy_Balls.jpg",gametype:"SA",gamedesc:"&bull; Match and explode 5 or more of the Bouncy Ball characters to win!!"},
				{src:"Lucky_Ladies_88.jpg",gametype:"SA",gamedesc:"&bull; For all those Bingo fans out their who want to take their favourite game to a new format!<br/>&bull; 5 Reel 9 Line Slot<br/>&bull; Bonus Round<br/>&bull; Progressive Jackpot"},
				{src:"Tarot_Fortune.jpg",gametype:"SA",gamedesc:"&bull; Do the mystical cards hold a fortune for your future?<br/>&bull; 5 Reel 15 Line Slot<br/>&bull; Bonus Round<br/>&bull; Free Spins<br/>&bull; Progressive Jackpot"},
				{src:"Marine_Mayhem_Mini.jpg",gametype:"SA",gamedesc:"&bull; A single player version of the underwater extravaganza!<br/>&bull; 5 Reel 20 Line Slot<br/>&bull; Progressive Jackpot"},
				{src:"Pet_Luck.jpg",gametype:"SA",gamedesc:"&bull; All your favourites are here...and in this case Pets win Prizes!<br/>&bull; 5 Reel 5 Line Slot<br/>&bull; Progressive Jackpot"},
				{src:"Cleopatras_Chest.jpg",gametype:"SA",gamedesc:"&bull; Take a trip to Ancient Egypt and attempt to uncover Cleopatra’s secret treasure!<br/>&bull; 5 Reel 15 Line Slot<br/>&bull; Progressive Jackpot"},
				{src:"Snow_Queens_Magic.jpg",gametype:"SA",gamedesc:"&bull; Can you overcome the Snow Queen and take her precious prizes?<br/>&bull; 5 Reel 9 Line Slot<br/>&bull; Progressive Jackpot"},
				{src:"Pirate_Plunder.jpg",gametype:"SA",gamedesc:"&bull; Arrggghhh matey! Can you defeat the pirates and take their booty for yourself?<br/>&bull; 5 Reel 15 Line Slot<br/>&bull; Progressive Jackpot"},
				{src:"Thors_Thunder.jpg",gametype:"SA",gamedesc:"&bull; Hammer your way to Victory!<br/>&bull; 5 Reel 20 Line Slot<br/>&bull; Bonus Round<br/>&bull; Progressive Jackpot"},
				{src:"Jungle_Madness.jpg",gametype:"SA",gamedesc:"&bull; Win some mighty prizes in the Jungle!<br/>&bull; 5 Reel 20 Line Slot<br/>&bull; Bonus Round<br/>&bull; Progressive Jackpot"},
				{src:"Mayan_Mania.jpg",gametype:"SA",gamedesc:"&bull; Explore the ancient civilisation of the Mayans and find their lost prizes!<br/>&bull; 5 Reel 20 Line Slot<br/>&bull; Bonus Round<br/>&bull; Progressive Jackpot"},
				{src:"Hollywood_Boulevard.jpg",gametype:"SA",gamedesc:"&bull; Get your piece of fame and fortune in this star studded town!<br/>&bull; 5 Reel 20 Line Slot<br/>&bull; Free Spins<br/>&bull; Progressive Jackpot"},
				{src:"Big_Top_Tombola.jpg",gametype:"SA",gamedesc:"&bull; Roll up and relive all the fun of the fair with big prizes on offer!<br/>&bull; 5 Reel 20 Line Slot<br/>&bull; Bonus Round<br/>&bull; Progressive Jackpot"},
				{src:"Ladies_Leisure.jpg",gametype:"SA",gamedesc:"&bull; The ultimate game for ‘Ladies who Lunch’ who want to finance their next shopping spree!<br/>&bull; 5 Reel 5 Line Slot<br/>&bull; Bonus Round"},
				{src:"Mafia_Millions.jpg",gametype:"SA",gamedesc:"&bull; Cops and Cash –Dames and Dough! Transport yourself back to 1920’s America and win some of the Mafia’s haul for yourself!<br/>&bull; 5 Reel 20 Line Slot<br/>&bull; Free Spins<br/>&bull; Progressive Jackpot"},
				{src:"Fruit_and_Veg.jpg",gametype:"SA",gamedesc:"&bull; The fruit and veg are running wild – match them up to win big!<br/>&bull; 3 Reel 1 line slot<br/>&bull; Holds and Nudges"},
				{src:"Atlantis.jpg",gametype:"roomgame",gamedesc:"&bull; Discover the lost world of Atlantis and it's secret hidden treasures!<br/>&bull; 5 Reel 5 Line Slot<br/>&bull; Bonus Round"},
				{src:"BarX.jpg",gametype:"SA",gamedesc:"&bull; The traditional slot machine with use of the Bar-X brand!<br/>&bull; 3 Reel 1 Line slot<br/>&bull; Holds and Nudges"},
				{src:"Pharaohs_Gold.jpg",gametype:"roomgame",gamedesc:"&bull; Don't tell mummy you're after the gold!<br/>&bull; 3 Reel 1 Line slot"},
				{src:"Fruitopia.jpg",gametype:"roomgame",gamedesc:"&bull; A fruity with some juicy prizes on offer!<br/>&bull; 3 Reel 1 Line slot"},
				{src:"Slots_N_Robbers.jpg",gametype:"roomgame",gamedesc:"&bull; Get past these classic characters to make away with the bag of swag!<br/>&bull; 3 Reel 1 Line slot"},
				{src:"Vegas_Veg.jpg",gametype:"roomgame",gamedesc:"&bull; Who needs 5-a-day when you can match 3 and win!<br/>&bull; 3 Reel 1 Line slot"},
				{src:"Clover_Rollover.jpg",gametype:"SA",gamedesc:"&bull; See how much you can win with the luck of the Irish!<br/>&bull; 5 Reel 5 Line Slot<br/>&bull; Progressive Jackpot"},
				{src:"Celebrity_Big_Brother.jpg",gametype:"SA",gamedesc:"Mingle with celebs and win big in this slot based on the hit reality TV show Celebrity Big Brother"}];

var scratchCards = [{src:"Arabian_Delights.jpg",gametype:"SA",gamedesc:"&bull; Discover the delights of the desert!<br/>&bull; Match any 3 Icons Scratchcard<br/>&bull; Progressive Jackpot"},
					{src:"Beachside_Bonanza.jpg",gametype:"SA",gamedesc:"&bull; Have some fun in the sun!<br/>&bull; Match any 3 Icons Scratchcard<br/>&bull; Progressive Jackpot"},
					{src:"Beat_The_Bank.jpg",gametype:"SA",gamedesc:"&bull; Beat the 'Credit Crunch'!<br/>&bull; Match any 3 Icons Scratchcard<br/>&bull; Progressive Jackpot"},
					{src:"Big_Bounty.jpg",gametype:"SA",gamedesc:"&bull; Claim a reward in the Wild West!<br/>&bull; Match any 3 Icons Scratchcard"},
					{src:"Bingo_Scratch.jpg",gametype:"roomgame",gamedesc:"&bull; For all those Bingo fans out their who want to take their favourite game to a new format!"},
					{src:"Cops_N_Robbers.jpg",gametype:"roomgame",gamedesc:"&bull; Match up these classic characters to make away with the bag of swag!"},
					{src:"Ladies_Night.jpg",gametype:"SA",gamedesc:"&bull; Limo’s and Champagne -Win big and fund that ultimate night out!"},
					{src:"Winning_Match.jpg",gametype:"roomgame",gamedesc:"&bull; Create more excitement than match of the day, by winning with our football theme!"},
					{src:"Big_Brother_Quick_Scratch.jpg",gametype:"SA",gamedesc:"&bull; A great scratchcard based on the Big Brother reality TV show!"},
					{src:"Golden_Balls_Quick_Scratch.jpg",gametype:"SA",gamedesc:"&bull; Win big with this scratchcard based on the hit TV show Golden Balls!"},
					{src:"Deal_Or_No_Deal_Quick_Scratch.jpg",gametype:"SA",gamedesc:"&bull; Match up the cash amounts to win big in this scratchcard based on the hit TV game show Deal or No Deal!"}];      

var numbersGames = [{src:"Chickeno.jpg",gametype:"roomgame",gamedesc:"&bull; Predict the eggs to be laid and you could be having bigger breakfasts from now on!"},
					{src:"Crystal_Balls.jpg",gametype:"roomgame",gamedesc:"&bull; Think you can predict what will happen in a game of Bingo?! Then put your skills to the test!"},
					{src:"Deal_Or_No_Deal_Classic.jpg",gametype:"SA",gamedesc:"&bull; Play this great version of the popular TV game show!"}];

var casinoGames = [{src:"Blackjack.jpg",gametype:"SA",gamedesc:"&bull; The aim is simple –get closer to 21 than the dealer without going bust! A timeless casino classic!"},
					{src:"Mini_Roulette.jpg",gametype:"SA",gamedesc:"&bull; Guess where it lands and you could be walking away with some big prizes! Another casino classic!"}];


function displayGames(gamesList, containerId, gameFolder){
	var containerObj = document.getElementById(containerId);
	
	for(var i in gamesList){
		var holder = document.createElement('div');
		holder.className = 'gameHolder';
		
		var gameLink = document.createElement('a');
		gameLink.className = 'roundedBorder';
		var gametype = gamesList[i].gametype;
		if(gametype == 'SA'){
			var src = gamesList[i].src;
			var gamename= src.substr(0, src.indexOf('.'));			
			var game = gamename.split('_');
			
			gameLink.alt = game.join(' ');
			gameLink.title = game.join(' ');
			
			var saGameName = game.join(' ') +' SA';
			var saWindowName =  game.join('') +'SAWindow';
			
			gameLink.href="javascript:openSizedOnlineGamesPage('"+saGameName+"', '', 'optionalParamA', 765, 560, '"+saWindowName+"');";
			
		} else if(gametype == 'bingo'){
			gameLink.href = "javascript:openOnlineGamesPage('Bingo', '', '', 'true');";
		} else if(gametype == 'roomgame'){
      			var src = gamesList[i].src;
			var gamename= src.substr(0, src.indexOf('.'));			
			var game = gamename.replace(/_/g,' ');
			
      			gameLink.href = "javascript:openOnlineGamesPage('Bingo', '', '', 'true', '"+game+"');";
    		}
		
		holder.appendChild(gameLink);
		
		var gameThumb = document.createElement('img');
		gameThumb.src='images/games/'+gameFolder+'/'+gamesList[i].src;
		gameThumb.className='gameThumbNails';
		
		var gameSrc = gamesList[i].src;
		
		holder.appendChild(gameThumb);
		var descSpan = document.createElement('span');
		descSpan.className = 'gameDesc';
		
		descSpan.innerHTML = gamesList[i].gamedesc;
		holder.appendChild(descSpan);
		
		containerObj.appendChild(holder);		
	}

}
