window.Modernizr=function(a,b,c){function d(a){t.cssText=a}function e(a,b){return d(x.join(a+";")+(b||""))}function f(a,b){return typeof a===b}function g(a,b){return!!~(""+a).indexOf(b)}function h(a,b){for(var d in a){var e=a[d];if(!g(e,"-")&&t[e]!==c)return"pfx"==b?e:!0}return!1}function i(a,b,d){for(var e in a){var g=b[a[e]];if(g!==c)return d===!1?a[e]:f(g,"function")?g.bind(d||b):g}return!1}function j(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+z.join(d+" ")+d).split(" ");return f(b,"string")||f(b,"undefined")?h(e,b):(e=(a+" "+A.join(d+" ")+d).split(" "),i(e,b,c))}function k(){o.input=function(c){for(var d=0,e=c.length;e>d;d++)E[c[d]]=!!(c[d]in u);return E.list&&(E.list=!(!b.createElement("datalist")||!a.HTMLDataListElement)),E}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),o.inputtypes=function(a){for(var d,e,f,g=0,h=a.length;h>g;g++)u.setAttribute("type",e=a[g]),d="text"!==u.type,d&&(u.value=v,u.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(e)&&u.style.WebkitAppearance!==c?(q.appendChild(u),f=b.defaultView,d=f.getComputedStyle&&"textfield"!==f.getComputedStyle(u,null).WebkitAppearance&&0!==u.offsetHeight,q.removeChild(u)):/^(search|tel)$/.test(e)||(d=/^(url|email)$/.test(e)?u.checkValidity&&u.checkValidity()===!1:u.value!=v)),D[a[g]]=!!d;return D}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var l,m,n="2.8.3",o={},p=!0,q=b.documentElement,r="modernizr",s=b.createElement(r),t=s.style,u=b.createElement("input"),v=":)",w={}.toString,x=" -webkit- -moz- -o- -ms- ".split(" "),y="Webkit Moz O ms",z=y.split(" "),A=y.toLowerCase().split(" "),B={svg:"http://www.w3.org/2000/svg"},C={},D={},E={},F=[],G=F.slice,H=function(a,c,d,e){var f,g,h,i,j=b.createElement("div"),k=b.body,l=k||b.createElement("body");if(parseInt(d,10))for(;d--;)h=b.createElement("div"),h.id=e?e[d]:r+(d+1),j.appendChild(h);return f=["­",'"].join(""),j.id=r,(k?j:l).innerHTML+=f,l.appendChild(j),k||(l.style.background="",l.style.overflow="hidden",i=q.style.overflow,q.style.overflow="hidden",q.appendChild(l)),g=c(j,a),k?j.parentNode.removeChild(j):(l.parentNode.removeChild(l),q.style.overflow=i),!!g},I=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b)&&c(b).matches||!1;var d;return H("@media "+b+" { #"+r+" { position: absolute; } }",function(b){d="absolute"==(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position}),d},J=function(){function a(a,e){e=e||b.createElement(d[a]||"div"),a="on"+a;var g=a in e;return g||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(a,""),g=f(e[a],"function"),f(e[a],"undefined")||(e[a]=c),e.removeAttribute(a))),e=null,g}var d={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return a}(),K={}.hasOwnProperty;m=f(K,"undefined")||f(K.call,"undefined")?function(a,b){return b in a&&f(a.constructor.prototype[b],"undefined")}:function(a,b){return K.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=G.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(G.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(G.call(arguments)))};return d}),C.flexbox=function(){return j("flexWrap")},C.flexboxlegacy=function(){return j("boxDirection")},C.canvas=function(){var a=b.createElement("canvas");return!(!a.getContext||!a.getContext("2d"))},C.canvastext=function(){return!(!o.canvas||!f(b.createElement("canvas").getContext("2d").fillText,"function"))},C.webgl=function(){return!!a.WebGLRenderingContext},C.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:H(["@media (",x.join("touch-enabled),("),r,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=9===a.offsetTop}),c},C.geolocation=function(){return"geolocation"in navigator},C.postmessage=function(){return!!a.postMessage},C.websqldatabase=function(){return!!a.openDatabase},C.indexedDB=function(){return!!j("indexedDB",a)},C.hashchange=function(){return J("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},C.history=function(){return!(!a.history||!history.pushState)},C.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},C.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},C.rgba=function(){return d("background-color:rgba(150,255,150,.5)"),g(t.backgroundColor,"rgba")},C.hsla=function(){return d("background-color:hsla(120,40%,100%,.5)"),g(t.backgroundColor,"rgba")||g(t.backgroundColor,"hsla")},C.multiplebgs=function(){return d("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(t.background)},C.backgroundsize=function(){return j("backgroundSize")},C.borderimage=function(){return j("borderImage")},C.borderradius=function(){return j("borderRadius")},C.boxshadow=function(){return j("boxShadow")},C.textshadow=function(){return""===b.createElement("div").style.textShadow},C.opacity=function(){return e("opacity:.55"),/^0.55$/.test(t.opacity)},C.cssanimations=function(){return j("animationName")},C.csscolumns=function(){return j("columnCount")},C.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return d((a+"-webkit- ".split(" ").join(b+a)+x.join(c+a)).slice(0,-a.length)),g(t.backgroundImage,"gradient")},C.cssreflections=function(){return j("boxReflect")},C.csstransforms=function(){return!!j("transform")},C.csstransforms3d=function(){var a=!!j("perspective");return a&&"webkitPerspective"in q.style&&H("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b){a=9===b.offsetLeft&&3===b.offsetHeight}),a},C.csstransitions=function(){return j("transition")},C.fontface=function(){var a;return H('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&0===g.indexOf(d.split(" ")[0])}),a},C.generatedcontent=function(){var a;return H(["#",r,"{font:0/0 a}#",r,':after{content:"',v,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},C.video=function(){var a=b.createElement("video"),c=!1;try{(c=!!a.canPlayType)&&(c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(d){}return c},C.audio=function(){var a=b.createElement("audio"),c=!1;try{(c=!!a.canPlayType)&&(c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(d){}return c},C.localstorage=function(){try{return localStorage.setItem(r,r),localStorage.removeItem(r),!0}catch(a){return!1}},C.sessionstorage=function(){try{return sessionStorage.setItem(r,r),sessionStorage.removeItem(r),!0}catch(a){return!1}},C.webworkers=function(){return!!a.Worker},C.applicationcache=function(){return!!a.applicationCache},C.svg=function(){return!!b.createElementNS&&!!b.createElementNS(B.svg,"svg").createSVGRect},C.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==B.svg},C.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(w.call(b.createElementNS(B.svg,"animate")))},C.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(w.call(b.createElementNS(B.svg,"clipPath")))};for(var L in C)m(C,L)&&(l=L.toLowerCase(),o[l]=C[L](),F.push((o[l]?"":"no-")+l));return o.input||k(),o.addTest=function(a,b){if("object"==typeof a)for(var d in a)m(a,d)&&o.addTest(d,a[d]);else{if(a=a.toLowerCase(),o[a]!==c)return o;b="function"==typeof b?b():b,"undefined"!=typeof p&&p&&(q.className+=" "+(b?"":"no-")+a),o[a]=b}return o},d(""),s=u=null,function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=s.elements;return"string"==typeof a?a.split(" "):a}function e(a){var b=r[a[p]];return b||(b={},q++,a[p]=q,r[q]=b),b}function f(a,c,d){if(c||(c=b),k)return c.createElement(a);d||(d=e(c));var f;return f=d.cache[a]?d.cache[a].cloneNode():o.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!f.canHaveChildren||n.test(a)||f.tagUrn?f:d.frag.appendChild(f)}function g(a,c){if(a||(a=b),k)return a.createDocumentFragment();c=c||e(a);for(var f=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)f.createElement(h[g]);return f}function h(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?f(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function i(a){a||(a=b);var d=e(a);return!s.shivCSS||j||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||h(a,d),a}var j,k,l="3.7.0",m=a.html5||{},n=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,o=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,p="_html5shiv",q=0,r={};!function(){try{var a=b.createElement("a");a.innerHTML="",j="hidden"in a,k=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){j=!0,k=!0}}();var s={elements:m.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:l,shivCSS:m.shivCSS!==!1,supportsUnknownElements:k,shivMethods:m.shivMethods!==!1,type:"default",shivDocument:i,createElement:f,createDocumentFragment:g};a.html5=s,i(b)}(this,b),o._version=n,o._prefixes=x,o._domPrefixes=A,o._cssomPrefixes=z,o.mq=I,o.hasEvent=J,o.testProp=function(a){return h([a])},o.testAllProps=j,o.testStyles=H,o.prefixed=function(a,b,c){return b?j(a,b,c):j(a,"pfx")},q.className=q.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(p?" js "+F.join(" "):""),o}(this,this.document);!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=_.type(a);return"function"===c||_.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(hb.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=ob[a]={};return _.each(a.match(nb)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ub,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:tb.test(c)?_.parseJSON(c):c}catch(e){}sb.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Kb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)rb.set(a[c],"globalEval",!b||rb.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(rb.hasData(a)&&(f=rb.access(a),g=rb.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sb.hasData(a)&&(h=sb.access(a),i=_.extend({},h),sb.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&yb.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Ob[a];return c||(c=t(a,b),"none"!==c&&c||(Nb=(Nb||_("':"");a._keyEvent=!1;return H},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var k=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),j='
',o="";if(h||!k)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(j+=o+(h||!(k&&l)?" ":""));if(h||!l)j+=''+c+"";else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(j+='"}j+=this._get(a,"yearSuffix");if(u)j+=(h||!(k&&l)?" ":"")+o;j+="
";return j},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=!0}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new J;d.datepicker.initialized=!1;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.1";window["DP_jQuery_"+y]=d})(jQuery);(function(c){c.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:"center",resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");var a=this,b=a.options,d=b.title||a.originalTitle||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("
")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(!1,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("
")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),h=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return!1}).appendTo(f);(a.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("").addClass("ui-dialog-title").attr("id",e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=!1;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d;if(!1!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=!1;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==b.uiDialog[0])d=Math.max(d,c(this).css("z-index"))});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;d.next().length&&d.appendTo("body");a._size();a._position(b.position);d.show(b.show);a.moveToTop(!0);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return!1}else if(e.target===f[0]&&e.shiftKey){g.focus(1);return!1}}});c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();a._trigger("open");a._isOpen=!0;return a}},_createButtons:function(a){var b=this,d=!1,e=c("
").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,function(){return!(d=!0)});if(d){c.each(a,function(g,f){g=c('').text(g).click(function(){f.apply(b.element[0],arguments)}).appendTo(e);c.fn.button&&g.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,originalSize:f.originalSize,position:f.position,size:f.size}}a=a===undefined?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize",f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0];a=a||c.ui.dialog.prototype.options.position;if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(e,g){if(+b[e]===b[e]){d[e]=b[e];b[e]=g}})}else if(typeof a==="object"){if("left"in a){b[0]="left";d[0]=a.left}else if("right"in a){b[0]="right";d[0]=-a.right}if("top"in a){b[1]="top";d[1]=a.top}else if("bottom"in a){b[1]="bottom";d[1]=-a.bottom}}(a=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position({my:b.join(" "),at:b.join(" "),offset:d.join(" "),of:window,collision:"fit",using:function(e){var g=c(this).css(e).offset().top;g<0&&c(this).css("top",e.top-g)}});a||this.uiDialog.hide()},_setOption:function(a,b){var d=this,e=d.uiDialog,g=e.is(":data(resizable)"),f=!1;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):e.removeClass("ui-dialog-disabled");break;case "draggable":b?d._makeDraggable():e.draggable("destroy");break;case "height":f=!0;break;case "maxHeight":g&&e.resizable("option","maxHeight",b);f=!0;break;case "maxWidth":g&&e.resizable("option","maxWidth",b);f=!0;break;case "minHeight":g&&e.resizable("option","minHeight",b);f=!0;break;case "minWidth":g&&e.resizable("option","minWidth",b);f=!0;break;case "position":d._position(b);break;case "resizable":g&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==!1&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break;case "width":f=!0;break}c.Widget.prototype._setOption.apply(d,arguments);f&&d._size()},_size:function(){var a=this.options,b;this.element.css({width:"auto",minHeight:0,height:0});b=this.uiDialog.css({height:"auto",width:a.width}).height();this.element.css(a.height==="auto"?{minHeight:Math.max(a.minHeight-b,0),height:"auto"}:{minHeight:0,height:Math.max(a.height-b,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.1",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){return c(d.target).zIndex()>=c.ui.dialog.overlay.maxZ})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=(this.oldInstances.pop()||c("
").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){this.oldInstances.push(this.instances.splice(c.inArray(a,this.instances),1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var b=0;c.each(this.instances,function(){b=Math.max(b,this.css("z-index"))});this.maxZ=b},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a0?a.left-b:Math.max(0,a.left)},top:function(a,b){var d=c(window);b=a.top+b.elemHeight-d.height()-d.scrollTop();a.top=b>0?a.top-b:Math.max(0,a.top)}},flip:{left:function(a,b){if(b.at[0]!=="center"){var d=c(window);d=a.left+b.elemWidth-d.width()-d.scrollLeft();var e=b.my[0]==="left"?-b.elemWidth:b.my[0]==="right"?b.elemWidth:0,g=-2*b.offset[0];a.left+=a.left<0?e+b.targetWidth+g:d>0?e-b.targetWidth+g:0}},top:function(a,b){if(b.at[1]!=="center"){var d=c(window);d=a.top+b.elemHeight-d.height()-d.scrollTop();var e=b.my[1]==="top"?-b.elemHeight:b.my[1]==="bottom"?b.elemHeight:0,g=b.at[1]==="top"?b.targetHeight:-b.targetHeight,h=-2*b.offset[1];a.top+=a.top<0?e+b.targetHeight+h:d>0?e+g+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(a,b){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var d=c(a),e=d.offset(),g=parseInt(c.curCSS(a,"top",!0),10)||0,h=parseInt(c.curCSS(a,"left",!0),10)||0;e={top:b.top-e.top+g,left:b.left-e.left+h};"using"in b?b.using.call(a,e):d.css(e)};c.fn.offset=function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(){c.offset.setOffset(this,a)});return q.call(this)}}})(jQuery);(function(b){b.widget("ui.progressbar",{options:{value:0},_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=b("
").appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===undefined)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){switch(a){case "value":this.options.value=c;this._refreshValue();this._trigger("change");break}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;if(athis._valueMax())a=this._valueMax();return a},_valueMin:function(){return 0},_valueMax:function(){return 100},_refreshValue:function(){var a=this.value();this.valueDiv[a===this._valueMax()?"addClass":"removeClass"]("ui-corner-right").width(a+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.1"})})(jQuery);(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,a=this.options;this._mouseSliding=this._keySliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");a.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");this.range=d([]);if(a.range){if(a.range===!0){this.range=d("
");if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}else this.range=d("
");this.range.appendTo(this.element).addClass("ui-slider-range");if(a.range==="min"||a.range==="max")this.range.addClass("ui-slider-range-"+a.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("").appendTo(this.element).addClass("ui-slider-handle");if(a.values&&a.values.length)for(;d(".ui-slider-handle",this.element).length").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=!0,f=d(this).data("index.ui-slider-handle"),g,h,i;if(!b.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e=!1;if(!b._keySliding){b._keySliding=!0;d(this).addClass("ui-state-active");g=b._start(c,f);if(g===!1)return}break}i=b.options.step;g=b.options.values&&b.options.values.length?(h=b.values(f)):(h=b.value());switch(c.keyCode){case d.ui.keyCode.HOME:h=b._valueMin();break;case d.ui.keyCode.END:h=b._valueMax();break;case d.ui.keyCode.PAGE_UP:h=g+(b._valueMax()-b._valueMin())/5;break;case d.ui.keyCode.PAGE_DOWN:h=g-(b._valueMax()-b._valueMin())/5;break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(g===b._valueMax())return;h=g+i;break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(g===b._valueMin())return;h=g-i;break}b._slide(c,f,h);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=!1;b._stop(c,e);b._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=!1},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(b){var a=this.options,c,e,f,g,h,i;if(a.disabled)return!1;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c={x:b.pageX,y:b.pageY};e=this._normValueFromMouse(c);f=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(j){var k=Math.abs(e-h.values(j));if(f>k){f=k;g=d(this);i=j}});if(a.range===!0&&this.values(1)===a.min){i+=1;g=d(this.handles[i])}if(this._start(b,i)===!1)return!1;this._mouseSliding=!0;h._handleIndex=i;g.addClass("ui-state-active").focus();a=g.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-g.width()/2,top:b.pageY-a.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)};e=this._normValueFromMouse(c);this._slide(b,i,e);return this._animateOff=!0},_mouseStart:function(){return!0},_mouseDrag:function(b){var a=this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return!1},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=!1;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a;if(this.orientation==="horizontal"){a=this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var e;if(this.options.values&&this.options.values.length){e=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===!0&&(a===0&&c>e||a===1&&c1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;fthis._valueMax())return this._valueMax();var a=this.options.step,c=b%a;b=b-c;if(c>=a/2)b+=a;return parseFloat(b.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,a=this.options,c=this,e=!this._animateOff?a.animate:!1,f,g={},h,i,j,k;if(this.options.values&&this.options.values.length)this.handles.each(function(l){f=(c.values(l)-c._valueMin())/(c._valueMax()-c._valueMin())*100;g[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](g,a.animate);if(c.options.range===!0)if(c.orientation==="horizontal"){if(l===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},a.animate);if(l===1)c.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:a.animate})}else{if(l===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},a.animate);if(l===1)c.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:a.animate})}h=f});else{i=this.value();j=this._valueMin();k=this._valueMax();f=k!==j?(i-j)/(k-j)*100:0;g[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](g,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.1"})})(jQuery);(function(d){var s=0,u=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:'
  • #{label}
  • '},_create:function(){this._tabify(!0)},_setOption:function(c,e){if(c=="selected")this.options.collapsible&&e==this.options.selected||this.select(e);else{this.options[c]=e;this._tabify()}},_tabId:function(c){return c.title&&c.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+ ++s},_sanitizeSelector:function(c){return c.replace(/:/g,"\\:")},_cookie:function(){var c=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+ ++u);return d.cookie.apply(null,[c].concat(d.makeArray(arguments)))},_ui:function(c,e){return{tab:c,panel:e,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var c=d(this);c.html(c.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function e(g,f){g.css({display:""});!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}this.list=this.element.find("ol,ul").eq(0);this.lis=d("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);var a=this,b=this.options,h=/^#.+/;this.anchors.each(function(g,f){var j=d(f).attr("href"),l=j.split("#")[0],p;if(l&&(l===location.toString().split("#")[0]||(p=d("base")[0])&&l===p.href)){j=f.hash;f.href=j}if(h.test(j))a.panels=a.panels.add(a._sanitizeSelector(j));else if(j!="#"){d.data(f,"href.tabs",j);d.data(f,"load.tabs",j.replace(/#.*$/,""));j=a._tabId(f);f.href="#"+j;f=d("#"+j);if(!f.length){f=d(b.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",!0)}a.panels=a.panels.add(f)}else b.disabled.push(g)});if(c){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(b.selected===undefined){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){b.selected=g;return!1}});if(typeof b.selected!="number"&&b.cookie)b.selected=parseInt(a._cookie(),10);if(typeof b.selected!="number"&&this.lis.filter(".ui-tabs-selected").length)b.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));b.selected=b.selected||(this.lis.length?0:-1)}else if(b.selected===null)b.selected=-1;b.selected=b.selected>=0&&this.anchors[b.selected]||b.selected<0?b.selected:0;b.disabled=d.unique(b.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(b.selected,b.disabled)!=-1&&b.disabled.splice(d.inArray(b.selected,b.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(b.selected>=0&&this.anchors.length){this.panels.eq(b.selected).removeClass("ui-tabs-hide");this.lis.eq(b.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[b.selected],a.panels[b.selected]))});this.load(b.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else b.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));this.element[b.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");b.cookie&&this._cookie(b.selected,b.cookie);c=0;for(var i;i=this.lis[c];c++)d(i)[d.inArray(c,b.disabled)!=-1&&!d(i).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");b.cache===!1&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(b.event!="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(b.fx)if(d.isArray(b.fx)){m=b.fx[0];o=b.fx[1]}else m=o=b.fx;var q=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},r=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")};this.anchors.bind(b.event+".tabs",function(){var g=this,f=d(this).closest("li"),j=a.panels.filter(":not(.ui-tabs-hide)"),l=d(a._sanitizeSelector(this.hash));if(f.hasClass("ui-tabs-selected")&&!b.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a._trigger("select",null,a._ui(this,l[0]))===!1){this.blur();return!1}b.selected=a.anchors.index(this);a.abort();if(b.collapsible)if(f.hasClass("ui-tabs-selected")){b.selected=-1;b.cookie&&a._cookie(b.selected,b.cookie);a.element.queue("tabs",function(){r(g,j)}).dequeue("tabs");this.blur();return!1}else if(!j.length){b.cookie&&a._cookie(b.selected,b.cookie);a.element.queue("tabs",function(){q(g,l)});a.load(a.anchors.index(this));this.blur();return!1}b.cookie&&a._cookie(b.selected,b.cookie);if(l.length){j.length&&a.element.queue("tabs",function(){r(g,j)});a.element.queue("tabs",function(){q(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return!1})},destroy:function(){var c=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(b,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});c.cookie&&this._cookie(null,c.cookie);return this},add:function(c,e,a){if(a===undefined)a=this.anchors.length;var b=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,e));c=!c.indexOf("#")?c.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var i=d("#"+c);i.length||(i=d(h.panelTemplate).attr("id",c).data("destroy.tabs",!0));i.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);i.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]);i.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");i.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(c){var e=this.options,a=this.lis.eq(c).remove(),b=this.panels.eq(c).remove();if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(c+(c+1=c?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],b[0]));return this},enable:function(c){var e=this.options;if(d.inArray(c,e.disabled)!=-1){this.lis.eq(c).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=c});this._trigger("enable",null,this._ui(this.anchors[c],this.panels[c]));return this}},disable:function(c){var e=this.options;if(c!=e.selected){this.lis.eq(c).addClass("ui-state-disabled");e.disabled.push(c);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}return this},select:function(c){if(typeof c=="string")c=this.anchors.index(this.anchors.filter("[href$="+c+"]"));else if(c===null)c=-1;if(c==-1&&this.options.collapsible)c=this.options.selected;this.anchors.eq(c).trigger(this.options.event+".tabs");return this},load:function(c){var e=this,a=this.options,b=this.anchors.eq(c)[0],h=d.data(b,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(b,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(c).addClass("ui-state-processing");if(a.spinner){var i=d("span",b);i.data("label.tabs",i.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){d(e._sanitizeSelector(b.hash)).html(k);e._cleanup();a.cache&&d.data(b,"cache.tabs",!0);e._trigger("load",null,e._ui(e.anchors[c],e.panels[c]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[c],e.panels[c]));try{a.ajaxOptions.error(k,n,c,b)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(!1,!0);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(c,e){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.1"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(c,e){var a=this,b=this.options,h=a._rotate||(a._rotate=function(i){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=b.selected;a.select(++k');$this.parent().wrap('
    ');if(o.alignment=='horizontal'){$this.children().css({'float':'left','listStyle':'none','marginRight':o.margin});w=first.outerWidth(!0);$this.css({'width':'99999px','position':'relative','left':-w});$this.parent().css({'position':'relative','overflow':'hidden','width':w-o.margin})}else if(o.alignment=='vertical'){$kids.each(function(){if($(this).height()>h){h=$(this).height()}});w=first.outerWidth();$this.children().css({'height':h,'listStyle':'none','marginBottom':o.margin});$this.css({'height':'99999px','width':w,'position':'relative','top':-(h+o.margin)});$this.parent().css({'position':'relative','overflow':'hidden','height':h})} if(o.pager&&!o.ticker){$this.parent().after('
    ');if(!o.pager_short){var $a;$kids.each(function(index){$a=$(''+(index+1)+'');$this.parent().siblings('.bx_pager').append($a);$a.click(function(){is_working=!1;tick_play=!1;$this.stop();move_slide(index+1);current=index+1;if(o.auto){clearInterval(t);$this.parent().siblings('.auto_controls').find('a').html(o.start_text);playing=!1}else if(o.ticker){$this.parent().siblings('.ticker_controls').find('a').html(o.start_text);playing=!1} return!1})})}else{$this.parent().siblings('.bx_pager').append()} set_active(1)} if(o.controls&&!o.ticker){if(o.next_image!=''||o.prev_image!=''){$this.parent().after('')}else{$this.parent().after('')} $this.parent().siblings('.next').click(function(){if(!is_working){move_slide(++current)} if(o.auto){clearInterval(t);$this.parent().siblings('.auto_controls').find('a').html(o.start_text);playing=!1} return!1});$this.parent().siblings('.prev').click(function(){if(!is_working){move_slide(--current)} if(o.auto){clearInterval(t);$this.parent().siblings('.auto_controls').find('a').html(o.start_text);playing=!1} return!1})} if(o.auto&&!o.ticker){t=setInterval(function(){if(o.auto_direction=='next'){move_slide(++current)}else{move_slide(--current)}},o.pause);if(o.auto_hover){$this.hover(function(){clearInterval(t)},function(){if(playing){t=setInterval(function(){if(o.auto_direction=='next'){move_slide(++current)}else{move_slide(--current)}},o.pause)}})} if(o.auto_controls){$this.parent().after('');$this.parent().siblings('.auto_controls').find('a').click(function(){if(playing){clearInterval(t);$(this).html(o.start_text);playing=!1}else{t=setInterval(function(){if(o.auto_direction=='next'){move_slide(++current)}else{move_slide(--current)}},o.pause);$(this).html(o.stop_text);playing=!0} return!1})}} if(o.ticker){var tick_play=!0;tick_slide();$this.hover(function(){$this.stop()},function(){if(tick_play){tick_slide()}});if(o.ticker_controls){$this.parent().after('');$this.parent().siblings('.ticker_controls').find('a').click(function(){if(tick_play){$this.stop();$(this).html(o.start_text);tick_play=!1}else{is_working=!1;$(this).html(o.stop_text) tick_slide();tick_play=!0} return!1})}} function tick_slide(){if(o.ticker_direction=='next'&&o.alignment=='horizontal'){$this.animate({left:'-=5px'},o.speed/5,'linear',function(){if(parseInt($this.css('left'))<=-((l+1)*w)){$this.css('left',-w)} tick_slide()})}else if(o.ticker_direction=='prev'&&o.alignment=='horizontal'){$this.animate({left:'+=5px'},o.speed/5,'linear',function(){if(parseInt($this.css('left'))>=-(w)){$this.css('left',-((l+1)*w))} tick_slide()})}else if(o.ticker_direction=='next'&&o.alignment=='vertical'){$this.animate({top:'-=5px'},o.speed/5,'linear',function(){if(parseInt($this.css('top'))<=-((l+1)*(h+o.margin))){$this.css('top',-(h+o.margin))} tick_slide()})}else if(o.ticker_direction=='prev'&&o.alignment=='vertical'){$this.animate({top:'+=4px'},o.speed/5,'linear',function(){if(parseInt($this.css('top'))>-(h+o.margin)){$this.css('top',-((l+1)*(h+o.margin-1)))} tick_slide()})}} function move_slide(num){if(o.ticker){ease='linear'} if(!is_working){if(o.alignment=='horizontal'){d=w;side='left'}else if(o.alignment=='vertical'){d=h+o.margin;side='top'} pos=num*d;ani[side]=-pos;is_working=!0;$this.animate(ani,o.speed,ease,function(){is_working=!1;if(current>l){$this.css(side,-d);current=1}else if(current<1){$this.css(side,-(d*l));current=l} set_active(current)})}} function set_active(num){if(o.pager&&!o.pager_short){$this.parent().siblings('.bx_pager').find('a').removeClass('active').eq(num-1).addClass('active')}else if(o.pager_short){$this.parent().siblings('.bx_pager').html(num+o.pager_short_separator+$kids.length)}}})}})(jQuery);(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options)})},result:function(handler){return this.bind("result",handler)},search:function(handler){return this.trigger("search",[handler])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(options){return this.trigger("setOptions",[options])},unautocomplete:function(){return this.trigger("unautocomplete")}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:!1};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=!1;return!1}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){hasFocus=1;lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev()}else{onChange(0,!0)} break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next()}else{onChange(0,!0)} break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp()}else{onChange(0,!0)} break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown()}else{onChange(0,!0)} break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=!0;return!1} break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break}}).focus(function(){hasFocus++}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults()}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,!0)}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i1){var seperator=options.multipleSeparator.length;var cursorAt=$(input).selection().start;var wordAt,progress=0;$.each(words,function(i,word){progress+=word.length;if(cursorAt<=progress){wordAt=i;return!1} progress+=seperator});words[wordAt]=v;v=words.join(options.multipleSeparator)} v+=options.multipleSeparator} $input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return!0} function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return} var currentValue=$input.val();if(!skipPrevCheck&¤tValue==previousValue) return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase) currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow)}else{stopLoading();select.hide()}};function trimWords(value){if(!value) return[""];if(!options.multiple) return[$.trim(value)];return $.map(value.split(options.multipleSeparator),function(word){return $.trim(value).length?$.trim(word):null})} function lastWord(value){if(!options.multiple) return value;var words=trimWords(value);if(words.length==1) return words[0];var cursorAt=$(input).selection().start;if(cursorAt==value.length){words=trimWords(value)}else{words=trimWords(value.replace(value.substring(cursorAt),""))} return words[words.length-1]} function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$(input).selection(previousValue.length,previousValue.length+sValue.length)}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200)};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""))}else{$input.val("");$input.trigger("result",null)}}})}};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show()}else{hideResultsNow()}};function request(term,success,failure){if(!options.matchCase) term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data)}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed)}})}else{select.emptyList();failure(term)}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"$1")},scroll:!0,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase) s=s.toLowerCase();var i=s.indexOf(sub);if(options.matchContains=="word"){i=s.toLowerCase().search("\\b"+sub.toLowerCase())} if(i==-1)return!1;return i==0||options.matchContains};function add(q,value){if(length>options.cacheLength){flush()} if(!data[q]){length++} data[q]=value} function populate(){if(!options.data)return!1;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x)}})}} return csub}else if(data[q]){return data[q]}else if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x}});return csub}}} return null}}};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=!0,element,list;function init(){if(!needsInit) return;element=$("
    ").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("
      ").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE)}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return!1}).mousedown(function(){config.mouseDownOnSelect=!0}).mouseup(function(){config.mouseDownOnSelect=!1});if(options.width>0) element.css("width",options.width);needsInit=!1} function target(event){var element=event.target;while(element&&element.tagName!="LI") element=element.parentNode;if(!element) return[];return element} function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight())}else if(offset=listItems.size()){active=0}} function limitNumberOfItems(available){return options.max&&options.max").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i])} listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0} if($.fn.bgiframe) list.bgiframe()} return{display:function(d,q){init();data=d;term=q;fillList()},next:function(){moveSelect(1)},prev:function(){moveSelect(-1)},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active)}else{moveSelect(-8)}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active)}else{moveSelect(8)}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1},visible:function(){return element&&element.is(":visible")},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0])},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.scrollTop(0);list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")))}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data")},emptyList:function(){list&&list.empty()},unbind:function(){element&&element.remove()}}};$.fn.selection=function(start,end){if(start!==undefined){return this.each(function(){if(this.createTextRange){var selRange=this.createTextRange();if(end===undefined||start==end){selRange.move("character",start);selRange.select()}else{selRange.collapse(!0);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select()}}else if(this.setSelectionRange){this.setSelectionRange(start,end)}else if(this.selectionStart){this.selectionStart=start;this.selectionEnd=end}})} var field=this[0];if(field.createTextRange){var range=document.selection.createRange(),orig=field.value,teststring="<->",textLength=range.text.length;range.text=teststring;var caretAt=field.value.indexOf(teststring);field.value=orig;this.selection(caretAt,caretAt+textLength);return{start:caretAt,end:caretAt+textLength}}else if(field.selectionStart!==undefined){return{start:field.selectionStart,end:field.selectionEnd}}}})(jQuery);(function($){function sc_setScroll(a,b,c){return"transition"==c.transition&&"swing"==b&&(b="ease"),{anims:[],duration:a,orgDuration:a,easing:b,startTime:getTime()}}function sc_startScroll(a,b){for(var c=0,d=a.anims.length;d>c;c++){var e=a.anims[c];e&&e[0][b.transition](e[1],a.duration,a.easing,e[2])}}function sc_stopScroll(a,b){is_boolean(b)||(b=!0),is_object(a.pre)&&sc_stopScroll(a.pre,b);for(var c=0,d=a.anims.length;d>c;c++){var e=a.anims[c];e[0].stop(!0),b&&(e[0].css(e[1]),is_function(e[2])&&e[2]())}is_object(a.post)&&sc_stopScroll(a.post,b)}function sc_afterScroll(a,b,c){switch(b&&b.remove(),c.fx){case"fade":case"crossfade":case"cover-fade":case"uncover-fade":a.css("opacity",1),a.css("filter","")}}function sc_fireCallbacks(a,b,c,d,e){if(b[c]&&b[c].call(a,d),e[c].length)for(var f=0,g=e[c].length;g>f;f++)e[c][f].call(a,d);return[]}function sc_fireQueue(a,b,c){return b.length&&(a.trigger(cf_e(b[0][0],c),b[0][1]),b.shift()),b}function sc_hideHiddenItems(a){a.each(function(){var a=$(this);a.data("_cfs_isHidden",a.is(":hidden")).hide()})}function sc_showHiddenItems(a){a&&a.each(function(){var a=$(this);a.data("_cfs_isHidden")||a.show()})}function sc_clearTimers(a){return a.auto&&clearTimeout(a.auto),a.progress&&clearInterval(a.progress),a}function sc_mapCallbackArguments(a,b,c,d,e,f,g){return{width:g.width,height:g.height,items:{old:a,skipped:b,visible:c},scroll:{items:d,direction:e,duration:f}}}function sc_getDuration(a,b,c,d){var e=a.duration;return"none"==a.fx?0:("auto"==e?e=b.scroll.duration/b.scroll.items*c:10>e&&(e=d/e),1>e?0:("fade"==a.fx&&(e/=2),Math.round(e)))}function nv_showNavi(a,b,c){var d=is_number(a.items.minimum)?a.items.minimum:a.items.visible+1;if("show"==b||"hide"==b)var e=b;else if(d>b){debug(c,"Not enough items ("+b+" total, "+d+" needed): Hiding navigation.");var e="hide"}else var e="show";var f="show"==e?"removeClass":"addClass",g=cf_c("hidden",c);a.auto.button&&a.auto.button[e]()[f](g),a.prev.button&&a.prev.button[e]()[f](g),a.next.button&&a.next.button[e]()[f](g),a.pagination.container&&a.pagination.container[e]()[f](g)}function nv_enableNavi(a,b,c){if(!a.circular&&!a.infinite){var d="removeClass"==b||"addClass"==b?b:!1,e=cf_c("disabled",c);if(a.auto.button&&d&&a.auto.button[d](e),a.prev.button){var f=d||0==b?"addClass":"removeClass";a.prev.button[f](e)}if(a.next.button){var f=d||b==a.items.visible?"addClass":"removeClass";a.next.button[f](e)}}}function go_getObject(a,b){return is_function(b)?b=b.call(a):is_undefined(b)&&(b={}),b}function go_getItemsObject(a,b){return b=go_getObject(a,b),is_number(b)?b={visible:b}:"variable"==b?b={visible:b,width:b,height:b}:is_object(b)||(b={}),b}function go_getScrollObject(a,b){return b=go_getObject(a,b),is_number(b)?b=50>=b?{items:b}:{duration:b}:is_string(b)?b={easing:b}:is_object(b)||(b={}),b}function go_getNaviObject(a,b){if(b=go_getObject(a,b),is_string(b)){var c=cf_getKeyCode(b);b=-1==c?$(b):c}return b}function go_getAutoObject(a,b){return b=go_getNaviObject(a,b),is_jquery(b)?b={button:b}:is_boolean(b)?b={play:b}:is_number(b)&&(b={timeoutDuration:b}),b.progress&&(is_string(b.progress)||is_jquery(b.progress))&&(b.progress={bar:b.progress}),b}function go_complementAutoObject(a,b){return is_function(b.button)&&(b.button=b.button.call(a)),is_string(b.button)&&(b.button=$(b.button)),is_boolean(b.play)||(b.play=!0),is_number(b.delay)||(b.delay=0),is_undefined(b.pauseOnEvent)&&(b.pauseOnEvent=!0),is_boolean(b.pauseOnResize)||(b.pauseOnResize=!0),is_number(b.timeoutDuration)||(b.timeoutDuration=10>b.duration?2500:5*b.duration),b.progress&&(is_function(b.progress.bar)&&(b.progress.bar=b.progress.bar.call(a)),is_string(b.progress.bar)&&(b.progress.bar=$(b.progress.bar)),b.progress.bar?(is_function(b.progress.updater)||(b.progress.updater=$.fn.carouFredSel.progressbarUpdater),is_number(b.progress.interval)||(b.progress.interval=50)):b.progress=!1),b}function go_getPrevNextObject(a,b){return b=go_getNaviObject(a,b),is_jquery(b)?b={button:b}:is_number(b)&&(b={key:b}),b}function go_complementPrevNextObject(a,b){return is_function(b.button)&&(b.button=b.button.call(a)),is_string(b.button)&&(b.button=$(b.button)),is_string(b.key)&&(b.key=cf_getKeyCode(b.key)),b}function go_getPaginationObject(a,b){return b=go_getNaviObject(a,b),is_jquery(b)?b={container:b}:is_boolean(b)&&(b={keys:b}),b}function go_complementPaginationObject(a,b){return is_function(b.container)&&(b.container=b.container.call(a)),is_string(b.container)&&(b.container=$(b.container)),is_number(b.items)||(b.items=!1),is_boolean(b.keys)||(b.keys=!1),is_function(b.anchorBuilder)||is_false(b.anchorBuilder)||(b.anchorBuilder=$.fn.carouFredSel.pageAnchorBuilder),is_number(b.deviation)||(b.deviation=0),b}function go_getSwipeObject(a,b){return is_function(b)&&(b=b.call(a)),is_undefined(b)&&(b={onTouch:!1}),is_true(b)?b={onTouch:b}:is_number(b)&&(b={items:b}),b}function go_complementSwipeObject(a,b){return is_boolean(b.onTouch)||(b.onTouch=!0),is_boolean(b.onMouse)||(b.onMouse=!1),is_object(b.options)||(b.options={}),is_boolean(b.options.triggerOnTouchEnd)||(b.options.triggerOnTouchEnd=!1),b}function go_getMousewheelObject(a,b){return is_function(b)&&(b=b.call(a)),is_true(b)?b={}:is_number(b)?b={items:b}:is_undefined(b)&&(b=!1),b}function go_complementMousewheelObject(a,b){return b}function gn_getItemIndex(a,b,c,d,e){if(is_string(a)&&(a=$(a,e)),is_object(a)&&(a=$(a,e)),is_jquery(a)?(a=e.children().index(a),is_boolean(c)||(c=!1)):is_boolean(c)||(c=!0),is_number(a)||(a=0),is_number(b)||(b=0),c&&(a+=d.first),a+=b,d.total>0){for(;a>=d.total;)a-=d.total;for(;0>a;)a+=d.total}return a}function gn_getVisibleItemsPrev(a,b,c){for(var d=0,e=0,f=c;f>=0;f--){var g=a.eq(f);if(d+=g.is(":visible")?g[b.d.outerWidth](!0):0,d>b.maxDimension)return e;0==f&&(f=a.length),e++}}function gn_getVisibleItemsPrevFilter(a,b,c){return gn_getItemsPrevFilter(a,b.items.filter,b.items.visibleConf.org,c)}function gn_getScrollItemsPrevFilter(a,b,c,d){return gn_getItemsPrevFilter(a,b.items.filter,d,c)}function gn_getItemsPrevFilter(a,b,c,d){for(var e=0,f=0,g=d,h=a.length;g>=0;g--){if(f++,f==h)return f;var i=a.eq(g);if(i.is(b)&&(e++,e==c))return f;0==g&&(g=h)}}function gn_getVisibleOrg(a,b){return b.items.visibleConf.org||a.children().slice(0,b.items.visible).filter(b.items.filter).length}function gn_getVisibleItemsNext(a,b,c){for(var d=0,e=0,f=c,g=a.length-1;g>=f;f++){var h=a.eq(f);if(d+=h.is(":visible")?h[b.d.outerWidth](!0):0,d>b.maxDimension)return e;if(e++,e==g+1)return e;f==g&&(f=-1)}}function gn_getVisibleItemsNextTestCircular(a,b,c,d){var e=gn_getVisibleItemsNext(a,b,c);return b.circular||c+e>d&&(e=d-c),e}function gn_getVisibleItemsNextFilter(a,b,c){return gn_getItemsNextFilter(a,b.items.filter,b.items.visibleConf.org,c,b.circular)}function gn_getScrollItemsNextFilter(a,b,c,d){return gn_getItemsNextFilter(a,b.items.filter,d+1,c,b.circular)-1}function gn_getItemsNextFilter(a,b,c,d){for(var f=0,g=0,h=d,i=a.length-1;i>=h;h++){if(g++,g>=i)return g;var j=a.eq(h);if(j.is(b)&&(f++,f==c))return g;h==i&&(h=-1)}}function gi_getCurrentItems(a,b){return a.slice(0,b.items.visible)}function gi_getOldItemsPrev(a,b,c){return a.slice(c,b.items.visibleConf.old+c)}function gi_getNewItemsPrev(a,b){return a.slice(0,b.items.visible)}function gi_getOldItemsNext(a,b){return a.slice(0,b.items.visibleConf.old)}function gi_getNewItemsNext(a,b,c){return a.slice(c,b.items.visible+c)}function sz_storeMargin(a,b,c){b.usePadding&&(is_string(c)||(c="_cfs_origCssMargin"),a.each(function(){var a=$(this),d=parseInt(a.css(b.d.marginRight),10);is_number(d)||(d=0),a.data(c,d)}))}function sz_resetMargin(a,b,c){if(b.usePadding){var d=is_boolean(c)?c:!1;is_number(c)||(c=0),sz_storeMargin(a,b,"_cfs_tempCssMargin"),a.each(function(){var a=$(this);a.css(b.d.marginRight,d?a.data("_cfs_tempCssMargin"):c+a.data("_cfs_origCssMargin"))})}}function sz_storeOrigCss(a){a.each(function(){var a=$(this);a.data("_cfs_origCss",a.attr("style")||"")})}function sz_restoreOrigCss(a){a.each(function(){var a=$(this);a.attr("style",a.data("_cfs_origCss")||"")})}function sz_setResponsiveSizes(a,b){var d=(a.items.visible,a.items[a.d.width]),e=a[a.d.height],f=is_percentage(e);b.each(function(){var b=$(this),c=d-ms_getPaddingBorderMargin(b,a,"Width");b[a.d.width](c),f&&b[a.d.height](ms_getPercentage(c,e))})}function sz_setSizes(a,b){var c=a.parent(),d=a.children(),e=gi_getCurrentItems(d,b),f=cf_mapWrapperSizes(ms_getSizes(e,b,!0),b,!1);if(c.css(f),b.usePadding){var g=b.padding,h=g[b.d[1]];b.align&&0>h&&(h=0);var i=e.last();i.css(b.d.marginRight,i.data("_cfs_origCssMargin")+h),a.css(b.d.top,g[b.d[0]]),a.css(b.d.left,g[b.d[3]])}return a.css(b.d.width,f[b.d.width]+2*ms_getTotalSize(d,b,"width")),a.css(b.d.height,ms_getLargestSize(d,b,"height")),f}function ms_getSizes(a,b,c){return[ms_getTotalSize(a,b,"width",c),ms_getLargestSize(a,b,"height",c)]}function ms_getLargestSize(a,b,c,d){return is_boolean(d)||(d=!1),is_number(b[b.d[c]])&&d?b[b.d[c]]:is_number(b.items[b.d[c]])?b.items[b.d[c]]:(c=c.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",ms_getTrueLargestSize(a,b,c))}function ms_getTrueLargestSize(a,b,c){for(var d=0,e=0,f=a.length;f>e;e++){var g=a.eq(e),h=g.is(":visible")?g[b.d[c]](!0):0;h>d&&(d=h)}return d}function ms_getTotalSize(a,b,c,d){if(is_boolean(d)||(d=!1),is_number(b[b.d[c]])&&d)return b[b.d[c]];if(is_number(b.items[b.d[c]]))return b.items[b.d[c]]*a.length;for(var e=c.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight",f=0,g=0,h=a.length;h>g;g++){var i=a.eq(g);f+=i.is(":visible")?i[b.d[e]](!0):0}return f}function ms_getParentSize(a,b,c){var d=a.is(":visible");d&&a.hide();var e=a.parent()[b.d[c]]();return d&&a.show(),e}function ms_getMaxDimension(a,b){return is_number(a[a.d.width])?a[a.d.width]:b}function ms_hasVariableSizes(a,b,c){for(var d=!1,e=!1,f=0,g=a.length;g>f;f++){var h=a.eq(f),i=h.is(":visible")?h[b.d[c]](!0):0;d===!1?d=i:d!=i&&(e=!0),0==d&&(e=!0)}return e}function ms_getPaddingBorderMargin(a,b,c){return a[b.d["outer"+c]](!0)-a[b.d[c.toLowerCase()]]()}function ms_getPercentage(a,b){if(is_percentage(b)){if(b=parseInt(b.slice(0,-1),10),!is_number(b))return a;a*=b/100}return a}function cf_e(a,b,c,d,e){return is_boolean(c)||(c=!0),is_boolean(d)||(d=!0),is_boolean(e)||(e=!1),c&&(a=b.events.prefix+a),d&&(a=a+"."+b.events.namespace),d&&e&&(a+=b.serialNumber),a}function cf_c(a,b){return is_string(b.classnames[a])?b.classnames[a]:a}function cf_mapWrapperSizes(a,b,c){is_boolean(c)||(c=!0);var d=b.usePadding&&c?b.padding:[0,0,0,0],e={};return e[b.d.width]=a[0]+d[1]+d[3],e[b.d.height]=a[1]+d[0]+d[2],e}function cf_sortParams(a,b){for(var c=[],d=0,e=a.length;e>d;d++)for(var f=0,g=b.length;g>f;f++)if(b[f].indexOf(typeof a[d])>-1&&is_undefined(c[f])){c[f]=a[d];break}return c}function cf_getPadding(a){if(is_undefined(a))return[0,0,0,0];if(is_number(a))return[a,a,a,a];if(is_string(a)&&(a=a.split("px").join("").split("em").join("").split(" ")),!is_array(a))return[0,0,0,0];for(var b=0;4>b;b++)a[b]=parseInt(a[b],10);switch(a.length){case 0:return[0,0,0,0];case 1:return[a[0],a[0],a[0],a[0]];case 2:return[a[0],a[1],a[0],a[1]];case 3:return[a[0],a[1],a[2],a[1]];default:return[a[0],a[1],a[2],a[3]]}}function cf_getAlignPadding(a,b){var c=is_number(b[b.d.width])?Math.ceil(b[b.d.width]-ms_getTotalSize(a,b,"width")):0;switch(b.align){case"left":return[0,c];case"right":return[c,0];case"center":default:return[Math.ceil(c/2),Math.floor(c/2)]}}function cf_getDimensions(a){for(var b=[["width","innerWidth","outerWidth","height","innerHeight","outerHeight","left","top","marginRight",0,1,2,3],["height","innerHeight","outerHeight","width","innerWidth","outerWidth","top","left","marginBottom",3,2,1,0]],c=b[0].length,d="right"==a.direction||"left"==a.direction?0:1,e={},f=0;c>f;f++)e[b[0][f]]=b[d][f];return e}function cf_getAdjust(a,b,c,d){var e=a;if(is_function(c))e=c.call(d,e);else if(is_string(c)){var f=c.split("+"),g=c.split("-");if(g.length>f.length)var h=!0,i=g[0],j=g[1];else var h=!1,i=f[0],j=f[1];switch(i){case"even":e=1==a%2?a-1:a;break;case"odd":e=0==a%2?a-1:a;break;default:e=a}j=parseInt(j,10),is_number(j)&&(h&&(j=-j),e+=j)}return(!is_number(e)||1>e)&&(e=1),e}function cf_getItemsAdjust(a,b,c,d){return cf_getItemAdjustMinMax(cf_getAdjust(a,b,c,d),b.items.visibleConf)}function cf_getItemAdjustMinMax(a,b){return is_number(b.min)&&b.min>a&&(a=b.min),is_number(b.max)&&a>b.max&&(a=b.max),1>a&&(a=1),a}function cf_getSynchArr(a){is_array(a)||(a=[[a]]),is_array(a[0])||(a=[a]);for(var b=0,c=a.length;c>b;b++)is_string(a[b][0])&&(a[b][0]=$(a[b][0])),is_boolean(a[b][1])||(a[b][1]=!0),is_boolean(a[b][2])||(a[b][2]=!0),is_number(a[b][3])||(a[b][3]=0);return a}function cf_getKeyCode(a){return"right"==a?39:"left"==a?37:"up"==a?38:"down"==a?40:-1}function cf_setCookie(a,b,c){if(a){var d=b.triggerHandler(cf_e("currentPosition",c));$.fn.carouFredSel.cookie.set(a,d)}}function cf_getCookie(a){var b=$.fn.carouFredSel.cookie.get(a);return""==b?0:b}function in_mapCss(a,b){for(var c={},d=0,e=b.length;e>d;d++)c[b[d]]=a.css(b[d]);return c}function in_complementItems(a,b,c,d){return is_object(a.visibleConf)||(a.visibleConf={}),is_object(a.sizesConf)||(a.sizesConf={}),0==a.start&&is_number(d)&&(a.start=d),is_object(a.visible)?(a.visibleConf.min=a.visible.min,a.visibleConf.max=a.visible.max,a.visible=!1):is_string(a.visible)?("variable"==a.visible?a.visibleConf.variable=!0:a.visibleConf.adjust=a.visible,a.visible=!1):is_function(a.visible)&&(a.visibleConf.adjust=a.visible,a.visible=!1),is_string(a.filter)||(a.filter=c.filter(":hidden").length>0?":visible":"*"),a[b.d.width]||(b.responsive?(debug(!0,"Set a "+b.d.width+" for the items!"),a[b.d.width]=ms_getTrueLargestSize(c,b,"outerWidth")):a[b.d.width]=ms_hasVariableSizes(c,b,"outerWidth")?"variable":c[b.d.outerWidth](!0)),a[b.d.height]||(a[b.d.height]=ms_hasVariableSizes(c,b,"outerHeight")?"variable":c[b.d.outerHeight](!0)),a.sizesConf.width=a.width,a.sizesConf.height=a.height,a}function in_complementVisibleItems(a,b){return"variable"==a.items[a.d.width]&&(a.items.visibleConf.variable=!0),a.items.visibleConf.variable||(is_number(a[a.d.width])?a.items.visible=Math.floor(a[a.d.width]/a.items[a.d.width]):(a.items.visible=Math.floor(b/a.items[a.d.width]),a[a.d.width]=a.items.visible*a.items[a.d.width],a.items.visibleConf.adjust||(a.align=!1)),("Infinity"==a.items.visible||1>a.items.visible)&&(debug(!0,'Not a valid number of visible items: Set to "variable".'),a.items.visibleConf.variable=!0)),a}function in_complementPrimarySize(a,b,c){return"auto"==a&&(a=ms_getTrueLargestSize(c,b,"outerWidth")),a}function in_complementSecondarySize(a,b,c){return"auto"==a&&(a=ms_getTrueLargestSize(c,b,"outerHeight")),a||(a=b.items[b.d.height]),a}function in_getAlignPadding(a,b){var c=cf_getAlignPadding(gi_getCurrentItems(b,a),a);return a.padding[a.d[1]]=c[1],a.padding[a.d[3]]=c[0],a}function in_getResponsiveValues(a,b){var d=cf_getItemAdjustMinMax(Math.ceil(a[a.d.width]/a.items[a.d.width]),a.items.visibleConf);d>b.length&&(d=b.length);var e=Math.floor(a[a.d.width]/d);return a.items.visible=d,a.items[a.d.width]=e,a[a.d.width]=d*e,a}function bt_pauseOnHoverConfig(a){if(is_string(a))var b=a.indexOf("immediate")>-1?!0:!1,c=a.indexOf("resume")>-1?!0:!1;else var b=c=!1;return[b,c]}function bt_mousesheelNumber(a){return is_number(a)?a:null}function is_null(a){return null===a}function is_undefined(a){return is_null(a)||a===void 0||""===a||"undefined"===a}function is_array(a){return a instanceof Array}function is_jquery(a){return a instanceof jQuery}function is_object(a){return(a instanceof Object||"object"==typeof a)&&!is_null(a)&&!is_jquery(a)&&!is_array(a)&&!is_function(a)}function is_number(a){return(a instanceof Number||"number"==typeof a)&&!isNaN(a)}function is_string(a){return(a instanceof String||"string"==typeof a)&&!is_undefined(a)&&!is_true(a)&&!is_false(a)}function is_function(a){return a instanceof Function||"function"==typeof a}function is_boolean(a){return a instanceof Boolean||"boolean"==typeof a||is_true(a)||is_false(a)}function is_true(a){return a===!0||"true"===a}function is_false(a){return a===!1||"false"===a}function is_percentage(a){return is_string(a)&&"%"==a.slice(-1)}function getTime(){return(new Date).getTime()}function deprecated(a,b){debug(!0,a+" is DEPRECATED, support for it will be removed. Use "+b+" instead.")}function debug(a,b){if(!is_undefined(window.console)&&!is_undefined(window.console.log)){if(is_object(a)){var c=" ("+a.selector+")";a=a.debug}else var c="";if(!a)return!1;b=is_string(b)?"carouFredSel"+c+": "+b:["carouFredSel"+c+":",b],window.console.log(b)}return!1}$.fn.carouFredSel||($.fn.caroufredsel=$.fn.carouFredSel=function(options,configs){if(0==this.length)return debug(!0,'No element found for "'+this.selector+'".'),this;if(this.length>1)return this.each(function(){$(this).carouFredSel(options,configs)});var $cfs=this,$tt0=this[0],starting_position=!1;$cfs.data("_cfs_isCarousel")&&(starting_position=$cfs.triggerHandler("_cfs_triggerEvent","currentPosition"),$cfs.trigger("_cfs_triggerEvent",["destroy",!0]));var FN={};FN._init=function(a,b,c){a=go_getObject($tt0,a),a.items=go_getItemsObject($tt0,a.items),a.scroll=go_getScrollObject($tt0,a.scroll),a.auto=go_getAutoObject($tt0,a.auto),a.prev=go_getPrevNextObject($tt0,a.prev),a.next=go_getPrevNextObject($tt0,a.next),a.pagination=go_getPaginationObject($tt0,a.pagination),a.swipe=go_getSwipeObject($tt0,a.swipe),a.mousewheel=go_getMousewheelObject($tt0,a.mousewheel),b&&(opts_orig=$.extend(!0,{},$.fn.carouFredSel.defaults,a)),opts=$.extend(!0,{},$.fn.carouFredSel.defaults,a),opts.d=cf_getDimensions(opts),crsl.direction="up"==opts.direction||"left"==opts.direction?"next":"prev";var d=$cfs.children(),e=ms_getParentSize($wrp,opts,"width");if(is_true(opts.cookie)&&(opts.cookie="caroufredsel_cookie_"+conf.serialNumber),opts.maxDimension=ms_getMaxDimension(opts,e),opts.items=in_complementItems(opts.items,opts,d,c),opts[opts.d.width]=in_complementPrimarySize(opts[opts.d.width],opts,d),opts[opts.d.height]=in_complementSecondarySize(opts[opts.d.height],opts,d),opts.responsive&&(is_percentage(opts[opts.d.width])||(opts[opts.d.width]="100%")),is_percentage(opts[opts.d.width])&&(crsl.upDateOnWindowResize=!0,crsl.primarySizePercentage=opts[opts.d.width],opts[opts.d.width]=ms_getPercentage(e,crsl.primarySizePercentage),opts.items.visible||(opts.items.visibleConf.variable=!0)),opts.responsive?(opts.usePadding=!1,opts.padding=[0,0,0,0],opts.align=!1,opts.items.visibleConf.variable=!1):(opts.items.visible||(opts=in_complementVisibleItems(opts,e)),opts[opts.d.width]||(!opts.items.visibleConf.variable&&is_number(opts.items[opts.d.width])&&"*"==opts.items.filter?(opts[opts.d.width]=opts.items.visible*opts.items[opts.d.width],opts.align=!1):opts[opts.d.width]="variable"),is_undefined(opts.align)&&(opts.align=is_number(opts[opts.d.width])?"center":!1),opts.items.visibleConf.variable&&(opts.items.visible=gn_getVisibleItemsNext(d,opts,0))),"*"==opts.items.filter||opts.items.visibleConf.variable||(opts.items.visibleConf.org=opts.items.visible,opts.items.visible=gn_getVisibleItemsNextFilter(d,opts,0)),opts.items.visible=cf_getItemsAdjust(opts.items.visible,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts.responsive)opts.items.visibleConf.min||(opts.items.visibleConf.min=opts.items.visible),opts.items.visibleConf.max||(opts.items.visibleConf.max=opts.items.visible),opts=in_getResponsiveValues(opts,d,e);else switch(opts.padding=cf_getPadding(opts.padding),"top"==opts.align?opts.align="left":"bottom"==opts.align&&(opts.align="right"),opts.align){case"center":case"left":case"right":"variable"!=opts[opts.d.width]&&(opts=in_getAlignPadding(opts,d),opts.usePadding=!0);break;default:opts.align=!1,opts.usePadding=0==opts.padding[0]&&0==opts.padding[1]&&0==opts.padding[2]&&0==opts.padding[3]?!1:!0}is_number(opts.scroll.duration)||(opts.scroll.duration=500),is_undefined(opts.scroll.items)&&(opts.scroll.items=opts.responsive||opts.items.visibleConf.variable||"*"!=opts.items.filter?"visible":opts.items.visible),opts.auto=$.extend(!0,{},opts.scroll,opts.auto),opts.prev=$.extend(!0,{},opts.scroll,opts.prev),opts.next=$.extend(!0,{},opts.scroll,opts.next),opts.pagination=$.extend(!0,{},opts.scroll,opts.pagination),opts.auto=go_complementAutoObject($tt0,opts.auto),opts.prev=go_complementPrevNextObject($tt0,opts.prev),opts.next=go_complementPrevNextObject($tt0,opts.next),opts.pagination=go_complementPaginationObject($tt0,opts.pagination),opts.swipe=go_complementSwipeObject($tt0,opts.swipe),opts.mousewheel=go_complementMousewheelObject($tt0,opts.mousewheel),opts.synchronise&&(opts.synchronise=cf_getSynchArr(opts.synchronise)),opts.auto.onPauseStart&&(opts.auto.onTimeoutStart=opts.auto.onPauseStart,deprecated("auto.onPauseStart","auto.onTimeoutStart")),opts.auto.onPausePause&&(opts.auto.onTimeoutPause=opts.auto.onPausePause,deprecated("auto.onPausePause","auto.onTimeoutPause")),opts.auto.onPauseEnd&&(opts.auto.onTimeoutEnd=opts.auto.onPauseEnd,deprecated("auto.onPauseEnd","auto.onTimeoutEnd")),opts.auto.pauseDuration&&(opts.auto.timeoutDuration=opts.auto.pauseDuration,deprecated("auto.pauseDuration","auto.timeoutDuration"))},FN._build=function(){$cfs.data("_cfs_isCarousel",!0);var a=$cfs.children(),b=in_mapCss($cfs,["textAlign","float","position","top","right","bottom","left","zIndex","width","height","marginTop","marginRight","marginBottom","marginLeft"]),c="relative";switch(b.position){case"absolute":case"fixed":c=b.position}"parent"==conf.wrapper?sz_storeOrigCss($wrp):$wrp.css(b),$wrp.css({overflow:"hidden",position:c}),sz_storeOrigCss($cfs),$cfs.data("_cfs_origCssZindex",b.zIndex),$cfs.css({textAlign:"left","float":"none",position:"absolute",top:0,right:"auto",bottom:"auto",left:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0}),sz_storeMargin(a,opts),sz_storeOrigCss(a),opts.responsive&&sz_setResponsiveSizes(opts,a)},FN._bind_events=function(){FN._unbind_events(),$cfs.bind(cf_e("stop",conf),function(a,b){return a.stopPropagation(),crsl.isStopped||opts.auto.button&&opts.auto.button.addClass(cf_c("stopped",conf)),crsl.isStopped=!0,opts.auto.play&&(opts.auto.play=!1,$cfs.trigger(cf_e("pause",conf),b)),!0}),$cfs.bind(cf_e("finish",conf),function(a){return a.stopPropagation(),crsl.isScrolling&&sc_stopScroll(scrl),!0}),$cfs.bind(cf_e("pause",conf),function(a,b,c){if(a.stopPropagation(),tmrs=sc_clearTimers(tmrs),b&&crsl.isScrolling){scrl.isStopped=!0;var d=getTime()-scrl.startTime;scrl.duration-=d,scrl.pre&&(scrl.pre.duration-=d),scrl.post&&(scrl.post.duration-=d),sc_stopScroll(scrl,!1)}if(crsl.isPaused||crsl.isScrolling||c&&(tmrs.timePassed+=getTime()-tmrs.startTime),crsl.isPaused||opts.auto.button&&opts.auto.button.addClass(cf_c("paused",conf)),crsl.isPaused=!0,opts.auto.onTimeoutPause){var e=opts.auto.timeoutDuration-tmrs.timePassed,f=100-Math.ceil(100*e/opts.auto.timeoutDuration);opts.auto.onTimeoutPause.call($tt0,f,e)}return!0}),$cfs.bind(cf_e("play",conf),function(a,b,c,d){a.stopPropagation(),tmrs=sc_clearTimers(tmrs);var e=[b,c,d],f=["string","number","boolean"],g=cf_sortParams(e,f);if(b=g[0],c=g[1],d=g[2],"prev"!=b&&"next"!=b&&(b=crsl.direction),is_number(c)||(c=0),is_boolean(d)||(d=!1),d&&(crsl.isStopped=!1,opts.auto.play=!0),!opts.auto.play)return a.stopImmediatePropagation(),debug(conf,"Carousel stopped: Not scrolling.");crsl.isPaused&&opts.auto.button&&(opts.auto.button.removeClass(cf_c("stopped",conf)),opts.auto.button.removeClass(cf_c("paused",conf))),crsl.isPaused=!1,tmrs.startTime=getTime();var h=opts.auto.timeoutDuration+c;return dur2=h-tmrs.timePassed,perc=100-Math.ceil(100*dur2/h),opts.auto.progress&&(tmrs.progress=setInterval(function(){var a=getTime()-tmrs.startTime+tmrs.timePassed,b=Math.ceil(100*a/h);opts.auto.progress.updater.call(opts.auto.progress.bar[0],b)},opts.auto.progress.interval)),tmrs.auto=setTimeout(function(){opts.auto.progress&&opts.auto.progress.updater.call(opts.auto.progress.bar[0],100),opts.auto.onTimeoutEnd&&opts.auto.onTimeoutEnd.call($tt0,perc,dur2),crsl.isScrolling?$cfs.trigger(cf_e("play",conf),b):$cfs.trigger(cf_e(b,conf),opts.auto)},dur2),opts.auto.onTimeoutStart&&opts.auto.onTimeoutStart.call($tt0,perc,dur2),!0}),$cfs.bind(cf_e("resume",conf),function(a){return a.stopPropagation(),scrl.isStopped?(scrl.isStopped=!1,crsl.isPaused=!1,crsl.isScrolling=!0,scrl.startTime=getTime(),sc_startScroll(scrl,conf)):$cfs.trigger(cf_e("play",conf)),!0}),$cfs.bind(cf_e("prev",conf)+" "+cf_e("next",conf),function(a,b,c,d,e){if(a.stopPropagation(),crsl.isStopped||$cfs.is(":hidden"))return a.stopImmediatePropagation(),debug(conf,"Carousel stopped or hidden: Not scrolling.");var f=is_number(opts.items.minimum)?opts.items.minimum:opts.items.visible+1;if(f>itms.total)return a.stopImmediatePropagation(),debug(conf,"Not enough items ("+itms.total+" total, "+f+" needed): Not scrolling.");var g=[b,c,d,e],h=["object","number/string","function","boolean"],i=cf_sortParams(g,h);b=i[0],c=i[1],d=i[2],e=i[3];var j=a.type.slice(conf.events.prefix.length);if(is_object(b)||(b={}),is_function(d)&&(b.onAfter=d),is_boolean(e)&&(b.queue=e),b=$.extend(!0,{},opts[j],b),b.conditions&&!b.conditions.call($tt0,j))return a.stopImmediatePropagation(),debug(conf,'Callback "conditions" returned false.');if(!is_number(c)){if("*"!=opts.items.filter)c="visible";else for(var k=[c,b.items,opts[j].items],i=0,l=k.length;l>i;i++)if(is_number(k[i])||"page"==k[i]||"visible"==k[i]){c=k[i];break}switch(c){case"page":return a.stopImmediatePropagation(),$cfs.triggerHandler(cf_e(j+"Page",conf),[b,d]);case"visible":opts.items.visibleConf.variable||"*"!=opts.items.filter||(c=opts.items.visible)}}if(scrl.isStopped)return $cfs.trigger(cf_e("resume",conf)),$cfs.trigger(cf_e("queue",conf),[j,[b,c,d]]),a.stopImmediatePropagation(),debug(conf,"Carousel resumed scrolling.");if(b.duration>0&&crsl.isScrolling)return b.queue&&("last"==b.queue&&(queu=[]),("first"!=b.queue||0==queu.length)&&$cfs.trigger(cf_e("queue",conf),[j,[b,c,d]])),a.stopImmediatePropagation(),debug(conf,"Carousel currently scrolling.");if(tmrs.timePassed=0,$cfs.trigger(cf_e("slide_"+j,conf),[b,c]),opts.synchronise)for(var m=opts.synchronise,n=[b,c],o=0,l=m.length;l>o;o++){var p=j;m[o][2]||(p="prev"==p?"next":"prev"),m[o][1]||(n[0]=m[o][0].triggerHandler("_cfs_triggerEvent",["configuration",p])),n[1]=c+m[o][3],m[o][0].trigger("_cfs_triggerEvent",["slide_"+p,n])}return!0}),$cfs.bind(cf_e("slide_prev",conf),function(a,b,c){a.stopPropagation();var d=$cfs.children();if(!opts.circular&&0==itms.first)return opts.infinite&&$cfs.trigger(cf_e("next",conf),itms.total-1),a.stopImmediatePropagation();if(sz_resetMargin(d,opts),!is_number(c)){if(opts.items.visibleConf.variable)c=gn_getVisibleItemsPrev(d,opts,itms.total-1);else if("*"!=opts.items.filter){var e=is_number(b.items)?b.items:gn_getVisibleOrg($cfs,opts);c=gn_getScrollItemsPrevFilter(d,opts,itms.total-1,e)}else c=opts.items.visible;c=cf_getAdjust(c,opts,b.items,$tt0)}if(opts.circular||itms.total-c=opts.items.visible+c&&itms.total>c&&(c++,f=cf_getItemsAdjust(gn_getVisibleItemsNext(d,opts,itms.total-c),opts,opts.items.visibleConf.adjust,$tt0)),opts.items.visible=f}else if("*"!=opts.items.filter){var f=gn_getVisibleItemsNextFilter(d,opts,itms.total-c);opts.items.visible=cf_getItemsAdjust(f,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(d,opts,!0),0==c)return a.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+c+" items backward."),itms.first+=c;itms.first>=itms.total;)itms.first-=itms.total;opts.circular||(0==itms.first&&b.onEnd&&b.onEnd.call($tt0,"prev"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),$cfs.children().slice(itms.total-c,itms.total).prependTo($cfs),itms.totall?opts.padding[opts.d[3]]:0,p=!1,q=$();if(c>opts.items.visible&&(q=d.slice(opts.items.visibleConf.old,c),"directscroll"==b.fx)){var r=opts.items[opts.d.width];p=q,i=k,sc_hideHiddenItems(p),opts.items[opts.d.width]="variable"}var s=!1,t=ms_getTotalSize(d.slice(0,c),opts,"width"),u=cf_mapWrapperSizes(ms_getSizes(h,opts,!0),opts,!opts.usePadding),v=0,w={},x={},y={},z={},A={},B={},C={},D=sc_getDuration(b,opts,c,t);switch(b.fx){case"cover":case"cover-fade":v=ms_getTotalSize(d.slice(0,opts.items.visible),opts,"width")}p&&(opts.items[opts.d.width]=r),sz_resetMargin(d,opts,!0),m>=0&&sz_resetMargin(j,opts,opts.padding[opts.d[1]]),l>=0&&sz_resetMargin(i,opts,opts.padding[opts.d[3]]),opts.align&&(opts.padding[opts.d[1]]=m,opts.padding[opts.d[3]]=l),B[opts.d.left]=-(t-o),C[opts.d.left]=-(v-o),x[opts.d.left]=u[opts.d.width];var E=function(){},F=function(){},G=function(){},H=function(){},I=function(){},J=function(){},K=function(){},L=function(){},M=function(){},N=function(){},O=function(){};switch(b.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":s=$cfs.clone(!0).appendTo($wrp)}switch(b.fx){case"crossfade":case"uncover":case"uncover-fade":s.children().slice(0,c).remove(),s.children().slice(opts.items.visibleConf.old).remove();break;case"cover":case"cover-fade":s.children().slice(opts.items.visible).remove(),s.css(C)}if($cfs.css(B),scrl=sc_setScroll(D,b.easing,conf),w[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0,("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(E=function(){$wrp.css(u)},F=function(){scrl.anims.push([$wrp,u])}),opts.usePadding){switch(k.not(i).length&&(y[opts.d.marginRight]=i.data("_cfs_origCssMargin"),0>l?i.css(y):(K=function(){i.css(y)},L=function(){scrl.anims.push([i,y])})),b.fx){case"cover":case"cover-fade":s.children().eq(c-1).css(y)}k.not(j).length&&(z[opts.d.marginRight]=j.data("_cfs_origCssMargin"),G=function(){j.css(z)},H=function(){scrl.anims.push([j,z])}),m>=0&&(A[opts.d.marginRight]=k.data("_cfs_origCssMargin")+opts.padding[opts.d[1]],I=function(){k.css(A)},J=function(){scrl.anims.push([k,A])})}O=function(){$cfs.css(w)};var P=opts.items.visible+c-itms.total;N=function(){if(P>0&&($cfs.children().slice(itms.total).remove(),g=$($cfs.children().slice(itms.total-(opts.items.visible-P)).get().concat($cfs.children().slice(0,P).get()))),sc_showHiddenItems(p),opts.usePadding){var a=$cfs.children().eq(opts.items.visible+c-1);a.css(opts.d.marginRight,a.data("_cfs_origCssMargin"))}};var Q=sc_mapCallbackArguments(g,q,h,c,"prev",D,u);switch(M=function(){sc_afterScroll($cfs,s,b),crsl.isScrolling=!1,clbk.onAfter=sc_fireCallbacks($tt0,b,"onAfter",Q,clbk),queu=sc_fireQueue($cfs,queu,conf),crsl.isPaused||$cfs.trigger(cf_e("play",conf))},crsl.isScrolling=!0,tmrs=sc_clearTimers(tmrs),clbk.onBefore=sc_fireCallbacks($tt0,b,"onBefore",Q,clbk),b.fx){case"none":$cfs.css(w),E(),G(),I(),K(),O(),N(),M();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){E(),G(),I(),K(),O(),N(),scrl=sc_setScroll(D,b.easing,conf),scrl.anims.push([$cfs,{opacity:1},M]),sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0}),scrl.anims.push([s,{opacity:0}]),scrl.anims.push([$cfs,{opacity:1},M]),F(),G(),I(),K(),O(),N();break;case"cover":scrl.anims.push([s,w,function(){G(),I(),K(),O(),N(),M()}]),F();break;case"cover-fade":scrl.anims.push([$cfs,{opacity:0}]),scrl.anims.push([s,w,function(){G(),I(),K(),O(),N(),M()}]),F();break;case"uncover":scrl.anims.push([s,x,M]),F(),G(),I(),K(),O(),N();break;case"uncover-fade":$cfs.css({opacity:0}),scrl.anims.push([$cfs,{opacity:1}]),scrl.anims.push([s,x,M]),F(),G(),I(),K(),O(),N();break;default:scrl.anims.push([$cfs,w,function(){N(),M()}]),F(),H(),J(),L()}return sc_startScroll(scrl,conf),cf_setCookie(opts.cookie,$cfs,conf),$cfs.trigger(cf_e("updatePageStatus",conf),[!1,u]),!0}),$cfs.bind(cf_e("slide_next",conf),function(a,b,c){a.stopPropagation();var d=$cfs.children();if(!opts.circular&&itms.first==opts.items.visible)return opts.infinite&&$cfs.trigger(cf_e("prev",conf),itms.total-1),a.stopImmediatePropagation();if(sz_resetMargin(d,opts),!is_number(c)){if("*"!=opts.items.filter){var e=is_number(b.items)?b.items:gn_getVisibleOrg($cfs,opts);c=gn_getScrollItemsNextFilter(d,opts,0,e)}else c=opts.items.visible;c=cf_getAdjust(c,opts,b.items,$tt0)}var f=0==itms.first?itms.total:itms.first;if(!opts.circular){if(opts.items.visibleConf.variable)var g=gn_getVisibleItemsNext(d,opts,c),e=gn_getVisibleItemsPrev(d,opts,f-1);else var g=opts.items.visible,e=opts.items.visible;c+g>f&&(c=f-e)}if(opts.items.visibleConf.old=opts.items.visible,opts.items.visibleConf.variable){for(var g=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(d,opts,c,f),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible-c>=g&&itms.total>c;)c++,g=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(d,opts,c,f),opts,opts.items.visibleConf.adjust,$tt0);opts.items.visible=g}else if("*"!=opts.items.filter){var g=gn_getVisibleItemsNextFilter(d,opts,c);opts.items.visible=cf_getItemsAdjust(g,opts,opts.items.visibleConf.adjust,$tt0)}if(sz_resetMargin(d,opts,!0),0==c)return a.stopImmediatePropagation(),debug(conf,"0 items to scroll: Not scrolling.");for(debug(conf,"Scrolling "+c+" items forward."),itms.first-=c;0>itms.first;)itms.first+=itms.total;opts.circular||(itms.first==opts.items.visible&&b.onEnd&&b.onEnd.call($tt0,"next"),opts.infinite||nv_enableNavi(opts,itms.first,conf)),itms.totalopts.items.visibleConf.old&&(q=d.slice(opts.items.visibleConf.old,c),"directscroll"==b.fx)){var r=opts.items[opts.d.width];p=q,j=k,sc_hideHiddenItems(p),opts.items[opts.d.width]="variable"}var s=!1,t=ms_getTotalSize(d.slice(0,c),opts,"width"),u=cf_mapWrapperSizes(ms_getSizes(i,opts,!0),opts,!opts.usePadding),v=0,w={},x={},y={},z={},A={},B=sc_getDuration(b,opts,c,t);switch(b.fx){case"uncover":case"uncover-fade":v=ms_getTotalSize(d.slice(0,opts.items.visibleConf.old),opts,"width")}p&&(opts.items[opts.d.width]=r),opts.align&&0>opts.padding[opts.d[1]]&&(opts.padding[opts.d[1]]=0),sz_resetMargin(d,opts,!0),sz_resetMargin(k,opts,opts.padding[opts.d[1]]),opts.align&&(opts.padding[opts.d[1]]=n,opts.padding[opts.d[3]]=m),A[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0;var C=function(){},D=function(){},E=function(){},F=function(){},G=function(){},H=function(){},I=function(){},J=function(){},K=function(){};switch(b.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":s=$cfs.clone(!0).appendTo($wrp),s.children().slice(opts.items.visibleConf.old).remove()}switch(b.fx){case"crossfade":case"cover":case"cover-fade":$cfs.css("zIndex",1),s.css("zIndex",0)}if(scrl=sc_setScroll(B,b.easing,conf),w[opts.d.left]=-t,x[opts.d.left]=-v,0>m&&(w[opts.d.left]+=m),("variable"==opts[opts.d.width]||"variable"==opts[opts.d.height])&&(C=function(){$wrp.css(u)},D=function(){scrl.anims.push([$wrp,u])}),opts.usePadding){var L=l.data("_cfs_origCssMargin");n>=0&&(L+=opts.padding[opts.d[1]]),l.css(opts.d.marginRight,L),j.not(k).length&&(z[opts.d.marginRight]=k.data("_cfs_origCssMargin")),E=function(){k.css(z)},F=function(){scrl.anims.push([k,z])};var M=j.data("_cfs_origCssMargin");m>0&&(M+=opts.padding[opts.d[3]]),y[opts.d.marginRight]=M,G=function(){j.css(y)},H=function(){scrl.anims.push([j,y])}}K=function(){$cfs.css(A)};var N=opts.items.visible+c-itms.total;J=function(){N>0&&$cfs.children().slice(itms.total).remove();var a=$cfs.children().slice(0,c).appendTo($cfs).last();if(N>0&&(i=gi_getCurrentItems(d,opts)),sc_showHiddenItems(p),opts.usePadding){if(itms.total=b?"next":"prev":0==itms.first||itms.first>b?"next":"prev"),"prev"==f&&(b=itms.total-b),$cfs.trigger(cf_e(f,conf),[e,b,g]),!0)}),$cfs.bind(cf_e("prevPage",conf),function(a,b,c){a.stopPropagation();var d=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[d-1,b,"prev",c])}),$cfs.bind(cf_e("nextPage",conf),function(a,b,c){a.stopPropagation();var d=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[d+1,b,"next",c])}),$cfs.bind(cf_e("slideToPage",conf),function(a,b,c,d,e){a.stopPropagation(),is_number(b)||(b=$cfs.triggerHandler(cf_e("currentPage",conf)));var f=opts.pagination.items||opts.items.visible,g=Math.ceil(itms.total/f)-1;return 0>b&&(b=g),b>g&&(b=0),$cfs.triggerHandler(cf_e("slideTo",conf),[b*f,0,!0,c,d,e])}),$cfs.bind(cf_e("jumpToStart",conf),function(a,b){if(a.stopPropagation(),b=b?gn_getItemIndex(b,0,!0,itms,$cfs):0,b+=itms.first,0!=b){if(itms.total>0)for(;b>itms.total;)b-=itms.total;$cfs.prepend($cfs.children().slice(b,itms.total))}return!0}),$cfs.bind(cf_e("synchronise",conf),function(a,b){if(a.stopPropagation(),b)b=cf_getSynchArr(b);else{if(!opts.synchronise)return debug(conf,"No carousel to synchronise.");b=opts.synchronise}for(var c=$cfs.triggerHandler(cf_e("currentPosition",conf)),d=!0,e=0,f=b.length;f>e;e++)b[e][0].triggerHandler(cf_e("slideTo",conf),[c,b[e][3],!0])||(d=!1);return d}),$cfs.bind(cf_e("queue",conf),function(a,b,c){return a.stopPropagation(),is_function(b)?b.call($tt0,queu):is_array(b)?queu=b:is_undefined(b)||queu.push([b,c]),queu}),$cfs.bind(cf_e("insertItem",conf),function(a,b,c,d,e){a.stopPropagation();var f=[b,c,d,e],g=["string/object","string/number/object","boolean","number"],h=cf_sortParams(f,g);if(b=h[0],c=h[1],d=h[2],e=h[3],is_object(b)&&!is_jquery(b)?b=$(b):is_string(b)&&(b=$(b)),!is_jquery(b)||0==b.length)return debug(conf,"Not a valid object.");is_undefined(c)&&(c="end"),sz_storeMargin(b,opts),sz_storeOrigCss(b);var i=c,j="before";"end"==c?d?(0==itms.first?(c=itms.total-1,j="after"):(c=itms.first,itms.first+=b.length),0>c&&(c=0)):(c=itms.total-1,j="after"):c=gn_getItemIndex(c,e,d,itms,$cfs);var k=$cfs.children().eq(c);return k.length?k[j](b):(debug(conf,"Correct insert-position not found! Appending item to the end."),$cfs.append(b)),"end"==i||d||itms.first>c&&(itms.first+=b.length),itms.total=$cfs.children().length,itms.first>=itms.total&&(itms.first-=itms.total),$cfs.trigger(cf_e("updateSizes",conf)),$cfs.trigger(cf_e("linkAnchors",conf)),!0}),$cfs.bind(cf_e("removeItem",conf),function(a,b,c,d){a.stopPropagation();var e=[b,c,d],f=["string/number/object","boolean","number"],g=cf_sortParams(e,f);if(b=g[0],c=g[1],d=g[2],b instanceof $&&b.length>1)return i=$(),b.each(function(){var e=$cfs.trigger(cf_e("removeItem",conf),[$(this),c,d]);e&&(i=i.add(e))}),i;if(is_undefined(b)||"end"==b)i=$cfs.children().last();else{b=gn_getItemIndex(b,d,c,itms,$cfs);var i=$cfs.children().eq(b);i.length&&itms.first>b&&(itms.first-=i.length)}return i&&i.length&&(i.detach(),itms.total=$cfs.children().length,$cfs.trigger(cf_e("updateSizes",conf))),i}),$cfs.bind(cf_e("onBefore",conf)+" "+cf_e("onAfter",conf),function(a,b){a.stopPropagation();var c=a.type.slice(conf.events.prefix.length);return is_array(b)&&(clbk[c]=b),is_function(b)&&clbk[c].push(b),clbk[c]}),$cfs.bind(cf_e("currentPosition",conf),function(a,b){if(a.stopPropagation(),0==itms.first)var c=0;else var c=itms.total-itms.first;return is_function(b)&&b.call($tt0,c),c}),$cfs.bind(cf_e("currentPage",conf),function(a,b){a.stopPropagation();var e,c=opts.pagination.items||opts.items.visible,d=Math.ceil(itms.total/c-1);return e=0==itms.first?0:itms.firste&&(e=0),e>d&&(e=d),is_function(b)&&b.call($tt0,e),e}),$cfs.bind(cf_e("currentVisible",conf),function(a,b){a.stopPropagation();var c=gi_getCurrentItems($cfs.children(),opts);return is_function(b)&&b.call($tt0,c),c}),$cfs.bind(cf_e("slice",conf),function(a,b,c,d){if(a.stopPropagation(),0==itms.total)return!1;var e=[b,c,d],f=["number","number","function"],g=cf_sortParams(e,f);if(b=is_number(g[0])?g[0]:0,c=is_number(g[1])?g[1]:itms.total,d=g[2],b+=itms.first,c+=itms.first,items.total>0){for(;b>itms.total;)b-=itms.total;for(;c>itms.total;)c-=itms.total;for(;0>b;)b+=itms.total;for(;0>c;)c+=itms.total}var i,h=$cfs.children();return i=c>b?h.slice(b,c):$(h.slice(b,itms.total).get().concat(h.slice(0,c).get())),is_function(d)&&d.call($tt0,i),i}),$cfs.bind(cf_e("isPaused",conf)+" "+cf_e("isStopped",conf)+" "+cf_e("isScrolling",conf),function(a,b){a.stopPropagation();var c=a.type.slice(conf.events.prefix.length),d=crsl[c];return is_function(b)&&b.call($tt0,d),d}),$cfs.bind(cf_e("configuration",conf),function(e,a,b,c){e.stopPropagation();var reInit=!1;if(is_function(a))a.call($tt0,opts);else if(is_object(a))opts_orig=$.extend(!0,{},opts_orig,a),b!==!1?reInit=!0:opts=$.extend(!0,{},opts,a);else if(!is_undefined(a))if(is_function(b)){var val=eval("opts."+a);is_undefined(val)&&(val=""),b.call($tt0,val)}else{if(is_undefined(b))return eval("opts."+a);"boolean"!=typeof c&&(c=!0),eval("opts_orig."+a+" = b"),c!==!1?reInit=!0:eval("opts."+a+" = b")}if(reInit){sz_resetMargin($cfs.children(),opts),FN._init(opts_orig),FN._bind_buttons();var sz=sz_setSizes($cfs,opts);$cfs.trigger(cf_e("updatePageStatus",conf),[!0,sz])}return opts}),$cfs.bind(cf_e("linkAnchors",conf),function(a,b,c){return a.stopPropagation(),is_undefined(b)?b=$("body"):is_string(b)&&(b=$(b)),is_jquery(b)&&0!=b.length?(is_string(c)||(c="a.caroufredsel"),b.find(c).each(function(){var a=this.hash||"";a.length>0&&-1!=$cfs.children().index($(a))&&$(this).unbind("click").click(function(b){b.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),a)})}),!0):debug(conf,"Not a valid object.")}),$cfs.bind(cf_e("updatePageStatus",conf),function(a,b){if(a.stopPropagation(),opts.pagination.container){var d=opts.pagination.items||opts.items.visible,e=Math.ceil(itms.total/d);b&&(opts.pagination.anchorBuilder&&(opts.pagination.container.children().remove(),opts.pagination.container.each(function(){for(var a=0;e>a;a++){var b=$cfs.children().eq(gn_getItemIndex(a*d,0,!0,itms,$cfs));$(this).append(opts.pagination.anchorBuilder.call(b[0],a+1))}})),opts.pagination.container.each(function(){$(this).children().unbind(opts.pagination.event).each(function(a){$(this).bind(opts.pagination.event,function(b){b.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[a*d,-opts.pagination.deviation,!0,opts.pagination])})})}));var f=$cfs.triggerHandler(cf_e("currentPage",conf))+opts.pagination.deviation;return f>=e&&(f=0),0>f&&(f=e-1),opts.pagination.container.each(function(){$(this).children().removeClass(cf_c("selected",conf)).eq(f).addClass(cf_c("selected",conf))}),!0}}),$cfs.bind(cf_e("updateSizes",conf),function(){var b=opts.items.visible,c=$cfs.children(),d=ms_getParentSize($wrp,opts,"width");if(itms.total=c.length,crsl.primarySizePercentage?(opts.maxDimension=d,opts[opts.d.width]=ms_getPercentage(d,crsl.primarySizePercentage)):opts.maxDimension=ms_getMaxDimension(opts,d),opts.responsive?(opts.items.width=opts.items.sizesConf.width,opts.items.height=opts.items.sizesConf.height,opts=in_getResponsiveValues(opts,c,d),b=opts.items.visible,sz_setResponsiveSizes(opts,c)):opts.items.visibleConf.variable?b=gn_getVisibleItemsNext(c,opts,0):"*"!=opts.items.filter&&(b=gn_getVisibleItemsNextFilter(c,opts,0)),!opts.circular&&0!=itms.first&&b>itms.first){if(opts.items.visibleConf.variable)var e=gn_getVisibleItemsPrev(c,opts,itms.first)-itms.first;else if("*"!=opts.items.filter)var e=gn_getVisibleItemsPrevFilter(c,opts,itms.first)-itms.first;else var e=opts.items.visible-itms.first;debug(conf,"Preventing non-circular: sliding "+e+" items backward."),$cfs.trigger(cf_e("prev",conf),e)}opts.items.visible=cf_getItemsAdjust(b,opts,opts.items.visibleConf.adjust,$tt0),opts.items.visibleConf.old=opts.items.visible,opts=in_getAlignPadding(opts,c);var f=sz_setSizes($cfs,opts);return $cfs.trigger(cf_e("updatePageStatus",conf),[!0,f]),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),f}),$cfs.bind(cf_e("destroy",conf),function(a,b){return a.stopPropagation(),tmrs=sc_clearTimers(tmrs),$cfs.data("_cfs_isCarousel",!1),$cfs.trigger(cf_e("finish",conf)),b&&$cfs.trigger(cf_e("jumpToStart",conf)),sz_restoreOrigCss($cfs.children()),sz_restoreOrigCss($cfs),FN._unbind_events(),FN._unbind_buttons(),"parent"==conf.wrapper?sz_restoreOrigCss($wrp):$wrp.replaceWith($cfs),!0}),$cfs.bind(cf_e("debug",conf),function(){return debug(conf,"Carousel width: "+opts.width),debug(conf,"Carousel height: "+opts.height),debug(conf,"Item widths: "+opts.items.width),debug(conf,"Item heights: "+opts.items.height),debug(conf,"Number of items visible: "+opts.items.visible),opts.auto.play&&debug(conf,"Number of items scrolled automatically: "+opts.auto.items),opts.prev.button&&debug(conf,"Number of items scrolled backward: "+opts.prev.items),opts.next.button&&debug(conf,"Number of items scrolled forward: "+opts.next.items),conf.debug}),$cfs.bind("_cfs_triggerEvent",function(a,b,c){return a.stopPropagation(),$cfs.triggerHandler(cf_e(b,conf),c)})},FN._unbind_events=function(){$cfs.unbind(cf_e("",conf)),$cfs.unbind(cf_e("",conf,!1)),$cfs.unbind("_cfs_triggerEvent")},FN._bind_buttons=function(){if(FN._unbind_buttons(),nv_showNavi(opts,itms.total,conf),nv_enableNavi(opts,itms.first,conf),opts.auto.pauseOnHover){var a=bt_pauseOnHoverConfig(opts.auto.pauseOnHover);$wrp.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),a)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.auto.button&&opts.auto.button.bind(cf_e(opts.auto.event,conf,!1),function(a){a.preventDefault();var b=!1,c=null;crsl.isPaused?b="play":opts.auto.pauseOnEvent&&(b="pause",c=bt_pauseOnHoverConfig(opts.auto.pauseOnEvent)),b&&$cfs.trigger(cf_e(b,conf),c)}),opts.prev.button&&(opts.prev.button.bind(cf_e(opts.prev.event,conf,!1),function(a){a.preventDefault(),$cfs.trigger(cf_e("prev",conf))}),opts.prev.pauseOnHover)){var a=bt_pauseOnHoverConfig(opts.prev.pauseOnHover);opts.prev.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),a)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.next.button&&(opts.next.button.bind(cf_e(opts.next.event,conf,!1),function(a){a.preventDefault(),$cfs.trigger(cf_e("next",conf))}),opts.next.pauseOnHover)){var a=bt_pauseOnHoverConfig(opts.next.pauseOnHover);opts.next.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),a)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if(opts.pagination.container&&opts.pagination.pauseOnHover){var a=bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);opts.pagination.container.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),a)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}if((opts.prev.key||opts.next.key)&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(a){var b=a.keyCode;b==opts.next.key&&(a.preventDefault(),$cfs.trigger(cf_e("next",conf))),b==opts.prev.key&&(a.preventDefault(),$cfs.trigger(cf_e("prev",conf)))}),opts.pagination.keys&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(a){var b=a.keyCode;b>=49&&58>b&&(b=(b-49)*opts.items.visible,itms.total>=b&&(a.preventDefault(),$cfs.trigger(cf_e("slideTo",conf),[b,0,!0,opts.pagination])))}),$.fn.swipe){var b="ontouchstart"in window;if(b&&opts.swipe.onTouch||!b&&opts.swipe.onMouse){var c=$.extend(!0,{},opts.prev,opts.swipe),d=$.extend(!0,{},opts.next,opts.swipe),e=function(){$cfs.trigger(cf_e("prev",conf),[c])},f=function(){$cfs.trigger(cf_e("next",conf),[d])};switch(opts.direction){case"up":case"down":opts.swipe.options.swipeUp=f,opts.swipe.options.swipeDown=e;break;default:opts.swipe.options.swipeLeft=f,opts.swipe.options.swipeRight=e}crsl.swipe&&$cfs.swipe("destroy"),$wrp.swipe(opts.swipe.options),$wrp.css("cursor","move"),crsl.swipe=!0}}if($.fn.mousewheel&&opts.mousewheel){var g=$.extend(!0,{},opts.prev,opts.mousewheel),h=$.extend(!0,{},opts.next,opts.mousewheel);crsl.mousewheel&&$wrp.unbind(cf_e("mousewheel",conf,!1)),$wrp.bind(cf_e("mousewheel",conf,!1),function(a,b){a.preventDefault(),b>0?$cfs.trigger(cf_e("prev",conf),[g]):$cfs.trigger(cf_e("next",conf),[h])}),crsl.mousewheel=!0}if(opts.auto.play&&$cfs.trigger(cf_e("play",conf),opts.auto.delay),crsl.upDateOnWindowResize){var i=function(){$cfs.trigger(cf_e("finish",conf)),opts.auto.pauseOnResize&&!crsl.isPaused&&$cfs.trigger(cf_e("play",conf)),sz_resetMargin($cfs.children(),opts),$cfs.trigger(cf_e("updateSizes",conf))},j=$(window),k=null;if($.debounce&&"debounce"==conf.onWindowResize)k=$.debounce(200,i);else if($.throttle&&"throttle"==conf.onWindowResize)k=$.throttle(300,i);else{var l=0,m=0;k=function(){var a=j.width(),b=j.height();(a!=l||b!=m)&&(i(),l=a,m=b)}}j.bind(cf_e("resize",conf,!1,!0,!0),k)}},FN._unbind_buttons=function(){var b=(cf_e("",conf),cf_e("",conf,!1));ns3=cf_e("",conf,!1,!0,!0),$(document).unbind(ns3),$(window).unbind(ns3),$wrp.unbind(b),opts.auto.button&&opts.auto.button.unbind(b),opts.prev.button&&opts.prev.button.unbind(b),opts.next.button&&opts.next.button.unbind(b),opts.pagination.container&&(opts.pagination.container.unbind(b),opts.pagination.anchorBuilder&&opts.pagination.container.children().remove()),crsl.swipe&&($cfs.swipe("destroy"),$wrp.css("cursor","default"),crsl.swipe=!1),crsl.mousewheel&&(crsl.mousewheel=!1),nv_showNavi(opts,"hide",conf),nv_enableNavi(opts,"removeClass",conf)},is_boolean(configs)&&(configs={debug:configs});var crsl={direction:"next",isPaused:!0,isScrolling:!1,isStopped:!1,mousewheel:!1,swipe:!1},itms={total:$cfs.children().length,first:0},tmrs={auto:null,progress:null,startTime:getTime(),timePassed:0},scrl={isStopped:!1,duration:0,startTime:0,easing:"",anims:[]},clbk={onBefore:[],onAfter:[]},queu=[],conf=$.extend(!0,{},$.fn.carouFredSel.configs,configs),opts={},opts_orig=$.extend(!0,{},options),$wrp="parent"==conf.wrapper?$cfs.parent():$cfs.wrap("<"+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();if(conf.selector=$cfs.selector,conf.serialNumber=$.fn.carouFredSel.serialNumber++,conf.transition=conf.transition&&$.fn.transition?"transition":"animate",FN._init(opts_orig,!0,starting_position),FN._build(),FN._bind_events(),FN._bind_buttons(),is_array(opts.items.start))var start_arr=opts.items.start;else{var start_arr=[];0!=opts.items.start&&start_arr.push(opts.items.start)}if(opts.cookie&&start_arr.unshift(parseInt(cf_getCookie(opts.cookie),10)),start_arr.length>0)for(var a=0,l=start_arr.length;l>a;a++){var s=start_arr[a];if(0!=s){if(s===!0){if(s=window.location.hash,1>s.length)continue}else"random"===s&&(s=Math.floor(Math.random()*itms.total));if($cfs.triggerHandler(cf_e("slideTo",conf),[s,0,!0,{fx:"none"}]))break}}var siz=sz_setSizes($cfs,opts),itm=gi_getCurrentItems($cfs.children(),opts);return opts.onCreate&&opts.onCreate.call($tt0,{width:siz.width,height:siz.height,items:itm}),$cfs.trigger(cf_e("updatePageStatus",conf),[!0,siz]),$cfs.trigger(cf_e("linkAnchors",conf)),conf.debug&&$cfs.trigger(cf_e("debug",conf)),$cfs},$.fn.carouFredSel.serialNumber=1,$.fn.carouFredSel.defaults={synchronise:!1,infinite:!0,circular:!0,responsive:!1,direction:"left",items:{start:0},scroll:{easing:"swing",duration:500,pauseOnHover:!1,event:"click",queue:!1}},$.fn.carouFredSel.configs={debug:!1,transition:!1,onWindowResize:"throttle",events:{prefix:"",namespace:"cfs"},wrapper:{element:"div",classname:"caroufredsel_wrapper"},classnames:{}},$.fn.carouFredSel.pageAnchorBuilder=function(a){return''+a+""},$.fn.carouFredSel.progressbarUpdater=function(a){$(this).css("width",a+"%")},$.fn.carouFredSel.cookie={get:function(a){a+="=";for(var b=document.cookie.split(";"),c=0,d=b.length;d>c;c++){for(var e=b[c];" "==e.charAt(0);)e=e.slice(1);if(0==e.indexOf(a))return e.slice(a.length)}return 0},set:function(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+1e3*60*60*24*c),d="; expires="+e.toGMTString()}document.cookie=a+"="+b+d+"; path=/"},remove:function(a){$.fn.carouFredSel.cookie.set(a,"",-1)}},$.extend($.easing,{quadratic:function(a){var b=a*a;return a*(-b*a+4*b-6*a+4)},cubic:function(a){return a*(4*a*a-9*a+6)},elastic:function(a){var b=a*a;return a*(33*b*b-106*b*a+126*b-67*a+15)}}))})(jQuery);function newImage(arg){if(document.images){rslt=new Image();rslt.src=arg;return rslt}} function changeImages(){if(document.images&&(preloadFlag==!0)){for(var i=0;i1){cookie_value=unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g,''))} return cookie_value;break} a_temp_cookie=null;cookie_name=''} if(!b_cookie_found){return null}} function FavFuncTgl(ID,domain){var cookie_girls=Get_Cookie('favgirlsnew');console.log('FavFunc18: - favorites loaded -');var a_all_girls=(cookie_girls)?cookie_girls.split(':'):'';var a_temp_cookie='';var b_cookie_found=!1;for(i=0;i=10){alert("You can only save up to 10 profiles in your favourites. Please login to the Members Lounge for more options.");b_cookie_found=!0}else a_temp_cookie=a_temp_cookie+((a_temp_cookie.length)?':':'')+ID} console.log('FavFunc18: - cookie added -');Set_Cookie('favgirlsnew',a_temp_cookie,14,'/',domain,'');console.log('FavFunc18: - cookies saved -');if(b_cookie_found)return 0;else return 1} function ArGirl(ID,ADD,domain,message){var cookie_girls=Get_Cookie('favgirlsnew');console.log('Fav loaded');var a_all_girls=(cookie_girls)?cookie_girls.split(':'):'';var a_temp_cookie='';var b_cookie_found=!1;for(i=0;i=10)alert("You can only save up to 10 profiles in your favourites. Please login to the Members Lounge for more options.");a_temp_cookie=a_temp_cookie+((a_temp_cookie.length)?':':'')+ID} if(b_cookie_found||ADD){Set_Cookie('favgirlsnew',a_temp_cookie,14,'/',domain,'');console.log('Fav saved')} if(message){var replace_button_id='bt'+ID;document.getElementById(replace_button_id).innerHTML=message}} function hide(Id,St){var plus=new Array();var label=new Array();plus[0]="\"\"";plus[1]="\"\"";label[0]=' from favorites';label[1]=' to favorites';var Icon='bt'+Id;document.getElementById(Id).innerHTML=label[St];document.getElementById(Icon).innerHTML=plus[St]} pic1=new Image();pic2=new Image();pic1.src="";pic2.src="";window.averta={};console.log('MSSL Loaded');(function($){window.package=function(name){if(!window[name])window[name]={}};var extend=function(target,object){for(var key in object)target[key]=object[key]};Function.prototype.extend=function(superclass){if(typeof superclass.prototype.constructor==="function"){extend(this.prototype,superclass.prototype);this.prototype.constructor=this}else{this.prototype.extend(superclass);this.prototype.constructor=this}};var trans={'Moz':'-moz-','Webkit':'-webkit-','Khtml':'-khtml-','O':'-o-','ms':'-ms-','Icab':'-icab-'};window._mobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) window._touch='ontouchstart'in document;$(document).ready(function(){window._jcsspfx=getVendorPrefix();window._csspfx=trans[window._jcsspfx];window._cssanim=supportsTransitions();window._css3d=supports3DTransforms();window._css2d=supportsTransforms()});function getVendorPrefix(){if('result'in arguments.callee)return arguments.callee.result;var regex=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/;var someScript=document.getElementsByTagName('script')[0];for(var prop in someScript.style){if(regex.test(prop)){return arguments.callee.result=prop.match(regex)[0]}} if('WebkitOpacity'in someScript.style)return arguments.callee.result='Webkit';if('KhtmlOpacity'in someScript.style)return arguments.callee.result='Khtml';return arguments.callee.result=''} window.parseQueryString=function(url){var queryString={};url.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function($0,$1,$2,$3){queryString[$1]=$3});return queryString};function checkStyleValue(prop){var b=document.body||document.documentElement;var s=b.style;var p=prop;if(typeof s[p]=='string'){return!0} v=['Moz','Webkit','Khtml','O','ms'],p=p.charAt(0).toUpperCase()+p.substr(1);for(var i=0;i0&&has3d!=="none")} var fps60=50/3;if(!window.requestAnimationFrame){window.requestAnimationFrame=(function(){return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback,element){window.setTimeout(callback,fps60)}})()} if(!window.getComputedStyle){window.getComputedStyle=function(el,pseudo){this.el=el;this.getPropertyValue=function(prop){var re=/(\-([a-z]){1})/g;if(prop=='float')prop='styleFloat';if(re.test(prop)){prop=prop.replace(re,function(){return arguments[2].toUpperCase()})} return el.currentStyle[prop]?el.currentStyle[prop]:null};return el.currentStyle}} if(!Array.prototype.indexOf){Array.prototype.indexOf=function(elt){var len=this.length>>>0;var from=Number(arguments[1])||0;from=(from<0)?Math.ceil(from):Math.floor(from);if(from<0) from+=len;for(;from')!==-1){return eval(ieVer+version)}else{return eval(version+'=='+ieVer)}}else{return version==ieVer}} $.removeDataAttrs=function($target,exclude){var i,attrName,dataAttrsToDelete=[],dataAttrs=$target[0].attributes,dataAttrsLen=dataAttrs.length;exclude=exclude||[];for(i=0;iMath.abs(new_y-this.start_y)) return new_x<=this.start_x?'left':'right';else return new_y<=this.start_y?'up':'down';break}};p.priventDefultEvent=function(new_x,new_y){var dx=Math.abs(new_x-this.start_x);var dy=Math.abs(new_y-this.start_y);var horiz=dx>dy;return(this.swipeType==='horizontal'&&horiz)||(this.swipeType==='vertical'&&!horiz)};p.createStatusObject=function(evt){var status_data={},temp_x,temp_y;temp_x=this.lastStatus.distanceX||0;temp_y=this.lastStatus.distanceY||0;status_data.distanceX=evt.pageX-this.start_x;status_data.distanceY=evt.pageY-this.start_y;status_data.moveX=status_data.distanceX-temp_x;status_data.moveY=status_data.distanceY-temp_y;status_data.distance=parseInt(Math.sqrt(Math.pow(status_data.distanceX,2)+Math.pow(status_data.distanceY,2)));status_data.duration=new Date().getTime()-this.start_time;status_data.direction=this.getDirection(evt.pageX,evt.pageY);return status_data};p.__reset=function(event,jqevt){this.reset=!1;this.lastStatus={};this.start_time=new Date().getTime();this.start_x=isTouch?event.touches[0].pageX:(usePointer?event.pageX:jqevt.pageX);this.start_y=isTouch?event.touches[0].pageY:(usePointer?event.pageY:jqevt.pageY)};p.__touchStart=function(event){var swipe=event.data.target;var jqevt=event;if(!swipe.enabled)return;if($(event.target).closest(swipe.noSwipeSelector,swipe.$element).length>0){return} event=event.originalEvent;if(usePointer){$(this).css('-ms-touch-action',swipe.swipeType==='horizontal'?'pan-y':'pan-x')} if(!swipe.onSwipe){$.error('Swipe listener is undefined');return} if(swipe.touchStarted)return;swipe.start_x=isTouch?event.touches[0].pageX:(usePointer?event.pageX:jqevt.pageX);swipe.start_y=isTouch?event.touches[0].pageY:(usePointer?event.pageY:jqevt.pageY);swipe.start_time=new Date().getTime();$(document).bind(ev_end,{target:swipe},swipe.__touchEnd).bind(ev_move,{target:swipe},swipe.__touchMove).bind(ev_cancel,{target:swipe},swipe.__touchCancel);var evt=isTouch?event.touches[0]:(usePointer?event:jqevt);var status=swipe.createStatusObject(evt);status.phase='start';swipe.onSwipe.call(null,status);if(!isTouch) jqevt.preventDefault();swipe.lastStatus=status;swipe.touchStarted=!0};p.__touchMove=function(event){var swipe=event.data.target;var jqevt=event;event=event.originalEvent;if(!swipe.touchStarted)return;clearTimeout(swipe.timo);swipe.timo=setTimeout(function(){swipe.__reset(event,jqevt)},60);var evt=isTouch?event.touches[0]:(usePointer?event:jqevt);var status=swipe.createStatusObject(evt);if(swipe.priventDefultEvent(evt.pageX,evt.pageY)) jqevt.preventDefault();status.phase='move';swipe.lastStatus=status;swipe.onSwipe.call(null,status)};p.__touchEnd=function(event){var swipe=event.data.target;var jqevt=event;event=event.originalEvent;clearTimeout(swipe.timo);var evt=isTouch?event.touches[0]:(usePointer?event:jqevt);var status=swipe.lastStatus;if(!isTouch) jqevt.preventDefault();status.phase='end';swipe.touchStarted=!1;swipe.priventEvt=null;$(document).unbind(ev_end,swipe.__touchEnd).unbind(ev_move,swipe.__touchMove).unbind(ev_cancel,swipe.__touchCancel);status.speed=status.distance/status.duration;swipe.onSwipe.call(null,status)};p.__touchCancel=function(event){var swipe=event.data.target;swipe.__touchEnd(event)};p.enable=function(){if(this.enabled)return;this.enabled=!0};p.disable=function(){if(!this.enabled)return;this.enabled=!1}})(jQuery);(function(){"use strict";averta.Ticker=function(){};var st=averta.Ticker,list=[],len=0,__stopped=!0;st.add=function(listener,ref){list.push([listener,ref]);if(list.length===1)st.start();len=list.length;return len};st.remove=function(listener,ref){for(var i=0,l=list.length;i0)element.style[window._jcsspfx+'TransitionDelay']=that.delay+'ms';else element.style[window._jcsspfx+'TransitionDelay']='';element.style[window._jcsspfx+'TransitionTimingFunction']=that.ease;if(that.to_cb)that.to_cb.call(that.to_cb_target);that.end_to=setTimeout(function(){that.onTransComplete()},that.duration+(that.delay||0))},100);return this}})();(function(){"use strict";var _cssanim=null;window.CTween={};function transPos(element,properties){if(properties.x!==undefined||properties.y!==undefined){if(_cssanim){var trans=window._jcsspfx+"Transform";if(properties.x!==undefined){properties[trans]=(properties[trans]||'')+' translateX('+properties.x+'px)';delete properties.x} if(properties.y!==undefined){properties[trans]=(properties[trans]||'')+' translateY('+properties.y+'px)';delete properties.y}}else{if(properties.x!==undefined){var posx=element.css('right')!=='auto'?'right':'left';properties[posx]=properties.x+'px';delete properties.x} if(properties.y!==undefined){var posy=element.css('bottom')!=='auto'?'bottom':'top';properties[posy]=properties.y+'px';delete properties.y}}} return properties} CTween.setPos=function(element,pos){element.css(transPos(element,pos))};CTween.animate=function(element,duration,properties,options){if(_cssanim==null)_cssanim=window._cssanim;options=options||{};transPos(element,properties);if(_cssanim){var tween=new CSSTween(element,duration,options.delay,EaseDic[options.ease]);if(options.transProperty){tween.transProperty=options.transProperty} tween.to(function(){element.css(properties)});if(options.complete)tween.onComplete(options.complete,options.target);tween.start();tween.stop=tween.reset;return tween} var onCl;if(options.delay)element.delay(options.delay);if(options.complete) onCl=function(){options.complete.call(options.target)};element.stop(!0).animate(properties,duration,options.ease||'linear',onCl);return element};CTween.fadeOut=function(target,duration,remove){var options={};if(remove===!0){options.complete=function(){target.remove()}}else if(remove===2){options.complete=function(){target.css('display','none')}} CTween.animate(target,duration||1000,{opacity:0},options)};CTween.fadeIn=function(target,duration,reset){if(reset!==!1){target.css('opacity',0).css('display','')} CTween.animate(target,duration||1000,{opacity:1})}})();(function(){window.EaseDic={'linear':'linear','ease':'ease','easeIn':'ease-in','easeOut':'ease-out','easeInOut':'ease-in-out','easeInCubic':'cubic-bezier(.55,.055,.675,.19)','easeOutCubic':'cubic-bezier(.215,.61,.355,1)','easeInOutCubic':'cubic-bezier(.645,.045,.355,1)','easeInCirc':'cubic-bezier(.6,.04,.98,.335)','easeOutCirc':'cubic-bezier(.075,.82,.165,1)','easeInOutCirc':'cubic-bezier(.785,.135,.15,.86)','easeInExpo':'cubic-bezier(.95,.05,.795,.035)','easeOutExpo':'cubic-bezier(.19,1,.22,1)','easeInOutExpo':'cubic-bezier(1,0,0,1)','easeInQuad':'cubic-bezier(.55,.085,.68,.53)','easeOutQuad':'cubic-bezier(.25,.46,.45,.94)','easeInOutQuad':'cubic-bezier(.455,.03,.515,.955)','easeInQuart':'cubic-bezier(.895,.03,.685,.22)','easeOutQuart':'cubic-bezier(.165,.84,.44,1)','easeInOutQuart':'cubic-bezier(.77,0,.175,1)','easeInQuint':'cubic-bezier(.755,.05,.855,.06)','easeOutQuint':'cubic-bezier(.23,1,.32,1)','easeInOutQuint':'cubic-bezier(.86,0,.07,1)','easeInSine':'cubic-bezier(.47,0,.745,.715)','easeOutSine':'cubic-bezier(.39,.575,.565,1)','easeInOutSine':'cubic-bezier(.445,.05,.55,.95)','easeInBack':'cubic-bezier(.6,-.28,.735,.045)','easeOutBack':'cubic-bezier(.175, .885,.32,1.275)','easeInOutBack':'cubic-bezier(.68,-.55,.265,1.55)'}})();(function(){"use strict";window.MSAligner=function(type,$container,$img){this.$container=$container;this.$img=$img;this.type=type||'stretch';this.widthOnly=!1;this.heightOnly=!1};var p=MSAligner.prototype;p.init=function(w,h){this.baseWidth=w;this.baseHeight=h;this.imgRatio=w/h;this.imgRatio2=h/w;switch(this.type){case 'tile':this.$container.css('background-image','url('+this.$img.attr('src')+')');this.$img.remove();break;case 'center':this.$container.css('background-image','url('+this.$img.attr('src')+')');this.$container.css({backgroundPosition:'center center',backgroundRepeat:'no-repeat'});this.$img.remove();break;case 'stretch':this.$img.css({width:'100%',height:'100%'});break;case 'fill':case 'fit':this.needAlign=!0;this.align();break}};p.align=function(){if(!this.needAlign)return;var cont_w=this.$container.width();var cont_h=this.$container.height();var contRatio=cont_w/cont_h;if(this.type=='fill'){if(this.imgRatioself.options.minValidDist&&self.animating){window.requestAnimationFrame(tick)}else{if(self.animating){self.value=value;self._callrenderer()} self.animating=!1;if(active_id!==self.__animID){self.__animID=-1} self._callonComplete('anim');return} self.value=targetPosition-amplitude*Math.exp(-++timeStep*timeconst);self._callrenderer()};tick();return} this.value=value;this._callrenderer()};p.drag=function(move){if(this.start_drag){this.drag_start_loc=this.value;this.start_drag=!1} this.animating=!1;this._deceleration=!1;this.value-=move;if(!this.options.endless&&(this.value>this._max_value||this.value<0)){if(this.options.bouncing){this.__isout=!0;this.value+=move*0.6}else if(this.value>this._max_value){this.value=this._max_value}else{this.value=0}}else if(!this.options.endless&&this.options.bouncing){this.__isout=!1} this._callrenderer()};p.push=function(speed){this.stopped=!1;if(this.options.snapping&&Math.abs(speed)<=this.options.snappingMinSpeed){this.cancel();return} this.__speed=speed;this.__startSpeed=speed;this.end_loc=this._calculateEnd();if(this.options.snapping){var snap_loc=this.getSnapNum(this.value),end_snap=this.getSnapNum(this.end_loc);if(this.options.paging){snap_loc=this.getSnapNum(this.drag_start_loc);this.__isout=!1;if(speed>0){this.gotoSnap(snap_loc+1,!0,speed)}else{this.gotoSnap(snap_loc-1,!0,speed)} return}else if(snap_loc===end_snap){this.cancel();return} this._callsnapChange(end_snap);this.current_snap=end_snap} this.animating=!1;this.__needsSnap=this.options.endless||(this.end_loc>this._min_value&&this.end_locthis._max_value){this.__speed=8;this.__needsSnap=!1;this._startDecelaration()}else{this.gotoSnap(curr_snap+1,!0)}};p.prevSnap=function(){this._internalStop();var curr_snap=this.getSnapNum(this.value);if(!this.options.endless&&(curr_snap-1)*this.options.snapsizethis.options.minValidDist){temp_value+=temp_speed;temp_speed*=this.options.friction;i++} if(step)return i;return temp_value};p._checkLimits=function(value){if(this.options.endless)return value;if(valuethis._max_value)return this._max_value;return value};p._callrenderer=function(){if(this.__renderHook)this.__renderHook.fun.call(this.__renderHook.ref,this,this.value)};p._callsnapChange=function(targetSnap){if(!this.__snapHook||targetSnap===this.current_snap)return;this.__snapHook.fun.call(this.__snapHook.ref,this,targetSnap,targetSnap-this.current_snap)};p._callonComplete=function(type){if(this.__compHook&&!this.stopped){this.__compHook.fun.call(this.__compHook.ref,this,this.current_snap,type)}};p._computeDeceleration=function(){if(this.options.snapping&&this.__needsSnap){var xtr_move=(this.__startSpeed-this.__speed)/this.__startSpeed*this.__extraMove;this.value+=this.__speed+xtr_move-this.__extrStep;this.__extrStep=xtr_move}else{this.value+=this.__speed} this.__speed*=this.options.friction;if(!this.options.endless&&!this.options.bouncing){if(this.value<=this._min_value){this.value=this._min_value;this.__speed=0}else if(this.value>=this._max_value){this.value=this._max_value;this.__speed=0}} this._callrenderer();if(!this.options.endless&&this.options.bouncing){var out_value=0;if(this.valuethis._max_value){out_value=this._max_value-this.value} this.__isout=Math.abs(out_value)>=this.options.minValidDist;if(this.__isout){if(this.__speed*out_value<=0){this.__speed+=out_value*this.options.outFriction}else{this.__speed=out_value*this.options.outAcceleration}}}};p._startDecelaration=function(){if(this._deceleration)return;this._deceleration=!0;var self=this;var tick=function(){if(!self._deceleration)return;self._computeDeceleration();if(Math.abs(self.__speed)>self.options.minValidDist||self.__isout){window.requestAnimationFrame(tick)}else{self._deceleration=!1;self.__isout=!1;if(self.__needsSnap&&self.options.snapping&&!self.options.paging){self.value=self._checkLimits(self.end_loc+self.__extraMove)}else{self.value=Math.round(self.value)} self._callrenderer();self._callonComplete('decel')}};tick()};window.Controller=Controller})();(function(window,document,$){window.MSLayerController=function(slide){this.slide=slide;this.slider=slide.slider;this.layers=[];this.layersLen=0;this.preloadCount=0;this.$layers=$('
      ').addClass('ms-slide-layers');this.$staticLayers=$('
      ').addClass('ms-static-layers');this.$fixedLayers=$('
      ').addClass('ms-fixed-layers');this.$animLayers=$('
      ').addClass('ms-anim-layers')};var p=MSLayerController.prototype;p.addLayer=function(layer){layer.slide=this.slide;layer.controller=this;switch(layer.$element.data('position')){case 'static':this.hasStaticLayer=!0;layer.$element.appendTo(this.$staticLayers);break;case 'fixed':this.hasFixedLayer=!0;layer.$element.appendTo(this.$fixedLayers);break;default:layer.$element.appendTo(this.$animLayers);break} layer.create();this.layers.push(layer);this.layersLen++;if(layer.parallax){this.hasParallaxLayer=!0} if(layer.needPreload){this.preloadCount++}};p.create=function(){this.slide.$element.append(this.$layers);this.$layers.append(this.$animLayers);if(this.hasStaticLayer){this.$layers.append(this.$staticLayers)} if(this.slider.options.layersMode=='center'){this.$layers.css('max-width',this.slider.options.width+'px');if(this.hasFixedLayer){this.$fixedLayers.css('max-width',this.slider.options.width+'px')}}};p.loadLayers=function(callback){this._onReadyCallback=callback;if(this.preloadCount===0){this._onlayersReady();return} for(var i=0;i!==this.layersLen;++i){if(this.layers[i].needPreload){this.layers[i].loadImage()}}};p.prepareToShow=function(){if(this.hasParallaxLayer){this._enableParallaxEffect()} if(this.hasFixedLayer){this.$fixedLayers.prependTo(this.slide.view.$element)}};p.showLayers=function(){if(this.layersHideTween){this.layersHideTween.stop(!0)} if(this.fixedLayersHideTween){this.fixedLayersHideTween.stop(!0)} this._resetLayers();this.$animLayers.css('opacity','').css('display','');if(this.hasFixedLayer){this.$fixedLayers.css('opacity','').css('display','')} if(this.ready){this._initLayers();this._locateLayers();this._startLayers()}};p.hideLayers=function(){if(this.slide.selected||this.slider.options.instantStartLayers){var that=this;that.layersHideTween=CTween.animate(this.$animLayers,500,{opacity:0},{complete:function(){that._resetLayers()}});if(this.hasFixedLayer){this.fixedLayersHideTween=CTween.animate(this.$fixedLayers,500,{opacity:0},{complete:function(){that.$fixedLayers.detach()}})} if(this.hasParallaxLayer){this._disableParallaxEffect()}}};p.animHideLayers=function(){if(!this.ready){return} for(var i=0;i!==this.layersLen;++i){this.layers[i].hide()}};p.setSize=function(width,height,hard){if(this.ready&&(this.slide.selected||this.hasStaticLayer)){if(hard){this._initLayers(!0)} this._locateLayers(!this.slide.selected)} if(this.slider.options.autoHeight){this.updateHeight()} if(this.slider.options.layersMode=='center'){var left=Math.max(0,(width-this.slider.options.width)/2)+'px' this.$layers[0].style.left=left;this.$fixedLayers[0].style.left=left}};p.updateHeight=function(){var h=this.slide.getHeight()+'px';this.$layers[0].style.height=h;this.$fixedLayers[0].style.height=h};p._onlayersReady=function(){this.ready=!0;if(this.hasStaticLayer&&!this.slide.isSleeping){this._initLayers(!1,!0)} this._onReadyCallback.call(this.slide)};p.onSlideSleep=function(){};p.onSlideWakeup=function(){if(this.hasStaticLayer&&this.ready){this._initLayers(!1,!0)}};p.destroy=function(){if(this.slide.selected&&this.hasParallaxLayer){this._disableParallaxEffect()} for(var i=0;i
    ').addClass('ms-parallax-layer');if(this.link){this.link.wrap(this.$parallaxElement);this.$parallaxElement=this.link.parent()}else{this.$element.wrap(this.$parallaxElement);this.$parallaxElement=this.$element.parent()} this._lastParaX=0;this._lastParaY=0;this._paraX=0;this._paraY=0;this.alignedToBot=this.layerOrigin&&this.layerOrigin.indexOf('b')!==-1;if(this.alignedToBot){this.$parallaxElement.css('bottom',0)} if(window._css3d){this.parallaxRender=this._parallaxCSS3DRenderer}else if(window._css2d){this.parallaxRender=this._parallaxCSS2DRenderer}else{this.parallaxRender=this._parallax2DRenderer} if(this.slider.options.parallaxMode!=='swipe'){averta.Ticker.add(this.parallaxRender,this)}} $.removeDataAttrs(this.$element,['data-src'])};p.init=function(){this.initialized=!0;var value;this.$element.css('visibility','');for(var i=0,l=this.__cssConfig.length;i').appendTo(this.$element).addClass('ms-video-btn').click(function(){that.__playVideo()});if(!has_img)return;this.needPreload=!0;this.img=this.$element.find('img:first').addClass('ms-video-img');if(this.img.data('src')!==undefined){this.img_src=this.img.data('src');this.img.removeAttr('data-src')}else{var that=this;this.img.attr('src',this.img_src).on('load',function(event){that.controller.preloadCount--;if(that.controller.preloadCount===0) that.controller._onlayersReady()}).each($.jqLoadFix)} if($.browser.msie) this.img.on('dragstart',function(event){event.preventDefault()})};p.loadImage=function(){var that=this;this.img.preloadImg(this.img_src,function(event){that.controller.preloadCount--;if(that.controller.preloadCount===0)that.controller._onlayersReady()})}})(jQuery);(function($){"use strict";window.MSHotspotLayer=function(){MSLayerElement.call(this);this.__cssConfig=['margin-top','padding-top','margin-bottom','padding-left','margin-right','padding-right','margin-left','padding-bottom','left','right','top','bottom'];this.ease='Expo';this.hide_start=!0;this.type='hotspot'};MSHotspotLayer.extend(MSLayerElement);var p=MSHotspotLayer.prototype;var _super=MSLayerElement.prototype;p._showTT=function(){if(!this.show_cl)return;clearTimeout(this.hto);if(this._tween)this._tween.stop(!0);if(this.hide_start){this.align=this._orgAlign;this._locateTT();this.tt.css({display:'block'});this._tween=CTween.animate(this.tt,900,this.to,{ease:'easeOut'+this.ease});this.hide_start=!1}};p._hideTT=function(){if(!this.show_cl)return;if(this._tween)this._tween.stop(!0);var that=this;clearTimeout(this.hto);this.hto=setTimeout(function(){that.hide_start=!0;that._tween=CTween.animate(that.tt,900,that.from,{ease:'easeOut'+that.ease,complete:function(){that.tt.css('display','none')}})},200)};p._updateClassName=function(name){if(this._lastClass)this.tt.removeClass(this._lastClass);this.tt.addClass(name);this._lastClass=name} p._alignPolicy=function(){var h=this.tt.outerHeight(!1),w=Math.max(this.tt.outerWidth(!1),parseInt(this.tt.css('max-width'))),ww=window.innerWidth,wh=window.innerHeight;switch(this.align){case 'top':if(this.base_t<0) return'bottom';break;case 'right':if(this.base_l+w>ww||this.base_t<0) return'bottom';break;case 'left':if(this.base_l<0||this.base_t<0) return'bottom';break} return null};p._locateTT=function(){var os=this.$element.offset(),os2=this.slide.slider.$element.offset();var dist=50,space=15 this.pos_x=os.left-os2.left-this.slide.slider.$element.scrollLeft();this.pos_y=os.top-os2.top-this.slide.slider.$element.scrollTop();this.from={opacity:0};this.to={opacity:1};this._updateClassName('ms-tooltip-'+this.align);this.tt_arrow.css('margin-left','');var arrow_w=15,arrow_h=15;switch(this.align){case 'top':var w=Math.min(this.tt.outerWidth(!1),parseInt(this.tt.css('max-width')));this.base_t=this.pos_y-this.tt.outerHeight(!1)-arrow_h-space;this.base_l=this.pos_x-w/2;if(this.base_l+w>window.innerWidth){this.tt_arrow.css('margin-left',-arrow_w/2+this.base_l+w-window.innerWidth+'px');this.base_l=window.innerWidth-w} if(this.base_l<0){this.base_l=0;this.tt_arrow.css('margin-left',-arrow_w/2+this.pos_x-this.tt.outerWidth(!1)/2+'px')} if(window._css3d){this.from[window._jcsspfx+'Transform']='translateY(-'+dist+'px)';this.to[window._jcsspfx+'Transform']=''}else{this.from.top=(this.base_t-dist)+'px';this.to.top=this.base_t+'px'} break;case 'bottom':var w=Math.min(this.tt.outerWidth(!1),parseInt(this.tt.css('max-width')));this.base_t=this.pos_y+arrow_h+space;this.base_l=this.pos_x-w/2;if(this.base_l+w>window.innerWidth){this.tt_arrow.css('margin-left',-arrow_w/2+this.base_l+w-window.innerWidth+'px');this.base_l=window.innerWidth-w} if(this.base_l<0){this.base_l=0;this.tt_arrow.css('margin-left',-arrow_w/2+this.pos_x-this.tt.outerWidth(!1)/2+'px')} if(window._css3d){this.from[window._jcsspfx+'Transform']='translateY('+dist+'px)';this.to[window._jcsspfx+'Transform']=''}else{this.from.top=(this.base_t+dist)+'px';this.to.top=this.base_t+'px'} break;case 'right':this.base_l=this.pos_x+arrow_w+space;this.base_t=this.pos_y-this.tt.outerHeight(!1)/2;if(window._css3d){this.from[window._jcsspfx+'Transform']='translateX('+dist+'px)';this.to[window._jcsspfx+'Transform']=''}else{this.from.left=(this.base_l+dist)+'px';this.to.left=this.base_l+'px'} break;case 'left':this.base_l=this.pos_x-arrow_w-this.tt.outerWidth(!1)-space;this.base_t=this.pos_y-this.tt.outerHeight(!1)/2;if(window._css3d){this.from[window._jcsspfx+'Transform']='translateX(-'+dist+'px)';this.to[window._jcsspfx+'Transform']=''}else{this.from.left=(this.base_l-dist)+'px';this.to.left=this.base_l+'px'} break} var policyAlign=this._alignPolicy();if(policyAlign!==null){this.align=policyAlign;this._locateTT();return} this.tt.css('top',parseInt(this.base_t)+'px').css('left',parseInt(this.base_l)+'px');this.tt.css(this.from)};p.start=function(){_super.start.call(this);this.tt.appendTo(this.slide.slider.$element);this.tt.css('display','none')};p.reset=function(){_super.reset.call(this);this.tt.detach()};p.create=function(){var that=this;_super.create.call(this);this._orgAlign=this.align=this.$element.data('align')!==undefined?this.$element.data('align'):'top';this.data=this.$element.html();this.$element.html('').on('mouseenter',function(){that._showTT()}).on('mouseleave',function(){that._hideTT()});this.point=$('
    ').addClass('ms-tooltip-point').appendTo(this.$element);var link=this.$element.data('link'),target=this.$element.data('target');if(link){this.point.on('click',function(){window.open(link,target||'_self')})} this.tt=$('
    ').addClass('ms-tooltip').css('display','hidden').css('opacity',0);if(this.$element.data('width')!==undefined){this.tt.css('width',this.$element.data('width')).css('max-width',this.$element.data('width'))} this.tt_arrow=$('
    ').addClass('ms-tooltip-arrow').appendTo(this.tt);this._updateClassName('ms-tooltip-'+this.align);this.ttcont=$('
    ').addClass('ms-tooltip-cont').html(this.data).appendTo(this.tt) if(this.$element.data('stay-hover')===!0){this.tt.on('mouseenter',function(){if(that.hide_start){return} clearTimeout(that.hto);that._tween.stop(!0);that._showTT()}).on('mouseleave',function(){that._hideTT()})}}})(jQuery);(function($){window.MSButtonLayer=function(){MSLayerElement.call(this);this.type='button'};MSButtonLayer.extend(MSLayerElement);var p=MSButtonLayer.prototype;var _super=MSLayerElement.prototype;var positionKies=['top','left','bottom','right'];p.create=function(){_super.create.call(this);this.$element.wrap('
    ').css('position','relative');this.$container=this.$element.parent()};p.locate=function(){_super.locate.call(this);var key,tempValue;for(var i=0;i<4;i++){key=positionKies[i];if(key in this.baseStyle){tempValue=this.$element.css(key);this.$element.css(key,'');this.$container.css(key,tempValue)}} this.$container.width(this.$element.outerWidth(!0)).height(this.$element.outerHeight(!0))}})(jQuery);window.MSSliderEvent=function(type){this.type=type};MSSliderEvent.CHANGE_START='ms_changestart';MSSliderEvent.CHANGE_END='ms_changeend';MSSliderEvent.WAITING='ms_waiting';MSSliderEvent.AUTOPLAY_CHANGE='ms_autoplaychange';MSSliderEvent.VIDEO_PLAY='ms_videoPlay';MSSliderEvent.VIDEO_CLOSE='ms_videoclose';MSSliderEvent.INIT='ms_init';MSSliderEvent.HARD_UPDATE='ms_hard_update';MSSliderEvent.RESIZE='ms_resize';MSSliderEvent.RESERVED_SPACE_CHANGE='ms_rsc';MSSliderEvent.DESTROY='ms_destroy';(function(window,document,$){"use strict";window.MSSlide=function(){this.$element=null;this.$loading=$('
    ').addClass('ms-slide-loading');this.view=null;this.index=-1;this.__width=0;this.__height=0;this.fillMode='fill';this.selected=!1;this.pselected=!1;this.autoAppend=!0;this.isSleeping=!0;this.moz=$.browser.mozilla};var p=MSSlide.prototype;p.onSwipeStart=function(){if(this.link){this.linkdis=!0} if(this.video){this.videodis=!0}};p.onSwipeMove=function(e){var move=Math.max(Math.abs(e.data.distanceX),Math.abs(e.data.distanceY));this.swipeMoved=move>4};p.onSwipeCancel=function(e){if(this.swipeMoved){this.swipeMoved=!1;return} if(this.link){this.linkdis=!1} if(this.video){this.videodis=!1}};p.setupLayerController=function(){this.hasLayers=!0;this.layerController=new MSLayerController(this)};p.assetsLoaded=function(){this.ready=!0;this.slider.api._startTimer();if(this.selected||(this.pselected&&this.slider.options.instantStartLayers)){if(this.hasLayers){this.layerController.showLayers()} if(this.vinit){this.bgvideo.play();if(!this.autoPauseBgVid){this.bgvideo.currentTime=0}}} if(!this.isSleeping){this.setupBG()} CTween.fadeOut(this.$loading,300,!0);if((this.slider.options.preload===0||this.slider.options.preload==='all')&&this.index').addClass('ms-slide-bgcont');this.$element.append(this.$loading).append(this.$imgcont);this.$bg_img=$(img).css('visibility','hidden');this.$imgcont.append(this.$bg_img);this.bgAligner=new MSAligner(that.fillMode,that.$imgcont,that.$bg_img);this.bgAligner.widthOnly=this.slider.options.autoHeight;if(that.slider.options.autoHeight&&(that.pselected||that.selected)){that.slider.setHeight(that.slider.options.height)} if(this.$bg_img.data('src')!==undefined){this.bg_src=this.$bg_img.data('src');this.$bg_img.removeAttr('data-src')}else{this.$bg_img.one('load',function(event){that._onBGLoad(event)}).each($.jqLoadFix)}};p.setupBG=function(){if(!this.initBG&&this.bgLoaded){this.initBG=!0;this.$bg_img.css('visibility','');this.bgWidth=this.bgNatrualWidth||this.$bg_img.width();this.bgHeight=this.bgNatrualHeight||this.$bg_img.height();CTween.fadeIn(this.$imgcont,300);if(this.slider.options.autoHeight){this.$imgcont.height(this.bgHeight*this.ratio)} this.bgAligner.init(this.bgWidth,this.bgHeight);this.setSize(this.__width,this.__height);if(this.slider.options.autoHeight&&(this.pselected||this.selected)) this.slider.setHeight(this.getHeight())}};p.loadImages=function(){if(this.ls){return} this.ls=!0;if(this.bgvideo){this.bgvideo.load()} if(this.hasBG&&this.bg_src){var that=this;this.$bg_img.preloadImg(this.bg_src,function(event){that._onBGLoad(event)})} if(this.hasLayers){this.layerController.loadLayers(this._onLayersLoad)} if(!this.hasBG&&!this.hasLayers){this.assetsLoaded()}};p._onLayersLoad=function(){this.layersLoaded=!0;if(this.bgLoaded){this.assetsLoaded()}};p._onBGLoad=function(event){this.bgNatrualWidth=event.width;this.bgNatrualHeight=event.height;this.bgLoaded=!0;if($.browser.msie){this.$bg_img.on('dragstart',function(event){event.preventDefault()})} if(!this.hasLayers||this.layerController.ready){this.assetsLoaded()}};p.setBGVideo=function($video){if(!$video[0].play){return} if(window._mobile){$video.remove();return} this.bgvideo=$video[0];var that=this;$video.addClass('ms-slide-bgvideo');if($video.data('loop')!==!1){this.bgvideo.addEventListener('ended',function(){that.bgvideo.play()})} if($video.data('mute')!==!1){this.bgvideo.muted=!0} if($video.data('autopause')===!0){this.autoPauseBgVid=!0} this.bgvideo_fillmode=$video.data('fill-mode')||'fill';if(this.bgvideo_fillmode!=='none'){this.bgVideoAligner=new MSAligner(this.bgvideo_fillmode,this.$element,$video);this.bgvideo.addEventListener('loadedmetadata',function(){if(that.vinit)return;that.vinit=!0;that.video_aspect=that.bgVideoAligner.baseHeight/that.bgVideoAligner.baseWidth;that.bgVideoAligner.init(that.bgvideo.videoWidth,that.bgvideo.videoHeight);that._alignBGVideo();CTween.fadeIn($(that.bgvideo),200);if(that.selected){that.bgvideo.play()}})} $video.css('opacity',0);this.$bgvideocont=$('
    ').addClass('ms-slide-bgvideocont').append($video);if(this.hasBG){this.$imgcont.before(this.$bgvideocont)}else{this.$bgvideocont.appendTo(this.$element)}};p._alignBGVideo=function(){if(!this.bgvideo_fillmode||this.bgvideo_fillmode==='none'){return} this.bgVideoAligner.align()};p.setSize=function(width,height,hard){this.__width=width;if(this.slider.options.autoHeight){if(this.bgLoaded){this.ratio=this.__width/this.bgWidth;height=Math.floor(this.ratio*this.bgHeight);this.$imgcont.height(height)}else{this.ratio=width/this.slider.options.width;height=this.slider.options.height*this.ratio}} this.__height=height;this.$element.width(width).height(height);if(this.hasBG&&this.bgLoaded)this.bgAligner.align();this._alignBGVideo();if(this.hasLayers){this.layerController.setSize(width,height,hard)}};p.getHeight=function(){if(this.hasBG&&this.bgLoaded){return this.bgHeight*this.ratio} return Math.max(this.$element[0].clientHeight,this.slider.options.height*this.ratio)};p.__playVideo=function(){if(this.vplayed||this.videodis){return} this.vplayed=!0;if(!this.slider.api.paused){this.slider.api.pause();this.roc=!0} this.vcbtn.css('display','');CTween.fadeOut(this.vpbtn,500,!1);CTween.fadeIn(this.vcbtn,500);CTween.fadeIn(this.vframe,500);this.vframe.css('display','block').attr('src',this.video+'&autoplay=1');this.view.$element.addClass('ms-def-cursor');if(this.view.swipeControl){this.view.swipeControl.disable()} this.slider.slideController.dispatchEvent(new MSSliderEvent(MSSliderEvent.VIDEO_PLAY))};p.__closeVideo=function(){if(!this.vplayed){return} this.vplayed=!1;if(this.roc){this.slider.api.resume()} var that=this;CTween.fadeIn(this.vpbtn,500);CTween.animate(this.vcbtn,500,{opacity:0},{complete:function(){that.vcbtn.css('display','none')}});CTween.animate(this.vframe,500,{opacity:0},{complete:function(){that.vframe.attr('src','about:blank').css('display','none')}});if(this.view.swipeControl){this.view.swipeControl.enable()} this.view.$element.removeClass('ms-def-cursor');this.slider.slideController.dispatchEvent(new MSSliderEvent(MSSliderEvent.VIDEO_CLOSE))};p.create=function(){var that=this;if(this.hasLayers){this.layerController.create()} if(this.link){this.link.addClass('ms-slide-link').html('').click(function(e){if(that.linkdis){e.preventDefault()}})} if(this.video){if(this.video.indexOf('?')===-1){this.video+='?'} this.vframe=$('').addClass('ms-slide-video').css({width:'100%',height:'100%',display:'none'}).attr('src','about:blank').attr('allowfullscreen','true').appendTo(this.$element);this.vpbtn=$('
    ').addClass('ms-slide-vpbtn').click(function(){that.__playVideo()}).appendTo(this.$element);this.vcbtn=$('
    ').addClass('ms-slide-vcbtn').click(function(){that.__closeVideo()}).appendTo(this.$element).css('display','none');if(window._touch){this.vcbtn.removeClass('ms-slide-vcbtn').addClass('ms-slide-vcbtn-mobile').append('
    Close video
    ').appendTo(this.view.$element.parent())}} if(!this.slider.options.autoHeight&&this.hasBG){this.$imgcont.css('height','100%');if(this.fillMode==='center'||this.fillMode==='stretch'){this.fillMode='fill'}} if(this.slider.options.autoHeight){this.$element.addClass('ms-slide-auto-height')} this.sleep(!0)};p.destroy=function(){if(this.hasLayers){this.layerController.destroy();this.layerController=null} this.$element.remove();this.$element=null};p.prepareToSelect=function(){if(this.pselected||this.selected){return} this.pselected=!0;if(this.link||this.video){this.view.addEventListener(MSViewEvents.SWIPE_START,this.onSwipeStart,this);this.view.addEventListener(MSViewEvents.SWIPE_MOVE,this.onSwipeMove,this);this.view.addEventListener(MSViewEvents.SWIPE_CANCEL,this.onSwipeCancel,this);this.linkdis=!1;this.swipeMoved=!1} this.loadImages();if(this.hasLayers){this.layerController.prepareToShow()} if(this.ready){if(this.bgvideo){this.bgvideo.play()} if(this.hasLayers&&this.slider.options.instantStartLayers){this.layerController.showLayers()}} if(this.moz){this.$element.css('margin-top','')}};p.select=function(){if(this.selected){return} this.selected=!0;this.pselected=!1;this.$element.addClass('ms-sl-selected');if(this.hasLayers){if(this.slider.options.autoHeight){this.layerController.updateHeight()} if(!this.slider.options.instantStartLayers){this.layerController.showLayers()}} if(this.ready&&this.bgvideo){this.bgvideo.play()} if(this.videoAutoPlay){this.videodis=!1;this.vpbtn.trigger('click')}};p.unselect=function(){this.pselected=!1;if(this.moz){this.$element.css('margin-top','0.1px')} if(this.link||this.video){this.view.removeEventListener(MSViewEvents.SWIPE_START,this.onSwipeStart,this);this.view.removeEventListener(MSViewEvents.SWIPE_MOVE,this.onSwipeMove,this);this.view.removeEventListener(MSViewEvents.SWIPE_CANCEL,this.onSwipeCancel,this)} if(this.bgvideo){this.bgvideo.pause();if(!this.autoPauseBgVid&&this.vinit) this.bgvideo.currentTime=0} if(this.hasLayers){this.layerController.hideLayers()} if(!this.selected){return} this.selected=!1;this.$element.removeClass('ms-sl-selected');if(this.video&&this.vplayed){this.__closeVideo();this.roc=!1}};p.sleep=function(force){if(this.isSleeping&&!force){return} this.isSleeping=!0;if(this.autoAppend){this.$element.detach()} if(this.hasLayers){this.layerController.onSlideSleep()}};p.wakeup=function(){if(!this.isSleeping){return} this.isSleeping=!1;if(this.autoAppend){this.view.$slideCont.append(this.$element)} if(this.moz){this.$element.css('margin-top','0.1px')} this.setupBG();if(this.hasBG){this.bgAligner.align()} if(this.hasLayers){this.layerController.onSlideWakeup()}}})(window,document,jQuery);(function($){"use strict";var SliderViewList={};window.MSSlideController=function(slider){this._delayProgress=0;this._timer=new averta.Timer(100);this._timer.onTimer=this.onTimer;this._timer.refrence=this;this.currentSlide=null;this.slider=slider;this.so=slider.options;averta.EventDispatcher.call(this)};MSSlideController.registerView=function(name,_class){if(name in SliderViewList){throw new Error(name+', is already registered.');return} SliderViewList[name]=_class};MSSlideController.SliderControlList={};MSSlideController.registerControl=function(name,_class){if(name in MSSlideController.SliderControlList){throw new Error(name+', is already registered.');return} MSSlideController.SliderControlList[name]=_class};var p=MSSlideController.prototype;p.setupView=function(){var that=this;this.resize_listener=function(){that.__resize()};var viewOptions={spacing:this.so.space,mouseSwipe:this.so.mouse,loop:this.so.loop,autoHeight:this.so.autoHeight,swipe:this.so.swipe,speed:this.so.speed,dir:this.so.dir,viewNum:this.so.inView,critMargin:this.so.critMargin,onPrv:this.so.onPrv,onNxt:this.so.onNxt};if(this.so.viewOptions) $.extend(viewOptions,this.so.viewOptions);if(this.so.autoHeight)this.so.heightLimit=!1;var viewClass=SliderViewList[this.slider.options.view]||MSBasicView;if(viewClass._3dreq&&(!window._css3d||$.browser.msie))viewClass=viewClass._fallback||MSBasicView;this.view=new viewClass(viewOptions);if(this.so.overPause){var that=this;this.slider.$element.mouseenter(function(){that.is_over=!0;that._stopTimer()}).mouseleave(function(){that.is_over=!1;that._startTimer()})}};p.onChangeStart=function(){this.change_started=!0;if(this.currentSlide)this.currentSlide.unselect();this.currentSlide=this.view.currentSlide;this.currentSlide.prepareToSelect();if(this.so.endPause&&this.currentSlide.index===this.slider.slides.length-1){this.pause();this.skipTimer()} if(this.so.autoHeight){this.slider.setHeight(this.currentSlide.getHeight())} if(this.so.deepLink){this.__updateWindowHash()} this.dispatchEvent(new MSSliderEvent(MSSliderEvent.CHANGE_START))};p.onChangeEnd=function(){this.change_started=!1;this._startTimer();this.currentSlide.select();if(this.so.preload>1){var loc,i,l=this.so.preload-1;for(i=1;i<=l;++i){loc=this.view.index+i;if(loc>=this.view.slideList.length){if(this.so.loop){loc=loc-this.view.slideList.length}else{i=l;continue}}else{} this.view.slideList[loc].loadImages()} if(l>this.view.slideList.length/2) l=Math.floor(this.view.slideList.length/2);for(i=1;i<=l;++i){loc=this.view.index-i;if(loc<0){if(this.so.loop){loc=this.view.slideList.length+loc}else{i=l;continue}}else{} this.view.slideList[loc].loadImages()}} this.dispatchEvent(new MSSliderEvent(MSSliderEvent.CHANGE_END))};p.onSwipeStart=function(){console.log('sw start');this.skipTimer()};p.skipTimer=function(){this._timer.reset();this._delayProgress=0;this.dispatchEvent(new MSSliderEvent(MSSliderEvent.WAITING))};p.onTimer=function(time){if(this._timer.getTime()>=this.view.currentSlide.delay*1000){this.skipTimer();this.view.next();this.hideCalled=!1} this._delayProgress=this._timer.getTime()/(this.view.currentSlide.delay*10);if(this.so.hideLayers&&!this.hideCalled&&this.view.currentSlide.delay*1000-this._timer.getTime()<=300){var currentSlide=this.view.currentSlide;if(currentSlide.hasLayers){currentSlide.layerController.animHideLayers()} this.hideCalled=!0} this.dispatchEvent(new MSSliderEvent(MSSliderEvent.WAITING))};p._stopTimer=function(){if(this._timer) this._timer.stop()};p._startTimer=function(){if(!this.paused&&!this.is_over&&this.currentSlide&&this.currentSlide.ready&&!this.change_started) this._timer.start()};p.__appendSlides=function(){var slide,loc,i=0,l=this.view.slideList.length-1;for(i;i=this.view.slideList.length){if(this.so.loop){loc=loc-this.view.slideList.length}else{i=l;continue}}else{console.log('the end')} slide=this.view.slideList[loc];slide.detached=!1;this.view.appendSlide(slide)} if(l>this.view.slideList.length/2) l=Math.floor(this.view.slideList.length/2);for(i=1;i<=l;++i){loc=this.view.index-i;if(loc<0){if(this.so.loop){loc=this.view.slideList.length+loc}else{i=l;continue}}else{console.log('the end')} slide=this.view.slideList[loc];slide.detached=!1;this.view.appendSlide(slide)}} p.__resize=function(hard){if(!this.created)return;this.width=this.slider.$element[0].clientWidth||this.so.width;if(!this.so.fullwidth){this.width=Math.min(this.width,this.so.width)} if(this.so.fullheight){this.so.heightLimit=!1;this.so.autoHeight=!1;this.height=this.slider.$element[0].clientHeight}else{this.height=this.width/this.slider.aspect} if(this.so.autoHeight){this.currentSlide.setSize(this.width,null,hard);this.view.setSize(this.width,this.currentSlide.getHeight(),hard)}else{this.view.setSize(this.width,(this.so.heightLimit?Math.min(this.height,this.so.height):this.height),hard)} if(this.slider.$controlsCont){if(this.so.centerControls&&this.so.fullwidth){this.view.$element.css('left',Math.min(0,-(this.slider.$element[0].clientWidth-this.so.width)/2)+'px')}} this.dispatchEvent(new MSSliderEvent(MSSliderEvent.RESIZE))};p.__dispatchInit=function(){this.dispatchEvent(new MSSliderEvent(MSSliderEvent.INIT))};p.__updateWindowHash=function(){var hash=window.location.hash,dl=this.so.deepLink,dlt=this.so.deepLinkType,eq=dlt==='path'?'\/':'=',sep=dlt==='path'?'\/':'&',sliderHash=dl+eq+(this.view.index+1),regTest=new RegExp(dl+eq+'[0-9]+','g');if(hash===''){window.location.hash=sep+sliderHash}else if(regTest.test(hash)){window.location.hash=hash.replace(regTest,sliderHash)}else{window.location.hash=hash+sep+sliderHash}};p.__curentSlideInHash=function(){var hash=window.location.hash,dl=this.so.deepLink,dlt=this.so.deepLinkType,eq=dlt==='path'?'\/':'=',regTest=new RegExp(dl+eq+'[0-9]+','g');if(regTest.test(hash)){var index=Number(hash.match(regTest)[0].match(/[0-9]+/g).pop());if(!isNaN(index)){return index-1}} return-1};p.__onHashChanged=function(){var index=this.__curentSlideInHash();if(index!==-1){this.gotoSlide(index)}};p.setup=function(){this.created=!0;this.paused=!this.so.autoplay;this.view.addEventListener(MSViewEvents.CHANGE_START,this.onChangeStart,this);this.view.addEventListener(MSViewEvents.CHANGE_END,this.onChangeEnd,this);this.view.addEventListener(MSViewEvents.SWIPE_START,this.onSwipeStart,this);this.currentSlide=this.view.slideList[this.so.start-1];this.__resize();var slideInHash=this.__curentSlideInHash(),startSlide=slideInHash!==-1?slideInHash:this.so.start-1;this.view.create(startSlide);if(this.so.preload===0){this.view.slideList[0].loadImages()} this.scroller=this.view.controller;if(this.so.wheel){var that=this;var last_time=new Date().getTime();this.wheellistener=function(event){var e=window.event||event.orginalEvent||event;e.preventDefault();var current_time=new Date().getTime();if(current_time-last_time<400)return;last_time=current_time;var delta=Math.abs(e.detail||e.wheelDelta);if($.browser.mozilla){delta*=100} var scrollThreshold=15;if(e.detail<0||e.wheelDelta>0){if(delta>=scrollThreshold){that.previous(!0)}}else{if(delta>=scrollThreshold){that.next(!0)}} return!1};if($.browser.mozilla)this.slider.$element[0].addEventListener('DOMMouseScroll',this.wheellistener);else this.slider.$element.bind('mousewheel',this.wheellistener)} if(this.slider.$element[0].clientWidth===0) this.slider.init_safemode=!0;this.__resize();var that=this;if(this.so.deepLink){$(window).on('hashchange',function(){that.__onHashChanged()})}};p.index=function(){return this.view.index};p.count=function(){return this.view.slidesCount};p.next=function(checkLoop){this.skipTimer();console.log('p.next'+4696);this.view.next(checkLoop)};p.previous=function(checkLoop){this.skipTimer();console.log('p.prev'+4702);this.view.previous(checkLoop)};p.gotoSlide=function(index){index=Math.min(index,this.count()-1);this.skipTimer();this.view.gotoSlide(index)};p.destroy=function(reset){this.dispatchEvent(new MSSliderEvent(MSSliderEvent.DESTROY));this.slider.destroy(reset)};p._destroy=function(){this._timer.reset();this._timer=null;$(window).unbind('resize',this.resize_listener);this.view.destroy();this.view=null;if(this.so.wheel){if($.browser.mozilla)this.slider.$element[0].removeEventListener('DOMMouseScroll',this.wheellistener);else this.slider.$element.unbind('mousewheel',this.wheellistener);this.wheellistener=null} this.so=null};p.runAction=function(action){var actionParams=[];if(action.indexOf('(')!==-1){var temp=action.slice(0,action.indexOf('('));actionParams=action.slice(action.indexOf('(')+1,-1).replace(/\"|\'|\s/g,'').split(',');action=temp} if(action in this){this[action].apply(this,actionParams)}else if(console){console.log('Master Slider Error: Action "'+action+'" not found.')}};p.scrollToEnd=function(duration){var sliderEle=this.slider.$element;if(duration==null){duration=1.4} $('html, body').animate({scrollTop:sliderEle.offset().top+sliderEle.outerHeight(!1)},duration*1000,'easeInOutQuad')};p.update=function(hard){if(this.slider.init_safemode&&hard) this.slider.init_safemode=!1;this.__resize(hard);if(hard){this.dispatchEvent(new MSSliderEvent(MSSliderEvent.HARD_UPDATE))}};p.locate=function(){this.__resize()};p.resume=function(){if(!this.paused)return;this.paused=!1;this._startTimer()};p.pause=function(){if(this.paused)return;this.paused=!0;this._stopTimer()};p.currentTime=function(){return this._delayProgress};averta.EventDispatcher.extend(p)})(jQuery);(function($){"use strict";var LayerTypes={'image':MSImageLayerElement,'text':MSLayerElement,'video':MSVideoLayerElement,'hotspot':MSHotspotLayer,'button':MSButtonLayer};window.MasterSlider=function(){this.options={autoplay:!1,loop:!1,mouse:!0,swipe:!0,grabCursor:!0,space:0,fillMode:'fill',start:1,view:'basic',width:300,height:150,inView:15,critMargin:1,heightLimit:!0,smoothHeight:!0,autoHeight:!1,fullwidth:!1,fullheight:!1,autofill:!1,layersMode:'center',hideLayers:!1,endPause:!1,centerControls:!0,overPause:!0,shuffle:!1,speed:17,dir:'h',preload:0,wheel:!1,layout:'boxed',fullscreenMargin:0,instantStartLayers:!1,parallaxMode:'mouse',rtl:!1,deepLink:null,deepLinkType:'path',disablePlugins:[]};this.slides=[];this.activePlugins=[];this.$element=null;this.lastMargin=0;this.leftSpace=0;this.topSpace=0;this.rightSpace=0;this.bottomSpace=0;this._holdOn=0;var that=this;this.resize_listener=function(){that._resize()};$(window).bind('resize',this.resize_listener)};MasterSlider.author='Averta Ltd. (www.averta.net)';MasterSlider.version='2.12.3';MasterSlider.releaseDate='Apr 2015';MasterSlider._plugins=[] var MS=MasterSlider;MS.registerPlugin=function(plugin){if(MS._plugins.indexOf(plugin)===-1){MS._plugins.push(plugin)}};var p=MasterSlider.prototype;p.__setupSlides=function(){var that=this,new_slide,ind=0;this.$element.children('.ms-slide').each(function(index){var $slide_ele=$(this);new_slide=new MSSlide();new_slide.$element=$slide_ele;new_slide.slider=that;new_slide.delay=$slide_ele.data('delay')!==undefined?$slide_ele.data('delay'):3;new_slide.fillMode=$slide_ele.data('fill-mode')!==undefined?$slide_ele.data('fill-mode'):that.options.fillMode;new_slide.index=ind++;var slide_img=$slide_ele.children('img:not(.ms-layer)');if(slide_img.length>0){new_slide.setBG(slide_img[0])} var slide_video=$slide_ele.children('video');if(slide_video.length>0)new_slide.setBGVideo(slide_video);if(that.controls){for(var i=0,l=that.controls.length;iimg').data('type')==='image'){$parent_ele=$(this);$layer_element=$parent_ele.find('img')} var layer=new(LayerTypes[$layer_element.data('type')||'text'])();layer.$element=$layer_element;layer.link=$parent_ele;var eff_parameters={},end_eff_parameters={};if($layer_element.data('effect')!==undefined)eff_parameters.name=$layer_element.data('effect');if($layer_element.data('ease')!==undefined)eff_parameters.ease=$layer_element.data('ease');if($layer_element.data('duration')!==undefined)eff_parameters.duration=$layer_element.data('duration');if($layer_element.data('delay')!==undefined)eff_parameters.delay=$layer_element.data('delay');if($layer_element.data('hide-effect'))end_eff_parameters.name=$layer_element.data('hide-effect');if($layer_element.data('hide-ease'))end_eff_parameters.ease=$layer_element.data('hide-ease');if($layer_element.data('hide-duration')!==undefined)end_eff_parameters.duration=$layer_element.data('hide-duration');if($layer_element.data('hide-time')!==undefined)end_eff_parameters.time=$layer_element.data('hide-time');layer.setStartAnim(eff_parameters);layer.setEndAnim(end_eff_parameters);slide.layerController.addLayer(layer)})};p._removeLoading=function(){$(window).unbind('resize',this.resize_listener);this.$element.removeClass('before-init').css('visibility','visible').css('height','').css('opacity',0);CTween.fadeIn(this.$element);this.$loading.remove();if(this.slideController) this.slideController.__resize()};p._resize=function(e){if(this.$loading){var h=this.$loading[0].clientWidth/this.aspect;h=this.options.heightLimit?Math.min(h,this.options.height):h;this.$loading.height(h);this.$element.height(h)}};p._shuffleSlides=function(){var slides=this.$element.children('.ms-slide'),r;for(var i=0,l=slides.length;i0||!this._docReady){return} this.initialized=!0;if(this.options.preload!=='all'){this._removeLoading()} if(this.options.shuffle)this._shuffleSlides();MSLayerEffects.setup();this.slideController.setupView();this.view=this.slideController.view;this.$controlsCont=$('
    ').addClass('ms-inner-controls-cont');if(this.options.centerControls){this.$controlsCont.css('max-width',this.options.width+'px')} this.$controlsCont.prepend(this.view.$element);this.$msContainer=$('
    ').addClass('ms-container').prependTo(this.$element).append(this.$controlsCont);if(this.controls){for(var i=0,l=this.controls.length;i-1;if(isAndroid){this.$element.addClass('ms-android')} var that=this;$.extend(this.options,options);this.aspect=this.options.width/this.options.height;this.$loading=$('
    ').addClass('ms-loading-container').insertBefore(this.$element).append($('
    ').addClass('ms-loading'));this.$loading.parent().css('position','relative');if(this.options.autofill){this.options.fullwidth=!0;this.options.fullheight=!0} if(this.options.fullheight){this.$element.addClass('ms-fullheight')} this._resize();this.slideController=new MSSlideController(this);this.api=this.slideController;for(var i=0,l=MS._plugins.length;i!==l;i++){var plugin=MS._plugins[i];if(this.options.disablePlugins.indexOf(plugin.name)===-1){this.activePlugins.push(new plugin(this))}} $(document).ready(function(){that._docReady=!0;that._init()});return this};p.destroy=function(insertMarkup){for(var i=0,l=this.activePlugins.length;i!==l;i++){this.activePlugins[i].destroy()} if(this.controls){for(i=0,l=this.controls.length;i!==l;i++) this.controls[i].destroy();} if(this.slideController)this.slideController._destroy();if(this.$loading)this.$loading.remove();if(insertMarkup){this.$element.html(this.setupMarkup).css('visibility','hidden')}else{this.$element.remove()} var lo=this.options.layout;if(lo==='fullscreen'||lo==='fullwidth'){$(window).unbind('resize',this._updateLayout)} this.view=null;this.slides=null;this.options=null;this.slideController=null;this.api=null;this.resize_listener=null;this.activePlugins=null}})(jQuery);(function($,window,document,undefined){var pluginName="masterslider",defaults={controls:{}};function MasterSliderPlugin(element,options){this.element=element;this.$element=$(element);this.settings=$.extend({},defaults,options);this._defaults=defaults;this._name=pluginName;this.init()} $.extend(MasterSliderPlugin.prototype,{init:function(){var self=this;this._slider=new MasterSlider();for(var control in this.settings.controls){this._slider.control(control,this.settings.controls[control])} this._slider.setup(this.$element,this.settings);var _superDispatch=this._slider.api.dispatchEvent;this._slider.api.dispatchEvent=function(event){self.$element.trigger(event.type);_superDispatch.call(this,event)}},api:function(){return this._slider.api},slider:function(){return this._slider}});$.fn[pluginName]=function(options){var args=arguments,plugin='plugin_'+pluginName;if(options===undefined||typeof options==='object'){return this.each(function(){if(!$.data(this,plugin)){$.data(this,plugin,new MasterSliderPlugin(this,options))}})}else if(typeof options==='string'&&options[0]!=='_'&&options!=='init'){var returns;this.each(function(){var instance=$.data(this,plugin);if(instance instanceof MasterSliderPlugin&&typeof instance[options]==='function'){returns=instance[options].apply(instance,Array.prototype.slice.call(args,1))} if(instance instanceof MasterSliderPlugin&&typeof instance._slider.api[options]==='function'){returns=instance._slider.api[options].apply(instance._slider.api,Array.prototype.slice.call(args,1))} if(options==='destroy'){$.data(this,plugin,null)}});return returns!==undefined?returns:this}}})(jQuery,window,document);window.MSViewEvents=function(type,data){this.type=type;this.data=data};MSViewEvents.SWIPE_START='swipeStart';MSViewEvents.SWIPE_END='swipeEnd';MSViewEvents.SWIPE_MOVE='swipeMove';MSViewEvents.SWIPE_CANCEL='swipeCancel';MSViewEvents.SCROLL='scroll';MSViewEvents.CHANGE_START='slideChangeStart';MSViewEvents.CHANGE_END='slideChangeEnd';(function($){"use strict";window.MSBasicView=function(options){this.options={loop:!1,dir:'h',autoHeight:!1,spacing:5,mouseSwipe:!0,swipe:!0,speed:17,minSlideSpeed:2,viewNum:20,critMargin:1};$.extend(this.options,options);this.dir=this.options.dir;this.loop=this.options.loop;this.spacing=this.options.spacing;this.__width=0;this.__height=0;this.__cssProb=this.dir==='h'?'left':'top';this.__offset=this.dir==='h'?'offsetLeft':'offsetTop';this.__dimension=this.dir==='h'?'__width':'__height';this.__translate_end=window._css3d?' translateZ(0px)':'';this.$slideCont=$('
    ').addClass('ms-slide-container');this.$element=$('
    ').addClass('ms-view').addClass('ms-basic-view').append(this.$slideCont);this.currentSlide=null;this.index=-1;this.slidesCount=0;this.slides=[];this.slideList=[];this.viewSlidesList=[];this.css3=window._cssanim;this.start_buffer=0;this.firstslide_snap=0;this.slideChanged=!1;this.controller=new Controller(0,0,{snapping:!0,snapsize:100,paging:!0,snappingMinSpeed:this.options.minSlideSpeed,friction:(100-this.options.speed*0.5)/100,endless:this.loop});this.controller.renderCallback(this.dir==='h'?this._horizUpdate:this._vertiUpdate,this);this.controller.snappingCallback(this.__snapUpdate,this);this.controller.snapCompleteCallback(this.__snapCompelet,this);averta.EventDispatcher.call(this)};var p=MSBasicView.prototype;p.__snapCompelet=function(snap,type){if(!this.slideChanged){return} this.slideChanged=!1;this.__locateSlides();this.start_buffer=0;this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_END))};p.__snapUpdate=function(controller,snap,change){if(this.loop){var target_index=this.index+change;this.updateLoop(target_index);if(target_index>=this.slidesCount)target_index=target_index-this.slidesCount;if(target_index<0)target_index=this.slidesCount+target_index;this.index=target_index}else{if(snap<0||snap>=this.slidesCount)return this.index=snap} this._checkCritMargins();if($.browser.mozilla){this.slideList[this.index].$element[0].style.marginTop='0.1px';if(this.currentSlide){this.currentSlide.$element[0].style.marginTop=''}} var new_slide=this.slideList[this.index];if(new_slide===this.currentSlide)return;this.currentSlide=new_slide;if(this.autoUpdateZIndex){this.__updateSlidesZindex()} this.slideChanged=!0;this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START))};p._checkCritMargins=function(){if(this.normalMode)return;var hlf=Math.floor(this.options.viewNum/2),inView=this.viewSlidesList.indexOf(this.slideList[this.index]),size=(this[this.__dimension]+this.spacing),cm=this.options.critMargin;if(this.loop){if(inView<=cm||inView>=this.viewSlidesList.length-cm){size*=(inView-hlf);this.__locateSlides(!1,size+this.start_buffer);this.start_buffer+=size} return} if((inView=cm)||(inView>=this.viewSlidesList.length-cm&&this.index=this.slidesCount)?this.index+i-this.slidesCount:this.index+i]);return return_arr};p.__getSteps=function(index,target){var right=(target=this.slidesCount){this.controller.bounce(10);console.log("p.next -> "+this.options.onNxt);if(this.options.onNxt){jQuery('#'+this.options.onNxt)[0].click()} return} this.gotoSlide((this.index+1>=this.slidesCount)?0:this.index+1)};p.previous=function(checkLoop){if(checkLoop&&!this.loop&&this.index-1<0){this.controller.bounce(-10);console.log("p.previous -> "+this.options.onPrv);if(this.options.onPrv){jQuery('#'+this.options.onPrv)[0].click()} return} this.gotoSlide((this.index-1<0)?this.slidesCount-1:this.index-1)};p.setupSwipe=function(){this.swipeControl=new averta.TouchSwipe(this.$element);this.swipeControl.swipeType=this.dir==='h'?'horizontal':'vertical';var that=this;if(this.dir==='h'){this.swipeControl.onSwipe=function(status){that.horizSwipeMove(status)}}else{this.swipeControl.onSwipe=function(status){that.vertSwipeMove(status)}}};p.vertSwipeMove=function(status){var phase=status.phase;if(phase==='start'){this.controller.stop();this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_START,status))}else if(phase==='move'&&(!this.loop||Math.abs(this.currentSlide.position-this.controller.value+status.moveY)0.1){this.controller.push(-speed);if(speed>this.controller.options.snappingMinSpeed) this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_END,status))}else{this.controller.cancel();this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_CANCEL,status))}}};p.horizSwipeMove=function(status){var phase=status.phase;if(phase==='start'){this.controller.stop();this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_START,status))}else if(phase==='move'&&(!this.loop||Math.abs(this.currentSlide.position-this.controller.value+status.moveX)0.1){this.controller.push(-speed);if(speed>this.controller.options.snappingMinSpeed) this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_END,status));console.log('6038 '+phase)}else{this.controller.cancel();this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_CANCEL,status))}}};p.setSize=function(width,height,hard){if(this.lastWidth===width&&height===this.lastHeight&&!hard)return;this.$element.width(width).height(height);for(var i=0;i').addClass('ms-mask-frame').append(slide.$element);slide.$element[0].style.position='relative';slide.autoAppend=!1;this.slides.push(slide);this.slideList.push(slide);this.slidesCount++};p.setSize=function(width,height){var slider=this.slides[0].slider;for(var i=0;i=that.options.hideUnder&&that.detached){that.detached=!1;that.visible();that.onAppend()}};p.create=function(){var that=this;if(this.options.autohide&&!window._touch){this.hide(!0);this.slider.$controlsCont.mouseenter($.proxy(this._onMouseEnter,this)).mouseleave($.proxy(this._onMouseLeave,this)).mousedown($.proxy(this._onMouseDown,this));if(this.$element){this.$element.mouseenter($.proxy(this._onMouseEnter,this)).mouseleave($.proxy(this._onMouseLeave,this)).mousedown($.proxy(this._onMouseDown,this))} $(document).mouseup($.proxy(this._onMouseUp,this))} if(this.options.align){this.$element.addClass('ms-align-'+this.options.align)}};p._onMouseEnter=function(){if(!this._disableAH&&!this.mdown){this.visible()} this.mleave=!1};p._onMouseLeave=function(){if(!this.mdown){this.hide()} this.mleave=!0};p._onMouseDown=function(){this.mdown=!0};p._onMouseUp=function(){if(this.mdown&&this.mleave){this.hide()} this.mdown=!1};p.onAppend=function(){if(this.needsRealign){this.slider._realignControls()}};p.onDetach=function(){if(this.needsRealign){this.slider._realignControls()}};p._hideOnvideoStarts=function(){var that=this;this.slider.api.addEventListener(MSSliderEvent.VIDEO_PLAY,function(){that._disableAH=!0;that.hide()});this.slider.api.addEventListener(MSSliderEvent.VIDEO_CLOSE,function(){that._disableAH=!1;that.visible()})};p.hide=function(fast){if(fast){this.$element.css('opacity',0);this.$element.css('display','none')}else{clearTimeout(this.hideTo);var $element=this.$element;this.hideTo=setTimeout(function(){CTween.fadeOut($element,400,!1)},20)} this.$element.addClass('ms-ctrl-hide')};p.visible=function(){if(this.detached)return;clearTimeout(this.hideTo);this.$element.css('display','');CTween.fadeIn(this.$element,400,!1);this.$element.removeClass('ms-ctrl-hide')};p.destroy=function(){if(this.options&&this.options.hideUnder){$(window).unbind('resize',this.onResize)}};window.BaseControl=BaseControl})(jQuery);(function($){"use strict";var MSArrows=function(options){BaseControl.call(this);$.extend(this.options,options)};MSArrows.extend(BaseControl);var p=MSArrows.prototype;var _super=BaseControl.prototype;p.setup=function(){var that=this;this.$next=$('
    ').addClass(this.options.prefix+'nav-next').bind('click',function(){that.slider.api.next(!0)});this.$prev=$('
    ').addClass(this.options.prefix+'nav-prev').bind('click',function(){that.slider.api.previous(!0)});_super.setup.call(this);this.cont.append(this.$next);this.cont.append(this.$prev);this.checkHideUnder()};p.hide=function(fast){if(fast){this.$prev.css('opacity',0).css('display','none');this.$next.css('opacity',0).css('display','none');return} CTween.fadeOut(this.$prev,400,!1);CTween.fadeOut(this.$next,400,!1);this.$prev.addClass('ms-ctrl-hide');this.$next.addClass('ms-ctrl-hide')};p.visible=function(){if(this.detached)return;CTween.fadeIn(this.$prev,400);CTween.fadeIn(this.$next,400);this.$prev.removeClass('ms-ctrl-hide').css('display','');this.$next.removeClass('ms-ctrl-hide').css('display','')};p.destroy=function(){_super.destroy();this.$next.remove();this.$prev.remove()};window.MSArrows=MSArrows;MSSlideController.registerControl('arrows',MSArrows)})(jQuery);(function($){"use strict";var MSThumblist=function(options){BaseControl.call(this);this.options.dir='h';this.options.wheel=options.dir==='v';this.options.arrows=!1;this.options.speed=17;this.options.align=null;this.options.inset=!1;this.options.margin=10;this.options.space=10;this.options.width=100;this.options.height=100;this.options.type='thumbs';this.options.hover=!1;$.extend(this.options,options);this.thumbs=[];this.index_count=0;this.__dimen=this.options.dir==='h'?'width':'height';this.__alignsize=this.options.dir==='h'?'height':'width';this.__jdimen=this.options.dir==='h'?'outerWidth':'outerHeight';this.__pos=this.options.dir==='h'?'left':'top';this.click_enable=!0};MSThumblist.extend(BaseControl);var p=MSThumblist.prototype;var _super=BaseControl.prototype;p.setup=function(){this.$element=$('
    ').addClass(this.options.prefix+'thumb-list');if(this.options.type==='tabs'){this.$element.addClass(this.options.prefix+'tabs')} this.$element.addClass('ms-dir-'+this.options.dir);_super.setup.call(this);if(this.slider.$controlsCont===this.cont){this.$element.appendTo(this.slider.$element)}else{this.$element.appendTo(this.cont)} this.$thumbscont=$('
    ').addClass('ms-thumbs-cont').appendTo(this.$element);if(this.options.arrows){var that=this;this.$fwd=$('
    ').addClass('ms-thumblist-fwd').appendTo(this.$element).click(function(){that.controller.push(-15)});this.$bwd=$('
    ').addClass('ms-thumblist-bwd').appendTo(this.$element).click(function(){that.controller.push(15)})} if(!this.options.insetTo&&this.options.align){var align=this.options.align;if(this.options.inset){this.$element.css(align,this.options.margin)}else if(align==='top'){this.$element.detach().prependTo(this.slider.$element).css({'margin-bottom':this.options.margin,'position':'relative'})}else if(align==='bottom'){this.$element.css({'margin-top':this.options.margin,'position':'relative'})}else{this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this);this.align()} if(this.options.dir==='v'){this.$element.width(this.options.width)}else{this.$element.height(this.options.height)}} this.checkHideUnder()};p.align=function(event){if(this.detached){return} var align=this.options.align;var pos=this.slider.reserveSpace(align,this.options[this.__alignsize]+this.options.margin*2);this.$element.css(align,-pos-this.options[this.__alignsize]-this.options.margin)};p.slideAction=function(slide){var thumb_ele=slide.$element.find('.ms-thumb');var that=this;var thumb_frame=$('
    ').addClass('ms-thumb-frame').append(thumb_ele).append($('
    ')).bind(this.options.hover?'hover':'click',function(){that.changeSlide(thumb_frame)});if(this.options.align){thumb_frame.width(this.options.width-(this.options.dir==='v'&&this.options.type==='tabs'?12:0)).height(this.options.height).css('margin-'+(this.options.dir==='v'?'bottom':'right'),this.options.space)} thumb_frame[0].index=this.index_count++;this.$thumbscont.append(thumb_frame);if(this.options.fillMode&&thumb_ele.is('img')){var aligner=new window.MSAligner(this.options.fillMode,thumb_frame,thumb_ele);thumb_ele[0].aligner=aligner;thumb_ele.one('load',function(e){var $this=$(this);$this[0].aligner.init($this.width(),$this.height());$this[0].aligner.align()}).each($.jqLoadFix)} if($.browser.msie) thumb_ele.on('dragstart',function(event){event.preventDefault()});this.thumbs.push(thumb_frame)};p.create=function(){_super.create.call(this);this.__translate_end=window._css3d?' translateZ(0px)':'';this.controller=new Controller(0,0,{snappingMinSpeed:2,friction:(100-this.options.speed*0.5)/100});this.controller.renderCallback(this.options.dir==='h'?this._hMove:this._vMove,this);var that=this;this.resize_listener=function(){that.__resize()};$(window).bind('resize',this.resize_listener);this.thumbSize=this.thumbs[0][this.__jdimen](!0);this.setupSwipe();this.__resize();var that=this;if(this.options.wheel){this.wheellistener=function(event){var e=window.event||event.orginalEvent||event;var delta=Math.max(-1,Math.min(1,(e.wheelDelta||-e.detail)));that.controller.push(-delta*10);return!1};if($.browser.mozilla)this.$element[0].addEventListener('DOMMouseScroll',this.wheellistener);else this.$element.bind('mousewheel',this.wheellistener)} this.slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.update,this);this.slider.api.addEventListener(MSSliderEvent.HARD_UPDATE,this.realignThumbs,this);this.cindex=this.slider.api.index();this.select(this.thumbs[this.cindex])};p._hMove=function(controller,value){this.__contPos=value;if(window._cssanim){this.$thumbscont[0].style[window._jcsspfx+'Transform']='translateX('+-value+'px)'+this.__translate_end;return} this.$thumbscont[0].style.left=-value+'px'};p._vMove=function(controller,value){this.__contPos=value;if(window._cssanim){this.$thumbscont[0].style[window._jcsspfx+'Transform']='translateY('+-value+'px)'+this.__translate_end;return} this.$thumbscont[0].style.top=-value+'px'};p.setupSwipe=function(){this.swipeControl=new averta.TouchSwipe(this.$element);this.swipeControl.swipeType=this.options.dir==='h'?'horizontal':'vertical';var that=this;if(this.options.dir==='h') this.swipeControl.onSwipe=function(status){that.horizSwipeMove(status)};else this.swipeControl.onSwipe=function(status){that.vertSwipeMove(status)}};p.vertSwipeMove=function(status){if(this.dTouch)return;var phase=status.phase;if(phase==='start') this.controller.stop();else if(phase==='move') this.controller.drag(status.moveY);else if(phase==='end'||phase==='cancel'){var speed=Math.abs(status.distanceY/status.duration*50/3);if(speed>0.1){this.controller.push(-status.distanceY/status.duration*50/3)}else{this.click_enable=!0;this.controller.cancel()}}};p.horizSwipeMove=function(status){if(this.dTouch)return;var phase=status.phase;if(phase==='start'){this.controller.stop();this.click_enable=!1}else if(phase==='move') this.controller.drag(status.moveX);else if(phase==='end'||phase==='cancel'){var speed=Math.abs(status.distanceX/status.duration*50/3);if(speed>0.1){this.controller.push(-status.distanceX/status.duration*50/3)}else{this.click_enable=!0;this.controller.cancel()}}};p.update=function(){var nindex=this.slider.api.index();if(this.cindex===nindex)return;if(this.cindex!=null)this.unselect(this.thumbs[this.cindex]);this.cindex=nindex;this.select(this.thumbs[this.cindex]);if(!this.dTouch)this.updateThumbscroll()};p.realignThumbs=function(){this.$element.find('.ms-thumb').each(function(index,thumb){if(thumb.aligner){thumb.aligner.align()}})};p.updateThumbscroll=function(){var thumb_size;var pos=this.thumbSize*this.cindex;if(this.controller.value==NaN)this.controller.value=0;if(pos-this.controller.value<0){this.controller.gotoSnap(this.cindex,!0);return} if(pos+this.thumbSize-this.controller.value>this.$element[this.__dimen]()){var first_snap=this.cindex-Math.floor(this.$element[this.__dimen]()/this.thumbSize)+1;this.controller.gotoSnap(first_snap,!0);return}};p.changeSlide=function(thumb){if(!this.click_enable||this.cindex===thumb[0].index)return;this.slider.api.gotoSlide(thumb[0].index)};p.unselect=function(ele){ele.removeClass('ms-thumb-frame-selected')};p.select=function(ele){ele.addClass('ms-thumb-frame-selected')};p.__resize=function(){var size=this.$element[this.__dimen]();if(this.ls===size)return;this.ls=size;this.thumbSize=this.thumbs[0][this.__jdimen](!0);var len=this.slider.api.count()*this.thumbSize;this.$thumbscont[0].style[this.__dimen]=len+'px';if(len<=size){this.dTouch=!0;this.controller.stop();this.$thumbscont[0].style[this.__pos]=(size-len)*.5+'px';this.$thumbscont[0].style[window._jcsspfx+'Transform']=''}else{this.dTouch=!1;this.click_enable=!0;this.$thumbscont[0].style[this.__pos]='';this.controller._max_value=len-size;this.controller.options.snapsize=this.thumbSize;this.updateThumbscroll()}};p.destroy=function(){_super.destroy();if(this.options.wheel){if($.browser.mozilla)this.$element[0].removeEventListener('DOMMouseScroll',this.wheellistener);else this.$element.unbind('mousewheel',this.wheellistener);this.wheellistener=null} $(window).unbind('resize',this.resize_listener);this.$element.remove();this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this);this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.update,this)};window.MSThumblist=MSThumblist;MSSlideController.registerControl('thumblist',MSThumblist)})(jQuery);(function($){"use strict";var MSBulltes=function(options){BaseControl.call(this);this.options.dir='h';this.options.inset=!0;this.options.margin=10;this.options.space=10;$.extend(this.options,options);this.bullets=[]};MSBulltes.extend(BaseControl);var p=MSBulltes.prototype;var _super=BaseControl.prototype;p.setup=function(){_super.setup.call(this);this.$element=$('
    ').addClass(this.options.prefix+'bullets').addClass('ms-dir-'+this.options.dir).appendTo(this.cont);this.$bullet_cont=$('
    ').addClass('ms-bullets-count').appendTo(this.$element);if(!this.options.insetTo&&this.options.align){var align=this.options.align;if(this.options.inset){this.$element.css(align,this.options.margin)}} this.checkHideUnder()};p.create=function(){_super.create.call(this);var that=this;this.slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.update,this);this.cindex=this.slider.api.index();for(var i=0;i').addClass('ms-bullet');bullet[0].index=i;bullet.on('click',function(){that.changeSlide(this.index)});this.$bullet_cont.append(bullet);this.bullets.push(bullet);if(this.options.dir==='h'){bullet.css('margin',this.options.space/2)}else{bullet.css('margin',this.options.space)}} if(this.options.dir==='h'){this.$element.width(bullet.outerWidth(!0)*this.slider.api.count())}else{this.$element.css('margin-top',-this.$element.outerHeight(!0)/2)} this.select(this.bullets[this.cindex])};p.update=function(){var nindex=this.slider.api.index();if(this.cindex===nindex)return;if(this.cindex!=null)this.unselect(this.bullets[this.cindex]);this.cindex=nindex;this.select(this.bullets[this.cindex])};p.changeSlide=function(index){if(this.cindex===index)return;this.slider.api.gotoSlide(index)};p.unselect=function(ele){ele.removeClass('ms-bullet-selected')};p.select=function(ele){ele.addClass('ms-bullet-selected')};p.destroy=function(){_super.destroy();this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.update,this);this.$element.remove()};window.MSBulltes=MSBulltes;MSSlideController.registerControl('bullets',MSBulltes)})(jQuery);(function($){"use strict";var MSScrollbar=function(options){BaseControl.call(this);this.options.dir='h';this.options.autohide=!0;this.options.width=4;this.options.color='#3D3D3D';this.options.margin=10;$.extend(this.options,options);this.__dimen=this.options.dir==='h'?'width':'height';this.__jdimen=this.options.dir==='h'?'outerWidth':'outerHeight';this.__pos=this.options.dir==='h'?'left':'top';this.__translate_end=window._css3d?' translateZ(0px)':'';this.__translate_start=this.options.dir==='h'?' translateX(':'translateY('};MSScrollbar.extend(BaseControl);var p=MSScrollbar.prototype;var _super=BaseControl.prototype;p.setup=function(){this.$element=$('
    ').addClass(this.options.prefix+'sbar').addClass('ms-dir-'+this.options.dir);_super.setup.call(this);if(this.slider.$controlsCont===this.cont){this.$element.appendTo(this.slider.$element)}else{this.$element.appendTo(this.cont)} this.$bar=$('
    ').addClass(this.options.prefix+'bar').appendTo(this.$element);if(this.slider.options.loop){console.log('WARNING, MSScrollbar cannot work with looped slider.');this.disable=!0;this.$element.remove()} if(this.options.dir==='v'){this.$bar.width(this.options.width)}else{this.$bar.height(this.options.width)} this.$bar.css('background-color',this.options.color);if(!this.options.insetTo&&this.options.align){if(this.options.dir==='v'){this.$element.css({right:'auto',left:'auto'})}else{this.$element.css({top:'auto',bottom:'auto'})} var align=this.options.align;if(this.options.inset){this.$element.css(align,this.options.margin)}else if(align==='top'){this.$element.prependTo(this.slider.$element).css({'margin-bottom':this.options.margin,'position':'relative'})}else if(align==='bottom'){this.$element.css({'margin-top':this.options.margin,'position':'relative'})}else{this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this);this.align()}} this.checkHideUnder()};p.align=function(event){if(this.detached){return} var align=this.options.align;var pos=this.slider.reserveSpace(align,this.options.margin*2+this.options.width);this.$element.css(align,-pos-this.options.margin-this.options.width)};p.create=function(){if(this.disable)return;var that=this;this.scroller=this.slider.api.scroller;this.slider.api.view.addEventListener(MSViewEvents.SCROLL,this._update,this);this.slider.api.addEventListener(MSSliderEvent.RESIZE,this._resize,this);this._resize();if(this.options.autohide){this.$bar.css('opacity','0')}};p._resize=function(){this.vdimen=this.$element[this.__dimen]();this.bar_dimen=this.slider.api.view['__'+this.__dimen]*this.vdimen/this.scroller._max_value;this.$bar[this.__dimen](this.bar_dimen)};p._update=function(){var value=this.scroller.value*(this.vdimen-this.bar_dimen)/this.scroller._max_value;if(this.lvalue===value)return;this.lvalue=value;if(this.options.autohide){clearTimeout(this.hto);this.$bar.css('opacity','1');var that=this;this.hto=setTimeout(function(){that.$bar.css('opacity','0')},150)} if(value<0){this.$bar[0].style[this.__dimen]=this.bar_dimen+value+'px';return} if(value>this.vdimen-this.bar_dimen) this.$bar[0].style[this.__dimen]=this.vdimen-value+'px';if(window._cssanim){this.$bar[0].style[window._jcsspfx+'Transform']=this.__translate_start+value+'px)'+this.__translate_end;return} this.$bar[0].style[this.__pos]=value+'px'};p.destroy=function(){_super.destroy();this.slider.api.view.removeEventListener(MSViewEvents.SCROLL,this._update,this);this.slider.api.removeEventListener(MSSliderEvent.RESIZE,this._resize,this);this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this);this.$element.remove()};window.MSScrollbar=MSScrollbar;MSSlideController.registerControl('scrollbar',MSScrollbar)})(jQuery);(function($){"use strict";var MSTimerbar=function(options){BaseControl.call(this);this.options.autohide=!1;this.options.width=4;this.options.color='#FFFFFF';this.options.inset=!0;this.options.margin=0;$.extend(this.options,options)};MSTimerbar.extend(BaseControl);var p=MSTimerbar.prototype;var _super=BaseControl.prototype;p.setup=function(){var that=this;_super.setup.call(this);this.$element=$('
    ').addClass(this.options.prefix+'timerbar');_super.setup.call(this);if(this.slider.$controlsCont===this.cont){this.$element.appendTo(this.slider.$element)}else{this.$element.appendTo(this.cont)} this.$bar=$('
    ').addClass('ms-time-bar').appendTo(this.$element);if(this.options.dir==='v'){this.$bar.width(this.options.width);this.$element.width(this.options.width)}else{this.$bar.height(this.options.width);this.$element.height(this.options.width)} this.$bar.css('background-color',this.options.color);if(!this.options.insetTo&&this.options.align){this.$element.css({top:'auto',bottom:'auto'});var align=this.options.align;if(this.options.inset){this.$element.css(align,this.options.margin)}else if(align==='top'){this.$element.prependTo(this.slider.$element).css({'margin-bottom':this.options.margin,'position':'relative'})}else if(align==='bottom'){this.$element.css({'margin-top':this.options.margin,'position':'relative'})}else{this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this);this.align()}} this.checkHideUnder()};p.align=function(event){if(this.detached){return} var align=this.options.align;var pos=this.slider.reserveSpace(align,this.options.margin*2+this.options.width);this.$element.css(align,-pos-this.options.margin-this.options.width)};p.create=function(){_super.create.call(this);this.slider.api.addEventListener(MSSliderEvent.WAITING,this._update,this);this._update()};p._update=function(){this.$bar[0].style.width=this.slider.api._delayProgress+'%'};p.destroy=function(){_super.destroy();this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this);this.slider.api.removeEventListener(MSSliderEvent.WAITING,this._update,this);this.$element.remove()};window.MSTimerbar=MSTimerbar;MSSlideController.registerControl('timebar',MSTimerbar)})(jQuery);(function($){"use strict";var MSCircleTimer=function(options){BaseControl.call(this);this.options.color='#A2A2A2';this.options.stroke=10;this.options.radius=4;this.options.autohide=!1;$.extend(this.options,options)};MSCircleTimer.extend(BaseControl);var p=MSCircleTimer.prototype;var _super=BaseControl.prototype;p.setup=function(){var that=this;_super.setup.call(this);this.$element=$('
    ').addClass(this.options.prefix+'ctimer').appendTo(this.cont);this.$canvas=$('').addClass('ms-ctimer-canvas').appendTo(this.$element);this.$bar=$('
    ').addClass('ms-ctimer-bullet').appendTo(this.$element);if(!this.$canvas[0].getContext){this.destroy();this.disable=!0;return} this.ctx=this.$canvas[0].getContext('2d');this.prog=0;this.__w=(this.options.radius+this.options.stroke/2)*2;this.$canvas[0].width=this.__w;this.$canvas[0].height=this.__w;this.checkHideUnder()};p.create=function(){if(this.disable)return;_super.create.call(this);this.slider.api.addEventListener(MSSliderEvent.WAITING,this._update,this);var that=this;this.$element.click(function(){if(that.slider.api.paused) that.slider.api.resume();else that.slider.api.pause()});this._update()};p._update=function(){var that=this;$(this).stop(!0).animate({prog:this.slider.api._delayProgress*0.01},{duration:200,step:function(){that._draw()}})};p._draw=function(){this.ctx.clearRect(0,0,this.__w,this.__w);this.ctx.beginPath();this.ctx.arc(this.__w*.5,this.__w*.5,this.options.radius,Math.PI*1.5,Math.PI*1.5+2*Math.PI*this.prog,!1);this.ctx.strokeStyle=this.options.color;this.ctx.lineWidth=this.options.stroke;this.ctx.stroke()};p.destroy=function(){_super.destroy();if(this.disable)return;$(this).stop(!0);this.slider.api.removeEventListener(MSSliderEvent.WAITING,this._update,this);this.$element.remove()};window.MSCircleTimer=MSCircleTimer;MSSlideController.registerControl('circletimer',MSCircleTimer)})(jQuery);(function($){"use strict";window.MSLightbox=function(options){BaseControl.call(this,options);this.options.autohide=!1;$.extend(this.options,options);this.data_list=[]};MSLightbox.fadeDuratation=400;MSLightbox.extend(BaseControl);var p=MSLightbox.prototype;var _super=BaseControl.prototype;p.setup=function(){_super.setup.call(this);this.$element=$('
    ').addClass(this.options.prefix+'lightbox-btn').appendTo(this.cont);this.checkHideUnder()};p.slideAction=function(slide){$('
    ').addClass(this.options.prefix+'lightbox-btn').appendTo(slide.$element).append($(slide.$element.find('.ms-lightbox')))};p.create=function(){_super.create.call(this)};MSSlideController.registerControl('lightbox',MSLightbox)})(jQuery);(function($){"use strict";window.MSSlideInfo=function(options){BaseControl.call(this,options);this.options.autohide=!1;this.options.align=null;this.options.inset=!1;this.options.margin=10;this.options.size=100;this.options.dir='h';$.extend(this.options,options);this.data_list=[]};MSSlideInfo.fadeDuratation=400;MSSlideInfo.extend(BaseControl);var p=MSSlideInfo.prototype;var _super=BaseControl.prototype;p.setup=function(){this.$element=$('
    ').addClass(this.options.prefix+'slide-info').addClass('ms-dir-'+this.options.dir);_super.setup.call(this);if(this.slider.$controlsCont===this.cont){this.$element.appendTo(this.slider.$element)}else{this.$element.appendTo(this.cont)} if(!this.options.insetTo&&this.options.align){var align=this.options.align;if(this.options.inset){this.$element.css(align,this.options.margin)}else if(align==='top'){this.$element.prependTo(this.slider.$element).css({'margin-bottom':this.options.margin,'position':'relative'})}else if(align==='bottom'){this.$element.css({'margin-top':this.options.margin,'position':'relative'})}else{this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this);this.align()} if(this.options.dir==='v'){this.$element.width(this.options.size)}else{this.$element.css('min-height',this.options.size)}} this.checkHideUnder()};p.align=function(event){if(this.detached){return} var align=this.options.align;var pos=this.slider.reserveSpace(align,this.options.size+this.options.margin*2);this.$element.css(align,-pos-this.options.size-this.options.margin)};p.slideAction=function(slide){var info_ele=$(slide.$element.find('.ms-info'));var that=this;info_ele.detach();this.data_list[slide.index]=info_ele};p.create=function(){_super.create.call(this);this.slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.update,this);this.cindex=this.slider.api.index();this.switchEle(this.data_list[this.cindex])};p.update=function(){var nindex=this.slider.api.index();this.switchEle(this.data_list[nindex]);this.cindex=nindex};p.switchEle=function(ele){if(this.current_ele){var that=this;if(this.current_ele[0].tween)this.current_ele[0].tween.stop(!0);this.current_ele[0].tween=CTween.animate(this.current_ele,MSSlideInfo.fadeDuratation,{opacity:0},{complete:function(){this.detach();this[0].tween=null;ele.css('position','relative')},target:this.current_ele});ele.css('position','absolute')} this.__show(ele)};p.__show=function(ele){ele.appendTo(this.$element).css('opacity','0');if(this.current_ele){ele.height(Math.max(ele.height(),this.current_ele.height()))} clearTimeout(this.tou);this.tou=setTimeout(function(){CTween.fadeIn(ele,MSSlideInfo.fadeDuratation);ele.css('height','')},MSSlideInfo.fadeDuratation);if(ele[0].tween)ele[0].tween.stop(!0);this.current_ele=ele};p.destroy=function(){_super.destroy();clearTimeout(this.tou);if(this.current_ele&&this.current_ele[0].tween){this.current_ele[0].tween.stop('true')} this.$element.remove();this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this);this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.update,this)};MSSlideController.registerControl('slideinfo',MSSlideInfo)})(jQuery);(function($){window.MSGallery=function(id,slider){this.id=id;this.slider=slider;this.telement=$('#'+id);this.botcont=$('
    ').addClass('ms-gallery-botcont').appendTo(this.telement);this.thumbcont=$('
    ').addClass('ms-gal-thumbcont hide-thumbs').appendTo(this.botcont);this.playbtn=$('
    ').addClass('ms-gal-playbtn').appendTo(this.botcont);this.thumbtoggle=$('
    ').addClass('ms-gal-thumbtoggle').appendTo(this.botcont);slider.control('thumblist',{insertTo:this.thumbcont,autohide:!1,dir:'h'});slider.control('slidenum',{insertTo:this.botcont,autohide:!1});slider.control('slideinfo',{insertTo:this.botcont,autohide:!1});slider.control('timebar',{insertTo:this.botcont,autohide:!1});slider.control('bullets',{insertTo:this.botcont,autohide:!1})};var p=MSGallery.prototype;p._init=function(){var that=this;if(!this.slider.api.paused) this.playbtn.addClass('btn-pause');this.playbtn.click(function(){if(that.slider.api.paused){that.slider.api.resume();that.playbtn.addClass('btn-pause')}else{that.slider.api.pause();that.playbtn.removeClass('btn-pause')}});this.thumbtoggle.click(function(){if(that.vthumbs){that.thumbtoggle.removeClass('btn-hide');that.vthumbs=!1;that.thumbcont.addClass('hide-thumbs')}else{that.thumbtoggle.addClass('btn-hide');that.thumbcont.removeClass('hide-thumbs');that.vthumbs=!0}})};p.setup=function(){var that=this;$(document).ready(function(){that._init()})}})(jQuery);(function($){var getPhotosetURL=function(key,id,count){return'https://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key='+key+'&photoset_id='+id+'&per_page='+count+'&extras=url_o,description,date_taken,owner_name,views&format=json&jsoncallback=?'};var getUserPublicURL=function(key,id,count){return'https://api.flickr.com/services/rest/?&method=flickr.people.getPublicPhotos&api_key='+key+'&user_id='+id+'&per_page='+count+'&extras=url_o,description,date_taken,owner_name,views&format=json&jsoncallback=?'};var getImageSource=function(fid,server,id,secret,size,data){if(size==='_o'&&data){return data.url_o} return'https://farm'+fid+'.staticflickr.com/'+server+'/'+id+'_'+secret+size+'.jpg'};window.MSFlickrV2=function(slider,options){var _options={count:10,type:'photoset',thumbSize:'q',imgSize:'c'};this.slider=slider;this.slider.holdOn();if(!options.key){this.errMsg('Flickr API Key required. Please add it in settings.');return} $.extend(_options,options);this.options=_options;var that=this;if(this.options.type==='photoset'){$.getJSON(getPhotosetURL(this.options.key,this.options.id,this.options.count),function(data){that._photosData(data)})}else{$.getJSON(getUserPublicURL(this.options.key,this.options.id,this.options.count),function(data){that.options.type='photos';that._photosData(data)})} if(this.options.imgSize!==''&&this.options.imgSize!=='-') this.options.imgSize='_'+this.options.imgSize;this.options.thumbSize='_'+this.options.thumbSize;this.slideTemplate=this.slider.$element.find('.ms-slide')[0].outerHTML;this.slider.$element.find('.ms-slide').remove()};var p=MSFlickrV2.prototype;p._photosData=function(data){if(data.stat==='fail'){this.errMsg('Flickr API ERROR#'+data.code+': '+data.message);return} var that=this;var getInfo=this.options.author||this.options.desc;$.each(data[this.options.type].photo,function(i,item){var slide_cont=that.slideTemplate.replace(/{{[\w-]+}}/g,function(match){match=match.replace(/{{|}}/g,'');if(shortCodes[match]){return shortCodes[match](item,that)}else{return'['+match+']'}});$(slide_cont).appendTo(that.slider.$element)});that._initSlider()};p.errMsg=function(msg){this.slider.$element.css('display','block');if(!this.errEle) this.errEle=$('
    ').appendTo(this.slider.$loading);this.errEle.html(msg)};p._initSlider=function(){this.slider.release()};var shortCodes={'image':function(data,that){return getImageSource(data.farm,data.server,data.id,data.secret,that.options.imgSize,data)},'thumb':function(data,that){return getImageSource(data.farm,data.server,data.id,data.secret,that.options.thumbSize)},'title':function(data,that){return data.title},'owner-name':function(data,that){return data.ownername},'date-taken':function(data,that){return data.datetaken},'views':function(data,that){return data.views},'description':function(data,that){return data.description._content}}})(jQuery);(function($){window.MSFacebookGallery=function(slider,options){var _options={count:10,type:'photostream',thumbSize:'320',imgSize:'orginal',https:!1};this.slider=slider;this.slider.holdOn();$.extend(_options,options);this.options=_options;this.graph=this.options.https?'https://graph.facebook.com':'http://graph.facebook.com';var that=this;if(this.options.type==='photostream'){$.getJSON(this.graph+'/'+this.options.username+'/photos/uploaded/?fields=source,name,link,images,from&limit='+this.options.count,function(data){that._photosData(data)})}else{$.getJSON(this.graph+'/'+this.options.albumId+'/photos?fields=source,name,link,images,from&limit='+this.options.count,function(data){that._photosData(data)})} this.slideTemplate=this.slider.$element.find('.ms-slide')[0].outerHTML;this.slider.$element.find('.ms-slide').remove()};var p=MSFacebookGallery.prototype;p._photosData=function(content){if(content.error){this.errMsg('Facebook API ERROR#'+content.error.code+'('+content.error.type+')'+': '+content.error.message);return} var that=this;var getInfo=this.options.author||this.options.desc;for(var i=0,l=content.data.length;i!==l;i++){var slide_cont=that.slideTemplate.replace(/{{[\w-]+}}/g,function(match){match=match.replace(/{{|}}/g,'');if(shortCodes[match]){return shortCodes[match](content.data[i],that)}else{return'{{'+match+'}}'}});$(slide_cont).appendTo(that.slider.$element)} that._initSlider()};p.errMsg=function(msg){this.slider.$element.css('display','block');if(!this.errEle) this.errEle=$('
    ').appendTo(this.slider.$loading);this.errEle.html(msg)};p._initSlider=function(){this.slider.release()};var getImageSource=function(images,size){if(size==='orginal'){return images[0].source} for(var i=0,l=images.length;i!==l;i++){if(images[i].source.indexOf(size+'x'+size)!==-1) return images[i].source} return images[l-3].source};var shortCodes={'image':function(data,that){return getImageSource(data.images,that.options.imgSize)},'thumb':function(data,that){return getImageSource(data.images,that.options.thumbSize)},'name':function(data,that){return data.name},'owner-name':function(data,that){return data.from.name},'link':function(data,that){return data.link}}})(jQuery);(function($){'use strict';window.MSScrollParallax=function(slider,parallax,bgparallax,fade){this.fade=fade;this.slider=slider;this.parallax=parallax/100;this.bgparallax=bgparallax/100;slider.api.addEventListener(MSSliderEvent.INIT,this.init,this);slider.api.addEventListener(MSSliderEvent.DESTROY,this.destory,this);slider.api.addEventListener(MSSliderEvent.CHANGE_END,this.resetLayers,this);slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.updateCurrentSlide,this)};window.MSScrollParallax.setup=function(slider,parallax,bgparallax,fade){if(window._mobile){return} if(parallax==null){parallax=50} if(bgparallax==null){bgparallax=40} return new MSScrollParallax(slider,parallax,bgparallax,fade)};var p=window.MSScrollParallax.prototype;p.init=function(e){this.slider.$element.addClass('ms-scroll-parallax');this.sliderOffset=this.slider.$element.offset().top;this.updateCurrentSlide();var slides=this.slider.api.view.slideList,slide;for(var i=0,l=slides.length;i!==l;i++){slide=slides[i];if(slide.$layers){slide.$layers.wrap('
    ');slide.$scrollParallaxCont=slide.$layers.parent()}} $(window).on('scroll',{that:this},this.moveParallax).trigger('scroll')};p.resetLayers=function(e){if(!this.lastSlide){return} var layers=this.lastSlide.$scrollParallaxCont;if(window._css2d){if(layers){layers[0].style[window._jcsspfx+'Transform']=''} if(this.lastSlide.hasBG){this.lastSlide.$imgcont[0].style[window._jcsspfx+'Transform']=''}}else{if(layers){layers[0].style.top=''} if(this.lastSlide.hasBG){this.lastSlide.$imgcont[0].style.top='0px'}}};p.updateCurrentSlide=function(e){this.lastSlide=this.currentSlide;this.currentSlide=this.slider.api.currentSlide;this.moveParallax({data:{that:this}})};p.moveParallax=function(e){var that=e.data.that,slider=that.slider,offset=that.sliderOffset,scrollTop=$(window).scrollTop(),layers=that.currentSlide.$scrollParallaxCont,out=offset-scrollTop;if(out<=0){if(layers){if(window._css3d){layers[0].style[window._jcsspfx+'Transform']='translateY('+-out*that.parallax+'px) translateZ(0.4px)'}else if(window._css2d){layers[0].style[window._jcsspfx+'Transform']='translateY('+-out*that.parallax+'px)'}else{layers[0].style.top=-out*that.parallax+'px'}} that.updateSlidesBG(-out*that.bgparallax+'px',!0);if(layers&&that.fade){layers.css('opacity',(1-Math.min(1,-out/slider.api.height)))}}else{if(layers){if(window._css2d){layers[0].style[window._jcsspfx+'Transform']=''}else{layers[0].style.top=''}} that.updateSlidesBG('0px',!1);if(layers&&that.fade){layers.css('opacity',1)}}};p.updateSlidesBG=function(pos,fixed){var slides=this.slider.api.view.slideList,position=(fixed&&!$.browser.msie&&!$.browser.opera?'fixed':'');for(var i=0,l=slides.length;i!==l;i++){if(slides[i].hasBG){slides[i].$imgcont[0].style.position=position;slides[i].$imgcont[0].style.top=pos} if(slides[i].$bgvideocont){slides[i].$bgvideocont[0].style.position=position;slides[i].$bgvideocont[0].style.top=pos}}};p.destory=function(){slider.api.removeEventListener(MSSliderEvent.INIT,this.init,this);slider.api.removeEventListener(MSSliderEvent.DESTROY,this.destory,this);slider.api.removeEventListener(MSSliderEvent.CHANGE_END,this.resetLayers,this);slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.updateCurrentSlide,this);$(window).off('scroll',this.moveParallax)}})(jQuery);(function($,document,window){var PId=0;if(!window.MasterSlider){return} var KeyboardNav=function(slider){this.slider=slider;this.PId=PId++;if(this.slider.options.keyboard){slider.api.addEventListener(MSSliderEvent.INIT,this.init,this)}};KeyboardNav.name='MSKeyboardNav';var p=KeyboardNav.prototype;p.init=function(){var api=this.slider.api;$(document).on('keydown.kbnav'+this.PId,function(event){var which=event.which;if(which===37||which===40){api.previous(!0)}else if(which===38||which===39){api.next(!0)}})};p.destroy=function(){$(document).off('keydown.kbnav'+this.PId);this.slider.api.removeEventListener(MSSliderEvent.INIT,this.init,this)};MasterSlider.registerPlugin(KeyboardNav)})(jQuery,document,window);(function($,document,window){var PId=0,$window=$(window),$doc=$(document);if(!window.MasterSlider){return} var StartOnAppear=function(slider){this.PId=PId++;this.slider=slider;this.$slider=slider.$element;if(this.slider.options.startOnAppear){slider.holdOn();$doc.ready($.proxy(this.init,this))}};StartOnAppear.name='MSStartOnAppear';var p=StartOnAppear.prototype;p.init=function(){var api=this.slider.api;$window.on('scroll.soa'+this.PId,$.proxy(this._onScroll,this)).trigger('scroll')};p._onScroll=function(){var vpBottom=$window.scrollTop()+$window.height(),top=this.$slider.offset().top;if(top2&&arguments[2]!==undefined?arguments[2]:0;return keys(object).reduce(function(accum,key){return fn(accum,object[key],key)},initial)} function assign(target){for(var _len=arguments.length,sources=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){sources[_key-1]=arguments[_key]} if(Object.assign){return Object.assign.apply(Object,[target].concat(sources))} sources.forEach(function(source){if(!source){return} each(source,function(value,key){target[key]=value})});return target} function isObject(value){return!!value&&(typeof value==='undefined'?'undefined':_typeof(value))==='object'} function isPlain(value){return isObject(value)&&toString.call(value)==='[object Object]'&&value.constructor===Object} var log=void 0;var level='all';var history=[];var logByType=function logByType(type,args){var stringify=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!!IE_VERSION&&IE_VERSION<11;var lvl=log.levels[level];var lvlRegExp=new RegExp('^('+lvl+')$');if(type!=='log'){args.unshift(type.toUpperCase()+':')} if(history){history.push([].concat(args))} args.unshift('VIDEOJS:');var fn=window_1.console&&window_1.console[type];if(!fn||!lvl||!lvlRegExp.test(type)){return} if(stringify){args=args.map(function(a){if(isObject(a)||Array.isArray(a)){try{return JSON.stringify(a)}catch(x){return String(a)}} return String(a)}).join(' ')} if(!fn.apply){fn(args)}else{fn[Array.isArray(args)?'apply':'call'](window_1.console,args)}};log=function log(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]} logByType('log',args)};log.levels={all:'log|warn|error',error:'error',off:'',warn:'warn|error',DEFAULT:level};log.level=function(lvl){if(typeof lvl==='string'){if(!log.levels.hasOwnProperty(lvl)){throw new Error('"'+lvl+'" in not a valid log level')} level=lvl} return level};log.history=function(){return history?[].concat(history):[]};log.history.clear=function(){if(history){history.length=0}};log.history.disable=function(){if(history!==null){history.length=0;history=null}};log.history.enable=function(){if(history===null){history=[]}};log.error=function(){for(var _len2=arguments.length,args=Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2]} return logByType('error',args)};log.warn=function(){for(var _len3=arguments.length,args=Array(_len3),_key3=0;_key3<_len3;_key3++){args[_key3]=arguments[_key3]} return logByType('warn',args)};var log$1=log;function clean(s){return s.replace(/\n\r?\s*/g,'')} var tsml=function tsml(sa){var s='',i=0;for(;i0&&arguments[0]!==undefined?arguments[0]:'div';var properties=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var attributes=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var content=arguments[3];var el=document_1.createElement(tagName);Object.getOwnPropertyNames(properties).forEach(function(propName){var val=properties[propName];if(propName.indexOf('aria-')!==-1||propName==='role'||propName==='type'){log$1.warn(tsml(_templateObject,propName,val));el.setAttribute(propName,val)}else if(propName==='textContent'){textContent(el,val)}else{el[propName]=val}});Object.getOwnPropertyNames(attributes).forEach(function(attrName){el.setAttribute(attrName,attributes[attrName])});if(content){appendContent(el,content)} return el} function textContent(el,text){if(typeof el.textContent==='undefined'){el.innerText=text}else{el.textContent=text} return el} function prependTo(child,parent){if(parent.firstChild){parent.insertBefore(child,parent.firstChild)}else{parent.appendChild(child)}} function hasClass(element,classToCheck){throwIfWhitespace(classToCheck);if(element.classList){return element.classList.contains(classToCheck)} return classRegExp(classToCheck).test(element.className)} function addClass(element,classToAdd){if(element.classList){element.classList.add(classToAdd)}else if(!hasClass(element,classToAdd)){element.className=(element.className+' '+classToAdd).trim()} return element} function removeClass(element,classToRemove){if(element.classList){element.classList.remove(classToRemove)}else{throwIfWhitespace(classToRemove);element.className=element.className.split(/\s+/).filter(function(c){return c!==classToRemove}).join(' ')} return element} function toggleClass(element,classToToggle,predicate){var has=hasClass(element,classToToggle);if(typeof predicate==='function'){predicate=predicate(element,classToToggle)} if(typeof predicate!=='boolean'){predicate=!has} if(predicate===has){return} if(predicate){addClass(element,classToToggle)}else{removeClass(element,classToToggle)} return element} function setAttributes(el,attributes){Object.getOwnPropertyNames(attributes).forEach(function(attrName){var attrValue=attributes[attrName];if(attrValue===null||typeof attrValue==='undefined'||attrValue===!1){el.removeAttribute(attrName)}else{el.setAttribute(attrName,attrValue===!0?'':attrValue)}})} function getAttributes(tag){var obj={};var knownBooleans=','+'autoplay,controls,playsinline,loop,muted,default,defaultMuted'+',';if(tag&&tag.attributes&&tag.attributes.length>0){var attrs=tag.attributes;for(var i=attrs.length-1;i>=0;i--){var attrName=attrs[i].name;var attrVal=attrs[i].value;if(typeof tag[attrName]==='boolean'||knownBooleans.indexOf(','+attrName+',')!==-1){attrVal=attrVal!==null?!0:!1} obj[attrName]=attrVal}} return obj} function getAttribute(el,attribute){return el.getAttribute(attribute)} function setAttribute(el,attribute,value){el.setAttribute(attribute,value)} function removeAttribute(el,attribute){el.removeAttribute(attribute)} function blockTextSelection(){document_1.body.focus();document_1.onselectstart=function(){return!1}} function unblockTextSelection(){document_1.onselectstart=function(){return!0}} function getBoundingClientRect(el){if(el&&el.getBoundingClientRect&&el.parentNode){var rect=el.getBoundingClientRect();var result={};['bottom','height','left','right','top','width'].forEach(function(k){if(rect[k]!==undefined){result[k]=rect[k]}});if(!result.height){result.height=parseFloat(computedStyle(el,'height'))} if(!result.width){result.width=parseFloat(computedStyle(el,'width'))} return result}} function findPosition(el){var box=void 0;if(el.getBoundingClientRect&&el.parentNode){box=el.getBoundingClientRect()} if(!box){return{left:0,top:0}} var docEl=document_1.documentElement;var body=document_1.body;var clientLeft=docEl.clientLeft||body.clientLeft||0;var scrollLeft=window_1.pageXOffset||body.scrollLeft;var left=box.left+scrollLeft-clientLeft;var clientTop=docEl.clientTop||body.clientTop||0;var scrollTop=window_1.pageYOffset||body.scrollTop;var top=box.top+scrollTop-clientTop;return{left:Math.round(left),top:Math.round(top)}} function getPointerPosition(el,event){var position={};var box=findPosition(el);var boxW=el.offsetWidth;var boxH=el.offsetHeight;var boxY=box.top;var boxX=box.left;var pageY=event.pageY;var pageX=event.pageX;if(event.changedTouches){pageX=event.changedTouches[0].pageX;pageY=event.changedTouches[0].pageY} position.y=Math.max(0,Math.min(1,(boxY-pageY+boxH)/boxH));position.x=Math.max(0,Math.min(1,(pageX-boxX)/boxW));return position} function isTextNode(value){return isObject(value)&&value.nodeType===3} function emptyEl(el){while(el.firstChild){el.removeChild(el.firstChild)} return el} function normalizeContent(content){if(typeof content==='function'){content=content()} return(Array.isArray(content)?content:[content]).map(function(value){if(typeof value==='function'){value=value()} if(isEl(value)||isTextNode(value)){return value} if(typeof value==='string'&&/\S/.test(value)){return document_1.createTextNode(value)}}).filter(function(value){return value})} function appendContent(el,content){normalizeContent(content).forEach(function(node){return el.appendChild(node)});return el} function insertContent(el,content){return appendContent(emptyEl(el),content)} function isSingleLeftClick(event){if(event.button===undefined&&event.buttons===undefined){return!0} if(event.button===0&&event.buttons===undefined){return!0} if(IE_VERSION===9){return!0} if(event.button!==0||event.buttons!==1){return!1} return!0} var $=createQuerier('querySelector');var $$=createQuerier('querySelectorAll');var Dom=(Object.freeze||Object)({isReal:isReal,isEl:isEl,isInFrame:isInFrame,createEl:createEl,textContent:textContent,prependTo:prependTo,hasClass:hasClass,addClass:addClass,removeClass:removeClass,toggleClass:toggleClass,setAttributes:setAttributes,getAttributes:getAttributes,getAttribute:getAttribute,setAttribute:setAttribute,removeAttribute:removeAttribute,blockTextSelection:blockTextSelection,unblockTextSelection:unblockTextSelection,getBoundingClientRect:getBoundingClientRect,findPosition:findPosition,getPointerPosition:getPointerPosition,isTextNode:isTextNode,emptyEl:emptyEl,normalizeContent:normalizeContent,appendContent:appendContent,insertContent:insertContent,isSingleLeftClick:isSingleLeftClick,$:$,$$:$$});var _guid=1;function newGUID(){return _guid++} var elData={};var elIdAttr='vdata'+new Date().getTime();function getData(el){var id=el[elIdAttr];if(!id){id=el[elIdAttr]=newGUID()} if(!elData[id]){elData[id]={}} return elData[id]} function hasData(el){var id=el[elIdAttr];if(!id){return!1} return!!Object.getOwnPropertyNames(elData[id]).length} function removeData(el){var id=el[elIdAttr];if(!id){return} delete elData[id];try{delete el[elIdAttr]}catch(e){if(el.removeAttribute){el.removeAttribute(elIdAttr)}else{el[elIdAttr]=null}}} function _cleanUpEvents(elem,type){var data=getData(elem);if(data.handlers[type].length===0){delete data.handlers[type];if(elem.removeEventListener){elem.removeEventListener(type,data.dispatcher,!1)}else if(elem.detachEvent){elem.detachEvent('on'+type,data.dispatcher)}} if(Object.getOwnPropertyNames(data.handlers).length<=0){delete data.handlers;delete data.dispatcher;delete data.disabled} if(Object.getOwnPropertyNames(data).length===0){removeData(elem)}} function _handleMultipleEvents(fn,elem,types,callback){types.forEach(function(type){fn(elem,type,callback)})} function fixEvent(event){function returnTrue(){return!0} function returnFalse(){return!1} if(!event||!event.isPropagationStopped){var old=event||window_1.event;event={};for(var key in old){if(key!=='layerX'&&key!=='layerY'&&key!=='keyLocation'&&key!=='webkitMovementX'&&key!=='webkitMovementY'){if(!(key==='returnValue'&&old.preventDefault)){event[key]=old[key]}}} if(!event.target){event.target=event.srcElement||document_1} if(!event.relatedTarget){event.relatedTarget=event.fromElement===event.target?event.toElement:event.fromElement} event.preventDefault=function(){if(old.preventDefault){old.preventDefault()} event.returnValue=!1;old.returnValue=!1;event.defaultPrevented=!0};event.defaultPrevented=!1;event.stopPropagation=function(){if(old.stopPropagation){old.stopPropagation()} event.cancelBubble=!0;old.cancelBubble=!0;event.isPropagationStopped=returnTrue};event.isPropagationStopped=returnFalse;event.stopImmediatePropagation=function(){if(old.stopImmediatePropagation){old.stopImmediatePropagation()} event.isImmediatePropagationStopped=returnTrue;event.stopPropagation()};event.isImmediatePropagationStopped=returnFalse;if(event.clientX!==null&&event.clientX!==undefined){var doc=document_1.documentElement;var body=document_1.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)} event.which=event.charCode||event.keyCode;if(event.button!==null&&event.button!==undefined){event.button=event.button&1?0:event.button&4?1:event.button&2?2:0}} return event} var _supportsPassive=!1;(function(){try{var opts=Object.defineProperty({},'passive',{get:function get(){_supportsPassive=!0}});window_1.addEventListener('test',null,opts);window_1.removeEventListener('test',null,opts)}catch(e){}})();var passiveEvents=['touchstart','touchmove'];function on(elem,type,fn){if(Array.isArray(type)){return _handleMultipleEvents(on,elem,type,fn)} var data=getData(elem);if(!data.handlers){data.handlers={}} if(!data.handlers[type]){data.handlers[type]=[]} if(!fn.guid){fn.guid=newGUID()} data.handlers[type].push(fn);if(!data.dispatcher){data.disabled=!1;data.dispatcher=function(event,hash){if(data.disabled){return} event=fixEvent(event);var handlers=data.handlers[event.type];if(handlers){var handlersCopy=handlers.slice(0);for(var m=0,n=handlersCopy.length;m-1){options={passive:!0}} elem.addEventListener(type,data.dispatcher,options)}else if(elem.attachEvent){elem.attachEvent('on'+type,data.dispatcher)}}} function off(elem,type,fn){if(!hasData(elem)){return} var data=getData(elem);if(!data.handlers){return} if(Array.isArray(type)){return _handleMultipleEvents(off,elem,type,fn)} var removeType=function removeType(el,t){data.handlers[t]=[];_cleanUpEvents(el,t)};if(type===undefined){for(var t in data.handlers){if(Object.prototype.hasOwnProperty.call(data.handlers||{},t)){removeType(elem,t)}} return} var handlers=data.handlers[type];if(!handlers){return} if(!fn){removeType(elem,type);return} if(fn.guid){for(var n=0;n0){for(var i=0,e=vids.length;i0){for(var _i=0,_e=audios.length;_i<_e;_i++){mediaEls.push(audios[_i])}} if(divs&&divs.length>0){for(var _i2=0,_e2=divs.length;_i2<_e2;_i2++){mediaEls.push(divs[_i2])}} if(mediaEls&&mediaEls.length>0){for(var _i3=0,_e3=mediaEls.length;_i3<_e3;_i3++){var mediaEl=mediaEls[_i3];if(mediaEl&&mediaEl.getAttribute){if(mediaEl.player===undefined){var options=mediaEl.getAttribute('data-setup');if(options!==null){videojs$2(mediaEl)}}}else{autoSetupTimeout(1);break}}}else if(!_windowLoaded){autoSetupTimeout(1)}};function autoSetupTimeout(wait,vjs){if(vjs){videojs$2=vjs} window_1.setTimeout(autoSetup,wait)} if(isReal()&&document_1.readyState==='complete'){_windowLoaded=!0}else{one(window_1,'load',function(){_windowLoaded=!0})} var createStyleElement=function createStyleElement(className){var style=document_1.createElement('style');style.className=className;return style};var setTextContent=function setTextContent(el,content){if(el.styleSheet){el.styleSheet.cssText=content}else{el.textContent=content}};var bind=function bind(context,fn,uid){if(!fn.guid){fn.guid=newGUID()} var bound=function bound(){return fn.apply(context,arguments)};bound.guid=uid?uid+'_'+fn.guid:fn.guid;return bound};var throttle=function throttle(fn,wait){var last=Date.now();var throttled=function throttled(){var now=Date.now();if(now-last>=wait){fn.apply(undefined,arguments);last=now}};return throttled};var EventTarget=function EventTarget(){};EventTarget.prototype.allowedEvents_={};EventTarget.prototype.on=function(type,fn){var ael=this.addEventListener;this.addEventListener=function(){};on(this,type,fn);this.addEventListener=ael};EventTarget.prototype.addEventListener=EventTarget.prototype.on;EventTarget.prototype.off=function(type,fn){off(this,type,fn)};EventTarget.prototype.removeEventListener=EventTarget.prototype.off;EventTarget.prototype.one=function(type,fn){var ael=this.addEventListener;this.addEventListener=function(){};one(this,type,fn);this.addEventListener=ael};EventTarget.prototype.trigger=function(event){var type=event.type||event;if(typeof event==='string'){event={type:type}} event=fixEvent(event);if(this.allowedEvents_[type]&&this['on'+type]){this['on'+type](event)} trigger(this,event)};EventTarget.prototype.dispatchEvent=EventTarget.prototype.trigger;var isEvented=function isEvented(object){return object instanceof EventTarget||!!object.eventBusEl_&&['on','one','off','trigger'].every(function(k){return typeof object[k]==='function'})};var isValidEventType=function isValidEventType(type){return(typeof type==='string'&&/\S/.test(type)||Array.isArray(type)&&!!type.length)};var validateTarget=function validateTarget(target){if(!target.nodeName&&!isEvented(target)){throw new Error('Invalid target; must be a DOM node or evented object.')}};var validateEventType=function validateEventType(type){if(!isValidEventType(type)){throw new Error('Invalid event type; must be a non-empty string or array.')}};var validateListener=function validateListener(listener){if(typeof listener!=='function'){throw new Error('Invalid listener; must be a function.')}};var normalizeListenArgs=function normalizeListenArgs(self,args){var isTargetingSelf=args.length<3||args[0]===self||args[0]===self.eventBusEl_;var target=void 0;var type=void 0;var listener=void 0;if(isTargetingSelf){target=self.eventBusEl_;if(args.length>=3){args.shift()} type=args[0];listener=args[1]}else{target=args[0];type=args[1];listener=args[2]} validateTarget(target);validateEventType(type);validateListener(listener);listener=bind(self,listener);return{isTargetingSelf:isTargetingSelf,target:target,type:type,listener:listener}};var listen=function listen(target,method,type,listener){validateTarget(target);if(target.nodeName){Events[method](target,type,listener)}else{target[method](type,listener)}};var EventedMixin={on:function on$$1(){var _this=this;for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]} var _normalizeListenArgs=normalizeListenArgs(this,args),isTargetingSelf=_normalizeListenArgs.isTargetingSelf,target=_normalizeListenArgs.target,type=_normalizeListenArgs.type,listener=_normalizeListenArgs.listener;listen(target,'on',type,listener);if(!isTargetingSelf){var removeListenerOnDispose=function removeListenerOnDispose(){return _this.off(target,type,listener)};removeListenerOnDispose.guid=listener.guid;var removeRemoverOnTargetDispose=function removeRemoverOnTargetDispose(){return _this.off('dispose',removeListenerOnDispose)};removeRemoverOnTargetDispose.guid=listener.guid;listen(this,'on','dispose',removeListenerOnDispose);listen(target,'on','dispose',removeRemoverOnTargetDispose)}},one:function one$$1(){var _this2=this;for(var _len2=arguments.length,args=Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2]} var _normalizeListenArgs2=normalizeListenArgs(this,args),isTargetingSelf=_normalizeListenArgs2.isTargetingSelf,target=_normalizeListenArgs2.target,type=_normalizeListenArgs2.type,listener=_normalizeListenArgs2.listener;if(isTargetingSelf){listen(target,'one',type,listener)}else{var wrapper=function wrapper(){for(var _len3=arguments.length,largs=Array(_len3),_key3=0;_key3<_len3;_key3++){largs[_key3]=arguments[_key3]} _this2.off(target,type,wrapper);listener.apply(null,largs)};wrapper.guid=listener.guid;listen(target,'one',type,wrapper)}},off:function off$$1(targetOrType,typeOrListener,listener){if(!targetOrType||isValidEventType(targetOrType)){off(this.eventBusEl_,targetOrType,typeOrListener)}else{var target=targetOrType;var type=typeOrListener;validateTarget(target);validateEventType(type);validateListener(listener);listener=bind(this,listener);this.off('dispose',listener);if(target.nodeName){off(target,type,listener);off(target,'dispose',listener)}else if(isEvented(target)){target.off(type,listener);target.off('dispose',listener)}}},trigger:function trigger$$1(event,hash){return trigger(this.eventBusEl_,event,hash)}};function evented(target){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var eventBusKey=options.eventBusKey;if(eventBusKey){if(!target[eventBusKey].nodeName){throw new Error('The eventBusKey "'+eventBusKey+'" does not refer to an element.')} target.eventBusEl_=target[eventBusKey]}else{target.eventBusEl_=createEl('span',{className:'vjs-event-bus'})} assign(target,EventedMixin);target.on('dispose',function(){target.off();window_1.setTimeout(function(){target.eventBusEl_=null},0)});return target} var StatefulMixin={state:{},setState:function setState(stateUpdates){var _this=this;if(typeof stateUpdates==='function'){stateUpdates=stateUpdates()} var changes=void 0;each(stateUpdates,function(value,key){if(_this.state[key]!==value){changes=changes||{};changes[key]={from:_this.state[key],to:value}} _this.state[key]=value});if(changes&&isEvented(this)){this.trigger({changes:changes,type:'statechanged'})} return changes}};function stateful(target,defaultState){assign(target,StatefulMixin);target.state=assign({},target.state,defaultState);if(typeof target.handleStateChanged==='function'&&isEvented(target)){target.on('statechanged',target.handleStateChanged)} return target} function toTitleCase(string){if(typeof string!=='string'){return string} return string.charAt(0).toUpperCase()+string.slice(1)} function titleCaseEquals(str1,str2){return toTitleCase(str1)===toTitleCase(str2)} function mergeOptions(){var result={};for(var _len=arguments.length,sources=Array(_len),_key=0;_key<_len;_key++){sources[_key]=arguments[_key]} sources.forEach(function(source){if(!source){return} each(source,function(value,key){if(!isPlain(value)){result[key]=value;return} if(!isPlain(result[key])){result[key]={}} result[key]=mergeOptions(result[key],value)})});return result} var Component=function(){function Component(player,options,ready){classCallCheck(this,Component);if(!player&&this.play){this.player_=player=this}else{this.player_=player} this.options_=mergeOptions({},this.options_);options=this.options_=mergeOptions(this.options_,options);this.id_=options.id||options.el&&options.el.id;if(!this.id_){var id=player&&player.id&&player.id()||'no_player';this.id_=id+'_component_'+newGUID()} this.name_=options.name||null;if(options.el){this.el_=options.el}else if(options.createEl!==!1){this.el_=this.createEl()} if(options.evented!==!1){evented(this,{eventBusKey:this.el_?'el_':null})} stateful(this,this.constructor.defaultState);this.children_=[];this.childIndex_={};this.childNameIndex_={};if(options.initChildren!==!1){this.initChildren()} this.ready(ready);if(options.reportTouchActivity!==!1){this.enableTouchActivity()}} Component.prototype.dispose=function dispose(){this.trigger({type:'dispose',bubbles:!1});if(this.children_){for(var i=this.children_.length-1;i>=0;i--){if(this.children_[i].dispose){this.children_[i].dispose()}}} this.children_=null;this.childIndex_=null;this.childNameIndex_=null;if(this.el_){if(this.el_.parentNode){this.el_.parentNode.removeChild(this.el_)} removeData(this.el_);this.el_=null} this.player_=null};Component.prototype.player=function player(){return this.player_};Component.prototype.options=function options(obj){log$1.warn('this.options() has been deprecated and will be moved to the constructor in 6.0');if(!obj){return this.options_} this.options_=mergeOptions(this.options_,obj);return this.options_};Component.prototype.el=function el(){return this.el_};Component.prototype.createEl=function createEl$$1(tagName,properties,attributes){return createEl(tagName,properties,attributes)};Component.prototype.localize=function localize(string,tokens){var defaultValue=arguments.length>2&&arguments[2]!==undefined?arguments[2]:string;var code=this.player_.language&&this.player_.language();var languages=this.player_.languages&&this.player_.languages();var language=languages&&languages[code];var primaryCode=code&&code.split('-')[0];var primaryLang=languages&&languages[primaryCode];var localizedString=defaultValue;if(language&&language[string]){localizedString=language[string]}else if(primaryLang&&primaryLang[string]){localizedString=primaryLang[string]} if(tokens){localizedString=localizedString.replace(/\{(\d+)\}/g,function(match,index){var value=tokens[index-1];var ret=value;if(typeof value==='undefined'){ret=match} return ret})} return localizedString};Component.prototype.contentEl=function contentEl(){return this.contentEl_||this.el_};Component.prototype.id=function id(){return this.id_};Component.prototype.name=function name(){return this.name_};Component.prototype.children=function children(){return this.children_};Component.prototype.getChildById=function getChildById(id){return this.childIndex_[id]};Component.prototype.getChild=function getChild(name){if(!name){return} name=toTitleCase(name);return this.childNameIndex_[name]};Component.prototype.addChild=function addChild(child){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var index=arguments.length>2&&arguments[2]!==undefined?arguments[2]:this.children_.length;var component=void 0;var componentName=void 0;if(typeof child==='string'){componentName=toTitleCase(child);var componentClassName=options.componentClass||componentName;options.name=componentName;var ComponentClass=Component.getComponent(componentClassName);if(!ComponentClass){throw new Error('Component '+componentClassName+' does not exist')} if(typeof ComponentClass!=='function'){return null} component=new ComponentClass(this.player_||this,options)}else{component=child} this.children_.splice(index,0,component);if(typeof component.id==='function'){this.childIndex_[component.id()]=component} componentName=componentName||component.name&&toTitleCase(component.name());if(componentName){this.childNameIndex_[componentName]=component} if(typeof component.el==='function'&&component.el()){var childNodes=this.contentEl().children;var refNode=childNodes[index]||null;this.contentEl().insertBefore(component.el(),refNode)} return component};Component.prototype.removeChild=function removeChild(component){if(typeof component==='string'){component=this.getChild(component)} if(!component||!this.children_){return} var childFound=!1;for(var i=this.children_.length-1;i>=0;i--){if(this.children_[i]===component){childFound=!0;this.children_.splice(i,1);break}} if(!childFound){return} this.childIndex_[component.id()]=null;this.childNameIndex_[component.name()]=null;var compEl=component.el();if(compEl&&compEl.parentNode===this.contentEl()){this.contentEl().removeChild(component.el())}};Component.prototype.initChildren=function initChildren(){var _this=this;var children=this.options_.children;if(children){var parentOptions=this.options_;var handleAdd=function handleAdd(child){var name=child.name;var opts=child.opts;if(parentOptions[name]!==undefined){opts=parentOptions[name]} if(opts===!1){return} if(opts===!0){opts={}} opts.playerOptions=_this.options_.playerOptions;var newChild=_this.addChild(name,opts);if(newChild){_this[name]=newChild}};var workingChildren=void 0;var Tech=Component.getComponent('Tech');if(Array.isArray(children)){workingChildren=children}else{workingChildren=Object.keys(children)} workingChildren.concat(Object.keys(this.options_).filter(function(child){return!workingChildren.some(function(wchild){if(typeof wchild==='string'){return child===wchild} return child===wchild.name})})).map(function(child){var name=void 0;var opts=void 0;if(typeof child==='string'){name=child;opts=children[name]||_this.options_[name]||{}}else{name=child.name;opts=child} return{name:name,opts:opts}}).filter(function(child){var c=Component.getComponent(child.opts.componentClass||toTitleCase(child.name));return c&&!Tech.isTech(c)}).forEach(handleAdd)}};Component.prototype.buildCSSClass=function buildCSSClass(){return''};Component.prototype.ready=function ready(fn){var sync=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;if(!fn){return} if(!this.isReady_){this.readyQueue_=this.readyQueue_||[];this.readyQueue_.push(fn);return} if(sync){fn.call(this)}else{this.setTimeout(fn,1)}};Component.prototype.triggerReady=function triggerReady(){this.isReady_=!0;this.setTimeout(function(){var readyQueue=this.readyQueue_;this.readyQueue_=[];if(readyQueue&&readyQueue.length>0){readyQueue.forEach(function(fn){fn.call(this)},this)} this.trigger('ready')},1)};Component.prototype.$=function $$$1(selector,context){return $(selector,context||this.contentEl())};Component.prototype.$$=function $$$$1(selector,context){return $$(selector,context||this.contentEl())};Component.prototype.hasClass=function hasClass$$1(classToCheck){return hasClass(this.el_,classToCheck)};Component.prototype.addClass=function addClass$$1(classToAdd){addClass(this.el_,classToAdd)};Component.prototype.removeClass=function removeClass$$1(classToRemove){removeClass(this.el_,classToRemove)};Component.prototype.toggleClass=function toggleClass$$1(classToToggle,predicate){toggleClass(this.el_,classToToggle,predicate)};Component.prototype.show=function show(){this.removeClass('vjs-hidden')};Component.prototype.hide=function hide(){this.addClass('vjs-hidden')};Component.prototype.lockShowing=function lockShowing(){this.addClass('vjs-lock-showing')};Component.prototype.unlockShowing=function unlockShowing(){this.removeClass('vjs-lock-showing')};Component.prototype.getAttribute=function getAttribute$$1(attribute){return getAttribute(this.el_,attribute)};Component.prototype.setAttribute=function setAttribute$$1(attribute,value){setAttribute(this.el_,attribute,value)};Component.prototype.removeAttribute=function removeAttribute$$1(attribute){removeAttribute(this.el_,attribute)};Component.prototype.width=function width(num,skipListeners){return this.dimension('width',num,skipListeners)};Component.prototype.height=function height(num,skipListeners){return this.dimension('height',num,skipListeners)};Component.prototype.dimensions=function dimensions(width,height){this.width(width,!0);this.height(height)};Component.prototype.dimension=function dimension(widthOrHeight,num,skipListeners){if(num!==undefined){if(num===null||num!==num){num=0} if((''+num).indexOf('%')!==-1||(''+num).indexOf('px')!==-1){this.el_.style[widthOrHeight]=num}else if(num==='auto'){this.el_.style[widthOrHeight]=''}else{this.el_.style[widthOrHeight]=num+'px'} if(!skipListeners){this.trigger('componentresize')} return} if(!this.el_){return 0} var val=this.el_.style[widthOrHeight];var pxIndex=val.indexOf('px');if(pxIndex!==-1){return parseInt(val.slice(0,pxIndex),10)} return parseInt(this.el_['offset'+toTitleCase(widthOrHeight)],10)};Component.prototype.currentDimension=function currentDimension(widthOrHeight){var computedWidthOrHeight=0;if(widthOrHeight!=='width'&&widthOrHeight!=='height'){throw new Error('currentDimension only accepts width or height value')} if(typeof window_1.getComputedStyle==='function'){var computedStyle=window_1.getComputedStyle(this.el_);computedWidthOrHeight=computedStyle.getPropertyValue(widthOrHeight)||computedStyle[widthOrHeight]} computedWidthOrHeight=parseFloat(computedWidthOrHeight);if(computedWidthOrHeight===0){var rule='offset'+toTitleCase(widthOrHeight);computedWidthOrHeight=this.el_[rule]} return computedWidthOrHeight};Component.prototype.currentDimensions=function currentDimensions(){return{width:this.currentDimension('width'),height:this.currentDimension('height')}};Component.prototype.currentWidth=function currentWidth(){return this.currentDimension('width')};Component.prototype.currentHeight=function currentHeight(){return this.currentDimension('height')};Component.prototype.focus=function focus(){this.el_.focus()};Component.prototype.blur=function blur(){this.el_.blur()};Component.prototype.emitTapEvents=function emitTapEvents(){var touchStart=0;var firstTouch=null;var tapMovementThreshold=10;var touchTimeThreshold=200;var couldBeTap=void 0;this.on('touchstart',function(event){if(event.touches.length===1){firstTouch={pageX:event.touches[0].pageX,pageY:event.touches[0].pageY};touchStart=new Date().getTime();couldBeTap=!0}});this.on('touchmove',function(event){if(event.touches.length>1){couldBeTap=!1}else if(firstTouch){var xdiff=event.touches[0].pageX-firstTouch.pageX;var ydiff=event.touches[0].pageY-firstTouch.pageY;var touchDistance=Math.sqrt(xdiff*xdiff+ydiff*ydiff);if(touchDistance>tapMovementThreshold){couldBeTap=!1}}});var noTap=function noTap(){couldBeTap=!1};this.on('touchleave',noTap);this.on('touchcancel',noTap);this.on('touchend',function(event){firstTouch=null;if(couldBeTap===!0){var touchTime=new Date().getTime()-touchStart;if(touchTime0&&playerNames.map(function(pname){return players[pname]}).every(Boolean)){throw new Error('Can not register Player component after player has been created.')}} Component.components_[name]=ComponentToRegister;return ComponentToRegister};Component.getComponent=function getComponent(name){if(!name){return} name=toTitleCase(name);if(Component.components_&&Component.components_[name]){return Component.components_[name]}};return Component}();Component.prototype.supportsRaf_=typeof window_1.requestAnimationFrame==='function'&&typeof window_1.cancelAnimationFrame==='function';Component.registerComponent('Component',Component);function rangeCheck(fnName,index,maxIndex){if(typeof index!=='number'||index<0||index>maxIndex){throw new Error('Failed to execute \''+fnName+'\' on \'TimeRanges\': The index provided ('+index+') is non-numeric or out of bounds (0-'+maxIndex+').')}} function getRange(fnName,valueIndex,ranges,rangeIndex){rangeCheck(fnName,rangeIndex,ranges.length-1);return ranges[rangeIndex][valueIndex]} function createTimeRangesObj(ranges){if(ranges===undefined||ranges.length===0){return{length:0,start:function start(){throw new Error('This TimeRanges object is empty')},end:function end(){throw new Error('This TimeRanges object is empty')}}} return{length:ranges.length,start:getRange.bind(null,'start',0,ranges),end:getRange.bind(null,'end',1,ranges)}} function createTimeRanges(start,end){if(Array.isArray(start)){return createTimeRangesObj(start)}else if(start===undefined||end===undefined){return createTimeRangesObj()} return createTimeRangesObj([[start,end]])} function bufferedPercent(buffered,duration){var bufferedDuration=0;var start=void 0;var end=void 0;if(!duration){return 0} if(!buffered||!buffered.length){buffered=createTimeRanges(0,0)} for(var i=0;iduration){end=duration} bufferedDuration+=end-start} return bufferedDuration/duration} var FullscreenApi={};var apiMap=[['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']];var specApi=apiMap[0];var browserApi=void 0;for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:[];var _ret;var list=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;classCallCheck(this,TrackList);var _this=possibleConstructorReturn(this,_EventTarget.call(this));if(!list){list=_this;if(IS_IE8){list=document_1.createElement('custom');for(var prop in TrackList.prototype){if(prop!=='constructor'){list[prop]=TrackList.prototype[prop]}}}} list.tracks_=[];Object.defineProperty(list,'length',{get:function get$$1(){return this.tracks_.length}});for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,AudioTrackList);var list=void 0;for(var i=tracks.length-1;i>=0;i--){if(tracks[i].enabled){disableOthers(tracks,tracks[i]);break}} if(IS_IE8){list=document_1.createElement('custom');for(var prop in TrackList.prototype){if(prop!=='constructor'){list[prop]=TrackList.prototype[prop]}} for(var _prop in AudioTrackList.prototype){if(_prop!=='constructor'){list[_prop]=AudioTrackList.prototype[_prop]}}} list=(_this=possibleConstructorReturn(this,_TrackList.call(this,tracks,list)),_this);list.changing_=!1;return _ret=list,possibleConstructorReturn(_this,_ret)} AudioTrackList.prototype.addTrack=function addTrack(track){var _this2=this;if(track.enabled){disableOthers(this,track)} _TrackList.prototype.addTrack.call(this,track);if(!track.addEventListener){return} track.addEventListener('enabledchange',function(){if(_this2.changing_){return} _this2.changing_=!0;disableOthers(_this2,track);_this2.changing_=!1;_this2.trigger('change')})};return AudioTrackList}(TrackList);var disableOthers$1=function disableOthers(list,track){for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,VideoTrackList);var list=void 0;for(var i=tracks.length-1;i>=0;i--){if(tracks[i].selected){disableOthers$1(tracks,tracks[i]);break}} if(IS_IE8){list=document_1.createElement('custom');for(var prop in TrackList.prototype){if(prop!=='constructor'){list[prop]=TrackList.prototype[prop]}} for(var _prop in VideoTrackList.prototype){if(_prop!=='constructor'){list[_prop]=VideoTrackList.prototype[_prop]}}} list=(_this=possibleConstructorReturn(this,_TrackList.call(this,tracks,list)),_this);list.changing_=!1;Object.defineProperty(list,'selectedIndex',{get:function get$$1(){for(var _i=0;_i0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,TextTrackList);var list=void 0;if(IS_IE8){list=document_1.createElement('custom');for(var prop in TrackList.prototype){if(prop!=='constructor'){list[prop]=TrackList.prototype[prop]}} for(var _prop in TextTrackList.prototype){if(_prop!=='constructor'){list[_prop]=TextTrackList.prototype[_prop]}}} list=(_this=possibleConstructorReturn(this,_TrackList.call(this,tracks,list)),_this);return _ret=list,possibleConstructorReturn(_this,_ret)} TextTrackList.prototype.addTrack=function addTrack(track){_TrackList.prototype.addTrack.call(this,track);track.addEventListener('modechange',bind(this,function(){this.trigger('change')}));var nonLanguageTextTrackKind=['metadata','chapters'];if(nonLanguageTextTrackKind.indexOf(track.kind)===-1){track.addEventListener('modechange',bind(this,function(){this.trigger('selectedlanguagechange')}))}};return TextTrackList}(TrackList);var HtmlTrackElementList=function(){function HtmlTrackElementList(){var trackElements=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];classCallCheck(this,HtmlTrackElementList);var list=this;if(IS_IE8){list=document_1.createElement('custom');for(var prop in HtmlTrackElementList.prototype){if(prop!=='constructor'){list[prop]=HtmlTrackElementList.prototype[prop]}}} list.trackElements_=[];Object.defineProperty(list,'length',{get:function get$$1(){return this.trackElements_.length}});for(var i=0,length=trackElements.length;i0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,Track);var _this=possibleConstructorReturn(this,_EventTarget.call(this));var track=_this;if(IS_IE8){track=document_1.createElement('custom');for(var prop in Track.prototype){if(prop!=='constructor'){track[prop]=Track.prototype[prop]}}} var trackProps={id:options.id||'vjs_track_'+newGUID(),kind:options.kind||'',label:options.label||'',language:options.language||''};var _loop=function _loop(key){Object.defineProperty(track,key,{get:function get$$1(){return trackProps[key]},set:function set$$1(){}})};for(var key in trackProps){_loop(key)} return _ret=track,possibleConstructorReturn(_this,_ret)} return Track}(EventTarget);var parseUrl=function parseUrl(url){var props=['protocol','hostname','port','pathname','search','hash','host'];var a=document_1.createElement('a');a.href=url;var addToBody=a.host===''&&a.protocol!=='file:';var div=void 0;if(addToBody){div=document_1.createElement('div');div.innerHTML='';a=div.firstChild;div.setAttribute('style','display:none; position:absolute;');document_1.body.appendChild(div)} var details={};for(var i=0;ix';url=div.firstChild.href} return url};var getFileExtension=function getFileExtension(path){if(typeof path==='string'){var splitPathRe=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i;var pathParts=splitPathRe.exec(path);if(pathParts){return pathParts.pop().toLowerCase()}} return''};var isCrossOrigin=function isCrossOrigin(url){var winLoc=window_1.location;var urlInfo=parseUrl(url);var srcProtocol=urlInfo.protocol===':'?winLoc.protocol:urlInfo.protocol;var crossOrigin=srcProtocol+urlInfo.host!==winLoc.protocol+winLoc.host;return crossOrigin};var Url=(Object.freeze||Object)({parseUrl:parseUrl,getAbsoluteURL:getAbsoluteURL,getFileExtension:getFileExtension,isCrossOrigin:isCrossOrigin});var index$1=isFunction;var toString$1=Object.prototype.toString;function isFunction(fn){var string=toString$1.call(fn);return string==='[object Function]'||(typeof fn==='function'&&string!=='[object RegExp]')||(typeof window!=='undefined'&&(fn===window.setTimeout||fn===window.alert||fn===window.confirm||fn===window.prompt))} var index$3=createCommonjsModule(function(module,exports){exports=module.exports=trim;function trim(str){return str.replace(/^\s*|\s*$/g,'')} exports.left=function(str){return str.replace(/^\s*/,'')};exports.right=function(str){return str.replace(/\s*$/,'')}});var index$5=forEach;var toString$2=Object.prototype.toString;var hasOwnProperty=Object.prototype.hasOwnProperty;function forEach(list,iterator,context){if(!index$1(iterator)){throw new TypeError('iterator must be a function')} if(arguments.length<3){context=this} if(toString$2.call(list)==='[object Array]') forEachArray$1(list,iterator,context);else if(typeof list==='string') forEachString(list,iterator,context);else forEachObject(list,iterator,context)} function forEachArray$1(array,iterator,context){for(var i=0,len=array.length;i0){timeoutTimer=setTimeout(function(){if(aborted)return aborted=!0;xhr.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT";errorFunc(e)},options.timeout)} if(xhr.setRequestHeader){for(key in headers){if(headers.hasOwnProperty(key)){xhr.setRequestHeader(key,headers[key])}}}else if(options.headers&&!isEmpty(options.headers)){throw new Error("Headers cannot be set on an XDomainRequest object")} if("responseType"in options){xhr.responseType=options.responseType} if("beforeSend"in options&&typeof options.beforeSend==="function"){options.beforeSend(xhr)} xhr.send(body||null);return xhr} function getXml(xhr){if(xhr.responseType==="document"){return xhr.responseXML} var firefoxBugTakenEffect=xhr.responseXML&&xhr.responseXML.documentElement.nodeName==="parsererror";if(xhr.responseType===""&&!firefoxBugTakenEffect){return xhr.responseXML} return null} function noop(){} var parseCues=function parseCues(srcContent,track){var parser=new window_1.WebVTT.Parser(window_1,window_1.vttjs,window_1.WebVTT.StringDecoder());var errors=[];parser.oncue=function(cue){track.addCue(cue)};parser.onparsingerror=function(error){errors.push(error)};parser.onflush=function(){track.trigger({type:'loadeddata',target:track})};parser.parse(srcContent);if(errors.length>0){if(window_1.console&&window_1.console.groupCollapsed){window_1.console.groupCollapsed('Text Track parsing errors for '+track.src)} errors.forEach(function(error){return log$1.error(error)});if(window_1.console&&window_1.console.groupEnd){window_1.console.groupEnd()}} parser.flush()};var loadTrack=function loadTrack(src,track){var opts={uri:src};var crossOrigin=isCrossOrigin(src);if(crossOrigin){opts.cors=crossOrigin} index(opts,bind(this,function(err,response,responseBody){if(err){return log$1.error(err,response)} track.loaded_=!0;if(typeof window_1.WebVTT!=='function'){if(track.tech_){var loadHandler=function loadHandler(){return parseCues(responseBody,track)};track.tech_.on('vttjsloaded',loadHandler);track.tech_.on('vttjserror',function(){log$1.error('vttjs failed to load, stopping trying to process '+track.src);track.tech_.off('vttjsloaded',loadHandler)})}}else{parseCues(responseBody,track)}}))};var TextTrack=function(_Track){inherits(TextTrack,_Track);function TextTrack(){var _this,_ret;var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,TextTrack);if(!options.tech){throw new Error('A tech was not provided.')} var settings=mergeOptions(options,{kind:TextTrackKind[options.kind]||'subtitles',language:options.language||options.srclang||''});var mode=TextTrackMode[settings.mode]||'disabled';var default_=settings['default'];if(settings.kind==='metadata'||settings.kind==='chapters'){mode='hidden'} var tt=(_this=possibleConstructorReturn(this,_Track.call(this,settings)),_this);tt.tech_=settings.tech;if(IS_IE8){for(var prop in TextTrack.prototype){if(prop!=='constructor'){tt[prop]=TextTrack.prototype[prop]}}} tt.cues_=[];tt.activeCues_=[];var cues=new TextTrackCueList(tt.cues_);var activeCues=new TextTrackCueList(tt.activeCues_);var changed=!1;var timeupdateHandler=bind(tt,function(){this.activeCues;if(changed){this.trigger('cuechange');changed=!1}});if(mode!=='disabled'){tt.tech_.ready(function(){tt.tech_.on('timeupdate',timeupdateHandler)},!0)} Object.defineProperty(tt,'default',{get:function get$$1(){return default_},set:function set$$1(){}});Object.defineProperty(tt,'mode',{get:function get$$1(){return mode},set:function set$$1(newMode){var _this2=this;if(!TextTrackMode[newMode]){return} mode=newMode;if(mode==='showing'){this.tech_.ready(function(){_this2.tech_.on('timeupdate',timeupdateHandler)},!0)} this.trigger('modechange')}});Object.defineProperty(tt,'cues',{get:function get$$1(){if(!this.loaded_){return null} return cues},set:function set$$1(){}});Object.defineProperty(tt,'activeCues',{get:function get$$1(){if(!this.loaded_){return null} if(this.cues.length===0){return activeCues} var ct=this.tech_.currentTime();var active=[];for(var i=0,l=this.cues.length;i=ct){active.push(cue)}else if(cue.startTime===cue.endTime&&cue.startTime<=ct&&cue.startTime+0.5>=ct){active.push(cue)}} changed=!1;if(active.length!==this.activeCues_.length){changed=!0}else{for(var _i=0;_i0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,AudioTrack);var settings=mergeOptions(options,{kind:AudioTrackKind[options.kind]||''});var track=(_this=possibleConstructorReturn(this,_Track.call(this,settings)),_this);var enabled=!1;if(IS_IE8){for(var prop in AudioTrack.prototype){if(prop!=='constructor'){track[prop]=AudioTrack.prototype[prop]}}} Object.defineProperty(track,'enabled',{get:function get$$1(){return enabled},set:function set$$1(newEnabled){if(typeof newEnabled!=='boolean'||newEnabled===enabled){return} enabled=newEnabled;this.trigger('enabledchange')}});if(settings.enabled){track.enabled=settings.enabled} track.loaded_=!0;return _ret=track,possibleConstructorReturn(_this,_ret)} return AudioTrack}(Track);var VideoTrack=function(_Track){inherits(VideoTrack,_Track);function VideoTrack(){var _this,_ret;var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,VideoTrack);var settings=mergeOptions(options,{kind:VideoTrackKind[options.kind]||''});var track=(_this=possibleConstructorReturn(this,_Track.call(this,settings)),_this);var selected=!1;if(IS_IE8){for(var prop in VideoTrack.prototype){if(prop!=='constructor'){track[prop]=VideoTrack.prototype[prop]}}} Object.defineProperty(track,'selected',{get:function get$$1(){return selected},set:function set$$1(newSelected){if(typeof newSelected!=='boolean'||newSelected===selected){return} selected=newSelected;this.trigger('selectedchange')}});if(settings.selected){track.selected=settings.selected} return _ret=track,possibleConstructorReturn(_this,_ret)} return VideoTrack}(Track);var NONE=0;var LOADING=1;var LOADED=2;var ERROR=3;var HTMLTrackElement=function(_EventTarget){inherits(HTMLTrackElement,_EventTarget);function HTMLTrackElement(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};classCallCheck(this,HTMLTrackElement);var _this=possibleConstructorReturn(this,_EventTarget.call(this));var readyState=void 0;var trackElement=_this;if(IS_IE8){trackElement=document_1.createElement('custom');for(var prop in HTMLTrackElement.prototype){if(prop!=='constructor'){trackElement[prop]=HTMLTrackElement.prototype[prop]}}} var track=new TextTrack(options);trackElement.kind=track.kind;trackElement.src=track.src;trackElement.srclang=track.language;trackElement.label=track.label;trackElement['default']=track['default'];Object.defineProperty(trackElement,'readyState',{get:function get$$1(){return readyState}});Object.defineProperty(trackElement,'track',{get:function get$$1(){return track}});readyState=NONE;track.addEventListener('loadeddata',function(){readyState=LOADED;trackElement.trigger({type:'load',target:trackElement})});if(IS_IE8){var _ret;return _ret=trackElement,possibleConstructorReturn(_this,_ret)} return _this} return HTMLTrackElement}(EventTarget);HTMLTrackElement.prototype.allowedEvents_={load:'load'};HTMLTrackElement.NONE=NONE;HTMLTrackElement.LOADING=LOADING;HTMLTrackElement.LOADED=LOADED;HTMLTrackElement.ERROR=ERROR;var NORMAL={audio:{ListClass:AudioTrackList,TrackClass:AudioTrack,capitalName:'Audio'},video:{ListClass:VideoTrackList,TrackClass:VideoTrack,capitalName:'Video'},text:{ListClass:TextTrackList,TrackClass:TextTrack,capitalName:'Text'}};Object.keys(NORMAL).forEach(function(type){NORMAL[type].getterName=type+'Tracks';NORMAL[type].privateName=type+'Tracks_'});var REMOTE={remoteText:{ListClass:TextTrackList,TrackClass:TextTrack,capitalName:'RemoteText',getterName:'remoteTextTracks',privateName:'remoteTextTracks_'},remoteTextEl:{ListClass:HtmlTrackElementList,TrackClass:HTMLTrackElement,capitalName:'RemoteTextTrackEls',getterName:'remoteTextTrackEls',privateName:'remoteTextTrackEls_'}};var ALL=mergeOptions(NORMAL,REMOTE);REMOTE.names=Object.keys(REMOTE);NORMAL.names=Object.keys(NORMAL);ALL.names=[].concat(REMOTE.names).concat(NORMAL.names);var _objCreate=Object.create||(function(){function F(){} return function(o){if(arguments.length!==1){throw new Error('Object.create shim only accepts one parameter.')} F.prototype=o;return new F()}})();function ParsingError(errorData,message){this.name="ParsingError";this.code=errorData.code;this.message=message||errorData.message} ParsingError.prototype=_objCreate(Error.prototype);ParsingError.prototype.constructor=ParsingError;ParsingError.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function parseTimeStamp(input){function computeSeconds(h,m,s,f){return(h|0)*3600+(m|0)*60+(s|0)+(f|0)/1000} var m=input.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);if(!m){return null} if(m[3]){return computeSeconds(m[1],m[2],m[3].replace(":",""),m[4])}else if(m[1]>59){return computeSeconds(m[1],m[2],0,m[4])}else{return computeSeconds(0,m[1],m[2],m[4])}} function Settings(){this.values=_objCreate(null)} Settings.prototype={set:function(k,v){if(!this.get(k)&&v!==""){this.values[k]=v}},get:function(k,dflt,defaultKey){if(defaultKey){return this.has(k)?this.values[k]:dflt[defaultKey]} return this.has(k)?this.values[k]:dflt},has:function(k){return k in this.values},alt:function(k,v,a){for(var n=0;n=0&&v<=100){this.set(k,v);return!0}} return!1}};function parseOptions(input,callback,keyValueDelim,groupDelim){var groups=groupDelim?input.split(groupDelim):[input];for(var i in groups){if(typeof groups[i]!=="string"){continue} var kv=groups[i].split(keyValueDelim);if(kv.length!==2){continue} var k=kv[0];var v=kv[1];callback(k,v)}} function parseCue(input,cue,regionList){var oInput=input;function consumeTimeStamp(){var ts=parseTimeStamp(input);if(ts===null){throw new ParsingError(ParsingError.Errors.BadTimeStamp,"Malformed timestamp: "+oInput)} input=input.replace(/^[^\sa-zA-Z-]+/,"");return ts} function consumeCueSettings(input,cue){var settings=new Settings();parseOptions(input,function(k,v){switch(k){case "region":for(var i=regionList.length-1;i>=0;i--){if(regionList[i].id===v){settings.set(k,regionList[i].region);break}} break;case "vertical":settings.alt(k,v,["rl","lr"]);break;case "line":var vals=v.split(","),vals0=vals[0];settings.integer(k,vals0);settings.percent(k,vals0)?settings.set("snapToLines",!1):null;settings.alt(k,vals0,["auto"]);if(vals.length===2){settings.alt("lineAlign",vals[1],["start","middle","end"])} break;case "position":vals=v.split(",");settings.percent(k,vals[0]);if(vals.length===2){settings.alt("positionAlign",vals[1],["start","middle","end"])} break;case "size":settings.percent(k,v);break;case "align":settings.alt(k,v,["start","middle","end","left","right"]);break}},/:/,/\s/);cue.region=settings.get("region",null);cue.vertical=settings.get("vertical","");cue.line=settings.get("line","auto");cue.lineAlign=settings.get("lineAlign","start");cue.snapToLines=settings.get("snapToLines",!0);cue.size=settings.get("size",100);cue.align=settings.get("align","middle");cue.position=settings.get("position",{start:0,left:0,middle:50,end:100,right:100},cue.align);cue.positionAlign=settings.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},cue.align)} function skipWhitespace(){input=input.replace(/^\s+/,"")} skipWhitespace();cue.startTime=consumeTimeStamp();skipWhitespace();if(input.substr(0,3)!=="-->"){throw new ParsingError(ParsingError.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+oInput)} input=input.substr(3);skipWhitespace();cue.endTime=consumeTimeStamp();skipWhitespace();consumeCueSettings(input,cue)} var ESCAPE={"&":"&","<":"<",">":">","‎":"\u200e","‏":"\u200f"," ":"\u00a0"};var TAG_NAME={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"};var TAG_ANNOTATION={v:"title",lang:"lang"};var NEEDS_PARENT={rt:"ruby"};function parseContent(window,input){function nextToken(){if(!input){return null} function consume(result){input=input.substr(result.length);return result} var m=input.match(/^([^<]*)(<[^>]+>?)?/);return consume(m[1]?m[1]:m[2])} function unescape1(e){return ESCAPE[e]} function unescape(s){while((m=s.match(/&(amp|lt|gt|lrm|rlm|nbsp);/))){s=s.replace(m[0],unescape1)} return s} function shouldAdd(current,element){return!NEEDS_PARENT[element.localName]||NEEDS_PARENT[element.localName]===current.localName} function createElement(type,annotation){var tagName=TAG_NAME[type];if(!tagName){return null} var element=window.document.createElement(tagName);element.localName=tagName;var name=TAG_ANNOTATION[type];if(name&&annotation){element[name]=annotation.trim()} return element} var rootDiv=window.document.createElement("div"),current=rootDiv,t,tagStack=[];while((t=nextToken())!==null){if(t[0]==='<'){if(t[1]==="/"){if(tagStack.length&&tagStack[tagStack.length-1]===t.substr(2).replace(">","")){tagStack.pop();current=current.parentNode} continue} var ts=parseTimeStamp(t.substr(1,t.length-2));var node;if(ts){node=window.document.createProcessingInstruction("timestamp",ts);current.appendChild(node);continue} var m=t.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!m){continue} node=createElement(m[1],m[3]);if(!node){continue} if(!shouldAdd(current,node)){continue} if(m[2]){node.className=m[2].substr(1).replace('.',' ')} tagStack.push(m[1]);current.appendChild(node);current=node;continue} current.appendChild(window.document.createTextNode(unescape(t)))} return rootDiv} var strongRTLRanges=[[0x5be,0x5be],[0x5c0,0x5c0],[0x5c3,0x5c3],[0x5c6,0x5c6],[0x5d0,0x5ea],[0x5f0,0x5f4],[0x608,0x608],[0x60b,0x60b],[0x60d,0x60d],[0x61b,0x61b],[0x61e,0x64a],[0x66d,0x66f],[0x671,0x6d5],[0x6e5,0x6e6],[0x6ee,0x6ef],[0x6fa,0x70d],[0x70f,0x710],[0x712,0x72f],[0x74d,0x7a5],[0x7b1,0x7b1],[0x7c0,0x7ea],[0x7f4,0x7f5],[0x7fa,0x7fa],[0x800,0x815],[0x81a,0x81a],[0x824,0x824],[0x828,0x828],[0x830,0x83e],[0x840,0x858],[0x85e,0x85e],[0x8a0,0x8a0],[0x8a2,0x8ac],[0x200f,0x200f],[0xfb1d,0xfb1d],[0xfb1f,0xfb28],[0xfb2a,0xfb36],[0xfb38,0xfb3c],[0xfb3e,0xfb3e],[0xfb40,0xfb41],[0xfb43,0xfb44],[0xfb46,0xfbc1],[0xfbd3,0xfd3d],[0xfd50,0xfd8f],[0xfd92,0xfdc7],[0xfdf0,0xfdfc],[0xfe70,0xfe74],[0xfe76,0xfefc],[0x10800,0x10805],[0x10808,0x10808],[0x1080a,0x10835],[0x10837,0x10838],[0x1083c,0x1083c],[0x1083f,0x10855],[0x10857,0x1085f],[0x10900,0x1091b],[0x10920,0x10939],[0x1093f,0x1093f],[0x10980,0x109b7],[0x109be,0x109bf],[0x10a00,0x10a00],[0x10a10,0x10a13],[0x10a15,0x10a17],[0x10a19,0x10a33],[0x10a40,0x10a47],[0x10a50,0x10a58],[0x10a60,0x10a7f],[0x10b00,0x10b35],[0x10b40,0x10b55],[0x10b58,0x10b72],[0x10b78,0x10b7f],[0x10c00,0x10c48],[0x1ee00,0x1ee03],[0x1ee05,0x1ee1f],[0x1ee21,0x1ee22],[0x1ee24,0x1ee24],[0x1ee27,0x1ee27],[0x1ee29,0x1ee32],[0x1ee34,0x1ee37],[0x1ee39,0x1ee39],[0x1ee3b,0x1ee3b],[0x1ee42,0x1ee42],[0x1ee47,0x1ee47],[0x1ee49,0x1ee49],[0x1ee4b,0x1ee4b],[0x1ee4d,0x1ee4f],[0x1ee51,0x1ee52],[0x1ee54,0x1ee54],[0x1ee57,0x1ee57],[0x1ee59,0x1ee59],[0x1ee5b,0x1ee5b],[0x1ee5d,0x1ee5d],[0x1ee5f,0x1ee5f],[0x1ee61,0x1ee62],[0x1ee64,0x1ee64],[0x1ee67,0x1ee6a],[0x1ee6c,0x1ee72],[0x1ee74,0x1ee77],[0x1ee79,0x1ee7c],[0x1ee7e,0x1ee7e],[0x1ee80,0x1ee89],[0x1ee8b,0x1ee9b],[0x1eea1,0x1eea3],[0x1eea5,0x1eea9],[0x1eeab,0x1eebb],[0x10fffd,0x10fffd]];function isStrongRTLChar(charCode){for(var i=0;i=currentRange[0]&&charCode<=currentRange[1]){return!0}} return!1} function determineBidi(cueDiv){var nodeStack=[],text="",charCode;if(!cueDiv||!cueDiv.childNodes){return"ltr"} function pushNodes(nodeStack,node){for(var i=node.childNodes.length-1;i>=0;i--){nodeStack.push(node.childNodes[i])}} function nextTextNode(nodeStack){if(!nodeStack||!nodeStack.length){return null} var node=nodeStack.pop(),text=node.textContent||node.innerText;if(text){var m=text.match(/^.*(\n|\r)/);if(m){nodeStack.length=0;return m[0]} return text} if(node.tagName==="ruby"){return nextTextNode(nodeStack)} if(node.childNodes){pushNodes(nodeStack,node);return nextTextNode(nodeStack)}} pushNodes(nodeStack,cueDiv);while((text=nextTextNode(nodeStack))){for(var i=0;i=0&&cue.line<=100))){return cue.line} if(!cue.track||!cue.track.textTrackList||!cue.track.textTrackList.mediaElement){return-1} var track=cue.track,trackList=track.textTrackList,count=0;for(var i=0;ib2.left&&this.topb2.top};BoxPosition.prototype.overlapsAny=function(boxes){for(var i=0;i=container.top&&this.bottom<=container.bottom&&this.left>=container.left&&this.right<=container.right};BoxPosition.prototype.overlapsOppositeAxis=function(container,axis){switch(axis){case "+x":return this.leftcontainer.right;case "+y":return this.topcontainer.bottom}};BoxPosition.prototype.intersectPercentage=function(b2){var x=Math.max(0,Math.min(this.right,b2.right)-Math.max(this.left,b2.left)),y=Math.max(0,Math.min(this.bottom,b2.bottom)-Math.max(this.top,b2.top)),intersectArea=x*y;return intersectArea/(this.height*this.width)};BoxPosition.prototype.toCSSCompatValues=function(reference){return{top:this.top-reference.top,bottom:reference.bottom-this.bottom,left:this.left-reference.left,right:reference.right-this.right,height:this.height,width:this.width}};BoxPosition.getSimpleBoxPosition=function(obj){var height=obj.div?obj.div.offsetHeight:obj.tagName?obj.offsetHeight:0;var width=obj.div?obj.div.offsetWidth:obj.tagName?obj.offsetWidth:0;var top=obj.div?obj.div.offsetTop:obj.tagName?obj.offsetTop:0;obj=obj.div?obj.div.getBoundingClientRect():obj.tagName?obj.getBoundingClientRect():obj;var ret={left:obj.left,right:obj.right,top:obj.top||top,height:obj.height||height,bottom:obj.bottom||(top+(obj.height||height)),width:obj.width||width};return ret};function moveBoxToLinePosition(window,styleBox,containerBox,boxPositions){function findBestPosition(b,axis){var bestPosition,specifiedPosition=new BoxPosition(b),percentage=1;for(var i=0;ip){bestPosition=new BoxPosition(b);percentage=p} b=new BoxPosition(specifiedPosition)} return bestPosition||specifiedPosition} var boxPosition=new BoxPosition(styleBox),cue=styleBox.cue,linePos=computeLinePos(cue),axis=[];if(cue.snapToLines){var size;switch(cue.vertical){case "":axis=["+y","-y"];size="height";break;case "rl":axis=["+x","-x"];size="width";break;case "lr":axis=["-x","+x"];size="width";break} var step=boxPosition.lineHeight,position=step*Math.round(linePos),maxPosition=containerBox[size]+step,initialAxis=axis[0];if(Math.abs(position)>maxPosition){position=position<0?-1:1;position*=Math.ceil(maxPosition/step)*step} if(linePos<0){position+=cue.vertical===""?containerBox.height:containerBox.width;axis=axis.reverse()} boxPosition.move(initialAxis,position)}else{var calculatedPercentage=(boxPosition.lineHeight/containerBox.height)*100;switch(cue.lineAlign){case "middle":linePos-=(calculatedPercentage/2);break;case "end":linePos-=calculatedPercentage;break} switch(cue.vertical){case "":styleBox.applyStyles({top:styleBox.formatStyle(linePos,"%")});break;case "rl":styleBox.applyStyles({left:styleBox.formatStyle(linePos,"%")});break;case "lr":styleBox.applyStyles({right:styleBox.formatStyle(linePos,"%")});break} axis=["+y","-x","+x","-y"];boxPosition=new BoxPosition(styleBox)} var bestPosition=findBestPosition(boxPosition,axis);styleBox.move(bestPosition.toCSSCompatValues(containerBox))} function WebVTT$1(){} WebVTT$1.StringDecoder=function(){return{decode:function(data){if(!data){return""} if(typeof data!=="string"){throw new Error("Error - expected string data.")} return decodeURIComponent(encodeURIComponent(data))}}};WebVTT$1.convertCueToDOMTree=function(window,cuetext){if(!window||!cuetext){return null} return parseContent(window,cuetext)};var FONT_SIZE_PERCENT=0.05;var FONT_STYLE="sans-serif";var CUE_BACKGROUND_PADDING="1.5%";WebVTT$1.processCues=function(window,cues,overlay){if(!window||!cues||!overlay){return null} while(overlay.firstChild){overlay.removeChild(overlay.firstChild)} var paddedOverlay=window.document.createElement("div");paddedOverlay.style.position="absolute";paddedOverlay.style.left="0";paddedOverlay.style.right="0";paddedOverlay.style.top="0";paddedOverlay.style.bottom="0";paddedOverlay.style.margin=CUE_BACKGROUND_PADDING;overlay.appendChild(paddedOverlay);function shouldCompute(cues){for(var i=0;i")===-1){self.cue.id=line;continue} case "CUE":try{parseCue(line,self.cue,self.regionList)}catch(e){self.reportOrThrowError(e);self.cue=null;self.state="BADCUE";continue} self.state="CUETEXT";continue;case "CUETEXT":var hasSubstring=line.indexOf("-->")!==-1;if(!line||hasSubstring&&(alreadyCollectedLine=!0)){self.oncue&&self.oncue(self.cue);self.cue=null;self.state="ID";continue} if(self.cue.text){self.cue.text+="\n"} self.cue.text+=line;continue;case "BADCUE":if(!line){self.state="ID"} continue}}}catch(e){self.reportOrThrowError(e);if(self.state==="CUETEXT"&&self.cue&&self.oncue){self.oncue(self.cue)} self.cue=null;self.state=self.state==="INITIAL"?"BADWEBVTT":"BADCUE"} return this},flush:function(){var self=this;try{self.buffer+=self.decoder.decode();if(self.cue||self.state==="HEADER"){self.buffer+="\n\n";self.parse()} if(self.state==="INITIAL"){throw new ParsingError(ParsingError.Errors.BadSignature)}}catch(e){self.reportOrThrowError(e)} self.onflush&&self.onflush();return this}};var vtt$1=WebVTT$1;var autoKeyword="auto";var directionSetting={"":!0,"lr":!0,"rl":!0};var alignSetting={"start":!0,"middle":!0,"end":!0,"left":!0,"right":!0};function findDirectionSetting(value){if(typeof value!=="string"){return!1} var dir=directionSetting[value.toLowerCase()];return dir?value.toLowerCase():!1} function findAlignSetting(value){if(typeof value!=="string"){return!1} var align=alignSetting[value.toLowerCase()];return align?value.toLowerCase():!1} function extend$1(obj){var i=1;for(;i100){throw new Error("Position must be between 0 and 100.")} _position=value;this.hasBeenReset=!0}}));Object.defineProperty(cue,"positionAlign",extend$1({},baseObj,{get:function(){return _positionAlign},set:function(value){var setting=findAlignSetting(value);if(!setting){throw new SyntaxError("An invalid or illegal string was specified.")} _positionAlign=setting;this.hasBeenReset=!0}}));Object.defineProperty(cue,"size",extend$1({},baseObj,{get:function(){return _size},set:function(value){if(value<0||value>100){throw new Error("Size must be between 0 and 100.")} _size=value;this.hasBeenReset=!0}}));Object.defineProperty(cue,"align",extend$1({},baseObj,{get:function(){return _align},set:function(value){var setting=findAlignSetting(value);if(!setting){throw new SyntaxError("An invalid or illegal string was specified.")} _align=setting;this.hasBeenReset=!0}}));cue.displayState=undefined;if(isIE8){return cue}} VTTCue.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var vttcue=VTTCue;var scrollSetting={"":!0,"up":!0};function findScrollSetting(value){if(typeof value!=="string"){return!1} var scroll=scrollSetting[value.toLowerCase()];return scroll?value.toLowerCase():!1} function isValidPercentValue(value){return typeof value==="number"&&(value>=0&&value<=100)} function VTTRegion(){var _width=100;var _lines=3;var _regionAnchorX=0;var _regionAnchorY=100;var _viewportAnchorX=0;var _viewportAnchorY=100;var _scroll="";Object.defineProperties(this,{"width":{enumerable:!0,get:function(){return _width},set:function(value){if(!isValidPercentValue(value)){throw new Error("Width must be between 0 and 100.")} _width=value}},"lines":{enumerable:!0,get:function(){return _lines},set:function(value){if(typeof value!=="number"){throw new TypeError("Lines must be set to a number.")} _lines=value}},"regionAnchorY":{enumerable:!0,get:function(){return _regionAnchorY},set:function(value){if(!isValidPercentValue(value)){throw new Error("RegionAnchorX must be between 0 and 100.")} _regionAnchorY=value}},"regionAnchorX":{enumerable:!0,get:function(){return _regionAnchorX},set:function(value){if(!isValidPercentValue(value)){throw new Error("RegionAnchorY must be between 0 and 100.")} _regionAnchorX=value}},"viewportAnchorY":{enumerable:!0,get:function(){return _viewportAnchorY},set:function(value){if(!isValidPercentValue(value)){throw new Error("ViewportAnchorY must be between 0 and 100.")} _viewportAnchorY=value}},"viewportAnchorX":{enumerable:!0,get:function(){return _viewportAnchorX},set:function(value){if(!isValidPercentValue(value)){throw new Error("ViewportAnchorX must be between 0 and 100.")} _viewportAnchorX=value}},"scroll":{enumerable:!0,get:function(){return _scroll},set:function(value){var setting=findScrollSetting(value);if(setting===!1){throw new SyntaxError("An invalid or illegal string was specified.")} _scroll=setting}}})} var vttregion=VTTRegion;var browserIndex=createCommonjsModule(function(module){var vttjs=module.exports={WebVTT:vtt$1,VTTCue:vttcue,VTTRegion:vttregion};window_1.vttjs=vttjs;window_1.WebVTT=vttjs.WebVTT;var cueShim=vttjs.VTTCue;var regionShim=vttjs.VTTRegion;var nativeVTTCue=window_1.VTTCue;var nativeVTTRegion=window_1.VTTRegion;vttjs.shim=function(){window_1.VTTCue=cueShim;window_1.VTTRegion=regionShim};vttjs.restore=function(){window_1.VTTCue=nativeVTTCue;window_1.VTTRegion=nativeVTTRegion};if(!window_1.VTTCue){vttjs.shim()}});function createTrackHelper(self,kind,label,language){var options=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};var tracks=self.textTracks();options.kind=kind;if(label){options.label=label} if(language){options.language=language} options.tech=self;var track=new ALL.text.TrackClass(options);tracks.addTrack(track);return track} var Tech=function(_Component){inherits(Tech,_Component);function Tech(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var ready=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(){};classCallCheck(this,Tech);options.reportTouchActivity=!1;var _this=possibleConstructorReturn(this,_Component.call(this,null,options,ready));_this.hasStarted_=!1;_this.on('playing',function(){this.hasStarted_=!0});_this.on('loadstart',function(){this.hasStarted_=!1});ALL.names.forEach(function(name){var props=ALL[name];if(options&&options[props.getterName]){_this[props.privateName]=options[props.getterName]}});if(!_this.featuresProgressEvents){_this.manualProgressOn()} if(!_this.featuresTimeupdateEvents){_this.manualTimeUpdatesOn()}['Text','Audio','Video'].forEach(function(track){if(options['native'+track+'Tracks']===!1){_this['featuresNative'+track+'Tracks']=!1}});if(options.nativeCaptions===!1||options.nativeTextTracks===!1){_this.featuresNativeTextTracks=!1}else if(options.nativeCaptions===!0||options.nativeTextTracks===!0){_this.featuresNativeTextTracks=!0} if(!_this.featuresNativeTextTracks){_this.emulateTextTracks()} _this.autoRemoteTextTracks_=new ALL.text.ListClass();_this.initTrackListeners();if(!options.nativeControlsForTouch){_this.emitTapEvents()} if(_this.constructor){_this.name_=_this.constructor.name||'Unknown Tech'} return _this} Tech.prototype.manualProgressOn=function manualProgressOn(){this.on('durationchange',this.onDurationChange);this.manualProgress=!0;this.one('ready',this.trackProgress)};Tech.prototype.manualProgressOff=function manualProgressOff(){this.manualProgress=!1;this.stopTrackingProgress();this.off('durationchange',this.onDurationChange)};Tech.prototype.trackProgress=function trackProgress(event){this.stopTrackingProgress();this.progressInterval=this.setInterval(bind(this,function(){var numBufferedPercent=this.bufferedPercent();if(this.bufferedPercent_!==numBufferedPercent){this.trigger('progress')} this.bufferedPercent_=numBufferedPercent;if(numBufferedPercent===1){this.stopTrackingProgress()}}),500)};Tech.prototype.onDurationChange=function onDurationChange(event){this.duration_=this.duration()};Tech.prototype.buffered=function buffered(){return createTimeRanges(0,0)};Tech.prototype.bufferedPercent=function bufferedPercent$$1(){return bufferedPercent(this.buffered(),this.duration_)};Tech.prototype.stopTrackingProgress=function stopTrackingProgress(){this.clearInterval(this.progressInterval)};Tech.prototype.manualTimeUpdatesOn=function manualTimeUpdatesOn(){this.manualTimeUpdates=!0;this.on('play',this.trackCurrentTime);this.on('pause',this.stopTrackingCurrentTime)};Tech.prototype.manualTimeUpdatesOff=function manualTimeUpdatesOff(){this.manualTimeUpdates=!1;this.stopTrackingCurrentTime();this.off('play',this.trackCurrentTime);this.off('pause',this.stopTrackingCurrentTime)};Tech.prototype.trackCurrentTime=function trackCurrentTime(){if(this.currentTimeInterval){this.stopTrackingCurrentTime()} this.currentTimeInterval=this.setInterval(function(){this.trigger({type:'timeupdate',target:this,manuallyTriggered:!0})},250)};Tech.prototype.stopTrackingCurrentTime=function stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval);this.trigger({type:'timeupdate',target:this,manuallyTriggered:!0})};Tech.prototype.dispose=function dispose(){this.clearTracks(NORMAL.names);if(this.manualProgress){this.manualProgressOff()} if(this.manualTimeUpdates){this.manualTimeUpdatesOff()} _Component.prototype.dispose.call(this)};Tech.prototype.clearTracks=function clearTracks(types){var _this2=this;types=[].concat(types);types.forEach(function(type){var list=_this2[type+'Tracks']()||[];var i=list.length;while(i--){var track=list[i];if(type==='text'){_this2.removeRemoteTextTrack(track)} list.removeTrack(track)}})};Tech.prototype.cleanupAutoTextTracks=function cleanupAutoTextTracks(){var list=this.autoRemoteTextTracks_||[];var i=list.length;while(i--){var track=list[i];this.removeRemoteTextTrack(track)}};Tech.prototype.reset=function reset(){};Tech.prototype.error=function error(err){if(err!==undefined){this.error_=new MediaError(err);this.trigger('error')} return this.error_};Tech.prototype.played=function played(){if(this.hasStarted_){return createTimeRanges(0,0)} return createTimeRanges()};Tech.prototype.setCurrentTime=function setCurrentTime(){if(this.manualTimeUpdates){this.trigger({type:'timeupdate',target:this,manuallyTriggered:!0})}};Tech.prototype.initTrackListeners=function initTrackListeners(){var _this3=this;NORMAL.names.forEach(function(name){var props=NORMAL[name];var trackListChanges=function trackListChanges(){_this3.trigger(name+'trackchange')};var tracks=_this3[props.getterName]();tracks.addEventListener('removetrack',trackListChanges);tracks.addEventListener('addtrack',trackListChanges);_this3.on('dispose',function(){tracks.removeEventListener('removetrack',trackListChanges);tracks.removeEventListener('addtrack',trackListChanges)})})};Tech.prototype.addWebVttScript_=function addWebVttScript_(){var _this4=this;if(window_1.WebVTT){return} if(document_1.body.contains(this.el())){if(!this.options_['vtt.js']&&isPlain(browserIndex)&&Object.keys(browserIndex).length>0){this.trigger('vttjsloaded');return} var script=document_1.createElement('script');script.src=this.options_['vtt.js']||'https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js';script.onload=function(){_this4.trigger('vttjsloaded')};script.onerror=function(){_this4.trigger('vttjserror')};this.on('dispose',function(){script.onload=null;script.onerror=null});window_1.WebVTT=!0;this.el().parentNode.appendChild(script)}else{this.ready(this.addWebVttScript_)}};Tech.prototype.emulateTextTracks=function emulateTextTracks(){var _this5=this;var tracks=this.textTracks();var remoteTracks=this.remoteTextTracks();var handleAddTrack=function handleAddTrack(e){return tracks.addTrack(e.track)};var handleRemoveTrack=function handleRemoveTrack(e){return tracks.removeTrack(e.track)};remoteTracks.on('addtrack',handleAddTrack);remoteTracks.on('removetrack',handleRemoveTrack);this.addWebVttScript_();var updateDisplay=function updateDisplay(){return _this5.trigger('texttrackchange')};var textTracksChanges=function textTracksChanges(){updateDisplay();for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:{};var manualCleanup=arguments[1];var htmlTrackElement=this.createRemoteTextTrack(options);if(manualCleanup!==!0&&manualCleanup!==!1){log$1.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js');manualCleanup=!0} this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);this.remoteTextTracks().addTrack(htmlTrackElement.track);if(manualCleanup!==!0){this.ready(function(){return _this6.autoRemoteTextTracks_.addTrack(htmlTrackElement.track)})} return htmlTrackElement};Tech.prototype.removeRemoteTextTrack=function removeRemoteTextTrack(track){var trackElement=this.remoteTextTrackEls().getTrackElementByTrack_(track);this.remoteTextTrackEls().removeTrackElement_(trackElement);this.remoteTextTracks().removeTrack(track);this.autoRemoteTextTracks_.removeTrack(track)};Tech.prototype.getVideoPlaybackQuality=function getVideoPlaybackQuality(){return{}};Tech.prototype.setPoster=function setPoster(){};Tech.prototype.playsinline=function playsinline(){};Tech.prototype.setPlaysinline=function setPlaysinline(){};Tech.prototype.canPlayType=function canPlayType(){return''};Tech.canPlayType=function canPlayType(){return''};Tech.canPlaySource=function canPlaySource(srcObj,options){return Tech.canPlayType(srcObj.type)};Tech.isTech=function isTech(component){return component.prototype instanceof Tech||component instanceof Tech||component===Tech};Tech.registerTech=function registerTech(name,tech){if(!Tech.techs_){Tech.techs_={}} if(!Tech.isTech(tech)){throw new Error('Tech '+name+' must be a Tech')} if(!Tech.canPlayType){throw new Error('Techs must have a static canPlayType method on them')} if(!Tech.canPlaySource){throw new Error('Techs must have a static canPlaySource method on them')} name=toTitleCase(name);Tech.techs_[name]=tech;if(name!=='Tech'){Tech.defaultTechOrder_.push(name)} return tech};Tech.getTech=function getTech(name){if(!name){return} name=toTitleCase(name);if(Tech.techs_&&Tech.techs_[name]){return Tech.techs_[name]} if(window_1&&window_1.videojs&&window_1.videojs[name]){log$1.warn('The '+name+' tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)');return window_1.videojs[name]}};return Tech}(Component);ALL.names.forEach(function(name){var props=ALL[name];Tech.prototype[props.getterName]=function(){this[props.privateName]=this[props.privateName]||new props.ListClass();return this[props.privateName]}});Tech.prototype.featuresVolumeControl=!0;Tech.prototype.featuresFullscreenResize=!1;Tech.prototype.featuresPlaybackRate=!1;Tech.prototype.featuresProgressEvents=!1;Tech.prototype.featuresTimeupdateEvents=!1;Tech.prototype.featuresNativeTextTracks=!1;Tech.withSourceHandlers=function(_Tech){_Tech.registerSourceHandler=function(handler,index){var handlers=_Tech.sourceHandlers;if(!handlers){handlers=_Tech.sourceHandlers=[]} if(index===undefined){index=handlers.length} handlers.splice(index,0,handler)};_Tech.canPlayType=function(type){var handlers=_Tech.sourceHandlers||[];var can=void 0;for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:{};var middleware=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var next=arguments[2];var player=arguments[3];var acc=arguments.length>4&&arguments[4]!==undefined?arguments[4]:[];var lastRun=arguments.length>5&&arguments[5]!==undefined?arguments[5]:!1;var mwFactory=middleware[0],mwrest=middleware.slice(1);if(typeof mwFactory==='string'){setSourceHelper(src,middlewares[mwFactory],next,player,acc,lastRun)}else if(mwFactory){var mw=mwFactory(player);mw.setSource(assign({},src),function(err,_src){if(err){return setSourceHelper(src,mwrest,next,player,acc,lastRun)} acc.push(mw);setSourceHelper(_src,src.type===_src.type?mwrest:middlewares[_src.type],next,player,acc,lastRun)})}else if(mwrest.length){setSourceHelper(src,mwrest,next,player,acc,lastRun)}else if(lastRun){next(src,acc)}else{setSourceHelper(src,middlewares['*'],next,player,acc,!0)}} var filterSource=function filterSource(src){if(Array.isArray(src)){var newsrc=[];src.forEach(function(srcobj){srcobj=filterSource(srcobj);if(Array.isArray(srcobj)){newsrc=newsrc.concat(srcobj)}else if(isObject(srcobj)){newsrc.push(srcobj)}});src=newsrc}else if(typeof src==='string'&&src.trim()){src=[{src:src}]}else if(isObject(src)&&typeof src.src==='string'&&src.src&&src.src.trim()){src=[src]}else{src=[]} return src};var MediaLoader=function(_Component){inherits(MediaLoader,_Component);function MediaLoader(player,options,ready){classCallCheck(this,MediaLoader);var options_=mergeOptions({createEl:!1},options);var _this=possibleConstructorReturn(this,_Component.call(this,player,options_,ready));if(!options.playerOptions.sources||options.playerOptions.sources.length===0){for(var i=0,j=options.playerOptions.techOrder;i0&&arguments[0]!==undefined?arguments[0]:'div';var props=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var attributes=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};props=assign({innerHTML:'',className:this.buildCSSClass(),tabIndex:0},props);if(tag==='button'){log$1.error('Creating a ClickableComponent with an HTML element of '+tag+' is not supported; use a Button instead.')} attributes=assign({'role':'button','aria-live':'polite'},attributes);this.tabIndex_=props.tabIndex;var el=_Component.prototype.createEl.call(this,tag,props,attributes);this.createControlTextEl(el);return el};ClickableComponent.prototype.dispose=function dispose(){this.controlTextEl_=null;_Component.prototype.dispose.call(this)};ClickableComponent.prototype.createControlTextEl=function createControlTextEl(el){this.controlTextEl_=createEl('span',{className:'vjs-control-text'});if(el){el.appendChild(this.controlTextEl_)} this.controlText(this.controlText_,el);return this.controlTextEl_};ClickableComponent.prototype.controlText=function controlText(text){var el=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.el();if(text===undefined){return this.controlText_||'Need Text'} var localizedText=this.localize(text);this.controlText_=text;textContent(this.controlTextEl_,localizedText);if(!this.nonIconControl){el.setAttribute('title',localizedText)}};ClickableComponent.prototype.buildCSSClass=function buildCSSClass(){return'vjs-control vjs-button '+_Component.prototype.buildCSSClass.call(this)};ClickableComponent.prototype.enable=function enable(){if(!this.enabled_){this.enabled_=!0;this.removeClass('vjs-disabled');this.el_.setAttribute('aria-disabled','false');if(typeof this.tabIndex_!=='undefined'){this.el_.setAttribute('tabIndex',this.tabIndex_)} this.on(['tap','click'],this.handleClick);this.on('focus',this.handleFocus);this.on('blur',this.handleBlur)}};ClickableComponent.prototype.disable=function disable(){this.enabled_=!1;this.addClass('vjs-disabled');this.el_.setAttribute('aria-disabled','true');if(typeof this.tabIndex_!=='undefined'){this.el_.removeAttribute('tabIndex')} this.off(['tap','click'],this.handleClick);this.off('focus',this.handleFocus);this.off('blur',this.handleBlur)};ClickableComponent.prototype.handleClick=function handleClick(event){};ClickableComponent.prototype.handleFocus=function handleFocus(event){on(document_1,'keydown',bind(this,this.handleKeyPress))};ClickableComponent.prototype.handleKeyPress=function handleKeyPress(event){if(event.which===32||event.which===13){event.preventDefault();this.trigger('click')}else if(_Component.prototype.handleKeyPress){_Component.prototype.handleKeyPress.call(this,event)}};ClickableComponent.prototype.handleBlur=function handleBlur(event){off(document_1,'keydown',bind(this,this.handleKeyPress))};return ClickableComponent}(Component);Component.registerComponent('ClickableComponent',ClickableComponent);var PosterImage=function(_ClickableComponent){inherits(PosterImage,_ClickableComponent);function PosterImage(player,options){classCallCheck(this,PosterImage);var _this=possibleConstructorReturn(this,_ClickableComponent.call(this,player,options));_this.update();player.on('posterchange',bind(_this,_this.update));return _this} PosterImage.prototype.dispose=function dispose(){this.player().off('posterchange',this.update);_ClickableComponent.prototype.dispose.call(this)};PosterImage.prototype.createEl=function createEl$$1(){var el=createEl('div',{className:'vjs-poster',tabIndex:-1});if(!BACKGROUND_SIZE_SUPPORTED){this.fallbackImg_=createEl('img');el.appendChild(this.fallbackImg_)} return el};PosterImage.prototype.update=function update(event){var url=this.player().poster();this.setSrc(url);if(url){this.show()}else{this.hide()}};PosterImage.prototype.setSrc=function setSrc(url){if(this.fallbackImg_){this.fallbackImg_.src=url}else{var backgroundImage='';if(url){backgroundImage='url("'+url+'")'} this.el_.style.backgroundImage=backgroundImage}};PosterImage.prototype.handleClick=function handleClick(event){if(!this.player_.controls()){return} if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};return PosterImage}(ClickableComponent);Component.registerComponent('PosterImage',PosterImage);var darkGray='#222';var lightGray='#ccc';var fontMap={monospace:'monospace',sansSerif:'sans-serif',serif:'serif',monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:'sans-serif',proportionalSerif:'serif',casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function constructColor(color,opacity){return'rgba('+parseInt(color[1]+color[1],16)+','+parseInt(color[2]+color[2],16)+','+parseInt(color[3]+color[3],16)+','+opacity+')'} function tryUpdateStyle(el,style,rule){try{el.style[style]=rule}catch(e){return}} var TextTrackDisplay=function(_Component){inherits(TextTrackDisplay,_Component);function TextTrackDisplay(player,options,ready){classCallCheck(this,TextTrackDisplay);var _this=possibleConstructorReturn(this,_Component.call(this,player,options,ready));player.on('loadstart',bind(_this,_this.toggleDisplay));player.on('texttrackchange',bind(_this,_this.updateDisplay));player.on('loadstart',bind(_this,_this.preselectTrack));player.ready(bind(_this,function(){if(player.tech_&&player.tech_.featuresNativeTextTracks){this.hide();return} player.on('fullscreenchange',bind(this,this.updateDisplay));var tracks=this.options_.playerOptions.tracks||[];for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:{};var attributes=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};tag='button';props=assign({innerHTML:'',className:this.buildCSSClass()},props);attributes=assign({'type':'button','aria-live':'polite'},attributes);var el=Component.prototype.createEl.call(this,tag,props,attributes);this.createControlTextEl(el);return el};Button.prototype.addChild=function addChild(child){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var className=this.constructor.name;log$1.warn('Adding an actionable (user controllable) child to a Button ('+className+') is not supported; use a ClickableComponent instead.');return Component.prototype.addChild.call(this,child,options)};Button.prototype.enable=function enable(){_ClickableComponent.prototype.enable.call(this);this.el_.removeAttribute('disabled')};Button.prototype.disable=function disable(){_ClickableComponent.prototype.disable.call(this);this.el_.setAttribute('disabled','disabled')};Button.prototype.handleKeyPress=function handleKeyPress(event){if(event.which===32||event.which===13){return} _ClickableComponent.prototype.handleKeyPress.call(this,event)};return Button}(ClickableComponent);Component.registerComponent('Button',Button);var BigPlayButton=function(_Button){inherits(BigPlayButton,_Button);function BigPlayButton(player,options){classCallCheck(this,BigPlayButton);var _this=possibleConstructorReturn(this,_Button.call(this,player,options));_this.mouseused_=!1;_this.on('mousedown',_this.handleMouseDown);return _this} BigPlayButton.prototype.buildCSSClass=function buildCSSClass(){return'vjs-big-play-button'};BigPlayButton.prototype.handleClick=function handleClick(event){var playPromise=this.player_.play();if(this.mouseused_&&event.clientX&&event.clientY){return} var cb=this.player_.getChild('controlBar');var playToggle=cb&&cb.getChild('playToggle');if(!playToggle){this.player_.focus();return} var playFocus=function playFocus(){return playToggle.focus()};if(isPromise(playPromise)){playPromise.then(playFocus,function(){})}else{this.setTimeout(playFocus,1)}};BigPlayButton.prototype.handleKeyPress=function handleKeyPress(event){this.mouseused_=!1;_Button.prototype.handleKeyPress.call(this,event)};BigPlayButton.prototype.handleMouseDown=function handleMouseDown(event){this.mouseused_=!0};return BigPlayButton}(Button);BigPlayButton.prototype.controlText_='Play Video';Component.registerComponent('BigPlayButton',BigPlayButton);var CloseButton=function(_Button){inherits(CloseButton,_Button);function CloseButton(player,options){classCallCheck(this,CloseButton);var _this=possibleConstructorReturn(this,_Button.call(this,player,options));_this.controlText(options&&options.controlText||_this.localize('Close'));return _this} CloseButton.prototype.buildCSSClass=function buildCSSClass(){return'vjs-close-button '+_Button.prototype.buildCSSClass.call(this)};CloseButton.prototype.handleClick=function handleClick(event){this.trigger({type:'close',bubbles:!1})};return CloseButton}(Button);Component.registerComponent('CloseButton',CloseButton);var PlayToggle=function(_Button){inherits(PlayToggle,_Button);function PlayToggle(player,options){classCallCheck(this,PlayToggle);var _this=possibleConstructorReturn(this,_Button.call(this,player,options));_this.on(player,'play',_this.handlePlay);_this.on(player,'pause',_this.handlePause);_this.on(player,'ended',_this.handleEnded);return _this} PlayToggle.prototype.buildCSSClass=function buildCSSClass(){return'vjs-play-control '+_Button.prototype.buildCSSClass.call(this)};PlayToggle.prototype.handleClick=function handleClick(event){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};PlayToggle.prototype.handleSeeked=function handleSeeked(event){this.removeClass('vjs-ended');if(this.player_.paused()){this.handlePause(event)}else{this.handlePlay(event)}};PlayToggle.prototype.handlePlay=function handlePlay(event){this.removeClass('vjs-ended');this.removeClass('vjs-paused');this.addClass('vjs-playing');this.controlText('Pause')};PlayToggle.prototype.handlePause=function handlePause(event){this.removeClass('vjs-playing');this.addClass('vjs-paused');this.controlText('Play')};PlayToggle.prototype.handleEnded=function handleEnded(event){this.removeClass('vjs-playing');this.addClass('vjs-ended');this.controlText('Replay');this.one(this.player_,'seeked',this.handleSeeked)};return PlayToggle}(Button);PlayToggle.prototype.controlText_='Play';Component.registerComponent('PlayToggle',PlayToggle);function formatTime(seconds){var guide=arguments.length>1&&arguments[1]!==undefined?arguments[1]:seconds;seconds=seconds<0?0:seconds;var s=Math.floor(seconds%60);var m=Math.floor(seconds/60%60);var h=Math.floor(seconds/3600);var gm=Math.floor(guide/60%60);var gh=Math.floor(guide/3600);if(isNaN(seconds)||seconds===Infinity){h=m=s='-'} h=h>0||gh>0?h+':':'';m=((h||gm>=10)&&m<10?'0'+m:m)+':';s=s<10?'0'+s:s;return h+m+s} var TimeDisplay=function(_Component){inherits(TimeDisplay,_Component);function TimeDisplay(player,options){classCallCheck(this,TimeDisplay);var _this=possibleConstructorReturn(this,_Component.call(this,player,options));_this.throttledUpdateContent=throttle(bind(_this,_this.updateContent),25);_this.on(player,'timeupdate',_this.throttledUpdateContent);return _this} TimeDisplay.prototype.createEl=function createEl$$1(plainName){var className=this.buildCSSClass();var el=_Component.prototype.createEl.call(this,'div',{className:className+' vjs-time-control vjs-control'});this.contentEl_=createEl('div',{className:className+'-display'},{'aria-live':'off'},createEl('span',{className:'vjs-control-text',textContent:this.localize(this.controlText_)}));this.updateTextNode_();el.appendChild(this.contentEl_);return el};TimeDisplay.prototype.dispose=function dispose(){this.contentEl_=null;this.textNode_=null;_Component.prototype.dispose.call(this)};TimeDisplay.prototype.updateTextNode_=function updateTextNode_(){if(!this.contentEl_){return} while(this.contentEl_.firstChild){this.contentEl_.removeChild(this.contentEl_.firstChild)} this.textNode_=document_1.createTextNode(this.formattedTime_||'0:00');this.contentEl_.appendChild(this.textNode_)};TimeDisplay.prototype.formatTime_=function formatTime_(time){return formatTime(time)};TimeDisplay.prototype.updateFormattedTime_=function updateFormattedTime_(time){var formattedTime=this.formatTime_(time);if(formattedTime===this.formattedTime_){return} this.formattedTime_=formattedTime;this.requestAnimationFrame(this.updateTextNode_)};TimeDisplay.prototype.updateContent=function updateContent(event){};return TimeDisplay}(Component);TimeDisplay.prototype.controlText_='Time';Component.registerComponent('TimeDisplay',TimeDisplay);var CurrentTimeDisplay=function(_TimeDisplay){inherits(CurrentTimeDisplay,_TimeDisplay);function CurrentTimeDisplay(player,options){classCallCheck(this,CurrentTimeDisplay);var _this=possibleConstructorReturn(this,_TimeDisplay.call(this,player,options));_this.on(player,'ended',_this.handleEnded);return _this} CurrentTimeDisplay.prototype.buildCSSClass=function buildCSSClass(){return'vjs-current-time'};CurrentTimeDisplay.prototype.updateContent=function updateContent(event){var time=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(time)};CurrentTimeDisplay.prototype.handleEnded=function handleEnded(event){if(!this.player_.duration()){return} this.updateFormattedTime_(this.player_.duration())};return CurrentTimeDisplay}(TimeDisplay);CurrentTimeDisplay.prototype.controlText_='Current Time';Component.registerComponent('CurrentTimeDisplay',CurrentTimeDisplay);var DurationDisplay=function(_TimeDisplay){inherits(DurationDisplay,_TimeDisplay);function DurationDisplay(player,options){classCallCheck(this,DurationDisplay);var _this=possibleConstructorReturn(this,_TimeDisplay.call(this,player,options));_this.on(player,'durationchange',_this.updateContent);_this.on(player,'loadedmetadata',_this.throttledUpdateContent);return _this} DurationDisplay.prototype.buildCSSClass=function buildCSSClass(){return'vjs-duration'};DurationDisplay.prototype.updateContent=function updateContent(event){var duration=this.player_.duration();if(duration&&this.duration_!==duration){this.duration_=duration;this.updateFormattedTime_(duration)}};return DurationDisplay}(TimeDisplay);DurationDisplay.prototype.controlText_='Duration Time';Component.registerComponent('DurationDisplay',DurationDisplay);var TimeDivider=function(_Component){inherits(TimeDivider,_Component);function TimeDivider(){classCallCheck(this,TimeDivider);return possibleConstructorReturn(this,_Component.apply(this,arguments))} TimeDivider.prototype.createEl=function createEl(){return _Component.prototype.createEl.call(this,'div',{className:'vjs-time-control vjs-time-divider',innerHTML:'
    /
    '})};return TimeDivider}(Component);Component.registerComponent('TimeDivider',TimeDivider);var RemainingTimeDisplay=function(_TimeDisplay){inherits(RemainingTimeDisplay,_TimeDisplay);function RemainingTimeDisplay(player,options){classCallCheck(this,RemainingTimeDisplay);var _this=possibleConstructorReturn(this,_TimeDisplay.call(this,player,options));_this.on(player,'durationchange',_this.throttledUpdateContent);_this.on(player,'ended',_this.handleEnded);return _this} RemainingTimeDisplay.prototype.buildCSSClass=function buildCSSClass(){return'vjs-remaining-time'};RemainingTimeDisplay.prototype.formatTime_=function formatTime_(time){return'-'+_TimeDisplay.prototype.formatTime_.call(this,time)};RemainingTimeDisplay.prototype.updateContent=function updateContent(event){if(!this.player_.duration()){return} if(this.player_.remainingTimeDisplay){this.updateFormattedTime_(this.player_.remainingTimeDisplay())}else{this.updateFormattedTime_(this.player_.remainingTime())}};RemainingTimeDisplay.prototype.handleEnded=function handleEnded(event){if(!this.player_.duration()){return} this.updateFormattedTime_(0)};return RemainingTimeDisplay}(TimeDisplay);RemainingTimeDisplay.prototype.controlText_='Remaining Time';Component.registerComponent('RemainingTimeDisplay',RemainingTimeDisplay);var LiveDisplay=function(_Component){inherits(LiveDisplay,_Component);function LiveDisplay(player,options){classCallCheck(this,LiveDisplay);var _this=possibleConstructorReturn(this,_Component.call(this,player,options));_this.updateShowing();_this.on(_this.player(),'durationchange',_this.updateShowing);return _this} LiveDisplay.prototype.createEl=function createEl$$1(){var el=_Component.prototype.createEl.call(this,'div',{className:'vjs-live-control vjs-control'});this.contentEl_=createEl('div',{className:'vjs-live-display',innerHTML:''+this.localize('Stream Type')+''+this.localize('LIVE')},{'aria-live':'off'});el.appendChild(this.contentEl_);return el};LiveDisplay.prototype.dispose=function dispose(){this.contentEl_=null;_Component.prototype.dispose.call(this)};LiveDisplay.prototype.updateShowing=function updateShowing(event){if(this.player().duration()===Infinity){this.show()}else{this.hide()}};return LiveDisplay}(Component);Component.registerComponent('LiveDisplay',LiveDisplay);var Slider=function(_Component){inherits(Slider,_Component);function Slider(player,options){classCallCheck(this,Slider);var _this=possibleConstructorReturn(this,_Component.call(this,player,options));_this.bar=_this.getChild(_this.options_.barName);_this.vertical(!!_this.options_.vertical);_this.enable();return _this} Slider.prototype.enabled=function enabled(){return this.enabled_};Slider.prototype.enable=function enable(){if(this.enabled()){return} this.on('mousedown',this.handleMouseDown);this.on('touchstart',this.handleMouseDown);this.on('focus',this.handleFocus);this.on('blur',this.handleBlur);this.on('click',this.handleClick);this.on(this.player_,'controlsvisible',this.update);if(this.playerEvent){this.on(this.player_,this.playerEvent,this.update)} this.removeClass('disabled');this.setAttribute('tabindex',0);this.enabled_=!0};Slider.prototype.disable=function disable(){if(!this.enabled()){return} var doc=this.bar.el_.ownerDocument;this.off('mousedown',this.handleMouseDown);this.off('touchstart',this.handleMouseDown);this.off('focus',this.handleFocus);this.off('blur',this.handleBlur);this.off('click',this.handleClick);this.off(this.player_,'controlsvisible',this.update);this.off(doc,'mousemove',this.handleMouseMove);this.off(doc,'mouseup',this.handleMouseUp);this.off(doc,'touchmove',this.handleMouseMove);this.off(doc,'touchend',this.handleMouseUp);this.removeAttribute('tabindex');this.addClass('disabled');if(this.playerEvent){this.off(this.player_,this.playerEvent,this.update)} this.enabled_=!1};Slider.prototype.createEl=function createEl$$1(type){var props=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var attributes=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};props.className=props.className+' vjs-slider';props=assign({tabIndex:0},props);attributes=assign({'role':'slider','aria-valuenow':0,'aria-valuemin':0,'aria-valuemax':100,'tabIndex':0},attributes);return _Component.prototype.createEl.call(this,type,props,attributes)};Slider.prototype.handleMouseDown=function handleMouseDown(event){var doc=this.bar.el_.ownerDocument;event.preventDefault();blockTextSelection();this.addClass('vjs-sliding');this.trigger('slideractive');this.on(doc,'mousemove',this.handleMouseMove);this.on(doc,'mouseup',this.handleMouseUp);this.on(doc,'touchmove',this.handleMouseMove);this.on(doc,'touchend',this.handleMouseUp);this.handleMouseMove(event)};Slider.prototype.handleMouseMove=function handleMouseMove(event){};Slider.prototype.handleMouseUp=function handleMouseUp(){var doc=this.bar.el_.ownerDocument;unblockTextSelection();this.removeClass('vjs-sliding');this.trigger('sliderinactive');this.off(doc,'mousemove',this.handleMouseMove);this.off(doc,'mouseup',this.handleMouseUp);this.off(doc,'touchmove',this.handleMouseMove);this.off(doc,'touchend',this.handleMouseUp);this.update()};Slider.prototype.update=function update(){if(!this.el_){return} var progress=this.getPercent();var bar=this.bar;if(!bar){return} if(typeof progress!=='number'||progress!==progress||progress<0||progress===Infinity){progress=0} var percentage=(progress*100).toFixed(2)+'%';var style=bar.el().style;if(this.vertical()){style.height=percentage}else{style.width=percentage} return progress};Slider.prototype.calculateDistance=function calculateDistance(event){var position=getPointerPosition(this.el_,event);if(this.vertical()){return position.y} return position.x};Slider.prototype.handleFocus=function handleFocus(){this.on(this.bar.el_.ownerDocument,'keydown',this.handleKeyPress)};Slider.prototype.handleKeyPress=function handleKeyPress(event){if(event.which===37||event.which===40){event.preventDefault();this.stepBack()}else if(event.which===38||event.which===39){event.preventDefault();this.stepForward()}};Slider.prototype.handleBlur=function handleBlur(){this.off(this.bar.el_.ownerDocument,'keydown',this.handleKeyPress)};Slider.prototype.handleClick=function handleClick(event){event.stopImmediatePropagation();event.preventDefault()};Slider.prototype.vertical=function vertical(bool){if(bool===undefined){return this.vertical_||!1} this.vertical_=!!bool;if(this.vertical_){this.addClass('vjs-slider-vertical')}else{this.addClass('vjs-slider-horizontal')}};return Slider}(Component);Component.registerComponent('Slider',Slider);var LoadProgressBar=function(_Component){inherits(LoadProgressBar,_Component);function LoadProgressBar(player,options){classCallCheck(this,LoadProgressBar);var _this=possibleConstructorReturn(this,_Component.call(this,player,options));_this.partEls_=[];_this.on(player,'progress',_this.update);return _this} LoadProgressBar.prototype.createEl=function createEl$$1(){return _Component.prototype.createEl.call(this,'div',{className:'vjs-load-progress',innerHTML:''+this.localize('Loaded')+': 0%'})};LoadProgressBar.prototype.dispose=function dispose(){this.partEls_=null;_Component.prototype.dispose.call(this)};LoadProgressBar.prototype.update=function update(event){var buffered=this.player_.buffered();var duration=this.player_.duration();var bufferedEnd=this.player_.bufferedEnd();var children=this.partEls_;var percentify=function percentify(time,end){var percent=time/end||0;return(percent>=1?1:percent)*100+'%'};this.el_.style.width=percentify(bufferedEnd,duration);for(var i=0;ibuffered.length;_i--){this.el_.removeChild(children[_i-1])} children.length=buffered.length};return LoadProgressBar}(Component);Component.registerComponent('LoadProgressBar',LoadProgressBar);var TimeTooltip=function(_Component){inherits(TimeTooltip,_Component);function TimeTooltip(){classCallCheck(this,TimeTooltip);return possibleConstructorReturn(this,_Component.apply(this,arguments))} TimeTooltip.prototype.createEl=function createEl$$1(){return _Component.prototype.createEl.call(this,'div',{className:'vjs-time-tooltip'})};TimeTooltip.prototype.update=function update(seekBarRect,seekBarPoint,content){var tooltipRect=getBoundingClientRect(this.el_);var playerRect=getBoundingClientRect(this.player_.el());var seekBarPointPx=seekBarRect.width*seekBarPoint;if(!playerRect||!tooltipRect){return} var spaceLeftOfPoint=seekBarRect.left-playerRect.left+seekBarPointPx;var spaceRightOfPoint=seekBarRect.width-seekBarPointPx+(playerRect.right-seekBarRect.right);var pullTooltipBy=tooltipRect.width/2;if(spaceLeftOfPointtooltipRect.width){pullTooltipBy=tooltipRect.width} this.el_.style.right='-'+pullTooltipBy+'px';textContent(this.el_,content)};return TimeTooltip}(Component);Component.registerComponent('TimeTooltip',TimeTooltip);var PlayProgressBar=function(_Component){inherits(PlayProgressBar,_Component);function PlayProgressBar(){classCallCheck(this,PlayProgressBar);return possibleConstructorReturn(this,_Component.apply(this,arguments))} PlayProgressBar.prototype.createEl=function createEl(){return _Component.prototype.createEl.call(this,'div',{className:'vjs-play-progress vjs-slider-bar',innerHTML:''+this.localize('Progress')+': 0%'})};PlayProgressBar.prototype.update=function update(seekBarRect,seekBarPoint){var _this2=this;if(this.rafId_){this.cancelAnimationFrame(this.rafId_)} this.rafId_=this.requestAnimationFrame(function(){var time=_this2.player_.scrubbing()?_this2.player_.getCache().currentTime:_this2.player_.currentTime();var content=formatTime(time,_this2.player_.duration());var timeTooltip=_this2.getChild('timeTooltip');if(timeTooltip){timeTooltip.update(seekBarRect,seekBarPoint,content)}})};return PlayProgressBar}(Component);PlayProgressBar.prototype.options_={children:[]};if((!IE_VERSION||IE_VERSION>8)&&!IS_IOS&&!IS_ANDROID){PlayProgressBar.prototype.options_.children.push('timeTooltip')} Component.registerComponent('PlayProgressBar',PlayProgressBar);var MouseTimeDisplay=function(_Component){inherits(MouseTimeDisplay,_Component);function MouseTimeDisplay(player,options){classCallCheck(this,MouseTimeDisplay);var _this=possibleConstructorReturn(this,_Component.call(this,player,options));_this.update=throttle(bind(_this,_this.update),25);return _this} MouseTimeDisplay.prototype.createEl=function createEl(){return _Component.prototype.createEl.call(this,'div',{className:'vjs-mouse-display'})};MouseTimeDisplay.prototype.update=function update(seekBarRect,seekBarPoint){var _this2=this;if(this.rafId_){this.cancelAnimationFrame(this.rafId_)} this.rafId_=this.requestAnimationFrame(function(){var duration=_this2.player_.duration();var content=formatTime(seekBarPoint*duration,duration);_this2.el_.style.left=seekBarRect.width*seekBarPoint+'px';_this2.getChild('timeTooltip').update(seekBarRect,seekBarPoint,content)})};return MouseTimeDisplay}(Component);MouseTimeDisplay.prototype.options_={children:['timeTooltip']};Component.registerComponent('MouseTimeDisplay',MouseTimeDisplay);var STEP_SECONDS=5;var UPDATE_REFRESH_INTERVAL=30;var SeekBar=function(_Slider){inherits(SeekBar,_Slider);function SeekBar(player,options){classCallCheck(this,SeekBar);var _this=possibleConstructorReturn(this,_Slider.call(this,player,options));_this.update=throttle(bind(_this,_this.update),UPDATE_REFRESH_INTERVAL);_this.on(player,'timeupdate',_this.update);_this.on(player,'ended',_this.handleEnded);_this.updateInterval=null;_this.on(player,['playing'],function(){_this.clearInterval(_this.updateInterval);_this.updateInterval=_this.setInterval(function(){_this.requestAnimationFrame(function(){_this.update()})},UPDATE_REFRESH_INTERVAL)});_this.on(player,['ended','pause','waiting'],function(){_this.clearInterval(_this.updateInterval)});_this.on(player,['timeupdate','ended'],_this.update);return _this} SeekBar.prototype.createEl=function createEl$$1(){return _Slider.prototype.createEl.call(this,'div',{className:'vjs-progress-holder'},{'aria-label':this.localize('Progress Bar')})};SeekBar.prototype.update_=function update_(currentTime,percent){var duration=this.player_.duration();this.el_.setAttribute('aria-valuenow',(percent*100).toFixed(2));this.el_.setAttribute('aria-valuetext',this.localize('progress bar timing: currentTime={1} duration={2}',[formatTime(currentTime,duration),formatTime(duration,duration)],'{1} of {2}'));this.bar.update(getBoundingClientRect(this.el_),percent)};SeekBar.prototype.update=function update(event){var percent=_Slider.prototype.update.call(this);this.update_(this.getCurrentTime_(),percent);return percent};SeekBar.prototype.getCurrentTime_=function getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()};SeekBar.prototype.handleEnded=function handleEnded(event){this.update_(this.player_.duration(),1)};SeekBar.prototype.getPercent=function getPercent(){var percent=this.getCurrentTime_()/this.player_.duration();return percent>=1?1:percent};SeekBar.prototype.handleMouseDown=function handleMouseDown(event){if(!isSingleLeftClick(event)){return} this.player_.scrubbing(!0);this.videoWasPlaying=!this.player_.paused();this.player_.pause();_Slider.prototype.handleMouseDown.call(this,event)};SeekBar.prototype.handleMouseMove=function handleMouseMove(event){if(!isSingleLeftClick(event)){return} var newTime=this.calculateDistance(event)*this.player_.duration();if(newTime===this.player_.duration()){newTime=newTime-0.1} this.player_.currentTime(newTime)};SeekBar.prototype.enable=function enable(){_Slider.prototype.enable.call(this);var mouseTimeDisplay=this.getChild('mouseTimeDisplay');if(!mouseTimeDisplay){return} mouseTimeDisplay.show()};SeekBar.prototype.disable=function disable(){_Slider.prototype.disable.call(this);var mouseTimeDisplay=this.getChild('mouseTimeDisplay');if(!mouseTimeDisplay){return} mouseTimeDisplay.hide()};SeekBar.prototype.handleMouseUp=function handleMouseUp(event){_Slider.prototype.handleMouseUp.call(this,event);this.player_.scrubbing(!1);this.player_.trigger({type:'timeupdate',target:this,manuallyTriggered:!0});if(this.videoWasPlaying){this.player_.play()}};SeekBar.prototype.stepForward=function stepForward(){this.player_.currentTime(this.player_.currentTime()+STEP_SECONDS)};SeekBar.prototype.stepBack=function stepBack(){this.player_.currentTime(this.player_.currentTime()-STEP_SECONDS)};SeekBar.prototype.handleAction=function handleAction(event){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};SeekBar.prototype.handleKeyPress=function handleKeyPress(event){if(event.which===32||event.which===13){event.preventDefault();this.handleAction(event)}else if(_Slider.prototype.handleKeyPress){_Slider.prototype.handleKeyPress.call(this,event)}};return SeekBar}(Slider);SeekBar.prototype.options_={children:['loadProgressBar','playProgressBar'],barName:'playProgressBar'};if((!IE_VERSION||IE_VERSION>8)&&!IS_IOS&&!IS_ANDROID){SeekBar.prototype.options_.children.splice(1,0,'mouseTimeDisplay')} SeekBar.prototype.playerEvent='timeupdate';Component.registerComponent('SeekBar',SeekBar);var ProgressControl=function(_Component){inherits(ProgressControl,_Component);function ProgressControl(player,options){classCallCheck(this,ProgressControl);var _this=possibleConstructorReturn(this,_Component.call(this,player,options));_this.handleMouseMove=throttle(bind(_this,_this.handleMouseMove),25);_this.throttledHandleMouseSeek=throttle(bind(_this,_this.handleMouseSeek),25);_this.enable();return _this} ProgressControl.prototype.createEl=function createEl$$1(){return _Component.prototype.createEl.call(this,'div',{className:'vjs-progress-control vjs-control'})};ProgressControl.prototype.handleMouseMove=function handleMouseMove(event){var seekBar=this.getChild('seekBar');var mouseTimeDisplay=seekBar.getChild('mouseTimeDisplay');var seekBarEl=seekBar.el();var seekBarRect=getBoundingClientRect(seekBarEl);var seekBarPoint=getPointerPosition(seekBarEl,event).x;if(seekBarPoint>1){seekBarPoint=1}else if(seekBarPoint<0){seekBarPoint=0} if(mouseTimeDisplay){mouseTimeDisplay.update(seekBarRect,seekBarPoint)}};ProgressControl.prototype.handleMouseSeek=function handleMouseSeek(event){var seekBar=this.getChild('seekBar');seekBar.handleMouseMove(event)};ProgressControl.prototype.enabled=function enabled(){return this.enabled_};ProgressControl.prototype.disable=function disable(){this.children().forEach(function(child){return child.disable&&child.disable()});if(!this.enabled()){return} this.off(['mousedown','touchstart'],this.handleMouseDown);this.off(this.el_,'mousemove',this.handleMouseMove);this.handleMouseUp();this.addClass('disabled');this.enabled_=!1};ProgressControl.prototype.enable=function enable(){this.children().forEach(function(child){return child.enable&&child.enable()});if(this.enabled()){return} this.on(['mousedown','touchstart'],this.handleMouseDown);this.on(this.el_,'mousemove',this.handleMouseMove);this.removeClass('disabled');this.enabled_=!0};ProgressControl.prototype.handleMouseDown=function handleMouseDown(event){var doc=this.el_.ownerDocument;this.on(doc,'mousemove',this.throttledHandleMouseSeek);this.on(doc,'touchmove',this.throttledHandleMouseSeek);this.on(doc,'mouseup',this.handleMouseUp);this.on(doc,'touchend',this.handleMouseUp)};ProgressControl.prototype.handleMouseUp=function handleMouseUp(event){var doc=this.el_.ownerDocument;this.off(doc,'mousemove',this.throttledHandleMouseSeek);this.off(doc,'touchmove',this.throttledHandleMouseSeek);this.off(doc,'mouseup',this.handleMouseUp);this.off(doc,'touchend',this.handleMouseUp)};return ProgressControl}(Component);ProgressControl.prototype.options_={children:['seekBar']};Component.registerComponent('ProgressControl',ProgressControl);var FullscreenToggle=function(_Button){inherits(FullscreenToggle,_Button);function FullscreenToggle(player,options){classCallCheck(this,FullscreenToggle);var _this=possibleConstructorReturn(this,_Button.call(this,player,options));_this.on(player,'fullscreenchange',_this.handleFullscreenChange);return _this} FullscreenToggle.prototype.buildCSSClass=function buildCSSClass(){return'vjs-fullscreen-control '+_Button.prototype.buildCSSClass.call(this)};FullscreenToggle.prototype.handleFullscreenChange=function handleFullscreenChange(event){if(this.player_.isFullscreen()){this.controlText('Non-Fullscreen')}else{this.controlText('Fullscreen')}};FullscreenToggle.prototype.handleClick=function handleClick(event){if(!this.player_.isFullscreen()){this.player_.requestFullscreen()}else{this.player_.exitFullscreen()}};return FullscreenToggle}(Button);FullscreenToggle.prototype.controlText_='Fullscreen';Component.registerComponent('FullscreenToggle',FullscreenToggle);var checkVolumeSupport=function checkVolumeSupport(self,player){if(player.tech_&&!player.tech_.featuresVolumeControl){self.addClass('vjs-hidden')} self.on(player,'loadstart',function(){if(!player.tech_.featuresVolumeControl){self.addClass('vjs-hidden')}else{self.removeClass('vjs-hidden')}})};var VolumeLevel=function(_Component){inherits(VolumeLevel,_Component);function VolumeLevel(){classCallCheck(this,VolumeLevel);return possibleConstructorReturn(this,_Component.apply(this,arguments))} VolumeLevel.prototype.createEl=function createEl(){return _Component.prototype.createEl.call(this,'div',{className:'vjs-volume-level',innerHTML:''})};return VolumeLevel}(Component);Component.registerComponent('VolumeLevel',VolumeLevel);var VolumeBar=function(_Slider){inherits(VolumeBar,_Slider);function VolumeBar(player,options){classCallCheck(this,VolumeBar);var _this=possibleConstructorReturn(this,_Slider.call(this,player,options));_this.on('slideractive',_this.updateLastVolume_);_this.on(player,'volumechange',_this.updateARIAAttributes);player.ready(function(){return _this.updateARIAAttributes()});return _this} VolumeBar.prototype.createEl=function createEl$$1(){return _Slider.prototype.createEl.call(this,'div',{className:'vjs-volume-bar vjs-slider-bar'},{'aria-label':this.localize('Volume Level'),'aria-live':'polite'})};VolumeBar.prototype.handleMouseDown=function handleMouseDown(event){if(!isSingleLeftClick(event)){return} _Slider.prototype.handleMouseDown.call(this,event)};VolumeBar.prototype.handleMouseMove=function handleMouseMove(event){if(!isSingleLeftClick(event)){return} this.checkMuted();this.player_.volume(this.calculateDistance(event))};VolumeBar.prototype.checkMuted=function checkMuted(){if(this.player_.muted()){this.player_.muted(!1)}};VolumeBar.prototype.getPercent=function getPercent(){if(this.player_.muted()){return 0} return this.player_.volume()};VolumeBar.prototype.stepForward=function stepForward(){this.checkMuted();this.player_.volume(this.player_.volume()+0.1)};VolumeBar.prototype.stepBack=function stepBack(){this.checkMuted();this.player_.volume(this.player_.volume()-0.1)};VolumeBar.prototype.updateARIAAttributes=function updateARIAAttributes(event){var ariaValue=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute('aria-valuenow',ariaValue);this.el_.setAttribute('aria-valuetext',ariaValue+'%')};VolumeBar.prototype.volumeAsPercentage_=function volumeAsPercentage_(){return Math.round(this.player_.volume()*100)};VolumeBar.prototype.updateLastVolume_=function updateLastVolume_(){var _this2=this;var volumeBeforeDrag=this.player_.volume();this.one('sliderinactive',function(){if(_this2.player_.volume()===0){_this2.player_.lastVolume_(volumeBeforeDrag)}})};return VolumeBar}(Slider);VolumeBar.prototype.options_={children:['volumeLevel'],barName:'volumeLevel'};VolumeBar.prototype.playerEvent='volumechange';Component.registerComponent('VolumeBar',VolumeBar);var VolumeControl=function(_Component){inherits(VolumeControl,_Component);function VolumeControl(player){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};classCallCheck(this,VolumeControl);options.vertical=options.vertical||!1;if(typeof options.volumeBar==='undefined'||isPlain(options.volumeBar)){options.volumeBar=options.volumeBar||{};options.volumeBar.vertical=options.vertical} var _this=possibleConstructorReturn(this,_Component.call(this,player,options));checkVolumeSupport(_this,player);_this.throttledHandleMouseMove=throttle(bind(_this,_this.handleMouseMove),25);_this.on('mousedown',_this.handleMouseDown);_this.on('touchstart',_this.handleMouseDown);_this.on(_this.volumeBar,['focus','slideractive'],function(){_this.volumeBar.addClass('vjs-slider-active');_this.addClass('vjs-slider-active');_this.trigger('slideractive')});_this.on(_this.volumeBar,['blur','sliderinactive'],function(){_this.volumeBar.removeClass('vjs-slider-active');_this.removeClass('vjs-slider-active');_this.trigger('sliderinactive')});return _this} VolumeControl.prototype.createEl=function createEl(){var orientationClass='vjs-volume-horizontal';if(this.options_.vertical){orientationClass='vjs-volume-vertical'} return _Component.prototype.createEl.call(this,'div',{className:'vjs-volume-control vjs-control '+orientationClass})};VolumeControl.prototype.handleMouseDown=function handleMouseDown(event){var doc=this.el_.ownerDocument;this.on(doc,'mousemove',this.throttledHandleMouseMove);this.on(doc,'touchmove',this.throttledHandleMouseMove);this.on(doc,'mouseup',this.handleMouseUp);this.on(doc,'touchend',this.handleMouseUp)};VolumeControl.prototype.handleMouseUp=function handleMouseUp(event){var doc=this.el_.ownerDocument;this.off(doc,'mousemove',this.throttledHandleMouseMove);this.off(doc,'touchmove',this.throttledHandleMouseMove);this.off(doc,'mouseup',this.handleMouseUp);this.off(doc,'touchend',this.handleMouseUp)};VolumeControl.prototype.handleMouseMove=function handleMouseMove(event){this.volumeBar.handleMouseMove(event)};return VolumeControl}(Component);VolumeControl.prototype.options_={children:['volumeBar']};Component.registerComponent('VolumeControl',VolumeControl);var MuteToggle=function(_Button){inherits(MuteToggle,_Button);function MuteToggle(player,options){classCallCheck(this,MuteToggle);var _this=possibleConstructorReturn(this,_Button.call(this,player,options));checkVolumeSupport(_this,player);_this.on(player,['loadstart','volumechange'],_this.update);return _this} MuteToggle.prototype.buildCSSClass=function buildCSSClass(){return'vjs-mute-control '+_Button.prototype.buildCSSClass.call(this)};MuteToggle.prototype.handleClick=function handleClick(event){var vol=this.player_.volume();var lastVolume=this.player_.lastVolume_();if(vol===0){var volumeToSet=lastVolume<0.1?0.1:lastVolume;this.player_.volume(volumeToSet);this.player_.muted(!1)}else{this.player_.muted(this.player_.muted()?!1:!0)}};MuteToggle.prototype.update=function update(event){this.updateIcon_();this.updateControlText_()};MuteToggle.prototype.updateIcon_=function updateIcon_(){var vol=this.player_.volume();var level=3;if(vol===0||this.player_.muted()){level=0}else if(vol<0.33){level=1}else if(vol<0.67){level=2} for(var i=0;i<4;i++){removeClass(this.el_,'vjs-vol-'+i)} addClass(this.el_,'vjs-vol-'+level)};MuteToggle.prototype.updateControlText_=function updateControlText_(){var soundOff=this.player_.muted()||this.player_.volume()===0;var text=soundOff?'Unmute':'Mute';if(this.controlText()!==text){this.controlText(text)}};return MuteToggle}(Button);MuteToggle.prototype.controlText_='Mute';Component.registerComponent('MuteToggle',MuteToggle);var VolumePanel=function(_Component){inherits(VolumePanel,_Component);function VolumePanel(player){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};classCallCheck(this,VolumePanel);if(typeof options.inline!=='undefined'){options.inline=options.inline}else{options.inline=!0} if(typeof options.volumeControl==='undefined'||isPlain(options.volumeControl)){options.volumeControl=options.volumeControl||{};options.volumeControl.vertical=!options.inline} var _this=possibleConstructorReturn(this,_Component.call(this,player,options));checkVolumeSupport(_this,player);_this.on(_this.volumeControl,['slideractive'],_this.sliderActive_);_this.on(_this.muteToggle,'focus',_this.sliderActive_);_this.on(_this.volumeControl,['sliderinactive'],_this.sliderInactive_);_this.on(_this.muteToggle,'blur',_this.sliderInactive_);return _this} VolumePanel.prototype.sliderActive_=function sliderActive_(){this.addClass('vjs-slider-active')};VolumePanel.prototype.sliderInactive_=function sliderInactive_(){this.removeClass('vjs-slider-active')};VolumePanel.prototype.createEl=function createEl(){var orientationClass='vjs-volume-panel-horizontal';if(!this.options_.inline){orientationClass='vjs-volume-panel-vertical'} return _Component.prototype.createEl.call(this,'div',{className:'vjs-volume-panel vjs-control '+orientationClass})};return VolumePanel}(Component);VolumePanel.prototype.options_={children:['muteToggle','volumeControl']};Component.registerComponent('VolumePanel',VolumePanel);var Menu=function(_Component){inherits(Menu,_Component);function Menu(player,options){classCallCheck(this,Menu);var _this=possibleConstructorReturn(this,_Component.call(this,player,options));if(options){_this.menuButton_=options.menuButton} _this.focusedChild_=-1;_this.on('keydown',_this.handleKeyPress);return _this} Menu.prototype.addItem=function addItem(component){this.addChild(component);component.on('click',bind(this,function(event){if(this.menuButton_){this.menuButton_.unpressButton();if(component.name()!=='CaptionSettingsMenuItem'){this.menuButton_.focus()}}}))};Menu.prototype.createEl=function createEl$$1(){var contentElType=this.options_.contentElType||'ul';this.contentEl_=createEl(contentElType,{className:'vjs-menu-content'});this.contentEl_.setAttribute('role','menu');var el=_Component.prototype.createEl.call(this,'div',{append:this.contentEl_,className:'vjs-menu'});el.appendChild(this.contentEl_);on(el,'click',function(event){event.preventDefault();event.stopImmediatePropagation()});return el};Menu.prototype.dispose=function dispose(){this.contentEl_=null;_Component.prototype.dispose.call(this)};Menu.prototype.handleKeyPress=function handleKeyPress(event){if(event.which===37||event.which===40){event.preventDefault();this.stepForward()}else if(event.which===38||event.which===39){event.preventDefault();this.stepBack()}};Menu.prototype.stepForward=function stepForward(){var stepChild=0;if(this.focusedChild_!==undefined){stepChild=this.focusedChild_+1} this.focus(stepChild)};Menu.prototype.stepBack=function stepBack(){var stepChild=0;if(this.focusedChild_!==undefined){stepChild=this.focusedChild_-1} this.focus(stepChild)};Menu.prototype.focus=function focus(){var item=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var children=this.children().slice();var haveTitle=children.length&&children[0].className&&/vjs-menu-title/.test(children[0].className);if(haveTitle){children.shift()} if(children.length>0){if(item<0){item=0}else if(item>=children.length){item=children.length-1} this.focusedChild_=item;children[item].el_.focus()}};return Menu}(Component);Component.registerComponent('Menu',Menu);var MenuButton=function(_Component){inherits(MenuButton,_Component);function MenuButton(player){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};classCallCheck(this,MenuButton);var _this=possibleConstructorReturn(this,_Component.call(this,player,options));_this.menuButton_=new Button(player,options);_this.menuButton_.controlText(_this.controlText_);_this.menuButton_.el_.setAttribute('aria-haspopup','true');var buttonClass=Button.prototype.buildCSSClass();_this.menuButton_.el_.className=_this.buildCSSClass()+' '+buttonClass;_this.menuButton_.removeClass('vjs-control');_this.addChild(_this.menuButton_);_this.update();_this.enabled_=!0;_this.on(_this.menuButton_,'tap',_this.handleClick);_this.on(_this.menuButton_,'click',_this.handleClick);_this.on(_this.menuButton_,'focus',_this.handleFocus);_this.on(_this.menuButton_,'blur',_this.handleBlur);_this.on('keydown',_this.handleSubmenuKeyPress);return _this} MenuButton.prototype.update=function update(){var menu=this.createMenu();if(this.menu){this.menu.dispose();this.removeChild(this.menu)} this.menu=menu;this.addChild(menu);this.buttonPressed_=!1;this.menuButton_.el_.setAttribute('aria-expanded','false');if(this.items&&this.items.length<=this.hideThreshold_){this.hide()}else{this.show()}};MenuButton.prototype.createMenu=function createMenu(){var menu=new Menu(this.player_,{menuButton:this});this.hideThreshold_=0;if(this.options_.title){var title=createEl('li',{className:'vjs-menu-title',innerHTML:toTitleCase(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;menu.children_.unshift(title);prependTo(title,menu.contentEl())} this.items=this.createItems();if(this.items){for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(text,el)};MenuButton.prototype.handleClick=function handleClick(event){this.one(this.menu.contentEl(),'mouseleave',bind(this,function(e){this.unpressButton();this.el_.blur()}));if(this.buttonPressed_){this.unpressButton()}else{this.pressButton()}};MenuButton.prototype.focus=function focus(){this.menuButton_.focus()};MenuButton.prototype.blur=function blur(){this.menuButton_.blur()};MenuButton.prototype.handleFocus=function handleFocus(){on(document_1,'keydown',bind(this,this.handleKeyPress))};MenuButton.prototype.handleBlur=function handleBlur(){off(document_1,'keydown',bind(this,this.handleKeyPress))};MenuButton.prototype.handleKeyPress=function handleKeyPress(event){if(event.which===27||event.which===9){if(this.buttonPressed_){this.unpressButton()} if(event.which!==9){event.preventDefault();this.menuButton_.el_.focus()}}else if(event.which===38||event.which===40){if(!this.buttonPressed_){this.pressButton();event.preventDefault()}}};MenuButton.prototype.handleSubmenuKeyPress=function handleSubmenuKeyPress(event){if(event.which===27||event.which===9){if(this.buttonPressed_){this.unpressButton()} if(event.which!==9){event.preventDefault();this.menuButton_.el_.focus()}}};MenuButton.prototype.pressButton=function pressButton(){if(this.enabled_){this.buttonPressed_=!0;this.menu.lockShowing();this.menuButton_.el_.setAttribute('aria-expanded','true');if(IS_IOS&&isInFrame()){return} this.menu.focus()}};MenuButton.prototype.unpressButton=function unpressButton(){if(this.enabled_){this.buttonPressed_=!1;this.menu.unlockShowing();this.menuButton_.el_.setAttribute('aria-expanded','false')}};MenuButton.prototype.disable=function disable(){this.unpressButton();this.enabled_=!1;this.addClass('vjs-disabled');this.menuButton_.disable()};MenuButton.prototype.enable=function enable(){this.enabled_=!0;this.removeClass('vjs-disabled');this.menuButton_.enable()};return MenuButton}(Component);Component.registerComponent('MenuButton',MenuButton);var TrackButton=function(_MenuButton){inherits(TrackButton,_MenuButton);function TrackButton(player,options){classCallCheck(this,TrackButton);var tracks=options.tracks;var _this=possibleConstructorReturn(this,_MenuButton.call(this,player,options));if(_this.items.length<=1){_this.hide()} if(!tracks){return possibleConstructorReturn(_this)} var updateHandler=bind(_this,_this.update);tracks.addEventListener('removetrack',updateHandler);tracks.addEventListener('addtrack',updateHandler);_this.player_.on('ready',updateHandler);_this.player_.on('dispose',function(){tracks.removeEventListener('removetrack',updateHandler);tracks.removeEventListener('addtrack',updateHandler)});return _this} return TrackButton}(MenuButton);Component.registerComponent('TrackButton',TrackButton);var MenuItem=function(_ClickableComponent){inherits(MenuItem,_ClickableComponent);function MenuItem(player,options){classCallCheck(this,MenuItem);var _this=possibleConstructorReturn(this,_ClickableComponent.call(this,player,options));_this.selectable=options.selectable;_this.selected(options.selected);if(_this.selectable){_this.el_.setAttribute('role','menuitemcheckbox')}else{_this.el_.setAttribute('role','menuitem')} return _this} MenuItem.prototype.createEl=function createEl(type,props,attrs){this.nonIconControl=!0;return _ClickableComponent.prototype.createEl.call(this,'li',assign({className:'vjs-menu-item',innerHTML:''+this.localize(this.options_.label)+'',tabIndex:-1},props),attrs)};MenuItem.prototype.handleClick=function handleClick(event){this.selected(!0)};MenuItem.prototype.selected=function selected(_selected){if(this.selectable){if(_selected){this.addClass('vjs-selected');this.el_.setAttribute('aria-checked','true');this.controlText(', selected')}else{this.removeClass('vjs-selected');this.el_.setAttribute('aria-checked','false');this.controlText('')}}};return MenuItem}(ClickableComponent);Component.registerComponent('MenuItem',MenuItem);var TextTrackMenuItem=function(_MenuItem){inherits(TextTrackMenuItem,_MenuItem);function TextTrackMenuItem(player,options){classCallCheck(this,TextTrackMenuItem);var track=options.track;var tracks=player.textTracks();options.label=track.label||track.language||'Unknown';options.selected=track.mode==='showing';var _this=possibleConstructorReturn(this,_MenuItem.call(this,player,options));_this.track=track;var changeHandler=function changeHandler(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]} _this.handleTracksChange.apply(_this,args)};var selectedLanguageChangeHandler=function selectedLanguageChangeHandler(){for(var _len2=arguments.length,args=Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2]} _this.handleSelectedLanguageChange.apply(_this,args)};player.on(['loadstart','texttrackchange'],changeHandler);tracks.addEventListener('change',changeHandler);tracks.addEventListener('selectedlanguagechange',selectedLanguageChangeHandler);_this.on('dispose',function(){player.off(['loadstart','texttrackchange'],changeHandler);tracks.removeEventListener('change',changeHandler);tracks.removeEventListener('selectedlanguagechange',selectedLanguageChangeHandler)});if(tracks.onchange===undefined){var event=void 0;_this.on(['tap','click'],function(){if(_typeof(window_1.Event)!=='object'){try{event=new window_1.Event('change')}catch(err){}} if(!event){event=document_1.createEvent('Event');event.initEvent('change',!0,!0)} tracks.dispatchEvent(event)})} _this.handleTracksChange();return _this} TextTrackMenuItem.prototype.handleClick=function handleClick(event){var kind=this.track.kind;var kinds=this.track.kinds;var tracks=this.player_.textTracks();if(!kinds){kinds=[kind]} _MenuItem.prototype.handleClick.call(this,event);if(!tracks){return} for(var i=0;i-1){if(track.mode!=='showing'){track.mode='showing'}}else if(track.mode!=='disabled'){track.mode='disabled'}}};TextTrackMenuItem.prototype.handleTracksChange=function handleTracksChange(event){this.selected(this.track.mode==='showing')};TextTrackMenuItem.prototype.handleSelectedLanguageChange=function handleSelectedLanguageChange(event){if(this.track.mode==='showing'){var selectedLanguage=this.player_.cache_.selectedLanguage;if(selectedLanguage&&selectedLanguage.enabled&&selectedLanguage.language===this.track.language&&selectedLanguage.kind!==this.track.kind){return} this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}};TextTrackMenuItem.prototype.dispose=function dispose(){this.track=null;_MenuItem.prototype.dispose.call(this)};return TextTrackMenuItem}(MenuItem);Component.registerComponent('TextTrackMenuItem',TextTrackMenuItem);var OffTextTrackMenuItem=function(_TextTrackMenuItem){inherits(OffTextTrackMenuItem,_TextTrackMenuItem);function OffTextTrackMenuItem(player,options){classCallCheck(this,OffTextTrackMenuItem);options.track={player:player,kind:options.kind,kinds:options.kinds,'default':!1,mode:'disabled'};if(!options.kinds){options.kinds=[options.kind]} if(options.label){options.track.label=options.label}else{options.track.label=options.kinds.join(' and ')+' off'} options.selectable=!0;return possibleConstructorReturn(this,_TextTrackMenuItem.call(this,player,options))} OffTextTrackMenuItem.prototype.handleTracksChange=function handleTracksChange(event){var tracks=this.player().textTracks();var selected=!0;for(var i=0,l=tracks.length;i-1&&track.mode==='showing'){selected=!1;break}} this.selected(selected)};OffTextTrackMenuItem.prototype.handleSelectedLanguageChange=function handleSelectedLanguageChange(event){var tracks=this.player().textTracks();var allHidden=!0;for(var i=0,l=tracks.length;i-1&&track.mode==='showing'){allHidden=!1;break}} if(allHidden){this.player_.cache_.selectedLanguage={enabled:!1}}};return OffTextTrackMenuItem}(TextTrackMenuItem);Component.registerComponent('OffTextTrackMenuItem',OffTextTrackMenuItem);var TextTrackButton=function(_TrackButton){inherits(TextTrackButton,_TrackButton);function TextTrackButton(player){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};classCallCheck(this,TextTrackButton);options.tracks=player.textTracks();return possibleConstructorReturn(this,_TrackButton.call(this,player,options))} TextTrackButton.prototype.createItems=function createItems(){var items=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var TrackMenuItem=arguments.length>1&&arguments[1]!==undefined?arguments[1]:TextTrackMenuItem;var label=void 0;if(this.label_){label=this.label_+' off'} items.push(new OffTextTrackMenuItem(this.player_,{kinds:this.kinds_,kind:this.kind_,label:label}));this.hideThreshold_+=1;var tracks=this.player_.textTracks();if(!Array.isArray(this.kinds_)){this.kinds_=[this.kind_]} for(var i=0;i-1){var item=new TrackMenuItem(this.player_,{track:track,selectable:!0});item.addClass('vjs-'+track.kind+'-menu-item');items.push(item)}} return items};return TextTrackButton}(TrackButton);Component.registerComponent('TextTrackButton',TextTrackButton);var ChaptersTrackMenuItem=function(_MenuItem){inherits(ChaptersTrackMenuItem,_MenuItem);function ChaptersTrackMenuItem(player,options){classCallCheck(this,ChaptersTrackMenuItem);var track=options.track;var cue=options.cue;var currentTime=player.currentTime();options.selectable=!0;options.label=cue.text;options.selected=cue.startTime<=currentTime&¤tTime=0;i--){var track=tracks[i];if(track.kind===this.kind_){return track}}};ChaptersButton.prototype.getMenuCaption=function getMenuCaption(){if(this.track_&&this.track_.label){return this.track_.label} return this.localize(toTitleCase(this.kind_))};ChaptersButton.prototype.createMenu=function createMenu(){this.options_.title=this.getMenuCaption();return _TextTrackButton.prototype.createMenu.call(this)};ChaptersButton.prototype.createItems=function createItems(){var items=[];if(!this.track_){return items} var cues=this.track_.cues;if(!cues){return items} for(var i=0,l=cues.length;i