var GA = {						
	currIndex:0,						// index of current image
	imgArray:[], 
	objXML:null,
	tipologia:'',
	isFirstImage:true
};	

/*** set up the vars ***/
GA.loadGallery = function(_objXML, _tipologia){
	CO.objXML = _objXML
	CO.currIndex = 0;
	CO.imgArray = [];
	CO.tipologia = _tipologia;
	CO.isFirstImage = true;
	
	$(objXML).find('prodotto').each(function(){
		var i = {};
		i.nome = $(this).attr('nome');
		i.thumb = $(this).attr('thumb');
		CO.collezioneArray.push(i);
	});
	
};

/*** create the DOM elements ***/
GA.startInterface = function(){
	
}

/*** create the secondary menu ***/
GA.createSecondaryMenu = function(){
	var list = $('<ul></ul>');
	/*$(CO.objXML).find('tipologia').each(function(){
		$('<li><a href="' + lang + '/collections/' + $(this).attr("id") + '.html" id="' +  $(this).attr('id') + '-link">' + $(this).attr('id') + '</a></li>').appendTo(list);
		$('<li class="divider"></li>').appendTo(list);
		//console.log( $(this).attr("id"));
	});
	$('<nav class="secondaryMenu"></nav>')
		.appendTo($('#collections .secondaryMenuDiv'))
		.append(list);*/
		
	
};

/*** create the thumbnails in the bottom left ***/
GA.createThumbs = function(){
	
}

/*** load the main image ***/
GA.loadImg = function(imgToLoad){
	/*var div = $('#collections .container');
	var src = imgToLoad;
	var img = new Image();
	
	// wrap our new image in jQuery, then:
	$(img)
		.load(function () { 
			CO.imageLoaded = true;
			$(this).hide();
			$(this).addClass('fullHeight');					
							 
			$(div).append(this);
			
			//PO.doResize();						// resize the newly-loaded image
			$(this).fadeIn(1000, function(){
				$(this).parent().find('img.fullscreen').not(':last').remove();			  
			});				// animate in the image
			
		})		
		.error(function () {
					// notify the user that the image could not be loaded
		})
		.attr('src', src);*/
}

/*** show the loader if it's the first image ***/
GA.showLoader = function(bool){
	if(bool){
		// show loader	
	}else{
		// hide loader	
	}
}

/*** load the tech details ***/
GA.showDettagliTecnici = function(bool){
	
}

/*** show the tech drawings ***/
GA.showDisegniTecnici = function(bool){
	
}

/*** download pdf with tech info ***/
GA.getSchedaTecnica = function(){
	
}

/*** enable/disable click on thumbnails ***/
GA.enableThumbs = function(bool){
	
}

