(function($){$.fn.ajaxFeed=function(options){var defaults=$.extend({url:'#',feed_num:'10',recheck:'15',time_sep:' - ',image:'',php_file_url:'getrss.php'});var settings=$.extend(defaults,options);var out=$(this);ajaxCall();function ajaxCall(){$.ajax({url:settings.php_file_url+'?url='+settings.url+'&num='+settings.feed_num+'&sep='+settings.time_sep+'&image='+settings.image,cache:false,success:function(data){setTimeout(function(){ajaxCall()},settings.recheck*1000);showData(data)}})}function showData(data){if(data=='URL Error'){out.html('You must set the feed\'s URL!');return}if(typeof last=='undefined')last=0;out.html(data);out.children('div:first').addClass('first');out.children('div:last').addClass('last');out.children('div').each(function(){var curr=$(this);if(curr.attr('time')>last){curr.hide().fadeIn(600)}});last=out.children('div:eq(0)').attr('time')}}})(jQuery);