function EvenGorImgInC()
{
	IMGtoLightBox();
	//EventoLink();
}

function z()
{
	tab = $('content').getElements('a[class=toLightbox]');
}

function filter(l)
{
	return (l.replace('/small/','/middle/')).replace('s.gif','m.jpg') ;
}

function f(o){
	tab = $('content').getElements('a[class=toLightbox]');
	a = o.getParent();
	var col = Array();
	
	for( i=0 ; i<tab.length ; i++ )
		if( tab[i].rel == a.rel )
			col[col.length] = [tab[i].getChildren()[0]] ;
	
	j=0;	
	for( i=0 ; i<col.length ; i++ )
	{
		
		if( col[i][0].src == o.src )
			j=i;
		
		col[i][0] = filter( col[i][0].src );
	}	
	parent.s( col, j);
}

function EventoLink()
{
	tab = $('link').getElements('a');

	tab.each(function(item){
		item.setStyle('opacity', 0.8);
		item.addEvents(
		{
		    'mouseover': function(){
				this.setStyle('opacity','1');
		    },
		    'mouseout': function(){
				this.setStyle('opacity','0.8');
		    }
		});
	});
}

function IMGtoLightBox()
{
	tab = $('content').getElements('a[class=toLightbox]');
	var el;
	tab.each(function(item){
		el = item.getElements('img');
		el.setStyle('opacity', 0.8);
		el.setStyle('border-color','#e7e0ce');
		el.addEvents(
		{
		    'mouseover': function(){
				this.setStyle('border-color','black');
				this.setStyle('opacity','1');
		    },
		    'mouseout': function(){
				this.setStyle('border-color','#e7e0ce');
				this.setStyle('opacity','0.8');
		    }
		});
	});
}

function IMGtoLightBoxInFrame()
{
	tab = $('content').getElements('a[class=toLightbox]');
	tab.addEvent('click', function(event){
		if (event.target.tagName == 'IMG')
			f( event.target );
	});
}

function EvenForIMG()
{
	$('alb').getElements('img').addEvents(
	{
	    'mouseover': function(){
			this.setStyle('border-color','black');
			this.setStyle('opacity','1');
	    },
	    'mouseout': function(){
			this.setStyle('border-color','#e7e0ce');
			this.setStyle('opacity','0.8');
	    }
	});
}
