/*
	Global UI Object
	Please check the other files starting with ui_ to see its extended functionality
	Currently UI is broken down into 4 sections
		GUI - Major UI tools such as dialogues, buttons, etc.
		Animation - Code pertaining to animations
		Game - Code for updating the game board, and related objects
		Interface - All touch related wizardry. Generally pertaining to the game board
*/

var UI = {};

UI.Init = function()
{
	//var isFull = window.navigator.standalone;
	// For Debugging only
	var isFull = true;
	
	if(isFull)
	{
		UI.Cache();
		var el = $('bookmarkCheck');
		el.innerHTML = '';
		$('home').className = 'contentPage full';
		
		var startGame = UI.GUI.Button('introGame');
		
		startGame.innerHTML = 'let\'s get it on!';
		
		startGame.addEventListener('click',tempFunction,true);
		window.scrollTo(0,1);
		el.appendChild(startGame);

	}
	/*else*/

	
//	UI.GUI.Dialogue.create({ message:isFull,confirm:'Be Gone',cancel:'Gone!'},function(){ return; });
//	tempFunction();
};

UI.Cache = function()
{
	UI.Assets = {};
	// Piece Caching
	UI.Assets.pieces = new Array;
	UI.Assets.pieces[0] = new Image;
	UI.Assets.pieces[0].src='assets/pieces/color0.png';
	UI.Assets.pieces[1] = new Image;
	UI.Assets.pieces[1].src='assets/pieces/color1.png';
	UI.Assets.pieces[2] = new Image;
	UI.Assets.pieces[2].src='assets/pieces/color2.png';
	UI.Assets.pieces[3] = new Image;
	UI.Assets.pieces[3].src='assets/pieces/color3.png';
	UI.Assets.pieces[4] = new Image;
	UI.Assets.pieces[4].src='assets/pieces/color4.png';

	UI.Assets.bodyBack = new Image;
	UI.Assets.bodyBack.src='assets/components/body.jpg';
	
	UI.Assets.hudBack = new Image;
	UI.Assets.hudBack.src='assets/components/hudBack.gif';

	UI.Assets.availableImg = new Image;
	UI.Assets.availableImg.src = 'assets/components/available.png';

	UI.Assets.dBoxBack = new Image;
	UI.Assets.dBoxBack.src = 'assets/components/dialogueBack.png';

	UI.Assets.dBoxBtn1 = new Image;
	UI.Assets.dBoxBtn1.src = 'assets/components/btnDefault.png';

	UI.Assets.dBoxBtn2 = new Image;
	UI.Assets.dBoxBtn2.src = 'assets/components/btnPressed.png';
};