define(["scrollStyles"],function(){"use strict";return{getPosition:function(scrollContainer,item,horizontal,customOffset){customOffset=customOffset||0;var elem,slideeOffset=scrollContainer.getScrollContainerBoundingClientRect(),itemOffset=(elem=item).getBoundingClientRect?elem.getBoundingClientRect():{top:0,left:0},offset=horizontal?itemOffset.left-slideeOffset.left:itemOffset.top-slideeOffset.top,size=horizontal?itemOffset.width:itemOffset.height;size||0===size||(size=item[horizontal?"offsetWidth":"offsetHeight"]);var currentStart=horizontal?scrollContainer.getScrollLeft():scrollContainer.getScrollTop();offset+=currentStart;var frameSize=horizontal?slideeOffset.width:slideeOffset.height;return{start:offset+customOffset,center:offset-frameSize/2+size/2,end:offset-frameSize+size,size:size,isVisible:currentStart<=offset+customOffset&&offset+size<=currentStart+frameSize}}}});