﻿     $(function() {

                        // install flowplayer into flowplayer container
                        var player = $f("player", "http://releases.flowplayer.org/swf/flowplayer.commercial-3.1.5.swf", { 
                                // commercial version requires product key 
                                key: '#@a99320e15e0555c3642', 
                                                 
                                // now we can tweak the logo settings 
                                logo: { 
                                    url: '',
                                    fullscreenOnly: false,
                                    zIndex:0, 
                                    top: '45%',
		                            left: '50%'
                                },
                                buffering: null,
                                                                                                
                                plugins: {

		                        // custom controlbar settings. colors and button visibilities
		                        controls: {
			                        height: 32,
			                        backgroundColor: 'transparent',
			                        backgroundGradient: 'none',
			                        autoHide: 'always',
			                        volume: true,
			                        mute: false,
			                        sliderColor: '#666666',
			                        bufferColor: '#333333',
			                        progressColor: '#dddddd',
			                        buttonColor: '#333333',
			                        timeColor: '#ff0000',
			                        fullscreen: false,
			                        buttonOverColor: '#ff0000'
		                        },

		                        // content plugin is shown when context menu entry is selected
		                        content: {
			                        url: 'flowplayer.content-3.1.0.swf',
			                        height:250,
			                        backgroundColor:'#112233',
			                        padding:20,
			                        display:'none',
			                        closeButton: true,
			                        style: {
				                        h3: {fontSize:18},
				                        p:  {kerning: 20},
				                        a:  {color:'#fffc00'}
			                        }
		                        }
	}

 
                                
                               
                            });
                        // setup button action. it will fire our overlay 
                        $("img[rel]").overlay({
                    		
                            // use the Apple effect for overlay
                            effect: 'apple',		
		                    expose: '#111',
                    		
                            // when overlay is opened, load our player
                            onLoad: function() {
                                player.load();
                            },
                    		
                    		
                            // when overlay is closed, unload our player
                            onClose: function() {
                                player.unload();
                            }
                        });
                        
                         // setup button action. it will fire our overlay 
                        $("a[rel]").overlay({
                    		
                            // use the Apple effect for overlay
                            effect: 'apple',		
		                    expose: '#111',				
		
                    		
                            // when overlay is opened, load our player
                            onLoad: function() {
                                player.load();
                            },
                    		
                    		
                            // when overlay is closed, unload our player
                            onClose: function() {
                                player.unload();
                            }
                        });
                      
                 });       
                     
   
