jQuery.fn.live = function(settings)
{
    settings = jQuery.extend(
    {
        newsSpeed: "normal"
    },
    settings);

    return this.each(function(i)
    {
        aNewsSlider.itemHeight = parseInt(jQuery(".item:eq(" + i + ")",".cards_slider").css("height")) + parseInt(jQuery(".item:eq(" + i + ")",".cards_slider").css("margin-bottom"));
        aNewsSlider.init(settings,this);
    });
};

var aNewsSlider = {
    itemWidth: 0,
    itemHeight:0,

    init: function(s,p)
    {
        jQuery(".messaging",p).css("display","none");

        itemLength = jQuery(".item",p).length;
        newsContainerHeight = itemLength * aNewsSlider.itemHeight;
        jQuery(".next",p).css("display","block");

        animating = false;

    $.rtnext2 = function()
    {
            if (animating == false)
            {
                animating = true;
                animateBottom = parseInt(jQuery(".container", p).css("bottom")) - (aNewsSlider.itemHeight)-20;

                if (animateBottom + parseInt(jQuery(".container", p).css("height")) > 0)
                {
                    jQuery(".container",p).animate({bottom: animateBottom}, s.newsSpeed, function()
                    {
                        jQuery(this).css("bottom", animateBottom);
                        animating = false;
                    });
                }
                else
                {
                    animating = false;
                }
            }
            return false;
        };
    },

    vAll: function(s,p)
    {
        var o = p;
        while (p)
        {
            p = p.parentNode;
            if (jQuery(p).attr("class") != undefined && jQuery(p).attr("class").indexOf("cards_slider") != -1)
            {
                break;
            }
        }
    }
};

