vanilla.namespace('biknok.citation');

biknok.citation.list =
{
    init : function(properties)
    {
	var view = $("#view-" + properties.viewId);

	/*
	   Images
	*/

	var citations = $("ul li", view);
	citations.not(":first").hide();

	if ( citations.length > 1 )
	{
	    var i = 0;
	    function slide()
	    {
		var last = i;
		i = (i+1) % citations.length;

		citations.eq(last).fadeOut();
		citations.eq(i).fadeIn().wait(5000, slide);
	    }

	    citations.eq(0).wait(3000, slide);
	}
    }
}
