/// *** 

var plg_Slideshow_photos = function(o){
	
	this.TransformerSimple = function (){};
	var TransformerSimple_Proto = {
		def			: {link:'', src:MEDIA_DOMAIN+'/addons/common/pics/dummy.gif',imgId:'',userName:''},
		transform	: function(item, data){
			this.data = data;
			this.carousel.log('transform', item, data);
			$('img', item).attr('src',this.empty('src'));
			$('img', item).attr('id', this.empty('imgId'));
			$('img', item).attr('alt', this.empty('userName'));
			$('a', item).attr('href',this.empty('link'));
			$('.thumb_bookmark span', item).html(this.empty('title'));
			
			return item;
		}
	};
	$.extend(this.TransformerSimple.prototype, TransformerBaseProto, TransformerSimple_Proto);	
	
	var carouselParams = {
		container			: $('.gal_slide.plg_slideshow_photos'),
		ajax				: {method:'plg_slideshow_photos::getData'},
		button				: {
			next				: '.btn_next',
			prev				: '.btn_prev'
		},
		items				: {
			left	:2,
			visible	:4,
			right	:2
		},		
		list				: 'div.linex',
		itemTpl				: '.tpl .item',
		transformer			: new this.TransformerSimple(),
		debugmode			: false,
		
		'null'				: null
	};
	try{
		this.carousel = new Carousel(carouselParams);
	}catch(e){
		console.log(e);
	}
};
plg_Slideshow_photos.prototype = {
	carousel	:null
};

$(function(o){
	window.plg_slideshow_photos = new plg_Slideshow_photos(o);
})