$(document).ready(function () {

    $('.pager').append($('li.thumbnail'));
    $('.pager').addClass('pager_' + $('li.thumbnail').length);

    $('.cycle').cycle({
        fx: 'fade',
        timeout: 12,
        continuous: 0,
        speed: 2000,
        sync: 1,
        random: 1,
        fit: 1,
        containerResize: 1,
        pause: 1,
        delay: 11,
        nowrap: 1,
        rev: 0,
        requeueTimeout: 250,
        pager: '.pager',
        timeout: 10000,
        pagerAnchorBuilder: function (idx, slide) {
            //return sel string for existing anchor
            return '.pager li:eq(' + (idx) + ') a';
        },
        pauseOnPagerHover: 1
        //onPagerEvent: function () {
        //        $('.cycle').cycle('pause');
        //}
    });
});

