$(document).ready(function() {
(function() {
	$.fn.scrolling = function(settings) {
		settings = jQuery.extend(
			{
				step : 1,
				time : 15
			}, settings
		);
		return $(this).each(function() {
			var o = $(this);
			var ul = o.find('ul');
			var w = 0;
			ul.find('li').each(function() {
				w += $(this).outerWidth() + 4;
			});
			var text = ul.html();
			ul.html(text+text+text);
			var k = true;
			o.hover(
				function() {
					k = false;
				},
				function() {
					k = true;
				}
			);
			
			var left = 0;
			function animate() {
				if (k) {
					left += settings.step;
					if (left >= w) left = settings.step;
					o.scrollLeft(left);	
				}
			}
			var stream = window.setInterval(animate, settings.time);
		});
	}
})(jQuery);


$('#scrollable').find('img').each(function() {
tt = Math.round(parseFloat((177-($(this).width()))/2))
$(this).css('left', tt)
});
	
$('#scrollable').css({
'width': $('#scrol_wrap').width()
}).scrolling();	
		
});
