
		var sections = 0;
		var imageWidth = 0;
		var interval = 2000; //miliseconds
		
		var l = 0;
		
		
		function w(t){ $('#inner-quote').html(t)}

		
		function showNext(section, random) {
			
			//alert(imageWidth);
			
			container = $(sections).eq(section).find('ul.container');
			l = container.position().left;
			
			
			if(l <= -1 * imageWidth * ($(sections).eq(section).find('li').length-1)) {
				/*container.animate({left:(l-10)}, 200, function(){
					$(this).animate({left:(l)}, 200);
				});// alert('capat');*/
				if(random==false) showPrev(section, random);
			} else {
				newL = l-imageWidth;
				container.animate({left:(newL)}, interval);
			}
			
			
			
			
			//w(' go next: '+l);
		}
		
		function showPrev(section, random) {
			
			container = $(sections).eq(section).find('ul.container');
			l = parseInt(container.position().left);
			
			
			if(l >= 0) {
				/*container.animate({left:10}, 200, function(){
					$(this).animate({left:0}, 200);
				});// alert('capat');*/
				if(random==false) showNext(section, random);
			} else {
				newL = parseInt(l)+parseInt(imageWidth);
				container.animate({left:(newL)}, interval);
			}
		
			//w(' go prev: '+l);
		}

		function slideShow(section, random) {
			
			if(random == null || random == true) {
				if(Math.random()>0.5) showNext(section);
				else showPrev(section);
			} else showNext(section, random);
			
			
			setTimeout('slideShow('+section+', '+random+')', interval*2);
		}
$(window).load(function() {
//$(document).ready(function(){

						
		
		sections = $('.tab-romprest .subcontent a.image');
		imageWidth = sections.find('li').eq(0).width();
		
		
		
		sections.each(function(){
			containerWidth = $(this).find('img').length * imageWidth;
			$(this).find('ul.container').css({width:containerWidth});
			$(this).find('ul.container li').css('width', imageWidth+'px');
		});
		
		
		var random = true;	// using 
		
		setTimeout('slideShow(0, '+random+')', interval);
		setTimeout('slideShow(1, '+random+')', interval*2);
		setTimeout('slideShow(2, '+random+')', interval*3);
		setTimeout('slideShow(3, '+random+')', interval*4);
		
		
		
		
		
		});