﻿$(document).ready(function () {
    $('#homeimgs').cycle({
        fx: 'scrollLeft',
        timeoutFn: calculateTimeout,
        before: onBefore,
        after: onAfter,
        pager: '#imgnav',
        pagerEvent: 'mouseover',
        pauseOnPagerHover: true
    });
});
function onBefore(curr, next, opts) {

    var index = opts.currSlide + 1;
    $("#homeimgs_" + index).hide();

}
function onAfter(curr, next, opts) {

    var index = opts.currSlide + 1;
    $("#homeimgs_" + index).show();

}
function calculateTimeout(currElement, nextElement, opts, isForward) { 
    return 8000;
} 

