/* A Simple Feed reader for local files
 * 5/11/2009 Lee Brunjes
 */
 function loadLocalRss(rssfeed, div)
 {
	 $.get(rssfeed, function(xml)
	 {	
	 	//rss
	 	$("item",xml).each(function()
	 	{	 		
			$(div).append('<li><a href="'+$(this).children("link").text()+'">'
							+$(this).children("title").text()+'</a><p>'
							+$(this).children("description").text()+'</p></li>');	 									
	 	})
	 	//atom
	 	$("entry",xml).each(function()
	 	{	 		
			$(div).append('<li><a href="'+$(this).children("link[rel=alternate][type=text/html]").attr("href")+'">'
							+$(this).children("title").text()+'</a><p>'
							+$(this).children("content").text()+'</p><p style="margin:0px;"><a href="'+$(this).children("link[rel=replies][type=text/html]").attr("href")+'">Comments</a></p></li>');	 									
	 	})
	 },'xml');
	 
 }
 function loadLocalRss(rssfeed, div, count)
 {
 
 	 $.get(rssfeed, function(xml)
 	 {	
 	 	
		//rss
		$("item",xml).each(function()
		{	 		
			if($(div).children("li").length<count)
			{
			$(div).append('<li><a href="'+$(this).children("link").text()+'">'
							+$(this).children("title").text()+'</a><p>'
							+$(this).children("description").text()+'</p></li>');	 
							}
			
		})
		//atom
		$("entry",xml).each(function()
		{	 		
			if($(div).children("li").length<count)
			{
			$(div).append('<li><a href="'+$(this).children("link[rel=alternate][type=text/html]").attr("href")+'">'
							+$(this).children("title").text()+'</a><p>'
							+$(this).children("content").text()+'</p><p style="margin:0px;"><a href="'+$(this).children("link[rel=replies][type=text/html]").attr("href")+'">Comments</a></p></li>');
							}
		})
 	 	
 	 },'xml');
 	 
 }