// ==UserScript==
// @name            AutoEmbedVideoFromLink
// @namespace       darkyndy.com/embevi
// @author          darkyndy
// @description     Auto Embed Video from link (codename: EmbeVi)
// @include         *
// @exclude         *youtube.com*
// @exclude         *220.ro*
// @exclude         *video.google.com*
// @exclude         *dailymotion.com*
// @exclude         *trilulilu.ro*
// @exclude         *metacafe.com*
// @exclude         *collegehumor.com*
// @exclude         *cnet.com*
// @exclude         *glumbert.com*
// @exclude         *myvideo.at*
// @exclude         *video.yahoo.com*
// @exclude         *vids.myspace.com*
// @exclude         *liveleak.com*
// @exclude         *vimeo.com*
// @exclude         *gametrailers.com*
// @exclude         *ustream.tv*
// @exclude         *clipshack.com*
// @exclude         *funnyordie.com*
// @exclude         *filebox.ro*
// @exclude         *last.fm*
// @exclude         *youku.com*
// @exclude         *ishare.rediff.com*
// @exclude         *vision.rambler.ru*
// @exclude         *tudou.com*
// @exclude         *ku6.com*
// @exclude         *tinypic.com*
// @exclude         *video.libero.it*
// @exclude         *espn.go.com*
// @exclude         *espn.com*
// @exclude         *nfl.com*
// @exclude         *video.web.de*
// @exclude         *video.eksenim.mynet.com*
// @exclude         *rutube.ru*
// @exclude         *livevideo.com*
// @exclude         *vbox7.com*
// @exclude         *revver.com*
// @exclude         *current.com*
// @exclude         *dalealplay.com*
// @exclude         *clipfish.de*
// @exclude         *clip.vn*
// @exclude         *livestream.com*
// @exclude         *tangle.com*
// @exclude         *vidiac.com*
// @exclude         *5min.com*
// @exclude         *video.vol.at*
// @exclude         *wegame.com*
// @exclude         *youmaker.com*
// @exclude         *snotr.com*
// @exclude         *onetruemedia.com*
// @exclude         *clevver.com*
// @exclude         *kewego.com*
// @exclude         *clipser.com*
// @exclude         *dailyhaha.com*
// @exclude         *howcast.com*
// @exclude         *aniboom.com*
// @exclude         *bragster.com*
// @exclude         *teachertube.com*
// @exclude         *shredordie.com*
// @exclude         *talentrun.com*
// @exclude         *autsch.de*
// @exclude         *tvbvideo.de*
// @exclude         *clipmoon.com*
// @exclude         *viddyou.com*
// @exclude         *spymac.com*
// @exclude         *youare.tv*
// @exclude         *mindbites.com*
// @exclude         *jujunation.com*
// @exclude         *rooftopcomedy.com*
// @exclude         *hamburg1video.de*
// @exclude         *caught-on-video.com*
// @exclude         *bubblare.se*
// @exclude         *jaycut.com*
// @exclude         *spotn.de*
// @exclude         *thexvid.com*
// @exclude         *scivee.tv*
// @exclude         *tvosz.com*
// @exclude         *danerd.com*
// @exclude         *dailycomedy.com*
// @exclude         *deutschlandreporter.de*
// @exclude         *motorsportmad.com*
// @exclude         *rheinvideo.de*
// @exclude         *selfcasttv.com*
// @exclude         *myubo.sk*
// @exclude         *cliphost24.com*
// @exclude         *uvuvideo.org*
// @exclude         *crovideos.com*
// @exclude         *qubetv.tv*
// @exclude         *citytube.de*
// @exclude         *constantcomedy.com*
// @exclude         *luegmol.ch*
// @exclude         *mantoutv.com*
// @exclude         *clonevideos.com*
// @exclude         *entertane.com*
// @version         1.8
// ==/UserScript==

//---------------------------------------------------------------------------------------------------
//    Copyright (C) 2009 darkyndy
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    For a copy of the latest GNU General Public License, see <http://www.gnu.org/licenses/gpl.html>.
//
// If you distribute a modified version of AutoEmbedVideoFromLink, you are encouraged to use
// my name in the credits, and a copy of the license above.
//---------------------------------------------------------------------------------------------------


/*
ChangeLog
version 1.0
- auto embed the video from a link;
- at this moment works only of the video is from:
-> youtube.com (video or playlist)
-> 220.ro (video)
-> trilulilu.ro (video)
-> video.google.com (video)
-> dailymotion.com (video)
-> metacafe.com (video)
-> collegehumor.com (video)
(I will add support for other video sites later on)
- the script works on every web site except the video sites from where the videos are embeded (see list)
- has support if you have flash block activated
version 1.01
- changed the script to work if you have FlashBlock active or inactive;
version 1.1
- now auto-embed video from cnettv.cnet.com
version 1.2
- optimized the code to run faster (added xpath for a better filtering)
version 1.3
- optimized the code to run faster (filters only external links)
version 1.4
- more optimization for the code
version 1.5
- added support for videos from:
-> glumbert.com
-> myvideo.at
-> video.yahoo.com
-> vids.myspace.com
-> liveleak.com
-> vimeo.com
-> gametrailers.com
-> ustream.tv
-> clipshack.com
-> funnyordie.com
version 1.6
- fixed auto-start play for videos embeded from ustream.tv
support for videos from:
-> filebox.ro
-> last.fm
-> youku.com
-> ishare.rediff.com
-> vision.rambler.ru
-> tudou.com
-> ku6.com
-> tinypic.com
-> video.libero.it
- added auto-update script, this will be checked once per week
version 1.61
suport for videos from:
-> espn.go.com
-> nfl.com
version 1.62
- some code optimization and better code organization
version 1.7
suport for videos from:
-> video.web.de
-> video.eksenim.mynet.com
-> rutube.ru
-> livevideo.com
-> vbox7.com
-> revver.com
-> current.com
-> dalealplay.com
-> clipfish.de
-> clip.vn
-> livestream.com
-> tangle.com
-> vidiac.com
-> 5min.com
-> video.vol.at
-> wegame.com
-> youmaker.com
-> snotr.com
-> onetruemedia.com
-> clevver.com
-> kewego.com
-> clipser.com
-> dailyhaha.com
-> howcast.com
version 1.71
-> checked the code with http://jslint.com/ and fixed all errors
version 1.8
-> aniboom.com
-> bragster.com
-> teachertube.com
-> shredordie.com
-> talentrun.com
-> autsch.de
-> tvbvideo.de
-> clipmoon.com
-> viddyou.com
-> spymac.com
-> youare.tv
-> mindbites.com
-> jujunation.com
-> rooftopcomedy.com
-> hamburg1video.de
-> caught-on-video.com
-> bubblare.se
-> jaycut.com
-> spotn.de
-> thexvid.com
-> scivee.tv
-> tvosz.com
-> danerd.com
-> dailycomedy.com
-> deutschlandreporter.de
-> motorsportmad.com
-> rheinvideo.de
-> selfcasttv.com
-> myubo.sk
-> cliphost24.com
-> uvuvideo.org
-> crovideos.com
-> qubetv.tv
-> citytube.de
-> constantcomedy.com
-> luegmol.ch
-> mantoutv.com
-> clonevideos.com
-> entertane.com
*/


var EmbeVi = {
    //BEGIN init
  init: function() {
    EmbeVi.embedVideo();
    EmbeVi.beginAutoUpdate();
  },
    //END init
  
    //BEGIN Autoupdate
  beginAutoUpdate: function() {
    var lastCheck = GM_getValue("lastVersionCheck");
    var now = (new Date()).getTime();
    if (!lastCheck){
      lastCheck = 0;
    }
    //check in 7 days
    var haveToCheck = ((now - lastCheck) > 7* 24 * 60 * 60 * 1000);
    if (haveToCheck) {
      EmbeVi.checkForUpdate();
    }
  },
    //END Autoupdate
  
  //BEGIN check for update
  checkForUpdate: function() {
    GM_log("Checking for new version...");
    var now = (new Date()).getTime();
    GM_setValue("lastVersionCheck", now.toString());
    GM_xmlhttpRequest({
      method: 'GET',
      url: "http://userscripts.org/scripts/show/49439",
      headers: {
        "User-Agent": navigator.userAgent,
        "Referer": document.location
      },
        onload: function(responseDetails) {
        EmbeVi.autoUpdate(responseDetails);
      }
    });
  },
  //END check for update
  
  //BEGIN check for version
  autoUpdate: function(responseDetails) {
    if (responseDetails.status != 200){
      return;
    }
    var now = (new Date()).getTime();
    GM_setValue("lastVersionCheck", now.toString());
    var currentVersion = GM_getValue("currentVersion");
    if (!currentVersion){
      currentVersion = "1.8";
      GM_setValue("currentVersion", currentVersion);
    }
    var versionRE = /Version:<\/b>\s*([0-9\.]+)/;
    var latestVersion = responseDetails.responseText.match(versionRE)[1];
    GM_log("Current version: " + currentVersion);
    GM_log("Found version: " + latestVersion);

    if (currentVersion != latestVersion) {
      GM_xmlhttpRequest({
        method: 'GET',
        url: "http://userscripts.org/scripts/show/49439",
        headers: {
          "User-Agent": navigator.userAgent,
          "Referer": document.location
        },
        onload: function(responseDetails) {
          EmbeVi.autoUpdateConfirm(responseDetails, currentVersion, latestVersion);
        }
      });
    }
  },
  //END check for version
  
  //BEGIN confirm update
    autoUpdateConfirm: function(responseDetails, oldVersion, newVersion) {
    var stringEmbeViTitle = 'Auto Embed Video From Link (EmbeVi)';
    var versionChangeInfo = 'New version (' + newVersion + ') found. Update from version ' + oldVersion + '?';
    var confirmAlert = document.createElement("DIV");
    confirmAlert.id = 'EmbeVi:ConfirmAlert';
    var divHeight = window.innerHeight - 250;
    
    confirmAlert.style.position = "absolute";
    confirmAlert.style.left = (window.innerWidth - 500) / 2 + "px";
    confirmAlert.style.top = (80 + window.scrollY) + "px";
    confirmAlert.style.width = "500px";
    confirmAlert.style.height = divHeight + "px";
    confirmAlert.style.display = 'block';
    confirmAlert.style.zIndex = '90';
    confirmAlert.style.filter = 'alpha';
    confirmAlert.style.opacity = '0.9';
    confirmAlert.style.background = 'black';
    confirmAlert.style.color = 'white';
    confirmAlert.style.border = 'ridge';
    
    confirmAlert.innerHTML = '<div height="20" style="background-color:#4a3918;">' +
      '<div style="color:yellow;position:absolute;top:0px;left:0px">' +
      stringEmbeViTitle +
      '</div><div style="position:absolute;top:0px;right:0px">' +
      '<input type="button" id="EmbeVi:AutoUpdateOk" value="Ok" class="custombutton">' +
      '&nbsp;<input type="button" id="EmbeVi:AutoUpdateCancel" value="Cancel" class="custombutton"></div></div>' +
      '<div id="EmbeVi:Output" style="margin-top:20px;height:' + (divHeight-20) + 'px;overflow:auto;">' + versionChangeInfo + '</div>';
    document.body.insertBefore(confirmAlert, document.body.firstChild);
    document.getElementById("EmbeVi:AutoUpdateOk").addEventListener("click", EmbeVi.autoUpdateConfirmOk, true);
    document.getElementById("EmbeVi:AutoUpdateOk").setAttribute("newVersion", newVersion);
    document.getElementById("EmbeVi:AutoUpdateCancel").addEventListener("click", EmbeVi.autoUpdateConfirmCancel, true);
    },
  //END confirm update
  
  //START confirm update (ok)
    autoUpdateConfirmOk: function(evt) {
    var newVersion = parseFloat(evt.target.getAttribute("newVersion")).toString();
    GM_setValue("currentVersion", newVersion);
    GM_openInTab("http://userscripts.org/scripts/source/49439.user.js");
    EmbeVi.autoUpdateConfirmCancel(evt);
    },
  //END confirm update (ok)
  
  //START confirm update (cancel)
    autoUpdateConfirmCancel: function(evt) {
    var confirmAlert = document.getElementById("EmbeVi:ConfirmAlert");
    confirmAlert.style.display = "none";
    confirmAlert.visibility = "hidden";
    },
  //END confirm update (cancel)
  
  //START verify links and embed
  embedVideo: function() {
    //window.location.host
    var debugCode = false;
    
    var baseUrl = location.protocol+"//"+location.host;
    var pageLinks = Array.filter(document.links,function(link){return (link.href.indexOf(baseUrl)!==0) && (link.href.indexOf('javascript:')!==0) ;});
    
    var paramArray = [];
    GM_log('Script is running on: '+baseUrl);
    GM_log('Found '+pageLinks.length+' a nodes');
    //BEGIN we have links
    if(pageLinks.length!==0){
      //embeded video properties
      var embedVideoProperties = [
        {
          'info':['youtube playlist v1', 0],
          'width':530,
          'height':370,
          'regElement':[2],
          'baseLink':'http://www.youtube.com/p/~to_replace0~',
          'matchExpr':'youtube\\.com/watch\\?v=([a-z0-9-_]+)&feature=PlayList&p=([a-z0-9-_]+)&index=([0-9]+)&playnext=([0-9]+)(.*)'
        },
        {
          'info':['youtube video', 1],
          'width':425,
          'height':344,
          'regElement':[2],
          'baseLink':'http://www.youtube.com/v/~to_replace0~&f=videos&app=youtube_gdata',
          'matchExpr':"youtube\\.com(/watch\\?v=|/v/)([a-z0-9-_]+)\\??(.*)"
        },
        {
          'info':['220.ro video', 2],
          'width':450,
          'height':366,
          'regElement':[1],
          'baseLink':'http://www.220.ro/emb/~to_replace0~',
          'matchExpr':"220\\.ro/([a-z0-9-_]+)/(.*)"
        },
        {
          'info':['google video', 3],
          'width':400,
          'height':326,
          'regElement':[1],
          'baseLink':'http://video.google.com/googleplayer.swf?docid=~to_replace0~&hl=en&fs=true',
          'matchExpr':"video\\.google\\.com/videoplay\\?docid=([a-z0-9-_]+)"
        },
        {
          'info':['dailymotion video', 4],
          'width':420,
          'height':399,
          'regElement':[1],
          'baseLink':'http://www.dailymotion.com/swf/~to_replace0~',
          'matchExpr':"dailymotion\\.com/video/([a-z0-9]+)_(.*)"
        },
        {
          'info':['trilulilu video', 5],
          'width':440,
          'height':362,
          'regElement':[2,1],
          'baseLink':'http://embed.trilulilu.ro/source/go2player.php?type=video&hash=~to_replace0~&userid=~to_replace1~&src=hi5',
          'matchExpr':"trilulilu\\.ro/([a-z0-9-_]+)/([a-z0-9-_]+)"
        },
        {
          'info':['metacafe video', 6],
          'width':400,
          'height':345,
          'regElement':[1,2],
          'baseLink':'http://www.metacafe.com/fplayer/~to_replace0~/~to_replace1~.swf',
          'matchExpr':"metacafe\\.com/watch/([a-z0-9-_]+)/([a-z0-9-_]+)(.*)"
        },
        {
          'info':['youtube playlist v2', 7],
          'width':530,
          'height':370,
          'regElement':[1],
          'baseLink':'http://www.youtube.com/p/~to_replace0~',
          'matchExpr':"youtube\\.com/view_play_list\\?p=([a-z0-9-_]+)"
        },
        {
          'info':['collegehumor video', 8],
          'width':480,
          'height':360,
          'regElement':[1],
          'baseLink':'http://www.collegehumor.com/moogaloop/moogaloop.swf?clip_id=~to_replace0~&fullscreen=1',
          'matchExpr':"collegehumor\\.com/video:([a-z0-9-_]+)"
        },
        {
          'info':['cnettv video', 9],
          'width':364, 
          'height':280, 
          'regElement':[4],
          'baseLink':'http://www.cnet.com/av/video/flv/universalPlayer/universalSmall.swf?playerType=embedded&type=id&value=~to_replace0~',
          'matchExpr':"cnettv\\.cnet\\.com/([a-z0-9-_]+)/([0-9]+)-([0-9_]+)-([0-9]+)"
        },
        {
          'info':['glumbert video', 10],
          'width':448, 
          'height':336, 
          'regElement':[1],
          'baseLink':'http://www.glumbert.com/embed/~to_replace0~',
          'matchExpr':"glumbert\\.com/media/([0-9a-z]+)"
        },
        {
          'info':['myvideo.at video', 11],
          'width':470, 
          'height':406, 
          'regElement':[1],
          'baseLink':'http://www.myvideo.at/movie/~to_replace0~',
          'matchExpr':"myvideo\\.at/watch/([0-9a-z]+)"
        },
        {
          'info':['video.yahoo.com video', 12],
          'flashvars':'id=~to_replace0~&vid=~to_replace1~&lang=en-us&intl=us',
          'width':512, 
          'height':322, 
          'regElement':[2,1],
          'baseLink':'http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.40&id=~to_replace0~&vid=~to_replace1~&lang=en-us&intl=us',
          'matchExpr':"video\\.yahoo\\.com/watch/([0-9a-z]+)/([0-9a-z]+)"
        },
        {
          'info':['vids.myspace.com video', 13],
          'width':425, 
          'height':360, 
          'regElement':[2],
          'baseLink':'http://mediaservices.myspace.com/services/media/embed.aspx/m=~to_replace0~,t=1,mt=video',
          'matchExpr':"vids\\.myspace\\.com/(.*)&VideoID=([0-9a-z]+)"
        },
        {
          'info':['liveleak.com video', 14],
          'width':450, 
          'height':370, 
          'regElement':[1],
          'baseLink':'http://www.liveleak.com/e/~to_replace0~',
          'matchExpr':"liveleak\\.com/view\\?i=([0-9a-z-_]+)"
        },
        {
          'info':['vimeo.com video', 15],
          'width':400, 
          'height':255, 
          'regElement':[1],
          'baseLink':'http://vimeo.com/moogaloop.swf?clip_id=~to_replace0~&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1',
          'matchExpr':"vimeo\\.com/([0-9a-z-_]+)"
        },
        {
          'info':['gametrailers.com video', 16],
          'width':480, 
          'height':392, 
          'regElement':[1],
          'baseLink':'http://www.gametrailers.com/remote_wrap.php?mid=~to_replace0~',
          'matchExpr':"gametrailers\\.com/player/([0-9a-z-_]+)"
        },
        {
          'info':['gametrailers.com video', 17],
          'width':480, 
          'height':392, 
          'regElement':[1],
          'baseLink':'http://www.gametrailers.com/remote_wrap.php?mid=~to_replace0~',
          'matchExpr':"gametrailers\\.com/video/.*/([0-9a-z-_]+)"
        },
        {
          'info':['ustream.tv video', 18],
          'flashvars':'viewcount=true&autoplay=false&brand=embed',
          'width':400, 
          'height':320, 
          'regElement':[1],
          'baseLink':'http://www.ustream.tv/flash/video/~to_replace0~',
          'matchExpr':"ustream\\.tv/recorded/([0-9a-z-_]+)"
        },
        {
          'info':['clipshack.com video', 19],
          'width':430, 
          'height':370, 
          'regElement':[1],
          'baseLink':'http://clipshack.com/player.swf?key=~to_replace0~',
          'matchExpr':"clipshack\\.com/Clip\\.aspx\\?key=([0-9a-z-_]+)"
        },
        {
          'info':['funnyordie.com video', 20],
          'width':480, 
          'height':400, 
          'regElement':[1],
          'baseLink':'http://funnyordie.com/public/flash/fodplayer.swf?key=~to_replace0~',
          'matchExpr':"funnyordie\\.com/videos/([0-9a-z-_]+)"
        },
        {
          'info':['filebox.ro video', 21],
          'flashvars':'source_script=http://videoserver273.filebox.ro/get_video.php&key=~to_replace0~&autostart=0&getLink=http://fbx.ro/v/~to_replace0~&splash=http://imageserver.filebox.ro/get_splash.php?key=~to_replace0~&link=http://fbx.ro/v/~to_replace0~',
          'width':420, 
          'height':315, 
          'regElement':[1],
          'baseLink':'http://www.filebox.ro/video/FileboxPlayer_provider.php',
          'matchExpr':"filebox\\.ro/video/play_video.php\\?key=([0-9a-z-_]+)"
        },
        {
          'info':['last.fm video', 22],
          'flashvars':'uniqueName=~to_replace0~&autostart=&FSSupport=false&track=false&http://userserve-ak.last.fm/serve/image:320/~to_replace0~.jpg&title=&albumArt=&duration=&creator=',
          'width':450,
          'height':373,
          'regElement':[2],
          'baseLink':'http://cdn.last.fm/videoplayer/l/15/VideoPlayer.swf?autostart=false',
          'matchExpr':"last\\.fm/music/(.*)/\\+videos/([0-9a-z-_]+)"
        },
        {
          'info':['youku.com video', 23],
          'width':480,
          'height':400,
          'regElement':[1],
          'baseLink':'http://player.youku.com/player.php/sid/~to_replace0~/v.swf',
          'matchExpr':"youku\\.com/v_show/id_([0-9a-z-_=]+)\\.html"
        },
        {
          'info':['ishare.rediff.com video', 24],
          'flashvars':'videoURL=http://ishare.rediff.com/embedcodeplayer_config_REST.php?content_id=~to_replace0~&x=3',
          'width':400,
          'height':322,
          'regElement':[1],
          'baseLink':'http://ishare.rediff.com/images/player_ad_20090416.swf',
          'matchExpr':"ishare\\.rediff\\.com/video/.*/.*/([0-9a-z-_=]+)"
        },
        {
          'info':['vision.rambler.ru video', 25],
          'width':390,
          'height':370,
          'regElement':[1,2,3],
          'baseLink':'http://vision.rambler.ru/i/e.swf?id=~to_replace0~/~to_replace1~/~to_replace2~&logo=1',
          'matchExpr':"vision\\.rambler\\.ru/users/([0-9a-z-_=]+)/([0-9a-z-_=]+)/([0-9a-z-_=]+)"
        },
        {
          'info':['tudou.com video', 26],
          'width':400,
          'height':340,
          'regElement':[2],
          'baseLink':'http://www.tudou.com/v/~to_replace0~',
          'matchExpr':"tudou\\.com/(programs/view|v)/([0-9a-z-_=]+)"
        },
        {
          'info':['ku6.com video', 27],
          'width':414,
          'height':305,
          'regElement':[1],
          'baseLink':'http://player.ku6.com/refer/~to_replace0~/v.swf',
          'matchExpr':"ku6\\.com/show/([0-9a-z-_=]+)\\.html"
        },
        {
          'info':['tinypic.com video', 28],
          'width':440,
          'height':420,
          'regElement':[1,2],
          'baseLink':'http://v5.tinypic.com/player.swf?file=~to_replace0~&s=~to_replace1~',
          'matchExpr':"tinypic\\.com/player.php\\?v=([0-9a-z-_]+)&s=([0-9]+)"
        },
        {
          'info':['video.libero.it video', 29],
          'width':440,
          'height':420,
          'regElement':[1],
          'baseLink':'http://video.libero.it/static/swf/eltvplayer.swf?id=~to_replace0~.flv&ap=0',
          'matchExpr':"video\\.libero\\.it/app/play\\?id=([0-9a-z-_]+)"
        },
        {
          'info':['espn.go.com video', 30],
          'width':440,
          'height':361,
          'regElement':[1],
          'baseLink':'http://espn.go.com/broadband/player.swf?mediaId=~to_replace0~',
          'matchExpr':"espn\\.go\\.com/video/clip\\?id=([0-9a-z-_]+)"
        },
        {
          'info':['nfl.com video', 31],
          'flashvars':'autoplay=0&contentId=~to_replace1~&channelId=~to_replace0~',
          'width':768,
          'height':432,
          'regElement':[1,2],
          'baseLink':'http://static.nfl.com/static/site/flash/video/video-detail-player.swf',
          'matchExpr':"nfl.com/videos/([0-9a-z-_]+)/([0-9a-z-_]+)/"
        },
        {
          'info':['video.web.de video', 32],
          'width':470,
          'height':406,
          'regElement':[1],
          'baseLink':'http://video.web.de/movie/~to_replace0~',
          'matchExpr':"video\\.web\\.de/watch/([0-9a-z-_]+)/"
        },
        {
          'info':['video.eksenim.mynet.com video', 33],
          'flashvars':'videolist=http://video.eksenim.mynet.com/batch/video_xml_embed.php?video_id=~to_replace0~&adxml=&autoplay=0',
          'width':400,
          'height':344,
          'regElement':[3],
          'baseLink':'http://video.eksenim.mynet.com/flvplayers/vplayer17.swf',
          'matchExpr':"video\\.eksenim\\.mynet\\.com/([0-9a-z-_\\.]+)/([0-9a-z-_]+)/([0-9]+)"
        },
        {
          'info':['rutube.ru video', 34],
          'width':470,
          'height':353,
          'regElement':[1],
          'baseLink':'http://video.rutube.ru/~to_replace0~',
          'matchExpr':"rutube\\.ru/tracks/[0-9+]+\\.html\\?.*&v=([0-9a-z-_=]+)"
        },
        {
          'info':['livevideo.com video', 35],
          'width':445,
          'height':369,
          'regElement':[2],
          'baseLink':'http://www.livevideo.com/flvplayer/embed/~to_replace0~&autoStart=0',
          'matchExpr':"livevideo\\.com/video(\/.*|.{0})/([0-9a-z-_=]+)/.*\\.aspx"
        },
        {
          'info':['vbox7.com video', 36],
          'width':450,
          'height':403,
          'regElement':[1],
          'baseLink':'http://i48.vbox7.com/player/ext.swf?vid=~to_replace0~',
          'matchExpr':"vbox7\\.com/play:([0-9a-z-_=]+)"
        },
        {
          'info':['revver.com video', 37],
          'width':480,
          'height':392,
          'regElement':[1],
          'baseLink':'http://flash.revver.com/player/1.0/player.swf?mediaId=~to_replace0~',
          'matchExpr':"revver\\.com/video/([0-9a-z-_=]+)/"
        },
        {
          'info':['current.com video', 38],
          'width':400,
          'height':286,
          'regElement':[1],
          'baseLink':'http://current.com/e/~to_replace0~/en_US',
          'matchExpr':"current\\.com/items/([0-9a-z-_=]+)_"
        },
        {
          'info':['dalealplay.com video', 39],
          'width':464,
          'height':380,
          'regElement':[1],
          'baseLink':'http://www.dalealplay.com/smarty/dap/embedplayer.swf?file=~to_replace0~/busadoraWisinYandel.flv&videoValoracion=0.00&autoStart=false',
          'matchExpr':"dalealplay\\.com/informaciondecontenido.php\\?con=([0-9a-z-_=]+)"
        },
        {
          'info':['clipfish.de video', 40],
          'width':450,
          'height':390,
          'regElement':[1],
          'baseLink':'http://www.clipfish.de/videoplayer.swf?as=0&vid=~to_replace0~&r=1',
          'matchExpr':"clipfish\\.de/video/([0-9a-z-_=]+)/"
        },
        {
          'info':['clip.vn video', 41],
          'width':450,
          'height':390,
          'regElement':[1],
          'baseLink':'http://clip.vn/w/~to_replace0~',
          'matchExpr':"clip\\.vn/watch/[0-9a-z-_=]+,([0-9a-z-_=]+)"
        },
        {
          'info':['livestream.com video', 42],
          'width':400,
          'height':400,
          'regElement':[1],
          'baseLink':'http://static.livestream.com/grid/PlayerV2.swf?channel=~to_replace0~&layout=playerEmbedDefault&backgroundColor=0xffffff&backgroundAlpha=1&backgroundGradientStrength=0&chromeColor=0x000000&headerBarGlossEnabled=true&controlBarGlossEnabled=true&chatInputGlossEnabled=false&uiWhite=true&uiAlpha=0.5&uiSelectedAlpha=1&dropShadowEnabled=true&dropShadowHorizontalDistance=10&dropShadowVerticalDistance=10&paddingLeft=10&paddingRight=10&paddingTop=10&paddingBottom=10&cornerRadius=10&backToDirectoryURL=null&showViewers=true&embedEnabled=true&chatEnabled=true&onDemandEnabled=true&programGuideEnabled=false&fullScreenEnabled=true&reportAbuseEnabled=false&gridEnabled=false&initialIsOn=true&initialIsMute=false&initialVolume=10&contentId=null&initThumbUrl=null&playeraspectwidth=4&playeraspectheight=3&mogulusLogoEnabled=true',
          'matchExpr':"livestream\\.com/([0-9a-z-_=]+)"
        },
        {
          'info':['tangle.com video', 43],
          'flashvars':'viewkey=~to_replace0~',
          'width':330,
          'height':270,
          'regElement':[1],
          'baseLink':'http://www.tangle.com/flash/swf/flvplayer.swf',
          'matchExpr':"tangle\\.com/view_video\\.php\\?viewkey=([0-9a-z-_=]+)"
        },
        {
          'info':['vidiac.com video', 44],
          'width':400,
          'height':350,
          'regElement':[1],
          'baseLink':'http://www.vidiac.com/vidiac.swf?video=~to_replace0~&servicecfg=386',
          'matchExpr':"vidiac\\.com/video/([0-9a-z-_=]+)\\.htm"
        },
        {
          'info':['5min.com video', 45],
          'width':480,
          'height':401,
          'regElement':[1],
          'baseLink':'http://www.5min.com/Embeded/~to_replace0~/',
          'matchExpr':"5min\\.com/Video/.*-([0-9]+)"
        },
        {
          'info':['video.vol.at video', 46],
          'width':480,
          'height':388,
          'regElement':[1],
          'baseLink':'http://video.vol.at/media_tp/custom/flowplayer/swf/FlowPlayerDark.swf?config={embedded:true,baseURL:\'http://video.vol.at/media_tp/custom/flowplayer/swf\',loop:false,playList:[{suggestedClipsInfoUrl:\'http://video.vol.at/suggestions.php?id=~to_replace0~\',url:\'http://video.vol.at/media/video_at/~to_replace0~.flv\'}],initialScale:\'scale\',controlBarBackgroundColor:\'0x000000\',autoBuffering:true,autoPlay:false}',
          'matchExpr':"video\\.vol\\.at/video/([0-9a-z-_=]+)/"
        },
        {
          'info':['5min.com video', 47],
          'flashvars':'xmlrequest=http://www.wegame.com/player/video/~to_replace0~&embedPlayer=true',
          'width':480,
          'height':387,
          'regElement':[1],
          'baseLink':'http://www.wegame.com/static/flash/player.swf?xmlrequest=http://www.wegame.com//player/video/~to_replace0~',
          'matchExpr':"wegame\\.com/watch/([0-9a-z-_=]+)"
        },
        {
          'info':['ikbis.com video', 48],
          'width':425,
          'height':344,
          'regElement':[1],
          'baseLink':'http://ikbis.com/swf/embded_flv.swf?video_id=~to_replace0~&fullscreenmode=false&file=http://ikbis.com/playlist_feed/~to_replace0~&image=http://shots.ikbis.com/video_thumbnail/~to_replace0~/screen/video.jpg&autostart=false&overstretch=fit&ply_color=undefined',
          'matchExpr':"ikbis\\.com/[0-9a-z-_=]+/shot/([0-9a-z-_=]+)"
        },
        {
          'info':['youmaker.com video', 49],
          'flashvars':'file=http://www.youmaker.com/video/v?id=~to_replace0~%26nu%3Dnu&showdigits=true&overstretch=fit&autostart=false&rotatetime=12&linkfromdisplay=false&repeat=list&shuffle=false&&showfsbutton=false&fsreturnpage=&fullscreenpage=',
          'width':450,
          'height':358,
          'regElement':[1],
          'baseLink':'http://www.youmaker.com/v.swf',
          'matchExpr':"youmaker\\.com/video/sv\\?id=([0-9a-z-_]+)"
        },
        {
          'info':['snotr.com video', 50],
          'flashvars':'video=~to_replace0~&autoload=false&autoplay=false&startat=0',
          'width':520,
          'height':390,
          'regElement':[1],
          'baseLink':'http://www.snotr.com/player.swf?v6',
          'matchExpr':"snotr\\.com/video/([0-9a-z-_]+)"
        },
        {
          'info':['onetruemedia.com video', 51],
          'flashvars':'&p=~to_replace0~&skin_id=&host=http://www.onetruemedia.com',
          'width':408,
          'height':382,
          'regElement':[2],
          'baseLink':'http://www.onetruemedia.com/share_view_player?p=~to_replace0~',
          'matchExpr':"onetruemedia\\.com/(shared|otm_site/view_shared)\\?p=([0-9a-z-_]+)"
        },
        {
          'info':['clevver.com video', 52],
          'width':428,
          'height':380,
          'regElement':[2],
          'baseLink':'http://i.clevver.com/flash/clvembed.swf?vid=~to_replace0~',
          'matchExpr':"clevver.com(\/.*|.?)/videof/([0-9a-z-_]+)/"
        },
        {
          'info':['kewego.com video', 53],
          'flashvars':'playerKey=061ca722fea8&skinKey=&language_code=en&stat=internal&autoStart=true&sig=~to_replace0~',
          'width':400,
          'height':300,
          'regElement':[1],
          'baseLink':'http://sa.kewego.com/swf/p3/epix.swf',
          'matchExpr':"kewego\\.com/video/([0-9a-z-_]+)\\.html"
        },
        {
          'info':['clipser.com video', 54],
          'width':425,
          'height':355,
          'regElement':[1],
          'baseLink':'http://www.clipser.com/Play?vid=~to_replace0~',
          'matchExpr':"clipser\\.com/watch_video/([0-9a-z-_]+)"
        },
        {
          'info':['dailyhaha.com video', 55],
          'width':425,
          'height':350,
          'regElement':[1],
          'baseLink':'http://www.dailyhaha.com/_vids/Whohah.swf?Vid=~to_replace0~.flv',
          'matchExpr':"dailyhaha\\.com/_vids/([0-9a-z-_]+).htm"
        },
        {
          'info':['howcast.com video', 56],
          'width':432,
          'height':276,
          'regElement':[1],
          'baseLink':'http://www.howcast.com/flash/howcast_player.swf?file=~to_replace0~&theme=black',
          'matchExpr':"howcast\\.com/videos/([0-9]+)"
        },
        {
          'info':['aniboom.com video', 57],
          'width':594,
          'height':334,
          'regElement':[1],
          'baseLink':'http://api.aniboom.com/e/~to_replace0~',
          'matchExpr':"aniboom\\.com/animation-video/([0-9]+)"
        },
        {
          'info':['bragster.com video', 58],
          'flashvars':'autoPlay=false&brag_id=~to_replace0~',
          'width':420,
          'height':315,
          'regElement':[1],
          'baseLink':'http://www.bragster.com/flash/bragster_player_embed.swf',
          'matchExpr':"bragster\\.com/brags/([0-9]+)-"
        },
        {
          'info':['teachertube.com video', 59],
          'flashvars':'file=http://www.teachertube.com/embedFLV.php?pg=video_~to_replace0~&menu=false&frontcolor=ffffff&lightcolor=FF0000&logo=http://www.teachertube.com/www3/images/greylogo.swf&skin=http://www.teachertube.com/embed/overlay.swf&volume=80&controlbar=over&displayclick=link&viral.link=http://www.teachertube.com/viewVideo.php?video_id=~to_replace0~&stretching=exactfit&plugins=viral-1&viral.callout=none&viral.onpause=false',
          'width':470,
          'height':260,
          'regElement':[1],
          'baseLink':'http://www.teachertube.com/embed/player.swf',
          'matchExpr':"teachertube\\.com/viewVideo\\.php\\?video_id=([0-9]+)"
        },
        {
          'info':['shredordie.com video', 60],
          'flashvars':'key=~to_replace0~&vert=shredordie',
          'width':480,
          'height':400,
          'regElement':[1],
          'baseLink':'http://player.ordienetworks.com/flash/fodplayer.swf',
          'matchExpr':"shredordie\\.com/videos/([0-9a-z-_]+)"
        },
        {
          'info':['talentrun.com video', 61],
          'flashvars':'autostart=false&id=~to_replace0~&mode=splay&extUrl=http://www.talentrun.com/',
          'width':454,
          'height':421,
          'regElement':[1],
          'baseLink':'http://www.talentrun.com/player/trp/',
          'matchExpr':"talentrun\\.com/player/index/([0-9a-z-_]+)"
        },
        {
          'info':['autsch.de video', 62],
          'flashvars':'pk=~to_replace0~&displayheight=338&autostart=false',
          'width':450,
          'height':370,
          'regElement':[1],
          'baseLink':'http://www.autsch.de/playerext/~to_replace0~',
          'matchExpr':"autsch\\.de/([0-9a-z-_]+)"
        },
        {
          'info':['tvbvideo.de video', 63],
          'flashvars':'playerKey=a67dd9fb6a97&skinKey=&language_code=de&stat=internal&advertise=false&autoStart=false&sig=~to_replace0~',
          'width':400,
          'height':300,
          'regElement':[1],
          'baseLink':'http://sa.kewego.com/swf/p3/epix.swf',
          'matchExpr':"tvbvideo\\.de/video/([0-9a-z-_]+)\\.html"
        },
        {
          'info':['clipmoon.com video', 64],
          'flashvars':'config=http://www.clipmoon.com/flvplayer.php?viewkey=~to_replace0~&external=yes&start=0',
          'width':500,
          'height':357,
          'regElement':[1],
          'baseLink':'http://www.clipmoon.com/flvplayer.swf',
          'matchExpr':"clipmoon\\.com/videos/([0-9a-z-_]+)"
        },
        {
          'info':['viddyou.com video', 65],
          'width':640,
          'height':480,
          'regElement':[1],
          'baseLink':'http://www.viddyou.com/get/v2_full/~to_replace0~.swf',
          'matchExpr':"viddyou\\.com/viddstream\\?videoid=([0-9a-z-_]+)"
        },
        {
          'info':['spymac.com video', 66],
          'width':468,
          'height':308,
          'regElement':[1],
          'baseLink':'http://www.spymac.com/hop?id=~to_replace0~',
          'matchExpr':"spymac\\.com/details/\\?([0-9a-z-_]+)"
        },
        {
          'info':['youare.tv video', 67],
          'width':350,
          'height':300,
          'regElement':[1],
          'baseLink':'http://www.youare.tv/yatvplayer.swf?videoID=~to_replace0~&serverDomain=youare.tv',
          'matchExpr':"youare\\.tv/watch.php\\?id=([0-9a-z-_]+)"
        },
        {
          'info':['mindbites.com video', 68],
          'width':554,
          'height':316,
          'regElement':[1],
          'baseLink':'http://www.mindbites.com/v/~to_replace0~',
          'matchExpr':"mindbites\\.com/lesson/([0-9a-z_]+)-"
        },
        {
          'info':['jujunation.com video', 69],
          'flashvars':'config=http://www.jujunation.com/videoConfigXmlCode.php?pg=video_~to_replace0~_no_0_extsite&autoPlay=false',
          'width':450,
          'height':370,
          'regElement':[1],
          'baseLink':'http://www.jujunation.com/flvplayer_elite.swf',
          'matchExpr':"jujunation\\.com/viewVideo\\.php\\?video_id=([0-9a-z-_]+)"
        },
        {
          'info':['rooftopcomedy.com video', 70],
          'flashvars':'baseURL=http://www.rooftopcomedy.com&clipCode=~to_replace0~',
          'width':448,
          'height':292,
          'regElement':[1],
          'baseLink':'http://www.rooftopcomedy.com/flash/fmpv3/RooftopPlayerEmbedded.swf',
          'matchExpr':"rooftopcomedy\\.com/watch/([0-9a-z-_]+)"
        },
        {
          'info':['hamburg1video.de video', 71],
          'flashvars':'playerKey=acd17bc8b8f7&skinKey=&language_code=de&stat=internal&advertise=false&autoStart=false&sig=~to_replace0~',
          'width':400,
          'height':300,
          'regElement':[1],
          'baseLink':'http://sa.kewego.com/swf/p3/epix.swf',
          'matchExpr':"hamburg1video\\.de/video/([0-9a-z-_]+)\\.html"
        },
        {
          'info':['caught-on-video.com video', 72],
          'flashvars':'video=~to_replace0~',
          'width':428,
          'height':352,
          'regElement':[1],
          'baseLink':'http://videos.caught-on-video.com/vidiac.swf',
          'matchExpr':"videos\\.caught-on-video\\.com/.*/[0-9]+/([0-9a-z-_]+)\\.htm"
        },
        {
          'info':['bubblare.se video', 73],
          'width':425,
          'height':350,
          'regElement':[1],
          'baseLink':'http://bubblare.se/v/~to_replace0~/',
          'matchExpr':"bubblare\\.se/movie/([0-9a-z-_]+)"
        },
        {
          'info':['jaycut.com video', 74],
          'flashvars':'file=http://jaycut.com/videos/send_preview/~to_replace0~&type=flv&returnUrl=http://jaycut.com/&locale=en&author=Toffan&autostart=false&mixerUrl=http://jaycut.com/mixer&inviteFriendsUrl=http://jaycut.com/myjaycut/friends/invite&createGroupUrl=http://jaycut.com/group/create&image=http://jaycut.com/video/~to_replace0~/thumbnail_big.jpeg&profileUrl=',
          'width':408,
          'height':324,
          'regElement':[1],
          'baseLink':'http://jaycut.com/flash/preview.swf',
          'matchExpr':"jaycut\\.com/video/([0-9a-z-_]+)/"
        },
        {
          'info':['spotn.de video', 75],
          'flashvars':'config=http://www.spotn.de/flvplayer.php?viewkey=~to_replace0~',
          'width':450,
          'height':370,
          'regElement':[1],
          'baseLink':'http://www.spotn.de/videoplayer.swf',
          'matchExpr':"spotn\\.de/watch/([0-9a-z-_]+)/"
        },
        {
          'info':['thexvid.com video', 76],
          'width':600,
          'height':369,
          'regElement':[1],
          'baseLink':'http://www.thexvid.com/plr/~to_replace0~/video.swf',
          'matchExpr':"thexvid\\.com/video/([0-9a-z-_]+)-"
        },
        {
          'info':['scivee.tv video', 77],
          'flashvars':'id=~to_replace0~&type=4',
          'width':480,
          'height':400,
          'regElement':[1],
          'baseLink':'http://www.scivee.tv/flash/embedCast.swf',
          'matchExpr':"scivee\\.tv/node/([0-9a-z-_]+)"
        },
        {
          'info':['tvosz.com video', 78],
          'width':470,
          'height':380,
          'regElement':[1],
          'baseLink':'http://www.tvosz.com/gtembed.swf?key=~to_replace0~',
          'matchExpr':"tvosz\\.com/view_video\\.php\\?viewkey=([0-9a-z-_]+)"
        },
        {
          'info':['danerd.com video', 79],
          'width':400,
          'height':320,
          'regElement':[1],
          'baseLink':'http://www.danerd.com/web_player.swf?Id=~to_replace0~',
          'matchExpr':"danerd\\.com/media/([0-9a-z-]+)_"
        },
        {
          'info':['dailycomedy.com video', 80],
          'width':320,
          'height':240,
          'regElement':[1],
          'baseLink':'http://www.dailycomedy.com/videos/DCVideoPlayerII_HTTP.swf?videoid=~to_replace0~',
          'matchExpr':"dailycomedy\\.com/videos/([0-9a-z-_]+)"
        },
        {
          'info':['deutschlandreporter.de video', 81],
          'width':480,
          'height':360,
          'regElement':[1],
          'baseLink':'http://www.deutschlandreporter.de/flvplayer.swf?mediaid=~to_replace0~&hosturl=http://www.deutschlandreporter.de/&themecolor=0x99B3CC&symbolcolor=0x000000&backgroundcolor=0xFFFFFF&autostart=false&loop=false&overlay=http://www.deutschlandreporter.de//media/custom/player_emb.png',
          'matchExpr':"deutschlandreporter\\.de/videos/([0-9a-z-_]+)/"
        },
        {
          'info':['motorsportmad.com video', 82],
          'width':320,
          'height':260,
          'regElement':[1],
          'baseLink':'http://www.motorsportmad.com/flvplayer.swf?file=http://media.motorsportmad.net.s3.amazonaws.com/~to_replace0~.flv&showfsbutton=true',
          'matchExpr':"motorsportmad\\.com/view/([0-9a-z-_]+)/"
        },
        {
          'info':['rheinvideo.de video', 83],
          'flashvars':'apiHost=apiwww.rheinvideo.de',
          'width':425,
          'height':350,
          'regElement':[1],
          'baseLink':'http://www.rheinvideo.de/pl/~to_replace0~/425x350/swf',
          'matchExpr':"rheinvideo\\.de/videos/([0-9a-z-_]+)/"
        },
        {
          'info':['selfcasttv.com video', 84],
          'width':340,
          'height':283,
          'regElement':[1],
          'baseLink':'http://www.selfcasttv.com/Selfcast/selfcast.swf?video_1=/~to_replace0~',
          'matchExpr':"selfcasttv\\.com/Selfcast/playVideo.do\\?ref=([0-9a-z-_\/]+)"
        },
        {
          'info':['myubo.sk video', 85],
          'width':470,
          'height':386,
          'regElement':[1,2,3,4,5,6,7],
          'baseLink':'http://myubo.com/storage/cms/flashPlayer/player.swf?movieURL=http://www.myubo.sk/videa/1/VideoDisk/Media/~to_replace0~/~to_replace1~/flv_~to_replace0~~to_replace1~~to_replace2~~to_replace3~~to_replace4~~to_replace5~~to_replace6~.flv',
          'matchExpr':"myubo\\.sk/page/media_detail\\.html\\?movieid=([0-9a-z]{2})([0-9a-z]{2})([0-9a-z]+)-([0-9a-z]+)-([0-9a-z]+)-([0-9a-z]+)-([0-9a-z]+)"
        },
        {
          'info':['gettyload.de video', 86],
          'width':425,
          'height':350,
          'regElement':[1],
          'baseLink':'http://www.gettyload.de/flashplayer/video_embed.swf?xmlFile=~to_replace0~',
          'matchExpr':"gettyload\\.de/video/[a-z0-9-_]+/([0-9a-z]+)"
        },
        {
          'info':['cliphost24.com video', 87],
          'flashvars':'config=http://www.cliphost24.com/share/~to_replace0~/',
          'width':400,
          'height':320,
          'regElement':[1],
          'baseLink':'http://www.cliphost24.com/flashplayer',
          'matchExpr':"cliphost24\\.com/videoclip-([0-9a-z]+)\\.html"
        },
        {
          'info':['uvuvideo.org video', 88],
          'flashvars':'affiliateSiteId=~to_replace1~&widgetId=110617&width=510&height=419&revision=12&kaShare=1&mediaType_mediaID=video_~to_replace0~&autoPlay=0',
          'width':510,
          'height':419,
          'regElement':[1,2],
          'baseLink':'http://serve.a-widget.com/service/getWidgetSwf.kickAction',
          'matchExpr':"ka\\.uvuvideo\\.org/[0-9a-z-_]+/video/([0-9a-z]+)/([0-9a-z]+)\\.html"
        },
        {
          'info':['crovideos.com video', 89],
          'flashvars':'&file=http://www.crovideos.com/flvideo/~to_replace0~.flv&height=260&width=320&frontcolor=0xCCCCCC&backcolor=0x6666FF&lightcolor=0xEEEEEE&logo=http://www.crovideos.com/crovideos-logo-player.png',
          'width':320,
          'height':260,
          'regElement':[1],
          'baseLink':'http://www.crovideos.com/player.swf?file=http://www.crovideos.com/flvideo/~to_replace0~.flv&height=260&width=320&frontcolor=0xCCCCCC&backcolor=0x6666FF&lightcolor=0xEEEEEE&logo=http://www.crovideos.com/crovideos-logo-player.png',
          'matchExpr':"crovideos\\.com/video/([0-9a-z]+)/"
        },
        {
          'info':['qubetv.tv video', 90],
          'flashvars':'file=/videos/~to_replace0~/~to_replace0~.flv&autostart=false',
          'width':320,
          'height':240,
          'regElement':[1],
          'baseLink':'http://www.qubetv.tv/swf/flvplayer.swf',
          'matchExpr':"qubetv\\.tv/videos/detail/([0-9a-z]+)"
        },
        {
          'info':['citytube.de video', 91],
          'width':450,
          'height':390,
          'regElement':[2],
          'baseLink':'http://stream.city-tube.de/player.swf?m=~to_replace0~',
          'matchExpr':"citytube\\.de/(\\?m=|tube/movie/)([0-9a-z]+)"
        },
        {
          'info':['constantcomedy.com video', 92],
          'width':430,
          'height':360,
          'regElement':[1],
          'baseLink':'http://constantcomedy.com/swfs/embedPlayer.swf?ccVideo=~to_replace0~',
          'matchExpr':"constantcomedy\\.com/Video\\.aspx\\?id=([0-9a-z]+)"
        },
        {
          'info':['luegmol.ch video', 93],
          'flashvars':'config=http://www.luegmol.ch/player/luegmol_player_config_ext.php?vkey=~to_replace0~',
          'width':500,
          'height':395,
          'regElement':[1],
          'baseLink':'http://www.luegmol.ch/player/luegmol_player.swf',
          'matchExpr':"luegmol\\.ch/video/([0-9a-z]+)"
        },
        {
          'info':['mantoutv.com video', 94],
          'flashvars':'config=http://www.mantoutv.com/flvplayer.php?viewkey=~to_replace0~',
          'width':450,
          'height':370,
          'regElement':[1],
          'baseLink':'http://www.mantoutv.com/videoplayer.swf',
          'matchExpr':"mantoutv\\.com/videoview_([0-9a-z]+)\\.html"
        },
        {
          'info':['clonevideos.com video', 95],
          'width':450,
          'height':375,
          'regElement':[1],
          'baseLink':'http://www.clonevideos.com/videowatchproplayer.swf?file=http://www.clonevideos.com/vdata/~to_replace0~.flv&vid=~to_replace0~&baseurl=http://www.clonevideos.com/&e=y',
          'matchExpr':"clonevideos\\.com/videos/([0-9a-z]+)"
        },
        {
          'info':['entertane.com video', 96],
          'flashvars':'width=360&height=270&file=http://www.entertane.com/flvideo/~to_replace0~.flv&image=http://www.entertane.com/thumb/1_~to_replace0~.jpg&displayheight=270&link=http://www.entertane.com/video/~to_replace0~/&searchbar=false&linkfromdisplay=true&recommendations=',
          'width':360,
          'height':270,
          'regElement':[1],
          'baseLink':'http://www.entertane.com/player.swf',
          'matchExpr':"entertane\\.com/video/([0-9a-z]+)"
        }
      ];
      
      var currentVideoObjectParameter, currentVideoEmbed, divElement;
      var linkHref, currentRegExpr, currentReplaceExpr, regCount;
      
      //BEGIN for loop (1)
      for(var i=0;i<pageLinks.length;i++){
        //link is video?
        var linkToEmbed = false;
        linkHref = pageLinks[i].href;
        if(debugCode){ GM_log('Found href: '+linkHref);}
        //BEGIN for loop (2)
        for(var j=0;j<embedVideoProperties.length;j=j+1){
          currentRegExpr = new RegExp(embedVideoProperties[j].matchExpr, "gmi");
          if(!linkToEmbed && linkHref.match(currentRegExpr)){
            //we have a link to embed
            linkToEmbed = true;
            rezReg = currentRegExpr.exec(linkHref);
            currentSite = embedVideoProperties[embedVideoProperties[j].info[1]];
            //set current site
            currentSite.src = currentSite.baseLink;
            for(regCount = 0; regCount<currentSite.regElement.length;regCount=regCount+1){
              currentReplaceExpr = new RegExp("~to_replace"+regCount+"~", "gmi");
              currentSite.src = currentSite.src.replace(currentReplaceExpr, rezReg[currentSite.regElement[regCount]]);
            }
            //start embed using object
            paramArray = [
              {'name':'movie','value':currentSite.src},
              {'name':'allowScriptAccess','value':'always'},
              {'name':'wmode','value':'transparent'},
              {'name':'allowFullScreen','value':'true'}
            ];
            //create object
            var currentVideoObject = document.createElement("object");
            //create the embed element
            currentVideoEmbed = document.createElement("embed");
            //create param
            currentVideoObject.setAttribute('width',currentSite.width);
            currentVideoObject.setAttribute('height',currentSite.height);
            if(currentSite.attr && currentSite.attr.length!==0){
              for(var attrId=0;attrId<currentSite.attr.length;attrId=attrId+1){
                //set attribute for object
                currentVideoObject.setAttribute(currentSite.attr[attrId][0],currentSite.attr[attrId][1]);
                //set attribute for param
                currentVideoObjectParameter = document.createElement("param");
                currentVideoObjectParameter.setAttribute('name', currentSite.attr[attrId][0]);
                currentVideoObjectParameter.setAttribute('value', currentSite.attr[attrId][1]);
                currentVideoObject.appendChild(currentVideoObjectParameter);
              }
            }
            if(currentSite.flashvars){
              for(regCount = 0; regCount<currentSite.regElement.length;regCount=regCount+1){
                currentReplaceExpr = new RegExp("~to_replace"+regCount+"~", "gmi");
                currentSite.flashvars = currentSite.flashvars.replace(currentReplaceExpr, rezReg[currentSite.regElement[regCount]]);
              }
              //set flashvars attribute for embed
              currentVideoEmbed.setAttribute('flashvars',currentSite.flashvars);
              //set attribute for param
              currentVideoObjectParameter = document.createElement("param");
              currentVideoObjectParameter.setAttribute('name', 'flashvars');
              currentVideoObjectParameter.setAttribute('value', currentSite.flashvars);
              currentVideoObject.appendChild(currentVideoObjectParameter);
            }
            
            for(var k=0;k<paramArray.length;k=k+1){
              currentVideoObjectParameter = document.createElement("param");
              currentVideoObjectParameter.setAttribute('name', paramArray[k].name);
              currentVideoObjectParameter.setAttribute('value', paramArray[k].value);
              currentVideoObject.appendChild(currentVideoObjectParameter);
            }
            currentVideoEmbed.setAttribute('allowFullScreen','true');
            currentVideoEmbed.setAttribute('id', 'linkVideoEmbeded'+i);
            currentVideoEmbed.setAttribute('src', currentSite.src);
            currentVideoEmbed.setAttribute('type','application/x-shockwave-flash');
            currentVideoEmbed.setAttribute('width',currentSite.width);
            currentVideoEmbed.setAttribute('height',currentSite.height);
            currentVideoEmbed.setAttribute('allowScriptAccess','always');
            currentVideoEmbed.setAttribute('wmode','transparent');
            //create the embed container
            divElement = document.createElement('div');
            //insert div with embeded code in page
            pageLinks[i].parentNode.insertBefore(divElement, pageLinks[i]);
            divElement.appendChild(document.createElement('br'));
            divElement.appendChild(currentVideoObject);
            divElement.appendChild(document.createElement('br'));
            currentVideoObject.appendChild(currentVideoEmbed);
            //finish embed using object
          }
        }
        //end for loop (2)
      }
      //end for loop (1)
    }
    //END we have links
    }
  //END confirm update (cancel)
  
  
};

EmbeVi.init();