Image Fading Change Box - "issues" - If Else Statements

Image Fading Change Box - "issues" - If Else Statements

So I am making A photo changing box and I have run into issues when writing the jQuery side of it.

here's my code:

  1.   $('#rightclick').click(
  2.   function(){
  3.     if('#linkone'.opacity="1") {
  4.   $('#linktwo').animate({"opacity": "1"}, (500));
  5.   $('#linkone').animate({"opacity": "0"}, (250));
  6.   } else if('#linktwo'.opacity="1"){
  7.       $('#linkthree').animate({"opacity": "1"}, (500));
  8.   $('#linktwo').animate({"opacity": "0"}, (250));
  9.   } else if('#linkthree'.opacity="1"){
  10.   $('#linkfour').animate({"opacity": "1"}, (500));
  11.   $('#linkthree').animate({"opacity": "0"}, (250));
  12.   } else if('#linkfour'.opacity="1"){
  13.   $('#linkone').animate({"opacity": "1"}, (500));
  14.   $('#linkfour').animate({"opacity": "0"}, (250));
  15.   }
  16.   });
   
So as you can see I have tried to write If Else statements, problems are that it only change to the first photo when you click on the '#rightclick' button.

If you want to view what I have done so far then here is the link:  http://benjaminpotter.org/Simak/

So I don't know what to do and I have tried myself for quite some time...


I was also wondering, If the user does not click on anything, then how do I get it to automatically change the image (needs a timer for time per photo)...

thanks for anyone to helps!

Ben.