window.addEvent('domready', function(){
	//var butPos = $('resistorFocus').getCoordinates();
	
	/*Polariods
	--------------------------------------------------------------------------*/
	
	/*
	var arrowLeft = new Element('img', {
		'src': '/images/home/arrow-left.png',
		'id': 'arrowleft',
		'width': 54,
		'height': 55
	}).setStyles({
		'position': 'absolute',
		'left': - 20,
		'cursor':'pointer',
		'top': butPos.top + 120
	}).inject($('container'),'bottom'); 
	
	var arrowRight = new Element('img', {
		'src': '/images/home/arrow-right.png',
		'id': 'arrowright',
		'width': 54,
		'height': 55
	}).setStyles({
		'position': 'absolute',
		'left': butPos.width - 30,
		'cursor':'pointer',
		'top': butPos.top + 120
	}).inject($('container'),'bottom');
	*/
	
	var scrollyWidth = 135;
	var offset = 30;
	
	var i = 0;
	$$('#resistorFocus li').each(function(el){
		el.setStyle('position','absolute');
		el.set('tween', {'duration': 500, 'transition': Fx.Transitions.Quad.easeOut});
		el.setStyle('left', i*scrollyWidth);
		el.store('pos', i);
		i++;
	});
	
	
	$('scrollleft').addEvent('click', function(){
		$$('#resistorFocus li').each(function(el){
			currentpos = el.retrieve('pos');
			if (currentpos - 1 < -1) {
				currentpos = i-1;
				el.setStyle('left', currentpos*scrollyWidth);
			}
			currentpos --;
			el.store('pos', currentpos);
			el.tween('left', currentpos*scrollyWidth);
		});
	});
	
	
	$('scrollright').addEvent('click', function(){
		$$('#resistorFocus li').each(function(el){
			currentpos = el.retrieve('pos');
			if (currentpos + 1 == i) {
				currentpos = -1;
				el.setStyle('left', currentpos*scrollyWidth);
			}
			currentpos ++;
			el.store('pos', currentpos);
			el.tween('left', currentpos*scrollyWidth);
		});
	});
	
	
	
	
	
	
});