$.fn.infinitescroll
        startInfiniteScrolling
        loadNextList
        removeItems
        prependItems
        renderList
        processList
        loadResultList
        kill
        showHideLoadingContainer
        setUpLoadingIcon
        loadInitialList
$.fn.infinitescroll = function(source, parameters, render, emptyListProcessor, loadingImage, postProcessor, postRenderer, initialContent, initialCallback, $scrollContainer, overrideThreshold) {

Function that will provide infinite scrolling for lists of items being displayed
param {String} source If this is a String, it'll be treated as the URL to use for the search action If this is a Function, this will be called to get the lists of results
param {Object} parameters Parameters to send along for search requests. The 'items' property will be used to determine how many results are loaded per call [optional]
param {Function} render Render callback function called when the plugin is ready to render the list using a specific template
param {Function} emptyListProcessor Function used to deal with an empty result list [optional]
param {String} loadingImage Path to the loading image that should be shown when
param {Function} postProcessor Function used to transform the search results before rendering the template [optional]
param {Function} postRenderer Function executed after the rendered HTML has been appened to the infinite scroll [optional]
param {Object} initialContent Initial content to be added to the list [optional]
param {Function} initialCallback Function to call with data from initial request [optional]
param {Object} $scrollContainer Container used for infinite scrolling that is not the document [optional]
param {Integer} overrideThreshold Integer to override the default scroll threshold for when the next request is done [optional]


var startInfiniteScrolling = function() {

Start listening to the window's scroll event and decide when we are close enough to the end of the page before fetching the next set of items


var loadNextList = function() {

Function that checks whether the current scroll position is within a certain distance of the end of the page. If it is, we load the next set of results


var removeItems = function(items) {

Function called when items are removed from the list. This will fade the items out and hide them.
param {Object} items Array of jQuery elements or array of strings of ids that need to be removed. For the latter case, each of these string should correspond with a Dom element that has this string as an id.


var prependItems = function(items) {

Function called to prepend items to the list. This will be used when UI caching needs to be used
param {Object} items Array of items to be prepended


var renderList = function(data, prepend) {

Add a list of items to the current infinite scroll list.
param {Object} data List of items to add to the infinite scroll list
param {Object} prepend True when we want to prepend the new items to the list False when we want to append the new items to the list


var processList = function(data, prepend) {

Run the list of items to be added to a processor before pushing them through a template. The postProcessor will be given an array of items to be added to the infinite scroll. The plugin expects an array of items to come back from the postProcessor as well.
param {Object} data List of items to add to the infinite scroll list
param {Object} prepend True when we want to prepend the new items to the list False when we want to append the new items to the list


var loadResultList = function(initial) {

Retrieve the next set of results from the server
param {Object} initial Whether or not this is the initial set of results that's being loaded


var kill = function() {

Kill an instance of an infinite scroll object. This means the object will no longer respond to any events or functions


var showHideLoadingContainer = function(show) {

Show or hide the loading image
param {Object} show True when the loading image should be shown False when the loading image should be hidden


var setUpLoadingIcon = function() {

Create a div underneath the infinite scroll list that shows a loading image provided by the container when a new set of results is being loaded


var loadInitialList = function() {

Get the initial list of items to add to the list