// JavaScript Document
$(document).ready(function(){
	
	var ul=$('#gallery ul');
	var elements=$('li',ul);
	var count=elements.length;
	var curr=count;
	var ulwidth=250*count;
	ul.width(ulwidth);
	var controls=$('.scrol a');
	controls.eq(0).click(function(){
		if (curr>1) {
			ul.animate({left:'-=250px'});
			curr--;
		}
		});
    controls.eq(1).click(function(){
		if (curr<count) {
			ul.animate({left:'+=250px'});
			curr++;
		}
		});	
			})