var createObject = function(o){
	var items = $(o.items) || '',
		controler = $(o.controler) || '',
		current = o.current || 'current',
		duration = o.duration || 4000,
		speed = o.speed || 'fast';

	this.change = function(){

		items.eq(0).css("display","block");

		setInterval(function () {
			var temNum;
			controler.each(function (i,n) {
				if ($(this).hasClass(current))	{
					temNum=i;
				}
			})			
			controler.eq(temNum).removeClass();			
			if (temNum==controler.length-1)	{
				temNum=-1;
			}
			controler.eq(temNum+1).addClass(current);

			items.each(function () {
				items.hide(speed);
			});

			items.eq(temNum+1).show(speed);
		},duration)

		controler.click(function () {
			controler.each(function () {
				$(this).removeClass();
			})
			$(this).addClass(current);

			var layerNum;

			controler.each(function (i,n) {
				if ($(this).hasClass(current))	{
					layerNum=i;
				}
			})

			items.each(function () {
				items.hide(speed);	
			})

			items.eq(layerNum).show(speed);

			return false;
		});
	}

	return this;
}