if(typeof Wistia=="undefined"){Wistia={}}if(typeof Wistia.VideoEmbed=="undefined"){Wistia.VideoEmbed=function(h,e,a,f){if(navigator.userAgent&&navigator.userAgent.indexOf("MSIE")>=0){return}var c=h+"_html5";var g=document.createElement("video");g.id=h+"_html5";g.src=f.videoUrl;g.width=g.style.width=e;g.height=g.style.height=a;if(f.autoPlay){g.autoplay=true}g.controls="controls";g.poster=f.stillUrl;var d=document.getElementById(h);var b=d.parentNode;b.replaceChild(g,d);return(Wistia.VideoTracker(g,f))}}if(typeof Wistia.VideoTracker=="undefined"){Wistia.VideoTracker=function(t,m){var k=function(){if(c){f("update")}if(q.length!=0){var w=v+q.join(",")+e;g(Wistia.Base64.encode(w));q=[]}};var g=function(x){try{var w=window.XMLHttpRequest&&(window.location.protocol!=="file:"||!window.ActiveXObject)?(new window.XMLHttpRequest()):(new window.ActiveXObject("Microsoft.XMLHTTP"));w.setRequestHeader("Content-Type","application/json");w.setRequestHeader("Content-Length",0);w.setRequestHeader("Connection","close")}catch(y){}w.open("POST",j+"?data="+x,true);w.send()};var f=function(w){var y=parseInt(t.currentTime*10)/10;var x=(new Date().getTime())-b;q.push("{key:'"+w+"',value:"+y+",timeDelta:"+x+"}");if(w=="initialized"||w=="end"){k()}};var u=function(){c=true;o=t.currentTime;i=new Date().getTime();f("play")};var h=function(){if(c&&a()){f("seek");f("play")}o=t.currentTime;i=new Date().getTime()};var a=function(){if(o==null||i==null){return false}var w=(new Date().getTime()-i)-(t.currentTime-o)*1000;return Math.abs(w)>5000};var s=function(){var w=document.cookie.split("; ");for(var x=0;x<w.length;x++){var y=w[x].split("=");if(y[0]=="__distillery"){return y[1]}}};var d=function(){var x=(new Date().getTime()).toString()+"-"+Math.random();var w=new Date();w.setTime(w.getTime()+(365*24*60*60*1000));document.cookie="__distillery="+x+"; expires="+w.toGMTString()+"; path=/";return x};var c=false;var j=m.distilleryUrl;var q=[];var r=(m.transmitInterval||10)*1000;var l=s()||d();var n=(new Date().getTime()).toString()+"e"+Math.random();var v="{account_key:'"+m.accountKey+"',session_id:'"+l+"',media_id:'"+m.mediaId+"',event_key:'"+n+"',media_duration:"+parseFloat(m.mediaDuration)+",referrer:'"+window.location.href+"',event_details:[";var e="]}";var o=null;var i=null;var p=null;var b=new Date().getTime();t.addEventListener("pause",function(){c=false;f("pause")},false);t.addEventListener("play",function(){u()},false);t.addEventListener("timeupdate",function(){h()},false);t.addEventListener("ended",function(){f("end");t.pause()},false);setTimeout(function(){setInterval(k,r);k()},Math.random()*r+1000);f("initialized");return({video:t,visitorId:l,eventId:n})}}if(typeof Wistia.Base64=="undefined"){Wistia.Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(c){var a="";var k,h,f,j,g,e,d;var b=0;c=Wistia.Base64._utf8_encode(c);while(b<c.length){k=c.charCodeAt(b++);h=c.charCodeAt(b++);f=c.charCodeAt(b++);j=k>>2;g=((k&3)<<4)|(h>>4);e=((h&15)<<2)|(f>>6);d=f&63;if(isNaN(h)){e=d=64}else{if(isNaN(f)){d=64}}a=a+this._keyStr.charAt(j)+this._keyStr.charAt(g)+this._keyStr.charAt(e)+this._keyStr.charAt(d)}return a},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e<b.length;e++){var d=b.charCodeAt(e);if(d<128){a+=String.fromCharCode(d)}else{if((d>127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a}}};