// JavaScript Document
$(function() {
	// setup overlay actions to buttons
	$("a[rel]").overlay({
		// use the Apple effect for overlay
		effect: 'apple',		
		expose: '#789',				
		onLoad: function(content) {
			// find the player contained inside this overlay and load it
			this.getOverlay().find("a.player").flowplayer(0).load();
		},
		
		onClose: function(content) {
			$f().unload();
		}
	});				

});	


// JavaScript Document

function video(param0,param1,param2,param3)
{
	$f(param0, "/scripts/flowplayer/flowplayer.commercial-3.1.5.swf", { 
	key:'#$aa2da16a811667a54a5', 
    log: { level: 'debug', filter: 'org.flowplayer.captions.*'}, 
    clip: { 
        url: param1, 
 // this is the Timed Text file with captions info 
        captionUrl: param2 ,
		 // track start event for this clip        
		onStart: function(clip) {            
			pageTracker._trackEvent("Videos", "Play", clip.url);        
		},		
		// track finish event for this clip        
		onFinish: function(clip) {            
			pageTracker._trackEvent("Videos", "Finish", clip.url);        
		}             
    }, 
    plugins:  { 
	 controls: { 
            stop: true 
        },
 	  captions: { 
            url: '/scripts/flowplayer/flowplayer.captions-3.1.4.swf', 
 		 // pointer to a content plugin (see below) 
            captionTarget: 'content' 
        }, 
 
        // configure a content plugin to look good for our purpose 
        content: { 
            url:'/scripts/flowplayer/flowplayer.content-3.1.0.swf', 
            bottom: 25, width: '88%',  height:60,  backgroundColor: 'transparent', backgroundGradient: 'low', 
            borderRadius: 4, border: 0, display: param3,
 
            style: { 
                'body': { fontSize: '14px', fontFamily: 'Arial', textAlign: 'center', color: '#000000' 
                } 
            } 
        } 
    } 
	});

}
