        $(function() {
        
            // setup overlay actions to buttons
            $("button[rel]").overlay({
                
                // setup exposing (optional operation);
                onBeforeLoad: function() {
                    this.expose();	
                },				
                
                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();
                    
                    // cloase exposing
                    $.expose.close();
                }
            });				
            
            // install flowplayers
            $("a.player").flowplayer("/Scripts/flowplayer.commercial-3.1.0.swf", {
									 
			key: '#@462e75aa8e8ef4cc592',
									 
				
				//background canvas for video setup
			canvas: { 
				backgroundColor: '#000000', 
				backgroundGradient: [0.3, 0.2, 0.1]
				},
				
				
				//plugins and player controls
			plugins: { 		
				controls: {
				  url: 'airproplayer.controls-3.1.0.swf' ,
				  bufferGradient: 'none',
				  backgroundColor: '#535252',
				  timeColor: '#ffffff',
				  durationColor: '#ffffff',
				  progressColor: '#ffff00',  // dark
				  buttonColor: '#423a3b',  //button colour
				  sliderGradient: 'none',
				  borderRadius: '0',
				  sliderColor: '#000000',
				  backgroundGradient: 'low',
				  buttonOverColor: '#000000',
				  bufferColor: '#5b4d4d',  // pale
				  progressGradient: 'medium',
				  autoHide: 'always',
				  width: '98%',  
				  bottom: 5, 
				  left: '50%', 
				  borderRadius: 15,
				  opacity: 1.0,
				  playlist: true 
					}
			}, 
			
				// play button code
			play: {
				url: '/images/overlay/play_large_red.png',
				width: 83,
				height: 83
			},
			
			// context menu  
				 contextMenu: [ 
			 
				'Copyright &copy; Northern Image 2009',
				'-',
				'Player by Airpro Software',
				'www.airprosoftware.com',
				 ]
		
		
				}	  // close of player extras
									 
									 );
			
			 
			
        });	