/*
 * jQuery Social Media Plugin - An online social media aggregator
 *     Yoeran Luteijn: http://www.yoeran.nl/
 */

jQuery.fn.socialstream=function(url){var $$=$(this[0]);var max=10;var free=true;$$.html('').addClass("stream-box");function refreshStream(){if(free){free=false;$.getJSON(url+"/socialstream.php",function(data){var r=1;$.each(data,function(i,item){if($("#"+item.uid).size()==0){$("<div/>").attr('id',item.uid).addClass("node active "+item.type).html(item.content).hide().fadeIn(500+(r*100)).prependTo($$);}free=true;r++;});});if($(".active").size()>max){$(".active:last").removeClass("active").fadeOut();}else{$(".active:eq("+max+")").removeClass("active").fadeOut();}}}function reset(){free=true;}refreshStream();setInterval(refreshStream,40000);setInterval(reset,80000);};