Help with jQuery code?
I am trying to learn by making my own jQuery slideshow based on exisiting open source code on the net.

I am getting lost in one chunk of coding and i think its mainly because i am not very strong to begin with in programming/jQuery and also the guy who wrote it used a bunch of ternary operators (i believe its what this is).

Could someone please help me break this down and maybe even replace the ternary operators with more "traditional" operators?

    //if no IMGs have the show class, grab the first image
    var current = ($('ul.slideshow li.show') ?  $('ul.slideshow li.show') : $('#ul.slideshow li:first'));
 
    //Get next image, if it reached the end of the slideshow, rotate it back to the first image
    var next = ((current.next().length) ? ((current.next().attr('id') == 'slideshow-caption') ? $('ul.slideshow li:first') :current.next()) : $('ul.slideshow li:first'));

I am mostly confused on the last line.
Any help is appreciated.
Help with jQuery code?
===

I am trying to learn by making my own jQuery slideshow based on exisiting open source code on the net.

I am getting lost in one chunk of coding and i think its mainly because i am not very strong to begin with in programming/jQuery and also the guy who wrote it used a bunch of ternary operators (i believe its what this is).

Could someone please help me break this down and maybe even replace the ternary operators with more "traditional" operators?

    //if no IMGs have the show class, grab the first image
    var current = ($('ul.slideshow li.show') ?  $('ul.slideshow li.show') : $('#ul.slideshow li:first'));
 
    //Get next image, if it reached the end of the slideshow, rotate it back to the first image
    var next = ((current.next().length) ? ((current.next().attr('id') == 'slideshow-caption') ? $('ul.slideshow li:first') :current.next()) : $('ul.slideshow li:first'));

I am mostly confused on the last line.
Any help is appreciated.