window.addEvent('load', function() {
			var left_scroller = $$('.scroller_left_arrow')[0];
			var right_scroller = $$('.scroller_right_arrow')[0];

			var container_div = $$('.scroller')[0];
			var list = $$('.scroller table')[0];

			var offset = 0;
			var excess = 0;
			var container_width = 0;
			var list_width = 0;

			var timer;

			var STEP = 5;
			var PERIOD = 20;
			var STYLE_NAME = 'marginLeft';

			var direction = '';

			var correction_tween = new Fx.Tween(list, {
						property : 'marginLeft',
						duration : 'short',
						onComplete : function() {
							offset = excess;
						}
					});

			left_scroller.addEvents({
						mouseenter : function() {
							calculateExcess();
							start('right');
						},
						mouseleave : function() {
							stop();
						},
						click : function(e) {
							new Event(e).stop();
						}
					});
			right_scroller.addEvents({
						mouseenter : function() {
							calculateExcess();
							start('left');
						},
						mouseleave : function() {
							stop();
						},
						click : function(e) {
							new Event(e).stop();
						}
					});

			function calculateExcess() {
				list_width = list.getCoordinates().width.toInt();
				container_width = container_div.getCoordinates().width.toInt()
						- 94;
				excess = container_width - list_width;
			}

			function start(dir) {
				direction = dir;
				timer = move.periodical(PERIOD);
			}

			function move() {
				switch (direction) {
					case 'left' :
						if (offset - excess >= STEP) {
							offset = offset - STEP;
							list.setStyle(STYLE_NAME, offset);
						} else {
							offset = excess;
							list.setStyle(STYLE_NAME, excess);
							stop();
						}
						break;
					case 'right' :
						if (-offset > STEP) {
							offset = offset + STEP;
							list.setStyle(STYLE_NAME, offset);
						} else {
							list.setStyle(STYLE_NAME, '0');
							offset = 0;
							stop();
						}
						break;
				}
			}

			function stop() {
				$clear(timer);
				timer = null;
				direction = '';
			}

			function r() {
				calculateExcess();
				if (offset - excess < 0) {
					correction_tween.start(offset, excess);
				}
			}

			window.addEvent('resize', r.debounce(300, false));
		});