
		function init_gallery (galleryMaxImages, galleryContent) {

			/**************** Begin Variables ****************/ 
			var maxGalleryImages = galleryMaxImages; // imagenes a mostrar por tira
			--maxGalleryImages;
			var actualFirst = $(galleryContent).getElement('a.first'); // primer imagen que se muestra de la lista
			var actualLast = $(galleryContent).getElement('a.last'); // ultima imagen que se muestra de la lista
			var imageList = $(galleryContent).getElements('.photo-gallery-content-container a');
			var imageContainer = $(galleryContent).getElement('.photo-gallery-content-container');
			var flechaLeft = $(galleryContent).getElement('a.gallery-prev'); //$$('#'+galleryContent+' a.gallery-prev');
			var flechaRight = $(galleryContent).getElement('a.gallery-next'); //$$('#'+galleryContent+' a.gallery-next');
			/**************** End Variables ****************/

			/******************** Begin Galeria *******************/
			if ($(galleryContent) && (imageList.length > 0))
			{
	
				// seteo el width de la tira de imagenes de acuerdo a la cantidad de imagenes y el width de cada una
				//$(galleryContent).getFirst('div').setStyle('width', eval($$('#'+galleryContent+' a').length*($$('#'+galleryContent+' a.first')[0].getStyle('width').toInt()+$$('#'+galleryContent+' a.first')[0].getStyle('margin-right').toInt()))+'px');
				$(galleryContent).getElement('.photo-gallery-content-container').setStyle('width', '99999px').setStyle('z-index', '-2');
				
				// deshabilito la flecha de prev/next si estoy en la primer/ultima imagen
				flechaLeft.getFirst().setStyle('height', ((imageList.length <= maxGalleryImages) || (actualFirst.getAllPrevious().length == 0))? 0 : '22px'); 
				flechaRight.getFirst().setStyle('height', (((imageList.length <= maxGalleryImages)) || (actualLast.getAllNext('a').length == 0))? 0 : '22px'); 

				var scrollFeaturedList = new Fx.Scroll($(galleryContent).getElement('.photo-gallery-content') , {
					wait: false,
					duration: 700,
					transition: Fx.Transitions.Quad.easeInOut
				});
		
				// muevo la galeria para atras
				flechaLeft.addEvent('click', function(ev) {
					new Event(ev).stop();
					
					actualFirst.removeClass('first');
					actualLast.removeClass('last');
					for (var i = 0; i <= maxGalleryImages && actualFirst.getAllPrevious().length > 0; i++, actualFirst = actualFirst.getPrevious(), actualLast = actualLast.getPrevious()) ;
		 	
					// seteo las clases de first/last
					actualFirst.addClass('first');
					actualLast.addClass('last');
	
					// scrolleo hasta el elemento
					scrollFeaturedList.toElement(actualFirst);
	
					// muestro o quito la flecha de acuerdo si es el primero o el ultimo
	 				flechaRight.getFirst().setStyle('height', '22px'); 
	 				flechaLeft.getFirst().setStyle('height', (actualFirst.getAllPrevious().length == 0)? 0 : '22px'); 
				});
	
				// muevo la galeria para adelante
				flechaRight.addEvent('click', function(ev) {
					new Event(ev).stop();

					actualFirst.removeClass('first');
					actualLast.removeClass('last');
	
					for (	var i = 0; 
								i <= maxGalleryImages && actualLast.getAllNext().length > 0 && actualLast.getNext('a') != null && actualFirst.getNext('a') != null; 
								i++, actualFirst = actualFirst.getNext(), actualLast = actualLast.getNext()) ;
	
					// seteo las clases de first/last
					actualFirst.addClass('first');
					actualLast.addClass('last');
					
					// scrolleo hasta el elemento
					scrollFeaturedList.toElement(actualFirst);
	
					// muestro o quito la flecha de acuerdo si es el primero o el ultimo
	 				flechaLeft.getFirst().setStyle('height', '22px'); 
	 				flechaRight.getFirst().setStyle('height', (actualLast.getAllNext('a').length == 0)? 0 : '22px'); 
				});
	
			}
			/******************** End Galeria *********************/
		}
