jQuery(document).ready(function(){

jQuery.ajax({
	url: 'http://www.neogramm.de/wp-content/themes/neogramm/neoTools/neoTwitter.json',
	dataType: 'json',
	timeout: 30000,
	success:         function(data){
          jQuery.each(data, function(i,item){

		if(item){
		
			var newtext = item.created_at.replace(/(\+\S+) (.*)/,'$2 $1');
			var date = new Date(Date.parse(newtext));


			var year = date.getYear()-100;

			if(year>1000){
				year -=1900;
			}

			date = (("0"+(date.getMonth()+1)).substr(-2)+"/"+year);

			var message = item.text;
			jQuery('#neonewsList').append('<li><div class="neonewsDate">'+date+'</div><div class="neonewsContent">'+message.replace(/(http:\/\/\S*)/g, '<a href="$1">mehr<\/a>')+'</div></li>');
		}
          });

	  jQuery(".neonewsData").jCarouselLite({
        	vertical: true,
        	visible: 2,
        	auto:3000,
        	speed:2000,
        	pause:true,
		mouseWheel:true
    	  });


	}
});


jQuery(function() {
jQuery(".neorefs").jCarouselLite({
        vertical: true,
        visible: 2,
        auto:3000,
        speed:2000,
        pause:true,
	mouseWheel:true
    });
});


});

