document.write('<style type="text/css">.container.geCareersBlogfeed{background:transparent url('+GE_baselink+'html_view/images/small-loader.gif) no-repeat 50% 100%; padding-bottom:32px;</style>');

GE_Main.mapCSSToFn('geCareersBlogfeed',function(el){
	var max=5; 
	//var url = GE_baselink + 'html_view/jsp/request_proxy.jsp?url=' + encodeURIComponent('http://feeds.feedburner.com/GECareersBlog');
	var url = GE_baselink + 'html_view/jsp/request_proxy.jsp?url=' + encodeURIComponent( 'http://careers.geblogs.com/short-feed/' );
	//var url = GE_baselink + 'html_view/jsp/request_proxy.jsp?url=' + encodeURIComponent( 'http://www.gereports.com/tag/olympics/feed/' );
	
	new Ajax.Request( url, {
	  method: 'get',
	  onSuccess: function(transport) {
		var xml = transport.responseXML;
		if (xml) {
				var ulEl = new Element('div').addClassName('abstract_list');
				$(el).setStyle({background:'transparent',paddingBottom:'0px'}).insert( ulEl );
				var items = xml.getElementsByTagName("item");
				var end = Math.min(items.length,max);
				for (var i=0; i<end; i++) {
					var item = items[i];
					var title = item.getElementsByTagName("title")[0].firstChild.nodeValue;
					var pubDate = item.getElementsByTagName("pubDate")[0].firstChild.nodeValue;
					pubDate = pubDate.substring(0,pubDate.length-15).replace(' 0',' ');
					var feedLink = item.getElementsByTagName("link")[0].firstChild.nodeValue;
					var storyImage = item.getElementsByTagName("imageURL")[0].firstChild.nodeValue;
					var description = item.getElementsByTagName('description')[0].firstChild.nodeValue;
					
					var aEl = new Element('a',{href:feedLink,title:title}).insert(title);
					var liEl = new Element("div").addClassName('abstract_item with_image');
					liEl.insert( new Element('img',{'src':storyImage, alt:title}));
					liEl.insert( new Element('span').addClassName('note').insert(pubDate) );
					liEl.insert( new Element('h4').addClassName('item_title').insert( aEl ) );
					liEl.insert( new Element('p').insert(description));
					//liEl.insert( new Element( 'div', {className:'foo'} ) );
					aEl.observe('click',function(e){
						e.stop();
						window.open(this.readAttribute('href'));
					}.bind(aEl));
					ulEl.appendChild( liEl );
					
				
			}
		}
	  }
	});
});

