/*  ContentFlowAddOn_waterwheel, version 1.0 
 *  (c) 2008 - 2010 Sebastian Kutsch
 *  <http://www.jacksasylum.eu/ContentFlow/>
 *
 *  This file is distributed under the terms of the MIT license.
 *  (see http://www.jacksasylum.eu/ContentFlow/LICENSE)
 */

new ContentFlowAddOn ('waterwheel', {
		  
    init: function() {
        this.addStylesheet();
    },
    
	ContentFlowConf: {

        relativeItemPosition: "center",         // top, bottom, left, right, center
        verticalFlow: true,            // turn ContentFlow 90 degree counterclockwise
        endOpacity: 0.9,                  // opacity of last visible item on both sides
        reflectionHeight: 0,   // client-side, server-side, none
        reflectionGap: 0,
		visibleItems: 2, 
		flowSpeedFactor: 2,


        calcCoordinates: function (item) {
            var rP = item.relativePosition;
            var rPN = item.relativePositionNormed;
            var vI = rPN != 0 ? rP/rPN : 0 ; // visible Items

            var f = 1.2 - 1.2/Math.exp( Math.abs(rP)*1.4);
            var x =  item.side * vI/(vI+2.8)* f; 
            var y = -0.01;

            return {x: x, y: y};
        }
	
    }
     

});

