jQuery.fn.newsSlider = function() {

    var news = $(this).find('ul');
    var first = news.find('li:first');

    /*
     * Some default stage positions that we'll call upon later
     */
    var stageRight = {
        // 'position' : 'absolute',
        'left' : news.width()
    };

    var stageLeft = {
        // 'position' : 'absolute',
        'left' : 0 - news.width()
    };

    var stageCenter = {
        // 'position' : 'absolute',
        'left' : 0
    }

    function init() {

        // start by placing all the LI elements where they need to be
        // (usually off-stage)
        news.find('li').each(function() {
			$(this).css("position", "absolute");
			$(this).css(stageRight);
        });

        animate(first);

    }

    function animate(e) {

        e.animate(stageCenter, 500)
            .delay(10000)
                .animate(stageLeft, 500, function() {

                    e.css(stageRight);

                    if(e.next().length ==1 ) {
                        animate(e.next())
                    } else {
                        animate(first);
                    }
                });
    }


    init();
    return $(this);

};
