/* VimeoPlayer - v2.1.6 - 2013-10-08 */
(function(g,v,y){var s;!Object.defineProperty&&Object.prototype.__defineGetter__&&(Object.defineProperty=function(b,a,c){"get"in c&&b.__defineGetter__(a,c.get);"set"in c&&b.__defineSetter__(a,c.set);!c.get&&!c.set&&(b[a]=c.value)});!Object.defineProperties&&Object.defineProperty&&(Object.defineProperties=function(b,a){for(var c in a)try{Object.defineProperty(b,c,a[c])}catch(d){"'enumerable' attribute on the property descriptor cannot be set to 'true' on this object"===d.message&&(a[c].enumerable=
!1,Object.defineProperty(b,c,a[c]))}return b});!Object.create&&Object.defineProperty&&(Object.create=function(b,a){function c(){}if("object"!==typeof b&&"function"!==typeof b)throw new TypeError("Object prototype may only be an Object or null");c.prototype=b;var d=new c;d.__proto__=b;void 0!==a&&Object.defineProperties(d,a);return d});Object.keys||(Object.keys=function(b){if("object"!==typeof b&&"function"!==typeof b||null===b)throw new TypeError("Object.keys called on a non-object");var a=[],c;for(c in b)b.hasOwnProperty(c)&&
a.push(c);return a});Array.prototype.indexOf||(Array.prototype.indexOf=function(b){for(var a=0,c=this.length;a<c;a++)if(a in this&&this[a]===b)return a;return-1});!("classList"in v.documentElement)&&(Object.defineProperty&&"undefined"!==typeof HTMLElement)&&Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){function b(b){return function(c){var f=a.className.split(/\s+/),e=f.indexOf(c);b(f,e,c);a.className=f.join(" ")}}var a=this,c={add:b(function(b,a,c){return~a||b.push(c)}),
remove:b(function(b,a){return~a&&b.splice(a,1)}),toggle:b(function(b,a,c){return~a?b.splice(a,1):b.push(c)}),contains:function(b){return!!~a.className.split(/\s+/).indexOf(b)},item:function(b){return a.className.split(/\s+/)[b]||null}};Object.defineProperty(c,"length",{get:function(){return a.className.split(/\s+/).length}});return c}});var t=function(b,a,c,d){var h=function(){return c.call(b,a)},f=function(a){return d.call(b,a)};if(Object.defineProperty){var e={enumerable:!0,get:h};d&&(e.set=f);
try{Object.defineProperty(b,a,e)}catch(g){delete e.enumerable,Object.defineProperty(b,a,e)}}else{var l=function(c){c.propertyName===a&&(b.detachEvent("onpropertychange",l),d&&f(b[a]),b[a]=h,b[a].toString=h,b.attachEvent("onpropertychange",l))};try{b[a]=h,b[a].toString=h}catch(j){}b.attachEvent("onpropertychange",l)}},z={make:function(b){b=b||{};var a={};b.on=function(c,d){c=[].concat(c);for(var h=0,f=c.length;h<f;h++){var e=c[h];e&&(a[e]||(a[e]=[]),a[e].push(d))}return b};b.once=function(a,d){function h(){d.apply(b.off(a,
h),arguments)}h.handler=d;return b.on(a,h)};b.off=function(c,d){c=[].concat(c);for(var h=0,f=c.length;h<f;h++){var e=c[h];if(e&&e in a){var g=a[e].indexOf(d);if(-1===g){for(var j=0,m=a[e].length;j<m;j++)if(a[e][j].handler===d){g=h;break}if(-1===g)break}a[e].splice(g,1)}}return b};b.fire=function(c){if(!c)return b;if(c in a)for(var d=a[c].slice(0),g=0,f=d.length;g<f;g++)d[g].apply(b,d.slice.call(arguments,1));return b};return b}};s=6;var A;A=function(b,a){function c(){switch(b._video&&b._video.currentRenderer){case "html":return"HTML5";
case "flash":return"Flideo";case "moogaloop":return"Moogaloop";default:return"Player"}}function d(a,d){d||(d=b.video.id,b.video.title&&(b.video.owner&&b.video.owner.name)&&(d+=" - "+b.video.title+" from "+b.video.owner.name));0;g._gaq.push(["player._trackEvent",c(),a,d])}function h(a,c){0;g._gaq.push(["player._trackSocial",a,c,b.video.share_url])}var f=b.request.session,e=!1,j=!1,l=!0;a.on(50,function(){j||(d("Play"),j=!0)});a.on(151,function(b){d("Entered Fullscreen"+(!b?" (native)":""))});a.on(153,
function(){d("Exited Fullscreen")});a.on(9,function(b){"hd"===b?d("HD Turned On"):d("HD Turned Off")});a.on(5,function(b){"hd-not-allowed"===b&&d("HD Attempt")});a.on(303,function(){d("Liked")});a.on(304,function(){d("Unliked")});a.on(305,function(){d("Added to Watch Later")});a.on(306,function(){d("Removed from Watch Later")});a.on(202,function(){d("Share Button Clicked")});a.on(203,function(){d("Embed Button Clicked")});a.on(258,function(){e||(e=!0,d("Embed Code Copied"))});a.on(251,function(){e=
!1});a.on(204,function(b){b?d("Scaling Turned On"):d("Scaling Turned Off")});a.on(307,function(){d("Logged In")});a.on(254,function(){h("Facebook","share")});a.on(255,function(){h("Twitter","tweet")});a.on(257,function(){h("Email","email")});var m;a.on([57,105],function(b){m||(m=b||(new Date).getTime())});a.on(58,function(){if(0<m){var a=b._video.currentFile.quality,d="Buffer Time";l&&(l=!1,d="Start Time");var e=m,e=(new Date).getTime()-e;0;g._gaq.push(["player._trackTiming",c(),d,e,a]);m=null}});
a.on(312,function(a){b=a;f!==a.request.session&&(g._gaq.push(["player._trackPageview","/video/"+b.video.id]),l=!0,j=!1)});a.fire(358);return{}};var j,B=Math;j={isFunction:function(b){return"function"===typeof b},round:function(b,a){b=parseFloat(b);if(isNaN(b))return 0;var c=B.pow(10,a||3);return B.round(b*c)/c},openWindow:function(b,a,c,d,h){return g.open(b,d,h+",width="+a+",height="+c+",left="+((g.screenX||g.screenLeft||0)+g.outerWidth/2-a/2)+",top="+((g.screenY||g.screenTop||0)+g.outerHeight/2-
c/2))}};var C,k=this;C=function(b,a){function c(b,a){try{d({event:"error",data:{message:a,code:b}})}catch(c){}return Error(a)}function d(a){if(a.event&&(m.fire(a.event,a.data),!l[a.event]))return;if(n){var c="";b.embed.player_id&&(a.player_id=b.embed.player_id);if(1===b.embed.api){c=a.event;if(1===b.embed.api){for(var d in x)if(x[d]===a.event){c=d;break}switch(c){case "onSeek":case "onProgress":delete a.data.percent;delete a.data.duration;break;case "onLoading":delete a.data.seconds,delete a.data.duration}}d=
"method="+encodeURIComponent(c||a.method);d+="&params=";c=[];if(a.value!==y)c.push(encodeURIComponent(a.value));else if("object"===typeof a.data)for(var p in a.data)c.push(encodeURIComponent(a.data[p]));else a.data!==y&&c.push(encodeURIComponent(a.data));a.player_id&&c.push(a.player_id);c=d+=c.join(",")}else try{c=JSON.stringify(a)}catch(e){}0;if(k.parent!=k)try{k.parent.postMessage(c,E)}catch(f){}}}function g(a){if(a){1===b.embed.api&&(a=a.replace("api_",""));switch(a){case "changeColor":return r.color.set;
case "paused":return r.paused.get;case "seekTo":return r.currentTime.set}if("function"===typeof r[a])return r[a];var c=a.substr(0,3);a=a.substr(3,1).toLowerCase()+a.substr(4);return r[a]&&r[a][c]?r[a][c]:!1}}function f(a){if(0===(v.referrer||k.location.origin||k.location.href).indexOf(a.origin)){var b;a:{if((a=a.data)&&""!==a)try{b=JSON.parse(a);break a}catch(c){var p={};a.split("&").forEach(function(a){try{var b=a.split("="),c=decodeURIComponent(b[0]),d=decodeURIComponent(b[1]);"id"!==c&&("params"===
c&&(c="value"),d=d.split(",")[0],p[c]=d)}catch(e){}});b=p;break a}b=void 0}a=b.method;b=b.value;var e=g(a);e&&(0,b=e.call(null,b),b!==y&&""!==b&&d({method:a,value:b}))}}function e(){if(q&&u){try{if("not-supported"===u)throw c("not_supported","This video is not supported in this browser.");throw c("playback","An error occurred during playback.");}catch(a){}u=null}}var E=decodeURIComponent(b.request.referrer),l={ready:!0,error:!0},m=z.make({}),n=!(!k.postMessage||!k.parent.postMessage),w=null,q=!1,
p=!1,u=null,s=!1,t="play pause finish playProgress loadProgress seek".split(" "),x={onFinish:"finish",onLoading:"loadProgress",onLoad:"ready",onProgress:"playProgress",onPlay:"play",onPause:"pause",onSeek:"seek"},r={addEventListener:function(a,b){a in x&&(a=x[a]);if(0>t.indexOf(a))throw c("invalid_event",'"'+a+'" is not a valid event. Valid events are: '+t.join(", ")+".");if(b)m.on(a,b);else l[a]=!0;0},removeEventListener:function(a,b){b?m.off(a,b):l[a]=!1;0},play:function(){if("undefined"!==typeof Support&&
(Support.iPhone||Support.iPad)&&!s)throw c("play","The user must initiate playback first.");a.fire(102,!0)},pause:function(){a.fire(101)},loadVideo:function(d){if(!b.embed.on_site&&isNaN(d))throw c("invalid_video","The video id must be a number.");a.fire(2,d)},unload:function(){a.fire(7)},color:{get:function(){return b.embed.color.replace("#","")},set:function(d){if(b.embed.settings.color&&!b.embed.on_site)throw c("color_locked","The creator of the video has chosen to always use "+(new Color(b.embed.color)).hex+
".");d=(d+"").replace("#","");if(!("string"===typeof d&&(3===d.length||6===d.length)&&!isNaN(parseInt(d,16))))throw c("invalid_color","The color should be 3- or 6-digit hex value.");if(k.Color)try{var p=new Color(d);a.fire(11,p);if(3>(new Color(23,35,34,0.75)).contrast(p).ratio)throw c("color_contrast","Specified color does not meet minimum contrast ratio. We recommend using brighter colors. See WCAG 2.0 guidelines: http://www.w3.org/TR/WCAG/#visual-audio-contrast");}catch(e){}else a.fire(11,d)}},
currentTime:{get:function(){return 0.1<b._video.currentTime?j.round(b._video.currentTime):0},set:function(d){d=parseFloat(d);if(isNaN(d)||0>d||d>b._video.duration)throw c("invalid_time","Seconds must be a positive float less than the duration of the video ("+b._video.duration+").");a.fire(1,null,d);a.fire(301)}},duration:{get:function(){return j.round(b.video.duration)}},loop:{get:function(){return!!b.embed.loop},set:function(b){a.fire(8,b)}},paused:{get:function(){return!!b._video.paused}},videoEmbedCode:{get:function(){return b.video.embed_code}},
videoHeight:{get:function(){return b.video.video_height||b.video.height}},videoId:{get:function(){return b.video.id}},videoWidth:{get:function(){return b.video.video_width||b.video.width}},videoUrl:{get:function(){return b.video.url}},volume:{get:function(){var a=j.round(b.storage?b.storage.volume:b.request.cookie.volume);return 1===b.embed.api?Math.round(100*a):a},set:function(d){d=parseFloat(d);1===b.embed.api&&(d/=100);if(isNaN(d)||0>d||1<d)throw c("invalid_volume","Volume should be a float between 0 and 1.");
w=d;a.fire(3,d,!0)}}};a.on(50,function(){s=!0});k.addEventListener?k.addEventListener("message",f,!1):k.attachEvent("onmessage",f);a.on(52,function(){p||(p=!0,d({event:"play"}))});a.on(51,function(){p=!1;d({event:"pause"})});a.on(56,function(){p=!1;d({event:"finish"})});a.on(54,function(a,b,c){d({event:"playProgress",data:{seconds:j.round(a),percent:j.round(c),duration:j.round(b)}})});a.on(53,function(a,b,c){d({event:"loadProgress",data:{bytesLoaded:-1,bytesTotal:-1,percent:j.round(c),duration:j.round(b),
seconds:j.round(a)}})});a.on(55,function(a,b,c){d({event:"seek",data:{seconds:j.round(a),percent:j.round(c),duration:j.round(b)}})});a.on(49,function(a){u=a;e()});a.on(7,function(){u=null;s=!1});a.on(312,function(c){b=c;w&&setTimeout(function(){0;a.fire(3,w,!0)},0)});a.fire(357);a.on(359,function(){q=!0;d({event:"ready"});e()});return r};var D;D=function(b,a){a.on(s,function(c){var d="http://"+b.player_url+"/video/"+b.video.id+"/login";switch(c){case "login-like":j.openWindow(d+"/like",670,545,"popup");
a.fire(259,c);break;case "login-watch-later":j.openWindow(d+"/watch-later",670,545,"popup");a.fire(259,c);break;case "login-private-locked":j.openWindow(d+"/private",670,545,"popup"),a.fire(259,c)}});b.embed.on_site||(g.confirmLoginAction=function(b,d){a.fire(307,d)});return{}};g.VimeoPlayer=function(b,a,c){function d(){"willOpenLoginForm"in g[f+"_delegate"]||(g[f+"_delegate"].willOpenLoginForm=function(a,b){e.fire(s,"login-"+b);return!1})}function h(){if(!b.api_addEventListener)return setTimeout(h,
50);b.api_addEventListener("loadProgress",f+"_onLoadProgress");b.api_addEventListener("playProgress",f+"_onPlayProgress");b.api_addEventListener("play",f+"_onPlay");b.api_addEventListener("pause",f+"_onPause");b.api_addEventListener("finish",f+"_onFinish");b.api_addEventListener("seek",f+"_onSeek");b.api_addEventListener("volumeChange",f+"_onVolumeChange");b.api_addEventListener("_trackEvent",f+"_trackEvent");b.api_addEventListener("_trackSocial",f+"_trackSocial");b.api_addEventListener("_trackTiming",
f+"_trackTiming");b.api_setDelegate&&b.api_setDelegate(f+"_delegate")}var f="moogaloop_"+Math.round(1E3*Math.random()+(new Date).getTime());a._video={};a._video.currentTime=0;a._video.paused=!0;a._video.currentRenderer="moogaloop";a._video.currentFile={quality:"unknown"};var e=z.make(),k=new C(a,e);new D(a,e);g[f+"_delegate"]=c||{};e.on(102,function(){b.api_play()});e.on(101,function(){b.api_pause()});e.on(2,function(a){b.api_loadVideo(a)});e.on(7,function(){b.api_unload()});e.on(11,function(c){c=
c.replace("#","");a.embed.color=c;b.api_changeColor(c)});e.on(1,function(a,c){b.api_seekTo(c)});e.on(8,function(c){b.api_loop(c);a.embed.loop=!!c});e.on(3,function(a){b.api_setVolume(a)});g[f+"_onLoadProgress"]=function(a){e.fire(53,a.duration*a.percent,a.duration,a.percent)};g[f+"_onPlayProgress"]=function(b){a._video.currentTime=b.duration*b.percent;e.fire(54,a._video.currentTime,b.duration,b.percent)};g[f+"_onPlay"]=function(){a._video.paused=!1;e.fire(52)};g[f+"_onPause"]=function(){a._video.paused=
!0;e.fire(51)};g[f+"_onFinish"]=function(){a._video.paused=!0;e.fire(56)};g[f+"_onSeek"]=function(a){e.fire(55,a.seconds,a.duration,a.percent)};g[f+"_onVolumeChange"]=function(b){a.storage.volume=b;e.fire(59,b)};new A(a,e);var l={Play:50,"Entered Fullscreen":[151,!0],"Exited Fullscreen":153,"HD Turned On":[9,"hd"],"HD Turned Off":[9,"sd"],Liked:303,Unliked:304,"Added to Watch Later":305,"Removed from Watch Later":306,Share:202,"Embed (button)":203,"Embed Code (copied)":258,"Scaling Turned On":[204,
!0],"Scaling Turned Off":204,"Logged In":307},m={Facebook:254,Twitter:255,Tumblr:256,Email:257};g[f+"_trackEvent"]=function(a){a.action in l&&(a=[].concat(l[a.action]),e.fire.apply(null,a))};g[f+"_trackSocial"]=function(a){a.network in m&&(a=[].concat(m[a.network]),e.fire.apply(null,a))};g[f+"_trackTiming"]=function(b){a._video.currentFile.quality=b.quality;e.fire(57,b.time);e.fire(58)};d();e.on(307,function(a){b.api_setLoggedIn&&b.api_setLoggedIn(!0,a)});e.fire(359);h();var n={};try{Object.defineProperty({},
"fakeprop",{})}catch(w){n=v.createElement("vimeo"),v.body.appendChild(n)}t(n,"config",function(){return a},function(b){a=b;e.fire(312,a)});t(n,"delegate",null,function(a){g[f+"_delegate"]=a;d()});n.ready=function(a){if(!j.isFunction(a))throw new TypeError("You can only pass a function to ready().");a.call(n)};for(var q in k)k.hasOwnProperty(q)&&("function"===typeof k[q]?n[q]=k[q]:t(n,q,k[q].get,k[q].set||!1));Object.preventExtensions&&Object.preventExtensions(n);return n}})(window,document);
