ticker2 =
{
	tickerindex:0,

	startTicker: function()
	{
		$.ajax({
			url: "../../../process_rss/rss_xml/news-rss20.xml",
			type: "GET",
			dataType: "xml",
			cache: false,
			error: function(request,textStatus,errorThrown){
			  console.log(textStatus);
			  console.log(request);
			  console.log(errorThrown);
			},
			success: function(xml){
		  		  
			var list = $(xml).find("item").find("title");
		  
			ticker2.tickerindex = 0;  

			var timer = setInterval(function(){
        		if(ticker2.tickerindex >= list.length)
            	{
            		ticker2.tickerindex = 0;
	            }
	            
	            var listElement = $(list).get(ticker2.tickerindex);
            
				$(".headline").slideUp("slow", function() {
		
					$(".headline").html("<p><a href=\"http://objective-decision.com/en/company/index.php?tabview=news\" id=\"news-link\" class=\"headline\">"+$(listElement).text()+"</a></p>");
			
				$(".headline").slideDown("slow");
				ticker2.tickerindex = ticker2.tickerindex+1;
			});
			

        }, 3500);
  		}
		});
	},
};