
First you must include both the Froogaloop library and vire.js
Using vire is easy, the following demo code shows you how to execute code at 1 and 3 seconds. You can add as many events as you would like.
$(document).ready(function(){
$('#player_0').vire([
{
'eventTime': 1,
'cb': function(){
$('#video-wrapper').addClass('grow');
}
},
{
'eventTime': 3,
'cb': function(){
$('body').addClass('black');
}
}
]);
$('#player_0').vireAdd(3, function(){
$('body').addClass('black');
});
});