var html = ''; 

function clearContent() {
	$('#feedContent').empty();
}

function get_rss_feed() {
		
         clearContent();
         var maxposts = 2;
         //If statement to check to see if something other than "Select" has been
         // selected.
         
		 $.get('http://www.fabulousfloorsmagazine.com/blog/?feed=rss2', function(d){  
       
         //$('#feedContent').append('<h1>Current Headlines</h1>');
      
         var count = 0;
         $(d).find('item').each(function(){
			 count = count + 1;
			 var $item = $(this);   
             var title = $item.find('title').text();
             var link = $item.find('link').text();
             var description = $item.find('description').text(); 
             var pubDate = $item.find('pubDate').text();
             var dateObj= new Date(pubDate);
             var html = '';  
             html += '<p><strong> ' + dateObj.dateFormat("n/j/y") + '</strong><br>';
             html += title + '<br/><a href="' + link + '" style="color:#000000;font-weight:bold;font-size:14px;" target="_blank">Read More</a></p>'; 
             /*html += '<p> ' + description + '</p>' ;  
             html += '<a href="' + link + '" target="_blank">Read More</a>';*/
             html += '';  
             $('#feedContent').append($(html));
			 if(count == maxposts){return false;}
         });  
     });  
}
//get_rss_feed();
