$(document).ready(function(){
	
$("#scrolling-content").scrollable({ 
 	size:1,
    loop:true,
    clickable:true,
    vertical:false,
	items: '#scrolling-videos',
	next: '.next',
	prev: '.prev',
	disabledClass: 'disabled',
	// each time scrolling occurs, the active player is unloaded
		onSeek: function() {
			$f().unload();
		}

});


flowplayer("a.player", "http://mint.cm-dev.com.au/mint/wp-content/themes/mint/flash/flowplayer-3.1.1.swf", {
plugins: {  
      controls:  { 
	       url: 'http://mint.cm-dev.com.au/mint/wp-content/themes/mint/flash/flowplayer.controls-3.1.1.swf', 
            backgroundGradient: 'none',             
            all:false, 
            autoHide: "always",
            volume: true,
            play: true,
            stop:true,
            scrubber:true, 
            height:30, 
            progressColor: '#6d9e6b', 
            bufferColor: '#333333' 
          } 
}, wmode: "transparent",
        
    // 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(); 
        
        // Remove class 
            wrap.removeClass('small');     
         
        // start growing animation 
        wrap.animate({width:164, height:111}, 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:121, height:82}, 500, function()  { 
                 
            // make play button visible again 
            $(this).find("img").fadeIn();      
            
            // Add class 
            $(this).addClass('small');      
        });                 
    },  
     
    // when playback finishes perform our custom unload action 
    onFinish: function() { 
        this.unload();     
    } 
    
    
     
});
		

});

Cufon.replace('#sidebar h3');
Cufon.replace('#homepage h2');
Cufon.replace('h1');


