	
	google.load("feeds", "1");

	function loadRSS() {
	
	  theFeedRSS = "http://pipes.yahoo.com/pipes/pipe.run?_id=72f72e310c0c7b13c5cd94bbf5e0e3dd&_render=rss&tag=Featured";	

      var feed = new google.feeds.Feed(theFeedRSS);
	  feed.setResultFormat(google.feeds.Feed.MIXED_FORMAT);
	  feed.setNumEntries(10);	  
      feed.load(function(result) {
        if (!result.error) {
          var container = document.getElementById("feed");
          for (var i = 0; i < result.feed.entries.length; i++) {
			var html = '';
            var entry = result.feed.entries[i];
			var theCategory = entry.categories[0];
			var entryTitle = entry.title;
			var entryDesc = entry.content;
			
			var entryImg = $(entryDesc).find("img:first").attr("src");
			//var thePostID = thePostUrl.substring(thePostUrl.indexOf('p=') +2);
			
			/*entry.contentSnippet.substring(0,50)*/
			
			var theLogo = "<div class='zaWidgetLogo'><img src='http://www.zanews.co.za/omp/widget/img/logo.png' border='0'></div>"
			var theImage = "<span class='zaLeft'>"
			+"<img src='"+entryImg+"' border='0' class='zaWidgetImage'>"
			+"</span>";
			var theContent = "<span class='zaRight'>"
			+"<div class='zaWidgetTitle'>"+entryTitle.substring(0,30)+"</div>"
			+"<div class='zaWidgetContent'>"+"</div>"
			+"</span>";
			
			//"+"</a>"
			
			$('.zaWidget').append(theLogo+theImage+theContent);
			/*$(".theLoader").fadeOut('fast', function(){
				$('.za_thePostMain').fadeIn('fast');
			});*/
			
          }
        }
      });
    }
    google.setOnLoadCallback(loadRSS);
	
	
	$(document).ready(function() {
		$(".zaWidget").live('click', function(evt) {
			evt.preventDefault();
			window.location = 'http://www.iol.co.za/multimedia/zanews';
		});
	});
