function clearerrors(n){var t=$(n),i=t.validate(),r=t.find(".field-validation-error span");r.each(function(){i.settings.success($(this))});i.resetForm()}function GetHomeImage(){var n=["EDUCATION2_animation.gif","SUPPORT2_animation.gif","TREATMENT2_animation.gif"],t=["A man learns about AndroGel via his tablet while drinking a beverage.","An AndroGel patient calls patient support.","An AndroGel patient adjusts his tie."];if($("#home-feature-left").length>0){var i=Math.floor(Math.random()*n.length)+0,r=n[i],f=Math.floor(Math.random()*t.length)+0,u=t[i];$("#home-feature-left").attr("src","/Content/images/"+r);$("#home-feature-left").attr("alt",u)}}function FieldMaxLength(){$("div.reg-max [maxlength]").each(function(){var n=$(this).attr("maxlength");$(this).attr("id")!=undefined&&$(this).is(":visible")=="true"&&$(this).keyup(function(){$(this).val().length>n&&$(this).val($(this).val().substr(0,n))})});$("div.reg-max input").keypress(function(n){var t=n.keyCode?n.keyCode:n.which;if(t==13||t==10)return $(this).blur(),!1})}function _handleMultipleEvents(n,t,i,r){vjs.arr.forEach(i,function(i){n(t,i,r)})}function _logType(n,t){var i,u,r;i=Array.prototype.slice.call(t);u=function(){};r=window.console||{log:u,warn:u,error:u};n?i.unshift(n.toUpperCase()+":"):n="log";vjs.log.history.push(i);i.unshift("VIDEOJS:");r[n].apply?r[n].apply(r,i):r[n](i.join(" "))}(function(n){n.extend(n.fn,{validate:function(t){if(!this.length)return t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var i=n.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new n.validator(t,this[0]),n.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(t){i.settings.submitHandler&&(i.submitButton=t.target);n(t.target).hasClass("cancel")&&(i.cancelSubmit=!0);void 0!==n(t.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(t){function r(){var r;return i.settings.submitHandler?(i.submitButton&&(r=n("<input type='hidden'/>").attr("name",i.submitButton.name).val(n(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,t),i.submitButton&&r.remove(),!1):!0}return i.settings.debug&&t.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,r()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):r():(i.focusInvalid(),!1)})),i)},valid:function(){if(n(this[0]).is("form"))return this.validate().form();var t=!0,i=n(this[0].form).validate();return this.each(function(){t=t&&i.element(this)}),t},removeAttrs:function(t){var i={},r=this;return n.each(t.split(/\s/),function(n,t){i[t]=r.attr(t);r.removeAttr(t)}),i},rules:function(t,i){var r=this[0],o,u,h;if(t){var e=n.data(r.form,"validator").settings,s=e.rules,f=n.validator.staticRules(r);switch(t){case"add":n.extend(f,n.validator.normalizeRule(i));delete f.messages;s[r.name]=f;i.messages&&(e.messages[r.name]=n.extend(e.messages[r.name],i.messages));break;case"remove":return i?(o={},n.each(i.split(/\s/),function(n,t){o[t]=f[t];delete f[t]}),o):(delete s[r.name],f)}}return u=n.validator.normalizeRules(n.extend({},n.validator.classRules(r),n.validator.attributeRules(r),n.validator.dataRules(r),n.validator.staticRules(r)),r),u.required&&(h=u.required,delete u.required,u=n.extend({required:h},u)),u}});n.extend(n.expr[":"],{blank:function(t){return!n.trim(""+n(t).val())},filled:function(t){return!!n.trim(""+n(t).val())},unchecked:function(t){return!n(t).prop("checked")}});n.validator=function(t,i){this.settings=n.extend(!0,{},n.validator.defaults,t);this.currentForm=i;this.init()};n.validator.format=function(t,i){return 1===arguments.length?function(){var i=n.makeArray(arguments);return i.unshift(t),n.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=n.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),n.each(i,function(n,i){t=t.replace(RegExp("\\{"+n+"\\}","g"),function(){return i})}),t)};n.extend(n.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:n([]),errorLabelContainer:n([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(n){this.lastActive=n;this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,n,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(n)).hide())},onfocusout:function(n){!this.checkable(n)&&(n.name in this.submitted||!this.optional(n))&&this.element(n)},onkeyup:function(n,t){(9!==t.which||""!==this.elementValue(n))&&(n.name in this.submitted||n===this.lastElement)&&this.element(n)},onclick:function(n){n.name in this.submitted?this.element(n):n.parentNode.name in this.submitted&&this.element(n.parentNode)},highlight:function(t,i,r){"radio"===t.type?this.findByName(t.name).addClass(i).removeClass(r):n(t).addClass(i).removeClass(r)},unhighlight:function(t,i,r){"radio"===t.type?this.findByName(t.name).removeClass(i).addClass(r):n(t).removeClass(i).addClass(r)}},setDefaults:function(t){n.extend(n.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:n.validator.format("Please enter no more than {0} characters."),minlength:n.validator.format("Please enter at least {0} characters."),rangelength:n.validator.format("Please enter a value between {0} and {1} characters long."),range:n.validator.format("Please enter a value between {0} and {1}."),max:n.validator.format("Please enter a value less than or equal to {0}."),min:n.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function i(t){var i=n.data(this[0].form,"validator"),r="on"+t.type.replace(/^validate/,"");i.settings[r]&&i.settings[r].call(i,this[0],t)}var r,t;this.labelContainer=n(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||n(this.currentForm);this.containers=n(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();r=this.groups={};n.each(this.settings.groups,function(t,i){"string"==typeof i&&(i=i.split(/\s/));n.each(i,function(n,i){r[i]=t})});t=this.settings.rules;n.each(t,function(i,r){t[i]=n.validator.normalizeRule(r)});n(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",i).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",i);this.settings.invalidHandler&&n(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),n.extend(this.submitted,this.errorMap),this.invalid=n.extend({},this.errorMap),this.valid()||n(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var n=0,t=this.currentElements=this.elements();t[n];n++)this.check(t[n]);return this.valid()},element:function(t){t=this.validationTargetFor(this.clean(t));this.lastElement=t;this.prepareElement(t);this.currentElements=n(t);var i=this.check(t)!==!1;return i?delete this.invalid[t.name]:this.invalid[t.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(t){if(t){n.extend(this.errorMap,t);this.errorList=[];for(var i in t)this.errorList.push({message:t[i],element:this.findByName(i)[0]});this.successList=n.grep(this.successList,function(n){return!(n.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){n.fn.resetForm&&n(this.currentForm).resetForm();this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(n){var t=0,i;for(i in n)t++;return t},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{n(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var t=this.lastActive;return t&&1===n.grep(this.errorList,function(n){return n.element.name===t.name}).length&&t},elements:function(){var t=this,i={};return n(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!t.objectLength(n(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(t){return n(t)[0]},errors:function(){var t=this.settings.errorClass.replace(" ",".");return n(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=n([]);this.toHide=n([]);this.currentElements=n([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(n){this.reset();this.toHide=this.errorsFor(n)},elementValue:function(t){var r=n(t).attr("type"),i=n(t).val();return"radio"===r||"checkbox"===r?n("input[name='"+n(t).attr("name")+"']:checked").val():"string"==typeof i?i.replace(/\r/g,""):i},check:function(t){var r,u;t=this.validationTargetFor(this.clean(t));var i,f=n(t).rules(),e=!1,s=this.elementValue(t);for(r in f){u={method:r,parameters:f[r]};try{if(i=n.validator.methods[r].call(this,s,t,u.parameters),"dependency-mismatch"===i){e=!0;continue}if(e=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(t)),void 0;if(!i)return this.formatAndAdd(t,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+u.method+"' method.",o),o;}}if(!e)return(this.objectLength(f)&&this.successList.push(t),!0)},customDataMessage:function(t,i){return n(t).data("msg-"+i.toLowerCase())||t.attributes&&n(t).attr("data-msg-"+i.toLowerCase())},customMessage:function(n,t){var i=this.settings.messages[n];return i&&(i.constructor===String?i:i[t])},findDefined:function(){for(var n=0;arguments.length>n;n++)if(void 0!==arguments[n])return arguments[n];return void 0},defaultMessage:function(t,i){return this.findDefined(this.customMessage(t.name,i),this.customDataMessage(t,i),!this.settings.ignoreTitle&&t.title||void 0,n.validator.messages[i],"<strong>Warning: No message defined for "+t.name+"<\/strong>")},formatAndAdd:function(t,i){var r=this.defaultMessage(t,i.method),u=/\$?\{(\d+)\}/g;"function"==typeof r?r=r.call(this,i.parameters,t):u.test(r)&&(r=n.validator.format(r.replace(u,"{$1}"),i.parameters));this.errorList.push({message:r,element:t});this.errorMap[t.name]=r;this.submitted[t.name]=r},addWrapper:function(n){return this.settings.wrapper&&(n=n.add(n.parent(this.settings.wrapper))),n},defaultShowErrors:function(){for(var i,t,n=0;this.errorList[n];n++)t=this.errorList[n],this.settings.highlight&&this.settings.highlight.call(this,t.element,this.settings.errorClass,this.settings.validClass),this.showLabel(t.element,t.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(n=0;this.successList[n];n++)this.showLabel(this.successList[n]);if(this.settings.unhighlight)for(n=0,i=this.validElements();i[n];n++)this.settings.unhighlight.call(this,i[n],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return n(this.errorList).map(function(){return this.element})},showLabel:function(t,i){var r=this.errorsFor(t);r.length?(r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),r.html(i)):(r=n("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(r=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(r).length||(this.settings.errorPlacement?this.settings.errorPlacement(r,n(t)):r.insertAfter(t)));!i&&this.settings.success&&(r.text(""),"string"==typeof this.settings.success?r.addClass(this.settings.success):this.settings.success(r,t));this.toShow=this.toShow.add(r)},errorsFor:function(t){var i=this.idOrName(t);return this.errors().filter(function(){return n(this).attr("for")===i})},idOrName:function(n){return this.groups[n.name]||(this.checkable(n)?n.name:n.id||n.name)},validationTargetFor:function(n){return this.checkable(n)&&(n=this.findByName(n.name).not(this.settings.ignore)[0]),n},checkable:function(n){return/radio|checkbox/i.test(n.type)},findByName:function(t){return n(this.currentForm).find("[name='"+t+"']")},getLength:function(t,i){switch(i.nodeName.toLowerCase()){case"select":return n("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return t.length},depend:function(n,t){return this.dependTypes[typeof n]?this.dependTypes[typeof n](n,t):!0},dependTypes:{boolean:function(n){return n},string:function(t,i){return!!n(t,i.form).length},"function":function(n,t){return n(t)}},optional:function(t){var i=this.elementValue(t);return!n.validator.methods.required.call(this,i,t)&&"dependency-mismatch"},startRequest:function(n){this.pending[n.name]||(this.pendingRequest++,this.pending[n.name]=!0)},stopRequest:function(t,i){this.pendingRequest--;0>this.pendingRequest&&(this.pendingRequest=0);delete this.pending[t.name];i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(n(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(n(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return n.data(t,"previousValue")||n.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,i){t.constructor===String?this.classRuleSettings[t]=i:n.extend(this.classRuleSettings,t)},classRules:function(t){var i={},r=n(t).attr("class");return r&&n.each(r.split(" "),function(){this in n.validator.classRuleSettings&&n.extend(i,n.validator.classRuleSettings[this])}),i},attributeRules:function(t){var u={},e=n(t),f=e[0].getAttribute("type"),r,i;for(r in n.validator.methods)"required"===r?(i=e.get(0).getAttribute(r),""===i&&(i=!0),i=!!i):i=e.attr(r),/min|max/.test(r)&&(null===f||/number|range|text/.test(f))&&(i=Number(i)),i?u[r]=i:f===r&&"range"!==f&&(u[r]=!0);return u.maxlength&&/-1|2147483647|524288/.test(u.maxlength)&&delete u.maxlength,u},dataRules:function(t){var i,r,u={},f=n(t);for(i in n.validator.methods)r=f.data("rule-"+i.toLowerCase()),void 0!==r&&(u[i]=r);return u},staticRules:function(t){var i={},r=n.data(t.form,"validator");return r.settings.rules&&(i=n.validator.normalizeRule(r.settings.rules[t.name])||{}),i},normalizeRules:function(t,i){return n.each(t,function(r,u){if(u===!1)return delete t[r],void 0;if(u.param||u.depends){var f=!0;switch(typeof u.depends){case"string":f=!!n(u.depends,i.form).length;break;case"function":f=u.depends.call(i,i)}f?t[r]=void 0!==u.param?u.param:!0:delete t[r]}}),n.each(t,function(r,u){t[r]=n.isFunction(u)?u(i):u}),n.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),n.each(["rangelength","range"],function(){var i;t[this]&&(n.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:"string"==typeof t[this]&&(i=t[this].split(/[\s,]+/),t[this]=[Number(i[0]),Number(i[1])]))}),n.validator.autoCreateRanges&&(t.min&&t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength&&t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if("string"==typeof t){var i={};n.each(t.split(/\s/),function(){i[this]=!0});t=i}return t},addMethod:function(t,i,r){n.validator.methods[t]=i;n.validator.messages[t]=void 0!==r?r:n.validator.messages[t];3>i.length&&n.validator.addClassRules(t,n.validator.normalizeRule(t))},methods:{required:function(t,i,r){if(!this.depend(r,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var u=n(i).val();return u&&u.length>0}return this.checkable(i)?this.getLength(t,i)>0:n.trim(t).length>0},email:function(n,t){return this.optional(t)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(n)},url:function(n,t){return this.optional(t)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(n)},date:function(n,t){return this.optional(t)||!/Invalid|NaN/.test(""+new Date(n))},dateISO:function(n,t){return this.optional(t)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(n)},number:function(n,t){return this.optional(t)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(n)},digits:function(n,t){return this.optional(t)||/^\d+$/.test(n)},creditcard:function(n,t){var r,e;if(this.optional(t))return"dependency-mismatch";if(/[^0-9 \-]+/.test(n))return!1;var f=0,i=0,u=!1;for(n=n.replace(/\D/g,""),r=n.length-1;r>=0;r--)e=n.charAt(r),i=parseInt(e,10),u&&(i*=2)>9&&(i-=9),f+=i,u=!u;return 0==f%10},minlength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u>=r},maxlength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||r>=u},rangelength:function(t,i,r){var u=n.isArray(t)?t.length:this.getLength(n.trim(t),i);return this.optional(i)||u>=r[0]&&r[1]>=u},min:function(n,t,i){return this.optional(t)||n>=i},max:function(n,t,i){return this.optional(t)||i>=n},range:function(n,t,i){return this.optional(t)||n>=i[0]&&i[1]>=n},equalTo:function(t,i,r){var u=n(r);return this.settings.onfocusout&&u.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){n(i).valid()}),t===u.val()},remote:function(t,i,r){var f,u,e;return this.optional(i)?"dependency-mismatch":(f=this.previousValue(i),this.settings.messages[i.name]||(this.settings.messages[i.name]={}),f.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=f.message,r="string"==typeof r&&{url:r}||r,f.old===t)?f.valid:(f.old=t,u=this,this.startRequest(i),e={},e[i.name]=t,n.ajax(n.extend(!0,{url:r,mode:"abort",port:"validate"+i.name,dataType:"json",data:e,success:function(r){var e,h,s,o;u.settings.messages[i.name].remote=f.originalMessage;e=r===!0||"true"===r;e?(h=u.formSubmitted,u.prepareElement(i),u.formSubmitted=h,u.successList.push(i),delete u.invalid[i.name],u.showErrors()):(s={},o=r||u.defaultMessage(i,"remote"),s[i.name]=f.message=n.isFunction(o)?o(t):o,u.invalid[i.name]=!0,u.showErrors(s));f.valid=e;u.stopRequest(i,e)}},r)),"pending")}}});n.format=n.validator.format})(jQuery),function(n){var t={},i;n.ajaxPrefilter?n.ajaxPrefilter(function(n,i,r){var u=n.port;"abort"===n.mode&&(t[u]&&t[u].abort(),t[u]=r)}):(i=n.ajax,n.ajax=function(r){var f=("mode"in r?r:n.ajaxSettings).mode,u=("port"in r?r:n.ajaxSettings).port;return"abort"===f?(t[u]&&t[u].abort(),t[u]=i.apply(this,arguments),t[u]):i.apply(this,arguments)})}(jQuery),function(n){n.extend(n.fn,{validateDelegate:function(t,i,r){return this.bind(i,function(i){var u=n(i.target);if(u.is(t))return r.apply(u,arguments)})}})}(jQuery),function(n){function i(n,t,i){n.rules[t]=i;n.message&&(n.messages[t]=n.message)}function h(n){return n.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function f(n){return n.replace(/([!"#$%&'()*+,./:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function e(n){return n.substr(0,n.lastIndexOf(".")+1)}function o(n,t){return n.indexOf("*.")===0&&(n=n.replace("*.",t)),n}function c(t,i){var r=n(this).find("[data-valmsg-for='"+f(i[0].name)+"']"),u=r.attr("data-valmsg-replace"),e=u?n.parseJSON(u)!==!1:null;r.removeClass("field-validation-valid").addClass("field-validation-error");t.data("unobtrusiveContainer",r);e?(r.empty(),t.removeClass("input-validation-error").appendTo(r)):t.hide()}function l(t,i){var u=n(this).find("[data-valmsg-summary=true]"),r=u.find("ul");r&&r.length&&i.errorList.length&&(r.empty(),u.addClass("validation-summary-errors").removeClass("validation-summary-valid"),n.each(i.errorList,function(){n("<li />").html(this.message).appendTo(r)}))}function a(t){var i=t.data("unobtrusiveContainer"),r=i.attr("data-valmsg-replace"),u=r?n.parseJSON(r):null;i&&(i.addClass("field-validation-valid").removeClass("field-validation-error"),t.removeData("unobtrusiveContainer"),u&&i.empty())}function v(){var t=n(this),i="__jquery_unobtrusive_validation_form_reset";if(!t.data(i)){t.data(i,!0);try{t.data("validator").resetForm()}finally{t.removeData(i)}t.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors");t.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function s(t){var i=n(t),f=i.data(u),s=n.proxy(v,t),e=r.unobtrusive.options||{},o=function(i,r){var u=e[i];u&&n.isFunction(u)&&u.apply(t,r)};return f||(f={options:{errorClass:e.errorClass||"input-validation-error",errorElement:e.errorElement||"span",errorPlacement:function(){c.apply(t,arguments);o("errorPlacement",arguments)},invalidHandler:function(){l.apply(t,arguments);o("invalidHandler",arguments)},messages:{},rules:{},success:function(){a.apply(t,arguments);o("success",arguments)}},attachValidation:function(){i.off("reset."+u,s).on("reset."+u,s).validate(this.options)},validate:function(){return i.validate(),i.valid()}},i.data(u,f)),f}var r=n.validator,t,u="unobtrusiveValidation";r.unobtrusive={adapters:[],parseElement:function(t,i){var u=n(t),f=u.parents("form")[0],r,e,o;f&&(r=s(f),r.options.rules[t.name]=e={},r.options.messages[t.name]=o={},n.each(this.adapters,function(){var i="data-val-"+this.name,r=u.attr(i),s={};r!==undefined&&(i+="-",n.each(this.params,function(){s[this]=u.attr(i+this)}),this.adapt({element:t,form:f,message:r,params:s,rules:e,messages:o}))}),n.extend(e,{__dummy__:!0}),i||r.attachValidation())},parse:function(t){var i=n(t),u=i.parents().addBack().filter("form").add(i.find("form")).has("[data-val=true]");i.find("[data-val=true]").each(function(){r.unobtrusive.parseElement(this,!0)});u.each(function(){var n=s(this);n&&n.attachValidation()})}};t=r.unobtrusive.adapters;t.add=function(n,t,i){return i||(i=t,t=[]),this.push({name:n,params:t,adapt:i}),this};t.addBool=function(n,t){return this.add(n,function(r){i(r,t||n,!0)})};t.addMinMax=function(n,t,r,u,f,e){return this.add(n,[f||"min",e||"max"],function(n){var f=n.params.min,e=n.params.max;f&&e?i(n,u,[f,e]):f?i(n,t,f):e&&i(n,r,e)})};t.addSingleVal=function(n,t,r){return this.add(n,[t||"val"],function(u){i(u,r||n,u.params[t])})};r.addMethod("__dummy__",function(){return!0});r.addMethod("regex",function(n,t,i){var r;return this.optional(t)?!0:(r=new RegExp(i).exec(n),r&&r.index===0&&r[0].length===n.length)});r.addMethod("nonalphamin",function(n,t,i){var r;return i&&(r=n.match(/\W/g),r=r&&r.length>=i),r});r.methods.extension?(t.addSingleVal("accept","mimtype"),t.addSingleVal("extension","extension")):t.addSingleVal("extension","extension","accept");t.addSingleVal("regex","pattern");t.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url");t.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range");t.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength");t.add("equalto",["other"],function(t){var r=e(t.element.name),u=t.params.other,s=o(u,r),h=n(t.form).find(":input").filter("[name='"+f(s)+"']")[0];i(t,"equalTo",h)});t.add("required",function(n){(n.element.tagName.toUpperCase()!=="INPUT"||n.element.type.toUpperCase()!=="CHECKBOX")&&i(n,"required",!0)});t.add("remote",["url","type","additionalfields"],function(t){var r={url:t.params.url,type:t.params.type||"GET",data:{}},u=e(t.element.name);n.each(h(t.params.additionalfields||t.element.name),function(i,e){var s=o(e,u);r.data[s]=function(){var i=n(t.form).find(":input").filter("[name='"+f(s)+"']");return i.is(":checkbox")?i.filter(":checked").val()||i.filter(":hidden").val()||"":i.is(":radio")?i.filter(":checked").val()||"":i.val()}});i(t,"remote",r)});t.add("password",["min","nonalphamin","regex"],function(n){n.params.min&&i(n,"minlength",n.params.min);n.params.nonalphamin&&i(n,"nonalphamin",n.params.nonalphamin);n.params.regex&&i(n,"regex",n.params.regex)});n(function(){r.unobtrusive.parse(document)})}(jQuery),function(n,t,i){var u="watermark",f="watermarkClass",h="watermarkFocus",s="watermarkSubmit",c="watermarkMaxLength",e="watermarkPassword",r="watermarkText",o=/\r/g,p=/^(button|checkbox|hidden|image|radio|range|reset|submit)$/i,v="input:data("+u+"),textarea:data("+u+")",y=":watermarkable",l=["Page_ClientValidate"],a=!1,w="placeholder"in document.createElement("input");n.watermark=n.watermark||{version:"3.1.4",runOnce:!0,options:{className:"watermark",useNative:!0,hideBeforeUnload:!0},hide:function(t){n(t).filter(v).each(function(){n.watermark._hide(n(this))})},_hide:function(n,i){var h=n[0],y=(h.value||"").replace(o,""),l=n.data(r)||"",a=n.data(c)||0,v=n.data(f),u,s;l.length&&y==l&&(h.value="",n.data(e)&&(n.attr("type")||"")==="text"&&(u=n.data(e)||[],s=n.parent()||[],u.length&&s.length&&(s[0].removeChild(n[0]),s[0].appendChild(u[0]),n=u)),a&&(n.attr("maxLength",a),n.removeData(c)),i&&(n.attr("autocomplete","off"),t.setTimeout(function(){n.select()},1)));v&&n.removeClass(v)},show:function(t){n(t).filter(v).each(function(){n.watermark._show(n(this))})},_show:function(t){var v=t[0],p=(v.value||"").replace(o,""),i=t.data(r)||"",y=t.attr("type")||"",w=t.data(f),u,s,l;p.length!=0&&p!=i||t.data(h)?n.watermark._hide(t):(a=!0,t.data(e)&&y==="password"&&(u=t.data(e)||[],s=t.parent()||[],u.length&&s.length&&(s[0].removeChild(t[0]),s[0].appendChild(u[0]),t=u,t.attr("maxLength",i.length),v=t[0])),(y==="text"||y==="search")&&(l=t.attr("maxLength")||0,l>0&&i.length>l&&(t.data(c,l),t.attr("maxLength",i.length))),w&&t.addClass(w),v.value=i)},hideAll:function(){a&&(a=!1)},showAll:function(){n.watermark.show(y)}};n.fn.watermark=n.fn.watermark||function(i,c){if(!this.length)return this;var a=!1,l=typeof i=="string";return l&&(i=i.replace(o,"")),typeof c=="object"?(a=typeof c.className=="string",c=n.extend({},n.watermark.options,c)):typeof c=="string"?(a=!0,c=n.extend({},n.watermark.options,{className:c})):c=n.watermark.options,typeof c.useNative!="function"&&(c.useNative=c.useNative?function(){return!0}:function(){return!1}),this.each(function(){var v=n(this),d,p,b,k;if(v.is(y)){if(v.data(u))(l||a)&&(n.watermark._hide(v),l&&v.data(r,i),a&&v.data(f,c.className));else{if(w&&c.useNative.call(this,v)&&(v.attr("tagName")||"")!=="TEXTAREA"){l&&v.attr("placeholder",i);return}v.data(r,l?i:"");v.data(f,c.className);v.data(u,1);(v.attr("type")||"")==="password"?(d=v.wrap("<span>").parent(),p=n(d.html().replace(/type=["']?password["']?/i,'type="text"')),p.data(r,v.data(r)),p.data(f,v.data(f)),p.data(u,1),p.attr("maxLength",i.length),p.focus(function(){n.watermark._hide(p,!0)}).bind("dragenter",function(){n.watermark._hide(p)}).bind("dragend",function(){t.setTimeout(function(){p.blur()},1)}),v.blur(function(){n.watermark._show(v)}).bind("dragleave",function(){n.watermark._show(v)}),p.data(e,v),v.data(e,p)):v.focus(function(){v.data(h,1);n.watermark._hide(v,!0)}).blur(function(){v.data(h,0);n.watermark._show(v)}).bind("dragenter",function(){n.watermark._hide(v)}).bind("dragleave",function(){n.watermark._show(v)}).bind("dragend",function(){t.setTimeout(function(){n.watermark._show(v)},1)}).bind("drop",function(n){var t=v[0],i=n.originalEvent.dataTransfer.getData("Text");(t.value||"").replace(o,"").replace(i,"")===v.data(r)&&(t.value=i);v.focus()});this.form&&(b=this.form,k=n(b),k.data(s)||(k.submit(n.watermark.hideAll),b.submit?(k.data(s,b.submit),b.submit=function(t,i){return function(){var r=i.data(s);n.watermark.hideAll();r.apply?r.apply(t,Array.prototype.slice.call(arguments)):r()}}(b,k)):(k.data(s,1),b.submit=function(t){return function(){n.watermark.hideAll();delete t.submit;t.submit()}}(b))))}n.watermark._show(v)}})};n.watermark.runOnce&&(n.watermark.runOnce=!1,n.extend(n.expr[":"],{data:n.expr.createPseudo?n.expr.createPseudo(function(t){return function(i){return!!n.data(i,t)}}):function(t,i,r){return!!n.data(t,r[3])},watermarkable:function(n){var t,i=n.nodeName;return i==="TEXTAREA"?!0:i!=="INPUT"?!1:(t=n.getAttribute("type"),!t||!p.test(t))}}),function(t){n.fn.val=function(){var f=Array.prototype.slice.call(arguments),e;return this.length?f.length?(t.apply(this,f),n.watermark.show(this),this):this.data(u)?(e=(this[0].value||"").replace(o,""),e===(this.data(r)||"")?"":e):t.apply(this):f.length?this:i}}(n.fn.val),l.length&&n(function(){for(var r,u,i=l.length-1;i>=0;i--)r=l[i],u=t[r],typeof u=="function"&&(t[r]=function(t){return function(){return n.watermark.hideAll(),t.apply(null,Array.prototype.slice.call(arguments))}}(u))}),n(t).bind("beforeunload",function(){n.watermark.options.hideBeforeUnload&&n.watermark.hideAll()}))}(jQuery,window),function(n){n.fn.alphanumeric=function(t){return t=n.extend({ichars:"!#$%^&*()+=[]\\';,/{}|\":<>?~`",nchars:"",allow:""},t),this.each(function(){for(t.nocaps&&(t.nchars+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.allcaps&&(t.nchars+="abcdefghijklmnopqrstuvwxyz"),sq=t.allow.split(""),i=0;i<sq.length;i++)t.ichars.indexOf(sq[i])!=-1&&(sq[i]="\\"+sq[i]);t.allow=sq.join("|");var u=new RegExp(t.allow,"gi"),r=t.ichars+t.nchars;r=r.replace(u,"");n(this).keypress(function(n){k=n.charCode?String.fromCharCode(n.charCode):String.fromCharCode(n.which);r.indexOf(k)!=-1&&n.preventDefault()});n(this).bind("contextmenu",function(){return!1})})};n.fn.numeric=function(t){var i="abcdefghijklmnopqrstuvwxyz_@.-";return i+=i.toUpperCase(),t=n.extend({nchars:i},t),this.each(function(){n(this).alphanumeric(t)})};n.fn.alpha=function(t){return t=n.extend({nchars:"1234567890"},t),this.each(function(){n(this).alphanumeric(t)})};n.fn.phnumeric=function(t){var i="abcdefghijklmnopqrstuvwxyz_@";return i+=i.toUpperCase(),t=n.extend({nchars:i},t),this.each(function(){n(this).alphanumeric(t)})}}(jQuery),function(n,t){"use strict";function i(n){var t=Array.prototype.slice.call(arguments,1);return n.prop?n.prop.apply(n,t):n.attr.apply(n,t)}function r(n,t,i){var r,u;for(r in i)i.hasOwnProperty(r)&&(u=r.replace(/ |$/g,t.eventNamespace),n.bind(u,i[r]))}function u(n,t,i){r(n,i,{focus:function(){t.addClass(i.focusClass)},blur:function(){t.removeClass(i.focusClass);t.removeClass(i.activeClass)},mouseenter:function(){t.addClass(i.hoverClass)},mouseleave:function(){t.removeClass(i.hoverClass);t.removeClass(i.activeClass)},"mousedown touchbegin":function(){n.is(":disabled")||t.addClass(i.activeClass)},"mouseup touchend":function(){t.removeClass(i.activeClass)}})}function e(n,t){n.removeClass(t.hoverClass+" "+t.focusClass+" "+t.activeClass)}function y(n,t,i){i?n.addClass(t):n.removeClass(t)}function o(n,t,i){var r="checked",u=t.is(":"+r);t.prop?t.prop(r,u):u?t.attr(r,r):t.removeAttr(r);y(n,i.checkedClass,u)}function f(n,t,i){y(n,i.disabledClass,t.is(":disabled"))}function h(n,t,i){switch(i){case"after":return n.after(t),n.next();case"before":return n.before(t),n.prev();case"wrap":return n.wrap(t),n.parent()}return null}function s(t,r,u){var e,o,s;return u||(u={}),u=n.extend({bind:{},divClass:null,divWrap:"wrap",spanClass:null,spanHtml:null,spanWrap:"wrap"},u),e=n("<div />"),o=n("<span />"),r.autoHide&&t.is(":hidden")&&t.css("display")==="none"&&e.hide(),u.divClass&&e.addClass(u.divClass),r.wrapperClass&&e.addClass(r.wrapperClass),u.spanClass&&o.addClass(u.spanClass),s=i(t,"id"),r.useID&&s&&i(e,"id",r.idPrefix+"-"+s),u.spanHtml&&o.html(u.spanHtml),e=h(t,e,u.divWrap),o=h(t,o,u.spanWrap),f(e,t,r),{div:e,span:o}}function a(t,i){var r;return i.wrapperClass?(r=n("<span />").addClass(i.wrapperClass),h(t,r,"wrap")):null}function it(){var u,t,i,r;return r="rgb(120,2,153)",t=n('<div style="width:0;height:0;color:'+r+'">'),n("body").append(t),i=t.get(0),u=window.getComputedStyle?window.getComputedStyle(i,"").color:(i.currentStyle||i.style||{}).color,t.remove(),u.replace(/ /g,"")!==r}function rt(t){return t?n("<span />").text(t).html():""}function p(){return navigator.cpuClass&&!navigator.product}function ut(){return typeof window.XMLHttpRequest!="undefined"?!0:!1}function w(n){var t;return n[0].multiple?!0:(t=i(n,"size"),!t||t<=1)?!1:!0}function c(){return!1}function l(n,t){var i="none";r(n,t,{"selectstart dragstart mousedown":c});n.css({MozUserSelect:i,msUserSelect:i,webkitUserSelect:i,userSelect:i})}function b(n,t,i){var r=n.val();r===""?r=i.fileDefaultHtml:(r=r.split(/[\/\\]+/),r=r[r.length-1]);t.text(r)}function k(n,t,i){var r,u;for(r=[],n.each(function(){var n;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r.push({el:this,name:n,old:this.style[n]}),this.style[n]=t[n])}),i();r.length;)u=r.pop(),u.el.style[u.name]=u.old}function d(n,t){var i;i=n.parents();i.push(n[0]);i=i.not(":visible");k(i,{visibility:"hidden",display:"block",position:"absolute"},t)}function g(n,t){return function(){n.unwrap().unwrap().unbind(t.eventNamespace)}}var v=!0,nt=!1,tt=[{match:function(n){return n.is("a, button, :submit, :reset, input[type='button']")},apply:function(n,t){var o,h,a,v,c;return h=t.submitDefaultHtml,n.is(":reset")&&(h=t.resetDefaultHtml),v=n.is("a, button")?function(){return n.html()||h}:function(){return rt(i(n,"value"))||h},a=s(n,t,{divClass:t.buttonClass,spanHtml:v()}),o=a.div,u(n,o,t),c=!1,r(o,t,{"click touchend":function(){var r,f,t,u;c||n.is(":disabled")||(c=!0,n[0].dispatchEvent?(r=document.createEvent("MouseEvents"),r.initEvent("click",!0,!0),f=n[0].dispatchEvent(r),n.is("a")&&f&&(t=i(n,"target"),u=i(n,"href"),t&&t!=="_self"?window.open(u,t):document.location.href=u)):n.click(),c=!1)}}),l(o,t),{remove:function(){return o.after(n),o.remove(),n.unbind(t.eventNamespace),n},update:function(){e(o,t);f(o,n,t);n.detach();a.span.html(v()).append(n)}}}},{match:function(n){return n.is(":checkbox")},apply:function(n,t){var c,h,i;return c=s(n,t,{divClass:t.checkboxClass}),h=c.div,i=c.span,u(n,h,t),r(n,t,{"click touchend":function(){o(i,n,t)}}),o(i,n,t),{remove:g(n,t),update:function(){e(h,t);i.removeClass(t.checkedClass);o(i,n,t);f(h,n,t)}}}},{match:function(n){return n.is(":file")},apply:function(t,o){function w(){b(t,c,o)}var v,a,c,y;return v=s(t,o,{divClass:o.fileClass,spanClass:o.fileButtonClass,spanHtml:o.fileButtonHtml,spanWrap:"after"}),a=v.div,y=v.span,c=n("<span />").html(o.fileDefaultHtml),c.addClass(o.filenameClass),c=h(t,c,"after"),i(t,"size")||i(t,"size",a.width()/10),u(t,a,o),w(),p()?r(t,o,{click:function(){t.trigger("change");setTimeout(w,0)}}):r(t,o,{change:w}),l(c,o),l(y,o),{remove:function(){return c.remove(),y.remove(),t.unwrap().unbind(o.eventNamespace)},update:function(){e(a,o);b(t,c,o);f(a,t,o)}}}},{match:function(n){if(n.is("input")){var t=(" "+i(n,"type")+" ").toLowerCase();return" color date datetime datetime-local email month number password search tel text time url week ".indexOf(t)>=0}return!1},apply:function(n,t){var r,f;return r=i(n,"type"),n.addClass(t.inputClass),f=a(n,t),u(n,n,t),t.inputAddTypeAsClass&&n.addClass(r),{remove:function(){n.removeClass(t.inputClass);t.inputAddTypeAsClass&&n.removeClass(r);f&&n.unwrap()},update:c}}},{match:function(n){return n.is(":radio")},apply:function(t,h){var l,c,a;return l=s(t,h,{divClass:h.radioClass}),c=l.div,a=l.span,u(t,c,h),r(t,h,{"click touchend":function(){n.uniform.update(n(':radio[name="'+i(t,"name")+'"]'))}}),o(a,t,h),{remove:g(t,h),update:function(){e(c,h);o(a,t,h);f(c,t,h)}}}},{match:function(n){return n.is("select")&&!w(n)?!0:!1},apply:function(t,i){var c,h,o,a;return i.selectAutoWidth&&d(t,function(){a=t.width()}),c=s(t,i,{divClass:i.selectClass,spanHtml:(t.find(":selected:first")||t.find("option:first")).html(),spanWrap:"before"}),h=c.div,o=c.span,i.selectAutoWidth?d(t,function(){k(n([o[0],h[0]]),{display:"block"},function(){var n;n=o.outerWidth()-o.width();h.width(a+n);o.width(a)})}):h.addClass("fixedWidth"),u(t,h,i),r(t,i,{change:function(){o.html(t.find(":selected").html());h.removeClass(i.activeClass)},"click touchend":function(){var n=t.find(":selected").html();o.html()!==n&&t.trigger("change")},keyup:function(){o.html(t.find(":selected").html())}}),l(o,i),{remove:function(){return o.remove(),t.unwrap().unbind(i.eventNamespace),t},update:function(){i.selectAutoWidth?(n.uniform.restore(t),t.uniform(i)):(e(h,i),o.html(t.find(":selected").html()),f(h,t,i))}}}},{match:function(n){return n.is("select")&&w(n)?!0:!1},apply:function(n,t){var i;return n.addClass(t.selectMultiClass),i=a(n,t),u(n,n,t),{remove:function(){n.removeClass(t.selectMultiClass);i&&n.unwrap()},update:c}}},{match:function(n){return n.is("textarea")},apply:function(n,t){var i;return n.addClass(t.textareaClass),i=a(n,t),u(n,n,t),{remove:function(){n.removeClass(t.textareaClass);i&&n.unwrap()},update:c}}}];p()&&!ut()&&(v=!1);n.uniform={defaults:{activeClass:"active",autoHide:!0,buttonClass:"button",checkboxClass:"checker",checkedClass:"checked",disabledClass:"disabled",eventNamespace:".uniform",fileButtonClass:"action",fileButtonHtml:"Choose File",fileClass:"uploader",fileDefaultHtml:"No file selected",filenameClass:"filename",focusClass:"focus",hoverClass:"hover",idPrefix:"uniform",inputAddTypeAsClass:!0,inputClass:"uniform-input",radioClass:"radio",resetDefaultHtml:"Reset",resetSelector:!1,selectAutoWidth:!0,selectClass:"selector",selectMultiClass:"uniform-multiselect",submitDefaultHtml:"Submit",textareaClass:"uniform",useID:!0,wrapperClass:null},elements:[]};n.fn.uniform=function(t){var i=this;return(t=n.extend({},n.uniform.defaults,t),nt||(nt=!0,it()&&(v=!1)),!v)?this:(t.resetSelector&&n(t.resetSelector).mouseup(function(){window.setTimeout(function(){n.uniform.update(i)},10)}),this.each(function(){var i=n(this),r,u,f;if(i.data("uniformed")){n.uniform.update(i);return}for(r=0;r<tt.length;r=r+1)if(u=tt[r],u.match(i,t)){f=u.apply(i,t);i.data("uniformed",f);n.uniform.elements.push(i.get(0));return}}))};n.uniform.restore=n.fn.uniform.restore=function(i){i===t&&(i=n.uniform.elements);n(i).each(function(){var r=n(this),t,i;(i=r.data("uniformed"),i)&&(i.remove(),t=n.inArray(this,n.uniform.elements),t>=0&&n.uniform.elements.splice(t,1),r.removeData("uniformed"))})};n.uniform.update=n.fn.uniform.update=function(i){i===t&&(i=n.uniform.elements);n(i).each(function(){var i=n(this),t;(t=i.data("uniformed"),t)&&t.update(i,t.options)})}}(jQuery);jQuery.validator.addMethod("checkage",function(n,t,i){var u=new Date(i),f=new Date(n),r=!0;return f>u&&(r=!1),r});jQuery.validator.unobtrusive.adapters.add("checkage",["param"],function(n){n.rules.checkage=n.params.param;n.messages.checkage=n.message});jQuery.validator.addMethod("checkgender",function(n,t){return $('input[name="'+t.name+'"]:checked').val()=="F"?!1:!0});jQuery.validator.unobtrusive.adapters.add("checkgender",function(n){n.rules.checkgender=n.params;n.messages.checkgender=n.message});jQuery.validator.unobtrusive.adapters.addBool("requiredcheckbox","required");$(function(){var n=window.navigator.appVersion;n=n.toLowerCase();n.indexOf("nexus")>=0&&FieldMaxLength();GetHomeImage();$("input[type=text].dob_date").keydown(function(t){if(t.shiftKey===!0)return!1;if(t.which==8||t.ctrlKey&&(t.which==17||t.which==65||t.which==67||t.which==86||t.which==88))return!0;var i=$(this).val();return(i.length==2||i.length==5)&&($(this).val(i+"/"),t.which==191)?!1:t.which<58?!0:t.which>95&&t.which<106?!0:n.indexOf("android")>=0&&t.which==229?!0:!1});$("input[type=text].dob_date").keyup(function(){var n=$(this).val();n=n.replace(/[^0-9/]/g,"");n.length>4?$(this).val(n.replace(/(\d{2})(\d{2})(\d{1,4})(.*)/,"$1/$2/$3")):n.length>3?$(this).val(n.replace(/(\d{2})(\d{1,2})/,"$1/$2")):$(this).val(n);n=$(this).val();n.length>10&&(n=n.replace(/[^0-9]/g,""),$(this).val(n.replace(/(\d{2})(\d{2})(\d{1,4})(.*)/,"$1/$2/$3")))});$(".numeric").numeric();$(".phnumeric").phnumeric();$("input[type=text].phnumeric").keydown(function(t){if(t.shiftKey===!0)return!1;if(t.which==8||t.ctrlKey&&(t.which==17||t.which==65||t.which==67||t.which==86||t.which==88))return!0;var i=$(this).val();return(i.length==3||i.length==7)&&($(this).val(i+"-"),t.which==109)?!1:t.which<58?!0:t.which>95&&t.which<106?!0:n.indexOf("android")>=0&&t.which==229?!0:!1});$("input[type=text].phnumeric").keyup(function(){var n=$(this).val();n=n.replace(/[^0-9-]/g,"");n.length>6?$(this).val(n.replace(/(\d{3})(\d{3})(\d{1,4})(.*)/,"$1-$2-$3")):n.length>3?$(this).val(n.replace(/(\d{3})(\d{1,3})/,"$1-$2")):$(this).val(n)});$("input[type=checkbox],input[type=radio]").uniform();$("#Profile_DOB").watermark(" MM/DD/YYYY",{className:"ourwatermark"});$("#Profile_Email").watermark(" name@email.com",{className:"ourwatermark"});$("#Profile_ConfirmEmail").watermark(" name@email.com",{className:"ourwatermark"});$("#PhoneNumber").watermark(" ###-###-####",{className:"ourwatermark"});$("#DOB").watermark(" (MM/DD/YYYY)",{className:"ourwatermark"});$("#Email").watermark(" name@email.com",{className:"ourwatermark"});$("#Profile_ConfirmEmail").bind("paste",function(n){n.preventDefault()});$("form input").change(function(n,t){var i=$(this).closest("form");t||setTimeout(function(){$("input",i).trigger("change",[!0])},1)})});$(document).ready(function(){function t(){$("html, body").animate({scrollTop:$("main").offset().top+$("main").outerHeight()},150)}function f(n){$("html, body").animate({scrollTop:$(n).offset().top-35},150)}function r(){$(window).outerWidth()<768?$(window).scrollTop()+$(window).outerHeight()-(i+n)>$("main").offset().top+$("main").outerHeight()+260?($("main").css("margin-bottom",n),$("#sticky-isi").addClass("undocked"),$(".indication-panel").css("height","100%")):($("main").css("margin-bottom",$("aside").outerHeight()),$("#sticky-isi").removeClass("undocked"),$(".indication-panel").css("height","45px")):$(window).scrollTop()+$(window).outerHeight()-(i+n)>$("main").offset().top+$("main").outerHeight()+260?($("main").css("margin-bottom",n),$("#sticky-isi").addClass("undocked"),$(".indication-panel").css("height","100%")):($("main").css("margin-bottom",$("aside").outerHeight()),$("#sticky-isi").removeClass("undocked"),$(".indication-panel").css("height","auto"))}function e(){var n=$("#prescribing-tool .pump-or-packets button.selected").text(),t=$("#prescribing-tool .dose button.selected").text();$("#prescribing-tool .loading-overlay").show();setTimeout(function(){$("#prescribing-tool .loading-overlay").fadeOut(200);$("#prescribing-tool .selected-title").text("AndroGel 1.62% "+n+" - "+t+" mg");$("#prescribing-tool .rx-text").removeClass("shown");$("#prescribing-tool ."+n+".mg-"+t.replace(".","_")).addClass("shown")},300)}var u=$(window).width(),i,n;$(window).resize(function(){u=$(window).width()});window.location.hash&&(window.location.hash.substring(1)=="isi"?t():$(window.location.hash).length&&f(window.location.hash));$(window).on("scroll",function(){$(window).scrollTop()>$("header").outerHeight()?$("header").addClass("out-of-frame"):$("header").removeClass("out-of-frame")});$(".menu-toggle").click(function(){$("body").toggleClass("menu-open");$("#nav-icon").removeClass("open");$("#nav-icon").addClass("collapsed");$("#navbar").removeClass("in");$("#navbar").addClass("collapse");$(".search").removeClass("search-open")});$(".close-wrapper").click(function(){event.preventDefault();$("body").removeClass("menu-open")});$("#nav-icon").click(function(){$(this).toggleClass("open")});$(".search-btn-wrapper").click(function(){$(".search").addClass("search-open");$("#nav-icon").removeClass("open");$("#nav-icon").addClass("collapsed");$("#navbar").removeClass("in");$("#navbar").addClass("collapse")});$(".nav-patient, .patient-site").click(function(){$("#nav-icon").removeClass("open");$("#nav-icon").addClass("collapsed");$("#navbar").removeClass("in");$("#navbar").addClass("collapse")});$(".search-btn-close").click(function(){$(".search").removeClass("search-open")});i=0;n=0;r();$(window).on("scroll resize",function(){r()});$(window).on("load",function(){$(window).scrollTop()+$(window).outerHeight()-(i+n)<$("main").offset().top+$("main").outerHeight()+260&&setTimeout(function(){$("#sticky-isi").removeClass("undocked")},300)});$(".indication-title").click(function(){var n,t;if($(window).outerWidth()<768){var n=$(window).height(),i=n*.45,t=$(".top-links").outerHeight();$("#sticky-isi").css("height",n+"px");$("#sticky-isi").css("margin-top",t+"px");$(this).hasClass("active")&&$("#sticky-isi").hasClass("static")?($("#sticky-isi").removeClass("static"),$("#sticky-isi").removeClass("undocked"),$("body,html").removeClass("fixed"),$(this).removeClass("active"),$("indication-link").removeClass("active"),$(".indication-panel").css("height","45px"),console.log("fired 90px A")):($(this).addClass("active"),$("indication-link").addClass("active"),$(".isi-link").removeClass("active"),$(".isi, .isi-heading").removeClass("hidden"),$("#sticky-isi").addClass("static"),$("#sticky-isi").addClass("undocked"),$("body,html").addClass("fixed"),$(".indication-panel").css("height",i),$(".isi-title").removeClass("active"))}else n=$(window).height(),t=$(".top-links").outerHeight(),$("#sticky-isi").css("height",n+"px"),$("#sticky-isi").css("margin-top",t+"px"),$(".indication-panel").css("height",""),$(this).hasClass("active")&&$("#sticky-isi").hasClass("static")?($(".indication-panel").css("height","100%"),$("#sticky-isi").removeClass("static"),$("#sticky-isi").removeClass("undocked"),$("body,html").removeClass("fixed")):($(".isi-title").addClass("active"),$(".indication-panel").css("height","100%"),$(".isi, .isi-heading").removeClass("hidden"),$("#sticky-isi").addClass("static"),$("#sticky-isi").addClass("undocked"),$("body,html").addClass("fixed"))});$(".isi-title").click(function(){var n,t;if($(window).outerWidth()<768){var n=$(window).height(),t=$(".top-links").outerHeight(),i=n*.45;$("#sticky-isi").css("height",n+"px");$("#sticky-isi").css("margin-top",t+"px");$(this).hasClass("active")&&$("#sticky-isi").hasClass("static")?($("#sticky-isi").removeClass("static"),$("#sticky-isi").removeClass("undocked"),$("body,html").removeClass("fixed"),$(this).removeClass("active"),$(".isi-link").removeClass("active"),$(".isi-panel").css("height","auto"),$("#sticky-isi").css("margin-top","0")):($(this).addClass("active"),$(".indication-link").removeClass("active"),$(".isi, .isi-heading").removeClass("hidden"),$("#sticky-isi").addClass("static"),$("#sticky-isi").addClass("undocked"),$("body,html").addClass("fixed"),$(".indication-title").removeClass("active"),$(".indication-panel").css("height","45px"),$(".isi-panel").css("height","auto"))}else n=$(window).height(),t=$(".top-links").outerHeight(),$("#sticky-isi").css("height",n+"px"),$("#sticky-isi").css("margin-top",t+"px"),$(this).hasClass("active")&&$("#sticky-isi").hasClass("static")?($(this).removeClass("active"),$("#sticky-isi").removeClass("static"),$("#sticky-isi").removeClass("undocked"),$("body,html").removeClass("fixed"),$(".indication-panel").css("height","100%"),$("#sticky-isi").css("margin-top","0")):($(this).addClass("active"),$(".isi, .isi-heading").removeClass("hidden"),$("#sticky-isi").addClass("static"),$("#sticky-isi").addClass("undocked"),$("body,html").addClass("fixed"),$(".indication-panel").css("height","100%"))});$(".modal-link").on("click",function(){var i=$(this),r=i.data("href"),n=$(".warn-on-leave-link");if(n.off("click"),n.removeAttr("href"),r!="#")setTimeout(function(){n.attr("href",r)},300);else{n.on("click",function(i){n.removeAttr("href");i.stopPropagation();$(".isi.patients, .isi-heading.patients").addClass("hidden");t()});setTimeout(function(){i.removeAttr("href").removeAttr("data-toggle");i.on("click",function(){$(this).hasClass("active")&&$("aside").hasClass("static")?$("html, body").animate({scrollTop:$("main").offset().top+$("main").outerHeight()-$(window).outerHeight()+160},200):($(".isi.patients, .isi-heading.patients").addClass("hidden"),t())})},200)}$(".btn-yes").on("click",function(){$("#warn-on-leave").modal("hide");$("#warn-on-leave-site").modal("hide");$("#warn-on-leave-general").modal("hide");$("#term-and-conditions").modal("hide");setTimeout(function(){n.removeAttr("href")},400)});$(".btn-no").on("click",function(){setTimeout(function(){n.removeAttr("href")},200)})});$(".modal-link-abbvie").on("click",function(){var i=$(this),n=$(".warn-on-leave-link");n.off("click");n.on("click",function(n){n.stopPropagation();$(".isi.patients, .isi-heading.patients").addClass("hidden");t();setTimeout(function(){i.on("click",function(){$(this).hasClass("active")&&$("aside").hasClass("static")?$("html, body").animate({scrollTop:$("main").offset().top+$("main").outerHeight()-$(window).outerHeight()+160},200):($(".isi.patients, .isi-heading.patients").addClass("hidden"),t())})},200)});$(".btn-yes").on("click",function(){$("#warn-on-leave-abbvie").modal("hide")});setTimeout(function(){$(".modal-link-abbvie").on("blur",function(){$("#warn-on-leave-abbvie").modal("hide")})},1e3)});$(".back-to-top-arrow").hide();$(".back-to-top-arrow").click(function(n){return n.preventDefault(),$("html, body").animate({scrollTop:0},"slow"),!1});$(".watch-video").on("click",function(){$("#video-overlay").show();$("#interstitial-box-1").show();videojs("video-sm").play();$(".vjs-control").addClass("needsclick");$("#interstitial-box-1 .close-x").click(function(){$("#video-overlay").hide();$("#interstitial-box-1").hide();videojs("video-sm").pause().currentTime(0);$(this).off("click")})});$(".video-launch").on("click",function(){jQuery.fn.redraw=function(){return this.hide(0,function(){jQuery(this).show()})};jQuery(document).ready(function(){jQuery("body").redraw()});$("#video-overlay").show();$("#interstitial-box-2").fadeIn(300);videojs("video-treatment-sm").play();$(".vjs-control").addClass("needsclick");$("#interstitial-box-2 .close-x").click(function(){$("#video-overlay").hide();$("#interstitial-box-2").fadeOut(300);videojs("video-treatment-sm").pause().currentTime(0);$(this).off("click")})});$(".video-app").on("click",function(){jQuery.fn.redraw=function(){return this.hide(0,function(){jQuery(this).show()})};jQuery(document).ready(function(){jQuery("body").redraw()});$("#video-overlay").show();$("#interstitial-box-3").fadeIn(300);videojs("video-app-sm").play();$(".vjs-control").addClass("needsclick");$("#interstitial-box-3 .close-x").click(function(){$("#video-overlay").hide();$("#interstitial-box-3").fadeOut(300);videojs("video-app-sm").pause().currentTime(0);$(this).off("click")})});$("#video-overlay").on("click",function(n){var t=$(n.target);t.is(".interstitial-box")||t.parents().is(".interstitial-box")||($("#video-overlay").hide(),$(".interstitial-box").hide(),$(this).hasClass("vid-sm")?videojs("video-sm").pause().currentTime(0):$(this).hasClass("vid-xs")?videojs("video-xs").pause().currentTime(0):$(this).hasClass("vid-tr")?videojs("video-app-sm").pause().currentTime(0):(videojs("video-treatment-sm").pause().currentTime(0),videojs("video-sm").pause().currentTime(0)))});$(".cta-block").on("click",function(){return window.location=$(this).find("a").attr("href"),!1});$(".callout").on("click",function(){return window.location=$(this).find("a").attr("href"),!1});$(document).on("fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange",function(){$("body").toggleClass("fullscreen")});$("#prescribing-tool .pump-or-packets button, #prescribing-tool .dose button").click(function(){$(this).hasClass("selected")||($(this).siblings().removeClass("selected"),$(this).addClass("selected"),e())})});$(window).scroll(function(){var n=$(window).scrollTop();n>200?$(".back-to-top-arrow").fadeIn():$(".back-to-top-arrow").fadeOut()});var vjs,videojs,hasOwnProp,errNum,cx;for(document.createElement("video"),document.createElement("audio"),document.createElement("track"),vjs=function(n,t,i){var r;if(typeof n=="string"){if(n.indexOf("#")===0&&(n=n.slice(1)),vjs.players[n])return vjs.players[n];r=vjs.el(n)}else r=n;if(!r||!r.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return r.player||new vjs.Player(r,t,i)},videojs=window.videojs=vjs,vjs.CDN_VERSION="4.11",vjs.ACCESS_PROTOCOL="https:"==document.location.protocol?"https://":"http://",vjs.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:2e3,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{},errorDisplay:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.userLanguage||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."},vjs.CDN_VERSION!=="GENERATED_CDN_VSN"&&(videojs.options.flash.swf=vjs.ACCESS_PROTOCOL+"vjs.zencdn.net/"+vjs.CDN_VERSION+"/video-js.swf"),vjs.addLanguage=function(n,t){return vjs.options.languages[n]=vjs.options.languages[n]!==undefined?vjs.util.mergeOptions(vjs.options.languages[n],t):t,vjs.options.languages},vjs.players={},typeof define=="function"&&define.amd?define([],function(){return videojs}):typeof exports=="object"&&typeof module=="object"&&(module.exports=videojs),vjs.CoreObject=vjs.CoreObject=function(){},vjs.CoreObject.extend=function(n){var r,t,i;n=n||{};r=n.init||n.init||this.prototype.init||this.prototype.init||function(){};t=function(){r.apply(this,arguments)};t.prototype=vjs.obj.create(this.prototype);t.prototype.constructor=t;t.extend=vjs.CoreObject.extend;t.create=vjs.CoreObject.create;for(i in n)n.hasOwnProperty(i)&&(t.prototype[i]=n[i]);return t},vjs.CoreObject.create=function(){var n=vjs.obj.create(this.prototype);return this.apply(n,arguments),n},vjs.on=function(n,t,i){if(vjs.obj.isArray(t))return _handleMultipleEvents(vjs.on,n,t,i);var r=vjs.getData(n);r.handlers||(r.handlers={});r.handlers[t]||(r.handlers[t]=[]);i.guid||(i.guid=vjs.guid++);r.handlers[t].push(i);r.dispatcher||(r.disabled=!1,r.dispatcher=function(t){var u,f,i,e;if(!r.disabled&&(t=vjs.fixEvent(t),u=r.handlers[t.type],u))for(f=u.slice(0),i=0,e=f.length;i<e;i++)if(t.isImmediatePropagationStopped())break;else f[i].call(n,t)});r.handlers[t].length==1&&(n.addEventListener?n.addEventListener(t,r.dispatcher,!1):n.attachEvent&&n.attachEvent("on"+t,r.dispatcher))},vjs.off=function(n,t,i){var r,e,o,u,f;if(vjs.hasData(n)&&(r=vjs.getData(n),r.handlers)){if(vjs.obj.isArray(t))return _handleMultipleEvents(vjs.off,n,t,i);if(e=function(t){r.handlers[t]=[];vjs.cleanUpEvents(n,t)},!t){for(o in r.handlers)e(o);return}if(u=r.handlers[t],u){if(!i){e(t);return}if(i.guid)for(f=0;f<u.length;f++)u[f].guid===i.guid&&u.splice(f--,1);vjs.cleanUpEvents(n,t)}}},vjs.cleanUpEvents=function(n,t){var i=vjs.getData(n);i.handlers[t].length===0&&(delete i.handlers[t],n.removeEventListener?n.removeEventListener(t,i.dispatcher,!1):n.detachEvent&&n.detachEvent("on"+t,i.dispatcher));vjs.isEmpty(i.handlers)&&(delete i.handlers,delete i.dispatcher,delete i.disabled);vjs.isEmpty(i)&&vjs.removeData(n)},vjs.fixEvent=function(n){function f(){return!0}function e(){return!1}var t,u,i,r;if(!n||!n.isPropagationStopped){t=n||window.event;n={};for(u in t)u!=="layerX"&&u!=="layerY"&&u!=="keyLocation"&&(u=="returnValue"&&t.preventDefault||(n[u]=t[u]));n.target||(n.target=n.srcElement||document);n.relatedTarget=n.fromElement===n.target?n.toElement:n.fromElement;n.preventDefault=function(){t.preventDefault&&t.preventDefault();n.returnValue=!1;n.isDefaultPrevented=f;n.defaultPrevented=!0};n.isDefaultPrevented=e;n.defaultPrevented=!1;n.stopPropagation=function(){t.stopPropagation&&t.stopPropagation();n.cancelBubble=!0;n.isPropagationStopped=f};n.isPropagationStopped=e;n.stopImmediatePropagation=function(){t.stopImmediatePropagation&&t.stopImmediatePropagation();n.isImmediatePropagationStopped=f;n.stopPropagation()};n.isImmediatePropagationStopped=e;n.clientX!=null&&(i=document.documentElement,r=document.body,n.pageX=n.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),n.pageY=n.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0));n.which=n.charCode||n.keyCode;n.button!=null&&(n.button=n.button&1?0:n.button&4?1:n.button&2?2:0)}return n},vjs.trigger=function(n,t){var u=vjs.hasData(n)?vjs.getData(n):{},i=n.parentNode||n.ownerDocument,r;return typeof t=="string"&&(t={type:t,target:n}),t=vjs.fixEvent(t),u.dispatcher&&u.dispatcher.call(n,t),i&&!t.isPropagationStopped()&&t.bubbles!==!1?vjs.trigger(i,t):i||t.defaultPrevented||(r=vjs.getData(t.target),t.target[t.type]&&(r.disabled=!0,typeof t.target[t.type]=="function"&&t.target[t.type](),r.disabled=!1)),!t.defaultPrevented},vjs.one=function(n,t,i){if(vjs.obj.isArray(t))return _handleMultipleEvents(vjs.one,n,t,i);var r=function(){vjs.off(n,t,r);i.apply(this,arguments)};r.guid=i.guid=i.guid||vjs.guid++;vjs.on(n,t,r)},hasOwnProp=Object.prototype.hasOwnProperty,vjs.createEl=function(n,t){var i;return n=n||"div",t=t||{},i=document.createElement(n),vjs.obj.each(t,function(n,t){n.indexOf("aria-")!==-1||n=="role"?i.setAttribute(n,t):i[n]=t}),i},vjs.capitalize=function(n){return n.charAt(0).toUpperCase()+n.slice(1)},vjs.obj={},vjs.obj.create=Object.create||function(n){function t(){}return t.prototype=n,new t},vjs.obj.each=function(n,t,i){for(var r in n)hasOwnProp.call(n,r)&&t.call(i||this,r,n[r])},vjs.obj.merge=function(n,t){if(!t)return n;for(var i in t)hasOwnProp.call(t,i)&&(n[i]=t[i]);return n},vjs.obj.deepMerge=function(n,t){var i,r,u;n=vjs.obj.copy(n);for(i in t)hasOwnProp.call(t,i)&&(r=n[i],u=t[i],n[i]=vjs.obj.isPlain(r)&&vjs.obj.isPlain(u)?vjs.obj.deepMerge(r,u):t[i]);return n},vjs.obj.copy=function(n){return vjs.obj.merge({},n)},vjs.obj.isPlain=function(n){return!!n&&typeof n=="object"&&n.toString()==="[object Object]"&&n.constructor===Object},vjs.obj.isArray=Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"},vjs.isNaN=function(n){return n!==n},vjs.bind=function(n,t,i){t.guid||(t.guid=vjs.guid++);var r=function(){return t.apply(n,arguments)};return r.guid=i?i+"_"+t.guid:t.guid,r},vjs.cache={},vjs.guid=1,vjs.expando="vdata"+(new Date).getTime(),vjs.getData=function(n){var t=n[vjs.expando];return t||(t=n[vjs.expando]=vjs.guid++,vjs.cache[t]={}),vjs.cache[t]},vjs.hasData=function(n){var t=n[vjs.expando];return!(!t||vjs.isEmpty(vjs.cache[t]))},vjs.removeData=function(n){var t=n[vjs.expando];if(t){delete vjs.cache[t];try{delete n[vjs.expando]}catch(i){n.removeAttribute?n.removeAttribute(vjs.expando):n[vjs.expando]=null}}},vjs.isEmpty=function(n){for(var t in n)if(n[t]!==null)return!1;return!0},vjs.hasClass=function(n,t){return(" "+n.className+" ").indexOf(" "+t+" ")!==-1},vjs.addClass=function(n,t){vjs.hasClass(n,t)||(n.className=n.className===""?t:n.className+" "+t)},vjs.removeClass=function(n,t){var i,r;if(vjs.hasClass(n,t)){for(i=n.className.split(" "),r=i.length-1;r>=0;r--)i[r]===t&&i.splice(r,1);n.className=i.join(" ")}},vjs.TEST_VID=vjs.createEl("video"),vjs.USER_AGENT=navigator.userAgent,vjs.IS_IPHONE=/iPhone/i.test(vjs.USER_AGENT),vjs.IS_IPAD=/iPad/i.test(vjs.USER_AGENT),vjs.IS_IPOD=/iPod/i.test(vjs.USER_AGENT),vjs.IS_IOS=vjs.IS_IPHONE||vjs.IS_IPAD||vjs.IS_IPOD,vjs.IOS_VERSION=function(){var n=vjs.USER_AGENT.match(/OS (\d+)_/i);if(n&&n[1])return n[1]}(),vjs.IS_ANDROID=/Android/i.test(vjs.USER_AGENT),vjs.ANDROID_VERSION=function(){var n=vjs.USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),t,i;return n?(t=n[1]&&parseFloat(n[1]),i=n[2]&&parseFloat(n[2]),t&&i?parseFloat(n[1]+"."+n[2]):t?t:null):null}(),vjs.IS_OLD_ANDROID=vjs.IS_ANDROID&&/webkit/i.test(vjs.USER_AGENT)&&vjs.ANDROID_VERSION<2.3,vjs.IS_FIREFOX=/Firefox/i.test(vjs.USER_AGENT),vjs.IS_CHROME=/Chrome/i.test(vjs.USER_AGENT),vjs.TOUCH_ENABLED=!!("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),vjs.BACKGROUND_SIZE_SUPPORTED=("backgroundSize"in vjs.TEST_VID.style),vjs.setElementAttributes=function(n,t){vjs.obj.each(t,function(t,i){i===null||typeof i=="undefined"||i===!1?n.removeAttribute(t):n.setAttribute(t,i===!0?"":i)})},vjs.getElementAttributes=function(n){var f,e,i,r,u,t;if(f={},e=",autoplay,controls,loop,muted,default,",n&&n.attributes&&n.attributes.length>0)for(i=n.attributes,t=i.length-1;t>=0;t--)r=i[t].name,u=i[t].value,(typeof n[r]=="boolean"||e.indexOf(","+r+",")!==-1)&&(u=u!==null?!0:!1),f[r]=u;return f},vjs.getComputedDimension=function(n,t){var i="";return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(n,"").getPropertyValue(t):n.currentStyle&&(i=n["client"+t.substr(0,1).toUpperCase()+t.substr(1)]+"px"),i},vjs.insertFirst=function(n,t){t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)},vjs.browser={},vjs.el=function(n){return n.indexOf("#")===0&&(n=n.slice(1)),document.getElementById(n)},vjs.formatTime=function(n,t){t=t||n;var i=Math.floor(n%60),r=Math.floor(n/60%60),u=Math.floor(n/3600),f=Math.floor(t/60%60),e=Math.floor(t/3600);return(isNaN(n)||n===Infinity)&&(u=r=i="-"),u=u>0||e>0?u+":":"",r=((u||f>=10)&&r<10?"0"+r:r)+":",i=i<10?"0"+i:i,u+r+i},vjs.blockTextSelection=function(){document.body.focus();document.onselectstart=function(){return!1}},vjs.unblockTextSelection=function(){document.onselectstart=function(){return!0}},vjs.trim=function(n){return(n+"").replace(/^\s+|\s+$/g,"")},vjs.round=function(n,t){return t||(t=0),Math.round(n*Math.pow(10,t))/Math.pow(10,t)},vjs.createTimeRange=function(n,t){return{length:1,start:function(){return n},end:function(){return t}}},vjs.get=function(n,t,i){var u,r;typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(n){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(i){}throw new Error("This browser does not support XMLHttpRequest.");});r=new XMLHttpRequest;try{r.open("GET",n)}catch(f){i(f)}u=n.indexOf("file:")===0||window.location.href.indexOf("file:")===0&&n.indexOf("http")===-1;r.onreadystatechange=function(){r.readyState===4&&(r.status===200||u&&r.status===0?t(r.responseText):i&&i())};try{r.send()}catch(f){i&&i(f)}},vjs.setLocalStorage=function(n,t){try{var r=window.localStorage||!1;if(!r)return;r[n]=t}catch(i){i.code==22||i.code==1014?vjs.log("LocalStorage Full (VideoJS)",i):i.code==18?vjs.log("LocalStorage not allowed (VideoJS)",i):vjs.log("LocalStorage Error (VideoJS)",i)}},vjs.getAbsoluteURL=function(n){return n.match(/^https?:\/\//)||(n=vjs.createEl("div",{innerHTML:'<a href="'+n+'">x<\/a>'}).firstChild.href),n},vjs.parseUrl=function(n){var t,i,f,u,e,r;for(u=["protocol","hostname","port","pathname","search","hash","host"],i=vjs.createEl("a",{href:n}),f=i.host===""&&i.protocol!=="file:",f&&(t=vjs.createEl("div"),t.innerHTML='<a href="'+n+'"><\/a>',i=t.firstChild,t.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(t)),e={},r=0;r<u.length;r++)e[u[r]]=i[u[r]];return f&&document.body.removeChild(t),e},vjs.log=function(){_logType(null,arguments)},vjs.log.history=[],vjs.log.error=function(){_logType("error",arguments)},vjs.log.warn=function(){_logType("warn",arguments)},vjs.findPosition=function(n){var i,r,t,u,f,e,o,s,h;return(n.getBoundingClientRect&&n.parentNode&&(i=n.getBoundingClientRect()),!i)?{left:0,top:0}:(r=document.documentElement,t=document.body,u=r.clientLeft||t.clientLeft||0,f=window.pageXOffset||t.scrollLeft,e=i.left+f-u,o=r.clientTop||t.clientTop||0,s=window.pageYOffset||t.scrollTop,h=i.top+s-o,{left:vjs.round(e),top:vjs.round(h)})},vjs.arr={},vjs.arr.forEach=function(n,t,i){if(vjs.obj.isArray(n)&&t instanceof Function)for(var r=0,u=n.length;r<u;++r)t.call(i||vjs,n[r],r,n);return n},vjs.xhr=function(n,t){var u,i,f,e,h,c,o,s,r;typeof n=="string"&&(n={uri:n});videojs.util.mergeOptions({method:"GET",timeout:45e3},n);t=t||function(){};s=function(){window.clearTimeout(o);t(null,i,i.response||i.responseText)};r=function(n){window.clearTimeout(o);n&&typeof n!="string"||(n=new Error(n));t(n,i)};u=window.XMLHttpRequest;typeof u=="undefined"&&(u=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(n){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(i){}throw new Error("This browser does not support XMLHttpRequest.");});i=new u;i.uri=n.uri;f=vjs.parseUrl(n.uri);e=window.location;c=f.protocol+f.host!==e.protocol+e.host;!c||!window.XDomainRequest||"withCredentials"in i?(h=f.protocol=="file:"||e.protocol=="file:",i.onreadystatechange=function(){if(i.readyState===4){if(i.timedout)return r("timeout");i.status===200||h&&i.status===0?s():r()}},n.timeout&&(o=window.setTimeout(function(){i.readyState!==4&&(i.timedout=!0,i.abort())},n.timeout))):(i=new window.XDomainRequest,i.onload=s,i.onerror=r,i.onprogress=function(){},i.ontimeout=function(){});try{i.open(n.method||"GET",n.uri,!0)}catch(l){return r(l)}n.withCredentials&&(i.withCredentials=!0);n.responseType&&(i.responseType=n.responseType);try{i.send()}catch(l){return r(l)}return i},vjs.util={},vjs.util.mergeOptions=function(n,t){var i,r,u;n=vjs.obj.copy(n);for(i in t)t.hasOwnProperty(i)&&(r=n[i],u=t[i],n[i]=vjs.obj.isPlain(r)&&vjs.obj.isPlain(u)?vjs.util.mergeOptions(r,u):t[i]);return n},vjs.Component=vjs.CoreObject.extend({init:function(n,t,i){this.player_=n;this.options_=vjs.obj.copy(this.options_);t=this.options(t);this.id_=t.id||t.el&&t.el.id;this.id_||(this.id_=(n.id&&n.id()||"no_player")+"_component_"+vjs.guid++);this.name_=t.name||null;this.el_=t.el||this.createEl();this.children_=[];this.childIndex_={};this.childNameIndex_={};this.initChildren();this.ready(i);t.reportTouchActivity!==!1&&this.enableTouchActivity()}}),vjs.Component.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var n=this.children_.length-1;n>=0;n--)this.children_[n].dispose&&this.children_[n].dispose();this.children_=null;this.childIndex_=null;this.childNameIndex_=null;this.off();this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_);vjs.removeData(this.el_);this.el_=null},vjs.Component.prototype.player_=!0,vjs.Component.prototype.player=function(){return this.player_},vjs.Component.prototype.options_,vjs.Component.prototype.options=function(n){return n===undefined?this.options_:this.options_=vjs.util.mergeOptions(this.options_,n)},vjs.Component.prototype.el_,vjs.Component.prototype.createEl=function(n,t){return vjs.createEl(n,t)},vjs.Component.prototype.localize=function(n){var i=this.player_.language(),t=this.player_.languages();return t&&t[i]&&t[i][n]?t[i][n]:n},vjs.Component.prototype.el=function(){return this.el_},vjs.Component.prototype.contentEl_,vjs.Component.prototype.contentEl=function(){return this.contentEl_||this.el_},vjs.Component.prototype.id_,vjs.Component.prototype.id=function(){return this.id_},vjs.Component.prototype.name_,vjs.Component.prototype.name=function(){return this.name_},vjs.Component.prototype.children_,vjs.Component.prototype.children=function(){return this.children_},vjs.Component.prototype.childIndex_,vjs.Component.prototype.getChildById=function(n){return this.childIndex_[n]},vjs.Component.prototype.childNameIndex_,vjs.Component.prototype.getChild=function(n){return this.childNameIndex_[n]},vjs.Component.prototype.addChild=function(n,t){var i,u,r;return typeof n=="string"?(r=n,t=t||{},u=t.componentClass||vjs.capitalize(r),t.name=r,i=new window.videojs[u](this.player_||this,t)):i=n,this.children_.push(i),typeof i.id=="function"&&(this.childIndex_[i.id()]=i),r=r||i.name&&i.name(),r&&(this.childNameIndex_[r]=i),typeof i.el=="function"&&i.el()&&this.contentEl().appendChild(i.el()),i},vjs.Component.prototype.removeChild=function(n){var i,t,r;if(typeof n=="string"&&(n=this.getChild(n)),n&&this.children_){for(i=!1,t=this.children_.length-1;t>=0;t--)if(this.children_[t]===n){i=!0;this.children_.splice(t,1);break}i&&(this.childIndex_[n.id]=null,this.childNameIndex_[n.name]=null,r=n.el(),r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(n.el()))}},vjs.Component.prototype.initChildren=function(){var i,r,n,t,f,e,o,u;if(i=this,r=i.options(),n=r.children,n)if(o=function(n,t){(r[n]!==undefined&&(t=r[n]),t!==!1)&&(i[n]=i.addChild(n,t))},vjs.obj.isArray(n))for(u=0;u<n.length;u++)t=n[u],typeof t=="string"?(f=t,e={}):(f=t.name,e=t),o(f,e);else vjs.obj.each(n,o)},vjs.Component.prototype.buildCSSClass=function(){return""},vjs.Component.prototype.on=function(n,t,i){var r,f,u,e,o,s;if(typeof n=="string"||vjs.obj.isArray(n))vjs.on(this.el_,n,vjs.bind(this,t));else{r=n;f=t;u=vjs.bind(this,i);s=this;e=function(){s.off(r,f,u)};e.guid=u.guid;this.on("dispose",e);if(o=function(){s.off("dispose",e)},o.guid=u.guid,n.nodeName){vjs.on(r,f,u);vjs.on(r,"dispose",o)}else if(typeof n.on=="function"){r.on(f,u);r.on("dispose",o)}}return this},vjs.Component.prototype.off=function(n,t,i){var u,f,r;return!n||typeof n=="string"||vjs.obj.isArray(n)?vjs.off(this.el_,n,t):(u=n,f=t,r=vjs.bind(this,i),this.off("dispose",r),n.nodeName?(vjs.off(u,f,r),vjs.off(u,"dispose",r)):(u.off(f,r),u.off("dispose",r))),this},vjs.Component.prototype.one=function(n,t,i){var u,f,e,o,r;if(typeof n=="string"||vjs.obj.isArray(n))vjs.one(this.el_,n,vjs.bind(this,t));else{u=n;f=t;e=vjs.bind(this,i);o=this;r=function(){o.off(u,f,r);e.apply(this,arguments)};r.guid=e.guid;this.on(u,f,r)}return this},vjs.Component.prototype.trigger=function(n){return vjs.trigger(this.el_,n),this},vjs.Component.prototype.isReady_,vjs.Component.prototype.isReadyOnInitFinish_=!0,vjs.Component.prototype.readyQueue_,vjs.Component.prototype.ready=function(n){return n&&(this.isReady_?n.call(this):(this.readyQueue_===undefined&&(this.readyQueue_=[]),this.readyQueue_.push(n))),this},vjs.Component.prototype.triggerReady=function(){var n,t,i;if(this.isReady_=!0,n=this.readyQueue_,n&&n.length>0){for(t=0,i=n.length;t<i;t++)n[t].call(this);this.readyQueue_=[];this.trigger("ready")}},vjs.Component.prototype.hasClass=function(n){return vjs.hasClass(this.el_,n)},vjs.Component.prototype.addClass=function(n){return vjs.addClass(this.el_,n),this},vjs.Component.prototype.removeClass=function(n){return vjs.removeClass(this.el_,n),this},vjs.Component.prototype.show=function(){return this.el_.style.display="block",this},vjs.Component.prototype.hide=function(){return this.el_.style.display="none",this},vjs.Component.prototype.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},vjs.Component.prototype.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},vjs.Component.prototype.disable=function(){this.hide();this.show=function(){}},vjs.Component.prototype.width=function(n,t){return this.dimension("width",n,t)},vjs.Component.prototype.height=function(n,t){return this.dimension("height",n,t)},vjs.Component.prototype.dimensions=function(n,t){return this.width(n,!0).height(t)},vjs.Component.prototype.dimension=function(n,t,i){if(t!==undefined)return(t===null||vjs.isNaN(t))&&(t=0),this.el_.style[n]=(""+t).indexOf("%")!==-1||(""+t).indexOf("px")!==-1?t:t==="auto"?"":t+"px",i||this.trigger("resize"),this;if(!this.el_)return 0;var r=this.el_.style[n],u=r.indexOf("px");return u!==-1?parseInt(r.slice(0,u),10):parseInt(this.el_["offset"+vjs.capitalize(n)],10)},vjs.Component.prototype.onResize,vjs.Component.prototype.emitTapEvents=function(){var i,n,e,t,r,u,f,o,s;i=0;n=null;s=22;this.on("touchstart",function(r){r.touches.length===1&&(n=r.touches[0],i=(new Date).getTime(),t=!0)});this.on("touchmove",function(i){i.touches.length>1?t=!1:n&&(u=i.touches[0].pageX-n.pageX,f=i.touches[0].pageY-n.pageY,o=Math.sqrt(u*u+f*f),o>s&&(t=!1))});r=function(){t=!1};this.on("touchleave",r);this.on("touchcancel",r);this.on("touchend",function(r){n=null;t===!0&&(e=(new Date).getTime()-i,e<250&&(r.preventDefault(),this.trigger("tap")))})},vjs.Component.prototype.enableTouchActivity=function(){var n,t,i;if(this.player().reportUserActivity){n=vjs.bind(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){n();this.clearInterval(t);t=this.setInterval(n,250)});i=function(){n();this.clearInterval(t)};this.on("touchmove",n);this.on("touchend",i);this.on("touchcancel",i)}},vjs.Component.prototype.setTimeout=function(n,t){n=vjs.bind(this,n);var i=setTimeout(n,t),r=function(){this.clearTimeout(i)};r.guid="vjs-timeout-"+i;this.on("dispose",r);return i},vjs.Component.prototype.clearTimeout=function(n){clearTimeout(n);var t=function(){};return t.guid="vjs-timeout-"+n,this.off("dispose",t),n},vjs.Component.prototype.setInterval=function(n,t){n=vjs.bind(this,n);var i=setInterval(n,t),r=function(){this.clearInterval(i)};r.guid="vjs-interval-"+i;this.on("dispose",r);return i},vjs.Component.prototype.clearInterval=function(n){clearInterval(n);var t=function(){};return t.guid="vjs-interval-"+n,this.off("dispose",t),n},vjs.Button=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t);this.emitTapEvents();this.on("tap",this.onClick);this.on("click",this.onClick);this.on("focus",this.onFocus);this.on("blur",this.onBlur)}}),vjs.Button.prototype.createEl=function(n,t){var i;return t=vjs.obj.merge({className:this.buildCSSClass(),role:"button","aria-live":"polite",tabIndex:0},t),i=vjs.Component.prototype.createEl.call(this,n,t),t.innerHTML||(this.contentEl_=vjs.createEl("div",{className:"vjs-control-content"}),this.controlText_=vjs.createEl("span",{className:"vjs-control-text",innerHTML:this.localize(this.buttonText)||"Need Text"}),this.contentEl_.appendChild(this.controlText_),i.appendChild(this.contentEl_)),i},vjs.Button.prototype.buildCSSClass=function(){return"vjs-control "+vjs.Component.prototype.buildCSSClass.call(this)},vjs.Button.prototype.onClick=function(){},vjs.Button.prototype.onFocus=function(){vjs.on(document,"keydown",vjs.bind(this,this.onKeyPress))},vjs.Button.prototype.onKeyPress=function(n){(n.which==32||n.which==13)&&(n.preventDefault(),this.onClick())},vjs.Button.prototype.onBlur=function(){vjs.off(document,"keydown",vjs.bind(this,this.onKeyPress))},vjs.Slider=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t);this.bar=this.getChild(this.options_.barName);this.handle=this.getChild(this.options_.handleName);this.on("mousedown",this.onMouseDown);this.on("touchstart",this.onMouseDown);this.on("focus",this.onFocus);this.on("blur",this.onBlur);this.on("click",this.onClick);this.on(n,"controlsvisible",this.update);this.on(n,this.playerEvent,this.update)}}),vjs.Slider.prototype.createEl=function(n,t){return t=t||{},t.className=t.className+" vjs-slider",t=vjs.obj.merge({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},t),vjs.Component.prototype.createEl.call(this,n,t)},vjs.Slider.prototype.onMouseDown=function(n){n.preventDefault();vjs.blockTextSelection();this.addClass("vjs-sliding");this.on(document,"mousemove",this.onMouseMove);this.on(document,"mouseup",this.onMouseUp);this.on(document,"touchmove",this.onMouseMove);this.on(document,"touchend",this.onMouseUp);this.onMouseMove(n)},vjs.Slider.prototype.onMouseMove=function(){},vjs.Slider.prototype.onMouseUp=function(){vjs.unblockTextSelection();this.removeClass("vjs-sliding");this.off(document,"mousemove",this.onMouseMove);this.off(document,"mouseup",this.onMouseUp);this.off(document,"touchmove",this.onMouseMove);this.off(document,"touchend",this.onMouseUp);this.update()},vjs.Slider.prototype.update=function(){if(this.el_){var t,n=this.getPercent(),i=this.handle,r=this.bar;if(isNaN(n)&&(n=0),t=n,i){var o=this.el_,s=o.offsetWidth,u=i.el().offsetWidth,f=u?u/s:0,h=1-f,e=n*h;t=e+f/2;i.el().style.left=vjs.round(e*100,2)+"%"}r&&(r.el().style.width=vjs.round(t*100,2)+"%")}},vjs.Slider.prototype.calculateDistance=function(n){var e,o,r,u,f,t,i,c,l,s,h;return e=this.el_,o=vjs.findPosition(e),f=t=e.offsetWidth,i=this.handle,this.options().vertical?(u=o.top,l=n.changedTouches?n.changedTouches[0].pageY:n.pageY,i&&(s=i.el().offsetHeight,u=u+s/2,t=t-s),Math.max(0,Math.min(1,(u-l+t)/t))):(r=o.left,c=n.changedTouches?n.changedTouches[0].pageX:n.pageX,i&&(h=i.el().offsetWidth,r=r+h/2,f=f-h),Math.max(0,Math.min(1,(c-r)/f)))},vjs.Slider.prototype.onFocus=function(){this.on(document,"keydown",this.onKeyPress)},vjs.Slider.prototype.onKeyPress=function(n){n.which==37||n.which==40?(n.preventDefault(),this.stepBack()):(n.which==38||n.which==39)&&(n.preventDefault(),this.stepForward())},vjs.Slider.prototype.onBlur=function(){this.off(document,"keydown",this.onKeyPress)},vjs.Slider.prototype.onClick=function(n){n.stopImmediatePropagation();n.preventDefault()},vjs.SliderHandle=vjs.Component.extend(),vjs.SliderHandle.prototype.defaultValue=0,vjs.SliderHandle.prototype.createEl=function(n,t){return t=t||{},t.className=t.className+" vjs-slider-handle",t=vjs.obj.merge({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"<\/span>"},t),vjs.Component.prototype.createEl.call(this,"div",t)},vjs.Menu=vjs.Component.extend(),vjs.Menu.prototype.addItem=function(n){this.addChild(n);n.on("click",vjs.bind(this,function(){this.unlockShowing()}))},vjs.Menu.prototype.createEl=function(){var t=this.options().contentElType||"ul",n;this.contentEl_=vjs.createEl(t,{className:"vjs-menu-content"});n=vjs.Component.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});n.appendChild(this.contentEl_);vjs.on(n,"click",function(n){n.preventDefault();n.stopImmediatePropagation()});return n},vjs.MenuItem=vjs.Button.extend({init:function(n,t){vjs.Button.call(this,n,t);this.selected(t.selected)}}),vjs.MenuItem.prototype.createEl=function(n,t){return vjs.Button.prototype.createEl.call(this,"li",vjs.obj.merge({className:"vjs-menu-item",innerHTML:this.localize(this.options_.label)},t))},vjs.MenuItem.prototype.onClick=function(){this.selected(!0)},vjs.MenuItem.prototype.selected=function(n){n?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-selected",!0)):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-selected",!1))},vjs.MenuButton=vjs.Button.extend({init:function(n,t){vjs.Button.call(this,n,t);this.menu=this.createMenu();this.addChild(this.menu);this.items&&this.items.length===0&&this.hide();this.on("keydown",this.onKeyPress);this.el_.setAttribute("aria-haspopup",!0);this.el_.setAttribute("role","button")}}),vjs.MenuButton.prototype.buttonPressed_=!1,vjs.MenuButton.prototype.createMenu=function(){var t=new vjs.Menu(this.player_),n;if(this.options().title&&t.contentEl().appendChild(vjs.createEl("li",{className:"vjs-menu-title",innerHTML:vjs.capitalize(this.options().title),tabindex:-1})),this.items=this.createItems(),this.items)for(n=0;n<this.items.length;n++)t.addItem(this.items[n]);return t},vjs.MenuButton.prototype.createItems=function(){},vjs.MenuButton.prototype.buildCSSClass=function(){return this.className+" vjs-menu-button "+vjs.Button.prototype.buildCSSClass.call(this)},vjs.MenuButton.prototype.onFocus=function(){},vjs.MenuButton.prototype.onBlur=function(){},vjs.MenuButton.prototype.onClick=function(){this.one("mouseout",vjs.bind(this,function(){this.menu.unlockShowing();this.el_.blur()}));this.buttonPressed_?this.unpressButton():this.pressButton()},vjs.MenuButton.prototype.onKeyPress=function(n){n.which==32||n.which==13?(this.buttonPressed_?this.unpressButton():this.pressButton(),n.preventDefault()):n.which==27&&(this.buttonPressed_&&this.unpressButton(),n.preventDefault())},vjs.MenuButton.prototype.pressButton=function(){this.buttonPressed_=!0;this.menu.lockShowing();this.el_.setAttribute("aria-pressed",!0);this.items&&this.items.length>0&&this.items[0].el().focus()},vjs.MenuButton.prototype.unpressButton=function(){this.buttonPressed_=!1;this.menu.unlockShowing();this.el_.setAttribute("aria-pressed",!1)},vjs.MediaError=function(n){typeof n=="number"?this.code=n:typeof n=="string"?this.message=n:typeof n=="object"&&vjs.obj.merge(this,n);this.message||(this.message=vjs.MediaError.defaultMessages[this.code]||"")},vjs.MediaError.prototype.code=0,vjs.MediaError.prototype.message="",vjs.MediaError.prototype.status=null,vjs.MediaError.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],vjs.MediaError.defaultMessages={1:"You aborted the video playback",2:"A network error caused the video download to fail part-way.",3:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",4:"The video could not be loaded, either because the server or network failed or because the format is not supported.",5:"The video is encrypted and we do not have the keys to decrypt it."},errNum=0;errNum<vjs.MediaError.errorTypes.length;errNum++)vjs.MediaError[vjs.MediaError.errorTypes[errNum]]=errNum,vjs.MediaError.prototype[vjs.MediaError.errorTypes[errNum]]=errNum;if(function(){var t,r,i,n;for(vjs.browser.fullscreenAPI,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=t[0],n=0;n<t.length;n++)if(t[n][1]in document){i=t[n];break}if(i)for(vjs.browser.fullscreenAPI={},n=0;n<i.length;n++)vjs.browser.fullscreenAPI[r[n]]=i[n]}(),vjs.Player=vjs.Component.extend({init:function(n,t,i){this.tag=n;n.id=n.id||"vjs_video_"+vjs.guid++;this.tagAttributes=n&&vjs.getElementAttributes(n);t=vjs.obj.merge(this.getTagSettings(n),t);this.language_=t.language||vjs.options.language;this.languages_=t.languages||vjs.options.languages;this.cache_={};this.poster_=t.poster||"";this.controls_=!!t.controls;n.controls=!1;t.reportTouchActivity=!1;this.isAudio(this.tag.nodeName.toLowerCase()==="audio");vjs.Component.call(this,this,t,i);this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled");this.isAudio()&&this.addClass("vjs-audio");vjs.players[this.id_]=this;t.plugins&&vjs.obj.each(t.plugins,function(n,t){this[n](t)},this);this.listenForUserActivity()}}),vjs.Player.prototype.language_,vjs.Player.prototype.language=function(n){return n===undefined?this.language_:(this.language_=n,this)},vjs.Player.prototype.languages_,vjs.Player.prototype.languages=function(){return this.languages_},vjs.Player.prototype.options_=vjs.options,vjs.Player.prototype.dispose=function(){this.trigger("dispose");this.off("dispose");vjs.players[this.id_]=null;this.tag&&this.tag.player&&(this.tag.player=null);this.el_&&this.el_.player&&(this.el_.player=null);this.tech&&this.tech.dispose();vjs.Component.prototype.dispose.call(this)},vjs.Player.prototype.getTagSettings=function(n){var t,f,i={sources:[],tracks:[]},e,r,o,u,s;if(t=vjs.getElementAttributes(n),f=t["data-setup"],f!==null&&vjs.obj.merge(t,vjs.JSON.parse(f||"{}")),vjs.obj.merge(i,t),n.hasChildNodes())for(e=n.childNodes,u=0,s=e.length;u<s;u++)r=e[u],o=r.nodeName.toLowerCase(),o==="source"?i.sources.push(vjs.getElementAttributes(r)):o==="track"&&i.tracks.push(vjs.getElementAttributes(r));return i},vjs.Player.prototype.createEl=function(){var t=this.el_=vjs.Component.prototype.createEl.call(this,"div"),n=this.tag,i,f,e,r,o,s,u;if(n.removeAttribute("width"),n.removeAttribute("height"),n.hasChildNodes()){for(f=n.childNodes,e=f.length,u=[];e--;)o=f[e],s=o.nodeName.toLowerCase(),s==="track"&&u.push(o);for(r=0;r<u.length;r++)n.removeChild(u[r])}i=vjs.getElementAttributes(n);vjs.obj.each(i,function(n){n=="class"?t.className=i[n]:t.setAttribute(n,i[n])});n.id+="_html5_api";n.className="vjs-tech";n.player=t.player=this;this.addClass("vjs-paused");this.width(this.options_.width,!0);this.height(this.options_.height,!0);n.initNetworkState_=n.networkState;n.parentNode&&n.parentNode.insertBefore(t,n);vjs.insertFirst(n,t);this.el_=t;this.on("loadstart",this.onLoadStart);this.on("waiting",this.onWaiting);this.on(["canplay","canplaythrough","playing","ended"],this.onWaitEnd);this.on("seeking",this.onSeeking);this.on("seeked",this.onSeeked);this.on("ended",this.onEnded);this.on("play",this.onPlay);this.on("firstplay",this.onFirstPlay);this.on("pause",this.onPause);this.on("progress",this.onProgress);this.on("durationchange",this.onDurationChange);this.on("fullscreenchange",this.onFullscreenChange);return t},vjs.Player.prototype.loadTech=function(n,t){this.tech&&this.unloadTech();n!=="Html5"&&this.tag&&(vjs.Html5.disposeMediaElement(this.tag),this.tag=null);this.techName=n;this.isReady_=!1;var r=function(){this.player_.triggerReady()},i=vjs.obj.merge({source:t,parentEl:this.el_},this.options_[n.toLowerCase()]);t&&(this.currentType_=t.type,t.src==this.cache_.src&&this.cache_.currentTime>0&&(i.startTime=this.cache_.currentTime),this.cache_.src=t.src);this.tech=new window.videojs[n](this,i);this.tech.ready(r)},vjs.Player.prototype.unloadTech=function(){this.isReady_=!1;this.tech.dispose();this.manualProgress&&this.manualProgressOff();this.manualTimeUpdates&&this.manualTimeUpdatesOff();this.tech=!1},vjs.Player.prototype.onLoadStart=function(){if(this.error(null),this.paused()){this.hasStarted(!1);this.one("play",function(){this.hasStarted(!0)})}else this.trigger("firstplay")},vjs.Player.prototype.hasStarted_=!1,vjs.Player.prototype.hasStarted=function(n){return n!==undefined?(this.hasStarted_!==n&&(this.hasStarted_=n,n?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):this.hasStarted_},vjs.Player.prototype.onLoadedMetaData,vjs.Player.prototype.onLoadedData,vjs.Player.prototype.onLoadedAllData,vjs.Player.prototype.onPlay=function(){this.removeClass("vjs-paused");this.addClass("vjs-playing")},vjs.Player.prototype.onWaiting=function(){this.addClass("vjs-waiting")},vjs.Player.prototype.onWaitEnd=function(){this.removeClass("vjs-waiting")},vjs.Player.prototype.onSeeking=function(){this.addClass("vjs-seeking")},vjs.Player.prototype.onSeeked=function(){this.removeClass("vjs-seeking")},vjs.Player.prototype.onFirstPlay=function(){this.options_.starttime&&this.currentTime(this.options_.starttime);this.addClass("vjs-has-started")},vjs.Player.prototype.onPause=function(){this.removeClass("vjs-playing");this.addClass("vjs-paused")},vjs.Player.prototype.onTimeUpdate,vjs.Player.prototype.onProgress=function(){this.bufferedPercent()==1&&this.trigger("loadedalldata")},vjs.Player.prototype.onEnded=function(){this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause()},vjs.Player.prototype.onDurationChange=function(){var n=this.techGet("duration");n&&(n<0&&(n=Infinity),this.duration(n),n===Infinity?this.addClass("vjs-live"):this.removeClass("vjs-live"))},vjs.Player.prototype.onVolumeChange,vjs.Player.prototype.onFullscreenChange=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},vjs.Player.prototype.onError=function(n){vjs.log("Video Error",n)},vjs.Player.prototype.cache_,vjs.Player.prototype.getCache=function(){return this.cache_},vjs.Player.prototype.techCall=function(n,t){if(this.tech&&!this.tech.isReady_)this.tech.ready(function(){this[n](t)});else try{this.tech[n](t)}catch(i){vjs.log(i);throw i;}},vjs.Player.prototype.techGet=function(n){if(this.tech&&this.tech.isReady_)try{return this.tech[n]()}catch(t){this.tech[n]===undefined?vjs.log("Video.js: "+n+" method not defined for "+this.techName+" playback technology.",t):t.name=="TypeError"?(vjs.log("Video.js: "+n+" unavailable on "+this.techName+" playback technology element.",t),this.tech.isReady_=!1):vjs.log(t);throw t;}return},vjs.Player.prototype.play=function(){return this.techCall("play"),this},vjs.Player.prototype.pause=function(){return this.techCall("pause"),this},vjs.Player.prototype.paused=function(){return this.techGet("paused")===!1?!1:!0},vjs.Player.prototype.currentTime=function(n){return n!==undefined?(this.techCall("setCurrentTime",n),this):this.cache_.currentTime=this.techGet("currentTime")||0},vjs.Player.prototype.duration=function(n){return n!==undefined?(this.cache_.duration=parseFloat(n),this):(this.cache_.duration===undefined&&this.onDurationChange(),this.cache_.duration||0)},vjs.Player.prototype.remainingTime=function(){return this.duration()-this.currentTime()},vjs.Player.prototype.buffered=function(){var n=this.techGet("buffered");return n&&n.length||(n=vjs.createTimeRange(0,0)),n},vjs.Player.prototype.bufferedPercent=function(){var t=this.duration(),r=this.buffered(),u=0,f,i,n;if(!t)return 0;for(n=0;n<r.length;n++)f=r.start(n),i=r.end(n),i>t&&(i=t),u+=i-f;return u/t},vjs.Player.prototype.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),n=t.end(t.length-1);return n>i&&(n=i),n},vjs.Player.prototype.volume=function(n){var t;return n!==undefined?(t=Math.max(0,Math.min(1,parseFloat(n))),this.cache_.volume=t,this.techCall("setVolume",t),vjs.setLocalStorage("volume",t),this):(t=parseFloat(this.techGet("volume")),isNaN(t)?1:t)},vjs.Player.prototype.muted=function(n){return n!==undefined?(this.techCall("setMuted",n),this):this.techGet("muted")||!1},vjs.Player.prototype.supportsFullScreen=function(){return this.techGet("supportsFullScreen")||!1},vjs.Player.prototype.isFullscreen_=!1,vjs.Player.prototype.isFullscreen=function(n){return n!==undefined?(this.isFullscreen_=!!n,this):this.isFullscreen_},vjs.Player.prototype.isFullScreen=function(n){return vjs.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")'),this.isFullscreen(n)},vjs.Player.prototype.requestFullscreen=function(){var n=vjs.browser.fullscreenAPI;if(this.isFullscreen(!0),n){vjs.on(document,n.fullscreenchange,vjs.bind(this,function(){this.isFullscreen(document[n.fullscreenElement]);this.isFullscreen()===!1&&vjs.off(document,n.fullscreenchange,arguments.callee);this.trigger("fullscreenchange")}));this.el_[n.requestFullscreen]()}else this.tech.supportsFullScreen()?this.techCall("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"));return this},vjs.Player.prototype.requestFullScreen=function(){return vjs.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")'),this.requestFullscreen()},vjs.Player.prototype.exitFullscreen=function(){var n=vjs.browser.fullscreenAPI;return this.isFullscreen(!1),n?document[n.exitFullscreen]():this.tech.supportsFullScreen()?this.techCall("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},vjs.Player.prototype.cancelFullScreen=function(){return vjs.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()"),this.exitFullscreen()},vjs.Player.prototype.enterFullWindow=function(){this.isFullWindow=!0;this.docOrigOverflow=document.documentElement.style.overflow;vjs.on(document,"keydown",vjs.bind(this,this.fullWindowOnEscKey));document.documentElement.style.overflow="hidden";vjs.addClass(document.body,"vjs-full-window");this.trigger("enterFullWindow")},vjs.Player.prototype.fullWindowOnEscKey=function(n){n.keyCode===27&&(this.isFullscreen()===!0?this.exitFullscreen():this.exitFullWindow())},vjs.Player.prototype.exitFullWindow=function(){this.isFullWindow=!1;vjs.off(document,"keydown",this.fullWindowOnEscKey);document.documentElement.style.overflow=this.docOrigOverflow;vjs.removeClass(document.body,"vjs-full-window");this.trigger("exitFullWindow")},vjs.Player.prototype.selectSource=function(n){for(var t,i,r,u,f,e=0,o=this.options_.techOrder;e<o.length;e++){if(t=vjs.capitalize(o[e]),i=window.videojs[t],!i){vjs.log.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.');continue}if(i.isSupported())for(r=0,u=n;r<u.length;r++)if(f=u[r],i.canPlaySource(f))return{source:f,tech:t}}return!1},vjs.Player.prototype.src=function(n){return n===undefined?this.techGet("src"):(vjs.obj.isArray(n)?this.sourceList_(n):typeof n=="string"?this.src({src:n}):n instanceof Object&&(n.type&&!window.videojs[this.techName].canPlaySource(n)?this.sourceList_([n]):(this.cache_.src=n.src,this.currentType_=n.type||"",this.ready(function(){window.videojs[this.techName].prototype.hasOwnProperty("setSource")?this.techCall("setSource",n):this.techCall("src",n.src);this.options_.preload=="auto"&&this.load();this.options_.autoplay&&this.play()}))),this)},vjs.Player.prototype.sourceList_=function(n){var t=this.selectSource(n);t?t.tech===this.techName?this.src(t.source):this.loadTech(t.tech,t.source):(this.setTimeout(function(){this.error({code:4,message:this.localize(this.options().notSupportedMessage)})},0),this.triggerReady())},vjs.Player.prototype.load=function(){return this.techCall("load"),this},vjs.Player.prototype.currentSrc=function(){return this.techGet("currentSrc")||this.cache_.src||""},vjs.Player.prototype.currentType=function(){return this.currentType_||""},vjs.Player.prototype.preload=function(n){return n!==undefined?(this.techCall("setPreload",n),this.options_.preload=n,this):this.techGet("preload")},vjs.Player.prototype.autoplay=function(n){return n!==undefined?(this.techCall("setAutoplay",n),this.options_.autoplay=n,this):this.techGet("autoplay",n)},vjs.Player.prototype.loop=function(n){return n!==undefined?(this.techCall("setLoop",n),this.options_.loop=n,this):this.techGet("loop")},vjs.Player.prototype.poster_,vjs.Player.prototype.poster=function(n){return n===undefined?this.poster_:(n||(n=""),this.poster_=n,this.techCall("setPoster",n),this.trigger("posterchange"),this)},vjs.Player.prototype.controls_,vjs.Player.prototype.controls=function(n){return n!==undefined?(n=!!n,this.controls_!==n&&(this.controls_=n,n?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled")):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"))),this):this.controls_},vjs.Player.prototype.usingNativeControls_,vjs.Player.prototype.usingNativeControls=function(n){return n!==undefined?(n=!!n,this.usingNativeControls_!==n&&(this.usingNativeControls_=n,n?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):this.usingNativeControls_},vjs.Player.prototype.error_=null,vjs.Player.prototype.error=function(n){return n===undefined?this.error_:n===null?(this.error_=n,this.removeClass("vjs-error"),this):(this.error_=n instanceof vjs.MediaError?n:new vjs.MediaError(n),this.trigger("error"),this.addClass("vjs-error"),vjs.log.error("(CODE:"+this.error_.code+" "+vjs.MediaError.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this)},vjs.Player.prototype.ended=function(){return this.techGet("ended")},vjs.Player.prototype.seeking=function(){return this.techGet("seeking")},vjs.Player.prototype.userActivity_=!0,vjs.Player.prototype.reportUserActivity=function(){this.userActivity_=!0},vjs.Player.prototype.userActive_=!0,vjs.Player.prototype.userActive=function(n){if(n!==undefined){if(n=!!n,n!==this.userActive_)if(this.userActive_=n,n)this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");else{if(this.userActivity_=!1,this.tech)this.tech.one("mousemove",function(n){n.stopPropagation();n.preventDefault()});this.removeClass("vjs-user-active");this.addClass("vjs-user-inactive");this.trigger("userinactive")}return this}return this.userActive_},vjs.Player.prototype.listenForUserActivity=function(){var n,i,r,t,u,s,f,e,o;n=vjs.bind(this,this.reportUserActivity);i=function(t){(t.screenX!=e||t.screenY!=o)&&(e=t.screenX,o=t.screenY,n())};r=function(){n();this.clearInterval(t);t=this.setInterval(n,250)};u=function(){n();this.clearInterval(t)};this.on("mousedown",r);this.on("mousemove",i);this.on("mouseup",u);this.on("keydown",n);this.on("keyup",n);s=this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1;this.userActive(!0);this.clearTimeout(f);var n=this.options().inactivityTimeout;n>0&&(f=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},n))}},250)},vjs.Player.prototype.playbackRate=function(n){return n!==undefined?(this.techCall("setPlaybackRate",n),this):this.tech&&this.tech.featuresPlaybackRate?this.techGet("playbackRate"):1},vjs.Player.prototype.isAudio_=!1,vjs.Player.prototype.isAudio=function(n){return n!==undefined?(this.isAudio_=!!n,this):this.isAudio_},vjs.ControlBar=vjs.Component.extend(),vjs.ControlBar.prototype.options_={loadEvent:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},liveDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{},playbackRateMenuButton:{}}},vjs.ControlBar.prototype.createEl=function(){return vjs.createEl("div",{className:"vjs-control-bar"})},vjs.LiveDisplay=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t)}}),vjs.LiveDisplay.prototype.createEl=function(){var n=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-live-controls vjs-control"});return this.contentEl_=vjs.createEl("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"<\/span>"+this.localize("LIVE"),"aria-live":"off"}),n.appendChild(this.contentEl_),n},vjs.PlayToggle=vjs.Button.extend({init:function(n,t){vjs.Button.call(this,n,t);this.on(n,"play",this.onPlay);this.on(n,"pause",this.onPause)}}),vjs.PlayToggle.prototype.buttonText="Play",vjs.PlayToggle.prototype.buildCSSClass=function(){return"vjs-play-control "+vjs.Button.prototype.buildCSSClass.call(this)},vjs.PlayToggle.prototype.onClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},vjs.PlayToggle.prototype.onPlay=function(){this.removeClass("vjs-paused");this.addClass("vjs-playing");this.el_.children[0].children[0].innerHTML=this.localize("Pause")},vjs.PlayToggle.prototype.onPause=function(){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.el_.children[0].children[0].innerHTML=this.localize("Play")},vjs.CurrentTimeDisplay=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t);this.on(n,"timeupdate",this.updateContent)}}),vjs.CurrentTimeDisplay.prototype.createEl=function(){var n=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});return this.contentEl_=vjs.createEl("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time <\/span>0:00',"aria-live":"off"}),n.appendChild(this.contentEl_),n},vjs.CurrentTimeDisplay.prototype.updateContent=function(){var n=this.player_.scrubbing?this.player_.getCache().currentTime:this.player_.currentTime();this.contentEl_.innerHTML='<span class="vjs-control-text">'+this.localize("Current Time")+"<\/span> "+vjs.formatTime(n,this.player_.duration())},vjs.DurationDisplay=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t);this.on(n,"timeupdate",this.updateContent)}}),vjs.DurationDisplay.prototype.createEl=function(){var n=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});return this.contentEl_=vjs.createEl("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"<\/span> 0:00","aria-live":"off"}),n.appendChild(this.contentEl_),n},vjs.DurationDisplay.prototype.updateContent=function(){var n=this.player_.duration();n&&(this.contentEl_.innerHTML='<span class="vjs-control-text">'+this.localize("Duration Time")+"<\/span> "+vjs.formatTime(n))},vjs.TimeDivider=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t)}}),vjs.TimeDivider.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/<\/span><\/div>"})},vjs.RemainingTimeDisplay=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t);this.on(n,"timeupdate",this.updateContent)}}),vjs.RemainingTimeDisplay.prototype.createEl=function(){var n=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});return this.contentEl_=vjs.createEl("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Remaining Time")+"<\/span> -0:00","aria-live":"off"}),n.appendChild(this.contentEl_),n},vjs.RemainingTimeDisplay.prototype.updateContent=function(){this.player_.duration()&&(this.contentEl_.innerHTML='<span class="vjs-control-text">'+this.localize("Remaining Time")+"<\/span> -"+vjs.formatTime(this.player_.remainingTime()))},vjs.FullscreenToggle=vjs.Button.extend({init:function(n,t){vjs.Button.call(this,n,t)}}),vjs.FullscreenToggle.prototype.buttonText="Fullscreen",vjs.FullscreenToggle.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+vjs.Button.prototype.buildCSSClass.call(this)},vjs.FullscreenToggle.prototype.onClick=function(){this.player_.isFullscreen()?(this.player_.exitFullscreen(),this.controlText_.innerHTML=this.localize("Fullscreen")):(this.player_.requestFullscreen(),this.controlText_.innerHTML=this.localize("Non-Fullscreen"))},vjs.ProgressControl=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t)}}),vjs.ProgressControl.prototype.options_={children:{seekBar:{}}},vjs.ProgressControl.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},vjs.SeekBar=vjs.Slider.extend({init:function(n,t){vjs.Slider.call(this,n,t);this.on(n,"timeupdate",this.updateARIAAttributes);n.ready(vjs.bind(this,this.updateARIAAttributes))}}),vjs.SeekBar.prototype.options_={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"},vjs.SeekBar.prototype.playerEvent="timeupdate",vjs.SeekBar.prototype.createEl=function(){return vjs.Slider.prototype.createEl.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})},vjs.SeekBar.prototype.updateARIAAttributes=function(){var n=this.player_.scrubbing?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("aria-valuenow",vjs.round(this.getPercent()*100,2));this.el_.setAttribute("aria-valuetext",vjs.formatTime(n,this.player_.duration()))},vjs.SeekBar.prototype.getPercent=function(){return this.player_.currentTime()/this.player_.duration()},vjs.SeekBar.prototype.onMouseDown=function(n){vjs.Slider.prototype.onMouseDown.call(this,n);this.player_.scrubbing=!0;this.videoWasPlaying=!this.player_.paused();this.player_.pause()},vjs.SeekBar.prototype.onMouseMove=function(n){var t=this.calculateDistance(n)*this.player_.duration();t==this.player_.duration()&&(t=t-.1);this.player_.currentTime(t)},vjs.SeekBar.prototype.onMouseUp=function(n){vjs.Slider.prototype.onMouseUp.call(this,n);this.player_.scrubbing=!1;this.videoWasPlaying&&this.player_.play()},vjs.SeekBar.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},vjs.SeekBar.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},vjs.LoadProgressBar=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t);this.on(n,"progress",this.update)}}),vjs.LoadProgressBar.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"<\/span>: 0%<\/span>"})},vjs.LoadProgressBar.prototype.update=function(){var n,r,o,t,i=this.player_.buffered(),s=this.player_.duration(),u=this.player_.bufferedEnd(),f=this.el_.children,e=function(n,t){var i=n/t||0;return i*100+"%"};for(this.el_.style.width=e(u,s),n=0;n<i.length;n++)r=i.start(n),o=i.end(n),t=f[n],t||(t=this.el_.appendChild(vjs.createEl())),t.style.left=e(r,u),t.style.width=e(o-r,u);for(n=f.length;n>i.length;n--)this.el_.removeChild(f[n-1])},vjs.PlayProgressBar=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t)}}),vjs.PlayProgressBar.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"<\/span>: 0%<\/span>"})},vjs.SeekHandle=vjs.SliderHandle.extend({init:function(n,t){vjs.SliderHandle.call(this,n,t);this.on(n,"timeupdate",this.updateContent)}}),vjs.SeekHandle.prototype.defaultValue="00:00",vjs.SeekHandle.prototype.createEl=function(){return vjs.SliderHandle.prototype.createEl.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})},vjs.SeekHandle.prototype.updateContent=function(){var n=this.player_.scrubbing?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.innerHTML='<span class="vjs-control-text">'+vjs.formatTime(n,this.player_.duration())+"<\/span>"},vjs.VolumeControl=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t);n.tech&&n.tech.featuresVolumeControl===!1&&this.addClass("vjs-hidden");this.on(n,"loadstart",function(){n.tech.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})}}),vjs.VolumeControl.prototype.options_={children:{volumeBar:{}}},vjs.VolumeControl.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},vjs.VolumeBar=vjs.Slider.extend({init:function(n,t){vjs.Slider.call(this,n,t);this.on(n,"volumechange",this.updateARIAAttributes);n.ready(vjs.bind(this,this.updateARIAAttributes))}}),vjs.VolumeBar.prototype.updateARIAAttributes=function(){this.el_.setAttribute("aria-valuenow",vjs.round(this.player_.volume()*100,2));this.el_.setAttribute("aria-valuetext",vjs.round(this.player_.volume()*100,2)+"%")},vjs.VolumeBar.prototype.options_={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"},vjs.VolumeBar.prototype.playerEvent="volumechange",vjs.VolumeBar.prototype.createEl=function(){return vjs.Slider.prototype.createEl.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})},vjs.VolumeBar.prototype.onMouseMove=function(n){this.player_.muted()&&this.player_.muted(!1);this.player_.volume(this.calculateDistance(n))},vjs.VolumeBar.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},vjs.VolumeBar.prototype.stepForward=function(){this.player_.volume(this.player_.volume()+.1)},vjs.VolumeBar.prototype.stepBack=function(){this.player_.volume(this.player_.volume()-.1)},vjs.VolumeLevel=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t)}}),vjs.VolumeLevel.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"><\/span>'})},vjs.VolumeHandle=vjs.SliderHandle.extend(),vjs.VolumeHandle.prototype.defaultValue="00:00",vjs.VolumeHandle.prototype.createEl=function(){return vjs.SliderHandle.prototype.createEl.call(this,"div",{className:"vjs-volume-handle"})},vjs.MuteToggle=vjs.Button.extend({init:function(n,t){vjs.Button.call(this,n,t);this.on(n,"volumechange",this.update);n.tech&&n.tech.featuresVolumeControl===!1&&this.addClass("vjs-hidden");this.on(n,"loadstart",function(){n.tech.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})}}),vjs.MuteToggle.prototype.createEl=function(){return vjs.Button.prototype.createEl.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.localize("Mute")+"<\/span><\/div>"})},vjs.MuteToggle.prototype.onClick=function(){this.player_.muted(this.player_.muted()?!1:!0)},vjs.MuteToggle.prototype.update=function(){var i=this.player_.volume(),n=3,t;for(i===0||this.player_.muted()?n=0:i<.33?n=1:i<.67&&(n=2),this.player_.muted()?this.el_.children[0].children[0].innerHTML!=this.localize("Unmute")&&(this.el_.children[0].children[0].innerHTML=this.localize("Unmute")):this.el_.children[0].children[0].innerHTML!=this.localize("Mute")&&(this.el_.children[0].children[0].innerHTML=this.localize("Mute")),t=0;t<4;t++)vjs.removeClass(this.el_,"vjs-vol-"+t);vjs.addClass(this.el_,"vjs-vol-"+n)},vjs.VolumeMenuButton=vjs.MenuButton.extend({init:function(n,t){vjs.MenuButton.call(this,n,t);this.on(n,"volumechange",this.update);n.tech&&n.tech.featuresVolumeControl===!1&&this.addClass("vjs-hidden");this.on(n,"loadstart",function(){n.tech.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")});this.addClass("vjs-menu-button")}}),vjs.VolumeMenuButton.prototype.createMenu=function(){var n=new vjs.Menu(this.player_,{contentElType:"div"}),t=new vjs.VolumeBar(this.player_,this.options_.volumeBar);t.on("focus",function(){n.lockShowing()});t.on("blur",function(){n.unlockShowing()});return n.addChild(t),n},vjs.VolumeMenuButton.prototype.onClick=function(){vjs.MuteToggle.prototype.onClick.call(this);vjs.MenuButton.prototype.onClick.call(this)},vjs.VolumeMenuButton.prototype.createEl=function(){return vjs.Button.prototype.createEl.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.localize("Mute")+"<\/span><\/div>"})},vjs.VolumeMenuButton.prototype.update=vjs.MuteToggle.prototype.update,vjs.PlaybackRateMenuButton=vjs.MenuButton.extend({init:function(n,t){vjs.MenuButton.call(this,n,t);this.updateVisibility();this.updateLabel();this.on(n,"loadstart",this.updateVisibility);this.on(n,"ratechange",this.updateLabel)}}),vjs.PlaybackRateMenuButton.prototype.buttonText="Playback Rate",vjs.PlaybackRateMenuButton.prototype.className="vjs-playback-rate",vjs.PlaybackRateMenuButton.prototype.createEl=function(){var n=vjs.MenuButton.prototype.createEl.call(this);return this.labelEl_=vjs.createEl("div",{className:"vjs-playback-rate-value",innerHTML:1}),n.appendChild(this.labelEl_),n},vjs.PlaybackRateMenuButton.prototype.createMenu=function(){var i=new vjs.Menu(this.player()),t=this.player().options().playbackRates,n;if(t)for(n=t.length-1;n>=0;n--)i.addChild(new vjs.PlaybackRateMenuItem(this.player(),{rate:t[n]+"x"}));return i},vjs.PlaybackRateMenuButton.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},vjs.PlaybackRateMenuButton.prototype.onClick=function(){for(var r=this.player().playbackRate(),n=this.player().options().playbackRates,i=n[0],t=0;t<n.length;t++)if(n[t]>r){i=n[t];break}this.player().playbackRate(i)},vjs.PlaybackRateMenuButton.prototype.playbackRateSupported=function(){return this.player().tech&&this.player().tech.featuresPlaybackRate&&this.player().options().playbackRates&&this.player().options().playbackRates.length>0},vjs.PlaybackRateMenuButton.prototype.updateVisibility=function(){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},vjs.PlaybackRateMenuButton.prototype.updateLabel=function(){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},vjs.PlaybackRateMenuItem=vjs.MenuItem.extend({contentElType:"button",init:function(n,t){var i=this.label=t.rate,r=this.rate=parseFloat(i,10);t.label=i;t.selected=r===1;vjs.MenuItem.call(this,n,t);this.on(n,"ratechange",this.update)}}),vjs.PlaybackRateMenuItem.prototype.onClick=function(){vjs.MenuItem.prototype.onClick.call(this);this.player().playbackRate(this.rate)},vjs.PlaybackRateMenuItem.prototype.update=function(){this.selected(this.player().playbackRate()==this.rate)},vjs.PosterImage=vjs.Button.extend({init:function(n,t){vjs.Button.call(this,n,t);this.update();n.on("posterchange",vjs.bind(this,this.update))}}),vjs.PosterImage.prototype.dispose=function(){this.player().off("posterchange",this.update);vjs.Button.prototype.dispose.call(this)},vjs.PosterImage.prototype.createEl=function(){var n=vjs.createEl("div",{className:"vjs-poster",tabIndex:-1});return vjs.BACKGROUND_SIZE_SUPPORTED||(this.fallbackImg_=vjs.createEl("img"),n.appendChild(this.fallbackImg_)),n},vjs.PosterImage.prototype.update=function(){var n=this.player().poster();this.setSrc(n);n?this.el_.style.display="":this.hide()},vjs.PosterImage.prototype.setSrc=function(n){var t;this.fallbackImg_?this.fallbackImg_.src=n:(t="",n&&(t='url("'+n+'")'),this.el_.style.backgroundImage=t)},vjs.PosterImage.prototype.onClick=function(){this.player_.play()},vjs.LoadingSpinner=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t)}}),vjs.LoadingSpinner.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner"})},vjs.BigPlayButton=vjs.Button.extend(),vjs.BigPlayButton.prototype.createEl=function(){return vjs.Button.prototype.createEl.call(this,"div",{className:"vjs-big-play-button",innerHTML:'<span aria-hidden="true"><\/span>',"aria-label":"play video"})},vjs.BigPlayButton.prototype.onClick=function(){this.player_.play()},vjs.ErrorDisplay=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t);this.update();this.on(n,"error",this.update)}}),vjs.ErrorDisplay.prototype.createEl=function(){var n=vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-error-display"});return this.contentEl_=vjs.createEl("div"),n.appendChild(this.contentEl_),n},vjs.ErrorDisplay.prototype.update=function(){this.player().error()&&(this.contentEl_.innerHTML=this.localize(this.player().error().message))},vjs.MediaTechController=vjs.Component.extend({init:function(n,t,i){t=t||{};t.reportTouchActivity=!1;vjs.Component.call(this,n,t,i);this.featuresProgressEvents||this.manualProgressOn();this.featuresTimeupdateEvents||this.manualTimeUpdatesOn();this.initControlsListeners()}}),vjs.MediaTechController.prototype.initControlsListeners=function(){var n,t;n=this.player();t=function(){n.controls()&&!n.usingNativeControls()&&this.addControlsListeners()};this.ready(t);this.on(n,"controlsenabled",t);this.on(n,"controlsdisabled",this.removeControlsListeners);this.ready(function(){this.networkState&&this.networkState()>0&&this.player().trigger("loadstart")})},vjs.MediaTechController.prototype.addControlsListeners=function(){var n;this.on("mousedown",this.onClick);this.on("touchstart",function(){n=this.player_.userActive()});this.on("touchmove",function(){n&&this.player().reportUserActivity()});this.on("touchend",function(n){n.preventDefault()});this.emitTapEvents();this.on("tap",this.onTap)},vjs.MediaTechController.prototype.removeControlsListeners=function(){this.off("tap");this.off("touchstart");this.off("touchmove");this.off("touchleave");this.off("touchcancel");this.off("touchend");this.off("click");this.off("mousedown")},vjs.MediaTechController.prototype.onClick=function(n){n.button===0&&this.player().controls()&&(this.player().paused()?this.player().play():this.player().pause())},vjs.MediaTechController.prototype.onTap=function(){this.player().userActive(!this.player().userActive())},vjs.MediaTechController.prototype.manualProgressOn=function(){this.manualProgress=!0;this.trackProgress()},vjs.MediaTechController.prototype.manualProgressOff=function(){this.manualProgress=!1;this.stopTrackingProgress()},vjs.MediaTechController.prototype.trackProgress=function(){this.progressInterval=this.setInterval(function(){var n=this.player().bufferedPercent();this.bufferedPercent_!=n&&this.player().trigger("progress");this.bufferedPercent_=n;n===1&&this.stopTrackingProgress()},500)},vjs.MediaTechController.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},vjs.MediaTechController.prototype.manualTimeUpdatesOn=function(){var n=this.player_;this.manualTimeUpdates=!0;this.on(n,"play",this.trackCurrentTime);this.on(n,"pause",this.stopTrackingCurrentTime);this.one("timeupdate",function(){this.featuresTimeupdateEvents=!0;this.manualTimeUpdatesOff()})},vjs.MediaTechController.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1;this.stopTrackingCurrentTime();this.off("play",this.trackCurrentTime);this.off("pause",this.stopTrackingCurrentTime)},vjs.MediaTechController.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime();this.currentTimeInterval=this.setInterval(function(){this.player().trigger("timeupdate")},250)},vjs.MediaTechController.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval);this.player().trigger("timeupdate")},vjs.MediaTechController.prototype.dispose=function(){this.manualProgress&&this.manualProgressOff();this.manualTimeUpdates&&this.manualTimeUpdatesOff();vjs.Component.prototype.dispose.call(this)},vjs.MediaTechController.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.player().trigger("timeupdate")},vjs.MediaTechController.prototype.setPoster=function(){},vjs.MediaTechController.prototype.featuresVolumeControl=!0,vjs.MediaTechController.prototype.featuresFullscreenResize=!1,vjs.MediaTechController.prototype.featuresPlaybackRate=!1,vjs.MediaTechController.prototype.featuresProgressEvents=!1,vjs.MediaTechController.prototype.featuresTimeupdateEvents=!1,vjs.MediaTechController.withSourceHandlers=function(n){n.registerSourceHandler=function(t,i){var r=n.sourceHandlers;r||(r=n.sourceHandlers=[]);i===undefined&&(i=r.length);r.splice(i,0,t)};n.selectSourceHandler=function(t){for(var r=n.sourceHandlers||[],u,i=0;i<r.length;i++)if(u=r[i].canHandleSource(t),u)return r[i];return null};n.canPlaySource=function(t){var i=n.selectSourceHandler(t);return i?i.canHandleSource(t):""};n.prototype.setSource=function(t){var i=n.selectSourceHandler(t);this.disposeSourceHandler();this.off("dispose",this.disposeSourceHandler);this.currentSource_=t;this.sourceHandler_=i.handleSource(t,this);this.on("dispose",this.disposeSourceHandler);return this};n.prototype.disposeSourceHandler=function(){this.sourceHandler_&&this.sourceHandler_.dispose&&this.sourceHandler_.dispose()}},vjs.Html5=vjs.MediaTechController.extend({init:function(n,t,i){vjs.MediaTechController.call(this,n,t,i);this.setupTriggers();var r=t.source;r&&(this.el_.currentSrc!==r.src||n.tag&&n.tag.initNetworkState_===3)&&this.setSource(r);vjs.TOUCH_ENABLED&&n.options().nativeControlsForTouch===!0&&this.useNativeControls();n.ready(function(){this.tag&&this.options_.autoplay&&this.paused()&&(delete this.tag.poster,this.play())});this.triggerReady()}}),vjs.Html5.prototype.dispose=function(){vjs.Html5.disposeMediaElement(this.el_);vjs.MediaTechController.prototype.dispose.call(this)},vjs.Html5.prototype.createEl=function(){var t=this.player_,n=t.tag,e,u,i,r,f;for(n&&this.movingMediaElementInDOM!==!1||(n?(e=n.cloneNode(!1),vjs.Html5.disposeMediaElement(n),n=e,t.tag=null):(n=vjs.createEl("video"),vjs.setElementAttributes(n,vjs.obj.merge(t.tagAttributes||{},{id:t.id()+"_html5_api","class":"vjs-tech"}))),n.player=t,vjs.insertFirst(n,t.el())),u=["autoplay","preload","loop","muted"],i=u.length-1;i>=0;i--)r=u[i],f={},typeof t.options_[r]!="undefined"&&(f[r]=t.options_[r]),vjs.setElementAttributes(n,f);return n},vjs.Html5.prototype.setupTriggers=function(){for(var n=vjs.Html5.Events.length-1;n>=0;n--)this.on(vjs.Html5.Events[n],this.eventHandler)},vjs.Html5.prototype.eventHandler=function(n){n.type=="error"&&this.error()?this.player().error(this.error().code):(n.bubbles=!1,this.player().trigger(n))},vjs.Html5.prototype.useNativeControls=function(){var t,n,i,r,u;t=this;n=this.player();t.setControls(n.controls());i=function(){t.setControls(!0)};r=function(){t.setControls(!1)};n.on("controlsenabled",i);n.on("controlsdisabled",r);u=function(){n.off("controlsenabled",i);n.off("controlsdisabled",r)};t.on("dispose",u);n.on("usingcustomcontrols",u);n.usingNativeControls(!0)},vjs.Html5.prototype.play=function(){this.el_.play()},vjs.Html5.prototype.pause=function(){this.el_.pause()},vjs.Html5.prototype.paused=function(){return this.el_.paused},vjs.Html5.prototype.currentTime=function(){return this.el_.currentTime},vjs.Html5.prototype.setCurrentTime=function(n){try{this.el_.currentTime=n}catch(t){vjs.log(t,"Video is not ready. (Video.js)")}},vjs.Html5.prototype.duration=function(){return this.el_.duration||0},vjs.Html5.prototype.buffered=function(){return this.el_.buffered},vjs.Html5.prototype.volume=function(){return this.el_.volume},vjs.Html5.prototype.setVolume=function(n){this.el_.volume=n},vjs.Html5.prototype.muted=function(){return this.el_.muted},vjs.Html5.prototype.setMuted=function(n){this.el_.muted=n},vjs.Html5.prototype.width=function(){return this.el_.offsetWidth},vjs.Html5.prototype.height=function(){return this.el_.offsetHeight},vjs.Html5.prototype.supportsFullScreen=function(){return typeof this.el_.webkitEnterFullScreen=="function"&&(/Android/.test(vjs.USER_AGENT)||!/Chrome|Mac OS X 10.5/.test(vjs.USER_AGENT))?!0:!1},vjs.Html5.prototype.enterFullScreen=function(){var n=this.el_;if("webkitDisplayingFullscreen"in n)this.one("webkitbeginfullscreen",function(){this.player_.isFullscreen(!0);this.one("webkitendfullscreen",function(){this.player_.isFullscreen(!1);this.player_.trigger("fullscreenchange")});this.player_.trigger("fullscreenchange")});n.paused&&n.networkState<=n.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){n.pause();n.webkitEnterFullScreen()},0)):n.webkitEnterFullScreen()},vjs.Html5.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},vjs.Html5.prototype.src=function(n){if(n===undefined)return this.el_.src;this.setSrc(n)},vjs.Html5.prototype.setSrc=function(n){this.el_.src=n},vjs.Html5.prototype.load=function(){this.el_.load()},vjs.Html5.prototype.currentSrc=function(){return this.el_.currentSrc},vjs.Html5.prototype.poster=function(){return this.el_.poster},vjs.Html5.prototype.setPoster=function(n){this.el_.poster=n},vjs.Html5.prototype.preload=function(){return this.el_.preload},vjs.Html5.prototype.setPreload=function(n){this.el_.preload=n},vjs.Html5.prototype.autoplay=function(){return this.el_.autoplay},vjs.Html5.prototype.setAutoplay=function(n){this.el_.autoplay=n},vjs.Html5.prototype.controls=function(){return this.el_.controls},vjs.Html5.prototype.setControls=function(n){this.el_.controls=!!n},vjs.Html5.prototype.loop=function(){return this.el_.loop},vjs.Html5.prototype.setLoop=function(n){this.el_.loop=n},vjs.Html5.prototype.error=function(){return this.el_.error},vjs.Html5.prototype.seeking=function(){return this.el_.seeking},vjs.Html5.prototype.ended=function(){return this.el_.ended},vjs.Html5.prototype.defaultMuted=function(){return this.el_.defaultMuted},vjs.Html5.prototype.playbackRate=function(){return this.el_.playbackRate},vjs.Html5.prototype.setPlaybackRate=function(n){this.el_.playbackRate=n},vjs.Html5.prototype.networkState=function(){return this.el_.networkState},vjs.Html5.isSupported=function(){try{vjs.TEST_VID.volume=.5}catch(n){return!1}return!!vjs.TEST_VID.canPlayType},vjs.MediaTechController.withSourceHandlers(vjs.Html5),vjs.Html5.nativeSourceHandler={},vjs.Html5.nativeSourceHandler.canHandleSource=function(n){function t(n){try{return!!vjs.TEST_VID.canPlayType(n)}catch(t){return""}}var i;return n.type?t(n.type):(i=n.src.match(/\.([^\/\?]+)(\?[^\/]+)?$/i)[1],t("video/"+i))},vjs.Html5.nativeSourceHandler.handleSource=function(n,t){t.setSrc(n.src)},vjs.Html5.nativeSourceHandler.dispose=function(){},vjs.Html5.registerSourceHandler(vjs.Html5.nativeSourceHandler),vjs.Html5.canControlVolume=function(){var n=vjs.TEST_VID.volume;return vjs.TEST_VID.volume=n/2+.1,n!==vjs.TEST_VID.volume},vjs.Html5.canControlPlaybackRate=function(){var n=vjs.TEST_VID.playbackRate;return vjs.TEST_VID.playbackRate=n/2+.1,n!==vjs.TEST_VID.playbackRate},vjs.Html5.prototype.featuresVolumeControl=vjs.Html5.canControlVolume(),vjs.Html5.prototype.featuresPlaybackRate=vjs.Html5.canControlPlaybackRate(),vjs.Html5.prototype.movingMediaElementInDOM=!vjs.IS_IOS,vjs.Html5.prototype.featuresFullscreenResize=!0,vjs.Html5.prototype.featuresProgressEvents=!0,function(){var n,t=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,i=/^video\/mp4/i;vjs.Html5.patchCanPlayType=function(){vjs.ANDROID_VERSION>=4&&(n||(n=vjs.TEST_VID.constructor.prototype.canPlayType),vjs.TEST_VID.constructor.prototype.canPlayType=function(i){return i&&t.test(i)?"maybe":n.call(this,i)});vjs.IS_OLD_ANDROID&&(n||(n=vjs.TEST_VID.constructor.prototype.canPlayType),vjs.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&i.test(t)?"maybe":n.call(this,t)})};vjs.Html5.unpatchCanPlayType=function(){var t=vjs.TEST_VID.constructor.prototype.canPlayType;return vjs.TEST_VID.constructor.prototype.canPlayType=n,n=null,t};vjs.Html5.patchCanPlayType()}(),vjs.Html5.Events="loadstart,suspend,abort,error,emptied,stalled,loadedmetadata,loadeddata,canplay,canplaythrough,playing,waiting,seeking,seeked,ended,durationchange,timeupdate,progress,play,pause,ratechange,volumechange".split(","),vjs.Html5.disposeMediaElement=function(n){if(n){for(n.player=null,n.parentNode&&n.parentNode.removeChild(n);n.hasChildNodes();)n.removeChild(n.firstChild);n.removeAttribute("src");typeof n.load=="function"&&function(){try{n.load()}catch(t){}}()}},vjs.Flash=vjs.MediaTechController.extend({init:function(n,t,i){vjs.MediaTechController.call(this,n,t,i);var u=t.source,o=t.parentEl,f=this.el_=vjs.createEl("div",{id:n.id()+"_temp_flash"}),e=n.id()+"_flash_api",r=n.options_,s=vjs.obj.merge({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:r.autoplay,preload:r.preload,loop:r.loop,muted:r.muted},t.flashVars),h=vjs.obj.merge({wmode:"opaque",bgcolor:"#000000"},t.params),c=vjs.obj.merge({id:e,name:e,"class":"vjs-tech"},t.attributes);u&&this.ready(function(){this.setSource(u)});vjs.insertFirst(f,o);t.startTime&&this.ready(function(){this.load();this.play();this.currentTime(t.startTime)});vjs.IS_FIREFOX&&this.ready(function(){this.on("mousemove",function(){this.player().trigger({type:"mousemove",bubbles:!1})})});n.on("stageclick",n.reportUserActivity);this.el_=vjs.Flash.embed(t.swf,f,s,h,c)}}),vjs.Flash.prototype.dispose=function(){vjs.MediaTechController.prototype.dispose.call(this)},vjs.Flash.prototype.play=function(){this.el_.vjs_play()},vjs.Flash.prototype.pause=function(){this.el_.vjs_pause()},vjs.Flash.prototype.src=function(n){return n===undefined?this.currentSrc():this.setSrc(n)},vjs.Flash.prototype.setSrc=function(n){if(n=vjs.getAbsoluteURL(n),this.el_.vjs_src(n),this.player_.autoplay()){var t=this;this.setTimeout(function(){t.play()},0)}},vjs.Flash.prototype.setCurrentTime=function(n){this.lastSeekTarget_=n;this.el_.vjs_setProperty("currentTime",n);vjs.MediaTechController.prototype.setCurrentTime.call(this)},vjs.Flash.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.vjs_getProperty("currentTime")},vjs.Flash.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.vjs_getProperty("currentSrc")},vjs.Flash.prototype.load=function(){this.el_.vjs_load()},vjs.Flash.prototype.poster=function(){this.el_.vjs_getProperty("poster")},vjs.Flash.prototype.setPoster=function(){},vjs.Flash.prototype.buffered=function(){return vjs.createTimeRange(0,this.el_.vjs_getProperty("buffered"))},vjs.Flash.prototype.supportsFullScreen=function(){return!1},vjs.Flash.prototype.enterFullScreen=function(){return!1},function(){function f(n){var t=n.charAt(0).toUpperCase()+n.slice(1);r["set"+t]=function(t){return this.el_.vjs_setProperty(n,t)}}function i(n){r[n]=function(){return this.el_.vjs_getProperty(n)}}for(var r=vjs.Flash.prototype,t="rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","),u="error,networkState,readyState,seeking,initialTime,duration,startOffsetTime,paused,played,seekable,ended,videoTracks,audioTracks,videoWidth,videoHeight,textTracks".split(","),n=0;n<t.length;n++)i(t[n]),f(t[n]);for(n=0;n<u.length;n++)i(u[n])}(),vjs.Flash.isSupported=function(){return vjs.Flash.version()[0]>=10},vjs.MediaTechController.withSourceHandlers(vjs.Flash),vjs.Flash.nativeSourceHandler={},vjs.Flash.nativeSourceHandler.canHandleSource=function(n){var t;return n.type?(t=n.type.replace(/;.*/,"").toLowerCase(),t in vjs.Flash.formats)?"maybe":"":""},vjs.Flash.nativeSourceHandler.handleSource=function(n,t){t.setSrc(n.src)},vjs.Flash.nativeSourceHandler.dispose=function(){},vjs.Flash.registerSourceHandler(vjs.Flash.nativeSourceHandler),vjs.Flash.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},vjs.Flash.onReady=function(n){var t,i;t=vjs.el(n);i=t&&t.parentNode&&t.parentNode.player;i&&(t.player=i,vjs.Flash.checkReady(i.tech))},vjs.Flash.checkReady=function(n){n.el()&&(n.el().vjs_getProperty?n.triggerReady():this.setTimeout(function(){vjs.Flash.checkReady(n)},50))},vjs.Flash.onEvent=function(n,t){var i=vjs.el(n).player;i.trigger(t)},vjs.Flash.onError=function(n,t){var i=vjs.el(n).player,r="FLASH: "+t;t=="srcnotfound"?i.error({code:4,message:r}):i.error(r)},vjs.Flash.version=function(){var n="0,0,0";try{n=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(t){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(n=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(i){}}return n.split(",")},vjs.Flash.embed=function(n,t,i,r,u){var o=vjs.Flash.getEmbedCode(n,i,r,u),f=vjs.createEl("div",{innerHTML:o}).childNodes[0],s=t.parentNode,e;return t.parentNode.replaceChild(f,t),e=s.childNodes[0],setTimeout(function(){e.style.display="block"},1e3),f},vjs.Flash.getEmbedCode=function(n,t,i,r){var u="",f="",e="";return t&&vjs.obj.each(t,function(n,t){u+=n+"="+t+"&amp;"}),i=vjs.obj.merge({movie:n,flashvars:u,allowScriptAccess:"always",allowNetworking:"all"},i),vjs.obj.each(i,function(n,t){f+='<param name="'+n+'" value="'+t+'" />'}),r=vjs.obj.merge({data:n,width:"100%",height:"100%"},r),vjs.obj.each(r,function(n,t){e+=n+'="'+t+'" '}),'<object type="application/x-shockwave-flash" '+e+">"+f+"<\/object>"},vjs.Flash.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},vjs.Flash.streamFromParts=function(n,t){return n+"&"+t},vjs.Flash.streamToParts=function(n){var i={connection:"",stream:""},t,r;return n?(t=n.indexOf("&"),t!==-1?r=t+1:(t=r=n.lastIndexOf("/")+1,t===0&&(t=r=n.length)),i.connection=n.substring(0,t),i.stream=n.substring(r,n.length),i):i},vjs.Flash.isStreamingType=function(n){return n in vjs.Flash.streamingFormats},vjs.Flash.RTMP_RE=/^rtmp[set]?:\/\//i,vjs.Flash.isStreamingSrc=function(n){return vjs.Flash.RTMP_RE.test(n)},vjs.Flash.rtmpSourceHandler={},vjs.Flash.rtmpSourceHandler.canHandleSource=function(n){return vjs.Flash.isStreamingType(n.type)||vjs.Flash.isStreamingSrc(n.src)?"maybe":""},vjs.Flash.rtmpSourceHandler.handleSource=function(n,t){var i=vjs.Flash.streamToParts(n.src);t.setRtmpConnection(i.connection);t.setRtmpStream(i.stream)},vjs.Flash.registerSourceHandler(vjs.Flash.rtmpSourceHandler),vjs.MediaLoader=vjs.Component.extend({init:function(n,t,i){var r,u,f,e;if(vjs.Component.call(this,n,t,i),n.options_.sources&&n.options_.sources.length!==0)n.src(n.options_.sources);else for(r=0,u=n.options_.techOrder;r<u.length;r++)if(f=vjs.capitalize(u[r]),e=window.videojs[f],e&&e.isSupported()){n.loadTech(f);break}}}),vjs.Player.prototype.textTracks_,vjs.Player.prototype.textTracks=function(){return this.textTracks_=this.textTracks_||[],this.textTracks_},vjs.Player.prototype.addTextTrack=function(n,t,i,r){var e=this.textTracks_=this.textTracks_||[],f,u;return r=r||{},r.kind=n,r.label=t,r.language=i,f=vjs.capitalize(n||"subtitles"),u=new window.videojs[f+"Track"](this,r),e.push(u),u.dflt()&&this.ready(function(){this.setTimeout(function(){u.player().showTextTrack(u.id())},0)}),u},vjs.Player.prototype.addTextTracks=function(n){for(var t,i=0;i<n.length;i++)t=n[i],this.addTextTrack(t.kind,t.label,t.language,t);return this},vjs.Player.prototype.showTextTrack=function(n,t){for(var e=this.textTracks_,r=0,o=e.length,i,u,f;r<o;r++)i=e[r],i.id()===n?(i.show(),u=i):t&&i.kind()==t&&i.mode()>0&&i.disable();return f=u?u.kind():t?t:!1,f&&this.trigger(f+"trackchange"),this},vjs.TextTrack=vjs.Component.extend({init:function(n,t){vjs.Component.call(this,n,t);this.id_=t.id||"vjs_"+t.kind+"_"+t.language+"_"+vjs.guid++;this.src_=t.src;this.dflt_=t["default"]||t.dflt;this.title_=t.title;this.language_=t.srclang;this.label_=t.label;this.cues_=[];this.activeCues_=[];this.readyState_=0;this.mode_=0;n.on("dispose",vjs.bind(this,this.deactivate,this.id_))}}),vjs.TextTrack.prototype.kind_,vjs.TextTrack.prototype.kind=function(){return this.kind_},vjs.TextTrack.prototype.src_,vjs.TextTrack.prototype.src=function(){return this.src_},vjs.TextTrack.prototype.dflt_,vjs.TextTrack.prototype.dflt=function(){return this.dflt_},vjs.TextTrack.prototype.title_,vjs.TextTrack.prototype.title=function(){return this.title_},vjs.TextTrack.prototype.language_,vjs.TextTrack.prototype.language=function(){return this.language_},vjs.TextTrack.prototype.label_,vjs.TextTrack.prototype.label=function(){return this.label_},vjs.TextTrack.prototype.cues_,vjs.TextTrack.prototype.cues=function(){return this.cues_},vjs.TextTrack.prototype.activeCues_,vjs.TextTrack.prototype.activeCues=function(){return this.activeCues_},vjs.TextTrack.prototype.readyState_,vjs.TextTrack.prototype.readyState=function(){return this.readyState_},vjs.TextTrack.prototype.mode_,vjs.TextTrack.prototype.mode=function(){return this.mode_},vjs.TextTrack.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-"+this.kind_+" vjs-text-track"})},vjs.TextTrack.prototype.show=function(){this.activate();this.mode_=2;vjs.Component.prototype.show.call(this)},vjs.TextTrack.prototype.hide=function(){this.activate();this.mode_=1;vjs.Component.prototype.hide.call(this)},vjs.TextTrack.prototype.disable=function(){this.mode_==2&&this.hide();this.deactivate();this.mode_=0},vjs.TextTrack.prototype.activate=function(){if(this.readyState_===0&&this.load(),this.mode_===0){this.player_.on("timeupdate",vjs.bind(this,this.update,this.id_));this.player_.on("ended",vjs.bind(this,this.reset,this.id_));(this.kind_==="captions"||this.kind_==="subtitles")&&this.player_.getChild("textTrackDisplay").addChild(this)}},vjs.TextTrack.prototype.deactivate=function(){this.player_.off("timeupdate",vjs.bind(this,this.update,this.id_));this.player_.off("ended",vjs.bind(this,this.reset,this.id_));this.reset();this.player_.getChild("textTrackDisplay").removeChild(this)},vjs.TextTrack.prototype.load=function(){this.readyState_===0&&(this.readyState_=1,vjs.xhr(this.src_,vjs.bind(this,function(n,t,i){if(n)return this.onError(n);this.parseCues(i)})))},vjs.TextTrack.prototype.onError=function(n){this.error=n;this.readyState_=3;this.trigger("error")},vjs.TextTrack.prototype.parseCues=function(n){for(var r,f,e,u=n.split("\n"),t="",o,i=1,s=u.length;i<s;i++)if(t=vjs.trim(u[i]),t){for(t.indexOf("-->")==-1?(o=t,t=vjs.trim(u[++i])):o=this.cues_.length,r={id:o,index:this.cues_.length},f=t.split(/[\t ]+/),r.startTime=this.parseCueTime(f[0]),r.endTime=this.parseCueTime(f[2]),e=[];u[++i]&&(t=vjs.trim(u[i]));)e.push(t);r.text=e.join("<br/>");this.cues_.push(r)}this.readyState_=2;this.trigger("loaded")},vjs.TextTrack.prototype.parseCueTime=function(n){var i=n.split(":"),r=0,f,e,u,t,o;return i.length==3?(f=i[0],e=i[1],u=i[2]):(f=0,e=i[0],u=i[1]),u=u.split(/\s+/),t=u.splice(0,1)[0],t=t.split(/\.|,/),o=parseFloat(t[1]),t=t[0],r+=parseFloat(f)*3600,r+=parseFloat(e)*60,r+=parseFloat(t),o&&(r+=o/1e3),r},vjs.TextTrack.prototype.update=function(){var c,i;if(this.cues_.length>0&&(c=this.player_.options().trackTimeOffset||0,i=this.player_.currentTime()+c,this.prevChange===undefined||i<this.prevChange||this.nextChange<=i)){var s=this.cues_,r=this.player_.duration(),u=0,f=!1,h=[],e,o,n,t;for(i>=this.nextChange||this.nextChange===undefined?t=this.firstActiveIndex!==undefined?this.firstActiveIndex:0:(f=!0,t=this.lastActiveIndex!==undefined?this.lastActiveIndex:s.length-1);;){if(n=s[t],n.endTime<=i)u=Math.max(u,n.endTime),n.active&&(n.active=!1);else if(i<n.startTime){if(r=Math.min(r,n.startTime),n.active&&(n.active=!1),!f)break}else f?(h.splice(0,0,n),o===undefined&&(o=t),e=t):(h.push(n),e===undefined&&(e=t),o=t),r=Math.min(r,n.endTime),u=Math.max(u,n.startTime),n.active=!0;if(f)if(t===0)break;else t--;else if(t===s.length-1)break;else t++}this.activeCues_=h;this.nextChange=r;this.prevChange=u;this.firstActiveIndex=e;this.lastActiveIndex=o;this.updateDisplay();this.trigger("cuechange")}},vjs.TextTrack.prototype.updateDisplay=function(){for(var t=this.activeCues_,i="",n=0,r=t.length;n<r;n++)i+='<span class="vjs-tt-cue">'+t[n].text+"<\/span>";this.el_.innerHTML=i},vjs.TextTrack.prototype.reset=function(){this.nextChange=0;this.prevChange=this.player_.duration();this.firstActiveIndex=0;this.lastActiveIndex=0},vjs.CaptionsTrack=vjs.TextTrack.extend(),vjs.CaptionsTrack.prototype.kind_="captions",vjs.SubtitlesTrack=vjs.TextTrack.extend(),vjs.SubtitlesTrack.prototype.kind_="subtitles",vjs.ChaptersTrack=vjs.TextTrack.extend(),vjs.ChaptersTrack.prototype.kind_="chapters",vjs.TextTrackDisplay=vjs.Component.extend({init:function(n,t,i){vjs.Component.call(this,n,t,i);n.options_.tracks&&n.options_.tracks.length>0&&this.player_.addTextTracks(n.options_.tracks)}}),vjs.TextTrackDisplay.prototype.createEl=function(){return vjs.Component.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"})},vjs.TextTrackMenuItem=vjs.MenuItem.extend({init:function(n,t){var i=this.track=t.track;t.label=i.label();t.selected=i.dflt();vjs.MenuItem.call(this,n,t);this.on(n,i.kind()+"trackchange",this.update)}}),vjs.TextTrackMenuItem.prototype.onClick=function(){vjs.MenuItem.prototype.onClick.call(this);this.player_.showTextTrack(this.track.id_,this.track.kind())},vjs.TextTrackMenuItem.prototype.update=function(){this.selected(this.track.mode()==2)},vjs.OffTextTrackMenuItem=vjs.TextTrackMenuItem.extend({init:function(n,t){t.track={kind:function(){return t.kind},player:n,label:function(){return t.kind+" off"},dflt:function(){return!1},mode:function(){return!1}};vjs.TextTrackMenuItem.call(this,n,t);this.selected(!0)}}),vjs.OffTextTrackMenuItem.prototype.onClick=function(){vjs.TextTrackMenuItem.prototype.onClick.call(this);this.player_.showTextTrack(this.track.id_,this.track.kind())},vjs.OffTextTrackMenuItem.prototype.update=function(){for(var i=this.player_.textTracks(),n=0,u=i.length,t,r=!0;n<u;n++)t=i[n],t.kind()==this.track.kind()&&t.mode()==2&&(r=!1);this.selected(r)},vjs.TextTrackButton=vjs.MenuButton.extend({init:function(n,t){vjs.MenuButton.call(this,n,t);this.items.length<=1&&this.hide()}}),vjs.TextTrackButton.prototype.createItems=function(){var t=[],i,n;for(t.push(new vjs.OffTextTrackMenuItem(this.player_,{kind:this.kind_})),n=0;n<this.player_.textTracks().length;n++)i=this.player_.textTracks()[n],i.kind()===this.kind_&&t.push(new vjs.TextTrackMenuItem(this.player_,{track:i}));return t},vjs.CaptionsButton=vjs.TextTrackButton.extend({init:function(n,t,i){vjs.TextTrackButton.call(this,n,t,i);this.el_.setAttribute("aria-label","Captions Menu")}}),vjs.CaptionsButton.prototype.kind_="captions",vjs.CaptionsButton.prototype.buttonText="Captions",vjs.CaptionsButton.prototype.className="vjs-captions-button",vjs.SubtitlesButton=vjs.TextTrackButton.extend({init:function(n,t,i){vjs.TextTrackButton.call(this,n,t,i);this.el_.setAttribute("aria-label","Subtitles Menu")}}),vjs.SubtitlesButton.prototype.kind_="subtitles",vjs.SubtitlesButton.prototype.buttonText="Subtitles",vjs.SubtitlesButton.prototype.className="vjs-subtitles-button",vjs.ChaptersButton=vjs.TextTrackButton.extend({init:function(n,t,i){vjs.TextTrackButton.call(this,n,t,i);this.el_.setAttribute("aria-label","Chapters Menu")}}),vjs.ChaptersButton.prototype.kind_="chapters",vjs.ChaptersButton.prototype.buttonText="Chapters",vjs.ChaptersButton.prototype.className="vjs-chapters-button",vjs.ChaptersButton.prototype.createItems=function(){for(var i=[],n,t=0;t<this.player_.textTracks().length;t++)n=this.player_.textTracks()[t],n.kind()===this.kind_&&i.push(new vjs.TextTrackMenuItem(this.player_,{track:n}));return i},vjs.ChaptersButton.prototype.createMenu=function(){for(var o=this.player_.textTracks(),n=0,u=o.length,i,r,h=this.items=[],t,f,s,e;n<u;n++)if(i=o[n],i.kind()==this.kind_)if(i.readyState()===0){i.load();i.on("loaded",vjs.bind(this,this.createMenu))}else{r=i;break}if(t=this.menu,t===undefined&&(t=new vjs.Menu(this.player_),t.contentEl().appendChild(vjs.createEl("li",{className:"vjs-menu-title",innerHTML:vjs.capitalize(this.kind_),tabindex:-1}))),r){for(f=r.cues_,n=0,u=f.length;n<u;n++)s=f[n],e=new vjs.ChaptersTrackMenuItem(this.player_,{track:r,cue:s}),h.push(e),t.addChild(e);this.addChild(t)}return this.items.length>0&&this.show(),t},vjs.ChaptersTrackMenuItem=vjs.MenuItem.extend({init:function(n,t){var u=this.track=t.track,i=this.cue=t.cue,r=n.currentTime();t.label=i.text;t.selected=i.startTime<=r&&r<i.endTime;vjs.MenuItem.call(this,n,t);u.on("cuechange",vjs.bind(this,this.update))}}),vjs.ChaptersTrackMenuItem.prototype.onClick=function(){vjs.MenuItem.prototype.onClick.call(this);this.player_.currentTime(this.cue.startTime);this.update(this.cue.startTime)},vjs.ChaptersTrackMenuItem.prototype.update=function(){var n=this.cue,t=this.player_.currentTime();this.selected(n.startTime<=t&&t<n.endTime)},vjs.obj.merge(vjs.ControlBar.prototype.options_.children,{subtitlesButton:{},captionsButton:{},chaptersButton:{}}),vjs.JSON,typeof JSON!="undefined"&&typeof window.JSON.parse=="function"?vjs.JSON=window.JSON:(vjs.JSON={},cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,vjs.JSON.parse=function(text,reviver){function walk(n,t){var r,u,i=n[t];if(i&&typeof i=="object")for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(u=walk(i,r),u!==undefined?i[r]=u:delete i[r]);return reviver.call(n,t,i)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data");}),vjs.autoSetup=function(){var e,t,o,n,i,u=document.getElementsByTagName("video"),f=document.getElementsByTagName("audio"),r=[];if(u&&u.length>0)for(n=0,i=u.length;n<i;n++)r.push(u[n]);if(f&&f.length>0)for(n=0,i=f.length;n<i;n++)r.push(f[n]);if(r&&r.length>0)for(n=0,i=r.length;n<i;n++)if(t=r[n],t&&t.getAttribute)t.player===undefined&&(e=t.getAttribute("data-setup"),e!==null&&(o=videojs(t)));else{vjs.autoSetupTimeout(1);break}else vjs.windowLoaded||vjs.autoSetupTimeout(1)},vjs.autoSetupTimeout=function(n){setTimeout(vjs.autoSetup,n)},document.readyState==="complete")vjs.windowLoaded=!0;else vjs.one(window,"load",function(){vjs.windowLoaded=!0});vjs.autoSetupTimeout(1);vjs.plugin=function(n,t){vjs.Player.prototype[n]=t};vjs.ConfigPlayer=vjs.Player.extend({init:function(n,t,i,r){this.config_=this.config_=n(this);vjs.Player.prototype.init.call(this,t,i,r)}});vjs.ConfigPlayer.prototype.config_=null;vjs.withConfig=function(n,t,i,r){var f=vjs.obj.merge({},vjs.withConfig.options_),u;if(n=vjs.obj.merge(f,n),u=vjs.obj.merge({},vjs.withConfig.addOptions_),i=vjs.obj.merge(u,i||{}),n.data!==null)vjs.withConfig.onSuccess(n.data,n,t,i,r);else n.url!==null&&vjs.get(n.url,function(u){vjs.withConfig.onSuccess(JSON.parse(u),n,t,i,r)})};vjs.withConfig.options_={url:null,data:null,defaultId:null,onPlayer:function(){},onData:function(n){return n}};vjs.withConfig.addOptions_={children:{},plugins:{}};vjs.withConfig.onSuccess=function(n,t,i,r,u){var o,s,f,e,h,c,l;if(n=t.onData(n),n.children&&vjs.obj.merge(r.children,vjs.Config.matchOptions(n.children)),n.plugins&&vjs.obj.merge(r.plugins,vjs.Config.matchOptions(n.plugins)),t.defaultId!==null&&n.videos)for(o=n.videos,s=t.defaultId,e=0,h=o.length;e<h;e++)if(f=o[e],f.id===s){f.children&&(f=vjs.obj.merge({},f),delete f.children);vjs.obj.merge(r,f);break}c=vjs.Config.configFactory({data:n});l=new vjs.ConfigPlayer(c,i,r,u);t.onPlayer(l)};vjs.Config=vjs.CoreObject.extend({init:function(n,t){return this.player_=n,this.options_=vjs.obj.deepMerge(this.options_,t||{}),this.data=this.options_.data,this.buildCache(),this},buildCache:function(){for(var u=this.data.videos,e=this.idCache_={},o=this.srcCache_={},t,n=0,s=u.length,i,f,r;n<s;n++)if(t=u[n],t.id){if(e[t.id]=n,r=t.sources,r)for(i=0,f=r.length;i<f;i++)o[r[i].src]=n}else vjs.log('Missing "id" attribute on a config\'s video object.');return this},getById:function(n){return this.idCache_[n]!==undefined?this.data.videos[this.idCache_[n]]:null},getBySrc:function(n){return n=n.src||n,this.srcCache_[n]!==undefined?this.data.videos[this.srcCache_[n]]:null},getCurrent:function(){return this.getBySrc(this.player_.currentSrc())},getOptions_:function(n,t){var i=n,u,r,f;for(t=t.split("."),r=0,f=t.length;r<f;r++)if(u=t[r],i[u]!==undefined){i=i[u];continue}else{i=null;break}return i},getCurrentChildren:function(n){var t=this.getCurrent();return t!==null&&t.children!==undefined?n?this.getOptions_(t.children,n):t.children:null},getCurrentConfig:function(n){var t=this.getCurrent();return t!==null&&t.config!==undefined?n?this.getOptions_(t.config,n):t.config:null},loadVideoById:function(n){var t=this.getById(n);t!==null&&t.sources&&this.player_.src(t.sources)}});vjs.Config.prototype.options_={data:{videos:[]}};vjs.Config.configFactory=function(n){return function(t){return new vjs.Config(t,n)}};vjs.Config.matchOptions=function(n){if(!window.matchMedia||n["default"]===undefined)return n["default"]||n;for(var t in n)if(window.matchMedia(t).matches)return n[t];return n["default"]};vjs.plugin("config",function(n){this.config_=new vjs.Config(this,n)});vjs.ConfigPosterImage=vjs.PosterImage.extend({init:function(n,t){vjs.PosterImage.prototype.init.call(this,n,t);n.on("loadstart",vjs.proxy(this,this.onLoadstart));n.on("onsrcchange",vjs.proxy(this,this.onLoadstart))},onLoadstart:function(){var n=this.player.config_.getCurrent();n!==null&&n.poster&&n.poster!==this.el.getAttribute("src")&&this.el.setAttribute("src",n.poster)},onClick:function(){this.player.currentTime()&&this.player.currentTime(0);this.player.play()}});vjs.Tracking=vjs.Component.extend({init:function(n,t){vjs.Component.prototype.init.call(this,n,t);this.currId_=null;this.lastTimeupdate_=null;this.activeProfiles_=[];this.globalProfiles_=[];var i=this.options_.profiles;i.length&&(i=this.globalProfiles_=this.initProfiles(i),this.addProfiles(i,!0));this.player_.on("loadstart",vjs.bind(this,this.onLoadstart))},addProfiles:function(n,t){return t===undefined&&(this.activeProfiles_=this.activeProfiles_.concat(n)),this},removeProfiles:function(n){var i,t,r;if(n===undefined){for(i=this.activeProfiles_,t=0,r=i.length;t<r;t++)i[t].onDispose();this.activeProfiles_=[]}else{for(i=this.globalProfiles_,t=0,r=i.length;t<r;t++)i[t].onDispose();this.globalProfiles_=[]}return this},initProfiles:function(n){for(var u=[],f=this.player_,t,i,r=0,e=n.length;r<e;r++)t=n[r],t.profileName&&(i=vjs.Tracking.getProfile(t.profileName),i!==undefined?u.push(new i(f,t)):vjs.log("Could not find profile with name: "+t.profileName));return u},onLoadstart:function(){this.removeProfiles();this.lastTimeupdate_=null;var i=this.player_,t=i.config_.getCurrent(),n;if(t===null||t.id===this.currId_)return this;this.currId_=t.id;n=i.config_.getCurrentConfig("tracking.profiles");n!==null&&(n=this.initProfiles(n),this.addProfiles(n))},onDispose:function(){this.removeProfiles();this.removeProfiles(!0)}});vjs.Tracking.prototype.options_={profiles:[]};vjs.Tracking.profiles_={};vjs.Tracking.timeRE=/^(-?\d+(\.\d+)?)(%)?$/;vjs.Tracking.getProfile=function(n){return vjs.Tracking.profiles_[n]};vjs.Tracking.registerProfile=function(n,t){vjs.Tracking.profiles_[n]=t};vjs.Tracking.expandTimecode=function(n,t){var i=null;return t=(""+t).match(this.timeRE),t!==null&&(i=t[3]!==undefined?this.expandPercent(parseInt(n,10),t[1]):this.expandTime(parseInt(n,10),t[1]),i=Math.min(n,i)),i};vjs.Tracking.expandPercent=function(n,t){return t=Math.min(100,t),t<0&&(t=100-t),t/100*n};vjs.Tracking.expandTime=function(n,t){return t>=0?t:Math.max(0,n-t)};vjs.Tracking.TrackingProfile=vjs.CoreObject.extend({init:function(n,t){this.player_=n;this.options_=this.getOptions();vjs.Component.prototype.options.call(this,t);this.lastTimeupdate_=null;this.hasPlayed_=!1;this.el_=document.createElement("div");this.eventHandlers_={};this.customEventHandlers_={};this.onLoadedmetadata=vjs.bind(this,this.onLoadedmetadata);this.onTimeupdate=vjs.bind(this,this.onTimeupdate);this.onDispose=vjs.bind(this,this.onDispose);this.player_.on("dispose",this.onDispose);if(this.parseEvents(),n.duration()!==0)this.onLoadedmetadata();else n.on("loadedmetadata",this.onLoadedmetadata);return this},getOptions:function(){return{context:{},events:{}}},parseEvents:function(){var t=this.options_.events,i={},r=this.timeEvents_={},n;for(n in t)/^timeupdate\./.test(n)?r[n]=t[n]:i[n]=t[n];this.setupHandlers(i)},setupHandlers:function(n){var h=this.eventHandlers_,c=this.customEventHandlers_,r,t,e,i,u,o,f,s;for(t in n)for(e=[].concat(n[t]),o=vjs.capitalize(t),f=0,s=e.length;f<s;f++)i=e[f],u=i.handleName&&this[i.handleName]?i.handleName:this["handle"+o]?"handle"+o:null,u===null&&(u="handleNoop",vjs.log("Missing handler for event type: "+t)),r=t.indexOf(".")===-1?h:c,r[t]=r[t]||[],r[t].push(this.bindHandler(u,i));return this},setupTimeupdates:function(){var a=this.player_,h=this.timeEvents_,v=a.duration(),i={},e,r,t,n,o,s,c=!1,u,f,l;for(u in h)if(e=u.indexOf("."),e>0){if(r=u.slice(e+1),s=vjs.Tracking.expandTimecode(v,r),s===null){vjs.log("Could not match timecode: "+r);continue}for(c=!0,t=[].concat(h[u]),n="handleTimeupdate."+r,f=0,l=t.length;f<l;f++)o=t[f],o.handleName||(o.handleName=n);n="timeupdate."+Math.round(s);i[n]?i[n].concat(t):i[n]=t}c&&(this.eventHandlers_.timeupdate=this.eventHandlers_.timeupdate||[],this.eventHandlers_.timeupdate.push(this.onTimeupdate),this.setupHandlers(i))},on:function(n,t){vjs.on(this.el_,n,vjs.bind(this,t));return this},off:function(n,t){return vjs.off(this.el_,n,t),this},trigger:function(n,t){return vjs.trigger(this.el_,n,t),this},bind:function(){var u=this.player_,t,i,n,r;this.unbind();t=this.eventHandlers_;for(r in t)for(i=t[r],n=i.length-1;n>=0;n--)u.on(r,i[n]);t=this.customEventHandlers_;for(r in t)for(i=t[r],n=i.length-1;n>=0;n--)this.on(r,i[n]);return this},unbind:function(){var u=this.player_,r=this.eventHandlers_,n,t;for(t in r)for(n=r[t],i=n.length-1;i>=0;i--)u.off(t,n[i]);return this.off(),this},handleNoop:function(){},bindHandler:function(n,t){var i=vjs.obj.merge({},this.options_.context);return t=vjs.obj.merge(i,t),vjs.bind(this,function(i){this[n].call(this,i,t)})},onDispose:function(){this.unbind()},onLoadedmetadata:function(){var r,i,n,t;if(this.setupTimeupdates(),r=!this.player_.paused(),this.bind(),r&&this.eventHandlers_.play)for(i=this.eventHandlers_.play,n={type:"play",target:this.player_.el_},n=vjs.fixEvent(n),t=i.length-1;t>=0;t--)i[t](n)},onTimeupdate:function(n){var t=Math.round(this.player_.currentTime());this.lastTimeupdate_!==t&&(this.lastTimeupdate_=t,this.trigger("timeupdate."+t,n))}});vjs.Tracking.OmnitureTrackingProfile=vjs.Tracking.TrackingProfile.extend({init:function(n,t){this.namespace=window.s.Media;this.handleDurationchange_=vjs.bind(this,this.handleDurationchange_);this.handlePlay_=vjs.bind(this,this.handlePlay_);this.handleResume_=vjs.bind(this,this.handleResume_);vjs.Tracking.TrackingProfile.prototype.init.call(this,n,t)},getOptions:function(){var n=vjs.Tracking.TrackingProfile.prototype.getOptions.call(this);return vjs.obj.merge(n,{events:{play:{},pause:{},ended:{}}}),n},onDispose:function(){vjs.Tracking.TrackingProfile.prototype.onDispose.call(this);var n=this.options_.context.title;return this.namespace.stop(n,parseInt(this.player_.currentTime(),10)),this.namespace.close(n),this},handleResume_:function(){this.player_.off("timeupdate",this.handleResume_);this.namespace.play(this.playContext_.title,parseInt(this.player_.currentTime(),10))},handleDurationchange_:function(){this.player_.off("durationchange",this.handleDurationchange_);this.handlePlay_()},handlePlay_:function(){var n=window.s_gi(window.s_account);n.linkTrackVars="None";n.linkTrackEvents="None";n.linkTrackVars="prop1,prop4,prop5,prop9,prop10,prop16,prop17,prop18,prop19,prop20,prop21,prop22,eVar1,eVar4,eVar5,eVar9,eVar10,eVar16,eVar17,eVar18,eVar19,eVar20,eVar21,eVar22,events";n.linkTrackEvents="event1,event2,event3,event4,event5,event9,event14,event15";n.prop1=n.prop4=n.prop5=n.prop9=n.prop10=n.prop16=n.prop17=n.prop18=n.prop19=n.prop20=n.prop21=n.prop22=n.eVar1=n.eVar4=n.eVar5=n.eVar9=n.eVar10=n.eVar16=n.eVar17=n.eVar18=n.eVar19=n.eVar20=n.eVar21=n.eVar22="";n.events="";this.playing_=!0;this.namespace.open(this.playContext_.title,this.player_.duration(),this.playContext_.fileName);this.opened_=!0;this.namespace.play(this.playContext_.title,0)},handlePlay:function(n,t){if(this.playContext_=t,this.playing_)this.player_.on("timeupdate",this.handleResume_);else if(this.player_.duration())this.handlePlay_();else this.player_.on("durationchange",this.handleDurationchange_)},handlePause:function(n,t){this.player_.ended()||(this.pausedAt_=parseInt(this.player_.currentTime(),10),this.namespace.stop(t.title,this.pausedAt_))},handleEnded:function(n,t){this.opened_&&(this.opened_=!1,this.playing_=!1,this.pausedAt_=null,this.player_.off("timeupdate",this.handleResume_),this.namespace.stop(t.title,parseInt(this.player_.currentTime(),10)),this.namespace.close(t.title))}});vjs.Tracking.registerProfile("omniture15",vjs.Tracking.OmnitureTrackingProfile);vjs.Tracking.WebtrendsTrackingProfile=vjs.Tracking.TrackingProfile.extend({getOptions:function(){var n=vjs.Tracking.TrackingProfile.prototype.getOptions.call(this);return vjs.obj.merge(n,{events:{play:{},ended:{}}}),n},getNamespace:function(){return window.dcsMultiTrack},handlePlay:function(n,t){this.playing_||(this.playing_=!0,this.getNamespace().apply(null,t.args))},handleEnded:function(n,t){this.playing_=!1;this.getNamespace().apply(null,t.args)}});vjs.Tracking.registerProfile("webtrends",vjs.Tracking.WebtrendsTrackingProfile);vjs.Tracking.GATrackingProfile=vjs.Tracking.TrackingProfile.extend({getOptions:function(){var n=vjs.Tracking.TrackingProfile.prototype.getOptions.call(this);return vjs.obj.merge(n,{events:{play:{},ended:{}}}),n},getNamespace:function(){return window._gaq||(window._gaq=[])},handlePlay:function(n,t){this.playing_||(this.playing_=!0,this.getNamespace().push(t.args))},handleEnded:function(n,t){this.playing_=!1;this.getNamespace().push(t.args)}});vjs.Tracking.registerProfile("ga",vjs.Tracking.GATrackingProfile)