(function(){
var _1=document.location.href.indexOf("player.local/HTM/")>-1||/devMode/.test(document.location.href),_2=0,ua=navigator.userAgent.toLowerCase(),_3="",_4="",v,_5=document.getElementsByTagName("script");
_5=_5[_5.length-1];
window.bvConfig=window.bvConfig||{};
if(_2){
bvConfig.ffVideo=true;
}
window.bvOnScriptsLoaded=function(){
window.bvPageDebugger&&window.bvPageDebugger();
var b=window.bv;
var ss=b.byTag("script");
for(var i=ss.length-1;i>0;i--){
if(_3&&ss[i].src==_3){
_5=ss[i];
console.log("   script sync:",_5,_3);
break;
}else{
if(ss[i]&&ss[i].src&&/bv/.test(ss[i].src)){
_5=ss[i];
_3=ss[i].src;
console.log("   script async:",_5,_3);
break;
}
}
}
_3=_5.src.substring(0,_5.src.lastIndexOf("/")+1);
b.initParams&&b.initParams(_3,_5);
b.onPlayerParams&&b.onPlayerParams().addCallback(function(_6){
if(!_6){
console.warn("no player args found");
}else{
b.initPlayer(_6);
}
},null,"name.onPlayerParams");
};
})();
(function(){
if(window.bvConfig===undefined){
window.bvConfig={};
}
if(bvConfig.nofixios){
return;
}
var _1=window.debug||bvConfig.debug||/debug=true/.test(document.location.href)||false;
bvConfig.loglimit=bvConfig.loglimit||299;
var _2=bvConfig.loglimit;
var ua=window.navigator.userAgent;
var _3="info,error,log,warn";
var _4="debug,time,timeEnd,assert,count,trace,dir,dirxml,group,groupEnd,groupCollapsed,exception";
var _5=/Android/.test(ua);
if(bvConfig.pageDebug||(_5&&bvConfig.androidDebug)){
var _6=false;
if(!/Firefox/.test(ua)){
window.console={};
}
var c=window.console;
var _7;
var _8=[];
var _9=function(_a,_b){
_8.push({type:_a,args:_b});
};
var _c=function(){
_8.forEach(function(o){
bv.dom("div",{css:"bvLog",innerHTML:o.type+":"+o.args},_7);
});
_8=[];
};
_3.split(",").forEach(function(n){
(function(){
var _d=n;
c[n]=function(){
_9(_d,Array.prototype.slice.call(arguments).join(" "));
};
})();
});
_4.split(",").forEach(function(n){
c[n]=function(){
};
});
window.bvPageDebugger=function(){
bv.ready(function(){
_7=bv.byId("bvDbg");
_c();
});
bv.on("interval",function(){
if(_8.length){
_c();
}
},100);
};
}
if(!window.console){
console={};
_1=false;
}
var _e=function(){
var _f=_3.split(",");
for(var i=0;i<_f.length;i++){
var m=_f[i];
var n="_"+_f[i];
console[n]=console[m];
console[m]=(function(){
var _10=n;
return function(){
_2--;
if(_2==0){
console.clear();
_2=bvConfig.loglimit;
}
if(_2<1){
return;
}
try{
console[_10](Array.prototype.slice.call(arguments).join(" "));
}
catch(e){
throw new Error("Error **consoleFix** Failed on log type "+_10);
}
};
})();
}
try{
console.clear();
}
catch(e){
}
};
var _11=function(){
console._log=console.log;
console.log=console.debug=console.info=console.warn=console.error=function(){
var a=[];
for(var i=0;i<arguments.length;i++){
a.push(arguments[i]);
}
console._log(a.join(" "));
};
};
var _12=function(str){
var _13=str.split(",");
for(var i=0;i<_13.length;i++){
console[_13[i]]=function(){
};
}
};
if(_1&&/Trident/.test(ua)){
_e();
_12(_4);
}else{
if(_1&&/iPad|iPhone/.test(ua)){
_11();
}else{
if((/IE/.test(ua)&&!/Trident/.test(ua))||!_1||!window.console){
_12(_4+","+_3);
}
}
}
})();
(function(){
if(window.bv){
return;
}
if(!window.bvConfig){
window.bvConfig={};
}
var d=document,_1=-1,_2={},_3,_4;
var _5=function(){
if(!_4){
_4=d.createElement("div");
}
return _4;
};
var bv={nodeId:"",init:function(_6){
if(_6){
this.node=this.byId(_6);
}
},getMainNode:function(){
return this.node;
},setConfig:function(){
if(this.config){
return;
}
var _7=(d.location.hash||d.location.search).substring(1);
var o=this.config=window.bvConfig||{};
this.mix(o,this.strToObj(_7));
o.cacheBust=o.cacheBust||/cache/.test(_7)||false;
o.debug=o.debug||o.isDebug||/debug=true/.test(_7)||false;
o.flashDebug=(o.debug&&!o.mutePlayerDebug)||/flashDebug=true/.test(_7)||false;
},query:function(){
var a=arguments,n,q,_8=a[2];
if(this.is(a[0],"node")){
n=a[0];
q=a[1];
}else{
n=document;
q=a[0];
if(a[1]){
_8=a[1];
}
}
var r=n.querySelectorAll(q);
if(!r||!r.length){
return false;
}
if(_8=="first"){
return r[0];
}
if(_8=="last"){
return r[r.length-1];
}
return r;
},g:function(q){
return this.query(q,"last");
},byTag:function(_9,_a,_b){
if(!_a||_a===true){
_a=_9;
_9=document;
}
var _c=_9.getElementsByTagName(_a);
if(_a===true||_b===true){
return _c[0];
}
return _c;
},byId:function(id){
return typeof (id)=="string"?document.getElementById(id):id;
},urlEscape:function(s){
var t="";
for(var i=0;i<s.length;i++){
if(s.charCodeAt(i)<255){
t+=s.charAt(i);
}
}
return escape(t);
},urlEncode:function(_d){
return encodeURI(this.trim(_d).replace(" ","+"));
},trim:function(_e){
return !_e?_e:_e.trim?_e.trim():_e.replace(/^\s\s*/,"").replace(/\s\s*$/,"");
},normalize:function(v,_f){
if(v=="true"){
return true;
}
if(v=="false"){
return false;
}
if(v.substring(0,1)=="0"){
return v;
}
if(Number(v)==v){
return Number(v);
}
if(/,/.test(v)&&_f=="&"){
v=v.split(",");
for(var i=0;i<v.length;i++){
v[i]=this.normalize(v[i]);
}
}
return v;
},urlToObj:function(url){
var loc=location,q;
url=url||loc.href;
if(/\?|\#/.test(url)){
q=url.split(/\?|\#/);
url=q[0];
q=q[1];
}
var o={protocol:loc.protocol,host:loc.host,href:url,query:{}},_10;
if(q){
o.query=this.strToObj(q);
}
if(/\:/.test(url)){
url=url.replace("://","/");
_10=url.split("/");
o.protocol=_10.shift();
o.host=_10.shift();
o.sameDomain=o.host==loc.host;
}else{
_10=url.split("/");
o.sameDomain=true;
}
o.filename=_10.pop();
o.folder=_10.join("/");
return o;
},strToObj:function(str){
if(!str){
return {};
}
var _11=/&/.test(str)?"&":",",eq=/=/.test(str)?"=":":",o={},a=str.split(_11);
for(var i=0;i<a.length;i++){
if(!/=/.test(a[i])&&!/=/.test(a[i])){
continue;
}
var pr=this.trim(a[i]).split(eq);
if(pr[0]=="file"){
o[this.trim(pr[0])]=this.normalize(a[i].substring(a[i].indexOf(eq)+1));
}else{
o[this.trim(pr[0])]=this.normalize(this.trim(pr[1]));
}
}
return o;
},toQuery:function(o,_12){
_12=_12?_12.join(","):false;
var a=[];
for(var nm in o){
if((!_12||_12.indexOf(nm)==-1)&&o[nm]!==""){
a.push(nm+"="+o[nm]);
}
}
return a.join("&");
},cb:function(){
if(!this.cacheBust){
return "";
}
return "?cb="+(new Date().getTime());
},last:function(ar){
return ar[ar.length-1];
},each:function(ar,_13,ctx){
ctx=ctx||window;
var f=bv.bind(ctx,_13);
for(var i=0;i<ar.length;i++){
f(ar[i],i,ar);
}
},copy:function(o){
var o1={};
for(var nm in o){
if(typeof (o[nm])=="object"){
o1[nm]=this.copy(o[nm]);
}else{
o1[nm]=o[nm];
}
}
return o1;
},mix:function(o1,o2,opt){
opt=opt||{};
if(opt.copy){
o1=this.copy(o1);
}
var _14=opt.notUndefined;
if(!o2){
o2=o1;
o1=this;
}
for(var nm in o2){
if(_14&&o1[nm]===undefined){
continue;
}
o1[nm]=o2[nm];
}
return o1;
},uid:function(str){
_1++;
return (str||"id")+"_"+_1;
},Deferred:function(){
var _15=[];
var fn;
this.addCallback=function(obj,_16,_17){
fn=_17;
_15.push(bv.bind(obj,_16));
};
this.fire=function(){
var _18=arguments;
setTimeout(function(){
for(var i=0;i<_15.length;i++){
_15[i].apply(null,_18);
}
_15=[];
},1);
};
},createCallback:function(o,f,_19,ctx){
ctx=ctx||this;
ctx[_19]=function(o,f){
};
},_scripts:{},script:function(src){
var dfd=new this.Deferred();
if(this._scripts[src]){
dfd.fire();
}else{
var s=document.createElement("script");
this._scripts[src]=true;
this.on(s,"load",function(evt){
dfd.fire();
});
document.documentElement.firstChild.appendChild(s).src=src;
}
return dfd;
},domReady:false,domHandlers:[],ready:function(a1,a2){
var _1a;
if(typeof (a1)=="string"){
if(this.byId(a1)){
a2();
return;
}
_1a=a2;
}else{
if(this.is(a1,"object")){
_1a=this.bind(a1,a2);
}else{
_1a=a1;
}
}
if(this.domReady){
_1a();
return;
}
this.domHandlers.push(_1a);
},onDomReady:function(){
if(this.domReady){
return;
}
this.domReady=true;
if(this.domHandlers.length){
for(var i=0;i<this.domHandlers.length;i++){
this.domHandlers[i]();
}
this.domHandlers=[];
}
},swfReady:false,swfHandlers:[],onSwfReady:function(a1,a2){
var _1b=this.bind(a1,a2);
if(this.swfReady){
_1b(bv.swf());
return;
}
this.swfHandlers.push(_1b);
},swfLoadComplete:function(swf){
if(this.swfReady){
return;
}
this.swfReady=true;
if(this.swfHandlers.length){
for(var i=0;i<this.swfHandlers.length;i++){
this.swfHandlers[i](bv.swf());
}
this.swfHandlers=[];
}
},box:function(n){
var ret={},o;
if(n&&!!n.getBoundingClientRect){
o=n.getBoundingClientRect();
var w=o.width||o.right-o.left,h=o.height||o.bottom-o.top;
ret={w:w,h:h};
}else{
if(!!n){
var o=window.getComputedStyle(n,null);
ret={w:parseFloat(o.width,10),h:parseFloat(o.height,10)};
}
}
return ret;
},size:function(n,_1c){
n=this.byId(n);
if(n===window){
var _1d=(document.compatMode=="BackCompat")?document.body:document.documentElement;
return {w:_1d.clientWidth,h:_1d.clientHeight,x:_1d.scrollLeft||0,y:_1d.scrollTop||0,win:true};
}
var ret={};
if(!!n.getBoundingClientRect){
var o=n.getBoundingClientRect();
var w=o.width||o.right-o.left;
var h=o.height||o.bottom-o.top;
ret={x:o.left,y:o.top,w:w,h:h,bounding:true};
}else{
if(!!n){
var box=window.getComputedStyle(n,null);
var x=0,y=0;
while(n&&n.tagName!="BODY"){
x+=n.clientLeft;
y+=n.clientTop;
n=n.parentNode;
}
ret={x:x,y:y,w:parseFloat(box.width,10),h:parseFloat(box.height,10),compat:true};
}
}
if(_1c){
var _1e={x:window.pageXOffset,y:window.pageYOffset};
ret.x+=_1e.x;
ret.y+=_1e.y;
}
return ret;
},error:function(msg){
console.error(msg||"An error has occurred.");
},minMax:function(num,n1,n2){
var min,max;
if(n1>n2){
min=n2;
max=n1;
}else{
min=n1;
max=n2;
}
if(num<min){
return min;
}
if(num>max){
return max;
}
return num;
return Math.max(num,Math.min(num,max));
},style:function(_1f,_20,_21){
_1f=this.byId(_1f);
if(typeof (_20)=="string"){
if(_20=="opacity"&&this.is_ielt9()){
_21=Math.ceil(_21*100);
_1f.style.filter="alpha(opacity="+_21+")";
}else{
if(_21!==undefined){
try{
_1f.style[_20]=_21;
}
catch(e){
console.error("style error: ",_20,_21);
if(_1f){
console.error("              ",_1f.tagName+"."+_1f.id+"."+_1f.className);
}
}
}else{
var s=_1f.currentStyle||_1f.ownerDocument.defaultView.getComputedStyle(_1f,null);
if(s[_20]=="auto"){
_1f.style[_20]="0px";
return 0;
console.error("missing IE auto fix for ??? ",_20);
}
return /px/.test(s[_20])?parseInt(s[_20],10):s[_20];
}
}
}else{
for(var nm in _20){
this.style(_1f,nm,_20[nm]);
}
}
return true;
},show:function(_22,opt){
if(this.is_array(_22)){
this.each(_22,function(n){
this.show(n,opt);
},this);
return null;
}
var _23="block";
if(opt===false){
return this.hide(_22);
}else{
if(typeof (opt)=="string"){
_23=opt;
}
}
return this.style(_22,"display",_23);
},hide:function(_24){
if(this.is_array(_24)){
this.each(_24,function(n){
this.hide(n);
},this);
return null;
}
return this.style(_24,"display","none");
},css:function(n,_25,_26){
if(!n||!_25){
return;
}
_26=_26===undefined?true:_26;
n=this.byId(n);
var c="className";
var r=new RegExp(_25,"g");
if(_26==="toggle"){
if(r.test(n[c])){
n[c]=/\s/.test(n[c])?n[c].replace(r,""):"";
}else{
n[c]+=n[c]?" "+_25:_25;
}
}else{
if(_26===true){
if(r.test(n[c])){
return;
}
n[c]+=n[c]?" "+_25:_25;
}else{
if(!r.test(n[c])){
return;
}
n[c]=/\s/.test(n[c])?n[c].replace(r,""):"";
}
}
},create:function(_27,tag,_28,_29,_2a){
var n;
if(!tag){
return d.createElement(tag);
}else{
if(_2a){
n=d.createElement(tag);
this.byId(_27).parentNode.replaceChild(n,_27);
}else{
n=this.byId(_27).appendChild(d.createElement(tag));
}
}
this.css(n,_28);
if(_29){
for(var nm in _29){
if(nm=="innerHTML"){
n.innerHTML=_29[nm];
}else{
if(nm=="value"){
n.value=_29[nm];
}else{
n.setAttribute(nm,_29[nm]);
}
}
}
}
return n;
},dom:function(tag,_2b,_2c,_2d){
var n=d.createElement(tag);
if(_2d){
this.byId(_2c).parentNode.replaceChild(n,_2c);
}else{
if(_2c){
this.byId(_2c).appendChild(n);
}
}
if(_2b){
if(typeof (_2b)=="string"){
this.css(n,_2b);
}else{
if(_2b.on){
for(var _2e in _2b.on){
this.on(n,_2e,_2b.on[_2e]);
}
delete _2b.on;
}
for(var nm in _2b){
if(nm=="className"||nm=="css"){
this.css(n,_2b.className||_2b.css);
}else{
if(nm=="innerHTML"||nm=="html"){
n.innerHTML=_2b[nm];
}else{
if(nm=="style"){
this.style(n,_2b[nm]);
}else{
if(nm=="value"){
n.value=_2b[nm];
}else{
if(nm=="selectable"){
this.selectable(n,_2b[nm]);
}else{
n.setAttribute(nm,_2b[nm]);
}
}
}
}
}
}
}
}
return n;
},isDescendant:function(_2f,_30){
try{
_2f=this.byId(_2f);
_30=this.byId(_30);
while(_2f){
if(_2f==_30){
return true;
}
_2f=_2f.parentNode;
}
}
catch(e){
}
return false;
},getAncestor:function(_31,tag){
var n=_31;
tag=tag.toUpperCase();
while(n){
if(n.tagName.toUpperCase()==tag){
return n;
}
n=n.parentNode;
}
return null;
},is:function(obj,_32){
if(this.is_array(_32)){
for(var i=0;i<_32.length;i++){
if(this.is(obj,_32[i])){
return true;
}
}
return false;
}
switch(_32.toLowerCase()){
case "node":
return obj&&typeof (obj)==="object"&&obj.tagName;
case "window":
return typeof (obj)!=="undefined"&&typeof (obj)==="object"&&obj.document&&obj.navigator;
case "function":
return typeof (obj)=="function";
case "array":
return this.is_array(obj);
case "string":
return typeof (obj)==="string"||obj instanceof String;
case "number":
return typeof (obj)==="number"||obj instanceof Number;
case "object":
return typeof (obj)=="object"&&this.not(obj,"string")&&this.not(obj,"array")&&this.not(obj,"function");
}
return false;
},not:function(obj,_33){
return !this.is(obj,_33);
},is_array:function(obj){
return obj&&typeof (obj)!="string"&&obj.length!==undefined;
},destroy:function(n){
var t=_5();
n=this.byId(n);
t.appendChild(n.parentNode?n.parentNode.removeChild(n):n);
t.innerHTML="";
},selectable:function(_34,_35){
_34=this.byId(_34);
if(this.is_ff()){
_34.style.MozUserSelect=_35?"":"none";
}else{
if(this.is_webkit()){
_34.style.KhtmlUserSelect=_35?"auto":"none";
}else{
if(this.is_ie()){
var v=(_34.unselectable=_35?"":"on");
var _36=_34.getElementsByTagName("*");
for(var i=0,len=_36.length;i<len;i++){
_36[i].unselectable=_35?"":"on";
}
}
}
}
},log:function(){
args=Array.prototype.slice.call(arguments);
bv.each(args,function(a,i){
if(bv.is(a,"node")){
args[i]=a.tagName.toLowerCase()+"#"+a.id;
}else{
if(bv.is(a,"function")){
args[i]="embed#"+a.id;
}
}
});
args.unshift("   :");
console.log.apply(console,args);
},logx:function(){
}};
window.bv=bv;
bv.setConfig();
})();
(function(b){
var ua=navigator.userAgent;
b.ready(function(){
if(b.byId("ua")){
b.byId("ua").innerHTML=ua;
}
});
b.mix({is_webkit:function(){
return /WebKit/.test(ua);
},is_ipad:function(){
return /iPad/.test(ua);
},is_iphone:function(){
return /iPhone/.test(ua);
},is_android:function(){
return /Android/.test(ua);
},is_chrome:function(){
return /Chrome/.test(ua);
},is_opera:function(){
return /Opera/.test(ua)||/Presto/.test(ua);
},is_ff:function(){
var s=/Firefox\/\d+\.\d+/.exec(ua);
return s&&Number(s[0].split("/")[1]);
},is_ie:function(){
var r=/MSIE\s\d+/.exec(ua),_1;
if(r&&r.length){
_1=Number(r[0].split(" ")[1]);
this.is_ie=function(){
return _1;
};
}else{
_1=false;
}
this.is_ie=function(){
return _1;
};
return _1;
},is_ie6:function(){
return /MSIE 6/.test(ua);
},is_ie7:function(){
return /MSIE 7/.test(ua);
},is_ielt8:function(){
return this.is_ie7()||this.is_ie6();
},is_ie8:function(){
return /MSIE 8/.test(ua);
},is_ielt9:function(){
return this.is_ie()&&this.is_ie()<9;
},is_ie9:function(){
return /MSIE 9/.test(ua);
},is_ie10:function(){
return /MSIE 10/.test(ua);
},is_ios:function(){
return this.is_ipad()||this.is_iphone();
},is_mobile:function(){
return b.config.mobileEmulation||this.is_iphone()||this.is_android();
},is_dev:function(){
return /local/.test(document.location.href);
},setBrowserDocumentClass:function(_2,_3){
var _4=[];
if(this.is_ie10()){
_4.push("bv_ie10 bv_iegt8");
}else{
if(this.is_ie9()){
_4.push("bv_ie9 bv_iegt8");
}else{
if(this.is_ie8()){
_4.push("bv_ielt9 bv_ie8");
}else{
if(this.is_ie7()){
_4.push("bv_ielt9 bv_ielt8 bv_ie7");
}else{
if(this.is_ie6()){
_4.push("bv_ielt9 bv_ielt8 bv_ie6");
}else{
if(this.is_ff()){
_4.push("bv_ff");
if(this.is_ff()<4){
_4.push("bv_fflt4");
}
}else{
if(this.is_webkit()){
_4.push("bv_wk");
}
}
}
}
}
}
}
if(this.is_ie()){
_4.push("bv_ie");
}
if(this.is_ielt8()){
_4.push("bv_Quirks");
}else{
_4.push("bv_notQuirks");
}
if(this.is_mobile()){
_4.push("bv_mobile");
if(this.is_ipad()){
_4.push("bv_ipad");
}else{
if(this.is_iphone()){
_4.push("bv_iphone");
}else{
if(this.is_android()){
_4.push("bv_android");
}
}
}
}
if(_3){
_4.push(_3);
}
(_2||document.documentElement).className=_4.join(" ");
}});
})(window.bv);
(function(b){
var _1={},_2={};
var _3=[];
var _4;
var _5={};
var _6={};
var _7=30;
var _8=(b.is_chrome&&b.is_chrome())?-20:-120;
var _9=function(_a){
_a.explicitOriginalTarget=_a.currentTarget=_a.toElement;
_a.target=_a.srcElement;
return _a;
};
var _b=function(_c){
var o={type:"scroll"};
if(_c.wheelDelta){
if(_c.wheelDeltaX){
o.horizontal=true;
o.vertical=false;
o.scrollX=_c.wheelDeltaX/_8;
o.scrollY=0;
}else{
o.horizontal=false;
o.vertical=true;
o.scrollX=0;
o.scrollY=_c.wheelDeltaY/_8;
}
}else{
if(_c.axis==_c.HORIZONTAL_AXIS){
o.horizontal=true;
o.vertical=false;
o.scrollX=_c.detail;
o.scrollY=0;
}else{
o.horizontal=false;
o.vertical=true;
o.scrollX=0;
o.scrollY=_c.detail;
}
}
return o;
};
b.mix({multi:{sub:function(_d,_e){
var _f=[];
for(var nm in _d){
_f.push(b.sub(nm,_e,_d[nm]));
}
return {remove:function(){
b.each(_f,function(s){
s.remove();
});
},pause:function(){
b.each(_f,function(s){
s.pause();
});
},resume:function(){
b.each(_f,function(s){
s.resume();
});
}};
},on:function(obj,_10,ctx,_11){
var _12=[];
ctx=ctx||null;
for(var nm in obj){
_12.push(b.on(_10,nm,!!ctx?ctx:obj[nm],!!ctx?obj[nm]:null,_11));
}
return {remove:function(){
b.each(_12,function(s){
s.remove();
});
},pause:function(){
b.each(_12,function(s){
s.pause();
});
},resume:function(){
b.each(_12,function(s){
s.resume();
});
}};
}},sub:function(_13,ctx,_14){
if(!_5[_13]){
_5[_13]={};
_6[_13]={};
}
var cb=this.bind(ctx,_14);
var uid=this.uid("sub");
_5[_13][uid]=cb;
return {remove:function(){
delete _5[_13][uid];
},pause:function(){
this.cb=_5[_13][uid];
_5[_13][uid]=function(){
};
},resume:function(){
if(!this.cb){
return;
}
_5[_13][uid]=this.cb;
}};
},pub:function(_15){
if(!_5[_15]){
return;
}
var _16=Array.prototype.slice.call(arguments);
_16.shift();
for(var nm in _5[_15]){
_5[_15][nm].apply(null,_16);
}
},interval:function(ctx,_17,ms,_18){
var fn=b.is(_17,["string","function"])?b.bind(ctx,_17):ctx;
var t=b.is(ms,"number")?ms:b.is(_17,"number")?_17:_7;
var tmr;
var _19=false;
var _1a=new Date().getTime();
var o={resume:function(){
if(_19){
return;
}
tmr=setInterval(function(){
fn((new Date().getTime())-_1a);
},t);
_19=true;
},pause:function(){
_19=false;
clearInterval(tmr);
}};
o.resume();
return o;
},on:function(_1b,_1c,ctx,_1d,_1e){
var _1f=_1b;
if(_1b==="timer"||_1b==="timeout"){
return this.timer({ctx:_1c,method:ctx,d:_1d});
}
if(_1b==="interval"){
return this.interval(_1c,ctx,_1d,_1e);
}
if(typeof (_1b)=="string"){
_1b=this.byId(_1b);
}
if(!_1b){
console.error("no 'on' object found:",_1f,"(","event:",_1c,"method:",_1d,")");
return null;
}
if(_1e=="once"){
return this.once(_1b,_1c,ctx,_1d);
}
if(typeof (_1c)!="string"){
var c=ctx;
ctx=_1c;
_1c=c;
}
if(typeof (_1c)!="string"){
for(var nm in _1c){
this.on(_1b,nm,ctx,_1c[nm]);
}
return 0;
}
var fn=!!_1d?this.bind(ctx,_1d):ctx;
var _20=function(){
};
var _21=fn;
var _22;
var _23=_1b[_1c];
if(_1b.addEventListener){
if(_1c=="scroll"){
_1c=b.is_ff()?"DOMMouseScroll":"mousewheel";
var _24=fn;
fn=function(evt){
_24(_b(evt),evt);
};
}
if(_1c=="mouseenter"||_1c=="mouseleave"){
_1c=_1c=="mouseenter"?"mouseover":"mouseout";
_22=function(evt){
if(!b.isDescendant(evt.relatedTarget,_1b)){
fn(evt);
}
};
_1b.addEventListener(_1c,_22,false);
}else{
_22=function(evt){
fn(evt);
};
_1b.addEventListener(_1c,_22,false);
}
}else{
if(_1b.attachEvent){
if(_1c=="scroll"){
_1c="mousewheel";
}
var _22=function(){
fn(_9(window.event));
};
_1b.attachEvent("on"+_1c,_22);
}else{
_1b[_1c]=function(){
if(_1e!="before"){
_23.apply(_1b,arguments);
}
fn.apply(null,arguments);
if(_1e=="before"){
_23.apply(_1b,arguments);
}
};
}
}
return {remove:function(){
fn=_20;
},pause:function(){
fn=_20;
},resume:function(){
fn=_21;
}};
},once:function(_25,_26,ctx,_27){
var fn=this.bind(ctx,_27);
var _28=this.on(_25,_26,function(){
_28.remove();
fn.apply(null,arguments);
});
},press:function(_29,_2a,_2b,arg){
var fn=this.bind(_2a,_2b);
var _2c=arg;
var _2d,_2e,_2f;
var tch=bv.supports.touch();
var _30=function(){
_2d=setInterval(function(){
fn(_2c);
},20);
};
var _31=function(evt){
_2e.pause();
clearInterval(_2d);
};
_2f=this.on(_29,tch?"touchstart":"mousedown",function(evt){
b.stopEvent(evt);
_2e.resume();
_30();
});
_2e=this.on(document,tch?"touchend":"mouseup",function(evt){
b.stopEvent(evt);
_31();
});
_31();
return _2f;
},Xbind:function(ctx,_32,dbg){
console.info("-------------------------------------bind:",ctx,_32);
if(!ctx&&!_32){
console.error("bind - no params");
console.trace();
}
if(typeof (_32)=="string"){
if(!_32){
_32=ctx;
ctx=window;
}
return function(){
ctx[_32].apply(ctx,arguments);
};
}else{
var _33;
(function(){
var _34=!!_32?ctx.func||_32:ctx;
console.log("    bind meth:",_34,"(",_32,ctx,")");
var _35=!!_32?ctx:window;
try{
_33=function(){
try{
_34.apply(_35,arguments);
}
catch(e){
console.error("ERROR:::",e,_34);
console.trace();
console.warn("meth:",_34);
console.warn("ctx, func",ctx,_32);
}
};
}
catch(e2){
console.error("ERROR-e2:::",e2);
}
})();
return _33;
}
},bind:function(ctx,_36,dbg){
if(typeof (_36)=="string"){
if(!_36){
_36=ctx;
ctx=window;
}
return function(){
ctx[_36].apply(ctx,arguments);
};
}else{
var _37=!!_36?ctx.func||_36:ctx;
var _38=!!_36?ctx:window;
return function(){
_37.apply(_38,arguments);
};
}
},partial:function(o,f){
f=typeof (f)=="string"?o[f]:!o.f?this.bind(o,f):o.f;
return function(_39){
f.apply(o,_39);
};
},mouse:function(e){
var _3a=0;
var _3b=0;
var d=document;
if(e.pageX||e.pageY){
_3a=e.pageX;
_3b=e.pageY;
}else{
if(e.clientX||e.clientY){
_3a=e.clientX+d.body.scrollLeft+d.documentElement.scrollLeft;
_3b=e.clientY+d.body.scrollTop+d.documentElement.scrollTop;
}
}
return {x:_3a,y:_3b};
},stopEvent:function(evt){
evt=evt||window.event;
if(!evt){
return false;
}
if(evt.preventDefault){
evt.preventDefault();
evt.stopPropagation();
}else{
evt.cancelBubble=true;
}
return false;
}});
b.sub.debug=function(){
console.dir(_6);
};
})(window.bv);
(function(b){
var d=document;
var el=document.createElement("bv");
var _1=el.style;
var _2=function(_3){
return _3.charAt(0).toUpperCase()+_3.substr(1);
};
window.testcss=function(_4){
var uc=_2(_4);
var _5=[_4,"Webkit"+uc,"Moz"+uc,"O"+uc,"ms"+uc,"Khtml"+uc];
for(var nm in _5){
if(_1[_5[nm]]!==undefined){
return _5[nm];
}
}
return false;
};
var _6={embed:!!d.embeds,object:!d.embeds,touch:function(){
return b.is_ios()||b.is_android();
},memoize:function(_7,_8){
var _9=_8?testhtml(_7):testcss(_7);
this[_7]=function(){
return _9;
};
return _9;
},canvas:function(){
if(b.config.noCanvas){
return false;
}
var _a=!!d.createElement("canvas").getContext;
this.canvas=function(){
return _a;
};
return _a;
},transitionevent:function(){
if(b.is_opera()){
return "OTransitionEnd";
}else{
if(b.is_ff()){
return "transitionend";
}else{
if(b.is_webkit()){
return "webkitTransitionEnd";
}
}
}
return false;
},transition:function(){
return this.memoize("transition");
},transform:function(){
return this.memoize("transform");
},transitions3D:function(){
return b.is_webkit()&&!b.is_chrome();
},addEventListener:function(){
return b.is_ie9()||(!b.is_ie()&&typeof el.addEventListener!=undefined);
},unicode:function(){
return !b.is_ie()&&!b.is_chrome();
},client_has_webm:function(){
return bv.config.forceWebm&&((b.is_chrome()&&!b.is_android())||b.is_ff());
},client_has_mp4:function(){
if(b.is_ie()){
return false;
}
if(b.is_ff()&&bvConfig.ffVideo){
return true;
}
try{
var _b=d.createElement("video");
return _b.canPlayType&&_b.canPlayType("video/mp4");
}
catch(e){
return false;
}
},video:function(){
var _c=!bvConfig.forceflash&&(bvConfig.forceHTML5||this.client_has_mp4());
if(!!bvConfig.forceflash){
console.log("does not support video");
return false;
}else{
}
return _c;
},fullscreen:function(){
return !b.is_chrome()&&this.video();
},social:function(){
return this.video();
},css:function(_d){
switch(_d){
case "box-shadow":
case "opacity":
return !b.is_ie();
}
return true;
}};
var _e=function(_f,_10){
if(_hasevent[_f]!==undefined){
return _hasevent[_f];
}
var _11=_10||d.createElement("div");
_f="on"+_f;
var _12=_f in _11;
if(!_12){
if(_11.setAttribute&&_11.removeAttribute){
_11.setAttribute(_f,"");
_12=typeof _11[_f]=="function";
if(typeof _11[_f]!="undefined"){
_11[_f]=void 0;
}
_11.removeAttribute(_f);
}
}
_11=null;
_hasevent[_f]=_12;
return _12;
};
window.bv.supports=_6;
window.bv.hasEvent=_e;
})(window.bv);
(function(b){
var _1=b.logx;
var _2;
b.mix({initParams:function(rt,sr){
scriptNode=sr;
this.root=(rt||"").replace(/\/core|\/base|\/loader/g,"");
this.setConfig();
_1("ROOT:",this.root);
},initControls:function(){
this.ready(this,function(){
this.player=new bv.Player();
});
},params:{},fixParams:function(o){
for(var nm in this.params){
if(o[nm]===undefined){
o[nm]=this.params[nm];
}
}
if(!o.videoId&&!o.siteId&&!o.vid&&o.media){
if(/siteId/.test(o.media)){
var _3=this.strToObj(unescape(o.media));
if(_3.siteId){
o.videoId=_3.siteId;
}
}
}
_1("get settings...");
this.settings.init({vid:o.videoId||o.vid||o.siteId||"",lid:o.locationId||o.lid,cid:Number(o.clientId)||o.cid,bid:o.lowBandId,file:o.file,poster:o.poster,media:o.media,theme:o.theme});
if(!o.media&&!o.path){
o.src=o.path=this.settings.getVideoPath();
o.preview=this.settings.getPreviewPath();
_1("settings.getVideoPath:",o.src);
}
o.node=this.byId(o.nodeId)||o.node||(this.mdsEmbed()||scriptNode).parentNode;
if(!o.w&&!o.width){
var _4=this.size(o.node);
if(!_4.w||!_4.h){
}else{
o.width=_4.w;
o.height=_4.h;
}
}
o.w=o.width;
o.h=o.height;
_1("player embed params:",o);
this.params=o;
bv.settings.setSocialOptions(o);
return o;
},onPlayerParams:function(_5){
_1("onPlayerParams");
_5=_5||new this.Deferred();
var o,p;
if(scriptNode&&scriptNode.getAttribute("config")){
_1("script node");
p=this.fixParams(this.strToObj(scriptNode.getAttribute("config")));
p.swf=this.root+"mds_player.swf";
}else{
if(this.mdsEmbed()){
_1("mds embed");
var _6=this.mdsEmbed().getAttribute("src").split("?");
o=this.strToObj(_6[1]);
o.swf=_6[0];
p=this.fixParams(o);
}else{
if(!this.domReady){
_1("dom not ready...");
this.ready(this,function(){
_1("dom ready!!");
this.onPlayerParams(_5);
},true);
if(!p){
return _5;
}
}else{
console.info("No player params found on script nor on embed.");
}
}
}
_1("   load media playlist?",p&&p.media);
if(p&&p.media){
_1("_____________LOAD MEDIA!______________");
if(/\.xml/.test(p.media)){
bv.xml.arrayNodeNames=["file"];
bv.xhr(bv.settings.getMediaUrl(),{handleAs:"xml",method:"GET",callback:function(o){
var _7=bv.playlist.set(o);
_1("first video::::::",_7);
p.src=p.path=_7.path;
p.preview=_7.preview;
_1(" final player params:",p.path);
_5.fire(p);
}});
}else{
new b.Jsonp({url:bv.settings.getMediaUrl(),strFunc:"bvCallback",callback:function(o){
var _8=bv.playlist.set(o);
_1("first video::::::",_8);
if(_8){
p.src=p.path=_8.path;
p.preview=_8.preview;
_1(" final player params:",p.path);
}else{
console.info("no videos in playlist");
}
_5.fire(p);
}});
}
}else{
if(p){
_1("   fire:",p);
bv.playlist.set(p);
_5.fire(p);
}else{
_1("   waiting on params:",p);
}
}
return _5;
},makeMainNode:function(){
var n=this.byId(this.nodeId||"player");
n.innerHTML="<div id=\"bvVideoNode\" class=\"bvVideo\"></div>";
return this.byId("bvVideoNode");
},getMainNode:function(){
_2=this.player&&this.player.node?this.player.node:this.makeMainNode();
return _2;
},mdsEmbed:function(){
return this.g("embed[src*=mds_player]");
},_scriptNode:null,getScriptNode:function(){
if(!this._scriptNode){
this._scriptNode=this.query("script[src*=bv]","last")||this.query("script[src*=lib]","last");
}
return this._scriptNode;
}});
})(window.bv);
(function(){
var _1=bv.logx;
var _2=6,_3=7,_4=8,_5=9,_6=10,_7=12,_8=14,_9=15,_a=19,_b=20,_c=21,_d=22,_e=23,DS=24,_f=25,_10=26,EQU=27,GAT=28,_11=29,TEX=42,USE=43,GOL=44,THC=60,PUB=100,_12=123,BV=123,_13=1234,_14=9999,a="http://video.bettervideo.com/",b="http://video2.bettervideo.com/",c="http://www.forrentvideo.com/",d="http://video2.bettervideo.com/video/DOM/MP4",ff="http://player.bettervideo.com/",EXT=bv.supports.client_has_webm()?".webm":".mp4",_15={},_16={"":0,"forrent":_3,"bv":_12,"gatelist":GAT,"alist":9},_17={bv:"BetterVideo",gatelist:"GAT",alist:"AList",fairfield:"FairfieldList",mysa:"MySAList",hearst:"Hearst",seattlepi:"SeattlePI",gatelist:"GateList",localedge:"LocalEdge",beaumont:"Beaumont",plainview:"MyPlainview",westtexas:"MyWestTexas",midland:"Midland",ourmidland:"OurMidland",huron:"Huron",laredo:"Laredo",clubajax:"ClubAJAX"},_18={bv:"bv",clubajax:"bv",forrent:"forrent",alist:"red",fairfield:"blue",mysa:"redgray",hearst:"steelblue",huron:"steelblue",seattlepi:"seagreen",gatelist:"medblue",localedge:"dullblue",beaumont:"red",plainview:"dullblue",westtexas:"dullblue",midland:"dullblue",ourmidland:"dullblue",laredo:"deepgreen"},_19={},_1a={twitter:true,facebook:true,share:true,webpage:"http://www.bettervideo.com"};
_19[GOL]=true;
_19[THC]=true;
_19[BV]=true;
_19[GAT]=true;
_19[_5]=true;
bv.settings={lidArray:null,lidIndex:0,lid:0,vid:0,bid:0,cid:0,file:"",poster:"",autoplay:false,media:"",theme:"",barHasSocial:false,barHasFilters:false,twitterTitle:"Tweet this video",twitterText:"Great video: ",browserUrl:document.location.href,pageTitle:document.title,facebookTitle:"Announce this video on Facebook",shareTitle:"Share this with a friend",webpageTitle:"Visit the webpage",websiteTitle:"Visit the webpage",codeTitle:"Get the player code for your webpage",videoErrorNotifications:true,videoErrorUrl:"http://services.bettervideo.com/DOM/v1.0/notify.svc/videomissing",emailActionUrl:"http://services.bettervideo.com/DOM/v1.0/Action.svc/share",init:function(o){
console.log("settings.init:",o);
for(var nm in o){
if((nm=="locationId"||nm=="lid")&&o[nm]&&o[nm].length){
this.lidArray=o[nm];
this.lid=o[nm]=this.lidArray[0];
}else{
this[nm]=o[nm];
}
}
this.theme=this.theme?this.theme.toLowerCase():"";
if(!this.cid){
this.cid=_16[this.theme];
}
if(this.theme=="forrent"){
this.barHasSocial=true;
this.barHasFilters=true;
}
},getStyleSheetName:function(){
return _18[this.theme]||"bv";
},getLogo:function(){
var _1b=_17[this.theme]||_17["bv"];
return bv.root+"assets/logos/"+_1b+".png";
},getMediaUrl:function(){
var url=unescape(this.media);
return url;
},setThemeClass:function(_1c){
bv.css(_1c,this.theme);
},setSocialOptions:function(o){
for(var nm in _1a){
if(o[nm]){
_1a[nm]=o[nm];
}else{
delete _1a[nm];
}
}
if(this.cid!==_3){
_1a={twitter:true,facebook:true,share:true,website:"http://bettervideo.com",code:true};
}
if(o.website){
_1a.webpage=o.website;
_1a.webpage=unescape(_1a.webpage);
}
},getSocialOptions:function(){
if(bv.params.social===false){
return false;
}
return _1a;
},setBandwidth:function(o){
bv.cookie.set("bandwidth",o.lid);
},getBandwidth:function(o){
return bv.cookie.get("bandwidth");
},lowBandIncrement:function(){
if(!this.lidArray){
return false;
}
this.lidIndex++;
if(this.lidIndex<this.lidArray.length-1){
return true;
}
return false;
},getBandwidthOptions:function(){
if(!this.bid){
return [];
}
var c=bv.cookie.get("bandwidth");
var _1d=this.bid==c;
return [{lid:this.lid,text:this.getVideoSizeLabel(this.lid),path:this.getVideoPath(),preview:this.getPreviewPath(),selected:!_1d},{lid:this.bid,text:this.getVideoSizeLabel(this.bid),path:this.getVideoPath({lid:this.bid}),preview:this.getPreviewPath({lid:this.bid}),selected:_1d}];
},getVideoPath:function(o){
if(this.file){
return this.file;
}
o=o||{};
var vid=o.vid||this.vid,lid=Number(o.lid||this.lid),cid=Number(o.cid||this.cid),bid=o.bid||this.bid,_1e=false,p,_1f;
switch(cid){
case _10:
return a+"video/ClubAJAX/"+vid+EXT;
case _9:
case _7:
case _8:
return "http://www.forrentvideo.com/MP4640x360/"+cid+"."+vid+EXT;
case _4:
case _3:
p=c;
switch(lid){
case 0:
return p+"mpg4/default/"+vid+EXT;
case 4:
return p+"MP4640x360/7."+vid+".mp4";
case 5:
return "http://video2.bettervideo.com/video/DOM/MP4640x360/"+cid+"."+vid+EXT;
case 6:
return d+"320x180/"+cid+"."+vid+EXT;
case 7:
return "http://video2.bettervideo.com/video/DOM/MP4320x240/"+cid+"."+vid+EXT;
case 8:
return c+"MP4384x208/"+vid+EXT;
default:
return "http://video2.bettervideo.com/video/DOM/MP4640x360/"+cid+"."+vid+EXT;
}
break;
case _13:
return "http://video.bettervideo.com/video/sales/bv/"+vid+EXT;
case _14:
return bv.root+"../video/"+vid+EXT;
case _5:
case _6:
return a+"videos/mobile/"+vid+"MDS"+EXT;
case _11:
_1f=b+"video/CONC/";
break;
case _12:
_1f=b+"video/BET/";
break;
case _2:
_1f=b+"video/DOM/";
_1e=true;
break;
case USE:
case GOL:
_1f=b+"video/USE/";
_1e=true;
break;
case PUB:
_1f=b+"video/PUB/";
break;
case TEX:
_1f=b+"video/TEX/";
break;
case THC:
_1f=b+"video/THC/";
break;
}
if(bv.is_mobile()&&cid==123){
_1f+="MOB480x270/";
}else{
switch(lid){
case 7:
_1f+="MP4640x360/";
break;
case 6:
_1f+="MP4640x480/";
break;
case 5:
_1f+="MP4320x240/";
break;
case 4:
_1f+="MP4320x180/";
break;
case 3:
_1f+="MP4480x360/";
break;
case 2:
_1f+="MP4360x270/";
break;
case 1:
default:
_1f+="MP4480x270/";
}
}
_1("getVideoPath:",_1f+(_1e?cid+".":"")+vid+EXT);
return _1f+(_1e?cid+".":"")+vid+EXT;
},getPreviewPath:function(o){
if(this.poster){
return this.poster;
}
o=o||{};
var vid=o.vid||this.vid,lid=Number(o.lid||this.lid),cid=Number(o.cid||this.cid),bid=o.bid||this.bid,_20=false,p;
switch(cid){
case _9:
case _7:
case _8:
_1("settings.getPreviewPath NICHE:","http://www.forrentvideo.com/JPG640x360/"+cid+"."+vid+".jpg");
return "http://www.forrentvideo.com/JPG640x360/"+cid+"."+vid+".jpg";
case _3:
case _4:
p=c;
switch(lid){
case 0:
return p+"flash/preview/default/"+vid+".jpg";
case 1:
return p+"flash/thumb/"+vid+"T.jpg";
case 2:
case 4:
case 5:
return p+"flash/preview/large/"+vid+"PL.jpg";
case 7:
return "http://video2.bettervideo.com/video/DOM/JPG320x240/"+cid+"."+vid+".jpg";
case 8:
default:
return p+"flash/preview/small/"+vid+"PS.jpg";
}
case _14:
return bv.root+"../video/"+vid+".jpg";
case _11:
p=b+"video/CONC/";
break;
case GAT:
case _12:
p=b+"video/BET/";
break;
case _2:
p=b+"video/DOM/";
_20=true;
break;
case USE:
case GOL:
p=b+"video/USE/";
_20=true;
break;
case PUB:
p=b+"video/PUB/";
break;
case TEX:
p=b+"video/TEX/";
break;
case THC:
p=b+"video/THC/";
break;
}
if(o.thumb){
lid=lid==7||lid==1||!lid?9:8;
}
switch(lid){
case 9:
p+="JPG120x68/";
break;
case 8:
p+="JPG120x90/";
break;
case 7:
p+="JPG640x360/";
break;
case 6:
p+="JPG640x480/";
break;
case 5:
p+="JPG320x240/";
break;
case 4:
p+="JPG320x180/";
break;
case 3:
p+="JPG480x360/";
break;
case 2:
p+="JPG360x270/";
break;
case 1:
default:
p+="JPG480x270/";
}
_1("getPreviewPath:",p+(_20?cid+".":"")+vid+".jpg");
return p+(_20?cid+".":"")+vid+".jpg";
},getVideoSizeLabel:function(lid){
var _21=this.getVideoPath({lid:lid});
if(/\d\d\dx\d\d\d/.test(_21)){
return /\d\d\dx\d\d\d/.exec(_21)[0].split("x")[0];
}else{
switch(this.cid){
case _3:
case _4:
case _9:
case _7:
case _8:
switch(lid){
case 2:
case 4:
return "640";
case 0:
default:
return "320";
}
break;
}
}
return "NA";
}};
})(window.bv);
bv.def=function(){
var i,a=arguments,_1=[],_2=[];
var _3=function(){
this.classes=_2;
for(i=0;i<=_1.length-1;i++){
_1[i].apply(this,arguments);
}
};
_3.prototype={isClass:function(_4){
return this.classes[this.classes.length-1]===_4;
},isSubclass:function(_5){
for(var i=0;i<this.classes.length;i++){
if(this.classes[i]===_5){
return true;
}
}
return false;
},getClass:function(){
return this.classes[0];
}};
for(i=a.length-1;i>=0;i--){
var o=a[i];
if(typeof o=="function"){
_1.push(o);
o=o.prototype;
}
for(var n in o){
if(/^[A-Z][a-z]/.test(n)){
_1.push(o[n]);
_2.push(n);
}else{
_3.prototype[n]=o[n];
}
}
}
return _3;
};
(function(b){
var _1={};
var _2=b.logx;
var _3=function(_4){
(function(_5){
var _6=2;
var v=setInterval(bv.bind(this,function(){
if(bv.ssLoaded(_5)||_6--<=0){
clearInterval(v);
_1[_5].loaded=true;
_1[_5].dfd.fire();
}
}),50);
})(_4);
};
bv.mix({addSS:function(_7,_8,fn){
_2("load stylesheet theme:",_7);
_7=_7=="def"||_7=="default"?b.settings.getStyleSheetName():_7;
if(!_1[_7]){
_1[_7]={dfd:new this.Deferred(),name:_7,loaded:false};
}
if(_8){
_1[_7].dfd.addCallback(_8,fn);
}
if(_1[_7].loaded){
_1[_7].dfd.fire();
}else{
_2("load css file",_7,"[",_1,"]");
_1[_7].loaded=true;
var _9=/\.css/.test(_7)?_7:_7+".css";
var _a;
if(/http/.test(_9)){
_a=_9;
}else{
if(this.root){
_a=this.root+"assets/themes/"+_7+"/player.css";
}else{
console.warn("No root for CSS",this.root);
}
}
_1[_7].file=this.dom("link",{href:_a+this.cb(),rel:"stylesheet"},document.documentElement.firstChild);
_3(_7);
}
return _1[_7].dfd;
},ssLoaded:function(_b){
if(_1[_b].loaded){
return true;
}
var ss=_1[_b].file;
if(!ss){
return false;
}
if(!ss.sheet){
return false;
}
try{
if(!ss.sheet.cssRules){
return false;
}
}
catch(e){
return false;
}
if(!ss.sheet.cssRules.length){
return false;
}
return true;
}});
})(window.bv);
(function(b){
var ua=navigator.userAgent;
var _1=function(){
var v,r;
if(b.is_iphone()){
v=/OS\s\d_\d_\d/.match(ua);
if(v){
v=v.split(" ")[1].split("_").join(".");
return "iPhone OS "+v;
}
return "iPhone OS";
}else{
if(b.is_ipad()){
v=/OS\s\d_\dd/.match(ua);
if(v){
v=v.split(" ")[1].split("_").join(".");
return "iPad OS "+v;
}
return "iPad OS";
}else{
if(b.is_android()){
v=/Android\d\.\d/.exec(ua);
return v||"Android";
}else{
r=/webOS|Windows|Macintosh|Ubuntu|Kubuntu|Epiphany|Debian|Galeon|gentoo|kanotix|FreeBSD|IRIX|SunOS/g.exec(ua);
if(r){
r=r[0];
if(r=="Windows"){
v=/Win\d\d|Windows\sXP|Windows\sME|Windows\sNT\s\d\.\d/.exec(ua);
if(v){
return v[0];
}
return r;
}else{
if(r=="Macintosh"){
if(!/OS\sX/.test(ua)){
return r;
}
v=/OS\sX\s\d+\.\d/.exec(ua);
if(v){
return "OS X "+Number(/\d+\.\d/.exec(v)[0]);
}
return "OS X";
}else{
if(r=="webOS"){
v=/webOS\/\d\.d/.exec(r);
if(v){
return r+" "+Number(v.split("/")[1]);
}
return r;
}else{
return r;
}
}
}
}
}
}
}
return "Unknown";
};
var _2=function(){
var r;
if(/Safari/.test(ua)&&/Version\/\d+\.\d+/.test(ua)){
return "Safari "+/Version\/\d+\.\d+/.exec(ua)[0].split("/")[1];
}
r=/Camino|Chimera|SeaMonkey|ELinks|Links|Lynx|Galeon|Konqueror|Epiphany|RockMelt/.exec(ua);
if(r){
return r[0];
}
r=/Firefox\/\d+\.\d+|MSIE\s\d+\.\d+|Chrome\/\d+\.\d+|Opera\/\d+\.\d+/.exec(ua);
if(!r){
r=/WebKit\/d+\.d+/.exec(ua);
}
if(r){
return r[0].replace("/"," ");
}
return "Unknown";
};
var s=b.settings;
var _3=function(_4){
var _5=s.emailActionUrl+"?"+escape(_4);
b.script(_5);
};
b.email={videoAlert:function(o){
console.warn("SEND VIDEO MISSING EMAIL",o);
console.info("EMAIL INFO::",_1()+" "+_2());
var _6;
try{
var os=_1();
var br=_2();
var pt=(b.supports.video()?"html5":"flash");
var pv=b.version.toString();
_6="OS: "+os+" browser:"+br+" player type:"+pt+" bv version:"+pv;
}
catch(e){
_6=e.toString();
}
console.info("info:",_6);
return;
new b.Jsonp({url:s.videoErrorUrl,args:{url:escape(s.browserUrl),videoId:s.vid,clientId:s.cid,info:_6},callback:b.bind(this,function(_7){
console.info("video notifcation sent:",_7);
})});
},share:function(to,_8,_9){
new b.Jsonp({url:s.emailActionUrl,args:{emailto:to,emailfrom:_8,emailmessage:escape(_9),browserUrl:escape(s.browserUrl),clientId:s.cid},callback:b.bind(this,function(_a){
console.info("email sent:",_a);
})});
}};
})(window.bv);
(function(b){
var _1=function(){
return "bvCallback"+b.uid("Json");
};
b.Jsonp=b.def({url:"",callback:null,args:null,Jsonp:function(_2){
b.mix(this,_2);
var _3=_2.strFunc||_1();
window[_3]=b.bind(this,"onLoad");
var _4=this.url+(/\?/.test(this.url)?"&":"?")+"callback="+_3;
if(this.args){
_4+="&"+b.toQuery(this.args);
}
b.script(_4);
},onLoad:function(_5){
console.log("json loaded:",_5);
this.callback&&this.callback(_5);
}});
})(window.bv);
(function(b){
var _1=0,_2=0;
bv.Draggable=function(n,_3,_4){
this.vert=_4||false;
this.node=n;
b.selectable(this.node,false);
this.begTime=0;
this.callback=_3;
var nm=bv.supports.touch()?"touchstart":"mousedown";
var _5=bv.on(n,nm,this,"onStart");
this.pause=function(){
_5.pause();
};
this.resume=function(){
_5.resume();
};
};
if(bv.supports.touch()){
bv.Draggable.prototype={onEvent:function(_6,_7){
_6.preventDefault();
var x,y,cx,cy;
if(_6.targetTouches.length<1){
x=_1;
y=_2;
cx=x;
cy=y;
}else{
cx=_6.targetTouches[0].clientX;
cy=_6.targetTouches[0].clientY;
x=cx-this.box.x;
y=cy-this.box.y;
}
var _8=x-_1;
var _9=y-_2;
_1=x;
_2=y;
var p=this.vert?y/this.box.h:x/this.box.w;
p=Math.max(Math.min(p,1),0);
this.callback({x:x,y:y,p:p,moveX:_8,moveY:_9,cx:cx,cy:cy,type:_7,evt:_6},_7);
},onMove:function(_a){
this.begTime=0;
this.onEvent(_a,"move");
},onEnd:function(_b){
this.onEvent(_b,"end");
if(new Date().getTime()-this.begTime<400){
this.onEvent(_b,"click");
}
this.con.pause();
},onStart:function(_c){
if(new Date().getTime()-this.begTime<400){
this.onEvent(_c,"dblclick");
this.begTime=0;
return;
}
this.begTime=new Date().getTime();
this.box=bv.size(this.node);
this.onEvent(_c,"start");
if(this.con){
this.con.resume();
}else{
this.con=b.multi.on({"touchend":"onEnd","touchcancel":"onEnd","touchmove":"onMove"},document,this);
}
}};
}else{
bv.Draggable.prototype={onEvent:function(_d,_e){
var x=_d.clientX-this.box.x;
var y=_d.clientY-this.box.y;
var cx=_d.clientX;
var cy=_d.clientY;
var _f=x-_1;
var _10=y-_2;
var p=this.vert?y/this.box.h:x/this.box.w;
p=Math.max(Math.min(p,1),0);
_1=x;
_2=y;
this.callback({x:x,y:y,p:p,moveX:_f,moveY:_10,cx:cx,cy:cy,layerX:_d.layerX,layerY:_d.layerY,type:_e,evt:_d},_e);
},onMove:function(evt){
this.moved=true;
this.begTime=0;
this.onEvent(evt,"move");
},onEnd:function(evt){
this.onEvent(evt,"end");
if(new Date().getTime()-this.begTime<400){
this.onEvent(evt,"click");
}
this.con.pause();
},onStart:function(evt){
if(new Date().getTime()-this.begTime<400){
this.onEvent(evt,"dblclick");
this.begTime=0;
return;
}
this.moved=false;
this.begTime=new Date().getTime();
_1=0;
_2=0;
this.box=bv.size(this.node.parentNode);
this.onEvent(evt,"start");
if(this.con){
this.con.resume();
}else{
this.con=b.multi.on({"mouseup":"onEnd","mousemove":"onMove"},document,this);
}
}};
}
})(window.bv);
(function(b){
b.mix({months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsAbb:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateToObject:function(_1){
var _2,_3,yr,mo,dy;
if(/^(\D{3})/.test(_1)){
var a=_1.split(" ");
yr=a[5];
dy=Number(a[2]);
for(var i=0;i<this.monthsAbb.length;i++){
if(this.monthsAbb[i]==a[1]){
mo=i+1;
break;
}
}
_3=a[3].split(":");
}else{
if(/T/.test(_1)){
if(/\+/.test(_1)){
_1=_1.split("+")[0];
}
_2=_1.split("T")[0].split(/\-|\/|\\|\s/);
yr=_2[0].length>2?_2[0]:_2[2];
mo=_2[0].length>2?_2[1]:_2[0];
dy=_2[0].length>2?_2[2]:_2[1];
_3=_1.split("T")[1].split(":");
}
}
var d=new Date();
d.setFullYear(yr);
d.setMonth(Number(mo)-1);
d.setDate(dy);
d.setHours(_3[0]);
d.setMinutes(_3[1]);
d.setSeconds(_3[2]);
return d;
},dateToString:function(_4,_5){
if(!_4){
return "";
}
var _6="";
_4=typeof (_4)=="string"?this.dateToObject(_4):_4;
if(_5.time){
var _7,hr;
if(_4.getHours()>11){
_7=" pm";
hr=_4.getHours()-12;
}else{
_7=" am";
hr=_4.getHours();
}
_6=" "+(hr||12)+":"+_4.getMinutes()+":"+_4.getSeconds()+_7;
}
return this.months[_4.getMonth()]+" "+_4.getDate()+", "+_4.getFullYear()+_6;
},timeCode:function(_8,_9){
if(!isNaN(_8)){
var tc,hh,mm,ss,_a=".0";
if(Math.floor(_8)!=_8){
_a=(((_8-Math.floor(_8)).toString()).substring(1,3));
_8=Math.floor(_8);
}
hh=Math.floor(_8/3600);
mm=Math.floor((_8-hh*3600)/60);
ss=Math.floor(_8-(hh*3600)-(mm*60));
if(hh<10){
hh="0"+hh;
}
if(mm<10&&mm>0){
mm="0"+mm;
}
if(ss<10){
ss="0"+ss;
}
if(_8>3600){
tc=hh+":"+mm+":"+ss;
}else{
if(_9=="mm_ss"){
tc=mm+":"+ss;
}else{
tc=mm+":"+ss+_a;
}
}
}else{
console.warn("toTimeCode failed: "+_8+" ::"+Number(_8));
return "0:00";
}
return tc;
}});
})(window.bv);
(function(b){
b.cookie={getExpiry:function(_1){
_1=_1||1;
var d=new Date();
d.setTime(d.getTime()+(_1*24*60*60*1000));
d=d.toUTCString();
return d;
},find:function(_2){
var c=document.cookie.split(";");
for(var i=0;i<c.length;i++){
if(c[i].indexOf(_2)>-1){
return decodeURIComponent(c[i].split("=")[1]);
}
}
return null;
},remove:function(_3){
if(this.get(_3)){
this.set(_3,null,-1);
}
},set:function(_4,_5,_6){
console.log("SET:",_4+"="+encodeURIComponent(_5)+"; expires="+this.getExpiry(_6)+"; path=/");
document.cookie=_4+"="+encodeURIComponent(_5)+"; expires="+this.getExpiry(_6)+"; path=/";
},add:function(_7,_8,_9){
if(this.get(_7)){
this.set(_7,this.get(_7)+","+_8,_9);
}else{
this.set(_7,_8,_9);
}
},get:function(_a){
var r=new RegExp("(?:^|; )"+_a+"=([^;]*)");
var _b=document.cookie.match(r);
if(!_b){
return undefined;
}
var _c=decodeURIComponent(_b[1]);
if(/,/.test(_c)){
var _d=_c.split(",");
var ar=[];
for(var i=0;i<_d.length;i++){
ar.push(b.normalize(_d[i]));
}
return ar;
}
return b.normalize(_c);
}};
})(window.bv);
(function(){
var d=document;
if(!d.querySelectorAll){
bv.query=function(q,_1){
var r=[];
var i,_2,_3,_4,_5,_6;
if(/\[/.test(q)){
var s=q.substring(q.indexOf("[")+1,q.length-1);
var _7=s.split(/\*=|\*|=/);
_5=_7[0];
_6=_7[1];
}
if(q[0]=="."){
_4=q.split("[")[0];
_4=_4.substring(1);
_2=document.body.getElementsByTagName("*");
for(i=_2.length-1;i>=0;i--){
if(_2[i].className.indexOf(_4)>-1){
if(_5){
console.error("query className + attr not implemented");
}else{
r.push(_2[i]);
}
}
}
}else{
_3=q.split("[")[0];
_2=document.getElementsByTagName(_3);
for(i=_2.length-1;i>=0;i--){
if(_5){
if(_2[i].getAttribute(_5).indexOf(_6)>-1){
r.push(_2[i]);
}
}else{
r.push(_2[i]);
}
}
}
if(!r||!r.length){
return false;
}
if(_1=="first"){
return r[0];
}
if(_1=="last"){
return r[r.length-1];
}
return r;
};
}
bv.normalizeEvent=function(e){
var _8={layerX:"offsetX",layerY:"offsetY",target:"srcElement"};
for(var nm in _8){
e[nm]=e[_8[nm]];
}
return e;
};
if(!bv.supports.addEventListener()){
var _9=setInterval(function(){
if(document.body){
clearInterval(_9);
bv.onDomReady();
}
},30);
}
bv.on(window,"load",function(){
bv.onDomReady();
});
})();
(function(b){
b.popup=function(_1,_2,_3){
var _4=_3.useReporting;
var _5=_3.onover;
var _6=false,_7=false,_8,_9=false;
var _a=_3.onHide||function(){
_9=false;
b.hide(_2);
};
var _b=_3.onShow||function(){
console.log("popup useReporting:",_4);
_9=true;
b.show(_2);
if(_4){
b.pub("/reporting","volume");
}
};
if(_5){
b.on(_2,"mouseover",function(){
_6=true;
_b(_2);
clearTimeout(_8);
});
b.on(_2,"mouseout",function(){
_6=false;
if(_7){
return;
}
_8=setTimeout(function(){
_a(_2);
},500);
});
b.on(_1,"mouseover",function(){
_7=true;
_b(_2);
clearTimeout(_8);
});
b.on(_1,"mouseout",function(){
_7=false;
if(_6){
return;
}
_8=setTimeout(function(){
_a(_2);
},500);
});
}else{
b.multi.on({"mouseover":function(){
_6=true;
},"mouseout":function(){
_6=false;
}},_2);
b.multi.on({"click":function(){
_7=true;
if(_6){
return;
}
if(_9){
_a();
}else{
_b();
}
},"mouseover":function(){
_7=true;
},"mouseout":function(){
_7=false;
}},_1);
b.on(document,"click",function(){
if(!_6&&!_7){
_a();
}
});
}
};
})(window.bv);
(function(b){
b.window={open:function(_1){
var _2=false;
try{
_2=window.open(_1,"BV_Social_Connection","status=0,menubar=0,resizable=1,top=2,left=2,width=800,height=600,scrollbars=1,addressbar=0");
_2.focus();
}
catch(e){
console.error("error opening popup:",e.message);
}
return !!_2;
}};
})(window.bv);
(function(b){
var _1={last:null,index:0,loaded:false,items:null,set:function(_2){
this.add(_2);
this.loaded=!!this.length;
return this[0];
},get:function(_3){
if(_3<0){
_3=this.items.length-1;
}
if(_3>this.items.length-1){
_3=0;
}
return this.items[_3];
},add:function(ms){
this.loaded=true;
if(b.not(ms,"array")){
ms=[ms];
}
if(!this.items){
this.items=[];
}
for(var i=0,m;i<ms.length;i++){
m=ms[i];
this.push(m);
}
return this;
},push:function(m){
this.items.push(m);
this[this.length]=m;
this.length=this.items.length;
this.last=this.items[this.items.length-1];
},join:function(_4){
_4=_4||"";
return this.items.join(_4);
},each:function(_5,_6){
_6=_6||window;
var f=bv.bind(_6,_5);
for(var i=0;i<this.items.length;i++){
f(this.items[i],i,this.items);
}
}};
b.List=b.def({List:function(ms,_7){
this.type=_7;
this.items=[];
if(ms){
this.set(ms);
}
}},_1);
})(window.bv);
(function(b){
var _1=b.logx;
var _2=100,_3=20,_4=100;
var _5=function(){
return (new Date()).getTime();
};
b.timer=function(o){
o=o||{};
var i,d,_6,_7,cb,h,id,_8,_9=false;
d=o.dur||o.duration||o.d;
i=o.inc||o.increment||o.i||0;
_6=o.delay===true?_4:o.delay?o.delay:0;
var f=o.callback||o.method;
var _a=o.ctx||window;
_1("function:",f);
cb=!!f?b.bind(_a,f):null;
_7=o.onEnd;
id=o.id||b.uid("tmr");
pausedAtStart=o.paused||false;
_8=o.format||o.fmt||"ms";
_1("timer options:",id,d,i,_6,cb);
var _b=false;
var _c=0,_d=0,_e=0,_f=0,_10=0,_11=0,_12=0;
var _13=function(n){
return n;
};
if(_8=="integer"){
_13=function(n){
return Math.ceil(n*0.001);
};
}else{
if(_8=="float"){
_13=function(n){
return n*0.001;
};
}else{
if(typeof _8=="number"){
_13=function(n){
return Number(n.toFixed(_8));
};
}
}
}
var _14=function(){
var o={time:_13(_11),playtime:_13(_11),elapsed:_13(_10),pausetime:_13(_e),increment:_13(_12),p:0};
if(!!d){
o.p=_11/d<0?0:_11/d>1?1:_11/d;
}
return o;
};
var _15=function(){
},_16=function(){
};
if(!!cb&&!!i){
_15=function(){
if(_12>=i){
cb(_14());
_d=_5();
}
};
}
if(!!d&&!!_7){
_16=function(){
if(_11>=d){
clearInterval(h);
_7(_14());
}
};
}else{
if(!!d&&!!cb){
_16=function(){
if(_11>=d){
clearInterval(h);
cb(_14());
}
};
}else{
if(!!d){
_16=function(){
if(_11>=d){
clearInterval(h);
}
};
}else{
}
}
}
var _17=function(){
h=setInterval(function(){
_11=_5()-_c-_e;
_12=Math.max(0,_5()-_d);
_10=_5()-_c;
_15();
_16();
},1);
};
var _18=function(){
clearInterval(h);
_f=_5();
return _14();
};
var _19=function(){
if(_b){
_1a();
}else{
_e+=_5()-_f;
_17();
}
return _14();
};
var _1b=function(){
_b=true;
clearInterval(h);
var o=_14();
_e=0;
_f=0;
_10=0;
_11=0;
_12=0;
return o;
};
var _1a=function(){
if(pausedAtStart){
pausedAtStart=false;
_b=true;
return;
}
_b=false;
setTimeout(function(){
_1b();
_b=false;
_c=_d=_5();
_17();
},_6);
};
_1a();
return {pause:_18,resume:_19,start:_1a,stop:_1b,getInfo:_14};
};
})(window.bv);
(function(b){
b.easing={circIn:function(n){
return -1*(Math.sqrt(1-Math.pow(n,2))-1);
},circOut:function(n){
n=n-1;
var r=Math.sqrt(1-Math.pow(n,2));
return r;
},quadOut:function(n){
return n*(n-2)*-1;
},quadInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,2)/2;
}
return -1*((--n)*(n-2)-1)/2;
},cubicIn:function(n){
return Math.pow(n,3);
},cubicOut:function(n){
return Math.pow(n-1,3)+1;
}};
})(window.bv);
(function(b){
var _1={dur:500};
var _2=b.logx;
var _3={increment:30,reversed:null,isForward:false,isReversed:true,init:function(){
var o=this.options;
this.to={};
this.from={};
for(var nm in o.props){
var u=o.props[nm].units;
u=u===undefined?"px":u;
if(nm=="opacity"||nm=="color"){
u="";
}
o.props[nm].units=u;
this.to[nm]=o.props[nm].end+u;
this.from[nm]=o.props[nm].beg+u;
}
b.style(this.node,this.from);
var _4=this.ease();
var _5=this.reverseEase();
var ms;
this.handle=b.on("interval",this,function(){
this._currTime=new Date().getTime();
ms=this.reversed?this._endTime-this._currTime:this._currTime-this._begTime;
var p=o.beg>o.end?1-(ms/this.duration):ms/this.duration;
p=b.minMax(p,0,1);
this.update(this.reversed?_5(p):_4(p),ms);
if(this._currTime>=this._endTime){
this.stop();
b.style(this.node,this.reversed?this.from:this.to);
o.onEnd&&o.onEnd();
}
},this.increment);
_2("JsAni",this);
this.handle.pause();
},update:function(p,ms){
var o=this.options,_6,s,e;
obj={};
for(var nm in o.props){
_6=b.minMax(o.props[nm].beg+((o.props[nm].end-o.props[nm].beg)*p),o.props[nm].beg,o.props[nm].end);
obj[nm]=_6+""+o.props[nm].units;
}
b.style(o.node,obj);
},play:function(){
if(this.playing){
return;
}
this.isReversed=false;
this.isForward=false;
this._begTime=new Date().getTime();
this._endTime=this.duration+this._begTime;
this.handle.resume();
},stop:function(){
this.handle.pause();
this.isReversed=this.reversed;
this.isForward=!this.reversed;
_2("stop: rev:",this.isReversed,"for",this.isForward,"reveresed:",this.reversed);
this.playing=false;
},toXX:function(o){
if(o.init){
delete o.init;
for(var n in o){
o[n]+="px";
}
b.style(this.options.node,o);
return;
}
this.stop();
var d={node:this.options.node||o.node,dur:o.dur||this.options.dur||_1.dur,onEnd:o.onEnd,props:{}};
for(var nm in o){
d.props[nm]={beg:b.style(d.node,nm),end:o[nm],units:nm=="opacity"?"":"px"};
}
this.options=d;
this.play();
},forward:function(){
_2("forward:",this.isForward);
if(this.isForward){
return;
}
this.reversed=false;
this.play();
},reverse:function(){
_2("reverse:",this.isReversed);
if(this.isReversed){
return;
}
this.reversed=true;
this.play();
},toggle:function(){
this.reversed=!this.reversed;
this.play();
},easeTypes:{linear:function(n){
return n;
},easeIn:function(n){
return Math.pow(n,5);
},easeOut:function(n){
return n*(n-5)*-1;
},easeInOut:function(n){
n=n*2;
if(n<1){
return Math.pow(n,3)/2;
}
n-=2;
return (Math.pow(n,3)+2)/2;
}},easeType:"easeInOut",ease:function(t){
this.easeType=t||"easeInOut";
return this.easeTypes[this.easeType];
},reverseEase:function(){
switch(this.easeType){
case "easeInOut":
return this.easeTypes["easeInOut"];
case "easeIn":
return this.easeTypes["easeOut"];
case "easeOut":
return this.easeTypes["easeIn"];
}
return false;
}};
var _7={init:function(){
var o=this.options;
var _8=b.supports.transition();
var _9=[];
this.to={};
this.from={};
for(var nm in o.props){
var u=o.props[nm].units;
u=u===undefined?"px":u;
if(nm=="opacity"||nm=="color"){
u="";
}
_9.push(nm);
this.to[nm]=o.props[nm].end+u;
this.from[nm]=o.props[nm].beg+u;
}
b.style(this.node,_8+"Property",_9.join(","));
b.style(this.node,_8+"Duration",this.duration+"ms");
b.on(this.node,b.supports.transitionevent(),this,function(){
this.playing=false;
o.onEnd&&o.onEnd();
});
_2("CssAni trans:",_8,b.supports.transitionevent(),this);
},play:function(_a,_b){
clearTimeout(this._delayHandle);
if(_a&&!this.playing){
this._delayHandle=setTimeout(b.bind(this,function(){
b.style(this.node,_b);
}),_a);
}else{
b.style(this.node,_b);
}
this.playing=true;
_2("SET ANI STYLE",_b);
},forward:function(){
_2("forward");
this.play(this._toDelay,this.to);
},reverse:function(){
_2("reverse");
this.play(this._fromDelay,this.from);
}};
var _c=b.supports.transition()?_7:_3;
b.Ani=b.def({shyid:"",handle:0,_delayHandle:0,_endTime:0,_begTime:0,_currTime:0,_fromDelay:0,_toDelay:0,playing:false,duration:500,Ani:function(_d){
var o=this.options=_d;
this.id=b.uid("ani");
var nm;
this.node=o.node=b.byId(o.node);
if(_d.duration){
this.duration=_d.duration;
delete _d.duration;
}
if(_d.to&&_d.to.delay){
this._toDelay=_d.to.delay;
delete _d.to.delay;
}
if(_d.from&&_d.from.delay){
this._fromDelay=_d.from.delay;
delete _d.from.delay;
}
if(_d.to){
o.props={};
for(nm in _d.to){
if(nm=="units"){
continue;
}
if(nm=="delay"){
continue;
}
o.props[nm]={};
o.props[nm].end=_d.to[nm];
if(_d.from&&_d.from[nm]!==undefined){
o.props[nm].beg=_d.from[nm];
}else{
o.props[nm].beg=b.style(o.node,nm);
}
}
}else{
for(nm in o.props){
if(o.props[nm].beg===undefined){
o.props[nm].beg=b.style(o.node,nm);
}
}
}
_2("Ani.props:",o.props);
this.init();
}},_c);
bv.mix({ani:function(o){
return new Ani(o);
}});
})(window.bv);
(function(b){
var _1=b.log;
b.Shy=b.def({node:null,to:null,from:null,delay:500,duration:500,handle:null,ani:null,showing:false,hideHandle:null,videoPlaying:false,isOver:false,Shy:function(_2){
b.sub("/player/on/load",this,function(_3){
});
b.sub("/video/on/play",this,function(){
this.videoPlaying=true;
if(this.isOver){
this.hide();
}
this.handle.resume();
});
b.sub("/video/on/pause",this,function(){
this.videoPlaying=false;
this.show();
this.handle.pause();
});
b.mix(this,_2,{notUndefined:true});
this.playerNode=b.getMainNode();
this.handle=b.multi.on({"mouseenter":"show","mouseleave":"hide"},this.playerNode,this);
this.handle.pause();
this.id=b.uid("shy");
this.ani=new b.Ani({shyid:this.id,node:this.node,duration:_2.duration,to:_2.to,from:_2.from,onEnd:b.bind(this,function(){
if(this.showing){
this.onShowEnd();
}else{
this.onHideEnd();
}
})});
},onShowEnd:function(){
},onHideEnd:function(){
},show:function(){
if(this.showing){
return;
}
this.showing=true;
this.ani.reverse();
},hide:function(){
if(!this.videoPlaying){
return;
}
this.showing=false;
this.ani.forward();
}});
})(window.bv);
(function(b){
b.Base={Base:function(){
this._cons=[];
},hide:function(){
b.hide(this.node);
},show:function(){
b.show(this.node);
},connects:function(_1){
},subs:function(_2){
},connectsPause:function(){
},connectClickOff:function(){
b.on("timer",this,function(){
if(!this.clickHandle){
this.clickHandle=b.on(document.body,"click",this,function(_3){
if(!b.isDescendant(_3.target,this.node)){
b.on("timer",this,"hide",100);
}
});
this.escHandle=b.on(document,"keyup",this,function(_4){
if(_4.keyCode==27){
this.hide();
}
});
}else{
this.clickHandle.resume();
this.escHandle.resume();
}
},250);
b.on(this,"hide",this,function(){
this.clickHandle.pause();
this.escHandle.pause();
});
}};
})(window.bv);
(function(b){
var _1="";
var _2=b.logx;
var _3={player:null,controls:null,node:null,parentNodeClass:"bvBtn",type:"",Button:function(p,_4,_5){
this.type=_5;
b.css(_4,this.parentNodeClass);
this.controls=p;
this.player=p.player;
this.parentNode=_4;
this.primary=b.playlist.videos.length?"video":"photo";
b.sub("/media/set/index",this,"display");
this.display({type:this.primary});
b.sub("/media/close",this,function(o){
_2("media/close",o.type);
this.display({type:this.primary});
});
},display:function(o){
if(this.type=="photo"||this.type=="vtour"||this.type=="video"){
if(this.type==o.type){
this.show();
}else{
this.hide();
}
}
},show:function(){
b.show(this.parentNode,"table-cell");
},hide:function(){
b.hide(this.parentNode);
},create:function(cn,on){
var n=b.dom("div",{css:cn},this.parentNode);
if(on){
b.on(n,"click",this,"onClick");
}
return n;
},update:function(p,_6){
var _7=_6?"top":"left";
this.handle.style[_7]=(p*100).toFixed(1)+"%";
if(p>=1){
b.css(this.controls.parentNode,"downloaded");
}
}};
var _8=b.def({Play:function(p,_9){
this.playNode=this.create("bvBtn bvPlay");
this.playNode.title="Play video";
this.pauseNode=this.create("bvBtn bvPause");
this.pauseNode.title="Pause video";
b.sub("/video/on/play",this,function(){
b.css(this.controls.parentNode,"playing");
});
b.sub("/video/on/pause",this,function(){
b.css(this.controls.parentNode,"playing",false);
});
b.on(this.playNode,"click",this,function(){
b.pub("/video/play");
b.pub("/button/play");
});
b.on(this.pauseNode,"click",this,function(){
b.pub("/video/pause");
b.pub("/button/pause");
});
}},_3);
var _a={init:function(){
this.frameHandle=b.sub("/video/on/frame",this,function(m){
this.update(m.p);
});
b.sub("/video/on/download",this,function(m){
this.downloaded(m.p||m);
});
this.dragger=new bv.Draggable(this.handle,bv.bind(this,"onDragSlider"));
},onDragSlider:function(_b,_c){
if(_c=="start"){
this.dragging=true;
this.frameHandle.pause();
b.pub("/video/seek","start");
b.pub("/video/seek",_b.p);
}else{
if(_c=="end"){
this.dragging=false;
b.pub("/video/seek",_b.p);
this.frameHandle.resume();
b.pub("/video/seek","end");
}else{
b.pub("/video/seek",_b.p);
}
}
this.update(_b.p);
},downloaded:function(p){
p=Math.max(Math.min(p,1),0);
this.download.style.width=(p*100).toFixed(1)+"%";
if(p==1){
b.css(this.controls.parentNode,"downloaded");
}
},update:function(p){
this.handle.style.left=(p*100).toFixed(1)+"%";
this.progress.style.width=(p*100).toFixed(1)+"%";
}};
var _d=b.def({parentNodeClass:"bvBoxSlider",Slider:function(p,_e){
this.node=b.dom("div",{css:"bvSlider"},this.parentNode);
this.download=b.dom("div",{css:"bvDownloaded"},this.node);
this.progress=b.dom("div",{css:"bvProgress"},this.node);
this.lftRnd=b.dom("div",{css:"bvProgressLft"},this.node);
this.rgtRnd=b.dom("div",{css:"bvProgressRgt"},this.node);
this.handle=b.dom("div",{css:"bvHandle"},this.node);
this.init();
}},_a,_3);
var _f=b.def({parentNodeClass:"none",TopSlider:function(p,_10){
this.node=_10;
this.download=b.dom("div",{css:"bvDownloaded"},this.node);
this.progress=b.dom("div",{css:"bvProgress"},this.node);
this.constraint=b.dom("div",{css:"bvSliderConstrain"},this.node);
p.sliderHandle=this.handle=b.dom("div",{css:"bvHandle"},this.constraint);
var box=b.box(_10);
var hb=b.box(this.handle);
var hw=17;
b.style(this.constraint,{width:box.w-hw+"px",left:hw/2+"px"});
this.init();
}},_a,_3);
var _11=b.def({VolumePopup:function(p,btn,_12){
this.btn=btn;
this.node=b.dom("div",{css:"bvVolumePopup"},btn);
this.slider=b.dom("div",{css:"bvSlider"},this.node);
this.progress=b.dom("div",{css:"bvProgress"},this.slider);
this.lftRnd=b.dom("div",{css:"bvProgressLft"},this.slider);
this.rgtRnd=b.dom("div",{css:"bvProgressRgt"},this.slider);
this.handle=b.dom("div",{css:"bvHandle"},this.slider);
this.dragger=new bv.Draggable(this.handle,bv.bind(this,"onDragSlider"),true);
},onDragSlider:function(obj,_13){
if(_13=="start"){
this.dragging=true;
}else{
if(_13=="end"){
this.dragging=false;
b.pub("/button/volume");
}
}
this.handle.style.top=(obj.p*100).toFixed(1)+"%";
this.progress.style.height=(obj.p*100).toFixed(1)+"%";
b.pub("/video/volume",1-obj.p);
}},b.Base);
var _14=b.def({Volume:function(p,_15){
this.node=this.create("bvBtn bvVolume");
this.node.title="Adjust video volume";
if(p.theme=="forrent"){
this.popup=new _11({},this.node,_15);
b.popup(this.node,this.popup.node,{onover:false,useReporting:true});
}
},set:function(p){
p=1-p;
this.popup.onDragSlider({p:p},"end");
}},_3);
var _16=b.def({VolumeSlideout:function(p,_17,btn){
this.btn=btn;
this.node=_17;
this.container=b.dom("div",{css:"bvSliderWrap"},this.node);
this.slider=b.dom("div",{css:"bvSlider"},this.container);
this.progress=b.dom("div",{css:"bvProgress"},this.slider);
this.lftRnd=b.dom("div",{css:"bvProgressLft"},this.slider);
this.rgtRnd=b.dom("div",{css:"bvProgressRgt"},this.slider);
this.handle=b.dom("div",{css:"bvHandle"},this.slider);
this.dragger=new bv.Draggable(this.handle,bv.bind(this,"onDragSlider"),false);
this.ani=new b.Ani({node:this.container,duration:500,from:{width:100,units:"px",delay:0},to:{width:1,units:"px"},onEnd:b.bind(this,function(){
})});
this.ani.forward();
b.popup(btn,this.container,{onover:true,onHide:b.bind(this,function(n){
this.ani.forward();
b.pub("/button/volume");
}),onShow:b.bind(this,function(n){
this.ani.reverse();
})});
},onDragSlider:function(obj,_18){
if(_18=="start"){
this.dragging=true;
}else{
if(_18=="end"){
this.dragging=false;
}
}
this.handle.style.left=(obj.p*100).toFixed(1)+"%";
this.progress.style.width=(obj.p*100).toFixed(1)+"%";
b.pub("/video/volume",obj.p);
}},b.Base);
var _19=b.def({Fullscreen:function(p,_1a){
this.node=this.create("bvBtn bvFullscreen",true);
this.node.title="Toggle fullscreen";
},onClick:function(p){
console.log("fullscreen");
b.pub("/video/fullscreen");
}},_3);
var _1b=b.def({Duration:function(p,_1c){
this.node=b.dom("div",{css:"bvDuration",innerHTML:"0:00"},this.parentNode);
b.sub("/video/on/meta",this,function(m){
this.duration=m.duration;
this.node.innerHTML=b.timeCode(this.duration,"mm_ss");
});
b.sub("/video/on/frame",this,function(m){
this.node.innerHTML=b.timeCode(m.remaining,"mm_ss");
});
}},_3);
var _1d=b.def({Time:function(p,_1e){
this.node=b.dom("div",{css:"bvTime",innerHTML:"0:00"},this.parentNode);
b.sub("/video/on/frame",this,function(m){
this.node.innerHTML=b.timeCode(m.time,"mm_ss");
});
}},_3);
var _1f=b.def({TimeDur:function(p,_20){
this.node=b.dom("div",{css:"bvTimeDur"},_20);
this.timeNode=b.dom("div",{css:"bvTimeDurTime",html:"00:00"},this.node);
b.dom("div",{css:"bvTimeDurSlash",html:"/"},this.node);
this.durNode=b.dom("div",{css:"bvTimeDurTime",html:"00:00"},this.node);
b.sub("/video/on/meta",this,function(m){
this.durNode.innerHTML=b.timeCode(m.duration,"mm_ss");
});
b.sub("/video/on/frame",this,function(m){
this.timeNode.innerHTML=b.timeCode(m.time,"mm_ss");
});
}});
var _21=b.def({parentNodeClass:"bvBoxSm",Twitter:function(p,_22){
this.node=this.create("bvBtnSm bvTwitter",true);
this.node.title="Post this page on Twitter!";
},onClick:function(){
console.log("Twitter click");
b.pub("/social/twitter/post");
}},_3);
var _23=b.def({parentNodeClass:"bvBoxSm",Facebook:function(p,_24){
this.node=this.create("bvBtnSm bvFacebook",true);
this.node.title="Post this page on Facebook!";
},onClick:function(){
console.log("Facebook click");
window.blur();
b.on("timer",this,function(){
console.log("focus");
window.focus();
},1000);
b.pub("/social/facebook/post");
}},_3);
var _25=b.def({Vtour:function(p,_26){
this.node=this.create("bvBtn bvBtnVTour",true);
this.node.title="Toggle display-only Virtual Tour thumbnails";
},onClick:function(){
b.pub("/media/filter","vtour");
}},_3);
var _27=b.def({Photos:function(p,_28){
this.node=this.create("bvBtn bvBtnPhotos",true);
this.node.title="Toggle display-only Photo thumbnails";
},onClick:function(){
b.pub("/media/filter","photo");
}},_3);
var _29=b.def({Video:function(p,_2a){
this.node=this.create("bvBtn bvBtnVideo",true);
this.node.title="Toggle display-only Video Thumbnails";
},onClick:function(){
b.pub("/media/filter","video");
}},_3);
var _2b={disabled:false,PhotoButtonBase:function(){
b.on(b.photos,"setImage",this,function(){
console.log("show "+(this.isLeft?"Left":"Right")+"?",b.photos.index,b.playlist.images.length-1,b.photos.index!==0);
var num=this.isLeft?0:b.playlist.images.length-1;
this.disable(b.photos.index===num);
});
},disable:function(_2c){
b.css(this.node,"disabled",_2c);
this.disabled=_2c;
}};
var _2d=b.def({isLeft:true,PhotoLeft:function(){
this.node=this.create("bvBtn bvBtnPhotoLeft",true);
this.node.title="Navigate to previous image";
},onClick:function(){
!this.disabled&&b.photos.prev();
}},_3,_2b);
var _2e=b.def({isLeft:false,PhotoRight:function(){
this.node=this.create("bvBtn bvBtnPhotoRight",true);
this.node.title="Navigate to next image";
},onClick:function(){
!this.disabled&&b.photos.next();
}},_3,_2b);
var _2f="bvBtnVtourLeft,bvBtnVtourUp,bvBtnVtourDown,bvBtnVtourRight".split(",");
var _30=b.def({VtourBtn:function(){
var mc="bvBtnSm";
this.cls=_2f.shift();
var _31,arg,_32;
if(/Left/.test(this.cls)){
_31="move";
arg=5;
mc="bvBtn";
_32="Pan to the left";
}else{
if(/Right/.test(this.cls)){
_31="move";
arg=-5;
_32="Pan to the right";
}else{
if(/Up/.test(this.cls)){
_31="setZoom";
arg=0.05;
_32="Zoom in";
}else{
if(/Down/.test(this.cls)){
_31="setZoom";
arg=-0.05;
_32="Zoom out";
}
}
}
}
this.node=this.create(mc+" "+this.cls);
this.node.title=_32;
b.css(this.parentNode,mc);
b.press(this.node,b.vtour,_31,arg);
}},_3);
var _33=b.def({Logo:function(c,td){
this.logo=new b.Image({src:b.settings.getLogo(),style:{margin:"0px 5px"}},td);
b.css(td,"logo");
b.on(td,"click",this,"onClick");
},onClick:function(){
b.pub("/button/logo");
}},_3);
var _34=b.def({dragging:false,Controls:function(o){
b.ready(this,function(){
this.build(o.node);
var shy=new b.Shy({node:this.node,duration:300,to:{bottom:-39,units:"px",delay:500},from:{bottom:0,units:"px"}});
if(this.sliderHandle){
b.on(shy,"show",this,function(){
b.show(this.sliderHandle);
});
b.on(shy,"onHideEnd",this,function(){
b.hide(this.sliderHandle);
});
}
b.on(shy,"show",this,"onShowControls");
b.on(shy,"hide",this,"onHideControls");
});
},onShowControls:function(){
},onHideControls:function(){
},add:function(cls,_35){
var td=this.row.insertCell(-1);
if(typeof (cls)=="string"){
b.css(td,cls);
return td;
}
return new cls(this,td,_35);
},buildForRent:function(){
this.node.innerHTML="<table id=\"bvControlBar\"><tbody><tr id=\"bvControlRow\"></tr></tbody></table>";
this.row=b.byId("bvControlRow");
this.add(_2d,"photo");
this.add(_2e,"photo");
this.add(_30,"vtour");
this.add(_30,"vtour");
this.add(_30,"vtour");
this.add(_30,"vtour");
this.add(_8,"video");
this.add(_1d,"video");
this.slider=this.add(_d,"video");
this.add(_1b,"video");
this.volume=this.add(_14,"video");
b.supports.fullscreen()&&this.add(_19,"video");
this.add("bvBoxStretch");
if(b.settings.barHasFilters){
if(b.playlist.videos.length){
this.add(_29,"filter");
}
if(b.playlist.images.length){
this.add(_27,"filter");
}
if(b.playlist.vtour.length){
this.add(_25,"filter");
}
}
if(b.settings.barHasSocial){
this.add("bvBox bvControlLabel").innerHTML="Share";
this.add(_21,"social");
this.add(_23,"social");
}
this.add("bvBoxEnd");
this.volume.set(0.3);
},buildBV:function(){
this.node.innerHTML="<div id=\"bvSliderRow\"></div><table id=\"bvControlBar\"><tbody><tr id=\"bvControlRow\"></tr></tbody></table>";
this.row=b.byId("bvControlRow");
new _f(this,b.byId("bvSliderRow"));
this.add(_8,"video");
this.volume=this.add(_14,"video");
var vtd=this.add("bvVolumeSlideout");
new _16(this,vtd,this.volume.node);
var td=this.add("bvBoxStretch");
b.supports.fullscreen()&&this.add(_19,"video");
this.add(_33);
new _1f(this,td);
},build:function(_36){
this.parentNode=bv.byId(_36);
b.css(this.parentNode,"bvVideo");
this.node=b.dom("div",{css:"bvControls"},this.parentNode);
this.theme=b.settings.theme;
if(this.theme=="forrent"){
this.buildForRent();
}else{
this.buildBV();
}
}});
b.Controls=_34;
})(window.bv);
(function(b){
var _1="";
var _2=function(_3){
_3.node.innerHTML="";
b.addSS("default");
this.node=_3.node=b.dom("div",{id:"bvVideoNode",css:"bvVideo"},_3.node);
console.log("Player.options",_3);
if(!!_3.path){
this.videoNode=b.dom("div",{},this.node);
}
b.photos&&b.dom("div",{id:"bvPhotosNode"},this.node);
b.vtour&&b.dom("div",{id:"bvVtourNode"},this.node);
b.setBrowserDocumentClass(this.node.parentNode);
b.settings.setThemeClass(this.node.parentNode);
this.build=function(){
if(!!_3.path){
this.init(_3);
if(!bv.is_mobile()){
new b.Preview(_3,_3.node);
new b.ScreenPlayButton(_3,_3.node);
this.errorScreen=new b.ErrorScreen(_3,_3.node);
}
this.finish();
b.sub("/media/close",this,function(o){
if(o.type=="photo"||o.type=="vtour"){
this.video.show();
}
});
b.sub("/media/set/index",this,function(o){
if(o.type=="vtour"||o.type=="photo"){
this.video.hide();
}
});
}else{
if(b.playlist.images.length){
b.photos.makePrimary();
}
}
if(!bv.is_mobile()){
this.controls=new b.Controls(_3);
b.social&&b.social.init();
}
var _4=b.bind(this,function(){
b.mediatray&&b.mediatray.init({node:b.dom("div",{},this.node.parentNode)});
});
if(_3.media){
if(b.playlist.loaded){
_4();
}else{
b.playlist.load(_3.media,_4);
}
}
if(_3.path){
_1=_3.path;
b.pub("/reporting","impression");
}
if(b.settings.videoErrorNotifications){
b.sub("/video/error",function(o){
b.email.videoAlert(o);
});
}
};
};
var _5={type:"html5",init:function(o){
this.video=new b.Video(o,this.videoNode);
},finish:function(){
},fullscreen:function(){
this.video.fullscreen();
}};
var _6={type:"qt",init:function(o){
this.video=new b.Qt(o,this.videoNode);
},finish:function(){
},fullscreen:function(){
}};
var _7={type:"flash",init:function(o){
this.video=new b.FlashVideo(o,this.videoNode);
},finish:function(){
this.video.place();
},fullscreen:function(){
}};
var _8={type:"mobile",init:function(o){
console.log("mobile player ",o,this.videoNode);
this.video=new b.Mobile(o,this.videoNode);
},finish:function(){
},fullscreen:function(){
}};
if(bv.is_mobile()){
_2.prototype=_8;
}else{
if(b.supports.video()){
_2.prototype=_5;
}else{
if(b.is_ff()){
if(b.config.qt){
_2.prototype=_6;
}else{
_2.prototype=_7;
}
}else{
_2.prototype=_7;
}
}
}
b.mix({initPlayer:function(_9){
if(!b.config.mediaTrayOnly){
try{
this.player=new _2(_9);
this.player.build();
}
catch(e){
console.error(e);
}
}else{
if(b.config.mediaTrayOnly){
console.log("launch media tray (only)");
if(this.is_mobile()){
this.mobilemedia.init(_9);
}else{
this.mediatray.init(_9);
}
}
}
},XXvideo:function(){
return this.player.flash?this.player.flash.swf():this.player.video;
},setMediaIndex:function(_a){
this.hasPlayed=false;
b.mediatray.select(_a);
var o=this.playlist.videos.get(_a);
var _b=bv.is_mobile()?o.mobile:o.path;
if(_1!=_b){
_1=_b;
b.pub("/reporting","impression");
}
this.player.video.setVideo(_b);
}});
if(!window.mds){
window.mds={};
}
mds.stopOthers=function(_c){
};
mds.onVideoComplete=function(){
};
})(window.bv);
(function(b){
b.ErrorScreen=b.def({ErrorScreen:function(_1,_2){
b.mix(this,_1);
var w=b.size(_2).w-30;
this.node=b.dom("div",{css:"bvErrorScreen",style:{width:w+"px",marginLeft:-w/2-10+"px"}},_2);
b.hide(this.node);
b.sub("/video/error",this,function(_3){
console.log("player error",_3);
b.dom("div",{css:"bvErrorScreenTitle",innerHTML:"Error - Video Not Found"},this.node);
b.dom("div",{css:"bvErrorScreenDesc",innerHTML:"source: "+_3.src},this.node);
b.show(this.node);
});
b.sub("/media/set/index",this,function(o){
b.hide(this.node);
});
}});
})(window.bv);
(function(b){
var _1={};
var _2=document;
var _3=function(_4){
if(b.is_ie()){
return true;
}
fVersion=(function(){
var _5=navigator.plugins["Shockwave Flash"];
if(_5&&_5.description){
var v=_5.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".");
return (v[0]!=null)?parseInt(v[0]):0;
}
return 0;
})();
if(fVersion>8){
return true;
}
_4.innerHTML="To play this video you need the latest version of the Adobe Flash Player.<br/><a href='http://www.adobe.com/products/flashplayer/' style='font-weight:bold;'>Get Adobe Flash Player</a>";
return false;
};
var _6=false;
var _7=function(_8){
if(_6){
return;
}
_6=true;
window.__flash__removeCallback__replace=function(_9,_a){
if(_9!=null){
_9[_a]=null;
}
};
window.__flash__removeCallback=window.__flash__removeCallback__replace;
return;
var _b=15;
var h=setInterval(function(){
if(_b--<0){
clearInterval(h);
}
},500);
};
var _c={allowFullScreen:true,allowNetworking:"all",allowScriptAccess:"always",wmode:"opaque",pluginspage:"http://www.macromedia.com/go/getflashplayer",type:"application/x-shockwave-flash",quality:"high"};
b.Swf=b.def({flashVars:null,embedStr:"",swfPath:"",Swf:function(_d,_e){
if(!_3(_e)){
return;
}
this.node=_e;
this.flashVars=_d;
this.flashVars.isDebug=b.config.flashDebug;
this.swfPath=this.flashVars.swf;
delete this.flashVars.swf;
if(b.config.cacheBust.flashDebug){
this.flashVars.debug=true;
}
if(b.config.cacheBust){
swf+="?cache=CB_"+(new Date()).getTime();
this.flashVars.cacheBust=true;
}
if(this.flashVars.flashArgs){
_c=b.mix(_c,this.flashVars.flashArgs);
delete this.flashVars.flashArgs;
}
this.swfId=b.uid("SWF");
this.embedStr=this.getEmbed(this.swfId);
},getEmbed:function(id){
var o=this.flashVars;
var p=_c;
p.width=o.width;
p.height=o.height;
p.id=id;
var el=b.dom("embed",{src:this.swfPath});
for(var nm in p){
el.setAttribute(nm,p[nm]);
}
el.setAttribute("flashVars",bv.toQuery(o));
return el;
},getEmbed:function(id){
var br="";
var tb="";
var o=this.flashVars;
var p=_c;
var _f;
if(b.is_ie()){
var _f="<object id=\""+id+"\" "+br+tb+"classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" "+br+tb+"codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" "+br+tb+"width=\""+o.width+"\" height=\""+o.height+"\" align=\"middle\">"+br+tb+tb;
for(nm in p){
_f+="<param name=\""+nm+"\" value=\""+p[nm]+"\" />"+br+tb+tb;
}
_f+="<param name=\"FlashVars\" value=\""+bv.toQuery(o)+"\" />"+br+tb+tb;
_f+="<param name=\"movie\" value=\""+this.swfPath+"\" />"+br+tb+tb;
_f+="</object>";
}else{
_f="<embed quality=\"high\" type=\"application/x-shockwave-flash\" "+br+tb+"pluginspage=\"http://www.macromedia.com/go/getflashplayer\" "+br+tb;
_f+="src="+this.swfPath+" id="+id+" "+br+tb;
_f+="flashVars="+bv.toQuery(o)+" "+br+tb;
_f+="width="+o.width+" "+br+tb;
_f+="height="+o.height+" "+br+tb;
for(nm in p){
_f+=nm+"="+p[nm]+" "+br+tb+tb;
}
_f+="/>";
}
return _f;
},dfd:null,onSwfLoaded:function(mov){
this.dfd.fire(this.swf());
},_reloads:0,reloadSwf:function(){
if(this._reloads++>=3){
console.error((this._reloads-1)+" reloads failed. Try refreshing the page.");
return;
}
this.swfId=b.uid("SWF");
this.embedStr=this.getEmbed(this.swfId);
this.embed(this.embedStr);
},check01:function(){
var cnt=0;
var h=b.on("interval",this,function(){
if(cnt++>=3){
console.warn("Access of SWF failed (",(cnt-1)," attempts) try swf reload...");
h.pause();
this.reloadSwf();
}
try{
var f=this.swf();
if(f&&f.PercentLoaded()>=100){
_7(this.swf());
b.on("timer",this,function(){
this.check02();
},100);
h.pause();
}
}
catch(e){
console.warn("Access of SWF failed",cnt);
}
},300);
},check02:function(){
try{
var foo=this.swf().PercentLoaded();
console.info("Flash Loaded:",this.swf().PercentLoaded());
this.onSwfLoaded(this.swf());
}
catch(e){
console.error("Failed on PercentLoaded. Retry...");
this.reloadSwf();
}
},embed:function(str){
var _10=0;
if(_10){
this.node.appendChild(str);
}else{
b.on("timer",this,function(){
this.node.innerHTML=str;
this.check01();
},1);
}
},place:function(){
this.dfd=new bv.Deferred();
var _11=b.bind(this,function(){
this.embed(this.embedStr);
});
if(b.byId(this.node)){
_11();
}else{
b.ready(this,function(){
_11();
});
}
return this.dfd;
},swf:function(){
name=this.swfId;
if(_1[name]){
return _1[name];
}
if(!b.is_ie()&&_2.embeds[name]){
_1[name]=_2.embeds[name];
}else{
if(_2[name]){
_1[name]=_2[name];
}else{
if(window[name]){
_1[name]=window[name];
}else{
if(document[name]){
_1[name]=document[name];
}
}
}
}
return _1[name];
}});
})(window.bv);
(function(b){
var _1=document;
var _2={};
var _3,_4=function(){
if(_3){
return _3;
}
var v,_5=navigator.plugins["Shockwave Flash"];
if(_5&&_5.description){
v=_5.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".");
}else{
var _6=10,_7=null;
while(!_7&&_6>7){
try{
_7=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_6--);
}
catch(e){
}
}
if(_7){
v=_7.GetVariable("$version").split(" ")[1].split(",");
}
}
if(v){
_3={major:(v[0]!=null)?parseInt(v[0]):0,minor:(v[1]!=null)?parseInt(v[1]):0,rev:(v[2]!=null)?parseInt(v[2]):0};
}else{
_3={major:0,minor:0,rev:0};
}
_3.toString=function(){
return this.major+"."+this.minor+"."+this.rev;
};
return _3;
};
b.flash={version:function(){
return _4();
},onMeta:function(_8){
b.pub("/video/on/meta",_8);
},onFrame:function(_9){
},onStatus:function(_a){
if(_a.channel){
switch(_a.channel){
case "/video/on/error":
console.error("Video Error:",_a);
b.pub("/video/error",{src:_a.src});
break;
case "/video/on/download":
_a.value.p=_a.value.percent;
b.pub(_a.channel,_a.value);
break;
case "/video/on/fullscreen":
_a={isFullscreen:_a.state=="fullScreen"};
b.pub("/video/on/fullscreen",_a);
break;
default:
b.pub(_a.channel,_a);
}
}
},onPlayerLoaded:function(_b){
}};
b.FlashVideo=b.def({ready:false,ei_ready:false,params:null,hasPlayed:false,path:"",isFullscreen:false,FlashVideo:function(o,_c){
this.queue=[];
this.node=_c;
this.flashVars={width:o.w||o.width,height:o.h||o.height,swf:o.swf};
var _d="videoId,clientId,locationId,path,preview,media,theme";
b.each(_d.split(","),function(s){
if(o[s]!==undefined){
this.flashVars[s]=o[s];
}
},this);
this.connect();
},connect:function(){
this.subscriptions=b.multi.sub({"/video/play":"play","/video/pause":"pause","/video/seek":"seek","/video/volume":"volume","/video/on/meta":"onMeta","/player/on/load":"onPlayerLoad","/video/on/play":"onPlay","/video/on/pause":"onPause","/video/on/fullscreen":"onFullscreen"},this);
bv.on("timer",this,function(){
bv.on(bv.player.controls,"onShowControls",this,function(){
this.tell("showFullscreen");
});
bv.on(bv.player.controls,"onHideControls",this,function(){
this.tell("hideFullscreen");
});
},500);
},toggleFullscreen:function(){
console.log("fv.toggle fs");
this.tell("toggleFullscreen");
},onFullscreen:function(_e){
if(this.isFullscreen==_e.isFullscreen){
return;
}
console.info("FlashVideo.fullscreen",this.isFullscreen,_e);
this.isFullscreen=_e.isFullscreen;
b.pub("/reporting","impression");
},onComplete:function(){
console.info("FlashVideo.onComplete");
this.hasPlayed=false;
b.pub("/video/on/complete");
},onPlayerLoad:function(_f){
this.ei_ready=true;
if(this.queue.length){
for(var i=0;i<this.queue.length;i++){
if(!this.tell.apply(this,this.queue[i])){
break;
}
}
}
},onStart:function(){
b.pub("/reporting","video");
},onPlay:function(){
if(!this.hasPlayed){
this.onStart();
}
this.hasPlayed=true;
if(this.isFullscreen){
b.pub("/button/play");
}
},onPause:function(){
if(this.isFullscreen){
b.pub("/button/pause");
}
},onMeta:function(m){
console.info("meta",m);
this.duration=m.duration;
this.complete=false;
if(!this.tmr){
this.setTimer();
}
this.tmr.resume();
},setTimer:function(){
this.tmr=b.on("interval",this,function(){
var t=this.swf().getTime()||0;
var p=t/this.duration;
b.pub("/video/on/frame",{p:p,time:t,duration:this.duration,remaining:Math.max(0,this.duration-t)});
if(!this.complete&&t>this.duration-0.5){
this.complete=true;
this.onComplete();
b.on("timer",this,function(){
this.tmr.pause();
},300);
}
},300);
},tell:function(_10,a1,a2,a3,a4,a5){
if(this.ei_ready){
try{
switch(_10){
case "doPlay":
this.swf().doPlay();
break;
case "doPause":
this.swf().doPause();
break;
case "seek":
this.swf().seek(a1);
break;
case "setVolume":
this.swf().setVolume(a1);
break;
case "setVideo":
this.swf().setVideo(a1);
break;
case "showFullscreen":
this.swf().showFullscreen();
break;
case "hideFullscreen":
this.swf().hideFullscreen();
break;
}
return true;
}
catch(e){
console.error("swf.setVolume failed ",e);
return false;
}
}else{
this.queue.push(arguments);
}
return false;
},hide:function(){
this.pause();
},show:function(){
},play:function(){
this.tell("doPlay");
this.tmr&&this.tmr.resume();
},pause:function(){
this.tell("doPause");
this.tmr&&this.tmr.pause();
},seek:function(cmd){
this.tell("seek",cmd);
},volume:function(v){
try{
this.tell("setVolume",v);
return true;
}
catch(e){
console.error("swf.setVolume failed ",e);
return false;
}
},setVideo:function(_11){
this.path=_11;
this.tell("setVideo",_11);
},place:function(){
this._swf=new b.Swf(this.flashVars,this.node);
b.on(this._swf,"onSwfLoaded",this,function(mov){
this._movie=mov;
this.onPlayerLoad(mov);
});
var dfd=this._swf.place();
return dfd;
},swf:function(){
return this._movie;
}});
})(window.bv);
(function(b){
var _1=function(_2){
return {mp4:"video/mp4",ogv:"video/ogg"}[_2];
};
var _3=function(_4){
return /ogv/.test(_4)?_1("ogv"):_1("mp4");
};
var _5;
var d=document;
var _6=[];
var _7=false;
var _8=function(_9){
};
b.Video=b.def({duration:0,isFull:false,complete:false,hasPlayed:false,Video:function(_a,_b){
console.log("bv.Video.options",_a);
this.video=this.embed(_a,_b);
this.on();
},reload:function(_c){
bv.on(this,"onMeta",this,function(){
this.video.currentTime=0.1;
this.video.play();
},"once");
this.pause();
this.video.src=_c;
this.video.load();
},hide:function(){
this.pause();
b.hide(this.video);
},show:function(){
b.show(this.video);
},onComplete:function(){
console.log("-=VIDI FINI=-");
this.complete=true;
this.onPause();
this.hasPlayed=false;
b.pub("/video/on/complete");
},onRestart:function(){
this.complete=false;
setTimeout(bv.bind(this,"onPlay"),1);
setTimeout(bv.bind(this,function(){
this.video.currentTime=0.1;
this.video.play();
}),260);
},onMeta:function(m){
this.meta=m;
var o={};
this.duration=o.duration=m.duration;
this.videoWidth=o.width=o.videoWidth=m.videoWidth;
this.videoHeight=o.height=o.videoHeight=m.videoHeight;
this.videoAspect=o.videoAspect=this.videoHeight/this.videoWidth;
b.pub("/video/on/meta",o);
this.onResize();
},onError:function(_d){
console.error("Video Error:",_d.target.error.code,_d.target.src);
console.log("try again?",bv.settings.lowBandIncrement());
b.pub("/video/error",{src:_d.target.src});
if(bv.settings.lowBandIncrement()){
console.warn("LOAD NEXT lowBandIncrement");
}
},onFrame:function(_e){
var p=this.video.currentTime/this.duration;
b.pub("/video/on/frame",{p:p,time:this.video.currentTime,duration:this.duration,remaining:Math.max(0,this.duration-this.video.currentTime)});
},onLoad:function(_f){
var p,_10,_11,v=this.video;
if(_f.total){
_10=_f.total;
_11=_f.loaded;
p=(_f.loaded/_f.total);
}else{
if(!v.readyState){
setTimeout(bv.bind(this,"onLoad"),100);
return;
}
console.log("end(0)",v.buffered);
_11=v.buffered.end(0);
_10=v.duration;
p=v.buffered.end(0)/v.duration;
}
var o={p:p,loaded:_11,total:_10};
b.pub("/video/on/download",o);
},onResize:function(){
var o=bv.size(this.node);
if(this.isFull){
document.body.scrollTop=0;
o.h-=this.controlsSize.h;
}
var v=this.video;
var ah=o.w/this.videoWidth*this.videoHeight||o.h;
var aw=o.h/this.videoWidth*this.videoHeight||o.w;
if(this.videoAspect){
if(o.h/o.w>this.videoAspect){
v.width=o.w;
v.height=o.w/this.videoWidth*this.videoHeight;
v.style.top=(o.h-this.video.height)/2+"px";
v.style.marginTop="0";
}else{
v.height=o.h;
v.width=o.h/this.videoHeight*this.videoWidth;
v.style.marginTop=0;
v.style.top=0;
}
}
},stopDefault:function(){
var _12=function(evt){
evt.preventDefault();
};
this.defCons=[bv.on(d.body,"touchmove",_12)];
bv.style(d.body,"overflow","hidden");
},resumeDefault:function(){
for(var i=0;i<this.defCons.length;i++){
bv.disconnect(this.defCons[i]);
}
bv.style(d.body,"overflow",this.bodyRestoreStyle);
},prepFull:function(){
if(!this.posNodes){
this.posNodes={};
var n=this.node.parentNode;
while(n.tagName!="BODY"){
var s=bv.style(n,"position");
if(s=="relative"||s=="absolute"){
this.posNodes[n.id]={node:n,orgPos:s};
}
n=n.parentNode;
}
}
for(var nm in this.posNodes){
bv.style(this.posNodes[nm].node,"position","inherit");
}
},unPrepFull:function(){
for(var nm in this.posNodes){
bv.style(this.posNodes[nm].node,"position",this.posNodes[nm].orgPos);
}
},onFullscreen:function(evt){
console.warn("FULLSCREEN is fs:",document.webkitIsFullScreen,evt);
b.pub("/video/on/fullscreen",{isFullscreen:document.webkitIsFullScreen});
this.isFullscreen=document.webkitIsFullScreen;
return;
var de=d.documentElement;
if(this.isFull){
this.stopDefault();
}else{
this.resumeDefault();
}
},onAbort:function(){
_8("abort");
this.onPause();
},onEmpty:function(){
_8("empty");
},onEmptied:function(){
_8("emptied");
},onWaiting:function(){
_8("waiting");
},onSeeked:function(){
if(this.complete&&!this.video.paused){
this.onRestart();
}
},fullscreen:function(){
var v=this.video;
v.webkitEnterFullScreen();
return;
if(false){
v.webkitEnterFullScreen();
}else{
this.isFull=!this.isFull;
var p=this.isPlaying();
if(this.isFull){
this.prepFull();
}else{
this.unPrepFull();
}
bv.css(this.node,"fullscreen",this.isFull);
if(this.isFull){
_5=bv.on(window,"resize",this,"onResize");
this.onResize();
}else{
this.onResize();
bv.disconnect(_5);
}
}
},on:function(){
if(bv.is_iphone()){
return;
}
this.connection=b.multi.on({"play":"onPlay","pause":"onPause","progress":"onLoad","error":"onError","timeupdate":"onFrame","ended":"onComplete","abort":"onAbort","empty":"onEmpty","emptied":"onEmptied","waiting":"onWaiting","seeked":"onSeeked","webkitfullscreenchange":"onFullscreen"},this.video,this);
this.subscriptions=b.multi.sub({"/video/play":"play","/video/pause":"pause","/video/seek":"seek","/video/volume":"volume","/video/fullscreen":"fullscreen"},this);
var ss=bv.query("source");
for(var i=0;i<ss.length;i++){
bv.on(ss[i],"error",this,"onError");
}
var _13,_14,v=this.video;
bv.on(v,"loadedmetadata",bv.bind(this,function(evt){
_13=evt.target;
if(_14){
this.onMeta(_13);
}
}));
var vrl=setInterval(bv.bind(this,function(t){
if(v.readyState>0){
_14=true;
clearInterval(vrl);
if(_13){
this.onMeta(_13);
}
}
}),200);
},disconnect:function(){
this.connection.pause();
this.subscriptions.pause();
},reconnect:function(){
this.connection.resume();
this.subscriptions.resume();
},onStart:function(){
b.pub("/reporting","video");
},onPlay:function(){
console.info("video.onPlay");
bv.pub("/video/on/play");
if(this.isFullscreen){
b.pub("/button/play");
}
if(!this.hasPlayed){
this.onStart();
}
this.hasPlayed=true;
},onPause:function(){
console.warn("video.onPause");
bv.pub("/video/on/pause");
if(this.isFullscreen){
b.pub("/button/pause");
}
},play:function(){
this.video.play();
},pause:function(){
this.video.pause();
},seek:function(cmd){
if(cmd==="start"){
_7=this.isPlaying();
this.pause();
}else{
if(cmd==="end"){
if(_7){
this.play();
}
}else{
this.video.currentTime=this.duration*cmd;
}
}
},volume:function(p){
this.video.volume=p;
},embed:function(p,_15){
this.videoHeight=p.h;
this.videoWidth=p.w;
this.videoAspect=p.h/p.w;
this.node=_15;
var _16={width:p.w,height:p.h,src:p.src,autobuffer:true,buffer:true,preload:"auto"};
if(p.autoplay){
_16.autoplay=true;
}
var v=bv.dom("video",_16,this.node);
console.log("load video:",p.src);
if(bv.is_ipad()||b.is_ie()){
this._setVideo(p);
}
return v;
},_setVideo:function(p){
var _17=p.path||p;
console.warn("Video._setVideo......",_17);
setTimeout(bv.bind(this,function(){
this.video.src=_17;
this.video.load();
}),100);
},setMediaIndex:function(idx){
this._setVideo(bv.playlist.byIndex(idx));
},setVideo:function(_18){
console.log("SET VIDEO:",_18);
if(this.video&&this.video.src==_18){
this.show();
b.on("timer",this,"play",300);
}else{
this._setVideo({path:_18});
}
},isPlaying:function(){
return this.complete?false:!this.video.paused;
}},b.Base);
})(window.bv);
(function(b){
b.Preview=b.def({w:0,h:0,aspect:0,Preview:function(_1,_2){
this.domNode=_2;
this.node=new b.Image({id:"bvVideoPreview",src:_1.preview,onload:b.bind(this,"onLoad")},_2).node;
this.clickHandle=bv.on(this.node,"click",this,"onClick");
this.playSub=b.sub("/video/on/play",this,"hide");
},destroy:function(){
},onClick:function(){
b.pub("/video/play");
},onResize:function(){
var p=this.node;
if(!p){
return;
}
var o=bv.size(this.domNode);
ah=o.w/this.w*this.h;
aw=o.h/this.h*this.w;
if(o.h/o.w>this.aspect){
bv.style(p,{width:o.w+"px",height:ah+"px",top:"50%",marginTop:"-"+(ah/2)+"px",left:"0",marginLeft:"0"});
}else{
bv.style(p,{height:o.h+"px",width:aw+"px",top:"0px",marginTop:"0px",left:"50%",marginLeft:"-"+(aw/2)+"px"});
}
},onLoad:function(o){
this.w=o.w;
this.h=o.h;
this.aspect=this.h/this.w;
this.onResize();
}},b.Base);
})(window.bv);
(function(b){
b.ScreenPlayButton=b.def({ScreenPlayButton:function(_1){
this.domNode=_1.node;
this.node=bv.dom("div",{className:"bvScreenPlayButton",title:"Start video"},this.domNode);
bv.on(this.node,"click",this,"onClick");
b.sub("/video/on/play",this,"hide");
},onClick:function(){
b.pub("/video/play");
b.pub("/button/play");
}},b.Base);
})(window.bv);
(function(b){
var _1=false;
b.Image=b.def({w:0,h:0,nativeWidth:0,nativeHeight:0,lazy:false,css:"",style:null,id:"",center:false,ignoreNotFound:false,src:"",onload:null,node:null,type:"image",loaded:false,isError:false,Image:function(_2,_3){
b.mix(this,_2);
var _4={on:{"error":b.bind(this,function(e){
if(this.isError||this.ignoreNotFound){
return;
}
console.error("Image not found:",this.src,e);
this.isError=true;
this.node.src=this.notFound();
}),load:b.bind(this,"onImageLoaded")}};
if(this.css){
_4.css=this.css;
}
if(this.style){
_4.style=this.style;
}
if(this.id){
_4.id=this.id;
}
this.node=b.dom("img",_4,_3);
if(!this.lazy){
this.node.src=this.src;
this.loaded=true;
b.hide(this.node);
}else{
this.placeholder=b.dom("div",{css:"bvThumbPlaceholder",style:{width:this.w+"px",height:this.h+"px"}},_3);
}
},tries:2,onImageLoaded:function(){
b.show(this.node);
if(!this.node.width&&this.tries-->0){
b.on("timer",this,function(){
b.hide(this.node);
this.onImageLoaded();
},500);
return;
}
this.nativeWidth=this.node.width;
this.nativeHeight=this.node.height;
if(this.w){
this.node.width=this.w;
}else{
this.w=this.node.width;
}
if(this.h){
this.node.height=this.h;
}else{
this.h=this.node.height;
}
if(this.center){
b.style(this.node,{marginLeft:-(this.h/this.nativeHeight*this.nativeWidth/2)+"px"});
}
b.show(this.node);
b.on("timer",this,function(){
b.show(this.node);
if(this.onload){
this.onload({img:this.node,w:this.nativeWidth,h:this.nativeHeight,error:this.isError});
}
},20);
},load:function(){
b.hide(this.placeholder);
this.node.src=this.src;
this.loaded=true;
},hide:function(){
b.hide(this.node);
},show:function(_5){
b.show(this.node,_5);
},notFound:function(){
console.log("not found:",this);
var _6=this.width+this.height;
return this.type=="thumb"||(_6<400&&_6>0)?b.config.thumbnotfound||b.root+"assets/ThumbNotFound.jpg":b.config.imagenotfound||b.root+"assets/ImageNotFound.jpg";
}});
})(window.bv);
(function(b){
var _1=[];
var _2;
var _3="video/mp4",_4="video/ogg";
var _5=function(o){
var _6=function(p){
var f=b.urlToObj(p).filename;
var _7=!!/M\.mp4/.test(f);
var _8=f.match(/\./g).length;
if(_8>1){
f=f.split(".")[1];
}else{
f=f.split(".")[0];
}
if(_7){
f=f.substring(0,f.length-1);
}
return f;
};
var _9=function(p){
var _a=function(a){
var _b=b.settings.cid;
if(!_b){
_b=7;
b.settings.init({cid:_b});
}
var o={file:[]};
var _c,_d,_e,_f;
var lid={path:4,mob:8,prev:5,thm:1};
if(b.settings.lid){
lid={path:b.settings.lid,mob:b.settings.lid,prev:b.settings.lid,thm:b.settings.lid};
}
a=b.is(a,"array")?a:[a];
for(var i=0;i<a.length;i++){
if(a[i].videoId){
var vid=a[i].videoId;
_c=b.settings.getVideoPath({lid:b.is_android()?lid.mob:lid.path,vid:vid});
_d=b.settings.getVideoPath({lid:lid.mob,vid:vid});
_e=b.settings.getPreviewPath({lid:lid.thm,vid:vid,thumb:true});
_f=b.settings.getPreviewPath({lid:lid.prev,vid:vid});
}else{
_c=b.is_android()&&a[i].path?a[i].mobile:a[i].path;
_d=a[i].mobile;
_e=a[i].thumbnail||a.clip?a.clip[i].thumb:"";
_f=a[i].preview;
}
o.file.push({path:_c,lid:lid.path,mobile:_d,thumb:_e,preview:_f,description:a[i].caption||(a.clip?a.clip[i].description||a.clip[i].title||a.clip[i].text:""),vid:a[i].videoId||a[i].vid||_6(_c)});
}
return o;
};
if(p.playlist){
return p.playlist;
}
if(p.mediacenter){
return _a(p.mediacenter.video);
}
if(p.video&&p.video.clip){
return _a(p.video.clip);
}
if(p.video){
return _a(p.video);
}
return _a(p);
};
var _10=function(p){
var fix=function(a){
var o=[];
for(var i=0;i<a.length;i++){
o.push({path:a[i].main||a[i].path,preview:a[i].preview||a[i].medium||a[i].main||a[i].path,thumb:a[i].thumbnail,description:a[i].caption});
}
return o;
};
if(p.mediacenter){
return fix(p.mediacenter.picture.image);
}
if(p.picture){
return fix(p.picture.image);
}
if(p.image){
return fix(p.image);
}
return [p];
};
var _11=function(p){
var fix=function(a){
var o=[];
for(var i=0;i<a.length;i++){
o.push({path:a[i].vtourImageURL||a[i].path,thumb:a[i].thumbnail,description:a[i].name||a[i].vtourName||a[i].caption});
}
return o;
};
if(p.mediacenter){
return fix(p.mediacenter.vtour.photo);
}
if(o.vtour&&o.vtour.photo){
return fix(o.vtour.photo);
}
if(p.vtour){
return fix(p.vtour);
}
if(p.photo){
return fix(p.photo);
}
if(p.vtour.photo){
return fix(p.vtour.photo);
}
return [p];
};
if(o.data){
o=o.data;
}
if(o.mediacenter){
o=o.mediacenter;
}
if(o.playlist){
return o.playlist;
}
var p={playlist:_9(o)};
if(o.picture||o.image){
p.images=_10(o);
}
if(o.vtour){
p.vtour=_11(o);
}
return p;
};
var _12={};
b.playlist=new b.List();
b.playlist.set=function(_13){
_13=_5(_13);
this.videos=new b.List(_13.file||_13.playlist.file,"videos");
this.images=new b.List(_13.images||[],"images");
this.vtour=new b.List(_13.vtour||[],"vtour");
this.add(this.videos.items);
this.add(this.images.items);
this.add(this.vtour.items);
this.onLoad(this);
return this.videos.get(0);
};
b.playlist.first=function(){
return this.videos.get(0)||this.images.get(0)||this.vtour.get(0);
};
b.playlist.onLoad=function(_14){
};
})(window.bv);
(function(b){
var _1="http://twitter.com/home",_2="Look at this great video: ",_3=document.title||"";
b.sub("/social/twitter/post",function(){
var _4=_1+"?status="+b.urlEscape(_2+" "+_3+" - "+document.location.href);
b.window.open(_4);
});
})(window.bv);
(function(b){
var _1="http://www.facebook.com/sharer.php",_2=document.location.href,_3=document.title||"";
b.sub("/social/facebook/post",function(){
var _4=_1+"?u="+escape(_2)+"&="+escape(_3);
b.window.open(_4);
});
})(window.bv);
(function(b){
var _1=[],_2=25,_3="bvSocialButton";
var _4=function(_5,_6,_7){
this.name=_5;
this.value=_7;
this.index=_6;
this.init();
};
_4.prototype={init:function(){
var _8=b.getMainNode();
this.node=b.dom("div",{css:_3+" "+this.name},_8);
this.node.tabIndex=1;
this.node.title=b.settings[this.name+"Title"];
}};
var _4=b.def({Button:function(o,_9){
b.mix(this,o);
this.node=b.dom("div",{css:_3+" "+this.name},_9);
b.on(this.node,"click",this,function(){
b.social["on_"+this.name](this.value);
});
this.node.tabIndex=1;
this.node.title=b.settings[this.name+"Title"];
}});
b.social={init:function(){
this.node=b.dom("div",{css:"bvSocialDock"},b.getMainNode());
var _a=b.settings.getSocialOptions();
if(!_a){
return;
}
var _b=0;
for(var nm in _a){
_1.push(new _4({name:nm,index:_b,value:_a[nm]},this.node));
_b++;
}
bv.on(bv.player.controls,"onShowControls",this,"show");
bv.on(bv.player.controls,"onHideControls",this,"hide");
},show:function(){
b.style(this.node,"left","5px");
},hide:function(){
b.style(this.node,"left","-40px");
},openwin:function(_c){
var w=window.open(_c,"mywindow","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes");
if(!w){
document.location.href=_c;
}
},on_twitter:function(){
b.pub("/social/twitter/post");
b.pub("/button/twitter");
},on_facebook:function(){
b.pub("/social/facebook/post");
b.pub("/button/facebook");
},on_share:function(){
console.log("SHARE!");
b.launchShare();
b.pub("/button/share");
},on_website:function(_d){
b.window.open(_d);
b.pub("/button/webpage");
},on_code:function(_e){
bv.launchEmbed();
b.pub("/button/embed");
}};
b.ready(function(){
});
})(window.bv);
(function(b){
var _1="http://www.facebook.com/sharer.php",_2=document.location.href,_3=document.title||"";
b.sub("/social/facebook/post",function(){
var _4=_1+"?u="+escape(_2)+"&="+escape(_3);
b.window.open(_4);
});
})(window.bv);
(function(b){
var _1;
var _2;
var _3=null;
var _4=null;
var _5=null;
var _6=null;
var _7=null;
var _8=function(){
var p=bv.dom("div","bvTransContainer",_1);
_2=bv.dom("div","bvForm",p);
};
var _9=function(s){
return bv.dom("div",{css:"bvFormTitle",html:s},_2);
};
var _a=function(){
return bv.dom("div",{css:"bvFormClose",html:"&#10005;",selectable:false},_2);
};
var _b=function(_c,_d,_e,_f){
var row=bv.dom("div","bvFormRow",_2);
var lbl=bv.dom("div",{css:"label",html:_c},row);
var _10=bv.dom("input",{css:_f,name:_d,required:"",type:_e||"text"},row);
return {row:row,label:lbl,input:_10};
};
var _11=function(){
if(!_7){
_7=bv.dom("div","bvFormError",_2);
}
return _7;
};
var _12=function(_13,_14,_15,_16){
var row,lbl,_17;
if(_13){
row=bv.dom("div","bvFormRow",_2);
lbl=bv.dom("div",{css:"label",html:_13},row);
}
_17=bv.dom("textarea",{css:_16,name:_14},row||_2);
return {row:row,label:lbl,input:_17};
};
var _18=function(){
var row=bv.dom("div","bvFormRow",_2);
var _19=bv.dom("input",{css:className,name:name,required:"",type:type||"text"},row);
var lbl=bv.dom("div",{css:"label",html:label},row);
return {row:row,label:lbl,input:_19};
};
var _1a=function(){
return bv.dom("div",{css:"bvFormSend",html:"Send"},_2);
};
var _1b={closed:true,init:function(){
_1=bv.getMainNode();
_8();
var cls=_a();
bv.on(cls,"click",this,"hide");
if(!this.noSend){
this.sendBtn=_1a();
}
this.node=_2;
this.ani=new b.Ani({node:this.node,duration:500,from:{opacity:0,units:false,delay:1},to:{opacity:1,units:false,delay:1},onEnd:b.bind(this,function(){
b.show(this.node.parentNode,!this.closed);
})});
bv.style(this.node,"opacity",0);
},ready:function(){
},hide:function(){
this.closed=true;
!!bv.hideCalendar&&bv.hideCalendar();
this.ani.reverse();
this.displayError&&this.displayError(false);
},show:function(){
this.closed=false;
b.show(this.node.parentNode);
this.ani.forward();
},toggle:function(){
console.log("toggle form - closed:",this.closed);
if(this.closed){
this.show();
}else{
this.hide();
}
}};
var _1c=b.def({Share:function(){
this.init();
_9("Email a Friend");
var _1d=_b("Your Email","email","email");
var _1e=_b("Friend's Email","email","email");
var ta=_12("Message","message","");
var box=bv.size(_1e.label);
var fb=bv.size(_2);
bv.style(ta.input,{width:fb.w-box.w-7+"px",height:fb.h-box.y+box.h-5+"px"});
bv.style(_1d.input,"width",fb.w-box.w-7+"px");
bv.style(_1e.input,"width",fb.w-box.w-7+"px");
this.ready();
bv.on(this.sendBtn,"click",this,function(){
console.log("send");
if(!_1e.input.value||!_1d.input.value){
this.displayError(true);
return;
}else{
this.displayError(false);
}
bv.email.share(_1e.input.value,_1d.input.value,ta.input.value);
this.hide();
});
},displayError:function(_1f){
var n=_11();
n.innerHTML="Some required fields are blank.";
b.show(n,_1f);
}},_1b);
var _20=b.def({Embed:function(){
this.noSend=true;
this.init();
_9("Copy this code for your webpage");
var _21="",_22="embedcode",_23=null,_24="bvEmbedTA";
var o=_12(_21,_22,_23,_24);
bv.style(o.input,{width:bv.params.width-20+"px",height:bv.params.height-70+"px"});
bv.on(o.input,"focus",this,function(){
o.input.focus();
setTimeout(function(){
o.input.select();
},200);
});
console.log("PARAMS:",bv.params);
o.input.value=bv.embedJS();
this.ready();
}},_1b);
bv.mix({launchShare:function(){
if(!_4){
console.log("new Share");
_4=new _1c();
}
_4.toggle();
},launchEmbed:function(){
if(!_6){
console.log("new Embed");
_6=new _20();
}
_6.toggle();
},embedJS:function(){
var o=this.params;
var url=this.root+"bv.js";
var cfg=bv.toQuery(o,["w","h","node","swf","src"]);
var s="<div id=\"player\" style=\"width:"+o.w+"px; height:"+o.h+"px\">";
s+="<script src=\""+url+"\" config=\""+cfg+"\"></script>";
s+="</div>";
return s;
}});
})(window.bv);
(function(b){
var _1="http://services.bettervideo.com/DOM/v1.0/DC.svc/OnInitPage";
var _2="http://services.bettervideo.com/DOM/v1.0/DC.svc/AddVideo";
var _3=new b.List(),_4,_5,_6="foo";
b.reports=new (b.def({duration:0,time:0,played:false,Reporting:function(){
var _7=false;
var _8=false;
var _9=false;
b.on(b.playlist,"onLoad",this,"connectPage");
b.sub("/video/error",this,function(_a){
this.report("error");
});
var _b=this;
if(window.attachEvent){
window.attachEvent("onbeforeunload",function(){
_b.sendVideoReports();
});
}else{
window.addEventListener("unload",function(e){
_b.sendVideoReports();
},false);
}
},connectPage:function(){
this.connectMedia();
b.on("timer",this,"sendPageReport",500);
},connectMedia:function(_c){
console.info("reports/playlist ",b.playlist.length,b.playlist.videos.length,b.playlist);
b.playlist.videos.each(function(_d,i){
_3.push(new this.Video(_d,_c,i));
},this);
_4=0;
_5="video";
_3.get(0).connect();
b.sub("/media/set/index",this,function(o){
console.info("reports/media/set/index ",o);
if(o.type==_5&&o.index==_4){
return;
}
_3.get(_4).disconnect();
_5=o.type;
_4=o.index;
_3.get(_4).connect();
this.report(_3);
});
},onVideoNotFound:function(o){
console.info("reporting - video not found");
},onEvent:function(_e){
console.info("report event",_e);
this.report(_e);
},requestToken:function(){
var _f={videocount:b.playlist.videos.length};
console.warn("requestTokenURL",requestTokenURL);
new b.Jsonp({url:requestTokenURL,args:_f,callback:b.bind(this,"onTokenCallback")});
},sendPageReport:function(){
var _10=(new b.reports.Page().compile());
new b.Jsonp({url:_1,args:_10,callback:b.bind(this,"onPageCallback")});
},sendVideoReports:function(dev){
_3.each(function(v){
var _11=v.compile();
console.log("   video args",_11);
new b.Jsonp({args:_11,url:_2,callback:b.bind(this,"onVideoCallback")});
},this);
},setToken:function(tkn,pid){
_3.each(function(v){
v.setToken(tkn,pid);
});
},onTokenCallback:function(_12){
console.log("BV REPORTS onTokenCallback - > (token)",_12);
},onVideoCallback:function(_13){
console.log("BV REPORTS onVideoCallback - > ",_13);
},onPageCallback:function(_14){
this.setToken(_14.tkn,_14.playerid);
},onCallback:function(_15){
console.warn("BV REPORTS CALLBACK",_15);
},report:function(_16){
console.log("report",_16);
}}))();
window.bvReportsCallback=function(){
};
})(window.bv);
(function(b){
var _1=document.referrer;
var ua=navigator.userAgent;
var _2=function(){
var r=_1;
if(!r){
return {};
}
r=b.urlToObj(unescape(r));
var o={referrer:r.protocol+"://"+r.host};
if(r.query){
o.terms=(r.query.q||r.query.p||"").replace(/\+|\-/g," ");
}
return o;
};
var _3=function(){
var v,r;
if(b.is_iphone()){
v=/OS\s\d_\d_\d/.match(ua);
if(v){
v=v.split(" ")[1].split("_").join(".");
return "iPhone OS "+v;
}
return "iPhone OS";
}else{
if(b.is_ipad()){
v=/OS\s\d_\dd/.match(ua);
if(v){
v=v.split(" ")[1].split("_").join(".");
return "iPad OS "+v;
}
return "iPad OS";
}else{
if(b.is_android()){
v=/Android\d\.\d/.exec(ua);
return v||"Android";
}else{
r=/webOS|Windows|Macintosh|Ubuntu|Kubuntu|Epiphany|Debian|Galeon|gentoo|kanotix|FreeBSD|IRIX|SunOS/g.exec(ua);
if(r){
r=r[0];
if(r=="Windows"){
v=/Win\d\d|Windows\sXP|Windows\sME|Windows\sNT\s\d\.\d/.exec(ua);
if(v){
return v[0];
}
return r;
}else{
if(r=="Macintosh"){
if(!/OS\sX/.test(ua)){
return r;
}
v=/OS\sX\s\d+\.\d/.exec(ua);
if(v){
return "OS X "+Number(/\d+\.\d/.exec(v)[0]);
}
return "OS X";
}else{
if(r=="webOS"){
v=/webOS\/\d\.d/.exec(r);
if(v){
return r+" "+Number(v.split("/")[1]);
}
return r;
}else{
return r;
}
}
}
}
}
}
}
return "Unknown";
};
var _4=function(){
var r;
if(/Safari/.test(ua)&&/Version\/\d+\.\d+/.test(ua)){
return "Safari "+/Version\/\d+\.\d+/.exec(ua)[0].split("/")[1];
}
r=/Camino|Chimera|SeaMonkey|ELinks|Links|Lynx|Galeon|Konqueror|Epiphany|RockMelt/.exec(ua);
if(r){
return r[0];
}
r=/Firefox\/\d+\.\d+|MSIE\s\d+\.\d+|Chrome\/\d+\.\d+|Opera\/\d+\.\d+/.exec(ua);
if(!r){
r=/WebKit\/d+\.d+/.exec(ua);
}
if(r){
return r[0].replace("/"," ");
}
return "Unknown";
};
var _5=function(){
var _6=b.cookie.get("bvUser");
if(!_6){
var r=Math.ceil(Math.random()*100000000000);
_6="BVUSER"+r;
b.cookie.set("bvUser",_6,3000);
}
return _6;
};
b.reports.Page=b.def({Page:function(){
},compile:function(){
var r=_2();
var d=document;
var s=b.settings;
var _7={videocount:b.playlist.videos.length,uid:_5(),os:_3(),br:_4(),cid:s.cid,lid:s.lid,fv:b.flash.version().toString(),pv:b.version.toString(),pt:(b.supports.video()?"html5":"flash"),title:d.title,ss:window.screen.width+"x"+window.screen.height};
if(r.referrer){
_7.referrer=r.referrer;
}
if(r.terms){
_7.st=r.terms;
}
return _7;
}});
})(window.bv);
(function(b){
var _1=b.logx;
var _2="fs",_3="screen",_4="pl",_5="p",_6="sc",_7="v",O="lgo",_8="d",_9="t",_a="psd",_b="pld",_c="lid",_d="vs",_e="twt",_f="fb",_10="sh",_11="em",_12="wp",_13="l",_14="vw",_15="c",_16="vs",_17="vk",_18="dt";
b.reports.Video=b.def({index:null,handle:null,playing:false,complete:false,hasPlayed:false,Video:function(vid,_19,i){
var d=this.data={};
d[_13]=false;
d[_14]=false;
d[_15]=false;
d.vid=vid.vid;
d.lid=vid.lid;
this.index=i;
this.timer=b.timer({id:vid.vid,paused:true,format:"integer"});
},report:function(_1a){
this.data[_1a]=(this.data[_1a]===null||this.data[_1a]===undefined)?1:this.data[_1a]+1;
_1(" report:::",_1a,this.data[_1a]);
},setToken:function(tkn,pid){
this.data.tkn=tkn;
this.data.pid=pid;
},onMeta:function(m){
_1("reports.meta:",m);
this.duration=this.data[_8]=Math.ceil(m.duration);
this.data[_16]=m.width+"x"+m.height;
this.data[_13]=true;
this.data[_9]=0;
this.dlTimer=b.timer({format:"integer"});
},onPlay:function(){
if(this.playing){
return;
}
this.data[_14]=true;
this.report(_4);
this.complete=false;
if(this.hasPlayed){
this.playing=true;
}else{
this.hasPlayed=true;
b.on("timer",this,function(){
if(!this.playing){
this.playing=true;
}
},200);
}
var t=this.timer.resume();
_1("tmr:",t);
},onPause:function(){
if(!this.playing||this.complete){
return;
}
var t=this.timer.pause();
_1("tmr:",t);
this.report(_5);
this.playing=false;
},onDownload:function(o){
if(o.p>=1){
if(o.bytesTotal){
this.data[_17]=o.bytesTotal;
}
this.data[_18]=this.dlTimer.pause().playtime;
}
},onComplete:function(){
this.complete=this.data[_15]=true;
playing=false;
},onTime:function(m){
this.time=Math.ceil(m.time);
this.data[_9]=this.data[_9]===null?this.time:Math.max(this.data[_9],this.time);
},onFullscreen:function(){
this.report(_2);
},onVolume:function(){
this.report(_7);
},onScrub:function(_1b){
if(_1b=="end"){
this.report(_6);
}
},ono:function(){
this.report(O);
},onScreen:function(){
this.report(_3);
},onTwitter:function(){
this.report(_e);
},onFacebook:function(){
this.report(_f);
},onShare:function(){
this.report(_10);
},onWebpage:function(){
this.report(_12);
},onEmbed:function(){
this.report(_11);
},connect:function(){
if(!this.handle){
this.handle=b.multi.sub({"/video/on/meta":"onMeta","/video/on/complete":"onComplete","/video/on/download":"onDownload","/video/on/frame":"onTime","/video/on/fullscreen":"onFullscreen","/video/seek":"onScrub","/button/play":"onPlay","/button/pause":"onPause","/button/o":"ono","/button/screen":"onScreen","/button/volume":"onVolume","/button/twitter":"onTwitter","/button/facebook":"onFacebook","/button/share":"onShare","/button/webpage":"onWebpage","/button/embed":"onEmbed"},this);
}
this.handle.resume();
},disconnect:function(){
this.handle.pause();
},compile:function(){
var tmr=this.timer.getInfo();
this.data[_b]=tmr.playtime||null;
this.data[_a]=tmr.pausetime||null;
var o={};
for(var nm in this.data){
if(this.data[nm]!==null){
o[nm]=this.data[nm];
}
}
_1("send video:",o);
return o;
}});
})(window.bv);
bv.on(document,"DOMContentLoaded",function(){
bv.onDomReady();
});
bv.on(window,"load",function(){
bv.onDomReady();
});
if(window.bvOnScriptsLoaded){
window.bvOnScriptsLoaded();
}else{
console.log("missing bvOnScriptsLoaded");
}
bv.version={major:6,minor:0,date:"09/23/2011",time:"08:39",toString:function(){
return this.major+"."+this.minor+" "+this.date;
}};


