
    
/*
 * Copyright 2010 Capitol Broadcasting Company, Inc.
 */

var wral_player_api_5844180;
function wral_insert_video_player_5844180(w, h, bgcolor)
{
    if (!w) w = 330; //300
    if (!h) h = 280 * (w / 330);  // scale proportionally 230
    if (!bgcolor)  bgcolor = "#ffffff";
    
    preroll_cue_points_5844180 = false;
    
    /**
     * Sets up the video player
    **/
    window.addEvent('domready', function() {
    	wral_player_api_5844180 = flashembed('embeded_wral_video_player_5844180',{src: 'http://wwwcache.wralsportsfan.com/presentation/v1/flash/flowplayer/FlowPlayerLight.swf', wmode: 'transparent', height: h-50, width: w-30, allowScriptAccess:'always', style: 'margin:0px;'  }, {config: {
    	     playList: [ 
                             { id:5844180 ,
                               name: 'Southeast Raleigh vs. Holly Springs',
                               url: 'rtmp://media.wralsportsfan.com/media/video/asset/content/football_friday/2009/08/22/5844180/75497-hollysprings-576x324-15-768',
                               
                               controlEnabled: true,
                               vtype: 'video' }
                                 ],   
    	    splashImageFile: 'http://wwwcache.highschoolot.com/asset/content/football_friday/2009/08/22/5844180/75497-hollysprings-290x217.jpg',
    	    usePlayOverlay: false,
    	    playerId: '5844180',
    	    initialScale: 'scale',
    	    showVolumeSlider: true,
    	    showFullScreenButton: true,
    	    showMenu: true,
    	    autoPlay: false,
    		controlsOverVideo: 'ease',
    		controlBarBackgroundColor: -1,
    		controlBarGloss: 'low',
    		videoHeight: h-30,
    		loop: false,
    		hideControls: false,
    		embedCode: '<script src="http://www.highschoolot.com/football_friday/video/5844180/?version=embedded" type="text/javascript"></script><script type="text/javascript"> width=330; height=280; wral_insert_video_player_5844180(width,height); </script>',
    		menuItems: [ 1, 1, 1, 1, 1, 1, 0 ],
    		from: '"WRALSportsFAN.com" <emailnews@wralsportsfan.com>',
    		emailVideoLink: 'http://www.highschoolot.com/football_friday/video/5844180/'
    	}});
    	
    	var bottom_element = new Element('div',{
            'id': 'bottom_5844180',
            'styles': {
                'margin': '0px',
                'padding': '0px',
                'width': (w-29)+'px',
                'height': '30px',
                'background-color': '#2e3855',
                'white-space': 'nowrap',
                'overflow': 'hidden'
            }
        });
        
        var wral_img = new Element('img',{
            'src' :'http://wwwcache.wralsportsfan.com/presentation/v1/images/videoplayer/embed_bottom_left.png',
            'styles': {
                'margin': '0px',
                'float':'left',
                'padding': '0px',
                'border': '0px'
            }
        });
        
        var morevid_img = new Element('img',{
            'src' :'http://wwwcache.wralsportsfan.com/presentation/v1/images/videoplayer/embed_bottom_right.png',
            'styles': {
                'margin': '0px',
                'float':'right',
                'padding': '0px',
                'border': '0px'
            }
        });
        
        var wral_link = new Element('a',{'href' :'http://www.wralsportsfan.com/', target:'_blank'});
        var morevid_link = new Element('a',{'href' :'http://www.highschoolot.com/football_friday/video/5844180/', target:'_blank'});

        wral_img.inject(wral_link);
        morevid_img.inject(morevid_link);
        wral_link.inject(bottom_element);
        morevid_link.inject(bottom_element);

        bottom_element.inject($('embeded_wral_video_player_5844180'),'bottom');
                
        var top_left_curve = new Element('img',{
            'src' :'http://wwwcache.wralsportsfan.com/presentation/v1/images/videoplayer/embed_top_left.png',
            'styles': {
                'position': 'absolute',
                'top': '10px',
                'left': '15px',
                'padding': '0px',
                'border': '0px',
                'margin': '0px'
            }
        });
        top_left_curve.inject($('embeded_wral_video_player_5844180'),'top');
        
        var top_right_curve = new Element('img',{
            'src' :'http://wwwcache.wralsportsfan.com/presentation/v1/images/videoplayer/embed_top_right.png',
            'styles': {
                'position': 'absolute',
                'top': '10px',
                'left': (w-25) + 'px',
                'padding': '0px',
                'border': '0px',
                'margin': '0px'
            }
        });
        top_right_curve.inject($('embeded_wral_video_player_5844180'),'top');
        
//        var play_button = new Element('img',{
//            'src' :'http://wwwcache.wralsportsfan.com/presentation/v1/images/videoplayer/embed_play.png',
//            'id': 'play_button_5844180',
//            'styles': {
//                'position': 'absolute',
//                'top': ((h-10)/2)-25 + 'px',
//                'left': ((w-15)/2)-120 + 'px',
//                'padding': '0px',
//                'border': '0px',
//                'margin': '0px'
//            }
//        });
//        play_button.addEvent('click', function(){
//            alert('play');
//            alert(wral_player_api_5844180.getPlayerId());
//			alert(2);
//        });
//
//        play_button.inject($('embeded_wral_video_player_5844180'),'top');
        
        
        
        
        
  });
  
}document.write("<div id='embeded_wral_video_player_5844180' style='padding:10px 15px; margin:0px; position:relative;'></div>");if(!document.getElementById("wral_mootools_core_include")){document.write("<script id='wral_mootools_core_include' type='text/javascript' src='http://wwwcache.wralsportsfan.com/presentation/v1/javascript/mootools/mootools-1.2-core.js'><" + "/script>\n");}if(!document.getElementById("wral_mootools_more_include")){document.write("<script id='wral_mootools_more_include' type='text/javascript' src='http://wwwcache.wralsportsfan.com/presentation/v1/javascript/mootools/mootools-1.2-more.js'><" + "/script>\n");}if(!document.getElementById("wral_flashembed_include")){document.write("<script id='wral_flashembed_include' type='text/javascript' src='http://wwwcache.wralsportsfan.com/presentation/v1/javascript/flash/flashembed.js'><" + "/script>\n");}if(!document.getElementById("wral_embed_callbacks_include")){document.write("<script id='wral_embed_callbacks_include' type='text/javascript' src='http://wwwcache.wralsportsfan.com/presentation/v1/javascript/flash/embedplayer_callbacks.js'><" + "/script>\n");}

