jQuery(document).ready(function(){


	if (document.documentElement.clientWidth < 1024) {
		jQuery('#twitter-box-image').attr('src', '/images/home/canoe-shorter.png');
	}

	// Home header featured images
	jQuery("#featured").find("ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 8000, true);

	// Twitter
	jQuery.post('/shared/pages/twitter.php', function(data) {

		var parsedData = jQuery.parseJSON(data);
		jQuery('#president').delay(5000).fadeOut();
		jQuery('#twitter-description').hide().html(parsedData.description).fadeIn('slow');
		jQuery('#twitter-date').html('via Twitter');

		//Execute the slideShow, set 4 seconds for each images
		slideShow(4000);
	});

	jQuery.post('/shared/pages/club-posts.php', function(data) {

		jQuery('#club-feed-posts').html(data);
	});

	
	// Programma link
	jQuery("#programma").click(function(event){
      event.preventDefault();
      jQuery("#programma-info").fadeIn("slow");
   });

	// Mailing list link
	jQuery("#mailing-list").click(function(event){
      event.preventDefault();
      jQuery("#mailing-list-info").fadeIn("slow");
   });


	
});

//  Google Feed API
function OnLoad() {
	var tinoFeed = new google.feeds.Feed("http://swordpagaie.blogspot.com/feeds/posts/default");
	tinoFeed.load(printTinoFeedTitles);
	var cazzanigaFeed = new google.feeds.Feed("http://alexdemels.blogspot.com/feeds/posts/default");
	cazzanigaFeed.load(printCazzanigaFeedTitles);
	//var clubFeed = new google.feeds.Feed("http://www.trezzokayak.it/feed/subscribe/");
	//clubFeed.load(printClubFeed);
}
google.setOnLoadCallback(OnLoad);

