

/**
function blogCycle(){
    var posts = $$('div.home-whats-new');
    var nPost = posts.length -1;
    posts.invoke('hide');//hide all the posts
    posts[0].show();//show the first
    var i = 0;
    //initiate the cycle
    new PeriodicalExecuter(function(pe){
	if(i <= nPost){
	    posts.invoke('hide');//hide all the posts
	    posts[i].toggle();//show the current index
	    console.log(i);
	    i++;
	}

	if(i > nPost){
	    //reset the counter to minus 1 so it gets incremented to 0
	    i = 0;
	}
    },1);
}

**/
Event.observe(window, 'load', function(event) {
    //initiate the Horinaja plugin if it is present
    if(window.Horinaja){
	new Horinaja('slider',0.3,4,false);
    }

    //call the twitterjs script
    getTwitters('tweets', {
	id: 'bosonmedia',
	count: 1,
	enableLinks: true,
	ignoreReplies: true,
	clearContents: true
    });
    
});

