
$(document).ready(function() {


	// setup overlay actions to buttons
	$("div[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();
		}
	});				
	
	// setup player 
	$f(".player", "/js/flowplayer/flowplayer.swf", {
		autoBuffering: true,
		clip: {
			baseUrl: 'http://www.pelagea.ru',
//			provider: 'pseudo',
//			autoPlay: true,
			scaling: 'orig'
		},
		canvas: {
		    // configure background properties
		    //background: '#000000 url(/swf/example.swf) no-repeat 30 10',
		    // setup a light-blue border
		    //border:'2px solid #778899',
		    // remove default canvas gradient
		    backgroundGradient: 'none'
		},
		plugins: { 
//			pseudo: { url: '/js/flowplayer/flowplayer.pseudostreaming.swf' },
 			controls: { 
				// setup auto hide
				autoHide: 'always',
				hideDelay: 2000,
				// setup a background image
				//background: 'url(/js/flowplayer/skin_pelagea.png) repeat',
				//backgroundGradient: 'none',
				// custom colors
				//bufferColor: '#333333', 
				//progressColor: '#cc0000',
				//buttonColor: '#cc0000',
				//buttonOverColor: '#ff0000',
				// tooltip background color (since 3.1.0)
				//tooltipColor: '#cc0000',
				// custom height
				height: 25,
				// a little more styling
				width: '98%',
				bottom: 5,
				left: '50%',
				borderRadius: 15
		 	}
		}
	});



//	$("#????").pngFix({ blankgif: '/images/blank.gif' }); 



	$(".zebra li:even").addClass("even");

	$("a[href^=http://]").attr('target','_blank');

});

