function MakeBorder(imgName) {
	imgName	= (imgName!='')?('_'+imgName):'';
	$jq('.swaper'+imgName).each(function(index) {
		sr = $jq(this).attr('src');
		
		$jq(this).attr({'src':'/templates/prosmebel/img/rama'+imgName+'.gif'});
		$jq(this).css('background','url('+sr+') top center no-repeat #fff');
	});
	
}

window.addEvent('domready', function() {
	MakeBorder('section');
	MakeBorder('preview');
	MakeBorder('catalog');
	MakeBorder('design');
	MakeBorder('info');
	MakeBorder('upholst');
	MakeBorder('color');
	MakeBorder('cart');
	MakeBorder('seat');
	MakeBorder('size');	
	MakeBorder('seat_preview');	
	MakeBorder('n');	
	MakeBorder('');	
	MakeBorder('news');	
	MakeBorder('portfolio');	
	MakeBorder('portfoliobig');	
	MakeBorder('portfolioletter');	



	/*
	$$('ul.section_list a img').each( function(el) {
		el.addEvents({
			'mouseover': function(){ this.set( 'src', '/templates/prosmebel/img/rama_section_on.gif'); },
			'mouseout': function(){ this.set( 'src', '/templates/prosmebel/img/rama_section.gif'); }
		});
	});
	*/
	$$('ul.upholst_list a img').each( function(el) {
		el.addEvents({
			'mouseover': function(){ this.set( 'src', '/templates/prosmebel/img/rama_upholst_on.gif'); },
			'mouseout': function(){ this.set( 'src', '/templates/prosmebel/img/rama_upholst.gif'); }
		});
	});
	/*
	$$('ul.modul_list a img').each( function(el) {
		el.addEvents({
			'mouseover': function(){ this.set( 'src', '/templates/prosmebel/img/rama_modul_on.gif'); },
			'mouseout': function(){ this.set( 'src', '/templates/prosmebel/img/rama_modul.gif'); }
		});
	});
	*/
	$$('ul.seat_preview_list a img').each( function(el) {
		el.addEvents({
			'mouseover': function(){ this.set( 'src', '/templates/prosmebel/img/rama_seat_preview_on.gif'); },
			'mouseout': function(){ this.set( 'src', '/templates/prosmebel/img/rama_seat_preview.gif'); }
		});
	});
	
	$$('ul.news_list a img').each( function(el) {
		el.addEvents({
			'mouseover': function(){ this.set( 'src', '/templates/prosmebel/img/rama_news_on.gif'); },
			'mouseout': function(){ this.set( 'src', '/templates/prosmebel/img/rama_news.gif'); }
		});
	});
	
	$$('ul.catalog_list a img').each( function(el) {
		el.addEvents({
			'mouseover': function(){ this.set( 'src', '/templates/prosmebel/img/rama_catalog_on.gif'); },
			'mouseout': function(){ this.set( 'src', '/templates/prosmebel/img/rama_catalog.gif'); }
		});
	});
	
	$$('ul.design_offices_list a img').each( function(el) {
		el.addEvents({
			'mouseover': function(){ this.set( 'src', '/templates/prosmebel/img/rama_design_on.gif'); },
			'mouseout': function(){ this.set( 'src', '/templates/prosmebel/img/rama_design.gif'); }
		});
	});
	
});
