Extract slide positioning logic into a separate function
Add updateSlidePositions to the resize handler
Reformat selectSlide to match coding standards
Reformat updateSlidePosition to match coding standards
Add comment to explain tricky part of updateSlidePositions
Carousel: Set proper offsets when viewport changes size

In Mobile Safari, the carousel images will not stay in the correct positions
when the device orientation is changed. For example, when the user changes from
portrait to landscape view, the current slide is positioned to left instead of
centered. Since the offsets are defined in terms of absolute pixels, they don't
get updated automatically.

This problem also happens on the desktop versions of Chrome and Firefox. When
the browser window is resized, the offsets are no longer correct.

The solution for all these browsers is to reset the offsets when the
resizeTimeout fires. This works for mobile too because the the orientation
change triggers a resize event.
Merge pull request #331 from rads/resizing

Carousel: Set proper offsets when device viewport changes size