﻿// JScript File
$(function() {

	// setup overlay actions to buttons
	$("button[rel]").overlay({

		// setup exposing (optional operation);
		onBeforeLoad: function() {
			this.getBackgroundImage().expose({api: true}).load();	
		},				
		
		onLoad: function(content) {
			// find the player contained inside this overlay and load it
			this.getContent().find("a.player").flowplayer(0).load();
		},
		
		onClose: function(content) {
			$f().unload();
			
			// close exposing
			this.getBackgroundImage().expose().close();
		}
	});				
	
	// install flowplayers
	$("a.player").flowplayer("/swf/flowplayer-3.1.1.swf"); 
});	
