<?php
/*
Plugin Name: WP-ExtremeVideo
Plugin URI: http://www.2rue.de/technikgehubere/hacking/extreme-video-plugin/
Description: Adds Google, YouTube, FLV, and MOV Video to a wordpress Entry.

Version: 2.3.rue.1 BETA
Author: R&uuml;diger Schulz
Author URI: http://www.2rue.de/

Based on:

Version: 2.3 BETA
Author: Ross Gerbasi
Author URI: http://www.rossgerbasi.com

* Visit the site for Instructions of how to embed into Posts

Basics:

[gv data="XX" width="XX" height="XX"][/gv]

"data=" Options
    path to google video 
    google video: "docid=XX"
    you tube code
    you tube perm link
    you tube path to video
    path to any FLV
    path to any MOV

* width and height are optional

Baisc Styles:
.googleVideo_holder, .yourTubeVideo_holder, .personalPlayerVideo_holder, .quickTimeVideo_holder{
        text-align:center;
        border: 1px solid #a9a9a9;
        padding: 10px 10px 10px 10px;
        background:rgb(200,200,200);
}

.googleVideo, .yourTubeVideo, .personalPlayerVideo, .quickTimeVideo{
        border: 2px solid #a9a9a9;
        background:rgb(255,255,255);
        padding: 0px 0px 0px 0px;
}

.googleVideo_link, .yourTubeVideo_link, .personalPlayerVideo_link, .quickTimeVideo_link{
        font-size:.8em;
        width:100%;
        text-align:right;
}

Version Info:
Version 1.0:
    Adds Google video from a URL
    [] tags were used to avoid problems with the tinyMCE editor
Version 1.1:
    You Tube Support
    Added DEFINED variables for customization
    Added Google Javascript to support Full Screen Buttons (requires sandbox hack, or local swf)
    Added Google Flash 7 Detection
    Reorganized Code to allow Other plugins to connect to the GV Plugin
Version 2.0:
    Added FLV and MOV support
    Plugin Renamed to Extreme Video
Version 2.1:
    Added Proxy for Quick Time and FLV Objects 
    Fixes for IE FLV and Quicktime
Version 2.2:
    XHTML 1.0 Transitional
Version 2.3:
    XHTML 1.0 Strict
Version 2.3.rue.1:
    * Fix: YouTube player is not padded and clipped any more.
    * Fix: Google Video updated to new embed code.
    * Fix: Prevent Wordpress' Linkification.
    * Change: not using flvPlayer.swf for GV and YT. Sorry, no fullscreen anymore.

*/

//-------------------------------------------------------------------------------------


//Defines a personal absolute url to the google SWF player
//allows for saving of the google player on your server
//for javascript access
//Browse to http://video.google.com/googleplayer.swf and save the page
//to download google's.
//* defaults to home url/gv.swf
DEFINE('GV_MYGVURL',get_settings('home').'/gv.swf');

//Defines the text to use above the google video to provide a link
DEFINE('GV_DEFAULTLINKTEXT'"View This Video on Google");
//Defines the Class to use on Link Text
DEFINE('GV_DEFAULTLINKCLASS'"googleVideo_link");
//Defines the class to use on the outter holder of the google video
DEFINE('GV_DEFAULTGVHOLDERCLASS',"googleVideo_holder");
//Defines the class to use on the wrapper of the Google Video
DEFINE('GV_DEFAULTGVCLASS',"googleVideo");

//Definitions for Your Tube
//Defines the text to use above the You Tube video to provide a link
DEFINE('YT_DEFAULTLINKTEXT'"View This Video on You Tube");
//Defines the Class to use on Link Text
DEFINE('YT_DEFAULTLINKCLASS'"yourTubeVideo_link");
//Defines the class to use on the outter holder of the You Tube video
DEFINE('YT_DEFAULTYTHOLDERCLASS',"yourTubeVideo_holder");
//Defines the class to use on the wrapper of the You Tube Video
DEFINE('YT_DEFAULTYTCLASS',"yourTubeVideo");

//Definitions for Personal FLV Player
//Defines the text to use above the Personal FLV Player to provide a link
DEFINE('PP_DEFAULTLINKTEXT'"View This Video Full Screen");
//Defines the Class to use on Link Text
DEFINE('PP_DEFAULTLINKCLASS'"personalPlayerVideo_link");
//Defines the class to use on the outter holder of the Personal FLV Player video
DEFINE('PP_DEFAULTPPHOLDERCLASS',"personalPlayerVideo_holder");
//Defines the class to use on the wrapper of the Personal FLV Player Video
DEFINE('PP_DEFAULTPPCLASS',"personalPlayerVideo");
//Path to Flash FLV PLayer SWF
DEFINE('PP_PLAYERPATH'"http://www.2rue.de/flvPlayer.swf");
//USE LOGO TO CONTROL FLV Player
DEFINE('PP_USEPPLOGO',true);


//Definitions for Quick Time Player
//Defines the text to use above the Quick Time video to provide a link
DEFINE('QT_DEFAULTLINKTEXT'"View This Video Full Screen");
//Defines the Class to use on Link Text
DEFINE('QT_DEFAULTLINKCLASS'"quickTimeVideo_link");
//Defines the class to use on the outter holder of the Quick Time video
DEFINE('QT_DEFAULTQTHOLDERCLASS','quickTimeVideo_holder');
//Defines the class to use on the wrapper of the Quick Time Video
DEFINE('QT_DEFAULTQTCLASS',"quickTimeVideo");
//USE LOGO TO CONTROL QUICKTIME
DEFINE('QT_USEQTLOGO',true);
//LOGO TO USE INSIDE THE PROXY FOR QUICKTIME
DEFINE('QT_IMAGELOGO''http://developer.apple.com/softwarelicensing/agreements/images/logo_qtlogo.gif');
//DEFINES THE PROXY TEXT UNDER THE LOGO
DEFINE('QT_PROXYTEXT''Click Here to View the QuickTime Movie');
//END EDITING
//------------------------------------------------------------------------------------

DEFINE('GV_REALGVURL''http://video.google.com');
DEFINE('YT_REALURL''http://www.youtube.com/v');
DEFINE('YT_PERMLINK''http://www.youtube.com/?v=');
DEFINE('YT_WATCHURL''http://www.youtube.com/watch?v=');
$gv_currentVideo 0;

function 
gv_parseContent($text){
    
//CODE: Modified from http://www.kimili.com/ 
    //PLUGIN: kml_flashembed
    //MODIFIED TO FIT THIS PLUGIN
    
$retString "";
        
$tag_regex      "|(\[GV.*\]\[/GV\])|Ui";
        
$tags           preg_split($tag_regex$text, -1PREG_SPLIT_DELIM_CAPTURE);
    foreach (
$tags as $token) {
                if (
preg_match($tag_regex$token)) {
                        
# Clean up and untexturize tag
            
$strip = array('[GV''[gv''][/GV]''][/gv]''\n''<br>''<br />');
                        
$elements str_replace($strip''$token);
                        
$elements preg_replace("/=(\s*)\"/""==`"$elements);
                        
$elements preg_replace("/=(\s*)&Prime;/""==`"$elements);
                        
$elements preg_replace("/=(\s*)&prime;/""==`"$elements);
                        
$elements preg_replace("/=(\s*)&#8221;/""==`"$elements);
                        
$elements preg_replace("/\"(\s*)/""`| "$elements);
                        
$elements preg_replace("/&Prime;(\s*)/""`|"$elements);
                        
$elements preg_replace("/&prime;(\s*)/""`|"$elements);
                        
$elements preg_replace("/&#8221;(\s*)/""`|"$elements);
                        
# Convert any quasi-HTML back into tags
                        
$elements preg_replace("/{(.*?)}/i""<$1>"$elements);
                        
$attpairs preg_split('/\|/'$elements, -1PREG_SPLIT_NO_EMPTY);
                        
$atts = array();
                        
# Create an associative array of the attributes
                        
for ($x 0$x count($attpairs); $x++) {

                                
$attpair                explode('=='$attpairs[$x]);
                                
$attn                   trim(strtolower($attpair[0]));
                                
$attv                   preg_replace("/`/"""trim($attpair[1]));
                                
$atts[$attn]    = $attv;
                        }
    
//END OF MODIFIED CODE
            
$atts['data'] == null $realString "No URL" $url $atts['data'];
            
$wid $atts['width'];
            
$hei $atts['height'];
            
            if(
strpos($url"google") !== false){
                
$retString .= gv_returnGVObject($url$wid$hei);
            }elseif(
strpos($url"docid=") !== false){
                
$retString .= gv_returnGVObject_new($url$wid$hei);
            }elseif(
strpos($url".flv") !== false){
                
$retString .= gv_returnPPObject($url$wid$hei);
            }elseif(
strpos($url".mov") !== false){
                
$retString .= gv_returnQTObject($url$wid$hei);
            }else{
                
$retString .= gv_returnYTObject($url$wid$hei);
            }
        }else{
            
$retString .= $token;
        }
    }
    return 
$retString;
}


//Function to return a Quick Time embeded Video Object
function gv_returnQTObject(
            
$url,
                        
$wid,
                        
$hei,
                        
$linkText=QT_DEFAULTLINKTEXT,
                        
$linkClass=QT_DEFAULTLINKCLASS,
                        
$qtHolder=QT_DEFAULTQTHOLDERCLASS,
                        
$qt=QT_DEFAULTQTCLASS,
            
$useLogo=QT_USEQTLOGO)
                        {
    global 
$gv_currentVideo;
    
$gv_currentVideo++;

        
$wid == null $wid "425" null;
        
$hei == null $hei "350" null;

        
strpos($wid"px") === false $wid.="px" null;
        
strpos($hei"px") === false $hei.="px" null;

    
$flashStr "<ins>";

        if(
strlen($linkText) > 0){
                
preg_match("/v\/(.*)/"$url$pID);
                
$flashStr .= "<div class='$linkClass'>";
                
$flashStr .="<a href=\"javascript:qt_openWindow('$url')\" onmouseover=\"window.status='$linkText';return true\" onmouseout=\"window.status='';return true\">$linkText</a>";
              
$flashStr .= "</div>";
        }
        
$flashStr .= "<div class='$qtHolder' ";
    
$useLogo === true $flashStr .= "style='display:none;'"null;
    
$flashStr .= " id ='qtHolder_$gv_currentVideo'>";
        
$flashStr .= "<div style='height:$hei;";
    
$flashStr .= "' class='$qt'>";
    
$flashStr .= "<object width='".intval($wid)."' height='".intval($hei)."' classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' codebase='http://www.apple.com/qtactivex/qtplugin.cab'>";
    
$flashStr .= "<param name='src' value='$url'/>";
    
$flashStr .= "<param name='autplay' value='";
    
$useLogo === true $flashStr .= "true"$flashStr .="false";
    
$flashStr .= "'/>";
        
$flashStr .= "<param name='controller' value='true'/>";
        
$flashStr .= "<param name='scale' value='Aspect'/>";
    
$flashStr .="<object type='video/quicktime' data='$url' width='".intval($wid)."' height='".intval($hei) ."' class='gv_mov'>"
    
$flashStr .= "<param name='autplay' value='";
    
$useLogo === true $flashStr .= "true"$flashStr .="false";
        
$flashStr .= "'/>";
        
$flashStr .= "<param name='controller' value='true'/>";
        
$flashStr .= "<param name='scale' value='Aspect'/>";
    
$flashStr .="</object>";
    
$flashStr .= "</object>";
    
$flashStr .="</div></div>";
    
$flashStr .= "</ins>";    
        
$retString .= $flashStr;
    if(
$useLogo){

    
$holderStr "<ins>";
    
$holderStr .= "<div style='height:$hei;width:$wid;' class='$qtHolder' id='qtProxy_$gv_currentVideo' onclick=\"gv_switchOn('qtHolder_$gv_currentVideo','qtProxy_$gv_currentVideo')\">
                <div style='height:
$hei;text-align:center' class='$qt'>
                    <table style='width:
$wid;height:$hei' cellpadding='0' cellspacing='0' border='0'>
                        <tr>
                            <td align='center' valign='middle'>
                            <img src='"
.QT_IMAGELOGO."'style='border:0px' alt='Quick Time Logo'/><br>
                            <b>"
.QT_PROXYTEXT."</b>
                            </td>
                        </tr>
                    </table>
                </div>
                </div>"
;
    
$holderStr .="</ins>";
        
$retString $retString .$holderStr;
    }
    return 
$retString;
}
    
//Function to return a Flash Personal Player Embeded Video Object
function gv_returnPPObject(
                        
$url,
                        
$wid,
                        
$hei,
                        
$linkText=PP_DEFAULTLINKTEXT,
                        
$linkClass=PP_DEFAULTLINKCLASS,
                        
$ppHolder=PP_DEFAULTPPHOLDERCLASS,
                        
$pp=PP_DEFAULTPPCLASS,
            
$useLogo=PP_USEPPLOGO)
                        {



        
$wid == null $wid "425" null;
        
$hei == null $hei "350" null;
       
        
strpos($wid"px") === false $wid.="px" null;
        
strpos($hei"px") === false $hei.="px" null;
 
    
$p PP_PLAYERPATH."?flvPath=".urlencode($url);

    
$useLogo === false $p .= "&playNow=1&turnOffAP=1":null;
    
$flashStr "<ins>";
        if(
strlen($linkText) > 0){
                
preg_match("/v\/(.*)/"$url$pID);
                
$flashStr .= "<div class='$linkClass'>";
        
$flashStr .="<a href=\"javascript:pp_openWindow('$p')\" onmouseover=\"window.status='$linkText';return true\" onmouseout=\"window.status='';return true\">$linkText</a>";
                
$flashStr .= "</div>";
        }
        
$flashStr .= "<div class='$ppHolder'>";
        
$flashStr .= "<div style='height:$hei;' class='$pp'>";
        
$flashStr .= "<object style='width:$wid;height:$hei' type='application/x-shockwave-flash' data='$p'>";
    
$flashStr .= "<param name='allowScriptAccess' value='sameDomain' />";
    
$flashStr .= "<param name='movie' value='$p'/>";
    
$flashStr .= "<param name='wmode' value='window'/>";
    
$flashStr .= "<param name='scale' value='noScale'/>";
    
$flashStr .= "<param name='salign' value='TL'/>";
    
$flashStr .= "</object></div></div>";
    
$flashStr .= "</ins>";
        return 
$flashStr;
}


//Function to return a You Tube Embeded Video Object
function gv_returnYTObject(
                        
$url,
                        
$wid,
                        
$hei,
                        
$linkText=YT_DEFAULTLINKTEXT,
                        
$linkClass=YT_DEFAULTLINKCLASS,
                        
$ytHolder=YT_DEFAULTYTHOLDERCLASS,
                        
$yt=YT_DEFAULTYTCLASS)
                        {

        
$wid == null $wid "425" null;
        
$hei == null $hei "350" null;

        
strpos($wid"px") === false $wid.="px" null;
        
strpos($hei"px") === false $hei.="px" null;

    if(
strpos($urlYT_REALURL) !== false){
        
$url $url;
    }else if(
strpos($urlYT_PERMLINK) !== false){
        
preg_match("/v?=(.*)/"$url$pID);
        
$url YT_REALURL"/".$pID[1];
    }else if(
strpos($url"www.youtube.com") === false){
        
$url YT_REALURL "/$url"
    }

    
$flashStr "<ins>";

        if(
strlen($linkText) > 0){
                
preg_match("/v\/(.*)/"$url$pID);
                
$flashStr .= "<p class='$linkClass'>";
                
$flashStr .="<a href='".YT_WATCHURL.$pID[1]."'>$linkText</a>";
                
$flashStr .= "</p>";
        }
        
// code by 2rue.de for new youtube code
        
$flashStr .= "<div class='$ytHolder'>";
        
$flashStr .= "<div style='height:$hei;' class='$yt'>";
        
        
$flashStr .= "<object width='$wid' height='$hei'>";
        
$flashStr .= "<param name='movie' value='$url'></param>";
        
$flashStr .= "<param name='wmode' value='transparent'></param>";
        
$flashStr .= "<embed src='$url' width='$wid' height='$hei' type='application/x-shockwave-flash' wmode='transparent'></embed>";
        
$flashStr .= "</object>";
      
        
$flashStr .= "</div></div>";
        
$flashStr .= "</ins>";
        
$retString .= str_replace("\n"""$flashStr);
        return 
$retString;
}


//Function to return a Google Video Embeded Object
function gv_returnGVObject(
            
$url
            
$wid
            
$hei
            
$linkText=GV_DEFAULTLINKTEXT,
            
$linkClass=GV_DEFAULTLINKCLASS,
            
$gvHolder=GV_DEFAULTGVHOLDERCLASS,
            
$gv=GV_DEFAULTGVCLASS)
            {

    
$wid == null $wid "400" null;
    
$hei == null $hei "326" null;
    
        
strpos($wid"px") === false $wid.="px" null;
        
strpos($hei"px") === false $hei.="px" null;

    
strpos($urlGV_REALGVURL) === false  $url GV_MYGVURL $url:null;

    
$flashStr "<ins>";
    if(
strlen($linkText) > 0){
        
$urlDecoded urldecode($url);
        
preg_match("/docId=(.*)/"$urlDecoded$pID);
        
strpos($pID[1], "&") === false null :preg_match("/(.*)&/",$pID[1], $pID);
        
$flashStr .= "<div class='$linkClass'>";
        
$flashStr .="<a href='http://video.google.com/videoplay?docid=".$pID[1]."'>$linkText</a>";
        
$flashStr .= "</div>";
    }
    
$flashStr .= "<div class='$gvHolder'>";
    
$flashStr .= "<div style='height:$hei;' class='$gv'>";
    
$flashStr .= "<object style='width:$wid; height:$hei;'";
    
$flashStr .= " type='application/x-shockwave-flash' data='$url'>";
    
$flashStr .= "<param name='allowScriptAccess' value='sameDomain' />";
    
$flashStr .= "<param name='movie' value='".$url."'/>";
    
$flashStr .= "<param name='quality' value='best'/>";
    
$flashStr .= "<param name='bgcolor' value='#ffffff' />";
    
$flashStr .= "<param name='scale' value='noScale' />";
    
$flashStr .= "<param name='wmode' value='window'/>";
    
$flashStr .= "<param name='salign' value='TL' />";
    
$flashStr .= "</object></div></div>";
    
$flashStr .= "</ins>";
    
$retString .= str_replace("\n"""$flashStr);
    return 
$retString;
}

//Function to return a Google Video Embeded Object
//altered by 2rue.de to accept data="docid=123456789" and to display new google video code
/*
<embed 
    style="width:400px; height:326px;" 
    id="VideoPlayback" 
    type="application/x-shockwave-flash" 
    src="http://video.google.com/googleplayer.swf?docId=2949700052807785459"> 
</embed>
        
*/
function gv_returnGVObject_new(
            
$url
            
$wid
            
$hei
            
$linkText=GV_DEFAULTLINKTEXT,
            
$linkClass=GV_DEFAULTLINKCLASS,
            
$gvHolder=GV_DEFAULTGVHOLDERCLASS,
            
$gv=GV_DEFAULTGVCLASS)
            {

    
$wid == null $wid "400" null;
    
$hei == null $hei "326" null;
    
        
strpos($wid"px") === false $wid.="px" null;
        
strpos($hei"px") === false $hei.="px" null;

    
$retString .= "<!-- [2rue.de debug] gv-url:$url -->";

    
$flashStr "<ins>";
    if(
strlen($linkText) > 0){
        
$urlDecoded urldecode($url);
        
preg_match("/docid=(.*)/"$urlDecoded$pID);
        
strpos($pID[1], "&") === false null :preg_match("/(.*)&/",$pID[1], $pID);
        
$flashStr .= "<p class='$linkClass'>";
        
$flashStr .="<a href='http://video.google.com/videoplay?docid=".$pID[1]."'>$linkText</a>";
        
$flashStr .= "</p>";
    }
//    $url = GV_MYGVURL . '?playerId=' . $pID[1];
    
$flashStr .= "<div class='$gvHolder'>";
    
$flashStr .= "<div style='height:$hei;' class='$gv'>";
    
$flashStr .= "<embed";
    
$flashStr .= " style='width:$wid; height:$hei;'";
    
$flashStr .= " id='VideoPlayback'";
    
$flashStr .= " type='application/x-shockwave-flash'";
    
$flashStr .= " src='http://video.google.com/googleplayer.swf?docId=".$pID[1]."'>";
    
$flashStr .= "</embed>";
    
$flashStr .= "</div></div>";
    
$flashStr .= "</ins>";
    
$retString .= str_replace("\n"""$flashStr);
    return 
$retString;
}

//Function to add basic javascript for full screen videos and flash detection
function gv_addJS(){
    echo 
"<script src='".GV_REALGVURL."/jslib/misc.js' type='text/javascript'></script>\n";

    echo 
"<script type='text/javascript'>\n
        <!--
               function getFullScreenWindowParams() {
                        return 'toolbar=no' + ',width=' + screen.availWidth
                        + ',height=' + screen.availHeight
                        + ',status=no,resizable=yes,fullscreen=yes'
                        + ',scrollbars=0';
                }

                function goFullscreen(videoPath, time, state) {
                        var time = 0;
                        var timeRegex = new RegExp('&begin=[0-9]+', 'i');
                        var newVideoUrl = videoPath.replace(timeRegex, '&begin=' + Math.floor(time * 1000));
                        var w = window.open(
                                '"
.GV_REALGVURL."/videopopup?q='
                                + prepareSearchParams(newVideoUrl)
                                + '&windowtitle='
                                + prepareSearchParams(window.document.title + ' - Full Screen'),
                                'GoogleVideo', getFullScreenWindowParams());
                        w.focus();
                }

        function pp_openWindow(url){
            var w = window.open('','watchFullScreen', getFullScreenWindowParams());
            url = url.replace('&amp','&');
w.document.write(\"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml10-strict.dtd'>\
<html xmlns='http://www.w3.org/1999/xhtml'><head>\
<title></title></head>\
<body style='padding:0px;margin:0px;'>\
<div style='text-align:center'>\
<object width='\"+ screen.availWidth*.98+\"' height='\"+screen.availHeight*.95+\"' type='application/x-shockwave-flash' data='\"+url+\"&amp;playNow=1'>\
<param name='movie' value='\"+url+\"&amp;playNow=1' />\
<param name='wmode' value='window'/>\
<param name='scale' value='noScale'/>\
<param name='salign' value='TL' />\
</object></div></body></html>\")
            w.document.title = window.document.title +  ' - Full Screen Video';
            w.focus();
        }

        function qt_openWindow(url){
            var w = window.open('','watchFullScreen', getFullScreenWindowParams());
            url = url.replace('&amp','&');
w.document.write(\"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml0-strict.dtd'>\
<html xmlns='http://www.w3.org/1999/xhtml'><head>\
<title></title>\
<style type='text/css'>\
* html object.gv_mov {\
    display: none;\
}\
* html object.gv_mov/**/ {\
    display: inline;\
}\
* html object.gv_mov {\
    display/**/: none;\
}\
</style></head><body style='padding:0px;margin:0px;'>\
<div style='text-align:center'>\
<object width='\"+ screen.availWidth+\"' height='\"+screen.availHeight*.95+\"' \
classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' codebase='http://www.apple.com/qtactivex/qtplugin.cab'>\
<param name='src' value='\"+url+\"'/>\
<param name='autoplay' value='true'/>\
<param name='controller' value='true'/>\
<param name='scale' value='Aspect'/>\
<object type='video/quicktime' data='\"+url+\"' width='\"+ screen.availWidth+\"' height='\"+screen.availHeight*.95+\"' class='gv_mov'>\
<param name='autoplay' value='true'/>\
<param name='controller' value='true'/>\
<param name='scale' value='Aspect'/>\
</object>\
</object>\
</div></body></html>\")
            w.document.title = window.document.title +  ' - Full Screen Video';
                        w.focus();
        }
        
        function gv_switchOn(turnOn, turnOff){
            var on = document.getElementById(turnOn);
            var off = document.getElementById(turnOff);
            on.style.display = 'block';
            off.style.display = 'none';
        }
    // -->
    </script>\n"
;


echo 
"<style type='text/css'> 
/* hides the second object from all versions of IE */
* html object.gv_mov {
    display: none;
}

/* displays the second object in all versions of IE apart from 5 on PC */
* html object.gv_mov/**/ {
    display: inline;
}

/* hides the second object from all versions of IE >= 5.5 */
* html object.gv_mov {
    display/**/: none;
}

</style>"
;
    

}

//Detect Flash 7 or higher
function gv_addJSInit(){
        echo 
"<script type='text/javascript'><!--
                flash7OrHigher(false);
            //--> </script>"
;
}

add_action('wp_footer''gv_addJSInit');
add_action('wp_head''gv_addJS');

//Formating issues wpautop must happen before the Extreme Video Plugin
if(function_exists('wpautop')){
      
remove_filter('the_content','wpautop');
      
add_filter('the_content','wpautop',8);
}
add_filter('the_content''gv_parseContent'9);
?>