$f("a.player", "/swf/flowplayer-3.0.3.swf", { 
     
    // perform custom stuff before default click action 
    onBeforeClick: function() { 
         
        // unload previously loaded player 
        $f().unload(); 
         
        // get wrapper element as jQuery object 
        var wrap = $(this.getParent()); 
         
        // hide nested play button 
        wrap.find("img").fadeOut(); 
         
        // start growing animation 
        wrap.animate({width:406, height:303}, 500, function() { 
         
            // when animation finishes we will load our player 
            $f(this).load(); 
             
        });     
         
        // disable default click behaviour (player loading) 
        return false;  
    },  
 
    // unload action resumes to original state         
    onUnload: function() { 
        $(this.getParent()).animate({width:190, height:150}, 500, function()  { 
                 
            // make play button visible again 
            $(this).find("img").fadeIn();         
        });                 
    },  
     
    // when playback finishes perform our custom unload action 
    onFinish: function() { 
        this.unload();     
    } 
     
});
