﻿// Trivial code fetching your latest 4square checkins.
//
// You need to include: 
// - http://www.google.com/jsapi
// - jquery-1.3.2.min.js
// - jquery.rssfetch.js
// in that order, for that script to load correctly.


// Widget configuration  --
//
// the ID of the 4square container in your HTML page,
var widgetId = 'checkins'
// the type of container for the checkin items
var itemType = 'p'
// the URL of your ckeckins RSS feed
var feedURL = 'http://feeds.foursquare.com/history/LMEBNN4UXRVWVMZOCR1TNGFJ3MU2KQJM.rss'
// the amount of checkins you want to display
var count = 2
// prefix and suffix phrases for current status
var curPrefix = "En ce moment, je suis"
var curSuffix = "et c'est trop bien !"
// prefix and suffix phrases for past statuses
var prevPrefix = "Avant, j'étais"
var prevSuffix = "et c'était vraiment pas mal non plus."
///////////////////////////////////////////////////////////////////////



// You can't touch this --
// be nice to our users
if (widgetId.charAt(0) != '#') { widgetId = '#' + widgetId }
// load the google feed API
google.load("feeds", "1");
// Populate our widget
$(document).ready(function(){							   
	($(widgetId).feedfetcher({
				feed_source: feedURL,
				checkin_count: count,
				cur_text: [curPrefix, curSuffix],
				prev_text: [prevPrefix, prevSuffix],
				item_type: itemType,
		}));
});
// --