


/** Include the botr.embed and player.api libraries. **/
if(typeof(botrObject)=="undefined"){var botrObject={};botrObject.players=[];botrObject.isDomReady=function(){var b=document;if(b&&b.getElementsByTagName&&b.getElementById&&b.body){clearInterval(botrObject.domTimer);for(var a=0;a<botrObject.players.length;a++){botrObject.writePlayer(a)}botrObject.domDone=true}};botrObject.canPlayFlash=function(){if(navigator.userAgent.match(/Android 2.2/i)!==null){return false}var a="0,0,0,0";try{try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{b.AllowScriptAccess="always"}catch(c){a="6,0,0"}}catch(c){}a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}}catch(c){}}if(parseInt(a.split(",")[0])>9){return true}else{return false}};botrObject.canPlayHTML5=function(){if(navigator.userAgent.match(/BlackBerry/i)!==null){return false}try{return !!document.createElement("video").canPlayType("video/mp4")}catch(a){return false}};botrObject.writePlayer=function(a){var b=document.getElementById(botrObject.players[a].container);if(botrObject.canPlayFlash()){b.innerHTML=botrObject.players[a].getFlashHTML()}else{if(botrObject.canPlayHTML5()){b.innerHTML=botrObject.players[a].getVideoHTML();botrObject.players[a].readyPing()}else{b.innerHTML=botrObject.players[a].getLinkHTML()}}};botrObject.swf=function(a,d,e,g,c,i,h,b){if(!document.getElementById){return}this.source=a;this.button=d;this.image=e;this.index=0;this.link=g;this.sources=[];this.id=c+"_swf";this.container=c+"_div";this.width=i;this.height=h;this.pinged=false;this.domain=b;this.flashvars={id:this.id};this.params={allowfullscreen:"true",allowscriptaccess:"always",seamlesstabbing:"true",bgcolor:"#000000",wmode:"opaque"};botrObject.players.push(this);if(botrObject.domDone){var f=botrObject.players.length-1;setTimeout(function(){botrObject.writePlayer(f)},50)}};botrObject.swf.prototype={getFlashHTML:function(){var b="";var c=this.getVariables();if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){b='<embed type="application/x-shockwave-flash" src="'+this.source+'" ';b+='width="'+this.width+'" height="'+this.height+'"';b+=' id="'+this.id+'" name="'+this.id+'" ';for(var a in this.params){b+=[a]+'="'+this.params[a]+'" '}b+='flashvars="'+c+'" style="margin:0; padding:0; border:0; display:block;"/>'}else{b='<object id="'+this.id+'" name="'+this.id+'" width="'+this.width+'" ';b+='classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="'+this.height+'" ';b+='style="margin:0; padding:0; border:0; display:block;">';b+='<param name="movie" value="'+this.source+'" />';for(var a in this.params){b+='<param name="'+a+'" value="'+this.params[a]+'" />'}b+='<param name="flashvars" value="'+c+'" />';b+="</object>"}return b},getVideoHTML:function(){if(this.sources.length==0){return this.getLinkHTML()}else{if(this.sources.length>1){this.sources.sort(function(f,e){return f.width-e.width});var a=screen.width;if(screen.height>a){a=screen.height}for(var c=0;c<this.sources.length;c++){if(this.sources[c]["width"]>a*1.3){break}else{this.index=c}}}}var d=this.domain+"/thumbs/"+this.sources[this.index].mediaid+"-720.jpg";var b="<video src='"+this.sources[this.index].url+"' ";b+="width='"+this.width+"' ";b+="height='"+this.height+"' ";b+="id='"+this.id+"_vid' ";b+="poster='"+d+"' ";b+="style='margin:0; padding:0; border:0; display:block;' ";b+="preload='none' controls='controls' x-webkit-airplay='allow' ";b+=">"+this.flashvars.title+"</video>";return b},getLinkHTML:function(){var a="<a href='"+this.link+"' ";a+="title='"+this.flashvars.title+"' style='display:block; position:relative; ";a+="width:"+this.width+"px; ";a+="height:"+this.height+"px; ";a+="background: #000 url("+this.image+") no-repeat center center;'>";if(this.link.substr(-4)!=".jpg"){a+="<img src='"+this.button+"' alt='Click to play video' ";a+="style='position:absolute; top:"+(Math.round(this.height/2)-44)+"px; ";a+="left:"+(Math.round(this.width/2)-44)+"px; border:0;' />"}a+="</a>";return a},addSource:function(b,c,a){this.sources.push({url:b,width:c,mediaid:a})},addVariable:function(a,b){b=decodeURIComponent(b);if(a=="plugins"&&this.flashvars.plugins){this.flashvars.plugins+=","+b}else{this.flashvars[a]=b}},getVariables:function(){var b=new Array();for(var a in this.flashvars){b[b.length]=a+"="+encodeURIComponent(this.flashvars[a])}return b.join("&")},itemPing:function(){if(this.pinged){return}var a=new Image();a.src=this.flashvars["ping.pixel"]+"?event=item&file="+encodeURIComponent(this.sources[this.index].url)+"&mediaid="+this.sources[this.index].mediaid+"&r="+Math.random();this.pinged=true},readyPing:function(){var a=new Image();a.src=this.flashvars["ping.pixel"]+"?event=ready&referrer="+encodeURIComponent(window.location.href)+"&playerid="+this.id+"&renderingmode=html5&r="+Math.random();var b=this;document.getElementById(this.id+"_vid").addEventListener("play",function(){b.itemPing()})},loadVideo:function(a){jwplayer(this.id).load(this.domain+"/jwp/"+a+".xml")}};botrObject.domTimer=setInterval(botrObject.isDomReady,50)}if(typeof(jwplayer)=="undefined"){jwplayer=function(a){return jwplayer.constructor(a)};jwplayer.constructor=function(a){};$jw=jwplayer;(function(b){var a=[];b.constructor=function(c){return b.api.selectPlayer(c)};b.api=function(){};b.api.events={API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_MEDIA_BUFFER:"jwplayerMediaBuffer",JWPLAYER_MEDIA_BUFFER_FULL:"jwplayerMediaBufferFull",JWPLAYER_MEDIA_ERROR:"jwplayerMediaError",JWPLAYER_MEDIA_LOADED:"jwplayerMediaLoaded",JWPLAYER_MEDIA_COMPLETE:"jwplayerMediaComplete",JWPLAYER_MEDIA_TIME:"jwplayerMediaTime",JWPLAYER_MEDIA_VOLUME:"jwplayerMediaVolume",JWPLAYER_MEDIA_META:"jwplayerMediaMeta",JWPLAYER_MEDIA_MUTE:"jwplayerMediaMute",JWPLAYER_PLAYER_STATE:"jwplayerPlayerState",JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem"};b.api.events.state={BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"};b.api.PlayerAPI=function(h){this.id=h;this.container=null;var j={};var n={};var c=[];var f=undefined;var i=false;var g=[];var m={};var k=0;this.setPlayer=function(o){f=o};this.stateListener=function(o,p){if(!n[o]){n[o]=[];this.eventListener(b.api.events.JWPLAYER_PLAYER_STATE,e(o))}n[o].push(p);return this};function e(o){return function(q){var p=q.newstate,s=q.oldstate;if(p==o){var r=n[p];if(r){for(var t=0;t<r.length;t++){if(typeof r[t]=="function"){r[t].call(this,{oldstate:s,newstate:p})}}}}}}this.addInternalListener=function(o,p){o.jwAddEventListener(p,'function(dat) { jwplayer("'+this.id+'").dispatchEvent("'+p+'", dat); }')};this.eventListener=function(o,p){if(!j[o]){j[o]=[];if(f&&i){this.addInternalListener(f,o)}}j[o].push(p);return this};this.dispatchEvent=function(q){if(j[q]){var p=d(q,arguments[1]);for(var o=0;o<j[q].length;o++){if(typeof j[q][o]=="function"){j[q][o].call(this,p)}}}};function d(p,o){var q=b.api.extend({},o);if(p==b.api.events.JWPLAYER_FULLSCREEN){q.fullscreen=q.message;delete q.message}else{if(p==b.api.events.JWPLAYER_PLAYLIST_ITEM){if(q.item&&q.index===undefined){q.index=q.item;delete q.item}}else{if(typeof q.data=="object"){q=b.api.extend(q,q.data);delete q.data}}}return q}this.callInternal=function(p,o){if(i){if(typeof f!="undefined"&&typeof f[p]=="function"){if(o!==undefined){return(f[p])(o)}else{return(f[p])()}}return null}else{g.push({method:p,parameters:o})}};this.playerReady=function(q){i=true;if(!f){this.setPlayer(document.getElementById(q.id))}this.container=document.getElementById(this.id);for(var o in j){this.addInternalListener(f,o)}this.eventListener(b.api.events.JWPLAYER_PLAYLIST_ITEM,function(r){if(r.index!==undefined){k=r.index}else{if(r.item!==undefined){k=r.item}}m={}});this.eventListener(b.api.events.JWPLAYER_MEDIA_META,function(r){b.api.extend(m,r.metadata)});this.dispatchEvent(b.api.events.API_READY);while(g.length>0){var p=g.shift();this.callInternal(p.method,p.parameters)}};this.getItemMeta=function(){return m};this.getCurrentItem=function(){return k};this.destroy=function(){j={};g=[];b.api.destroyPlayer(this.id)};function l(q,s,r){var o=[];if(!s){s=0}if(!r){r=q.length-1}for(var p=s;p<=r;p++){o.push(q[p])}return o}};b.api.PlayerAPI.prototype={container:undefined,options:undefined,id:undefined,getBuffer:function(){return this.callInternal("jwGetBuffer")},getDuration:function(){return this.callInternal("jwGetDuration")},getFullscreen:function(){return this.callInternal("jwGetFullscreen")},getHeight:function(){return this.callInternal("jwGetHeight")},getLockState:function(){return this.callInternal("jwGetLockState")},getMeta:function(){return this.getItemMeta()},getMute:function(){return this.callInternal("jwGetMute")},getPlaylist:function(){var d=this.callInternal("jwGetPlaylist");for(var c=0;c<d.length;c++){if(d[c].index===undefined){d[c].index=c}}return d},getPlaylistItem:function(c){if(c==undefined){c=this.getCurrentItem()}return this.getPlaylist()[c]},getPosition:function(){return this.callInternal("jwGetPosition")},getState:function(){return this.callInternal("jwGetState")},getVolume:function(){return this.callInternal("jwGetVolume")},getWidth:function(){return this.callInternal("jwGetWidth")},setFullscreen:function(c){if(c===undefined){this.callInternal("jwSetFullscreen",true)}else{this.callInternal("jwSetFullscreen",c)}return this},setMute:function(c){if(c===undefined){this.callInternal("jwSetMute",true)}else{this.callInternal("jwSetMute",c)}return this},lock:function(){return this},unlock:function(){return this},load:function(c){this.callInternal("jwLoad",c);return this},playlistItem:function(c){this.callInternal("jwPlaylistItem",c);return this},playlistPrev:function(){this.callInternal("jwPlaylistPrev");return this},playlistNext:function(){this.callInternal("jwPlaylistNext");return this},resize:function(d,c){this.container.width=d;this.container.height=c;return this},play:function(c){if(typeof c==="undefined"){var c=this.getState();if(c==b.api.events.state.PLAYING||c==b.api.events.state.BUFFERING){this.callInternal("jwPause")}else{this.callInternal("jwPlay")}}else{this.callInternal("jwPlay",c)}return this},pause:function(){var c=this.getState();switch(c){case b.api.events.state.PLAYING:case b.api.events.state.BUFFERING:this.callInternal("jwPause");break;case b.api.events.state.PAUSED:this.callInternal("jwPlay");break}return this},stop:function(){this.callInternal("jwStop");return this},seek:function(c){this.callInternal("jwSeek",c);return this},setVolume:function(c){this.callInternal("jwSetVolume",c);return this},onBufferChange:function(c){return this.eventListener(b.api.events.JWPLAYER_MEDIA_BUFFER,c)},onBufferFull:function(c){return this.eventListener(b.api.events.JWPLAYER_MEDIA_BUFFER_FULL,c)},onError:function(c){return this.eventListener(b.api.events.JWPLAYER_ERROR,c)},onFullscreen:function(c){return this.eventListener(b.api.events.JWPLAYER_FULLSCREEN,c)},onMeta:function(c){return this.eventListener(b.api.events.JWPLAYER_MEDIA_META,c)},onMute:function(c){return this.eventListener(b.api.events.JWPLAYER_MEDIA_MUTE,c)},onPlaylist:function(c){return this.eventListener(b.api.events.JWPLAYER_PLAYLIST_LOADED,c)},onPlaylistItem:function(c){return this.eventListener(b.api.events.JWPLAYER_PLAYLIST_ITEM,c)},onReady:function(c){return this.eventListener(b.api.events.API_READY,c)},onResize:function(c){return this.eventListener(b.api.events.JWPLAYER_RESIZE,c)},onComplete:function(c){return this.eventListener(b.api.events.JWPLAYER_MEDIA_COMPLETE,c)},onTime:function(c){return this.eventListener(b.api.events.JWPLAYER_MEDIA_TIME,c)},onVolume:function(c){return this.eventListener(b.api.events.JWPLAYER_MEDIA_VOLUME,c)},onBuffer:function(c){return this.stateListener(b.api.events.state.BUFFERING,c)},onPause:function(c){return this.stateListener(b.api.events.state.PAUSED,c)},onPlay:function(c){return this.stateListener(b.api.events.state.PLAYING,c)},onIdle:function(c){return this.stateListener(b.api.events.state.IDLE,c)},setup:function(c){return this},remove:function(){this.destroy()},initializePlugin:function(c,d){return this}};b.api.selectPlayer=function(d){var c;if(d==undefined){d=0}if(d.nodeType){c=d}else{if(typeof d=="string"){c=document.getElementById(d)}}if(c){var e=b.api.playerById(c.id);if(e){return e}else{return b.api.addPlayer(new b.api.PlayerAPI(c))}}else{if(typeof d=="number"){return b.getPlayers()[d]}}return null};b.api.playerById=function(d){for(var c=0;c<a.length;c++){if(a[c].id==d){return a[c]}}return null};b.api.addPlayer=function(c){for(var d=0;d<a.length;d++){if(a[d]==c){return c}}a.push(c);return c};b.api.destroyPlayer=function(e){var d=-1;for(var f=0;f<a.length;f++){if(a[f].id==e){d=f;continue}}if(d>=0){var c=document.getElementById(a[d].id);if(c){c.parentNode.innerHTML=""}a.splice(d,1)}return null};b.api.extend=function(){var c=b.api.extend["arguments"];if(c.length>1){for(var d=1;d<c.length;d++){for(element in c[d]){c[0][element]=c[d][element]}}return c[0]}return null};b.api.playerReady=function(d){var c=b.api.playerById(d.id);if(c){c.playerReady(d)}};b.getPlayers=function(){return a.slice(0)}})(jwplayer)};

/** With the library defined, initialize the player and api and inject all sources and flashvars. **/
document.write("<div class='botrplayer' id='botr_QXaroi5M_PXH9U33f_div' style='width:640px;'></div>");

try { 
    jwplayer.api.addPlayer(new jwplayer.api.PlayerAPI('botr_QXaroi5M_PXH9U33f_swf'));
} catch (err) { /* In case people use BOTR + JW Embedder. */ }

var botr_QXaroi5M_PXH9U33f = new botrObject.swf(
	"http://d2ciznq2rtdp7k.cloudfront.net/player-12953.swf",
	"http://video.viewbyvideo.tv/staticfiles/play.png",
	"http://video.viewbyvideo.tv/staticfiles/permission_denied.jpg",
	"http://video.viewbyvideo.tv/staticfiles/permission_denied.mp4",
	"botr_QXaroi5M_PXH9U33f",
	"640",
	"379",
	"http://video.viewbyvideo.tv"
);

botr_QXaroi5M_PXH9U33f.addSource("http://wpc.413C.edgecastcdn.net/00413C/content/conversions/1UOrJqQM/videos/QXaroi5M-272296.mp4?77c801d752d5207784c49f77dc0fb953b92e178ce7274bd9051280e95708b48bd7ae7f94146ce4d18498e7a68cc24a2c22ec4374bec358c868a37d262513716afc276bb607e3b96f55ddc6bf9d868de5286d298ef0d6340fa1e74eb6cff51f3121d20464a6f6f8dee5a44062eeb2a7","320","QXaroi5M");
botr_QXaroi5M_PXH9U33f.addSource("http://wpc.413C.edgecastcdn.net/00413C/content/conversions/1UOrJqQM/videos/QXaroi5M-272297.mp4?77c801d752d5207784c49f77dc0fb953b92e178ce7274bd9051280e95708b48bd7ae7f94146ce4d18498e7a68cc24a2c22ec4374bec358c868a37d262513716afc276bb607e3b96f55ddc6bf9d868de5286d298ef0d6340fa1e74eb6cff51f3121d20464a6f6f8dee5a44162eeb2a7","480","QXaroi5M");
botr_QXaroi5M_PXH9U33f.addSource("http://wpc.413C.edgecastcdn.net/00413C/content/conversions/1UOrJqQM/videos/QXaroi5M-272298.mp4?77c801d752d5207784c49f77dc0fb953b92e178ce7274bd9051280e95708b48bd7ae7f94146ce4d18498e7a68cc24a2c22ec4374bec358c868a37d262513716afc276bb607e3b96f55ddc6bf9d868de5286d298ef0d6340fa1e74eb6cff51f3121d20464a6f6f8dee5a44e62eeb2a7","720","QXaroi5M");
botr_QXaroi5M_PXH9U33f.addSource("http://wpc.413C.edgecastcdn.net/00413C/content/conversions/1UOrJqQM/videos/QXaroi5M-272775.mp4?77c801d752d5207784c49f77dc0fb953b92e178ce7274bd9051280e95708b48bd7ae7f94146ce4d18498e7a68cc24a2c22ec4374bec358c868a37d262513716afc276bb607e3b96f55ddc6bf9d868de5286d298ef0d6340fa1e74eb6cff51f3121d20464a6f6f8dee0aa4362eeb2a7","512","QXaroi5M");

botr_QXaroi5M_PXH9U33f.addVariable("logo.hide","false");
botr_QXaroi5M_PXH9U33f.addVariable("file","http://video.viewbyvideo.tv/jwp/QXaroi5M.xml");
botr_QXaroi5M_PXH9U33f.addVariable("repeat","none");
botr_QXaroi5M_PXH9U33f.addVariable("autostart","true");
botr_QXaroi5M_PXH9U33f.addVariable("playlist.size","200");
botr_QXaroi5M_PXH9U33f.addVariable("dock","false");
botr_QXaroi5M_PXH9U33f.addVariable("frontcolor","FFFFFF");
botr_QXaroi5M_PXH9U33f.addVariable("image","http://video.viewbyvideo.tv/thumbs/QXaroi5M-640.jpg");
botr_QXaroi5M_PXH9U33f.addVariable("stretching","uniform");
botr_QXaroi5M_PXH9U33f.addVariable("backcolor","595959");
botr_QXaroi5M_PXH9U33f.addVariable("height","379");
botr_QXaroi5M_PXH9U33f.addVariable("playlist.position","none");
botr_QXaroi5M_PXH9U33f.addVariable("width","640");
botr_QXaroi5M_PXH9U33f.addVariable("lightcolor","A8A8A8");
botr_QXaroi5M_PXH9U33f.addVariable("controlbar.position","bottom");
botr_QXaroi5M_PXH9U33f.addVariable("skin","http://d1rhaz9gq9lm5b.cloudfront.net/wMnhpn8l.swf");
botr_QXaroi5M_PXH9U33f.addVariable("ping.pixel","http://video.viewbyvideo.tv/ping.gif");
botr_QXaroi5M_PXH9U33f.addVariable("title","Our Calabay Villa");
botr_QXaroi5M_PXH9U33f.addVariable("displayclick","play");

botr_QXaroi5M_PXH9U33f.addVariable("playerready","jwplayer.api.playerReady");

