$(document).ready(function() {
	$f("video"
		,"skel/swf/flowplayer-3.1.1.swf"
		,{
			clip: { 
					baseUrl: 'http://cloudfront.verenate.net/math-action.com'
					,accelerate:true
					,autoPlay:false
					,autoBuffering:true
					,onStart:  function(clip) {
                  pageTracker._trackEvent("Videos","Play",clip.url);
               }
				}
		}
	).playlist("div.video-clips",{loop:true});
	$("div.video-clips a").each(function() {
		var rrr=Math.floor(Math.random()*2400)+600;
		$(this).animate({"top":0},rrr);
	});
	
	$("div.scrollable").scrollable({size:1, loop:true});
});

/* {{{ presentation */
$(document).ready(function(){
	var api=$("#presentation").scrollable({
		items: '.presentations',
		size:  1,
		clickable: true
	}).navigator({api:true,navi:".navi"});
/*
	if(window.api!=undefined) {
		api.seekTo(Math.floor(Math.random()*api.getSize()));
	}
*/

	$(".img-sommaire").hover(function(){
			$("div.overlay").animate({"top":"0","height":"200px","opacity":1});
		},function(){
			$("div.overlay").animate({"top":"200px","height":0,"opacity":0});
		});
});
