
var w=640;
var h=360;
function playerFP(id,codice) {
	flowplayer(id, {
				 	src: "http://video.wineuropa.it/plugins/flowplayer/swf/flowplayer-3.2.7.swf",
				 	wmode: "transparent",
				}, {
					// change the default controlbar to tube
            		plugins: {
                		controls: {
                			url: 'http://video.wineuropa.it/plugins/flowplayer/swf/flowplayer.controls-3.2.5.swf',
                			stop: true
                		} 
            		},
                	clip: {
                		baseUrl: 'http://video.wineuropa.it/v/flv/',
                		autoBuffering: true,
    					autoPlay: true, 
    					scaling: 'fit',
    					image: true
    				},
    				canvas:  {
    						backgroundGradient: 'none',
    						background: '#000000',
            				border: '0px none'
    				},
    				content: {
                        backgroundGradient: 'none',
    					background: '#000000',
            			border: '0px none'
                    },
					key: '#$2b85c86b84908e4db6f',
    				logo: {
                		url: 'http://video.wineuropa.it/img/wineuropa.png',
                		linkUrl: 'http://video.wineuropa.it',
                		fullscreenOnly: true,
                		opacity: 0.7
                	}
				}
	);
}
function playerFP2(id,codice) {
	flowplayer(id, "http://video.wineuropa.it/flowplayer-3.1.5.swf", {
				// change the default controlbar to tube
            	plugins: {
            		controls: {
            			url: 'http://video.wineuropa.it/flowplayer.controls-3.1.5.swf'
            		} 
            	},
            	clip: {
            		baseUrl: 'http://video.wineuropa.it/v/flv/',
					autoPlay: true, 
					scaling: 'fit',
					autoBuffering: true,
					image: true
				},
				canvas:  {
					style: {
						background: 'none',
        				backgroundGradient: 'none',
        				backgroundColor: '#000000'
					}
				},
				key: '#$2b85c86b84908e4db6f',
				logo: {
            		url: 'http://video.wineuropa.it/img/wineuropa.png',
            		linkUrl: 'http://video.wineuropa.it',
            		fullscreenOnly: true,
            		opacity: 0.7
            	}
	});
}
function playerFPW(id,codice) {
	flowplayer(id, "http://video.wineuropa.it/plugins/flowplayer/swf/flowplayer-3.2.7.swf", {
				// change the default controlbar to tube
            	plugins: {
            		controls: {
            			url: 'http://video.wineuropa.it/plugins/flowplayer/swf/flowplayer.controls-3.2.5.swf',
            			stop: true
            		} 
            	},
            	clip: {
            		baseUrl: 'http://video.wineuropa.it/v/flv/',
					autoPlay: true, 
					scaling: 'fit',
					autoBuffering: true,
					image: true
				},
				canvas:  {
                        backgroundGradient: 'none',
						background: '#000000',
        				border: '0px none'
                },
                content: {
                    backgroundGradient: 'none',
					background: '#000000',
    				border: '0px none'
                },
				key: '#$2b85c86b84908e4db6f',
				logo: {
            		url: 'http://video.wineuropa.it/img/wineuropa.png',
            		linkUrl: 'http://video.wineuropa.it',
            		fullscreenOnly: true,
            		opacity: 0.7
            	}
	});
}
function play(codice,titolo,format) {
			jQuery('#wall3d').fadeOut();
			jQuery('#video-last').fadeIn();
            document.getElementById('play-video').innerHTML='<a href="http://video.wineuropa.it/v/flv/'+codice+'.flv" style="display:block;width:'+ w +'px;height:'+ h +'px;" id="player"></a>';
            document.getElementById('titolo-video').innerHTML=titolo;
            playerFP("player",codice);
            //flowplayer("player").play();
}
function buffer(codice,titolo) {
            document.getElementById('play-video').innerHTML='<a href="http://video.wineuropa.it/v/flv/'+codice+'.flv" style="display:block;width:'+ w +'px;height:'+ h +'px;" id="player">'+
            													'<img alt="" src="http://video.wineuropa.it/v/grab/'+codice+'.jpg" height="100%" />'+
            													'<img id="playImg" src="http://video.wineuropa.it/img/play.png" />';
            												'</a>';
            document.getElementById('titolo-video').innerHTML=titolo;
            playerFP("player",codice);
}
function run_tinymce(editor) {
    tinyMCE.init({
        // General options
        mode : 'textareas',
        editor_selector : editor,
        entity_encoding : 'raw',
        language : 'it', 
        theme : 'advanced',
        skin : 'o2k7',
        skin_variant : 'silver',
        plugins : 'pagebreak,style,layer,advhr,advlink,emotions,iespell,inlinepopups,insertdatetime,searchreplace,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,wordcount,autosave,safari',
        forced_root_block : '',
        width : '607px',
        convert_urls : false,
        theme_advanced_font_sizes : '10px=1,12px=2,14px=3,16px=4,18px=5,20px=6,32px=7', 
        font_size_style_values : '10px,12px,14px,16px,18px,20px,32px',
        theme_advanced_blockformats : 'p,div,h1,h2,h3,h4,h5,h6,address,blockquote,dt,dd,code,samp',
        extended_valid_elements : 'form[accept|accept-charset|action|class|dir<ltr?rtl|enctype|id|lang|method<get?post|name|onclick|ondblclick|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onsubmit|style|title|target],iframe[id|class|src|width|height|name|align|frameborder|scrolling|marginheight|marginwidth],input[accept|accesskey|align<bottom?left?middle?right?top|alt|checked<checked|class|dir<ltr?rtl|disabled<disabled|id|ismap<ismap|lang|maxlength|name|onblur|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onmousedown|onmousemove|onmouseout|onmouseover|onchange|onmouseup|onselect|readonly<readonly|size|src|style|tabindex|title|type<button?checkbox?file?hidden?image?password?radio?reset?submit?text|usemap|value]', 
        // Theme options
        theme_advanced_buttons1 : 'cut,copy,paste,pastetext,separator,undo,redo,separator,bold,italic,underline,strikethrough,separator,link,unlink,formatselect,separator,cleanup,removeformat,charmap,code',
        theme_advanced_buttons2 : '',
        theme_advanced_buttons3 : '',
        theme_advanced_toolbar_location : 'top',
        theme_advanced_toolbar_align : 'left',
        theme_advanced_statusbar_location : 'bottom',
        theme_advanced_resizing : true
    });
}


