	jQuery(function() {

		// setup overlay actions to buttons
		// FOR FLOWPLAYER ONLY
		jQuery("a[rel*=flow]").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();
			},
			
			finish:  { 
				top: 'center',
				left: 'center',
				absolute: false
				}
			
			
			
		});		
		
		
		// install flowplayers
		jQuery("a.player").flowplayer("flow/flowplayer-3.1.2.swf"); 
	
	
	
	
	
	
		// FOR OVERLAYS ONLY
		jQuery("a[rel*=overlay]").overlay({

			// setup exposing (optional operation);
			onBeforeLoad: function() {
				this.getBackgroundImage().expose({api: true}).load();	
			},				
			
			onClose: function(content) {
				$f().unload();
				
				// close exposing
				this.getBackgroundImage().expose().close();
			},
			
			finish:  { 
				top: 'center',
				left: 'center',
				absolute: false
				}
		});	
	});