public/lib/jquery.sly.js
function getRelatives(slideePos) {
            slideePos = within(isNumber(slideePos) ? slideePos : pos.dest, pos.start, pos.end);

            var relatives = {},
                centerOffset = forceCenteredNav ? 0 : frameSize / 2;

            // Determine active page
            if (!parallax) {
                for (var p = 0, pl = pages.length; p < pl; p++) {
                    if (slideePos >= pos.end || p === pages.length - 1) {
                        relatives.activePage = pages.length - 1;
                        break;
                    }

                    if (slideePos <= pages[p] + centerOffset) {
                        relatives.activePage = p;
                        break;
                    }
                }
            }

            // Relative item indexes
            if (itemNav) {
                var first = false,
                    last = false,
                    center = false;

                // From start
                for (var i = 0, il = items.length; i < il; i++) {
                    // First item
                    if (first === false && slideePos <= items[i].start) {
                        first = i;
                    }

                    // Centered item
                    if (center === false && slideePos - items[i].size / 2 <= items[i].center) {
                        center = i;
                    }

                    // Last item
                    if (i === items.length - 1 || (last === false && slideePos < items[i + 1].end)) {
                        last = i;
                    }

                    // Terminate if all are assigned
                    if (last !== false) {
                        break;
                    }
                }

                // Safe assignment, just to be sure the false won't be returned
                relatives.firstItem  = isNumber(first) ? first : 0;
                relatives.centerItem = isNumber(center) ? center : relatives.firstItem;
                relatives.lastItem   = isNumber(last) ? last : relatives.centerItem;
            }

            return relatives;
        }
function getRelatives(slideePos) {
            slideePos = within(isNumber(slideePos) ? slideePos : pos.dest, pos.start, pos.end);

            var relatives = {},
                centerOffset = forceCenteredNav ? 0 : frameSize / 2;

            // Determine active page
            if (!parallax) {
                for (var p = 0, pl = pages.length; p < pl; p++) {
                    if (slideePos >= pos.end || p === pages.length - 1) {
                        relatives.activePage = pages.length - 1;
                        break;
                    }

                    if (slideePos <= pages[p] + centerOffset) {
                        relatives.activePage = p;
                        break;
                    }
                }
            }

            // Relative item indexes
            if (itemNav) {
                var first = false,
                    last = false,
                    center = false;

                // From start
                for (var i = 0, il = items.length; i < il; i++) {
                    // First item
                    if (first === false && slideePos <= items[i].start) {
                        first = i;
                    }

                    // Centered item
                    if (center === false && slideePos - items[i].size / 2 <= items[i].center) {
                        center = i;
                    }

                    // Last item
                    if (i === items.length - 1 || (last === false && slideePos < items[i + 1].end)) {
                        last = i;
                    }

                    // Terminate if all are assigned
                    if (last !== false) {
                        break;
                    }
                }

                // Safe assignment, just to be sure the false won't be returned
                relatives.firstItem  = isNumber(first) ? first : 0;
                relatives.centerItem = isNumber(center) ? center : relatives.firstItem;
                relatives.lastItem   = isNumber(last) ? last : relatives.centerItem;
            }

            return relatives;
        }
function getRelatives ( slideePos ) { slideePos = within ( isNumber ( slideePos ) ? slideePos : pos . dest , pos . start , pos . end ) ; var relatives = { } , centerOffset = forceCenteredNav ? 0 : frameSize / 2 ; // Determine active page
 if ( ! parallax ) { for ( var p = 0 , pl = pages . length ; p < pl ; p ++ ) { if ( slideePos >= pos . end || p === pages . length - 1 ) { relatives . activePage = pages . length - 1 ; break ; } if ( slideePos <= pages [ p ] + centerOffset ) { relatives . activePage = p ; break ; } } } // Relative item indexes
 if ( itemNav ) { var first = false , last = false , center = false ; // From start
 for ( var i = 0 , il = items . length ; i < il ; i ++ ) { // First item
 if ( first === false && slideePos <= items [ i ] . start ) { first = i ; } // Centered item
 if ( center === false && slideePos - items [ i ] . size / 2 <= items [ i ] . center ) { center = i ; } // Last item
 if ( i === items . length - 1 || ( last === false && slideePos < items [ i + 1 ] . end ) ) { last = i ; } // Terminate if all are assigned
 if ( last !== false ) { break ; } } // Safe assignment, just to be sure the false won't be returned
 relatives . firstItem = isNumber ( first ) ? first : 0 ; relatives . centerItem = isNumber ( center ) ? center : relatives . firstItem ; relatives . lastItem = isNumber ( last ) ? last : relatives . centerItem ; } return relatives ; }
Return relative positions of items based on their visibility within FRAME.

@param {Int} slideePos Position of SLIDEE.

@return {Void}
Return relative positions of items based on their visibility within FRAME .