
function linkizeTitles(result){

	if(result.feed.link) { result.feed.link = '/teleport/' + escape(result.feed.link.replace('http://', '').replace('https://', '').replace('?', '__2F__')); }
	if(result.feed.entries[0]) { result.feed.entries[0].link = '/teleport/' + escape(result.feed.entries[0].link.replace('http://', '').replace('https://', '').replace('?', '__2F__')); }
	if(result.feed.entries[1]) { result.feed.entries[1].link = '/teleport/' + escape(result.feed.entries[1].link.replace('http://', '').replace('https://', '').replace('?', '__2F__')); }
	if(result.feed.entries[2]) { result.feed.entries[2].link = '/teleport/' + escape(result.feed.entries[2].link.replace('http://', '').replace('https://', '').replace('?', '__2F__')); }
}

function LoadDynamicFeedControl() {
	var feeds = [ 
		{ title: 'Automotoportal.hr', url: 'http://feeds.feedburner.com/automotoportalhr' },
		{ title: 'Autoportal', url: 'http://www.autoportal.hr/index2.php?option=com_rss&feed=RSS2.0&no_html=1' },
		{ title: 'Autoholik', url: 'http://autoholik.net/rss-articles/' },
		{ title: 'Autoweb', url: 'http://www.autoweb.hr/index.php?format=feed&type=rss' },
		{ title: 'MojSkuter', url: 'http://www.mojskuter.com/index.php?option=com_rss&feed=RSS1.0&no_html=1' },
		{ title: 'T-Portal', url: 'http://www.tportal.hr/rss/automobilirss.xml' },
		{ title: 'Motorevija', url: 'http://www.motorevija.com.hr/rss.php' },
		{ title: 'Presretač', url: 'http://www.presretac.com/index.php?option=com_ninjarsssyndicator&feed_id=1&format=raw' },
		{ title: 'Automanija', url: 'http://www.automanija.com/rd-rss/index.php' },
		{ title: 'Automoto-portal.hr', url: 'http://automoto-portal.hr/feed' },
		{ title: 'Brzina.net', url: 'http://www.brzina.net/index2.php?option=ds-syndicate&version=1&feed_id=1' },
		{ title: 'F1Racing', url: 'http://f1racing.com.hr/index.php?format=feed&type=rss' },
		{ title: 'Auto-motor i sport', url: 'http://www.automotorisport.hr/rss.php' },
		{ title: 'AutoKlub', url: 'http://autoklub.jutarnji.hr/rss' },
		{ title: 'Automotozilla', url: 'http://www.automotozilla.com/feed' },
		{ title: 'Auto Moto Nautic Vision', url: 'http://www.automotovision.hr/rss/rss.xml' },
		{ title: '4Kotača', url: 'http://feeds.feedburner.com/4kotaca' },
		{ title: 'Autosport.hr', url: 'http://www.autosport.hr/component/bca-rss-syndicator/?feed_id=1' },
		{ title: 'Test vožnja', url: 'http://www.testvoznja.net/index.php?format=feed&type=rss' },
		{ title: 'Metro', url: 'http://metro-portal.hr/feed/index/news/303' },
		{ title: 'Šesta brzina', url: 'http://www.sestabrzina.com/feed/' },
		{ title: 'Rabljena vozila', url: 'http://www.rabljenavozila.hr/component/option,com_rss/feed,RSS2.0/no_html,1/' },
		{ title: 'HR Autosport', url: 'http://www.hrautosport.com/portal/index.php?option=com_rss&feed=RSS0.91&no_html=1' }
	 ];
	var options = {
		numResults: 3,
		displayTime: 5000,
		fadeOutTime: 500,
		stacked: true,
		horizontal: false,
		feedLoadCallback: linkizeTitles
	}
	new GFdynamicFeedControl(feeds, 'googlefeed', options);
}

google.load('feeds', '1');
google.setOnLoadCallback(LoadDynamicFeedControl);
