var swfobject=function(){var aq="undefined",aD="object",ab="Shockwave Flash",X="ShockwaveFlash.ShockwaveFlash",aE="application/x-shockwave-flash",ac="SWFObjectExprInst",ax="onreadystatechange",af=window,aL=document,aB=navigator,aa=false,Z=[aN],aG=[],ag=[],al=[],aJ,ad,ap,at,ak=false,aU=false,aH,an,aI=true,ah=function(){var a=typeof aL.getElementById!=aq&&typeof aL.getElementsByTagName!=aq&&typeof aL.createElement!=aq,e=aB.userAgent.toLowerCase(),c=aB.platform.toLowerCase(),h=c?/win/.test(c):/win/.test(e),j=c?/mac/.test(c):/mac/.test(e),g=/webkit/.test(e)?parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,d=!+"\v1",f=[0,0,0],k=null;if(typeof aB.plugins!=aq&&typeof aB.plugins[ab]==aD){k=aB.plugins[ab].description;if(k&&!(typeof aB.mimeTypes!=aq&&aB.mimeTypes[aE]&&!aB.mimeTypes[aE].enabledPlugin)){aa=true;d=false;k=k.replace(/^.*\s+(\S+\s+\S+$)/,"$1");f[0]=parseInt(k.replace(/^(.*)\..*$/,"$1"),10);f[1]=parseInt(k.replace(/^.*\.(.*)\s.*$/,"$1"),10);f[2]=/[a-zA-Z]/.test(k)?parseInt(k.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof af.ActiveXObject!=aq){try{var i=new ActiveXObject(X);if(i){k=i.GetVariable("$version");if(k){d=true;k=k.split(" ")[1].split(",");f=[parseInt(k[0],10),parseInt(k[1],10),parseInt(k[2],10)]}}}catch(b){}}}return{w3:a,pv:f,wk:g,ie:d,win:h,mac:j}}(),aK=function(){if(!ah.w3){return}if((typeof aL.readyState!=aq&&aL.readyState=="complete")||(typeof aL.readyState==aq&&(aL.getElementsByTagName("body")[0]||aL.body))){aP()}if(!ak){if(typeof aL.addEventListener!=aq){aL.addEventListener("DOMContentLoaded",aP,false)}if(ah.ie&&ah.win){aL.attachEvent(ax,function(){if(aL.readyState=="complete"){aL.detachEvent(ax,arguments.callee);aP()}});if(af==top){(function(){if(ak){return}try{aL.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}aP()})()}}if(ah.wk){(function(){if(ak){return}if(!/loaded|complete/.test(aL.readyState)){setTimeout(arguments.callee,0);return}aP()})()}aC(aP)}}();function aP(){if(ak){return}try{var b=aL.getElementsByTagName("body")[0].appendChild(ar("span"));b.parentNode.removeChild(b)}catch(a){return}ak=true;var d=Z.length;for(var c=0;c<d;c++){Z[c]()}}function aj(a){if(ak){a()}else{Z[Z.length]=a}}function aC(a){if(typeof af.addEventListener!=aq){af.addEventListener("load",a,false)}else{if(typeof aL.addEventListener!=aq){aL.addEventListener("load",a,false)}else{if(typeof af.attachEvent!=aq){aM(af,"onload",a)}else{if(typeof af.onload=="function"){var b=af.onload;af.onload=function(){b();a()}}else{af.onload=a}}}}}function aN(){if(aa){Y()}else{am()}}function Y(){var d=aL.getElementsByTagName("body")[0];var b=ar(aD);b.setAttribute("type",aE);var a=d.appendChild(b);if(a){var c=0;(function(){if(typeof a.GetVariable!=aq){var e=a.GetVariable("$version");if(e){e=e.split(" ")[1].split(",");ah.pv=[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10)]}}else{if(c<10){c++;setTimeout(arguments.callee,10);return}}d.removeChild(b);a=null;am()})()}else{am()}}function am(){var g=aG.length;if(g>0){for(var h=0;h<g;h++){var c=aG[h].id;var l=aG[h].callbackFn;var a={success:false,id:c};if(ah.pv[0]>0){var i=aS(c);if(i){if(ao(aG[h].swfVersion)&&!(ah.wk&&ah.wk<312)){ay(c,true);if(l){a.success=true;a.ref=av(c);l(a)}}else{if(aG[h].expressInstall&&au()){var e={};e.data=aG[h].expressInstall;e.width=i.getAttribute("width")||"0";e.height=i.getAttribute("height")||"0";if(i.getAttribute("class")){e.styleclass=i.getAttribute("class")}if(i.getAttribute("align")){e.align=i.getAttribute("align")}var f={};var d=i.getElementsByTagName("param");var k=d.length;for(var j=0;j<k;j++){if(d[j].getAttribute("name").toLowerCase()!="movie"){f[d[j].getAttribute("name")]=d[j].getAttribute("value")}}ae(e,f,c,l)}else{aF(i);if(l){l(a)}}}}}else{ay(c,true);if(l){var b=av(c);if(b&&typeof b.SetVariable!=aq){a.success=true;a.ref=b}l(a)}}}}}function av(b){var d=null;var c=aS(b);if(c&&c.nodeName=="OBJECT"){if(typeof c.SetVariable!=aq){d=c}else{var a=c.getElementsByTagName(aD)[0];if(a){d=a}}}return d}function au(){return !aU&&ao("6.0.65")&&(ah.win||ah.mac)&&!(ah.wk&&ah.wk<312)}function ae(f,d,h,e){aU=true;ap=e||null;at={success:false,id:h};var a=aS(h);if(a){if(a.nodeName=="OBJECT"){aJ=aO(a);ad=null}else{aJ=a;ad=h}f.id=ac;if(typeof f.width==aq||(!/%$/.test(f.width)&&parseInt(f.width,10)<310)){f.width="310"}if(typeof f.height==aq||(!/%$/.test(f.height)&&parseInt(f.height,10)<137)){f.height="137"}aL.title=aL.title.slice(0,47)+" - Flash Player Installation";var b=ah.ie&&ah.win?"ActiveX":"PlugIn",c="MMredirectURL="+encodeURI(af.location).toString().replace(/&/g,"%26")+"&MMplayerType="+b+"&MMdoctitle="+aL.title;if(typeof d.flashvars!=aq){d.flashvars+="&"+c}else{d.flashvars=c}if(ah.ie&&ah.win&&a.readyState!=4){var g=ar("div");h+="SWFObjectNew";g.setAttribute("id",h);a.parentNode.insertBefore(g,a);a.style.display="none";(function(){if(a.readyState==4){a.parentNode.removeChild(a)}else{setTimeout(arguments.callee,10)}})()}aA(f,d,h)}}function aF(a){if(ah.ie&&ah.win&&a.readyState!=4){var b=ar("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(aO(a),b);a.style.display="none";(function(){if(a.readyState==4){a.parentNode.removeChild(a)}else{setTimeout(arguments.callee,10)}})()}else{a.parentNode.replaceChild(aO(a),a)}}function aO(b){var d=ar("div");if(ah.win&&ah.ie){d.innerHTML=b.innerHTML}else{var e=b.getElementsByTagName(aD)[0];if(e){var a=e.childNodes;if(a){var f=a.length;for(var c=0;c<f;c++){if(!(a[c].nodeType==1&&a[c].nodeName=="PARAM")&&!(a[c].nodeType==8)){d.appendChild(a[c].cloneNode(true))}}}}}return d}function aA(e,g,c){var d,a=aS(c);if(ah.wk&&ah.wk<312){return d}if(a){if(typeof e.id==aq){e.id=c}if(ah.ie&&ah.win){var f="";for(var i in e){if(e[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){g.movie=e[i]}else{if(i.toLowerCase()=="styleclass"){f+=' class="'+e[i]+'"'}else{if(i.toLowerCase()!="classid"){f+=" "+i+'="'+e[i]+'"'}}}}}var h="";for(var j in g){if(g[j]!=Object.prototype[j]){h+='<param name="'+j+'" value="'+g[j]+'" />'}}a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+f+">"+h+"</object>";ag[ag.length]=e.id;d=aS(e.id)}else{var b=ar(aD);b.setAttribute("type",aE);for(var k in e){if(e[k]!=Object.prototype[k]){if(k.toLowerCase()=="styleclass"){b.setAttribute("class",e[k])}else{if(k.toLowerCase()!="classid"){b.setAttribute(k,e[k])}}}}for(var l in g){if(g[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"){aQ(b,l,g[l])}}a.parentNode.replaceChild(b,a);d=b}}return d}function aQ(b,d,c){var a=ar("param");a.setAttribute("name",d);a.setAttribute("value",c);b.appendChild(a)}function aw(a){var b=aS(a);if(b&&b.nodeName=="OBJECT"){if(ah.ie&&ah.win){b.style.display="none";(function(){if(b.readyState==4){aT(a)}else{setTimeout(arguments.callee,10)}})()}else{b.parentNode.removeChild(b)}}}function aT(a){var b=aS(a);if(b){for(var c in b){if(typeof b[c]=="function"){b[c]=null}}b.parentNode.removeChild(b)}}function aS(a){var c=null;try{c=aL.getElementById(a)}catch(b){}return c}function ar(a){return aL.createElement(a)}function aM(a,c,b){a.attachEvent(c,b);al[al.length]=[a,c,b]}function ao(a){var b=ah.pv,c=a.split(".");c[0]=parseInt(c[0],10);c[1]=parseInt(c[1],10)||0;c[2]=parseInt(c[2],10)||0;return(b[0]>c[0]||(b[0]==c[0]&&b[1]>c[1])||(b[0]==c[0]&&b[1]==c[1]&&b[2]>=c[2]))?true:false}function az(b,f,a,c){if(ah.ie&&ah.mac){return}var e=aL.getElementsByTagName("head")[0];if(!e){return}var g=(a&&typeof a=="string")?a:"screen";if(c){aH=null;an=null}if(!aH||an!=g){var d=ar("style");d.setAttribute("type","text/css");d.setAttribute("media",g);aH=e.appendChild(d);if(ah.ie&&ah.win&&typeof aL.styleSheets!=aq&&aL.styleSheets.length>0){aH=aL.styleSheets[aL.styleSheets.length-1]}an=g}if(ah.ie&&ah.win){if(aH&&typeof aH.addRule==aD){aH.addRule(b,f)}}else{if(aH&&typeof aL.createTextNode!=aq){aH.appendChild(aL.createTextNode(b+" {"+f+"}"))}}}function ay(a,c){if(!aI){return}var b=c?"visible":"hidden";if(ak&&aS(a)){aS(a).style.visibility=b}else{az("#"+a,"visibility:"+b)}}function ai(b){var a=/[\\\"<>\.;]/;var c=a.exec(b)!=null;return c&&typeof encodeURIComponent!=aq?encodeURIComponent(b):b}var aR=function(){if(ah.ie&&ah.win){window.attachEvent("onunload",function(){var a=al.length;for(var b=0;b<a;b++){al[b][0].detachEvent(al[b][1],al[b][2])}var d=ag.length;for(var c=0;c<d;c++){aw(ag[c])}for(var e in ah){ah[e]=null}ah=null;for(var f in swfobject){swfobject[f]=null}swfobject=null})}}();return{registerObject:function(a,e,c,b){if(ah.w3&&a&&e){var d={};d.id=a;d.swfVersion=e;d.expressInstall=c;d.callbackFn=b;aG[aG.length]=d;ay(a,false)}else{if(b){b({success:false,id:a})}}},getObjectById:function(a){if(ah.w3){return av(a)}},embedSWF:function(k,e,h,f,c,a,b,i,g,j){var d={success:false,id:e};if(ah.w3&&!(ah.wk&&ah.wk<312)&&k&&e&&h&&f&&c){ay(e,false);aj(function(){h+="";f+="";var q={};if(g&&typeof g===aD){for(var o in g){q[o]=g[o]}}q.data=k;q.width=h;q.height=f;var n={};if(i&&typeof i===aD){for(var p in i){n[p]=i[p]}}if(b&&typeof b===aD){for(var l in b){if(typeof n.flashvars!=aq){n.flashvars+="&"+l+"="+b[l]}else{n.flashvars=l+"="+b[l]}}}if(ao(c)){var m=aA(q,n,e);if(q.id==e){ay(e,true)}d.success=true;d.ref=m}else{if(a&&au()){q.data=a;ae(q,n,e,j);return}else{ay(e,true)}}if(j){j(d)}})}else{if(j){j(d)}}},switchOffAutoHideShow:function(){aI=false},ua:ah,getFlashPlayerVersion:function(){return{major:ah.pv[0],minor:ah.pv[1],release:ah.pv[2]}},hasFlashPlayerVersion:ao,createSWF:function(a,b,c){if(ah.w3){return aA(a,b,c)}else{return undefined}},showExpressInstall:function(b,a,d,c){if(ah.w3&&au()){ae(b,a,d,c)}},removeSWF:function(a){if(ah.w3){aw(a)}},createCSS:function(b,a,c,d){if(ah.w3){az(b,a,c,d)}},addDomLoadEvent:aj,addLoadEvent:aC,getQueryParamValue:function(b){var a=aL.location.search||aL.location.hash;if(a){if(/\?/.test(a)){a=a.split("?")[1]}if(b==null){return ai(a)}var c=a.split("&");for(var d=0;d<c.length;d++){if(c[d].substring(0,c[d].indexOf("="))==b){return ai(c[d].substring((c[d].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(aU){var a=aS(ac);if(a&&aJ){a.parentNode.replaceChild(aJ,a);if(ad){ay(ad,true);if(ah.ie&&ah.win){aJ.style.display="block"}}if(ap){ap(at)}}aU=false}}}}();(function(c,d){var a=c.document;(function(){var e=false,f=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.JRClass=function(){};JRClass.extend=function(k){var i=this.prototype;e=true;var h=new this();e=false;for(var g in k){h[g]=typeof k[g]=="function"&&typeof i[g]=="function"&&f.test(k[g])?(function(l,m){return function(){var o=this._super;this._super=i[l];var n=m.apply(this,arguments);this._super=o;return n}})(g,k[g]):k[g]}function j(){if(!e&&this.init){this.init.apply(this,arguments)}}j.prototype=h;j.constructor=j;j.extend=arguments.callee;return j}})();var b=JRClass.extend({init:function(f,e){if(typeof f=="string"){this.video=a.getElementById(f)}else{this.video=f}this.video.player=this;this.values={};this.elements={};this.options={autoplay:false,preload:true,useBuiltInControls:false,controlsBelow:false,controlsAtStart:true,controlsHiding:false,defaultVolume:0.85,playerFallbackOrder:["flash","html5","links"],flashPlayer:"htmlObject",flashPlayerVersion:false};if(typeof b.options=="object"){_V_.merge(this.options,b.options)}if(typeof e=="object"){_V_.merge(this.options,e)}if(this.getPreloadAttribute()!==d){this.options.preload=this.getPreloadAttribute()}if(this.getAutoplayAttribute()!==d){this.options.autoplay=this.getAutoplayAttribute()}this.box=this.video.parentNode;this.linksFallback=this.getLinksFallback();this.hideLinksFallback();this.each(this.options.playerFallbackOrder,function(g){if(this[g+"Supported"]()){this[g+"Init"]();return true}});this.activateElement(this,"player");this.activateElement(this.box,"box")},behaviors:{},newBehavior:function(e,f,g){this.behaviors[e]=f;this.extend(g)},activateElement:function(e,f){if(typeof e=="string"){e=a.getElementById(e)}this.behaviors[f].call(this,e)},errors:[],warnings:[],warning:function(e){this.warnings.push(e);this.log(e)},history:[],log:function(f){if(!f){return}if(typeof f=="string"){f={type:f}}if(f.type){this.history.push(f.type)}if(this.history.length>=50){this.history.shift()}try{console.log(f.type)}catch(g){try{opera.postError(f.type)}catch(g){}}},setLocalStorage:function(f,g){if(!localStorage){return}try{localStorage[f]=g}catch(h){if(h.code==22||h.code==1014){this.warning(b.warnings.localStorageFull)}}},getPreloadAttribute:function(){if(typeof this.video.hasAttribute=="function"&&this.video.hasAttribute("preload")){var e=this.video.getAttribute("preload");if(e===""||e==="true"){return"auto"}if(e==="false"){return"none"}return e}},getAutoplayAttribute:function(){if(typeof this.video.hasAttribute=="function"&&this.video.hasAttribute("autoplay")){var e=this.video.getAttribute("autoplay");if(e==="false"){return false}return true}},bufferedPercent:function(){return(this.duration())?this.buffered()[1]/this.duration():0},each:function(e,h){if(!e||e.length===0){return}for(var g=0,f=e.length;g<f;g++){if(h.call(this,e[g],g)){break}}},extend:function(f){for(var e in f){if(f.hasOwnProperty(e)){this[e]=f[e]}}}});b.player=b.prototype;b.player.extend({flashSupported:function(){if(!this.flashElement){this.flashElement=this.getFlashElement()}if(this.flashElement&&this.flashPlayerVersionSupported()){return true}else{return false}},flashInit:function(){this.replaceWithFlash();this.element=this.flashElement;this.video.src="";var e=b.flashPlayers[this.options.flashPlayer];this.extend(b.flashPlayers[this.options.flashPlayer].api);(e.init.context(this))()},getFlashElement:function(){var g=this.video.children;for(var f=0,e=g.length;f<e;f++){if(g[f].className=="vjs-flash-fallback"){return g[f]}}},replaceWithFlash:function(){if(this.flashElement){this.box.insertBefore(this.flashElement,this.video);this.video.style.display="none"}},flashPlayerVersionSupported:function(){var e=(this.options.flashPlayerVersion)?this.options.flashPlayerVersion:b.flashPlayers[this.options.flashPlayer].flashPlayerVersion;return b.getFlashVersion()>=e}});b.flashPlayers={};b.flashPlayers.htmlObject={flashPlayerVersion:10,init:function(){return true},api:{width:function(e){if(e!==d){this.element.width=e;this.box.style.width=e+"px";this.triggerResizeListeners();return this}return this.element.width},height:function(e){if(e!==d){this.element.height=e;this.box.style.height=e+"px";this.triggerResizeListeners();return this}return this.element.height}}};b.player.extend({linksSupported:function(){return true},linksInit:function(){this.showLinksFallback();this.element=this.video},getLinksFallback:function(){return this.box.getElementsByTagName("P")[0]},hideLinksFallback:function(){if(this.linksFallback){this.linksFallback.style.display="none"}},showLinksFallback:function(){if(this.linksFallback){this.linksFallback.style.display="block"}}});b.merge=function(h,g,f){for(var e in g){if(g.hasOwnProperty(e)&&(!f||!h.hasOwnProperty(e))){h[e]=g[e]}}return h};b.extend=function(e){this.merge(this,e,true)};b.extend({setupAllWhenReady:function(e){b.options=e;b.DOMReady(b.setup)},DOMReady:function(e){b.addToDOMReady(e)},setup:function(g,e){var k=false,j=[],h;if(!g||g=="All"){g=b.getVideoJSTags()}else{if(typeof g!="object"||g.nodeType==1){g=[g];k=true}}for(var f=0;f<g.length;f++){if(typeof g[f]=="string"){h=a.getElementById(g[f])}else{h=g[f]}j.push(new b(h,e))}return(k)?j[0]:j},getVideoJSTags:function(){var g=a.getElementsByTagName("video"),e=[],k;for(var h=0,f=g.length;h<f;h++){k=g[h];if(k.className.indexOf("video-js")!=-1){e.push(k)}}return e},browserSupportsVideo:function(){if(typeof b.videoSupport!="undefined"){return b.videoSupport}b.videoSupport=!!a.createElement("video").canPlayType;return b.videoSupport},getFlashVersion:function(){if(typeof b.flashVersion!="undefined"){return b.flashVersion}var f=0,i;if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]=="object"){i=navigator.plugins["Shockwave Flash"].description;if(i&&!(typeof navigator.mimeTypes!="undefined"&&navigator.mimeTypes["application/x-shockwave-flash"]&&!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)){f=parseInt(i.match(/^.*\s+([^\s]+)\.[^\s]+\s+[^\s]+$/)[1],10)}}else{if(typeof c.ActiveXObject!="undefined"){try{var g=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(g){f=parseInt(g.GetVariable("$version").match(/^[^\s]+\s(\d+)/)[1],10)}}catch(h){}}}b.flashVersion=f;return b.flashVersion},isIE:function(){return !+"\v1"},isIPad:function(){return navigator.userAgent.match(/iPad/i)!==null},isIPhone:function(){return navigator.userAgent.match(/iPhone/i)!==null},isIOS:function(){return b.isIPhone()||b.isIPad()},iOSVersion:function(){var e=navigator.userAgent.match(/OS (\d+)_/i);if(e&&e[1]){return e[1]}},isAndroid:function(){return navigator.userAgent.match(/Android/i)!==null},androidVersion:function(){var e=navigator.userAgent.match(/Android (\d+)\./i);if(e&&e[1]){return e[1]}},warnings:{videoNotReady:"Video is not ready yet (try playing the video first).",localStorageFull:"Local Storage is Full"}});if(b.isIE()){a.createElement("video")}c.VideoJS=c._V_=b;b.player.extend({html5Supported:function(){if(b.browserSupportsVideo()&&this.canPlaySource()){return true}else{return false}},html5Init:function(){videoFLASH=false;this.element=this.video;this.fixPreloading();this.supportProgressEvents();this.volume((localStorage&&localStorage.volume)||this.options.defaultVolume);if(b.isIOS()){this.options.useBuiltInControls=false;this.iOSInterface()}else{if(b.isAndroid()){this.options.useBuiltInControls=false;this.androidInterface()}}if(!this.options.useBuiltInControls){this.video.controls=false;if(this.options.controlsBelow){_V_.addClass(this.box,"vjs-controls-below")}this.activateElement(this.video,"playToggle");this.buildStylesCheckDiv();this.buildAndActivatePoster();this.buildBigPlayButton();this.buildAndActivateSpinner();this.buildAndActivateControlBar();this.loadInterface();this.getSubtitles()}},canPlaySource:function(){if(this.canPlaySourceResult){return this.canPlaySourceResult}var h=this.video.children;for(var g=0,f=h.length;g<f;g++){if(h[g].tagName.toUpperCase()=="SOURCE"){var e=this.video.canPlayType(h[g].type)||this.canPlayExt(h[g].src);if(e=="probably"||e=="maybe"){this.firstPlayableSource=h[g];this.canPlaySourceResult=true;return true}}}this.canPlaySourceResult=false;return false},canPlayExt:function(g){if(!g){return""}var e=g.match(/\.([^\.]+)$/);if(e&&e[1]){var f=e[1].toLowerCase();if(b.isAndroid()){if(f=="mp4"||f=="m4v"){return"maybe"}}else{if(b.isIOS()){if(f=="m3u8"){return"maybe"}}}}return""},forceTheSource:function(){this.video.src=this.firstPlayableSource.src;this.video.load()},fixPreloading:function(){if(typeof this.video.hasAttribute=="function"&&this.video.hasAttribute("preload")&&this.video.preload!="none"){this.video.autobuffer=true}else{this.video.autobuffer=false;this.video.preload="none"}},supportProgressEvents:function(f){_V_.addListener(this.video,"progress",this.playerOnVideoProgress.context(this))},playerOnVideoProgress:function(e){this.setBufferedFromProgress(e)},setBufferedFromProgress:function(f){if(f.total>0){var e=(f.loaded/f.total)*this.duration();if(e>this.values.bufferEnd){this.values.bufferEnd=e}}},iOSInterface:function(){if(b.iOSVersion()<4){this.forceTheSource()}if(b.isIPad()){this.buildAndActivateSpinner()}},androidInterface:function(){this.forceTheSource();_V_.addListener(this.video,"click",function(){this.play()});this.buildBigPlayButton();_V_.addListener(this.bigPlayButton,"click",function(){this.play()}.context(this));this.positionBox();this.showBigPlayButtons()},loadInterface:function(){if(!this.stylesHaveLoaded()){if(!this.positionRetries){this.positionRetries=1}if(this.positionRetries++<100){setTimeout(this.loadInterface.context(this),10);return}}this.hideStylesCheckDiv();this.showPoster();if(this.video.paused!==false){this.showBigPlayButtons()}if(this.options.controlsAtStart){this.showControlBars()}this.positionAll()},buildAndActivateControlBar:function(){this.controls=_V_.createElement("div",{className:"vjs-controls"});this.box.appendChild(this.controls);this.activateElement(this.controls,"controlBar");this.activateElement(this.controls,"mouseOverVideoReporter");this.playControl=_V_.createElement("div",{className:"vjs-play-control",innerHTML:"<span></span>"});this.controls.appendChild(this.playControl);this.activateElement(this.playControl,"playToggle");this.progressControl=_V_.createElement("div",{className:"vjs-progress-control"});this.controls.appendChild(this.progressControl);this.progressHolder=_V_.createElement("div",{className:"vjs-progress-holder"});this.progressControl.appendChild(this.progressHolder);this.activateElement(this.progressHolder,"currentTimeScrubber");this.loadProgressBar=_V_.createElement("div",{className:"vjs-load-progress"});this.progressHolder.appendChild(this.loadProgressBar);this.activateElement(this.loadProgressBar,"loadProgressBar");this.playProgressBar=_V_.createElement("div",{className:"vjs-play-progress"});this.progressHolder.appendChild(this.playProgressBar);this.activateElement(this.playProgressBar,"playProgressBar");this.timeControl=_V_.createElement("div",{className:"vjs-time-control"});this.controls.appendChild(this.timeControl);this.currentTimeDisplay=_V_.createElement("span",{className:"vjs-current-time-display",innerHTML:"00:00"});this.timeControl.appendChild(this.currentTimeDisplay);this.activateElement(this.currentTimeDisplay,"currentTimeDisplay");this.timeSeparator=_V_.createElement("span",{innerHTML:" / "});this.timeControl.appendChild(this.timeSeparator);this.durationDisplay=_V_.createElement("span",{className:"vjs-duration-display",innerHTML:"00:00"});this.timeControl.appendChild(this.durationDisplay);this.activateElement(this.durationDisplay,"durationDisplay");this.volumeControl=_V_.createElement("div",{className:"vjs-volume-control",innerHTML:"<div><span></span><span></span><span></span><span></span><span></span><span></span></div>"});this.controls.appendChild(this.volumeControl);this.activateElement(this.volumeControl,"volumeScrubber");this.volumeDisplay=this.volumeControl.children[0];this.activateElement(this.volumeDisplay,"volumeDisplay");this.fullscreenControl=_V_.createElement("div",{className:"vjs-fullscreen-control",innerHTML:"<div><span></span><span></span><span></span><span></span></div>"});this.controls.appendChild(this.fullscreenControl);this.activateElement(this.fullscreenControl,"fullscreenToggle")},buildAndActivatePoster:function(){this.updatePosterSource();if(this.video.poster){this.poster=a.createElement("img");this.box.appendChild(this.poster);this.poster.src=this.video.poster;this.poster.className="vjs-poster";this.activateElement(this.poster,"poster")}else{this.poster=false}},buildBigPlayButton:function(){this.bigPlayButton=_V_.createElement("div",{className:"vjs-big-play-button",innerHTML:"<span></span>"});this.box.appendChild(this.bigPlayButton);this.activateElement(this.bigPlayButton,"bigPlayButton")},buildAndActivateSpinner:function(){this.spinner=_V_.createElement("div",{className:"vjs-spinner",innerHTML:"<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>"});this.box.appendChild(this.spinner);this.activateElement(this.spinner,"spinner")},buildStylesCheckDiv:function(){this.stylesCheckDiv=_V_.createElement("div",{className:"vjs-styles-check"});this.stylesCheckDiv.style.position="absolute";this.box.appendChild(this.stylesCheckDiv)},hideStylesCheckDiv:function(){this.stylesCheckDiv.style.display="none"},stylesHaveLoaded:function(){if(this.stylesCheckDiv.offsetHeight!=5){return false}else{return true}},positionAll:function(){this.positionBox();this.positionControlBars();this.positionPoster()},positionBox:function(){if(this.videoIsFullScreen){this.box.style.width="";this.element.style.height="";if(this.options.controlsBelow){this.box.style.height="";this.element.style.height=(this.box.offsetHeight-this.controls.offsetHeight)+"px"}}else{this.box.style.width=this.width()+"px";this.element.style.height=this.height()+"px";if(this.options.controlsBelow){this.element.style.height=""}}},getSubtitles:function(){var f=this.video.getElementsByTagName("TRACK");for(var g=0,e=f.length;g<e;g++){if(f[g].getAttribute("kind")=="subtitles"&&f[g].getAttribute("src")){this.subtitlesSource=f[g].getAttribute("src");this.loadSubtitles();this.buildSubtitles()}}},loadSubtitles:function(){_V_.get(this.subtitlesSource,this.parseSubtitles.context(this))},parseSubtitles:function(g){var f=g.split("\n"),e="",k,m,n;this.subtitles=[];this.currentSubtitle=false;this.lastSubtitleIndex=0;for(var l=0;l<f.length;l++){e=_V_.trim(f[l]);if(e){k={id:e,index:this.subtitles.length};e=_V_.trim(f[++l]);m=e.split(" --> ");k.start=this.parseSubtitleTime(m[0]);k.end=this.parseSubtitleTime(m[1]);n=[];for(var h=l;h<f.length;h++){e=_V_.trim(f[++l]);if(!e){break}n.push(e)}k.text=n.join("<br/>");this.subtitles.push(k)}}},parseSubtitleTime:function(e){var g=e.split(":"),f=0;f+=parseFloat(g[0])*60*60;f+=parseFloat(g[1])*60;var h=g[2].split(/\.|,/);f+=parseFloat(h[0]);ms=parseFloat(h[1]);if(ms){f+=ms/1000}return f},buildSubtitles:function(){this.subtitlesDisplay=_V_.createElement("div",{className:"vjs-subtitles"});this.box.appendChild(this.subtitlesDisplay);this.activateElement(this.subtitlesDisplay,"subtitlesDisplay")},addVideoListener:function(f,e){_V_.addListener(this.video,f,e.rEvtContext(this))},play:function(){this.video.play();return this},onPlay:function(e){this.addVideoListener("play",e);return this},pause:function(){this.video.pause();return this},onPause:function(e){this.addVideoListener("pause",e);return this},paused:function(){return this.video.paused},currentTime:function(g){if(g!==d){try{this.video.currentTime=g}catch(f){this.warning(b.warnings.videoNotReady)}this.values.currentTime=g;return this}return this.video.currentTime},onCurrentTimeUpdate:function(e){this.currentTimeListeners.push(e)},duration:function(){return this.video.duration},buffered:function(){if(this.values.bufferStart===d){this.values.bufferStart=0;this.values.bufferEnd=0}if(this.video.buffered&&this.video.buffered.length>0){var e=this.video.buffered.end(0);if(e>this.values.bufferEnd){this.values.bufferEnd=e}}return[this.values.bufferStart,this.values.bufferEnd]},volume:function(e){if(e!==d){this.values.volume=Math.max(0,Math.min(1,parseFloat(e)));this.video.volume=this.values.volume;this.setLocalStorage("volume",this.values.volume);return this}if(this.values.volume){return this.values.volume}return this.video.volume},onVolumeChange:function(e){_V_.addListener(this.video,"volumechange",e.rEvtContext(this))},width:function(e){if(e!==d){this.video.width=e;this.box.style.width=e+"px";this.triggerResizeListeners();return this}return this.video.offsetWidth},height:function(e){if(e!==d){this.video.height=e;this.box.style.height=e+"px";this.triggerResizeListeners();return this}return this.video.offsetHeight},supportsFullScreen:function(){if(typeof this.video.webkitEnterFullScreen=="function"){if(!navigator.userAgent.match("Chrome")&&!navigator.userAgent.match("Mac OS X 10.5")){return true}}return false},html5EnterNativeFullScreen:function(){try{this.video.webkitEnterFullScreen()}catch(f){if(f.code==11){this.warning(b.warnings.videoNotReady)}}return this},enterFullScreen:function(){if(this.supportsFullScreen()){this.html5EnterNativeFullScreen()}else{this.enterFullWindow()}},exitFullScreen:function(){if(this.supportsFullScreen()){}else{this.exitFullWindow()}},enterFullWindow:function(){this.videoIsFullScreen=true;this.docOrigOverflow=a.documentElement.style.overflow;_V_.addListener(a,"keydown",this.fullscreenOnEscKey.rEvtContext(this));_V_.addListener(c,"resize",this.fullscreenOnWindowResize.rEvtContext(this));a.documentElement.style.overflow="hidden";_V_.addClass(this.box,"vjs-fullscreen");this.positionAll()},exitFullWindow:function(){this.videoIsFullScreen=false;a.removeEventListener("keydown",this.fullscreenOnEscKey,false);c.removeEventListener("resize",this.fullscreenOnWindowResize,false);a.documentElement.style.overflow=this.docOrigOverflow;_V_.removeClass(this.box,"vjs-fullscreen");this.positionAll()},onError:function(e){this.addVideoListener("error",e);return this},onEnded:function(e){this.addVideoListener("ended",e);return this}});b.player.newBehavior("player",function(e){this.onError(this.playerOnVideoError);this.onPlay(this.playerOnVideoPlay);this.onPlay(this.trackCurrentTime);this.onPause(this.playerOnVideoPause);this.onPause(this.stopTrackingCurrentTime);this.onEnded(this.playerOnVideoEnded);this.trackBuffered();this.onBufferedUpdate(this.isBufferFull)},{playerOnVideoError:function(e){this.log(e);this.log(this.video.error)},playerOnVideoPlay:function(e){this.hasPlayed=true},playerOnVideoPause:function(e){},playerOnVideoEnded:function(e){this.currentTime(0);this.pause()},trackBuffered:function(){this.bufferedInterval=setInterval(this.triggerBufferedListeners.context(this),500)},stopTrackingBuffered:function(){clearInterval(this.bufferedInterval)},bufferedListeners:[],onBufferedUpdate:function(e){this.bufferedListeners.push(e)},triggerBufferedListeners:function(){this.isBufferFull();this.each(this.bufferedListeners,function(e){(e.context(this))()})},isBufferFull:function(){if(this.bufferedPercent()==1){this.stopTrackingBuffered()}},trackCurrentTime:function(){if(this.currentTimeInterval){clearInterval(this.currentTimeInterval)}this.currentTimeInterval=setInterval(this.triggerCurrentTimeListeners.context(this),100);this.trackingCurrentTime=true},stopTrackingCurrentTime:function(){clearInterval(this.currentTimeInterval);this.trackingCurrentTime=false},currentTimeListeners:[],triggerCurrentTimeListeners:function(e,f){this.each(this.currentTimeListeners,function(g){(g.context(this))(f||this.currentTime())})},resizeListeners:[],onResize:function(e){this.resizeListeners.push(e)},triggerResizeListeners:function(){this.each(this.resizeListeners,function(e){(e.context(this))()})}});b.player.newBehavior("mouseOverVideoReporter",function(e){_V_.addListener(e,"mousemove",this.mouseOverVideoReporterOnMouseMove.context(this));_V_.addListener(e,"mouseout",this.mouseOverVideoReporterOnMouseOut.context(this))},{mouseOverVideoReporterOnMouseMove:function(){this.showControlBars();clearInterval(this.mouseMoveTimeout);this.mouseMoveTimeout=setTimeout(this.hideControlBars.context(this),4000)},mouseOverVideoReporterOnMouseOut:function(f){var e=f.relatedTarget;while(e&&e!==this.box){e=e.parentNode}if(e!==this.box){this.hideControlBars()}}});b.player.newBehavior("box",function(e){this.positionBox();_V_.addClass(e,"vjs-paused");this.activateElement(e,"mouseOverVideoReporter");this.onPlay(this.boxOnVideoPlay);this.onPause(this.boxOnVideoPause)},{boxOnVideoPlay:function(){_V_.removeClass(this.box,"vjs-paused");_V_.addClass(this.box,"vjs-playing")},boxOnVideoPause:function(){_V_.removeClass(this.box,"vjs-playing");_V_.addClass(this.box,"vjs-paused")}});b.player.newBehavior("poster",function(e){this.activateElement(e,"mouseOverVideoReporter");this.activateElement(e,"playButton");this.onEnded(this.showPoster);this.onResize(this.positionPoster)},{showPoster:function(){if(!this.poster){return}this.poster.style.display="block";this.positionPoster();$("video img").show()},positionPoster:function(){if(!this.poster||this.poster.style.display=="none"){return}this.poster.style.height=this.height()+"px";this.poster.style.width=this.width()+"px"},hidePoster:function(){},updatePosterSource:function(){if(!this.video.poster){var e=this.video.getElementsByTagName("img");if(e.length>0){this.video.poster=e[0].src}}}});b.player.newBehavior("controlBar",function(e){if(!this.controlBars){this.controlBars=[];this.onResize(this.positionControlBars)}this.controlBars.push(e);_V_.addListener(e,"mousemove",this.onControlBarsMouseMove.context(this));_V_.addListener(e,"mouseout",this.onControlBarsMouseOut.context(this))},{showControlBars:function(){if(!this.options.controlsAtStart&&!this.hasPlayed){return}this.each(this.controlBars,function(e){e.style.display="block"})},positionControlBars:function(){this.updatePlayProgressBars();this.updateLoadProgressBars()},hideControlBars:function(){if(this.options.controlsHiding&&!this.mouseIsOverControls){this.each(this.controlBars,function(e){e.style.display="none"})}},onControlBarsMouseMove:function(){this.mouseIsOverControls=true},onControlBarsMouseOut:function(e){this.mouseIsOverControls=false}});b.player.newBehavior("playToggle",function(e){if(!this.elements.playToggles){this.elements.playToggles=[];this.onPlay(this.playTogglesOnPlay);this.onPause(this.playTogglesOnPause)}this.elements.playToggles.push(e);_V_.addListener(e,"click",this.onPlayToggleClick.context(this))},{onPlayToggleClick:function(e){if(this.paused()){this.play()}else{this.pause()}},playTogglesOnPlay:function(e){this.each(this.elements.playToggles,function(f){_V_.removeClass(f,"vjs-paused");_V_.addClass(f,"vjs-playing")})},playTogglesOnPause:function(e){this.each(this.elements.playToggles,function(f){_V_.removeClass(f,"vjs-playing");_V_.addClass(f,"vjs-paused")})}});b.player.newBehavior("playButton",function(e){_V_.addListener(e,"click",this.onPlayButtonClick.context(this))},{onPlayButtonClick:function(e){this.play()}});b.player.newBehavior("pauseButton",function(e){_V_.addListener(e,"click",this.onPauseButtonClick.context(this))},{onPauseButtonClick:function(e){this.pause()}});b.player.newBehavior("playProgressBar",function(e){if(!this.playProgressBars){this.playProgressBars=[];this.onCurrentTimeUpdate(this.updatePlayProgressBars)}this.playProgressBars.push(e)},{updatePlayProgressBars:function(f){var e=(f!==d)?f/this.duration():this.currentTime()/this.duration();if(isNaN(e)){e=0}this.each(this.playProgressBars,function(g){if(g.style){g.style.width=_V_.round(e*100,2)+"%"}})}});b.player.newBehavior("loadProgressBar",function(e){if(!this.loadProgressBars){this.loadProgressBars=[]}this.loadProgressBars.push(e);this.onBufferedUpdate(this.updateLoadProgressBars)},{updateLoadProgressBars:function(){this.each(this.loadProgressBars,function(e){if(e.style){e.style.width=_V_.round(this.bufferedPercent()*100,2)+"%"}})}});b.player.newBehavior("currentTimeDisplay",function(e){if(!this.currentTimeDisplays){this.currentTimeDisplays=[];this.onCurrentTimeUpdate(this.updateCurrentTimeDisplays)}this.currentTimeDisplays.push(e)},{updateCurrentTimeDisplays:function(e){if(!this.currentTimeDisplays){return}var f=(e)?e:this.currentTime();this.each(this.currentTimeDisplays,function(g){g.innerHTML=_V_.formatTime(f)})}});b.player.newBehavior("durationDisplay",function(e){if(!this.durationDisplays){this.durationDisplays=[];this.onCurrentTimeUpdate(this.updateDurationDisplays)}this.durationDisplays.push(e)},{updateDurationDisplays:function(){if(!this.durationDisplays){return}this.each(this.durationDisplays,function(e){if(this.duration()){e.innerHTML=_V_.formatTime(this.duration())}})}});b.player.newBehavior("currentTimeScrubber",function(e){_V_.addListener(e,"mousedown",this.onCurrentTimeScrubberMouseDown.rEvtContext(this))},{onCurrentTimeScrubberMouseDown:function(e,f){e.preventDefault();this.currentScrubber=f;this.stopTrackingCurrentTime();this.videoWasPlaying=!this.paused();this.pause();_V_.blockTextSelection();this.setCurrentTimeWithScrubber(e);_V_.addListener(a,"mousemove",this.onCurrentTimeScrubberMouseMove.rEvtContext(this));_V_.addListener(a,"mouseup",this.onCurrentTimeScrubberMouseUp.rEvtContext(this))},onCurrentTimeScrubberMouseMove:function(e){this.setCurrentTimeWithScrubber(e)},onCurrentTimeScrubberMouseUp:function(e){_V_.unblockTextSelection();a.removeEventListener("mousemove",this.onCurrentTimeScrubberMouseMove,false);a.removeEventListener("mouseup",this.onCurrentTimeScrubberMouseUp,false);if(this.videoWasPlaying){this.play();this.trackCurrentTime()}},setCurrentTimeWithScrubber:function(f){var g=_V_.getRelativePosition(f.pageX,this.currentScrubber);var e=g*this.duration();this.triggerCurrentTimeListeners(0,e);if(e==this.duration()){e=e-0.1}this.currentTime(e)}});b.player.newBehavior("volumeDisplay",function(e){if(!this.volumeDisplays){this.volumeDisplays=[];this.onVolumeChange(this.updateVolumeDisplays)}this.volumeDisplays.push(e);this.updateVolumeDisplay(e)},{updateVolumeDisplays:function(){if(!this.volumeDisplays){return}this.each(this.volumeDisplays,function(e){this.updateVolumeDisplay(e)})},updateVolumeDisplay:function(f){var e=Math.ceil(this.volume()*6);this.each(f.children,function(h,g){if(g<e){_V_.addClass(h,"vjs-volume-level-on")}else{_V_.removeClass(h,"vjs-volume-level-on")}})}});b.player.newBehavior("volumeScrubber",function(e){_V_.addListener(e,"mousedown",this.onVolumeScrubberMouseDown.rEvtContext(this))},{onVolumeScrubberMouseDown:function(e,f){_V_.blockTextSelection();this.currentScrubber=f;this.setVolumeWithScrubber(e);_V_.addListener(a,"mousemove",this.onVolumeScrubberMouseMove.rEvtContext(this));_V_.addListener(a,"mouseup",this.onVolumeScrubberMouseUp.rEvtContext(this))},onVolumeScrubberMouseMove:function(e){this.setVolumeWithScrubber(e)},onVolumeScrubberMouseUp:function(e){this.setVolumeWithScrubber(e);_V_.unblockTextSelection();a.removeEventListener("mousemove",this.onVolumeScrubberMouseMove,false);a.removeEventListener("mouseup",this.onVolumeScrubberMouseUp,false)},setVolumeWithScrubber:function(e){var f=_V_.getRelativePosition(e.pageX,this.currentScrubber);this.volume(f)}});b.player.newBehavior("fullscreenToggle",function(e){_V_.addListener(e,"click",this.onFullscreenToggleClick.context(this))},{onFullscreenToggleClick:function(e){if(!this.videoIsFullScreen){this.enterFullScreen()}else{this.exitFullScreen()}},fullscreenOnWindowResize:function(e){this.positionControlBars()},fullscreenOnEscKey:function(e){if(e.keyCode==27){this.exitFullScreen()}}});b.player.newBehavior("bigPlayButton",function(e){if(!this.elements.bigPlayButtons){this.elements.bigPlayButtons=[];this.onPlay(this.bigPlayButtonsOnPlay);this.onEnded(this.bigPlayButtonsOnEnded)}this.elements.bigPlayButtons.push(e);this.activateElement(e,"playButton")},{bigPlayButtonsOnPlay:function(e){this.hideBigPlayButtons()},bigPlayButtonsOnEnded:function(e){this.showBigPlayButtons()},showBigPlayButtons:function(){this.each(this.elements.bigPlayButtons,function(e){e.style.display="block"})},hideBigPlayButtons:function(){this.each(this.elements.bigPlayButtons,function(e){e.style.display="none"})}});b.player.newBehavior("spinner",function(e){if(!this.spinners){this.spinners=[];_V_.addListener(this.video,"loadeddata",this.spinnersOnVideoLoadedData.context(this));_V_.addListener(this.video,"loadstart",this.spinnersOnVideoLoadStart.context(this));_V_.addListener(this.video,"seeking",this.spinnersOnVideoSeeking.context(this));_V_.addListener(this.video,"seeked",this.spinnersOnVideoSeeked.context(this));_V_.addListener(this.video,"canplay",this.spinnersOnVideoCanPlay.context(this));_V_.addListener(this.video,"canplaythrough",this.spinnersOnVideoCanPlayThrough.context(this));_V_.addListener(this.video,"waiting",this.spinnersOnVideoWaiting.context(this));_V_.addListener(this.video,"stalled",this.spinnersOnVideoStalled.context(this));_V_.addListener(this.video,"suspend",this.spinnersOnVideoSuspend.context(this));_V_.addListener(this.video,"playing",this.spinnersOnVideoPlaying.context(this));_V_.addListener(this.video,"timeupdate",this.spinnersOnVideoTimeUpdate.context(this))}this.spinners.push(e)},{showSpinners:function(){this.each(this.spinners,function(e){e.style.display="block"});clearInterval(this.spinnerInterval);this.spinnerInterval=setInterval(this.rotateSpinners.context(this),100)},hideSpinners:function(){this.each(this.spinners,function(e){e.style.display="none"});clearInterval(this.spinnerInterval)},spinnersRotated:0,rotateSpinners:function(){this.each(this.spinners,function(e){e.style.WebkitTransform="scale(0.5) rotate("+this.spinnersRotated+"deg)";e.style.MozTransform="scale(0.5) rotate("+this.spinnersRotated+"deg)"});if(this.spinnersRotated==360){this.spinnersRotated=0}this.spinnersRotated+=45},spinnersOnVideoLoadedData:function(e){this.hideSpinners()},spinnersOnVideoLoadStart:function(e){this.showSpinners()},spinnersOnVideoSeeking:function(e){},spinnersOnVideoSeeked:function(e){},spinnersOnVideoCanPlay:function(e){},spinnersOnVideoCanPlayThrough:function(e){this.hideSpinners()},spinnersOnVideoWaiting:function(e){this.showSpinners()},spinnersOnVideoStalled:function(e){},spinnersOnVideoSuspend:function(e){},spinnersOnVideoPlaying:function(e){this.hideSpinners()},spinnersOnVideoTimeUpdate:function(e){if(this.spinner.style.display=="block"){this.hideSpinners()}}});b.player.newBehavior("subtitlesDisplay",function(e){if(!this.subtitleDisplays){this.subtitleDisplays=[];this.onCurrentTimeUpdate(this.subtitleDisplaysOnVideoTimeUpdate);this.onEnded(function(){this.lastSubtitleIndex=0}.context(this))}this.subtitleDisplays.push(e)},{subtitleDisplaysOnVideoTimeUpdate:function(h){if(this.subtitles){if(!this.currentSubtitle||this.currentSubtitle.start>=h||this.currentSubtitle.end<h){var g=false,e=(this.subtitles[this.lastSubtitleIndex].start>h),f=this.lastSubtitleIndex-(e)?1:0;while(true){if(e){if(f<0||this.subtitles[f].end<h){break}if(this.subtitles[f].start<h){g=f;break}f--}else{if(f>=this.subtitles.length||this.subtitles[f].start>h){break}if(this.subtitles[f].end>h){g=f;break}f++}}if(g!==false){this.currentSubtitle=this.subtitles[g];this.lastSubtitleIndex=g;this.updateSubtitleDisplays(this.currentSubtitle.text)}else{if(this.currentSubtitle){this.currentSubtitle=false;this.updateSubtitleDisplays("")}}}}},updateSubtitleDisplays:function(e){this.each(this.subtitleDisplays,function(f){f.innerHTML=e})}});b.extend({addClass:function(e,f){if((" "+e.className+" ").indexOf(" "+f+" ")==-1){e.className=e.className===""?f:e.className+" "+f}},removeClass:function(f,e){if(f.className.indexOf(e)==-1){return}var g=f.className.split(/\s+/);g.splice(g.lastIndexOf(e),1);f.className=g.join(" ")},createElement:function(f,e){return this.merge(a.createElement(f),e)},blockTextSelection:function(){a.body.focus();a.onselectstart=function(){return false}},unblockTextSelection:function(){a.onselectstart=function(){return true}},formatTime:function(f){var g=Math.round(f);var e=Math.floor(g/60);e=(e>=10)?e:"0"+e;g=Math.floor(g%60);g=(g>=10)?g:"0"+g;return e+":"+g},getRelativePosition:function(f,e){return Math.max(0,Math.min(1,(f-this.findPosX(e))/e.offsetWidth))},findPosX:function(e){var f=e.offsetLeft;while(e=e.offsetParent){f+=e.offsetLeft}return f},getComputedStyleValue:function(e,f){return c.getComputedStyle(e,null).getPropertyValue(f)},round:function(e,f){if(!f){f=0}return Math.round(e*Math.pow(10,f))/Math.pow(10,f)},addListener:function(e,g,f){if(e.addEventListener){e.addEventListener(g,f,false)}else{if(e.attachEvent){e.attachEvent("on"+g,f)}}},removeListener:function(e,g,f){if(e.removeEventListener){e.removeEventListener(g,f,false)}else{if(e.attachEvent){e.detachEvent("on"+g,f)}}},get:function(e,g){if(typeof XMLHttpRequest=="undefined"){XMLHttpRequest=function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(j){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(i){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(h){}throw new Error("This browser does not support XMLHttpRequest.")}}var f=new XMLHttpRequest();f.open("GET",e);f.onreadystatechange=function(){if(f.readyState==4&&f.status==200){g(f.responseText)}}.context(this);f.send()},trim:function(e){return e.toString().replace(/^\s+/,"").replace(/\s+$/,"")},bindDOMReady:function(){if(a.readyState==="complete"){return b.onDOMReady()}if(a.addEventListener){a.addEventListener("DOMContentLoaded",b.DOMContentLoaded,false);c.addEventListener("load",b.onDOMReady,false)}else{if(a.attachEvent){a.attachEvent("onreadystatechange",b.DOMContentLoaded);c.attachEvent("onload",b.onDOMReady)}}},DOMContentLoaded:function(){if(a.addEventListener){a.removeEventListener("DOMContentLoaded",b.DOMContentLoaded,false);b.onDOMReady()}else{if(a.attachEvent){if(a.readyState==="complete"){a.detachEvent("onreadystatechange",b.DOMContentLoaded);b.onDOMReady()}}}},DOMReadyList:[],addToDOMReady:function(e){if(b.DOMIsReady){e.call(a)}else{b.DOMReadyList.push(e)}},DOMIsReady:false,onDOMReady:function(){if(b.DOMIsReady){return}if(!a.body){return setTimeout(b.onDOMReady,13)}b.DOMIsReady=true;if(b.DOMReadyList){for(var e=0;e<b.DOMReadyList.length;e++){b.DOMReadyList[e].call(a)}b.DOMReadyList=null}}});b.bindDOMReady();Function.prototype.context=function(f){var g=this,e=function(){return g.apply(f,arguments)};return e};Function.prototype.evtContext=function(f){var g=this,e=function(){var h=this;return g.call(f,arguments[0],h)};return e};Function.prototype.rEvtContext=function(g,e){if(this.hasContext===true){return this}if(!e){e=g}for(var f in e){if(e[f]==this){e[f]=this.evtContext(g);e[f].hasContext=true;return e[f]}}return this.evtContext(g)};if(c.jQuery){(function(e){e.fn.VideoJS=function(f){this.each(function(){b.setup(this,f)});return this};e.fn.player=function(){return this[0].player}})(jQuery)}c.VideoJS=c._V_=b})(window);jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});var isTouchGLOBAL;(function(){function j(n,l){var o=this,m;o.element=typeof n=="object"?n:document.getElementById(n);o.wrapper=o.element.parentNode;o.element.style.webkitTransitionProperty="-webkit-transform";o.element.style.webkitTransitionTimingFunction="cubic-bezier(0,0,0.25,1)";o.element.style.webkitTransitionDuration="0";o.element.style.webkitTransform=h+"0,0"+b;o.options={bounce:d,momentum:d,checkDOMChanges:true,topOnDOMChanges:false,hScrollbar:d,vScrollbar:d,fadeScrollbar:g||!a,shrinkScrollbar:g||!a,desktopCompatibility:false,overflow:"hidden",snap:false,bounceLock:false,scrollbarColor:"rgba(0,0,0,0.5)",onScrollEnd:function(){}};if(typeof l=="object"){for(m in l){o.options[m]=l[m]}}if(o.options.desktopCompatibility){o.options.overflow="hidden"}o.onScrollEnd=o.options.onScrollEnd;delete o.options.onScrollEnd;o.wrapper.style.overflow=o.options.overflow;o.refresh();window.addEventListener("onorientationchange" in window?"orientationchange":"resize",o,false);if(a||o.options.desktopCompatibility){o.element.addEventListener(f,o,false);o.element.addEventListener(i,o,false);o.element.addEventListener(e,o,false)}if(o.options.checkDOMChanges){o.element.addEventListener("DOMSubtreeModified",o,false)}}j.prototype={x:0,y:0,enabled:true,handleEvent:function(m){var l=this;switch(m.type){case f:l.touchStart(m);break;case i:l.touchMove(m);break;case e:l.touchEnd(m);break;case"webkitTransitionEnd":l.transitionEnd();break;case"orientationchange":case"resize":l.refresh();break;case"DOMSubtreeModified":l.onDOMModified(m);break}},onDOMModified:function(m){var l=this;if(m.target.parentNode!=l.element){return}setTimeout(function(){l.refresh()},0);if(l.options.topOnDOMChanges&&(l.x!=0||l.y!=0)){l.scrollTo(0,0,"0")}},refresh:function(){var m=this,o=m.x,n=m.y,l;m.scrollWidth=m.wrapper.clientWidth;m.scrollHeight=m.wrapper.clientHeight;m.scrollerWidth=m.element.offsetWidth;m.scrollerHeight=m.element.offsetHeight;m.maxScrollX=m.scrollWidth-m.scrollerWidth;m.maxScrollY=m.scrollHeight-m.scrollerHeight;m.directionX=0;m.directionY=0;if(m.scrollX){if(m.maxScrollX>=0){o=0}else{if(m.x<m.maxScrollX){o=m.maxScrollX}}}if(m.scrollY){if(m.maxScrollY>=0){n=0}else{if(m.y<m.maxScrollY){n=m.maxScrollY}}}if(m.options.snap){m.maxPageX=-Math.floor(m.maxScrollX/m.scrollWidth);m.maxPageY=-Math.floor(m.maxScrollY/m.scrollHeight);l=m.snap(o,n);o=l.x;n=l.y}if(o!=m.x||n!=m.y){m.setTransitionTime("0");m.setPosition(o,n,true)}m.scrollX=m.scrollerWidth>m.scrollWidth;m.scrollY=!m.options.bounceLock&&!m.scrollX||m.scrollerHeight>m.scrollHeight;if(m.options.hScrollbar&&m.scrollX){m.scrollBarX=m.scrollBarX||new k("horizontal",m.wrapper,m.options.fadeScrollbar,m.options.shrinkScrollbar,m.options.scrollbarColor);m.scrollBarX.init(m.scrollWidth,m.scrollerWidth)}else{if(m.scrollBarX){m.scrollBarX=m.scrollBarX.remove()}}if(m.options.vScrollbar&&m.scrollY&&m.scrollerHeight>m.scrollHeight){m.scrollBarY=m.scrollBarY||new k("vertical",m.wrapper,m.options.fadeScrollbar,m.options.shrinkScrollbar,m.options.scrollbarColor);m.scrollBarY.init(m.scrollHeight,m.scrollerHeight)}else{if(m.scrollBarY){m.scrollBarY=m.scrollBarY.remove()}}},setPosition:function(l,o,n){var m=this;m.x=l;m.y=o;m.element.style.webkitTransform=h+m.x+"px,"+m.y+"px"+b;if(!n){if(m.scrollBarX){m.scrollBarX.setPosition(m.x)}if(m.scrollBarY){m.scrollBarY.setPosition(m.y)}}},setTransitionTime:function(m){var l=this;m=m||"0";l.element.style.webkitTransitionDuration=m;if(l.scrollBarX){l.scrollBarX.bar.style.webkitTransitionDuration=m;l.scrollBarX.wrapper.style.webkitTransitionDuration=d&&l.options.fadeScrollbar?"300ms":"0"}if(l.scrollBarY){l.scrollBarY.bar.style.webkitTransitionDuration=m;l.scrollBarY.wrapper.style.webkitTransitionDuration=d&&l.options.fadeScrollbar?"300ms":"0"}},touchStart:function(n){var m=this,l;if(!m.enabled){return}n.preventDefault();n.stopPropagation();m.scrolling=true;m.moved=false;m.distX=0;m.distY=0;m.setTransitionTime("0");if(m.options.momentum||m.options.snap){l=new WebKitCSSMatrix(window.getComputedStyle(m.element).webkitTransform);if(l.e!=m.x||l.f!=m.y){document.removeEventListener("webkitTransitionEnd",m,false);m.setPosition(l.e,l.f);m.moved=true}}m.touchStartX=a?n.changedTouches[0].pageX:n.pageX;m.scrollStartX=m.x;m.touchStartY=a?n.changedTouches[0].pageY:n.pageY;m.scrollStartY=m.y;m.scrollStartTime=n.timeStamp;m.directionX=0;m.directionY=0},touchMove:function(r){if(!this.scrolling){return}var p=this,o=a?r.changedTouches[0].pageX:r.pageX,n=a?r.changedTouches[0].pageY:r.pageY,m=p.scrollX?o-p.touchStartX:0,l=p.scrollY?n-p.touchStartY:0,s=p.x+m,q=p.y+l;r.stopPropagation();p.touchStartX=o;p.touchStartY=n;if(s>=0||s<p.maxScrollX){s=p.options.bounce?Math.round(p.x+m/3):(s>=0||p.maxScrollX>=0)?0:p.maxScrollX}if(q>=0||q<p.maxScrollY){q=p.options.bounce?Math.round(p.y+l/3):(q>=0||p.maxScrollY>=0)?0:p.maxScrollY}if(p.distX+p.distY>5){if(p.distX-3>p.distY){q=p.y;l=0}else{if(p.distY-3>p.distX){s=p.x;m=0}}p.setPosition(s,q);p.moved=true;p.directionX=m>0?-1:1;p.directionY=l>0?-1:1}else{p.distX+=Math.abs(m);p.distY+=Math.abs(l)}},touchEnd:function(t){if(!this.scrolling){return}var s=this,o=t.timeStamp-s.scrollStartTime,w=a?t.changedTouches[0]:t,u,v,n,l,m=0,r=s.x,q=s.y,p;s.scrolling=false;if(!s.moved){s.resetPosition();if(a){u=w.target;while(u.nodeType!=1){u=u.parentNode}v=document.createEvent("MouseEvents");v.initMouseEvent("click",true,true,t.view,1,w.screenX,w.screenY,w.clientX,w.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,0,null);v._fake=true;u.dispatchEvent(v)}return}if(!s.options.snap&&o>250){s.resetPosition();return}if(s.options.momentum){n=s.scrollX===true?s.momentum(s.x-s.scrollStartX,o,s.options.bounce?-s.x+s.scrollWidth/5:-s.x,s.options.bounce?s.x+s.scrollerWidth-s.scrollWidth+s.scrollWidth/5:s.x+s.scrollerWidth-s.scrollWidth):{dist:0,time:0};l=s.scrollY===true?s.momentum(s.y-s.scrollStartY,o,s.options.bounce?-s.y+s.scrollHeight/5:-s.y,s.options.bounce?(s.maxScrollY<0?s.y+s.scrollerHeight-s.scrollHeight:0)+s.scrollHeight/5:s.y+s.scrollerHeight-s.scrollHeight):{dist:0,time:0};m=Math.max(Math.max(n.time,l.time),1);r=s.x+n.dist;q=s.y+l.dist}if(s.options.snap){p=s.snap(r,q);r=p.x;q=p.y;m=Math.max(p.time,m)}s.scrollTo(r,q,m+"ms")},transitionEnd:function(){var l=this;document.removeEventListener("webkitTransitionEnd",l,false);l.resetPosition()},resetPosition:function(){var l=this,n=l.x,m=l.y;if(l.x>=0){n=0}else{if(l.x<l.maxScrollX){n=l.maxScrollX}}if(l.y>=0||l.maxScrollY>0){m=0}else{if(l.y<l.maxScrollY){m=l.maxScrollY}}if(n!=l.x||m!=l.y){l.scrollTo(n,m)}else{if(l.moved){l.onScrollEnd();l.moved=false}if(l.scrollBarX){l.scrollBarX.hide()}if(l.scrollBarY){l.scrollBarY.hide()}}},snap:function(l,o){var m=this,n;if(m.directionX>0){l=Math.floor(l/m.scrollWidth)}else{if(m.directionX<0){l=Math.ceil(l/m.scrollWidth)}else{l=Math.round(l/m.scrollWidth)}}m.pageX=-l;l=l*m.scrollWidth;if(l>0){l=m.pageX=0}else{if(l<m.maxScrollX){m.pageX=m.maxPageX;l=m.maxScrollX}}if(m.directionY>0){o=Math.floor(o/m.scrollHeight)}else{if(m.directionY<0){o=Math.ceil(o/m.scrollHeight)}else{o=Math.round(o/m.scrollHeight)}}m.pageY=-o;o=o*m.scrollHeight;if(o>0){o=m.pageY=0}else{if(o<m.maxScrollY){m.pageY=m.maxPageY;o=m.maxScrollY}}n=Math.round(Math.max(Math.abs(m.x-l)/m.scrollWidth*500,Math.abs(m.y-o)/m.scrollHeight*500));return{x:l,y:o,time:n}},scrollTo:function(m,l,o){var n=this;if(n.x==m&&n.y==l){n.resetPosition();return}n.moved=true;n.setTransitionTime(o||"350ms");n.setPosition(m,l);if(o==="0"||o=="0s"||o=="0ms"){n.resetPosition()}else{document.addEventListener("webkitTransitionEnd",n,false)}},scrollToPage:function(n,m,p){var o=this,l;if(!o.options.snap){o.pageX=-Math.round(o.x/o.scrollWidth);o.pageY=-Math.round(o.y/o.scrollHeight)}if(n=="next"){n=++o.pageX}else{if(n=="prev"){n=--o.pageX}}if(m=="next"){m=++o.pageY}else{if(m=="prev"){m=--o.pageY}}n=-n*o.scrollWidth;m=-m*o.scrollHeight;l=o.snap(n,m);n=l.x;m=l.y;o.scrollTo(n,m,p||"500ms")},scrollToElement:function(m,o){m=typeof m=="object"?m:this.element.querySelector(m);if(!m){return}var n=this,l=n.scrollX?-m.offsetLeft:0,p=n.scrollY?-m.offsetTop:0;if(l>=0){l=0}else{if(l<n.maxScrollX){l=n.maxScrollX}}if(p>=0){p=0}else{if(p<n.maxScrollY){p=n.maxScrollY}}n.scrollTo(l,p,o)},momentum:function(s,m,q,l){var p=2.5,r=1.2,n=Math.abs(s)/m*1000,o=n*n/p/1000,t=0;if(s>0&&o>q){n=n*q/o/p;o=q}else{if(s<0&&o>l){n=n*l/o/p;o=l}}o=o*(s<0?-1:1);t=n/r;return{dist:Math.round(o),time:Math.round(t)}},destroy:function(l){var m=this;window.removeEventListener("onorientationchange" in window?"orientationchange":"resize",m,false);m.element.removeEventListener(f,m,false);m.element.removeEventListener(i,m,false);m.element.removeEventListener(e,m,false);document.removeEventListener("webkitTransitionEnd",m,false);if(m.options.checkDOMChanges){m.element.removeEventListener("DOMSubtreeModified",m,false)}if(m.scrollBarX){m.scrollBarX=m.scrollBarX.remove()}if(m.scrollBarY){m.scrollBarY=m.scrollBarY.remove()}if(l){m.wrapper.parentNode.removeChild(m.wrapper)}return null}};function k(m,r,q,n,l){var o=this,p=document;o.dir=m;o.fade=q;o.shrink=n;o.uid=++c;o.bar=p.createElement("div");o.bar.style.cssText="position:absolute;top:0;left:0;-webkit-transition-timing-function:cubic-bezier(0,0,0.25,1);pointer-events:none;-webkit-transition-duration:0;-webkit-transition-delay:0;-webkit-transition-property:-webkit-transform;z-index:10;background:"+l+";-webkit-transform:"+h+"0,0"+b+";"+(m=="horizontal"?"-webkit-border-radius:3px 2px;min-width:6px;min-height:5px":"-webkit-border-radius:2px 3px;min-width:5px;min-height:6px");o.wrapper=p.createElement("div");o.wrapper.style.cssText="-webkit-mask:-webkit-canvas(scrollbar"+o.uid+o.dir+");position:absolute;z-index:10;pointer-events:none;overflow:hidden;opacity:0;-webkit-transition-duration:"+(q?"300ms":"0")+";-webkit-transition-delay:0;-webkit-transition-property:opacity;"+(o.dir=="horizontal"?"bottom:2px;left:2px;right:7px;height:5px":"top:2px;right:2px;bottom:7px;width:5px;");o.wrapper.appendChild(o.bar);r.appendChild(o.wrapper)}k.prototype={init:function(l,n){var o=this,q=document,p=Math.PI,m;if(o.dir=="horizontal"){if(o.maxSize!=o.wrapper.offsetWidth){o.maxSize=o.wrapper.offsetWidth;m=q.getCSSCanvasContext("2d","scrollbar"+o.uid+o.dir,o.maxSize,5);m.fillStyle="rgb(0,0,0)";m.beginPath();m.arc(2.5,2.5,2.5,p/2,-p/2,false);m.lineTo(o.maxSize-2.5,0);m.arc(o.maxSize-2.5,2.5,2.5,-p/2,p/2,false);m.closePath();m.fill()}}else{if(o.maxSize!=o.wrapper.offsetHeight){o.maxSize=o.wrapper.offsetHeight;m=q.getCSSCanvasContext("2d","scrollbar"+o.uid+o.dir,5,o.maxSize);m.fillStyle="rgb(0,0,0)";m.beginPath();m.arc(2.5,2.5,2.5,p,0,false);m.lineTo(5,o.maxSize-2.5);m.arc(2.5,o.maxSize-2.5,2.5,0,p,false);m.closePath();m.fill()}}o.size=Math.max(Math.round(o.maxSize*o.maxSize/n),6);o.maxScroll=o.maxSize-o.size;o.toWrapperProp=o.maxScroll/(l-n);o.bar.style[o.dir=="horizontal"?"width":"height"]=o.size+"px"},setPosition:function(m){var l=this;if(l.wrapper.style.opacity!="1"){l.show()}m=Math.round(l.toWrapperProp*m);if(m<0){m=l.shrink?m+m*3:0;if(l.size+m<7){m=-l.size+6}}else{if(m>l.maxScroll){m=l.shrink?m+(m-l.maxScroll)*3:l.maxScroll;if(l.size+l.maxScroll-m<7){m=l.size+l.maxScroll-6}}}m=l.dir=="horizontal"?h+m+"px,0"+b:h+"0,"+m+"px"+b;l.bar.style.webkitTransform=m},show:function(){if(d){this.wrapper.style.webkitTransitionDelay="0"}this.wrapper.style.opacity="1"},hide:function(){if(d){this.wrapper.style.webkitTransitionDelay="350ms"}this.wrapper.style.opacity="0"},remove:function(){this.wrapper.parentNode.removeChild(this.wrapper);return null}};var d=("WebKitCSSMatrix" in window&&"m11" in new WebKitCSSMatrix()),g=(/iphone|ipad/gi).test(navigator.appVersion),a=("ontouchstart" in window),f=a?"touchstart":"mousedown",i=a?"touchmove":"mousemove",e=a?"touchend":"mouseup",h="translate"+(d?"3d(":"("),b=d?",0)":")",c=0;isTouchGLOBAL=("ontouchstart" in window);window.iScroll=j})();(function(a){a.fn.bxSlider=function(t){var G={mode:"horizontal",infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,easing:"swing",pager:false,pagerSelector:null,pagerTabs:false,pagerType:"full",pagerLocation:"bottom",pagerShortSeparator:"/",pagerActiveClass:"pager-active",nextText:"next",nextImage:"",nextSelector:null,prevText:"prev",prevImage:"",prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:"next",autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,autoDelay:0,pause:3000,startText:"<span>autoplay</span> off",startImage:"",stopText:"<span>autoplay</span> on",stopImage:"",ticker:false,tickerSpeed:5000,tickerDirection:"next",tickerHover:false,wrapperClass:"bx-wrapper",startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null};var t=a.extend(G,t);var n=this;var j="";var y="";var O="";var x="";var C="";var b="";var T="";var l="";var Y="";var H="";var e="";var ab="";var K="";var S="";var Z="";var M=true;var z=false;var u=0;var L=0;var r=0;var aa=0;var w=0;var p=0;var s=0;var Q=0;var g=0;var X=false;var P=0;var v=O.length-1;this.goToSlide=function(ac,ad){if(!X){if(videoison){nbclm.hero.hideVideo()}X=true;r=ac;t.onBeforeSlide(r,O.length,O.eq(r));if(typeof(ad)=="undefined"){var ad=true}if(ad){if(t.auto){n.stopShow(true)}}slide=ac;if(slide==P){t.onFirstSlide(r,O.length,O.eq(r))}if(slide==v){t.onLastSlide(r,O.length,O.eq(r))}if(t.mode=="horizontal"){j.animate({left:"-"+B(slide,"left")+"px"},t.speed,t.easing,function(){X=false;t.onAfterSlide(r,O.length,O.eq(r))})}else{if(t.mode=="vertical"){j.animate({top:"-"+B(slide,"top")+"px"},t.speed,t.easing,function(){X=false;t.onAfterSlide(r,O.length,O.eq(r))})}else{if(t.mode=="fade"){A()}}}d();if(t.moveSlideQty>1){ac=Math.floor(ac/t.moveSlideQty)}I(ac);U()}};this.goToNextSlide=function(af){if(typeof(af)=="undefined"){var af=true}if(af){if(t.auto){n.stopShow(true)}}if(!t.infiniteLoop){if(!X){var ac=false;r=(r+(t.moveSlideQty));if(r<=v){d();t.onNextSlide(r,O.length,O.eq(r));n.goToSlide(r)}else{r-=t.moveSlideQty}}}else{if(!X){X=true;var ac=false;r=(r+t.moveSlideQty);if(r>v){r=r%O.length;ac=true}t.onNextSlide(r,O.length,O.eq(r));t.onBeforeSlide(r,O.length,O.eq(r));if(t.mode=="horizontal"){var ad=(t.moveSlideQty*T);j.animate({left:"-="+ad+"px"},t.speed,t.easing,function(){X=false;if(ac){j.css("left","-"+B(r,"left")+"px")}t.onAfterSlide(r,O.length,O.eq(r))})}else{if(t.mode=="vertical"){var ae=(t.moveSlideQty*L);j.animate({top:"-="+ae+"px"},t.speed,t.easing,function(){X=false;if(ac){j.css("top","-"+B(r,"top")+"px")}t.onAfterSlide(r,O.length,O.eq(r))})}else{if(t.mode=="fade"){A()}}}if(t.moveSlideQty>1){I(Math.ceil(r/t.moveSlideQty))}else{I(r)}U()}}};this.goToPreviousSlide=function(af){if(typeof(af)=="undefined"){var af=true}if(af){if(t.auto){n.stopShow(true)}}if(!t.infiniteLoop){if(!X){var ac=false;r=r-t.moveSlideQty;if(r<0){r=0;if(t.hideControlOnEnd){a(".bx-prev",x).hide()}}d();t.onPrevSlide(r,O.length,O.eq(r));n.goToSlide(r)}}else{if(!X){X=true;var ac=false;r=(r-(t.moveSlideQty));if(r<0){negativeOffset=(r%O.length);if(negativeOffset==0){r=0}else{r=(O.length)+negativeOffset}ac=true}t.onPrevSlide(r,O.length,O.eq(r));t.onBeforeSlide(r,O.length,O.eq(r));if(t.mode=="horizontal"){var ad=(t.moveSlideQty*T);j.animate({left:"+="+ad+"px"},t.speed,t.easing,function(){X=false;if(ac){j.css("left","-"+B(r,"left")+"px")}t.onAfterSlide(r,O.length,O.eq(r))})}else{if(t.mode=="vertical"){var ae=(t.moveSlideQty*L);j.animate({top:"+="+ae+"px"},t.speed,t.easing,function(){X=false;if(ac){j.css("top","-"+B(r,"top")+"px")}t.onAfterSlide(r,O.length,O.eq(r))})}else{if(t.mode=="fade"){A()}}}if(t.moveSlideQty>1){I(Math.ceil(r/t.moveSlideQty))}else{I(r)}U()}}};this.goToFirstSlide=function(ac){if(typeof(ac)=="undefined"){var ac=true}n.goToSlide(P,ac)};this.goToLastSlide=function(){if(typeof(ac)=="undefined"){var ac=true}n.goToSlide(v,ac)};this.getCurrentSlide=function(){return r};this.getSlideCount=function(){return O.length};this.stopShow=function(ac){clearInterval(e);if(typeof(ac)=="undefined"){var ac=true}if(ac&&t.autoControls){ab.html(S).removeClass("stop").addClass("start");M=false}};this.startShow=function(ac){if(typeof(ac)=="undefined"){var ac=true}m();if(ac&&t.autoControls){ab.html(Z).removeClass("start").addClass("stop");M=true}};this.stopTicker=function(ac){j.stop();if(typeof(ac)=="undefined"){var ac=true}if(ac&&t.ticker){ab.html(S).removeClass("stop").addClass("start");M=false}};this.startTicker=function(ac){if(t.mode=="horizontal"){if(t.tickerDirection=="next"){var ae=parseInt(j.css("left"));var ag=(p+ae)+O.eq(0).width()}else{if(t.tickerDirection=="prev"){var ae=-parseInt(j.css("left"));var ag=(ae)-O.eq(0).width()}}var af=(ag*t.tickerSpeed)/p;F(Q,ag,af)}else{if(t.mode=="vertical"){if(t.tickerDirection=="next"){var ad=parseInt(j.css("top"));var ag=(s+ad)+O.eq(0).height()}else{if(t.tickerDirection=="prev"){var ad=-parseInt(j.css("top"));var ag=(ad)-O.eq(0).height()}}var af=(ag*t.tickerSpeed)/s;F(g,ag,af);if(typeof(ac)=="undefined"){var ac=true}if(ac&&t.ticker){ab.html(Z).removeClass("start").addClass("stop");M=true}}}};this.initShow=function(){j=a(this);y=j.clone();O=j.children();x="";C=j.children(":first");b=C.width();u=0;T=C.outerWidth();L=0;l=f();Y=V();X=false;H="";r=0;aa=0;w=0;e="";ab="";K="";S="";Z="";M=true;z=false;p=0;s=0;Q=0;g=0;P=0;v=O.length-1;O.each(function(ad){if(a(this).outerHeight()>L){L=a(this).outerHeight()}if(a(this).outerWidth()>u){u=a(this).outerWidth()}});if(t.randomStart){var ac=Math.floor(Math.random()*O.length);r=ac;aa=T*(t.moveSlideQty+ac);w=L*(t.moveSlideQty+ac)}else{r=t.startingSlide;aa=T*(t.moveSlideQty+t.startingSlide);w=L*(t.moveSlideQty+t.startingSlide)}o();if(t.pager&&!t.ticker){if(t.pagerType=="full"){J("full")}else{if(t.pagerType=="short"){J("short")}}}if(t.controls&&!t.ticker){i()}if(t.auto||t.ticker){if(t.autoControls){q()}if(t.autoStart){setTimeout(function(){n.startShow(true)},t.autoDelay)}else{n.stopShow(true)}if(t.autoHover&&!t.ticker){E()}}if(t.moveSlideQty>1){I(Math.ceil(r/t.moveSlideQty))}else{I(r)}d();if(t.captions){U()}t.onAfterSlide(r,O.length,O.eq(r))};this.destroyShow=function(){clearInterval(e);a(".bx-next, .bx-prev, .bx-pager, .bx-auto",x).remove();j.unwrap().unwrap().removeAttr("style");j.children().removeAttr("style").not(".pager").remove();O.removeClass("pager")};this.reloadShow=function(){n.destroyShow();n.initShow()};function o(){R(t.startingSlide);if(t.mode=="horizontal"){j.wrap('<div class="'+t.wrapperClass+'" style="width:'+l+'px; position:relative;"></div>').wrap('<div class="bx-window" style="position:relative; overflow:hidden; width:'+l+'px;"></div>').css({width:"99999px",position:"relative",left:"-"+(aa)+"px"});j.children().css({width:b,"float":"left",listStyle:"none"});x=j.parent().parent();O.addClass("pager")}else{if(t.mode=="vertical"){j.wrap('<div class="'+t.wrapperClass+'" style="width:'+u+'px; position:relative;"></div>').wrap('<div class="bx-window" style="width:'+u+"px; height:"+Y+'px; position:relative; overflow:hidden;"></div>').css({height:"99999px",position:"relative",top:"-"+(w)+"px"});j.children().css({listStyle:"none",height:L});x=j.parent().parent();O.addClass("pager")}else{if(t.mode=="fade"){j.wrap('<div class="'+t.wrapperClass+'" style="width:'+u+'px; position:relative;"></div>').wrap('<div class="bx-window" style="height:'+L+"px; width:"+u+'px; position:relative; overflow:hidden;"></div>');j.children().css({listStyle:"none",position:"absolute",top:0,left:0,zIndex:98});x=j.parent().parent();O.not(":eq("+r+")").fadeTo(0,0);O.eq(r).css("zIndex",99)}}}if(t.captions&&t.captionsSelector==null){x.append('<div class="bx-captions"></div>')}}function R(){if(t.mode=="horizontal"||t.mode=="vertical"){var af=N(O,0,t.moveSlideQty,"backward");a.each(af,function(ah){j.prepend(a(this))});var ae=(O.length+t.moveSlideQty)-1;var ad=O.length-t.displaySlideQty;var ac=ae-ad;var ag=N(O,0,ac,"forward");if(t.infiniteLoop){a.each(ag,function(ah){j.append(a(this))})}}}function i(){if(t.nextImage!=""){nextContent=t.nextImage;nextType="image"}else{nextContent=t.nextText;nextType="text"}if(t.prevImage!=""){prevContent=t.prevImage;prevType="image"}else{prevContent=t.prevText;prevType="text"}h(nextType,nextContent,prevType,prevContent)}function m(){if(t.auto){if(!t.infiniteLoop){if(t.autoDirection=="next"){e=setInterval(function(){r+=t.moveSlideQty;if(r>v){r=r%O.length}n.goToSlide(r,false)},t.pause)}else{if(t.autoDirection=="prev"){e=setInterval(function(){r-=t.moveSlideQty;if(r<0){negativeOffset=(r%O.length);if(negativeOffset==0){r=0}else{r=(O.length)+negativeOffset}}n.goToSlide(r,false)},t.pause)}}}else{if(t.autoDirection=="next"){e=setInterval(function(){n.goToNextSlide(false)},t.pause)}else{if(t.autoDirection=="prev"){e=setInterval(function(){n.goToPreviousSlide(false)},t.pause)}}}}else{if(t.ticker){t.tickerSpeed*=10;a(".pager",x).each(function(ac){p+=a(this).width();s+=a(this).height()});if(t.tickerDirection=="prev"&&t.mode=="horizontal"){j.css("left","-"+(p+aa)+"px")}else{if(t.tickerDirection=="prev"&&t.mode=="vertical"){j.css("top","-"+(s+w)+"px")}}if(t.mode=="horizontal"){Q=parseInt(j.css("left"));F(Q,p,t.tickerSpeed)}else{if(t.mode=="vertical"){g=parseInt(j.css("top"));F(g,s,t.tickerSpeed)}}if(t.tickerHover){k()}}}}function F(ad,ae,ac){if(t.mode=="horizontal"){if(t.tickerDirection=="next"){j.animate({left:"-="+ae+"px"},ac,"linear",function(){j.css("left",ad);F(ad,p,t.tickerSpeed)})}else{if(t.tickerDirection=="prev"){j.animate({left:"+="+ae+"px"},ac,"linear",function(){j.css("left",ad);F(ad,p,t.tickerSpeed)})}}}else{if(t.mode=="vertical"){if(t.tickerDirection=="next"){j.animate({top:"-="+ae+"px"},ac,"linear",function(){j.css("top",ad);F(ad,s,t.tickerSpeed)})}else{if(t.tickerDirection=="prev"){j.animate({top:"+="+ae+"px"},ac,"linear",function(){j.css("top",ad);F(ad,s,t.tickerSpeed)})}}}}}function q(){if(t.startImage!=""){startContent=t.startImage;startType="image"}else{startContent=t.startText;startType="text"}if(t.stopImage!=""){stopContent=t.stopImage;stopType="image"}else{stopContent=t.stopText;stopType="text"}c(startType,startContent,stopType,stopContent)}function E(){x.find(".bx-window").hover(function(){if(M){n.stopShow(false)}},function(){if(M){n.startShow(false)}})}function k(){j.hover(function(){if(M){n.stopTicker(false)}},function(){if(M){n.startTicker(false)}})}function A(){O.not(":eq("+r+")").fadeTo(t.speed,0).css("zIndex",98);O.eq(r).css("zIndex",99).fadeTo(t.speed,1,function(){X=false;t.onAfterSlide(r,O.length,O.eq(r))})}function I(ac){if(t.pagerType=="full"&&t.pager){a("a",H).removeClass(t.pagerActiveClass);a("a",H).eq(ac).addClass(t.pagerActiveClass)}else{if(t.pagerType=="short"&&t.pager){a(".bx-pager-current",H).html(r+1)}}}function h(ah,ag,ac,ad){var ae=a('<a href="" class="bx-next"></a>');var af=a('<a href="" class="bx-prev"></a>');if(ah=="text"){ae.html(ag)}else{ae.html('<img src="'+ag+'" />')}if(ac=="text"){af.html(ad)}else{af.html('<img src="'+ad+'" />')}if(t.prevSelector){a(t.prevSelector).append(af)}else{x.append(af)}if(t.nextSelector){a(t.nextSelector).append(ae)}else{x.append(ae)}ae.click(function(){n.goToNextSlide();return false});af.click(function(){n.goToPreviousSlide();return false})}function J(af){var ae=O.length;if(t.moveSlideQty>1){if(O.length%t.moveSlideQty!=0){ae=Math.ceil(O.length/t.moveSlideQty)}else{ae=O.length/t.moveSlideQty}}var ag="";if(t.buildPager){for(var ac=0;ac<ae;ac++){ag+=t.buildPager(ac,O.eq(ac*t.moveSlideQty))}}else{if(af=="full"){for(var ac=1;ac<=ae;ac++){if(t.pagerTabs){title=a(".hero .asset ul li:eq("+(ac)+") img").attr("data-tab")}else{title=ac}ag+='<a href="" class="pager-link pager-'+ac+'"><span>'+title+"</span></a>"}}else{if(af=="short"){ag='<span class="bx-pager-current">'+(t.startingSlide+1)+"</span> "+t.pagerShortSeparator+' <span class="bx-pager-total">'+O.length+"<span>"}}}if(t.pagerSelector){a(t.pagerSelector).append(ag);H=a(t.pagerSelector)}else{var ad=a('<div class="bx-pager"></div>');ad.append(ag);if(t.pagerLocation=="top"){x.prepend(ad)}else{if(t.pagerLocation=="bottom"){x.append(ad)}}H=a(".bx-pager",x)}H.children().click(function(){if(isTouchGLOBAL&&H.hasClass("bxSlider-pager")){myScroll.scrollToPage(H.children().index(this),400)}else{if(t.pagerType=="full"){var ah=H.children().index(this);if(t.moveSlideQty>1){ah*=t.moveSlideQty;ah+=1}n.goToSlide(ah)}}return false})}function U(){var ac=a("img",O.eq(r)).attr("title");if(ac!=""){if(t.captionsSelector){a(t.captionsSelector).html(ac)}else{a(".bx-captions",x).html(ac)}}else{if(t.captionsSelector){a(t.captionsSelector).html("&nbsp;")}else{a(".bx-captions",x).html("&nbsp;")}}}function c(ad,ae,ac,af){ab=a('<a href="" class="bx-start"></a>');if(ad=="text"){S=ae}else{S='<img src="'+ae+'" />'}if(ac=="text"){Z=af}else{Z='<img src="'+af+'" />'}if(t.autoControlsSelector){a(t.autoControlsSelector).append(ab)}else{x.append('<div class="bx-auto"></div>');a(".bx-auto",x).html(ab)}ab.click(function(){if(t.ticker){if(a(this).hasClass("stop")){n.stopTicker()}else{if(a(this).hasClass("start")){n.startTicker()}}}else{if(a(this).hasClass("stop")){n.stopShow(true)}else{if(a(this).hasClass("start")){n.startShow(true)}}}return false})}function d(){if(!t.infiniteLoop&&t.hideControlOnEnd){if(r==P){a(".bx-prev",x).hide()}else{a(".bx-prev",x).show()}if(r==v){a(".bx-next",x).hide()}else{a(".bx-next",x).show()}}}function B(ae,ad){if(ad=="left"){var ac=a(".pager",x).eq(ae).position().left}else{if(ad=="top"){var ac=a(".pager",x).eq(ae).position().top}}return ac}function f(){var ac=C.outerWidth()*t.displaySlideQty;return ac}function V(){var ac=C.outerHeight()*t.displaySlideQty;return ac}function N(ai,ah,af,ag){var ae=[];var ad=af;var ac=false;if(ag=="backward"){ai=a.makeArray(ai);ai.reverse()}while(ad>0){a.each(ai,function(aj,ak){if(ad>0){if(!ac){if(aj==ah){ac=true;ae.push(a(this).clone());ad--}}else{ae.push(a(this).clone());ad--}}else{return false}})}return ae}this.each(function(){n.initShow()});return this}})(jQuery);var agent=navigator.userAgent.toLowerCase();var iphone=(agent.indexOf("iphone")!=-1||agent.indexOf("ipad")!=-1);var KEYCODE_ESC=27,videoison=false,sliding=false;currPANEL="",CURRENTSLIDE=0,TAGLIST="";var videoFLASH=true;var allexpanded=false;var PRELOADER="";var PAGEidx=0,perpage=10,lazyPGCount=1,FEEDURL="",FEATUREDSLIDER="";if(typeof window.nbclm=="undefined"){var nbclm=window.Nbclm||{};nbclm.version=0.01;nbclm.utils={};nbclm.mainFeature={};nbclm.opportunities={};nbclm.hero={}}nbclm.utils={init:function(){$(".filter-types li").live("click",function(){if($(".filter-type",this).get(0)){$(".filter-types li").removeClass("on");$(this).addClass("on");if($(".filter-type",this).get(0)){nbclm.opportunities.togglePanel($(".filter-type",this).attr("data-filter"))}}});if($(".hero").get(0)&&$(".asset ul li",".hero").size()>0){nbclm.hero.init()}if($(".bxSlider").get(0)&&$(".content ul li",".bxSlider").size()>0){nbclm.utils.bxSlider();if(isTouchGLOBAL){loaded($(".bxSlider .content .bx-wrapper .bx-window ul").get(0))}}$(".expand .content").hide();$(".expand hgroup *, .expand hgroup").live("click",function(){$(this).parents(".expand").children(".content").toggle("blind",250,function(){$(this).parents(".expand").toggleClass("expanded")});if($(".expand-all").get(0)){if(!$(".expand-all").hasClass("collapse-all")){if($(".expand .content").size()==($(".expanded .content").size()+1)){$(".expand-all").addClass("collapse-all");allexpanded=true}}else{if($(".expanded .content").size()==1){$(".expand-all").removeClass("collapse-all");allexpanded=false}}}});if($(".platforms .platform .content .topic .thumbs").get(0)&&$.browser.msie){$(".platforms .platform .content .topic .thumbs").each(function(){$("li:nth-child(4n)",this).addClass("nthChild4")})}if($("#contact-list .list>li").get(0)&&$.browser.msie){$("#contact-list .list>li:nth-child(2n)").addClass("nthChild2")}if($(".expand-all").get(0)){$(".expand-all").click(function(c){c.preventDefault();if(!allexpanded){$(".expand").each(function(){var d=this;if(!$(this).hasClass("expanded")){$(this).children(".content").toggle("blind",250,function(){$(d).toggleClass("expanded")})}});allexpanded=true}else{$(".expanded").each(function(){var d=this;$(this).children(".content").toggle("blind",250,function(){$(d).toggleClass("expanded")})});allexpanded=false}$(this).toggleClass("collapse-all")})}nbclm.utils.prettyForms();if($(".circle.big span").get(0)){BIGCIRC=$(".circle.big span label").html().substring(0,2);SMALLCIRC=$(".circle.small span label").html().substring(0,2);NEWCIRCVAL=Math.ceil(SMALLCIRC/BIGCIRC*(100));if(SMALLCIRC>BIGCIRC){NEWCIRCVAL=Math.ceil(BIGCIRC/SMALLCIRC*(100));$(".circle.small span").css({width:100+"%",height:100+"%",marginLeft:-(($(".circle.big span").width()/2)+5),marginTop:-(($(".circle.big span").height()/2))});$(".circle.big span").css({width:NEWCIRCVAL+"%",height:NEWCIRCVAL+"%",marginLeft:-((NEWCIRCVAL/2)+5),marginTop:-((NEWCIRCVAL/2))})}else{$(".circle.big span").css({marginLeft:-(($(".circle.big span").width()/2)+5),marginTop:-(($(".circle.big span").height()/2))});$(".circle.small span").css({width:NEWCIRCVAL+"%",height:NEWCIRCVAL+"%",marginLeft:-((NEWCIRCVAL/2)+5),marginTop:-((NEWCIRCVAL/2))})}$(".circle label").each(function(){$(this).css({fontSize:$(this).parent("span").width()/3})})}if($(".icons .chart h4 span").get(0)){var b=$(".icons .chart h4 span").html().substring(0,2);if(b>50){$(".icons .chart .graph .bar1").css("width","100%");$(".icons .chart .graph .bar2").css("width",(b-50)*2+"%")}else{$(".icons .chart .graph .bar1").css("width",(b*2)+"%");$(".icons .chart .graph .bar2").css("width","0%")}}if($(".bars .small").get(0)&&$(".bars .big").get(0)){BIGBAR=$(".bars .big span mark").html().substring(0,2);SMALLBAR=$(".bars .small span mark").html().substring(0,2);NEWBARVAL=Math.ceil(SMALLBAR/BIGBAR*(100));$(".bars .small span").css("width",NEWBARVAL+"%")}if($(".visualizers .content .col h3").get(0)){var a=0;$(".visualizers .content .col h3").each(function(){if(a<=$(this).height()){a=$(this).height()}});$(".visualizers .content .col h3").css("height",a)}if($(".cols3 .contact").get(0)){var a=0;$(".cols3 .col").each(function(){if(a<=$(this).height()){a=$(this).height()}});$(".cols3 .contact").css("height",a)}if($("#opp-panels").get(0)&&$("#opp-panels").hasClass("triggerLazy")){killScroll=false;$(window).scroll(function(){if($(window).scrollTop()+150>=($(document).height()-($(window).height()))){if(killScroll==false){killScroll=true;nbclm.opportunities.loadFeed(nbclm.opportunities.buildURL($("form#filters"),true),true)}}})}},heroSlider:function(h,g,e,b,a,f,i,c){var d=$(".asset ul:first",$(".hero")).bxSlider({pager:true,auto:h,easing:g,captionsSelector:"#hero-caption",autoControls:e,autoControlsSelector:"#hero-autoplay",pause:6000,pagerSelector:b,pagerTabs:a,captions:i,infiniteLoop:c,onBeforeSlide:function(){if(videoFLASH){if($(".bx-window .pager:eq("+CURRENTSLIDE+") .video-js-box .vjs-flash-fallback").get(0)){$(".bx-window .pager:eq("+CURRENTSLIDE+") .video-js-box .vjs-flash-fallback").get(0).tellVideo("pause")}}else{if($(".vjs-playing").get(0)){$(".vjs-playing video").get(0).player.pause()}}},onAfterSlide:function(l,k,j){CURRENTSLIDE=l;if(f){nbclm.hero.updateCopy(l)}}});if($(".hero .asset img.video").get(0)){$(".hero .asset img.video").each(function(j){$(this).replaceWith(nbclm.hero.insertVideo(this,j))});VideoJS.setupAllWhenReady({controlsBelow:false,controlsHiding:true,defaultVolume:0.85,flashVersion:9,linksHiding:true})}if($(".asset .bx-wrapper .bx-window ul li.pager",$(".hero")).size()<=1){$("#hero-autoplay a").trigger("click");$("#hero-pager, .autoplay").remove()}},bxSlider:function(){$(".bxSlider").each(function(){FEATUREDSLIDER=$(".content ul:first",this).bxSlider({pager:true,controls:false,easing:"easeInOutExpo",displaySlideQty:3,moveSlideQty:3,infiniteLoop:false,pagerSelector:$("hgroup .pagination ul li.bxSlider-pager",this)})});if($(".bxSlider hgroup nav.pagination .bxSlider-pager a").size()<2){$(".bxSlider hgroup nav.pagination").remove()}},prettyForms:function(){if(!$.browser.opera){$("select.custom-select").each(function(){var a=$(this).attr("title");if($("option:selected",this).val()!=""){a=$("option:selected",this).text()}$(this).css({"z-index":10,opacity:0,"-khtml-appearance":"none"}).after('<span class="custom-select">'+a+"</span>").change(function(){val=$("option:selected",this).text();$(this).next().text(val)})})}$(".checkbox-list>li>ul>li :checkbox:checked, .checkbox-list>li :checkbox:checked, .checkbox-list li :radio:checked").parents("li").addClass("selected");$(".checkbox-list .checkboxes ul li, .checkbox-list>li").click(function(a){if($(this).hasClass("selected")){if($(":radio",this).get(0)){return false}$(this).removeClass("selected");$(this).find(":checkbox").removeAttr("checked")}else{if($(":radio",this).get(0)){$(".checkbox-list:visible>li.selected").removeClass("selected")}$(this).addClass("selected");$(this).find(":checkbox, :radio").attr("checked","true");if($(":radio, :checkbox",this).get(0)&&$("form#filters").get(0)){$("#filters .search").val("")}if($(":radio",this).get(0)){$("#filters").trigger("submit")}}return false});$(".error-list").each(function(){$(this).next("input, textarea").addClass("error")});$("#filters").submit(function(a){a.preventDefault();nbclm.opportunities.submitForm($(this))});$("#filters select").change(function(a){$("#filters").trigger("submit")});$("#itemsperpage").change(function(a){location.href=location.href+"&per_page="+$(this).val()})},startPreloader:function(){animCount=0;PRELOADER=setInterval(function(){$("#preloader .anim span").removeClass("on");if(animCount<=$("#preloader .anim span").size()){$("#preloader .anim span:eq("+animCount+")").addClass("on")}else{animCount=0;$("#preloader .anim span:eq("+animCount+")").addClass("on")}animCount+=1},150)},stopPreloader:function(){if(PRELOADER!=""){window.clearInterval(PRELOADER);PRELOADER=""}},footerCheck:function(){D=$("#mainWrapper").height();W=$(window).height();if(D<W){$("footer").css("height",Math.ceil(W-D)-(30))}}};nbclm.opportunities={togglePanel:function(a){if(a!=currPANEL){nbclm.opportunities.hidePanel();$("."+a,".filters-dropdown").toggle("blind",250,function(){currPANEL=a});$(".filter-types li .filter-type[data-filter='"+a+"']").parent("li").addClass("on")}else{nbclm.opportunities.hidePanel()}},hidePanel:function(a){$(".panel:visible").toggle("blind",250,function(){currPANEL=""});$(".filter-types li.on").removeClass("on")},submitForm:function(a){FEEDURL=nbclm.opportunities.buildURL(a,false);nbclm.opportunities.loadFeed(FEEDURL,false);nbclm.opportunities.hidePanel()},loadFeed:function(a,c){var b=false;if(c){b=true}$.ajax({url:a,beforeSend:function(){if(!b){$("#preloader").css("bottom","auto");$("#preloader").css({top:40+"px"});$("#preloader").css("display","block");nbclm.utils.startPreloader();$("#opp-panels").animate({opacity:"toggle",show:"toggle"},500,function(){})}else{$("#opp-panels").animate({opacity:".5"},500,function(){$("#preloader").css("top","auto");$("#preloader").css({bottom:50});$("#preloader").css("display","block");nbclm.utils.startPreloader()})}},success:function(d){if(!b){nbclm.opportunities.updateNORMAL(d,$("form#filters input:checked[name=MARKET]").val())}else{nbclm.opportunities.updateLAZY(d,$("form#filters input:checked[name=MARKET]").val())}},error:function(){$("#opp-panels").hide().html('<p class="no-results">Error processing request.  Please try again later.</p>');$("#opp-panels").animate({opacity:"toggle",show:"toggle"},250,function(){$("#preloader").css("display","none");nbclm.utils.stopPreloader()});$(".expand-all").addClass("visuallyhidden");allexpanded=false}})},updateNORMAL:function(c,d,b){$(window).unbind("scroll");lazyPGCount=1;$("#current-filters").html(nbclm.opportunities.buildFilteredList(c,d)).fadeIn();$("#curr-market").html($("#filters input.markets[value="+d+"]").attr("data-LABEL"));$(".collapse-all").removeClass("collapse-all");allexpanded=false;var a=nbclm.opportunities.buildOppsList(c,d,false);nbclm.opportunities.defaultDisplay(a);if($(c.response.opportunity.page_data.page_range).size()>1){nbclm.opportunities.lazyInit(c)}$("a.remove-filter").click(function(f){f.preventDefault();if($(this).attr("data-filter")=="tags"){$("#filters .filter-tags-list input:checked").parents("li").removeClass("selected");$("#filters .filter-tags-list input:checked").removeAttr("checked")}if($(this).attr("data-filter")=="timing"){$("#filters .filter-timing-list input").parents("li").addClass("selected");$("#filters .filter-timing-list input").attr("checked","true")}if($(this).attr("data-filter")=="search"){$("#filters input.search").val("")}$("#filters").trigger("submit")})},updateLAZY:function(c,d,b){var a=nbclm.opportunities.buildOppsList(c,d,true);nbclm.opportunities.lazyDisplay(a);if($(c.response.opportunity.page_data.page_range).size()>1){nbclm.opportunities.lazyInit(c)}else{$(window).unbind("scroll");lazyPGCount=1}$("a.remove-filter").click(function(f){f.preventDefault();if($(this).attr("data-filter")=="tags"){$("#filters .filter-tags-list input:checked").parents("li").removeClass("selected");$("#filters .filter-tags-list input:checked").removeAttr("checked")}if($(this).attr("data-filter")=="timing"){$("#filters .filter-timing-list input").parents("li").addClass("selected");$("#filters .filter-timing-list input").attr("checked","true")}if($(this).attr("data-filter")=="search"){$("#filters input.search").val("")}$("#filters").trigger("submit")})},lazyInit:function(a){if(a.response.opportunity.page_data.current_page<a.response.opportunity.page_data.page_count){killScroll=false;$(window).scroll(function(){if($(window).scrollTop()+150>=($(document).height()-($(window).height()))){if(killScroll==false){killScroll=true;nbclm.opportunities.loadFeed(nbclm.opportunities.buildURL($("form#filters"),true),true)}}})}},defaultDisplay:function(a){$("#opp-panels").hide().html(a);$("#opp-panels").animate({opacity:"toggle",show:"toggle"},250,function(){$("#preloader").css("display","none");nbclm.utils.stopPreloader()})},lazyDisplay:function(a){$("#opp-panels").animate({opacity:0.25},150,function(){$("#opp-panels").animate({opacity:1},250,function(){if(!$.browser.msie){$("#opp-panels").append(a)}else{$("#opp-panels").append(innerShiv(a))}$("#current-filters .count span mark").html(Math.ceil(parseInt($("#current-filters .count span mark").html())+$(a).size()));$("#preloader").css("display","none");nbclm.utils.stopPreloader()})})},buildOppsList:function(c,d,a){var b="";if($(c.response.opportunity.object_list,c).size()>0){$(c.response.opportunity.object_list,c).each(function(e){b+='<section class="opportunity expand">';b+='	<hgroup class="clearfix">';b+='		<span class="filter">'+this.date_display+"</span>";b+="		<h2>"+this.title+"</h2>";b+="		<button>Expand</button>";b+="	</hgroup>";b+='	<section class="content">';b+='		<ul class="info clearfix">';b+='			<li class="asset">';if(this.absolute_url!=""||this.absolute_url!="undefined"||this.absolute_url!="None"){b+='			<a href="'+this.absolute_url+'" title="Learn More About '+this.title+'"><img src="'+this.image+'" alt="" /></a></li>'}else{b+='			<img src="'+this.image+'" alt="" /></li>'}b+='			<li class="details clearfix">';b+="				<ul>";b+='					<li class="copy">';b+=this.description;if(this.absolute_url!=""||this.absolute_url!="undefined"||this.absolute_url!="None"){b+=' <a href="'+this.absolute_url+'" title="Learn More About '+this.title+'">Learn More</a>'}b+="					</li>";if(this.show_exact_date&&this.start_date!="undefined"&&this.start_date!=null){b+='<li class="date">';b+='	<span class="label">Date:</span> ';b+=this.exact_date;b+="</li>"}b+='					<li class="markets"><span class="label">Markets:</span> '+nbclm.opportunities.markets(this.markets,$("#filters input.markets[value="+d+"]").attr("data-LABEL"))+"</li>";b+='					<li class="tags">';b+='						<span class="label">Tags:</span> '+nbclm.opportunities.filteredTags(this.categories,this.component,this.platforms,this.price_range)+"</li>";b+="				</ul>";b+="			</li>";b+='			<li class="contact-info">';b+="				<ul>";b+='					<li class="label">Contact</li>';b+='					<li class="name">'+this.contacts[0].first_name+" "+this.contacts[0].last_name+"</li>";b+='					<li class="phone"><span>Phone:</span> '+this.contacts[0].phone+"</li>";b+='					<li class="email"><span>Email:</span> <a href="mailto:'+this.contacts[0].email+"?subject=Inquiry: "+this.title+'" title="Email '+this.contacts[0].first_name+" "+this.contacts[0].last_name+'">'+this.contacts[0].email+"</a></li>";b+="				</ul>";b+="			</li>";b+="		</ul>";b+="	</section>";b+="</section>"});$(".expand-all").removeClass("visuallyhidden")}else{if(!a){if($("#filters input[name=search]").val()!=""){b='<p class="no-results">Sorry, we found <span>0 Results</span> for <mark>&quot;'+$("#filters input.search").val()+"&quot;</mark>. </p>";b+='<p class="no-results-msg">Make sure your spelling is correct or try broadening your keywords.  Please enter another search term and try again.</p>'}else{b='<p class="no-results">Sorry, we found <span>0 Results</span> matching the selected filters.</p>';b+='<p class="no-results-msg">Adjust your filter selection and try again.</p>'}$(".expand-all").addClass("visuallyhidden");allexpanded=false}}return b},buildFilteredList:function(c,d){if($(c.response.opportunity.object_list,c).size()==1){rLabel="Result"}else{rLabel="Results"}var b="";if($("#filters input.search").val()!=""){b+='<ul class="clearfix">';b+='	<li class="market">Market: <mark>'+$("#filters input.markets[value="+d+"]").attr("data-label")+"</mark></li>";b+='	<li class="filtered search"><a href="#" title="Remove Filter" class="remove-filter" data-filter="search">&nbsp;</a> Showing Results for <mark>&quot;'+$("#filters input.search").val()+"&quot;</mark></li>";b+='	<li class="count"><span><mark>'+$(c.response.opportunity.object_list,c).size()+"</mark> "+rLabel+"</span></li>";b+="</ul>"}else{var a=[];if($("#filters .filter-timing-list input:checked").size()<$("#filters .filter-timing-list input").size()){$("#filters .filter-timing-list input:checked").each(function(){a.push($(this).attr("data-label"))})}b+='<ul class="clearfix">';b+='	<li class="market">Market: <mark>'+$("#filters input.markets[value="+d+"]").attr("data-label")+"</mark></li>";if($("#filters .filter-tags-list input:checked").size()>0){if($("#filters .filter-tags-list input:checked").size()==1){tLabel="Tag"}else{tLabel="Tags"}b+='	<li class="filtered tags"><a href="#" title="Remove Filter" class="remove-filter" data-filter="tags">&nbsp;</a> Viewing <mark>'+$("#filters .filter-tags-list input:checked").size()+" "+tLabel+"</mark></li>"}if(a.length>0){b+='	<li class="filtered tags"><a href="#" title="Remove Filter" class="remove-filter" data-filter="timing">&nbsp;</a> Viewing <mark>'+a.join(", ")+" Timing</mark></li>"}b+='	<li class="count"><span><mark>'+$(c.response.opportunity.object_list,c).size()+"</mark> "+rLabel+"</span></li>";b+="</ul>"}return b},filteredTags:function(b,a,e,c){var d="";if(!b.length<1){$.each(b,function(){var f=this;$("form#filters input[name=CATEGORIES]").each(function(){if($(this).val()==f){if($(this).is(":checked")){d+='<span class="filtered-tag">'+$(this).attr("data-LABEL")+"</span>, "}else{d+=$(this).attr("data-LABEL")+", "}}})})}if(!a.length<1){$.each(a,function(){var f=this;$("form#filters input[name=COMPONENT]").each(function(){if($(this).val()==f){if($(this).is(":checked")){d+='<span class="filtered-tag">'+$(this).attr("data-LABEL")+"</span>, "}else{d+=$(this).attr("data-LABEL")+", "}}})})}if(!e.length<1){$.each(e,function(){var f=this;$("form#filters input[name=PLATFORMS]").each(function(){if($(this).val()==f){if($(this).is(":checked")){d+='<span class="filtered-tag">'+$(this).attr("data-LABEL")+"</span>, "}else{d+=$(this).attr("data-LABEL")+", "}}})})}if(!c.length<1){$.each(c,function(){var f=this;$("form#filters input[name=PRICERANGE]").each(function(){if($(this).val()==f){if($(this).is(":checked")){d+='<span class="filtered-tag">'+$(this).attr("data-LABEL")+"</span>, "}else{d+=$(this).attr("data-LABEL")+", "}}})})}return d.substring(0,d.length-2)},markets:function(b,a){MARKET_LIST=[];$.each(b,function(){if(this==a){MARKET_LIST.push('<span class="filtered-tag">'+this+"</span>")}else{MARKET_LIST.push(this)}});return MARKET_LIST.join(", ")},buildURL:function(i,f){if(f){lazyPGCount+=1}else{lazyPGCount=1}var h=[];var j=[];var g=[];var a=[];var e=[];var b=[];$("input:checked",i).each(function(){if($(this).attr("name")=="MARKET"){h.push($(this).val())}if($(this).attr("name")=="PLATFORM"){j.push($(this).val())}if($(this).attr("name")=="CATEGORY"){g.push($(this).val())}if($(this).attr("name")=="COMPONENT"){a.push($(this).val())}if($(this).attr("name")=="PRICE"){e.push($(this).val())}if($(this).attr("name")=="TIMING"){b.push('"'+$(this).val()+'":true')}});if($("input.search",i).val()!=""){var d='/feeds?opportunity={"markets":'+h+',"title.icontains":"'+$("input.search",i).val()+'","description.icontains":"'+$("input.search",i).val()+'", "height":72, "width":215, "per_page":'+perpage+', "page":'+lazyPGCount+"}"}else{var d='/feeds?opportunity={"markets":'+h,c=[],k=[];if(!j.length<1){c.push('"platforms.in":['+j+"]")}if(!g.length<1){c.push('"categories.in":['+g+"]")}if(!a.length<1){c.push('"component.in":['+a+"]")}if(!e.length<1){c.push('"price_range.in":['+e+"]")}if(!b.length<1){k.push(b)}TAGSLIST="";if(!c.length<1){TAGSLIST=", "+c.join(", ")}d+=', "or":{'+k.join(", ")+"}"+TAGSLIST+', "height":72, "width":215, "per_page":'+perpage+', "page":'+lazyPGCount+"}"}return d}};nbclm.hero={init:function(){autoscroll=false;easeAnim="easeInOutExpo";autoControls=false;pagerSelector="#hero-pager";pagerTabs=false;onAfterSlide=false;CAPTIONS=false;loop=false;if($(".hero").hasClass("hero-img-slide-full")){CAPTIONS=true;if($(".asset ul:first li",$(".hero")).size()>1){loop=true}}if($(".asset ul li .info",$(".hero")).size()>0){pagerTabs=true;onAfterSlide=true}if($(".asset .autoplay",$(".hero")).size()>0){autoscroll=true;autoControls=true}nbclm.utils.heroSlider(autoscroll,easeAnim,autoControls,pagerSelector,pagerTabs,onAfterSlide,CAPTIONS,loop);$("img.video").hover(function(){$(this).prev(".vjs-big-play-button").addClass("hover")},function(){$(this).prev(".vjs-big-play-button").removeClass("hover")})},updateCopy:function(a){a+=1;$(".hero .asset-info hgroup h1 .line1").html($(".hero .asset ul li:eq("+a+") .info .title1").text());$(".hero .asset-info hgroup h1 .line2").html($(".hero .asset ul li:eq("+a+") .info .title2").text());$(".hero .asset-info hgroup h3").html($(".hero .asset ul li:eq("+a+") .info .subtitle").text());$(".hero .asset-info p").html($(".hero .asset ul li:eq("+a+") .info .copy").html())},insertVideo:function(c,a){if(!swfobject.hasFlashPlayerVersion("10.0.0")&&!iphone){return'<img src="'+$(c).attr("src")+'" />'}var b="";if(iphone){b='<video id="video_'+a+'" class="video-js" width="632" height="352" preload="auto" poster="'+$(c).attr("src")+'" controls>';b+='	<source src="'+$(c).attr("data-video-url")+'" type=\'video/mp4; codecs="avc1.42E01E, mp4a.40.2"\' />';b+="</video>"}else{b+='	<object id="flash_fallback_'+a+'" class="vjs-flash-fallback" width="632" height="352" type="application/x-shockwave-flash" data="'+MEDIA_URL+'swf/videoplayer.swf">';b+='		<param name="movie" value="'+MEDIA_URL+'swf/videoplayer.swf" />';b+='		<param name="allowfullscreen" value="true" />';b+='		<param name="allowscriptaccess" value="always" />';b+='		<param name="bgcolor" value="#000000" />';b+='		<param name="wmode" value="transparent" />';b+='		<param name="flashvars" value="videoURL='+$(c).attr("data-video-url")+"&posterURL="+$(c).attr("src")+"&colorXML="+MEDIA_URL+"xml/videoColors.xml&location="+MARKETSLUG+'&autoplay=0" />';b+="	</object>"}return'<div class="video-js-box">'+b+"</div>"},stopVideo:function(){}};injectPages=function(){$("body").append('<div id="static-page-menu"></div>');$("#static-page-menu").load("menu.html")};var myScroll;function loaded(a){myScroll=new iScroll(a,{snap:true,momentum:false,hScrollbar:false,vScrollbar:false,onScrollEnd:function(){if(!$(".bxSlider .bxSlider-pager .pager-"+(this.pageX+1)).get(0)){myScroll.scrollToPage(this.pageX-1,10)}else{$(".bxSlider .bxSlider-pager .pager-active").removeClass("pager-active");$(".bxSlider .bxSlider-pager .pager-"+(this.pageX+1)).addClass("pager-active")}}})};
