$(function () {
    var cycle = $('.home-feature')
        .cycle({
            fx: 'scrollHorz',
            pause: 1,
            timeout: 9000,
            speed: 3000,
            before: function (currslide, nextslide, options) {
                var center = ($(window).width() / 2) - ($(nextslide).width() / 2);
                var center2 = ($(nextslide).width() / 2) - ($(nextslide).children('a').width() / 2);
                options.animIn.left = center;
                $(nextslide).children('a').css({ left: center2 });
                $(currslide).css({ left: center });
                //$('.feature_nav li').removeClass('feature_nav-item-on').eq(options.currSlide).addClass('feature_nav-item-on');
            },
            after: function (currslide, nextslide, options) {
                $(currslide).parent().css({ overflow: 'visible' });
            }
        }).prepend('<div class="w-container"><div class="left"/><div class="right"/></div>');

    cycle.find('.right').click(function () {
        cycle.cycle('next');
    }).end().find('.left').click(function () {
        cycle.cycle('prev');
    });
});
