var opts, startingSlide = 0;
function startCycle() {
    opts = $('.rotate').cycle({ 
			fx: 'fade', 
			continuous: 0,
			timeout: 9000,
			speed: 500,
			pager:  '#pager',
          startingSlide: startingSlide
    }).data('cycle.opts');
}

$(document).ready(function() {
    startCycle();
});

$(window).resize(function(){
    console.log("window resize triggered");
    startingSlide = opts.currSlide;
    $('.rotate').cycle('destroy');
    startCycle();
});

