$(document).ready(function() {
		var aniSpeed = 1000;

       var origState = new Array();

	origState['firstimg'] =  {left: '0px'};
	origState['secondimg'] =  {left: '43px'};
	origState['thirdimg'] =  {left: '86px'};
	origState['fourthimg'] =  {left: '129px'};

       var finalState = new Array();

	finalState['firstimg'] =  {left: '0px'};
	finalState['secondimg'] =  {left: '750px'};
	finalState['thirdimg'] =  {left: '793px'};
	finalState['fourthimg'] =  {left: '836px'};
	

       $('.img').click(
               function() {
                       currentId = $(this).attr('id');
switch (currentId)
{
case 'firstimg':
  $('#secondimg').stop().animate(finalState['secondimg'], aniSpeed);
  $('#thirdimg').stop().animate(finalState['thirdimg'], aniSpeed);
  $('#fourthimg').stop().animate(finalState['fourthimg'], aniSpeed);
  break;
case 'secondimg':
  $('#secondimg').stop().animate(origState['secondimg'], aniSpeed);
  $('#thirdimg').stop().animate(finalState['thirdimg'], aniSpeed);
  $('#fourthimg').stop().animate(finalState['fourthimg'], aniSpeed);
  break;
case 'thirdimg':
  $('#secondimg').stop().animate(origState['secondimg'], aniSpeed);
  $('#thirdimg').stop().animate(origState['thirdimg'], aniSpeed);
  $('#fourthimg').stop().animate(finalState['fourthimg'], aniSpeed);
  break;
case 'fourthimg':
  $('#secondimg').stop().animate(origState['secondimg'], aniSpeed);
  $('#thirdimg').stop().animate(origState['thirdimg'], aniSpeed);
  $('#fourthimg').stop().animate(origState['fourthimg'], aniSpeed);
  break;
default:
  $('#secondimg').stop().animate(origState['secondimg'], aniSpeed);
  $('#thirdimg').stop().animate(origState['thirdimg'], aniSpeed);
  $('#fourthimg').stop().animate(origState['fourthimg'], aniSpeed);
}
               }
               

               );
});


