
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: 'GameBox', url: 'http://www.gamebox.hr/index.php?option=com_ninjarsssyndicator&feed_id=1&format=raw' },
		{ title: 'Lock n Load', url: 'http://lnl.com.hr/rss/' },
		{ title: 'Igre385', url: 'http://hr.igre385.net/feed/rss/' },
		{ title: 'Gameland', url: 'http://gameland.jutarnji.hr/feed/' },
		{ title: 'fps 4 me', url: 'http://feeds.feedburner.com/fpsforme' },
		{ title: 'HCL.hr', url: 'http://www.hcl.hr/rss/vijesti.php' },
		{ title: 'Zarazno', url: 'http://www.zarazno.com/feed' }
	 ];
	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);
