
!function(e){"use strict";var t={i18n:{ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeek:["Вск","Пн","Вт","Ср","Чт","Пт","Сб"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeek:["So","Mo","Di","Mi","Do","Fr","Sa"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeek:["Paz","Pts","Sal","Çar","Per","Cum","Cts"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeek:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeek:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeek:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeek:["nd","pn","wt","śr","cz","pt","sb"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeek:["일","월","화","수","목","금","토"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeek:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeek:["Søn","Man","Tir","ons","Tor","Fre","lør"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["日","月","火","水","木","金","土"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeek:["CN","T2","T3","T4","T5","T6","T7"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,closeOnDateSelect:!1,closeOnWithoutClick:!0,timepicker:!0,datepicker:!0,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,style:"",id:"",roundTime:"round",className:"",weekends:[],yearOffset:0};Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var n=t||0,a=this.length;n<a;n++)if(this[n]===e)return n;return-1}),e.fn.xdsoftScroller=function(t){return this.each(function(){var n=e(this);if(!e(this).hasClass("xdsoft_scroller_box")){var a=function(e){var t={x:0,y:0};if("touchstart"==e.type||"touchmove"==e.type||"touchend"==e.type||"touchcancel"==e.type){var n=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];t.x=n.pageX,t.y=n.pageY}else"mousedown"!=e.type&&"mouseup"!=e.type&&"mousemove"!=e.type&&"mouseover"!=e.type&&"mouseout"!=e.type&&"mouseenter"!=e.type&&"mouseleave"!=e.type||(t.x=e.pageX,t.y=e.pageY);return t},r=0,o=n.children().eq(0),s=n[0].clientHeight,i=o[0].offsetHeight,d=e('<div class="xdsoft_scrollbar"></div>'),u=e('<div class="xdsoft_scroller"></div>'),c=100,l=!1;d.append(u),n.addClass("xdsoft_scroller_box").append(d),u.on("mousedown.xdsoft_scroller",function(a){s||n.trigger("resize_scroll.xdsoft_scroller",[t]);var o=a.pageY,i=parseInt(u.css("margin-top")),l=d[0].offsetHeight;e(document.body).addClass("xdsoft_noselect"),e([document.body,window]).on("mouseup.xdsoft_scroller",function f(){e([document.body,window]).off("mouseup.xdsoft_scroller",f).off("mousemove.xdsoft_scroller",r).removeClass("xdsoft_noselect")}),e(document.body).on("mousemove.xdsoft_scroller",r=function(e){var t=e.pageY-o+i;t<0&&(t=0),t+u[0].offsetHeight>l&&(t=l-u[0].offsetHeight),n.trigger("scroll_element.xdsoft_scroller",[c?t/c:0])})}),n.on("scroll_element.xdsoft_scroller",function(e,t){s||n.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:t<0||isNaN(t)?0:t,u.css("margin-top",c*t),o.css("marginTop",-parseInt((i-s)*t))}).on("resize_scroll.xdsoft_scroller",function(e,t,a){s=n[0].clientHeight,i=o[0].offsetHeight;var r=s/i,l=r*d[0].offsetHeight;r>1?u.hide():(u.show(),u.css("height",parseInt(l>10?l:10)),c=d[0].offsetHeight-u[0].offsetHeight,a!==!0&&n.trigger("scroll_element.xdsoft_scroller",[t?t:Math.abs(parseInt(o.css("marginTop")))/(i-s)]))}),n.mousewheel&&n.mousewheel(function(e,t,a,r){var d=Math.abs(parseInt(o.css("marginTop")));return n.trigger("scroll_element.xdsoft_scroller",[(d-20*t)/(i-s)]),e.stopPropagation(),!1}),n.on("touchstart",function(e){l=a(e)}),n.on("touchmove",function(e){if(l){var t=a(e),r=Math.abs(parseInt(o.css("marginTop")));n.trigger("scroll_element.xdsoft_scroller",[(r-(t.y-l.y))/(i-s)]),e.stopPropagation(),e.preventDefault()}}),n.on("touchend touchcancel",function(e){l=!1})}n.trigger("resize_scroll.xdsoft_scroller",[t])})},e.fn.datetimepicker=function(n){var a=48,r=57,o=96,s=105,i=17,d=46,u=13,c=27,l=8,f=37,m=38,h=39,g=40,p=9,x=116,v=65,y=67,D=86,T=90,w=89,b=!1,_=e.isPlainObject(n)||!n?e.extend(!0,{},t,n):e.extend({},t),M=0,k=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function t(n){e.is(":disabled")||e.is(":hidden")||!e.is(":visible")||e.data("xdsoft_datetimepicker")||(clearTimeout(M),M=setTimeout(function(){e.data("xdsoft_datetimepicker")||S(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",t).trigger("open.xdsoft")},100))})},S=function(t){function n(){var e=_.value?_.value:t&&t.val&&t.val()?t.val():"";return e&&W.isValidDate(e=Date.parseDate(e,_.format))?M.data("changed",!0):e="",e||_.startDate===!1||(e=W.strToDateTime(_.startDate)),e?e:0}var M=e("<div "+(_.id?'id="'+_.id+'"':"")+" "+(_.style?'style="'+_.style+'"':"")+' class="xdsoft_datetimepicker xdsoft_noselect '+_.className+'"></div>'),k=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),S=e('<div class="xdsoft_datepicker active"></div>'),O=e('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span></div><div class="xdsoft_label xdsoft_year"><span></span></div><button type="button" class="xdsoft_next"></button></div>'),F=e('<div class="xdsoft_calendar"></div>'),I=e('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),C=I.find(".xdsoft_time_box").eq(0),H=e('<div class="xdsoft_time_variant"></div>'),Y=e('<div class="xdsoft_scrollbar"></div>'),P=(e('<div class="xdsoft_scroller"></div>'),e('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>')),A=e('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>');O.find(".xdsoft_month span").after(P),O.find(".xdsoft_year span").after(A),O.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(t){O.find(".xdsoft_select").hide();var n=e(this).find(".xdsoft_select").eq(0),a=0,r=0;W.currentTime&&(a=W.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),n.show();for(var o=n.find("div.xdsoft_option"),s=0;s<o.length&&o.eq(s).data("value")!=a;s++)r+=o[0].offsetHeight;return n.xdsoftScroller(r/(n.children()[0].offsetHeight-n[0].clientHeight)),t.stopPropagation(),!1}),O.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(e){e.stopPropagation(),e.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(t){W&&W.currentTime&&W.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),M.trigger("xchange.xdsoft"),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input"))}),M.setOptions=function(n){if(_=e.extend(!0,{},_,n),n.allowTimes&&e.isArray(n.allowTimes)&&n.allowTimes.length&&(_.allowTimes=e.extend(!0,[],n.allowTimes)),n.weekends&&e.isArray(n.weekends)&&n.weekends.length&&(_.weekends=e.extend(!0,[],n.weekends)),!_.open&&!_.opened||_.inline||t.trigger("open.xdsoft"),_.inline&&(M.addClass("xdsoft_inline"),t.after(M).hide(),M.trigger("afterOpen.xdsoft")),_.inverseButton&&(_.next="xdsoft_prev",_.prev="xdsoft_next"),_.datepicker?S.addClass("active"):S.removeClass("active"),_.timepicker?I.addClass("active"):I.removeClass("active"),_.value&&(t&&t.val&&t.val(_.value),W.setCurrentTime(_.value)),isNaN(_.dayOfWeekStart)||parseInt(_.dayOfWeekStart)<0||parseInt(_.dayOfWeekStart)>6?_.dayOfWeekStart=0:_.dayOfWeekStart=parseInt(_.dayOfWeekStart),_.timepickerScrollbar||Y.hide(),_.minDate&&/^-(.*)$/.test(_.minDate)&&(_.minDate=W.strToDateTime(_.minDate).dateFormat(_.formatDate)),_.maxDate&&/^\+(.*)$/.test(_.maxDate)&&(_.maxDate=W.strToDateTime(_.maxDate).dateFormat(_.formatDate)),O.find(".xdsoft_today_button").css("visibility",_.todayButton?"visible":"hidden"),_.mask){var k=function(e){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();return t.getBookmark().charCodeAt(2)-2}if(e.setSelectionRange)return e.selectionStart}catch(n){return 0}},F=function(e,t){var e="string"==typeof e||e instanceof String?document.getElementById(e):e;if(!e)return!1;if(e.createTextRange){var n=e.createTextRange();return n.collapse(!0),n.moveEnd(t),n.moveStart(t),n.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)},C=function(e,t){var n=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return RegExp(n).test(t)};switch(t.off("keydown.xdsoft"),!0){case _.mask===!0:_.mask=_.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59");case"string"==e.type(_.mask):C(_.mask,t.val())||t.val(_.mask.replace(/[0-9]/g,"_")),t.on("keydown.xdsoft",function(n){var M=this.value,S=n.which;switch(!0){case S>=a&&S<=r||S>=o&&S<=s||S==l||S==d:var O=k(this),I=S!=l&&S!=d?String.fromCharCode(o<=S&&S<=s?S-a:S):"_";for(S!=l&&S!=d||!O||(O--,I="_");/[^0-9_]/.test(_.mask.substr(O,1))&&O<_.mask.length&&O>0;)O+=S==l||S==d?-1:1;if(M=M.substr(0,O)+I+M.substr(O+1),""==e.trim(M))M=_.mask.replace(/[0-9]/g,"_");else if(O==_.mask.length)break;for(O+=S==l||S==d?0:1;/[^0-9_]/.test(_.mask.substr(O,1))&&O<_.mask.length&&O>0;)O+=S==l||S==d?-1:1;C(_.mask,M)?(this.value=M,F(this,O)):""==e.trim(M)?this.value=_.mask.replace(/[0-9]/g,"_"):t.trigger("error_input.xdsoft");break;case!!~[v,y,D,T,w].indexOf(S)&&b:case!!~[c,m,g,f,h,x,i,p,u].indexOf(S):return!0}return n.preventDefault(),!1})}}_.validateOnBlur&&t.off("blur.xdsoft").on("blur.xdsoft",function(){_.allowBlank&&!e.trim(e(this).val()).length?(e(this).val(null),M.data("xdsoft_datetime").empty()):Date.parseDate(e(this).val(),_.format)?M.data("xdsoft_datetime").setCurrentTime(e(this).val()):(e(this).val(W.now().dateFormat(_.format)),M.data("xdsoft_datetime").setCurrentTime(e(this).val())),M.trigger("changedatetime.xdsoft")}),_.dayOfWeekStartPrev=0==_.dayOfWeekStart?6:_.dayOfWeekStart-1,M.trigger("xchange.xdsoft")},M.data("options",_).on("mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),A.hide(),P.hide(),!1});var N=I.find(".xdsoft_time_box");N.append(H),N.xdsoftScroller(),M.on("afterOpen.xdsoft",function(){N.xdsoftScroller()}),M.append(S).append(I),_.withoutCopyright!==!0&&M.append(k),S.append(O).append(F),e("body").append(M);var W=new function(){var e=this;e.now=function(){var e=new Date;return _.yearOffset&&e.setFullYear(e.getFullYear()+_.yearOffset),e},e.currentTime=this.now(),e.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},e.setCurrentTime=function(t){e.currentTime="string"==typeof t?e.strToDateTime(t):e.isValidDate(t)?t:e.now(),M.trigger("xchange.xdsoft")},e.empty=function(){e.currentTime=null},e.getCurrentTime=function(t){return e.currentTime},e.nextMonth=function(){var t=e.currentTime.getMonth()+1;return 12==t&&(e.currentTime.setFullYear(e.currentTime.getFullYear()+1),t=0),e.currentTime.setDate(Math.min(Date.daysInMonth[t],e.currentTime.getDate())),e.currentTime.setMonth(t),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),t},e.prevMonth=function(){var t=e.currentTime.getMonth()-1;return t==-1&&(e.currentTime.setFullYear(e.currentTime.getFullYear()-1),t=11),e.currentTime.setDate(Math.min(Date.daysInMonth[t],e.currentTime.getDate())),e.currentTime.setMonth(t),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),t},e.strToDateTime=function(t){var n,a,r=[];return(r=/^(\+|\-)(.*)$/.exec(t))&&(r[2]=Date.parseDate(r[2],_.formatDate))?(n=r[2].getTime()-1*r[2].getTimezoneOffset()*6e4,a=new Date(W.now().getTime()+parseInt(r[1]+"1")*n)):a=t?Date.parseDate(t,_.format):e.now(),e.isValidDate(a)||(a=e.now()),a},e.strtodate=function(t){var n=t?Date.parseDate(t,_.formatDate):e.now();return e.isValidDate(n)||(n=e.now()),n},e.strtotime=function(t){var n=t?Date.parseDate(t,_.formatTime):e.now();return e.isValidDate(n)||(n=e.now()),n},e.str=function(){return e.currentTime.dateFormat(_.format)}};O.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){M.data("changed",!0),W.setCurrentTime(0),M.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){t.val(W.str()),M.trigger("close.xdsoft")}),O.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1;!function r(e){W.currentTime.getMonth();t.hasClass(_.next)?W.nextMonth():t.hasClass(_.prev)&&W.prevMonth(),!a&&(n=setTimeout(r,e?e:100))}(500),e([document.body,window]).on("mouseup.xdsoft",function o(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",o)})}),I.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1,r=110;!function o(e){var s=C[0].clientHeight,i=H[0].offsetHeight,d=Math.abs(parseInt(H.css("marginTop")));t.hasClass(_.next)&&i-s-_.timeHeightInTimePicker>=d?H.css("marginTop","-"+(d+_.timeHeightInTimePicker)+"px"):t.hasClass(_.prev)&&d-_.timeHeightInTimePicker>=0&&H.css("marginTop","-"+(d-_.timeHeightInTimePicker)+"px"),C.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H.css("marginTop"))/(i-s))]),r=r>10?10:r-10,!a&&(n=setTimeout(o,e?e:r))}(500),e([document.body,window]).on("mouseup.xdsoft",function s(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",s)})});var z=0;M.on("xchange.xdsoft",function(t){clearTimeout(z),z=setTimeout(function(){for(var t="",n=new Date(W.currentTime.getFullYear(),W.currentTime.getMonth(),1,12,0,0),a=0,r=W.now();n.getDay()!=_.dayOfWeekStart;)n.setDate(n.getDate()-1);t+="<table><thead><tr>";for(var o=0;o<7;o++)t+="<th>"+_.i18n[_.lang].dayOfWeek[o+_.dayOfWeekStart>6?0:o+_.dayOfWeekStart]+"</th>";t+="</tr></thead>",t+="<tbody><tr>";var s=!1,i=!1;_.maxDate!==!1&&(s=W.strtodate(_.maxDate),s=new Date(s.getFullYear(),s.getMonth(),s.getDate(),23,59,59,999)),_.minDate!==!1&&(i=W.strtodate(_.minDate),i=new Date(i.getFullYear(),i.getMonth(),i.getDate()));for(var d,u,c,l=[];a<W.currentTime.getDaysInMonth()||n.getDay()!=_.dayOfWeekStart||W.currentTime.getMonth()==n.getMonth();)l=[],a++,d=n.getDate(),u=n.getFullYear(),c=n.getMonth(),l.push("xdsoft_date"),(s!==!1&&n>s||i!==!1&&n<i)&&l.push("xdsoft_disabled"),W.currentTime.getMonth()!=c&&l.push("xdsoft_other_month"),(_.defaultSelect||M.data("changed"))&&W.currentTime.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")&&l.push("xdsoft_current"),r.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")&&l.push("xdsoft_today"),(0==n.getDay()||6==n.getDay()||~_.weekends.indexOf(n.dateFormat("d.m.Y")))&&l.push("xdsoft_weekend"),_.beforeShowDay&&"function"==typeof _.beforeShowDay&&l.push(_.beforeShowDay(n)),t+='<td data-date="'+d+'" data-month="'+c+'" data-year="'+u+'" class="xdsoft_date xdsoft_day_of_week'+n.getDay()+" "+l.join(" ")+'"><div>'+d+"</div></td>",n.getDay()==_.dayOfWeekStartPrev&&(t+="</tr>"),n.setDate(d+1);t+="</tbody></table>",F.html(t),O.find(".xdsoft_label span").eq(0).text(_.i18n[_.lang].months[W.currentTime.getMonth()]),O.find(".xdsoft_label span").eq(1).text(W.currentTime.getFullYear());var f="",m="",c="",h=function(e,t){var n=W.now();n.setHours(e),e=parseInt(n.getHours()),n.setMinutes(t),t=parseInt(n.getMinutes()),l=[],(_.maxTime!==!1&&W.strtotime(_.maxTime).getTime()<n.getTime()||_.minTime!==!1&&W.strtotime(_.minTime).getTime()>n.getTime())&&l.push("xdsoft_disabled"),(_.initTime||_.defaultSelect||M.data("changed"))&&parseInt(W.currentTime.getHours())==parseInt(e)&&(_.step>59||Math[_.roundTime](W.currentTime.getMinutes()/_.step)*_.step==parseInt(t))&&(_.defaultSelect||M.data("changed")?l.push("xdsoft_current"):_.initTime&&l.push("xdsoft_init_time")),parseInt(r.getHours())==parseInt(e)&&parseInt(r.getMinutes())==parseInt(t)&&l.push("xdsoft_today"),f+='<div class="xdsoft_time '+l.join(" ")+'" data-hour="'+e+'" data-minute="'+t+'">'+n.dateFormat(_.formatTime)+"</div>"};if(_.allowTimes&&e.isArray(_.allowTimes)&&_.allowTimes.length)for(var a=0;a<_.allowTimes.length;a++)m=W.strtotime(_.allowTimes[a]).getHours(),c=W.strtotime(_.allowTimes[a]).getMinutes(),h(m,c);else for(var a=0,o=0;a<(_.hours12?12:24);a++)for(o=0;o<60;o+=_.step)m=(a<10?"0":"")+a,c=(o<10?"0":"")+o,h(m,c);H.html(f);var g="",a=0;for(a=parseInt(_.yearStart,10)+_.yearOffset;a<=parseInt(_.yearEnd,10)+_.yearOffset;a++)g+='<div class="xdsoft_option '+(W.currentTime.getFullYear()==a?"xdsoft_current":"")+'" data-value="'+a+'">'+a+"</div>";for(A.children().eq(0).html(g),a=0,g="";a<=11;a++)g+='<div class="xdsoft_option '+(W.currentTime.getMonth()==a?"xdsoft_current":"")+'" data-value="'+a+'">'+_.i18n[_.lang].months[a]+"</div>";P.children().eq(0).html(g),e(this).trigger("generate.xdsoft")},10),t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(_.timepicker){var e;if(H.find(".xdsoft_current").length?e=".xdsoft_current":H.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e){var t=C[0].clientHeight,n=H[0].offsetHeight,a=H.find(e).index()*_.timeHeightInTimePicker+1;n-t<a&&(a=n-t),H.css("marginTop","-"+parseInt(a)+"px"),C.trigger("scroll_element.xdsoft_scroller",[parseInt(a)/(n-t)])}}});var J=0;F.on("click.xdsoft","td",function(n){n.stopPropagation(),J++;var a=e(this),r=W.currentTime;return!a.hasClass("xdsoft_disabled")&&(r.setDate(a.data("date")),r.setMonth(a.data("month")),r.setFullYear(a.data("year")),M.trigger("select.xdsoft",[r]),t.val(W.str()),(J>1||_.closeOnDateSelect===!0||0===_.closeOnDateSelect&&!_.timepicker)&&!_.inline&&M.trigger("close.xdsoft"),_.onSelectDate&&_.onSelectDate.call&&_.onSelectDate.call(M,W.currentTime,M.data("input")),M.data("changed",!0),M.trigger("xchange.xdsoft"),M.trigger("changedatetime.xdsoft"),void setTimeout(function(){J=0},200))}),H.on("click.xdsoft","div",function(t){t.stopPropagation();var n=e(this),a=W.currentTime;return!n.hasClass("xdsoft_disabled")&&(a.setHours(n.data("hour")),a.setMinutes(n.data("minute")),M.trigger("select.xdsoft",[a]),M.data("input").val(W.str()),!_.inline&&M.trigger("close.xdsoft"),_.onSelectTime&&_.onSelectTime.call&&_.onSelectTime.call(M,W.currentTime,M.data("input")),M.data("changed",!0),M.trigger("xchange.xdsoft"),void M.trigger("changedatetime.xdsoft"))}),M.mousewheel&&S.mousewheel(function(e,t,n,a){return!_.scrollMonth||(t<0?W.nextMonth():W.prevMonth(),!1)}),M.mousewheel&&C.unmousewheel().mousewheel(function(e,t,n,a){if(!_.scrollTime)return!0;var r=C[0].clientHeight,o=H[0].offsetHeight,s=Math.abs(parseInt(H.css("marginTop"))),i=!0;return t<0&&o-r-_.timeHeightInTimePicker>=s?(H.css("marginTop","-"+(s+_.timeHeightInTimePicker)+"px"),i=!1):t>0&&s-_.timeHeightInTimePicker>=0&&(H.css("marginTop","-"+(s-_.timeHeightInTimePicker)+"px"),i=!1),C.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H.css("marginTop"))/(o-r))]),e.stopPropagation(),i}),M.on("changedatetime.xdsoft",function(){if(_.onChangeDateTime&&_.onChangeDateTime.call){var e=M.data("input");_.onChangeDateTime.call(M,W.currentTime,e),e.trigger("change")}}).on("generate.xdsoft",function(){_.onGenerate&&_.onGenerate.call&&_.onGenerate.call(M,W.currentTime,M.data("input"))});var j=0;t.mousewheel&&t.mousewheel(function(e,n,a,r){return!_.scrollInput||(!_.datepicker&&_.timepicker?(j=H.find(".xdsoft_current").length?H.find(".xdsoft_current").eq(0).index():0,j+n>=0&&j+n<H.children().length&&(j+=n),H.children().eq(j).length&&H.children().eq(j).trigger("mousedown"),!1):_.datepicker&&!_.timepicker?(S.trigger(e,[n,a,r]),t.val&&t.val(W.str()),M.trigger("changedatetime.xdsoft"),!1):void 0)});var L=function(){var t=M.data("input").offset(),n=t.top+M.data("input")[0].offsetHeight-1,a=t.left;n+M[0].offsetHeight>e(window).height()+e(window).scrollTop()&&(n=t.top-M[0].offsetHeight+1),n<0&&(n=0),a+M[0].offsetWidth>e(window).width()&&(a=t.left-M[0].offsetWidth+M.data("input")[0].offsetWidth),M.css({left:a,top:n})};M.on("open.xdsoft",function(){var t=!0;_.onShow&&_.onShow.call&&(t=_.onShow.call(M,W.currentTime,M.data("input"))),t!==!1&&(M.show(),M.trigger("afterOpen.xdsoft"),L(),e(window).off("resize.xdsoft",L).on("resize.xdsoft",L),_.closeOnWithoutClick&&e([document.body,window]).on("mousedown.xdsoft",function n(){M.trigger("close.xdsoft"),e([document.body,window]).off("mousedown.xdsoft",n)}))}).on("close.xdsoft",function(e){var t=!0;_.onClose&&_.onClose.call&&(t=_.onClose.call(M,W.currentTime,M.data("input"))),t===!1||_.opened||_.inline||M.hide(),e.stopPropagation()}).data("input",t);var E=0;M.data("xdsoft_datetime",W),M.setOptions(_),W.setCurrentTime(n()),M.trigger("afterOpen.xdsoft"),t.data("xdsoft_datetimepicker",M).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(e){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(clearTimeout(E),E=setTimeout(function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(W.setCurrentTime(n()),M.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var n=(this.value,t.which);switch(!0){case!!~[u].indexOf(n):var a=e("input:visible,textarea:visible");return M.trigger("close.xdsoft"),a.eq(a.index(this)+1).focus(),!1;case!!~[p].indexOf(n):return M.trigger("close.xdsoft"),!0}})},O=function(t){var n=t.data("xdsoft_datetimepicker");n&&(n.data("xdsoft_datetime",null),n.remove(),t.data("xdsoft_datetimepicker",null).off("open.xdsoft focusin.xdsoft focusout.xdsoft mousedown.xdsoft blur.xdsoft keydown.xdsoft"),e(window).off("resize.xdsoft"),e([window,document.body]).off("mousedown.xdsoft"),t.unmousewheel&&t.unmousewheel())};return e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){e.keyCode==i&&(b=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode==i&&(b=!1)}),this.each(function(){var t;if(t=e(this).data("xdsoft_datetimepicker")){if("string"===e.type(n))switch(n){case"show":e(this).select().focus(),t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"destroy":O(e(this));break;case"reset":this.value=this.defaultValue,this.value&&t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,_.format))||t.data("changed",!1),t.data("xdsoft_datetime").setCurrentTime(this.value)}else t.setOptions(n);return 0}"string"!==e.type(n)&&(!_.lazyInit||_.open||_.inline?S(e(this)):k(e(this)))})}}(jQuery),Date.parseFunctions={count:0},Date.parseRegexes=[],Date.formatFunctions={count:0},Date.prototype.dateFormat=function(e){if("unixtime"==e)return parseInt(this.getTime()/1e3);null==Date.formatFunctions[e]&&Date.createNewFormat(e);var t=Date.formatFunctions[e];return this[t]()},Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;for(var code="Date.prototype."+funcName+" = function() {return ",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,code+="'"+String.escape(ch)+"' + "):code+=Date.getFormatCode(ch):special=!0;eval(code.substring(0,code.length-3)+";}")},Date.getFormatCode=function(e){switch(e){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(e)+"' + "}},Date.parseDate=function(e,t){if("unixtime"==t)return new Date(isNaN(parseInt(e))?0:1e3*parseInt(e));null==Date.parseFunctions[t]&&Date.createParser(t);var n=Date.parseFunctions[t];return Date[n](e)},Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1;Date.parseFunctions[format]=funcName;for(var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {",regex="",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,regex+=String.escape(ch)):(obj=Date.formatCodeToRegex(ch,currentGroup),currentGroup+=obj.g,regex+=obj.s,obj.g&&obj.c&&(code+=obj.c)):special=!0;code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}",code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}",Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$"),eval(code)},Date.formatCodeToRegex=function(e,t){switch(e){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+t+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+t+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+t+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+t+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+t+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+t+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(e)}}},Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")},Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0")},Date.prototype.getDayOfYear=function(){var e=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var t=0;t<this.getMonth();++t)e+=Date.daysInMonth[t];return e+this.getDate()},Date.prototype.getWeekOfYear=function(){var e=this.getDayOfYear()+(4-this.getDay()),t=new Date(this.getFullYear(),0,1),n=7-t.getDay()+4;return String.leftPad(Math.ceil((e-n)/7)+1,2,"0")},Date.prototype.isLeapYear=function(){var e=this.getFullYear();return 0==(3&e)&&(e%100||e%400==0&&e)},Date.prototype.getFirstDayOfMonth=function(){var e=(this.getDay()-(this.getDate()-1))%7;return e<0?e+7:e},Date.prototype.getLastDayOfMonth=function(){var e=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return e<0?e+7:e},Date.prototype.getDaysInMonth=function(){return Date.daysInMonth[1]=this.isLeapYear()?29:28,Date.daysInMonth[this.getMonth()]},Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},String.escape=function(e){return e.replace(/('|\\)/g,"\\$1")},String.leftPad=function(e,t,n){var a=new String(e);for(null==n&&(n=" ");a.length<t;)a=n+a;return a},Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Date.y2kYear=50,Date.monthNumbers={Jan:0,Feb:1,Mar:2,
Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"},function(e){"function"==typeof define&&define.amd?define(["jquery.flot.min"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var r,o=t||window.event,s=[].slice.call(arguments,1),i=0,d=0,u=0,c=0,l=0;return t=e.event.fix(o),t.type="mousewheel",o.wheelDelta&&(i=o.wheelDelta),o.detail&&(i=o.detail*-1),o.deltaY&&(u=o.deltaY*-1,i=u),o.deltaX&&(d=o.deltaX,i=d*-1),void 0!==o.wheelDeltaY&&(u=o.wheelDeltaY),void 0!==o.wheelDeltaX&&(d=o.wheelDeltaX*-1),c=Math.abs(i),(!n||c<n)&&(n=c),l=Math.max(Math.abs(u),Math.abs(d)),(!a||l<a)&&(a=l),r=i>0?"floor":"ceil",i=Math[r](i/n),d=Math[r](d/a),u=Math[r](u/a),s.unshift(t,i,d,u),(e.event.dispatch||e.event.handle).apply(this,s)}var n,a,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var s=r.length;s;)e.event.fixHooks[r[--s]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})});
function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var _slice=Array.prototype.slice,_slicedToArray=function(){function e(e,t){var i=[],n=!0,r=!1,s=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done)&&(i.push(a.value),!t||i.length!==t);n=!0);}catch(l){r=!0,s=l}finally{try{!n&&o["return"]&&o["return"]()}finally{if(r)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e};!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.parsley=t(e.jQuery)}(this,function(e){"use strict";function t(e,t){return e.parsleyAdaptedCallback||(e.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this),e.apply(t||T,i)}),e.parsleyAdaptedCallback}function i(e){return 0===e.lastIndexOf(D,0)?e.substr(D.length):e}function n(){var t=this,i=window||global;_extends(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger("input")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on("change.inputevent",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off("input.inputevent",i.data.selector,t.behavesOk).off("change.inputevent",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched="0.0.3";for(var n=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],r=0;r<n.length;r++){var s=n[r];e(document).on("input.inputevent",s,{selector:s},t.behavesOk).on("change.inputevent",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(".inputevent")}})}var r=1,s={},a={attr:function(e,t,i){var n,r,s,a=new RegExp("^"+t,"i");if("undefined"==typeof i)i={};else for(n in i)i.hasOwnProperty(n)&&delete i[n];if(!e)return i;for(s=e.attributes,n=s.length;n--;)r=s[n],r&&r.specified&&a.test(r.name)&&(i[this.camelize(r.name.slice(t.length))]=this.deserializeValue(r.value));return i},checkAttr:function(e,t,i){return e.hasAttribute(t+i)},setAttr:function(e,t,i,n){e.setAttribute(this.dasherize(t+i),String(n))},generateID:function(){return""+r++},deserializeValue:function(t){var i;try{return t?"true"==t||"false"!=t&&("null"==t?null:isNaN(i=Number(t))?/^[\[\{]/.test(t)?e.parseJSON(t):t:i):t}catch(n){return t}},camelize:function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},dasherize:function(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var e;window.console&&"function"==typeof window.console.warn&&(e=window.console).warn.apply(e,arguments)},warnOnce:function(e){s[e]||(s[e]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){s={}},trimString:function(e){return e.replace(/^\s+|\s+$/g,"")},parse:{date:function S(e){var t=e.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!t)return null;var i=t.map(function(e){return parseInt(e,10)}),n=_slicedToArray(i,4),r=(n[0],n[1]),s=n[2],a=n[3],S=new Date(r,s-1,a);return S.getFullYear()!==r||S.getMonth()+1!==s||S.getDate()!==a?null:S},string:function(e){return e},integer:function(e){return isNaN(e)?null:parseInt(e,10)},number:function(e){if(isNaN(e))throw null;return parseFloat(e)},"boolean":function(e){return!/^\s*false\s*$/i.test(e)},object:function(e){return a.deserializeValue(e)},regexp:function(e){var t="";return/^\/.*\/(?:[gimy]*)$/.test(e)?(t=e.replace(/.*\/([gimy]*)$/,"$1"),e=e.replace(new RegExp("^/(.*?)/"+t+"$"),"$1")):e="^"+e+"$",new RegExp(e,t)}},parseRequirement:function(e,t){var i=this.parse[e||"string"];if(!i)throw'Unknown requirement specification: "'+e+'"';var n=i(t);if(null===n)throw"Requirement is not a "+e+': "'+t+'"';return n},namespaceEvents:function(t,i){return t=this.trimString(t||"").split(/\s+/),t[0]?e.map(t,function(e){return e+"."+i}).join(" "):""},difference:function(t,i){var n=[];return e.each(t,function(e,t){i.indexOf(t)==-1&&n.push(t)}),n},all:function(t){return e.when.apply(e,_toConsumableArray(t).concat([42,42]))},objectCreate:Object.create||function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var i=new e;return e.prototype=null,i}}(),_SubmitSelector:'input[type="submit"], button:submit'},o={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(e){},errorsContainer:function(e){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},l=function(){this.__id__=a.generateID()};l.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var t=this,i=function(){var i=e.Deferred();return!0!==t.validationResult&&i.reject(),i.resolve().promise()};return[i,i]},actualizeOptions:function(){return a.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(e){this.domOptions=a.objectCreate(this.parent.options),this.options=a.objectCreate(this.domOptions);for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.actualizeOptions()},_listeners:null,on:function(e,t){this._listeners=this._listeners||{};var i=this._listeners[e]=this._listeners[e]||[];return i.push(t),this},subscribe:function(t,i){e.listenTo(this,t.toLowerCase(),i)},off:function(e,t){var i=this._listeners&&this._listeners[e];if(i)if(t)for(var n=i.length;n--;)i[n]===t&&i.splice(n,1);else delete this._listeners[e];return this},unsubscribe:function(t,i){e.unsubscribeTo(this,t.toLowerCase())},trigger:function(e,t,i){t=t||this;var n,r=this._listeners&&this._listeners[e];if(r)for(var s=r.length;s--;)if(n=r[s].call(t,t,i),n===!1)return n;return!this.parent||this.parent.trigger(e,t,i)},asyncIsValid:function(e,t){return a.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:t})},_findRelated:function(){return this.options.multiple?e(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var u=function(e,t){var i=e.match(/^\s*\[(.*)\]\s*$/);if(!i)throw'Requirement is not an array: "'+e+'"';var n=i[1].split(",").map(a.trimString);if(n.length!==t)throw"Requirement has "+n.length+" values when "+t+" are needed";return n},d=function(e,t,i){var n=null,r={};for(var s in e)if(s){var o=i(s);"string"==typeof o&&(o=a.parseRequirement(e[s],o)),r[s]=o}else n=a.parseRequirement(e[s],t);return[n,r]},h=function(t){e.extend(!0,this,t)};h.prototype={validate:function(e,t){if(this.fn)return arguments.length>3&&(t=[].slice.call(arguments,1,-1)),this.fn(e,t);if(Array.isArray(e)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var i=arguments[arguments.length-1];if(this.validateDate&&i._isDateInput())return arguments[0]=a.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(e)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(t,i){if("string"!=typeof t)return Array.isArray(t)?t:[t];var n=this.requirementType;if(Array.isArray(n)){for(var r=u(t,n.length),s=0;s<r.length;s++)r[s]=a.parseRequirement(n[s],r[s]);return r}return e.isPlainObject(n)?d(n,t,i):[a.parseRequirement(n,t)]},requirementType:"string",priority:2};var p=function(e,t){this.__class__="ValidatorRegistry",this.locale="en",this.init(e||{},t||{})},c={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(e){return null!==a.parse.date(e)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$","i")};c.range=c.number;var f=function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},m=function(e,t){return t.map(a.parse[e])},g=function(e,t){return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.pop(),t.apply(void 0,[i].concat(_toConsumableArray(m(e,r))))}},v=function(e){return{validateDate:g("date",e),validateNumber:g("number",e),requirementType:e.length<=2?"string":["string","string"],priority:30}};p.prototype={init:function(e,t){this.catalog=t,this.validators=_extends({},this.validators);for(var i in e)this.addValidator(i,e[i].fn,e[i].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(e){if("undefined"==typeof this.catalog[e])throw new Error(e+" is not available in the catalog");return this.locale=e,this},addCatalog:function(e,t,i){return"object"==typeof t&&(this.catalog[e]=t),!0===i?this.setLocale(e):this},addMessage:function(e,t,i){return"undefined"==typeof this.catalog[e]&&(this.catalog[e]={}),this.catalog[e][t]=i,this},addMessages:function(e,t){for(var i in t)this.addMessage(e,i,t[i]);return this},addValidator:function(e,t,i){if(this.validators[e])a.warn('Validator "'+e+'" is already defined.');else if(o.hasOwnProperty(e))return void a.warn('"'+e+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},updateValidator:function(e,t,i){return this.validators[e]?this._setValidator.apply(this,arguments):(a.warn('Validator "'+e+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(e){return this.validators[e]||a.warn('Validator "'+e+'" is not defined.'),delete this.validators[e],this},_setValidator:function(e,t,i){"object"!=typeof t&&(t={fn:t,priority:i}),t.validate||(t=new h(t)),this.validators[e]=t;for(var n in t.messages||{})this.addMessage(n,e,t.messages[n]);return this},getErrorMessage:function(e){var t;if("type"===e.name){var i=this.catalog[this.locale][e.name]||{};t=i[e.requirements]}else t=this.formatMessage(this.catalog[this.locale][e.name],e.requirements);return t||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(e,t){if("object"==typeof t){for(var i in t)e=this.formatMessage(e,t[i]);return e}return"string"==typeof e?e.replace(/%s/i,t):""},validators:{notblank:{validateString:function(e){return/\S/.test(e)},priority:2},required:{validateMultiple:function(e){return e.length>0},validateString:function(e){return/\S/.test(e)},priority:512},type:{validateString:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=i.step,r=void 0===n?"any":n,s=i.base,a=void 0===s?0:s,o=c[t];if(!o)throw new Error("validator type `"+t+"` is not supported");if(!o.test(e))return!1;if("number"===t&&!/^any$/i.test(r||"")){var l=Number(e),u=Math.max(f(r),f(a));if(f(l)>u)return!1;var d=function(e){return Math.round(e*Math.pow(10,u))};if((d(l)-d(a))%d(r)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(e,t){return t.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(e,t){return e.length<=t},requirementType:"integer",priority:30},length:{validateString:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(e,t){return e.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},min:v(function(e,t){return e>=t}),max:v(function(e,t){return e<=t}),range:v(function(e,t,i){return e>=t&&e<=i}),equalto:{validateString:function(t,i){var n=e(i);return n.length?t===n.val():t===i},priority:256}}};var y={},_=function k(e,t,i){for(var n=[],r=[],s=0;s<e.length;s++){for(var a=!1,o=0;o<t.length;o++)if(e[s].assert.name===t[o].assert.name){a=!0;break}a?r.push(e[s]):n.push(e[s])}return{kept:r,added:n,removed:i?[]:k(t,e,!0).added}};y.Form={_actualizeTriggers:function(){var e=this;this.$element.on("submit.Parsley",function(t){e.onSubmitValidate(t)}),this.$element.on("click.Parsley",a._SubmitSelector,function(t){e.onSubmitButton(t)}),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var e=0;e<this.fields.length;e++){var t=this.fields[e];if(!0!==t.validationResult&&t.validationResult.length>0&&"undefined"==typeof t.options.noFocus&&(this._focusedField=t.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},y.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var e=_(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(e),this._actualizeTriggers(),!e.kept.length&&!e.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var e=[],t=0;t<this.validationResult.length;t++)e.push(this.validationResult[t].errorMessage||this._getErrorMessage(this.validationResult[t].assert));return e},addError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r||r;this._buildUI(),this._addError(e,{message:i,assert:n}),s&&this._errorClass()},updateError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r||r;this._buildUI(),this._updateError(e,{message:i,assert:n}),s&&this._errorClass()},removeError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.updateClass,n=void 0===i||i;this._buildUI(),this._removeError(e),n&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(t){if("undefined"==typeof this.options.errorsMessagesDisabled){if("undefined"!=typeof this.options.errorMessage)return t.added.length||t.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(e(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var i=0;i<t.removed.length;i++)this._removeError(t.removed[i].assert.name);for(i=0;i<t.added.length;i++)this._addError(t.added[i].assert.name,{message:t.added[i].errorMessage,assert:t.added[i].assert});for(i=0;i<t.kept.length;i++)this._updateError(t.kept[i].assert.name,{message:t.kept[i].errorMessage,assert:t.kept[i].assert})}},_addError:function(t,i){var n=i.message,r=i.assert;this._insertErrorWrapper(),this._ui.$errorsWrapper.addClass("filled").append(e(this.options.errorTemplate).addClass("parsley-"+t).html(n||this._getErrorMessage(r)))},_updateError:function(e,t){var i=t.message,n=t.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+e).html(i||this._getErrorMessage(n))},_removeError:function(e){this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+e).remove()},_getErrorMessage:function(e){var t=e.name+"Message";return"undefined"!=typeof this.options[t]?window.Parsley.formatMessage(this.options[t],e.requirements):window.Parsley.getErrorMessage(e)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var t={};this.element.setAttribute(this.options.namespace+"id",this.__id__),t.$errorClassHandler=this._manageClassHandler(),t.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),t.$errorsWrapper=e(this.options.errorsWrapper).attr("id",t.errorsWrapperId),t.lastValidationResult=[],t.validationInformationVisible=!1,this._ui=t}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler)return 0===e(this.options.classHandler).length&&ParsleyUtils.warn("No elements found that match the selector `"+this.options.classHandler+"` set in options.classHandler or data-parsley-class-handler"),e(this.options.classHandler);if("function"==typeof this.options.classHandler)var t=this.options.classHandler.call(this,this);return"undefined"!=typeof t&&t.length?t:this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var t;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof this.options.errorsContainer){if(e(this.options.errorsContainer).length)return e(this.options.errorsContainer).append(this._ui.$errorsWrapper);a.warn("The errors container `"+this.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof this.options.errorsContainer&&(t=this.options.errorsContainer.call(this,this));return"undefined"!=typeof t&&t.length?t.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var e,t=this,i=this._findRelated();i.off(".Parsley"),this._failedOnce?i.on(a.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){t._validateIfNeeded()}):(e=a.namespaceEvents(this.options.trigger,"Parsley"))&&i.on(e,function(e){t._validateIfNeeded(e)})},_validateIfNeeded:function(e){var t=this;e&&/key|input/.test(e.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return t.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),"undefined"!=typeof this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),"undefined"!=typeof this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var w=function(t,i,n){this.__class__="Form",this.element=t,this.$element=e(t),this.domOptions=i,this.options=n,this.parent=window.Parsley,this.fields=[],this.validationResult=null},b={pending:null,resolved:!0,rejected:!1};w.prototype={onSubmitValidate:function(e){var t=this;if(!0!==e.parsley){var i=this._submitSource||this.$element.find(a._SubmitSelector)[0];if(this._submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!i||null===i.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var n=this.whenValidate({event:e});"resolved"===n.state()&&!1!==this._trigger("submit")||(e.stopImmediatePropagation(),e.preventDefault(),"pending"===n.state()&&n.done(function(){t._submit(i)}))}}},onSubmitButton:function(e){this._submitSource=e.currentTarget},_submit:function(t){if(!1!==this._trigger("submit")){if(t){var i=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===i.length&&(i=e('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),i.attr({name:t.getAttribute("name"),value:t.getAttribute("value")})}this.$element.trigger(_extends(e.Event("submit"),{parsley:!0}))}},validate:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1],s=i[2];t={group:n,force:r,event:s}}return b[this.whenValidate(t).state()]},whenValidate:function(){var t,i=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=n.group,s=n.force,o=n.event;this.submitEvent=o,o&&(this.submitEvent=_extends({},o,{preventDefault:function(){a.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),i.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var l=this._withoutReactualizingFormOptions(function(){return e.map(i.fields,function(e){return e.whenValidate({force:s,group:r})})});return(t=a.all(l).done(function(){i._trigger("success")}).fail(function(){i.validationResult=!1,i.focus(),i._trigger("error")}).always(function(){i._trigger("validated")})).pipe.apply(t,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={group:n,force:r}}return b[this.whenValid(t).state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force;this._refreshFields();var s=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValid({group:n,force:r})})});return a.all(s)},reset:function(){for(var e=0;e<this.fields.length;e++)this.fields[e].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var e=0;e<this.fields.length;e++)this.fields[e].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var t=this,i=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){t.$element.find(t.options.inputs).not(t.options.excluded).each(function(e,i){var n=new window.Parsley.Factory(i,{},t);if(("Field"===n.__class__||"FieldMultiple"===n.__class__)&&!0!==n.options.excluded){var r=n.__class__+"-"+n.__id__;"undefined"==typeof t.fieldsMappedById[r]&&(t.fieldsMappedById[r]=n,t.fields.push(n))}}),e.each(a.difference(i,t.fields),function(e,t){t.reset()})}),this},_withoutReactualizingFormOptions:function(e){var t=this.actualizeOptions;this.actualizeOptions=function(){return this};var i=e();return this.actualizeOptions=t,i},_trigger:function(e){return this.trigger("form:"+e)}};var F=function(e,t,i,n,r){var s=window.Parsley._validatorRegistry.validators[t],a=new h(s);n=n||e.options[t+"Priority"]||a.priority,r=!0===r,_extends(this,{validator:a,name:t,requirements:i,priority:n,isDomConstraint:r}),this._parseRequirements(e.options)},C=function(e){var t=e[0].toUpperCase();return t+e.slice(1)};F.prototype={validate:function(e,t){var i;return(i=this.validator).validate.apply(i,[e].concat(_toConsumableArray(this.requirementList),[t]))},_parseRequirements:function(e){var t=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(i){return e[t.name+C(i)]})}};var E=function(t,i,n,r){this.__class__="Field",this.element=t,this.$element=e(t),"undefined"!=typeof r&&(this.parent=r),this.options=n,this.domOptions=i,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},A={pending:null,resolved:!0,rejected:!1};E.prototype={validate:function(t){arguments.length>=1&&!e.isPlainObject(t)&&(a.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),t={options:t});var i=this.whenValidate(t);if(!i)return!0;switch(i.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var e,t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=i.group;if(this.refreshConstraints(),!r||this._isInGroup(r))return this.value=this.getValue(),this._trigger("validate"),(e=this.whenValid({force:n,value:this.value,_refreshed:!0}).always(function(){t._reflowUI()}).done(function(){t._trigger("success")}).fail(function(){t._trigger("error")}).always(function(){t._trigger("validated")})).pipe.apply(e,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(e){return"undefined"==typeof e&&(e=this.getValue()),!(!e.length&&!this._isRequired()&&"undefined"==typeof this.options.validateIfEmpty)},_isInGroup:function(t){return Array.isArray(this.options.group)?-1!==e.inArray(t,this.options.group):this.options.group===t},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={force:n,value:r}}var s=this.whenValid(t);return!s||A[s.state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=void 0!==n&&n,s=i.value,o=i.group,l=i._refreshed;if(l||this.refreshConstraints(),!o||this._isInGroup(o)){if(this.validationResult=!0,!this.hasConstraints())return e.when();if("undefined"!=typeof s&&null!==s||(s=this.getValue()),!this.needsValidation(s)&&!0!==r)return e.when();var u=this._getGroupedConstraints(),d=[];return e.each(u,function(i,n){var r=a.all(e.map(n,function(e){return t._validateConstraint(s,e)}));if(d.push(r),"rejected"===r.state())return!1}),a.all(d)}},_validateConstraint:function(t,i){var n=this,r=i.validate(t,this);return!1===r&&(r=e.Deferred().reject()),a.all([r]).fail(function(e){n.validationResult instanceof Array||(n.validationResult=[]),n.validationResult.push({assert:i,errorMessage:"string"==typeof e&&e})})},getValue:function(){var e;return e="function"==typeof this.options.value?this.options.value(this):"undefined"!=typeof this.options.value?this.options.value:this.$element.val(),"undefined"==typeof e||null===e?"":this._handleWhitespace(e)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(e,t,i,n){if(window.Parsley._validatorRegistry.validators[e]){var r=new F(this,e,t,i,n);"undefined"!==this.constraintsByName[r.name]&&this.removeConstraint(r.name),this.constraints.push(r),this.constraintsByName[r.name]=r}return this},removeConstraint:function(e){for(var t=0;t<this.constraints.length;t++)if(e===this.constraints[t].name){this.constraints.splice(t,1);break}return delete this.constraintsByName[e],this},updateConstraint:function(e,t,i){return this.removeConstraint(e).addConstraint(e,t,i)},_bindConstraints:function(){for(var e=[],t={},i=0;i<this.constraints.length;i++)!1===this.constraints[i].isDomConstraint&&(e.push(this.constraints[i]),t[this.constraints[i].name]=this.constraints[i]);this.constraints=e,this.constraintsByName=t;for(var n in this.options)this.addConstraint(n,this.options[n],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var e=this.element.getAttribute("min"),t=this.element.getAttribute("max");null!==e&&null!==t?this.addConstraint("range",[e,t],void 0,!0):null!==e?this.addConstraint("min",e,void 0,!0):null!==t&&this.addConstraint("max",t,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var i=this.element.type;return"number"===i?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:e||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(i)?this.addConstraint("type",i,void 0,!0):this},_isRequired:function(){return"undefined"!=typeof this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(e){return this.trigger("field:"+e)},_handleWhitespace:function(e){return!0===this.options.trimValue&&a.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(e=e.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(e=a.trimString(e)),e},_isDateInput:function(){var e=this.constraintsByName.type;return e&&"date"===e.requirements},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var e=[],t={},i=0;i<this.constraints.length;i++){var n=this.constraints[i].priority;t[n]||e.push(t[n]=[]),t[n].push(this.constraints[i])}return e.sort(function(e,t){return t[0].priority-e[0].priority}),e}};var x=E,$=function(){this.__class__="FieldMultiple"};$.prototype={addElement:function(e){return this.$elements.push(e),this},refreshConstraints:function(){var t;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),
this;for(var i=0;i<this.$elements.length;i++)if(e("html").has(this.$elements[i]).length){t=this.$elements[i].data("FieldMultiple").refreshConstraints().constraints;for(var n=0;n<t.length;n++)this.addConstraint(t[n].name,t[n].requirements,t[n].priority,t[n].isDomConstraint)}else this.$elements.splice(i,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if("undefined"!=typeof this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){if("radio"===this.element.type)return this._findRelated().filter(":checked").val()||"";if("checkbox"===this.element.type){var t=[];return this._findRelated().filter(":checked").each(function(){t.push(e(this).val())}),t}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var P=function(t,i,n){this.element=t,this.$element=e(t);var r=this.$element.data("Parsley");if(r)return"undefined"!=typeof n&&r.parent===window.Parsley&&(r.parent=n,r._resetOptions(r.options)),"object"==typeof i&&_extends(r.options,i),r;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if("undefined"!=typeof n&&"Form"!==n.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=n||window.Parsley,this.init(i)};P.prototype={init:function(e){return this.__class__="Parsley",this.__version__="2.7.2",this.__id__=a.generateID(),this._resetOptions(e),"FORM"===this.element.nodeName||a.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){return"radio"===this.element.type||"checkbox"===this.element.type||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var t,i,n=this;if(this.options.multiple=this.options.multiple||(t=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return a.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),t&&e('input[name="'+t+'"]').each(function(e,t){"radio"!==t.type&&"checkbox"!==t.type||t.setAttribute(n.options.namespace+"multiple",n.options.multiple)});for(var r=this._findRelated(),s=0;s<r.length;s++)if(i=e(r.get(s)).data("Parsley"),"undefined"!=typeof i){this.$element.data("FieldMultiple")||i.addElement(this.$element);break}return this.bind("parsleyField",!0),i||this.bind("parsleyFieldMultiple")},bind:function(t,i){var n;switch(t){case"parsleyForm":n=e.extend(new w(this.element,this.domOptions,this.options),new l,window.ParsleyExtend)._bindFields();break;case"parsleyField":n=e.extend(new x(this.element,this.domOptions,this.options,this.parent),new l,window.ParsleyExtend);break;case"parsleyFieldMultiple":n=e.extend(new x(this.element,this.domOptions,this.options,this.parent),new $,new l,window.ParsleyExtend)._init();break;default:throw new Error(t+"is not a supported Parsley type")}return this.options.multiple&&a.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),"undefined"!=typeof i?(this.$element.data("FieldMultiple",n),n):(this.$element.data("Parsley",n),n._actualizeTriggers(),n._trigger("init"),n)}};var V=e.fn.jquery.split(".");if(parseInt(V[0])<=1&&parseInt(V[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";V.forEach||a.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var O=_extends(new l,{element:document,$element:e(document),actualizeOptions:null,_resetOptions:null,Factory:P,version:"2.7.2"});_extends(x.prototype,y.Field,l.prototype),_extends(w.prototype,y.Form,l.prototype),_extends(P.prototype,l.prototype),e.fn.parsley=e.fn.psly=function(t){if(this.length>1){var i=[];return this.each(function(){i.push(e(this).parsley(t))}),i}return e(this).length?new P(this[0],t):void a.warn("You must bind Parsley on an existing element.")},"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),O.options=_extends(a.objectCreate(o),window.ParsleyConfig),window.ParsleyConfig=O.options,window.Parsley=window.psly=O,O.Utils=a,window.ParsleyUtils={},e.each(a,function(e,t){"function"==typeof t&&(window.ParsleyUtils[e]=function(){return a.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),a[e].apply(a,arguments)})});var M=window.Parsley._validatorRegistry=new p(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "),function(e,t){window.Parsley[t]=function(){return M[t].apply(M,arguments)},window.ParsleyValidator[t]=function(){var e;return a.warnOnce("Accessing the method '"+t+"' through Validator is deprecated. Simply call 'window.Parsley."+t+"(...)'"),(e=window.Parsley)[t].apply(e,arguments)}}),window.Parsley.UI=y,window.ParsleyUI={removeError:function(e,t,i){var n=!0!==i;return a.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e.removeError(t,{updateClass:n})},getErrorsMessages:function(e){return a.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),e.getErrorsMessages()}},e.each("addError updateError".split(" "),function(e,t){window.ParsleyUI[t]=function(e,i,n,r,s){var o=!0!==s;return a.warnOnce("Accessing UI is deprecated. Call '"+t+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e[t](i,{message:n,assert:r,updateClass:o})}}),!1!==window.ParsleyConfig.autoBind&&e(function(){e("[data-parsley-validate]").length&&e("[data-parsley-validate]").parsley()});var T=e({}),R=function(){a.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},D="parsley:";e.listen=function(e,n){var r;if(R(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(r=arguments[1],n=arguments[2]),"function"!=typeof n)throw new Error("Wrong parameters");window.Parsley.on(i(e),t(n,r))},e.listenTo=function(e,n,r){if(R(),!(e instanceof x||e instanceof w))throw new Error("Must give Parsley instance");if("string"!=typeof n||"function"!=typeof r)throw new Error("Wrong parameters");e.on(i(n),t(r))},e.unsubscribe=function(e,t){if(R(),"string"!=typeof e||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(i(e),t.parsleyAdaptedCallback)},e.unsubscribeTo=function(e,t){if(R(),!(e instanceof x||e instanceof w))throw new Error("Must give Parsley instance");e.off(i(t))},e.unsubscribeAll=function(t){R(),window.Parsley.off(i(t)),e("form,input,textarea,select").each(function(){var n=e(this).data("Parsley");n&&n.off(i(t))})},e.emit=function(e,t){var n;R();var r=t instanceof x||t instanceof w,s=Array.prototype.slice.call(arguments,r?2:1);s.unshift(i(e)),r||(t=window.Parsley),(n=t).trigger.apply(n,_toConsumableArray(s))};e.extend(!0,O,{asyncValidators:{"default":{fn:function(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function(e,t,i,n){return O.asyncValidators[e]={fn:t,url:i||!1,options:n||{}},this}}),O.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,i,n,r){var s,a,o={},l=n.validator||(!0===n.reverse?"reverse":"default");if("undefined"==typeof O.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");i=O.asyncValidators[l].url||i,i.indexOf("{value}")>-1?i=i.replace("{value}",encodeURIComponent(t)):o[r.element.getAttribute("name")||r.element.getAttribute("id")]=t;var u=e.extend(!0,n.options||{},O.asyncValidators[l].options);s=e.extend(!0,{},{url:i,data:o,type:"GET"},u),r.trigger("field:ajaxoptions",r,s),a=e.param(s),"undefined"==typeof O._remoteCache&&(O._remoteCache={});var d=O._remoteCache[a]=O._remoteCache[a]||e.ajax(s),h=function(){var t=O.asyncValidators[l].fn.call(r,d,i,n);return t||(t=e.Deferred().reject()),e.when(t)};return d.then(h,h)},priority:-1}),O.on("form:submit",function(){O._remoteCache={}}),l.prototype.addAsyncValidator=function(){return a.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),O.addAsyncValidator.apply(O,arguments)},O.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),O.setLocale("en");var I=new n;I.install();var q=O;return q});
jQuery(document).ready(function(e){function a(e,a){l(e,a),e.find(a.container).first().show()}function n(a,n){if(n.tabs){var t=e("<div />",{"class":n.tabMenuClassName}).insertBefore(a.children(n.container).filter(":first"));a.children(n.container).each(function(i,r){var l=e("<button/>").html(e(this).children(n.header).html()).addClass(0==i?n.tabMenuItemActiveClassName:"").addClass("item"+i).addClass("btn btn-default").prop("type","button").on("click keypress",{container:a.children(n.container),fieldset:e(r)},function(){var t=e(this),i=t.parent().children().index(t);s(a,n,t,i)});n.tabIndex&&l.prop("tabindex",i),t.append(l)})}}function t(a,n){n.navigation&&a.children(n.container).each(function(t){var i=e("<div />").addClass("powermail_fieldwrap").addClass("powermail_tab_navigation").appendTo(e(this));t>0&&i.append(c(a,n)),t<a.children(n.container).length-1&&i.append(o(a,n))})}function i(a,n){e.fn.parsley&&"data-parsley-validate"===a.data("parsley-validate")&&a.parsley().subscribe("parsley:field:validated",function(){v(a,n),C(a,n)})}function r(a,n){n.openTabOnError&&e.fn.parsley&&e.listen("parsley:field:error",function(){setTimeout(function(){a.find("."+n.tabMenuClassName+" > ."+n.tabMenuItemErrorClassName+":first").click()},50)})}function s(a,n,t,i){$activeTab=b(a,n),$activeTab.removeClass(n.tabMenuItemActiveClassName),t.addClass(n.tabMenuItemActiveClassName),l(a,n),e(".powermail_fieldset",a).slice(i,i+1).show()}function l(e,a){e.children(a.container).hide()}function c(a,n){return e("<a />").prop("href","#").addClass("btn btn-warning").html("<").click(function(e){e.preventDefault(),u(a,n)})}function o(a,n){return e("<a />").prop("href","#").addClass("btn btn-primary pull-right").html(">").click(function(e){e.preventDefault(),d(a,n)})}function d(e,a){var n=m(e,a);$activeTab=b(e,a),$activeTab.removeClass(a.tabMenuItemActiveClassName).next().addClass(a.tabMenuItemActiveClassName),f(e,a,n+1)}function u(e,a){var n=m(e,a);$activeTab=b(e,a),$activeTab.removeClass(a.tabMenuItemActiveClassName).prev().addClass(a.tabMenuItemActiveClassName),f(e,a,n-1)}function f(e,a,n){l(e,a),e.find(".powermail_fieldset").slice(n,n+1).show()}function m(e,a){var n=p(e,a),t=n.index(b(e,a));return parseInt(t)}function p(e,a){return e.find("."+a.tabMenuClassName).children()}function b(e,a){var n=p(e,a);return n.filter("."+a.tabMenuItemActiveClassName)}function v(e,a){var n=p(e,a);n.removeClass(a.tabMenuItemErrorClassName)}function C(a,n){a.parsley().isValid()||a.find(".parsley-error").each(function(){var t=a.find(".powermail_fieldset").index(e(this).closest(".powermail_fieldset")),i=p(a,n),r=i.slice(t,t+1);r.addClass(n.tabMenuItemErrorClassName)})}e.fn.powermailTabs=function(e){"use strict";var s=jQuery(this);e=jQuery.extend({container:"fieldset",header:"legend",tabs:!0,navigation:!0,openTabOnError:!0,tabIndex:!0,tabMenuClassName:"btn-group",tabMenuItemActiveClassName:"btn-primary",tabMenuItemErrorClassName:"btn-danger"},e),a(s,e),n(s,e),t(s,e),i(s,e),r(s,e)}});
function PowermailForm(e){"use strict";this.initialize=function(){t(),a(),i(),r(),o(),n(),f(),l()};var t=function(){e.fn.powermailTabs&&e(".powermail_morestep").each(function(){e(this).powermailTabs()})},a=function(){e("form[data-powermail-ajax]").length&&p()},i=function(){if(e('*[data-powermail-location="prefill"]').length&&navigator.geolocation){e(this);navigator.geolocation.getCurrentPosition(function(t){var a=t.coords.latitude,i=t.coords.longitude,r=C()+"/index.php?eID=powermailEidGetLocation";jQuery.ajax({url:r,data:"lat="+a+"&lng="+i,cache:!1,success:function(t){t&&e('*[data-powermail-location="prefill"]').val(t)}})})}},r=function(){e.fn.datetimepicker&&e(".powermail_date").each(function(){var t=e(this);if("date"===t.prop("type")||"datetime-local"===t.prop("type")||"time"===t.prop("type")){if(!t.data("datepicker-force")){if(e(this).data("date-value")){var a=g(e(this).data("date-value"),e(this).data("datepicker-format"),t.prop("type"));null!==a&&e(this).val(a)}return}t.prop("type","text"),t.val(e(this).data("date-value"))}var i=!0,r=!0;"date"===t.data("datepicker-settings")?r=!1:"time"===t.data("datepicker-settings")&&(i=!1),t.datetimepicker({format:t.data("datepicker-format"),timepicker:r,datepicker:i,lang:"en",i18n:{en:{months:t.data("datepicker-months").split(","),dayOfWeek:t.data("datepicker-days").split(",")}}})})},o=function(){e(".powermail_all_type_password.powermail_all_value").html("********")},n=function(){e.fn.parsley&&e(".powermail_reset").on("click","",function(){e('form[data-parsley-validate="data-parsley-validate"]').parsley().reset()})},l=function(){window.Parsley&&(x(),b())},p=function(){var t,a=!1;e(document).on("submit","form[data-powermail-ajax]",function(i){var r=e(this),o=r.closest(".tx-powermail");r.data("powermail-ajax-uri")&&(t=r.data("powermail-ajax-uri"));var n=r.data("powermail-form");a||(e.ajax({type:"POST",url:r.prop("action"),data:new FormData(r.get(0)),contentType:!1,processData:!1,beforeSend:function(){s(r)},complete:function(){d(r),f(),c(o)},success:function(i){var o=e('*[data-powermail-form="'+n+'"]:first',i);o.length?(e('*[data-powermail-form="'+n+'"]:first').closest(".tx-powermail").html(o),e.fn.powermailTabs&&e(".powermail_morestep").powermailTabs(),e.fn.parsley&&e('form[data-parsley-validate="data-parsley-validate"]').parsley(),w()):(t?D(t):r.submit(),a=!0)}}),i.preventDefault())})},s=function(t){d(t),e(".powermail_submit",t).length?e(".powermail_submit",t).parent().append(y()):t.closest(".tx-powermail").append(y())},d=function(e){e.closest(".tx-powermail").find(".powermail_progressbar").remove()},c=function(t){var a=e.Event("submitted.powermail.form");t.trigger(a)},f=function(){e(".powermail_fieldwrap_file").find(".deleteAllFiles").each(function(){u(e(this).closest(".powermail_fieldwrap_file").find('input[type="file"]'))}),e(".deleteAllFiles").click(function(){m(e(this).closest(".powermail_fieldwrap_file").find('input[type="hidden"]')),e(this).closest("ul").fadeOut(function(){e(this).remove()})})},u=function(e){e.prop("disabled","disabled").addClass("hide").prop("type","hidden")},m=function(e){e.prop("disabled",!1).removeClass("hide").prop("type","file")},w=function(){e("img.powermail_captchaimage").each(function(){var t=h(e(this).prop("src"));e(this).prop("src",t+"?hash="+v(5))})},h=function(e){var t=e.split("?");return t[0]},v=function(e){for(var t="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<e;i++)t+=a.charAt(Math.floor(Math.random()*a.length));return t},g=function(e,t,a){var i=Date.parseDate(e,t);if(null===i)return null;var r=new Date(i),o=r.getFullYear()+"-";o+=("0"+(r.getMonth()+1)).slice(-2)+"-",o+=("0"+r.getDate()).slice(-2);var n=("0"+r.getHours()).slice(-2)+":"+("0"+r.getMinutes()).slice(-2),l=o+"T"+n;return"date"===a?o:"datetime-local"===a?l:"time"===a?n:null},y=function(){return e("<div />").addClass("powermail_progressbar").html(e("<div />").addClass("powermail_progress").html(e("<div />").addClass("powermail_progress_inner")))},_=function(e){for(var t=e.get(0),a=0,i=0;i<t.files.length;i++){var r=t.files[i];r.size>a&&(a=r.size)}return parseInt(a)},x=function(){window.Parsley.addValidator("powermailfilesize",function(t,a){if(a.indexOf(",")!==-1){var i=a.split(","),r=parseInt(i[0]),o=e('*[name="tx_powermail_pi1[field]['+i[1]+'][]"]');if(o.length&&_(o)>r)return!1}return!0},32).addMessage("en","powermailfilesize","Error")},b=function(){window.Parsley.addValidator("powermailfileextensions",function(t,a){var i=e('*[name="tx_powermail_pi1[field]['+a+'][]"]');return!i.length||k(j(t),i.prop("accept"))},32).addMessage("en","powermailfileextensions","Error")},k=function(e,t){return t.indexOf("."+e)!==-1},j=function(e){return e.split(".").pop().toLowerCase()},D=function(e){e.indexOf("http")!==-1?window.location=e:window.location.pathname=e},C=function(){var t;return t=e("base").length>0?jQuery("base").prop("href"):"https:"!=window.location.protocol?"http://"+window.location.hostname:"https://"+window.location.hostname}}jQuery(document).ready(function(e){"use strict";var t=new window.PowermailForm(e);t.initialize()});
function PowermailMarketing(i){"use strict";this.initialize=function(){a()};var a=function(){var a=i("#powermail_marketing_information"),t="";t+="tx_powermail_pi1[language]="+a.data("language"),t+="&id="+a.data("pid"),t+="&tx_powermail_pi1[pid]="+a.data("pid"),t+="&tx_powermail_pi1[mobileDevice]="+(e()?1:0),t+="&tx_powermail_pi1[referer]="+encodeURIComponent(document.referrer),jQuery.ajax({url:n()+"/index.php?&type=1540053358",data:t,cache:!1})},e=function(){var i=navigator.userAgent,a={iphone:i.match(/(iPhone|iPod|iPad)/),blackberry:i.match(/BlackBerry/),android:i.match(/Android/)};return a.iphone||a.blackberry||a.android},n=function(){var a,e=i("base");return a=e.length>0?e.prop("href"):"https:"!=window.location.protocol?"http://"+window.location.hostname:"https://"+window.location.hostname}}jQuery(document).ready(function(i){var a=new window.PowermailMarketing(i);a.initialize()});
function setFontSizeCookie(size) {
  document.cookie = "font_size=" + size;
}

(function () {
  function fontSizeChange() {
    let html = $("html"),
      match = document.cookie.match(new RegExp('(^| )' + "font_size" + '=([^;]+)'));

    if (match) {
      html.css('font-size', match[2]);
    }
    $('.fontSizeLower').click(function () {
      let fontSize = html.css('font-size');
      fontSize = parseInt(fontSize.split('px')[0]);
      if (fontSize > 15) {
        let newFontSize = fontSize - 1 + 'px';
        html.css('font-size', newFontSize);
        setFontSizeCookie(newFontSize);
      }
    });
    $('.fontSizeNeutral').click(function () {
      html.css('font-size', '15px');
      setFontSizeCookie('15px');
    });
    $('.fontSizeBigger').click(function () {
      let fontSize = html.css('font-size');
      fontSize = parseInt(fontSize.split('px')[0]);
      if (fontSize <= 24) {
        let newFontSize = fontSize + 1 + 'px';
        html.css('font-size', newFontSize);
        setFontSizeCookie(newFontSize);
      }
    });
  }

  fontSizeChange();

  /**
   * set content height higher then sidebar if required
   */
  $(document).ready(function() {
    let sidebarH = $('.sidebar').height(),
      allcontH = $('.allcont').height();
    if (null === sidebarH) {
      sidebarH = 0;
    }
    sidebarH += 50;
    if (sidebarH > allcontH) {
      $('.allcont').css('min-height', sidebarH);  /* padding-bottom from .sidebar */
    }
    // Trigger resize owl if available
    window.setTimeout(function() {
      let owl = $('.gallery.big .owl-carousel');
      if (owl.length > 0) {
        owl.trigger('resized.owl.carousel');
      }
    }, 250);
  });
})();

/*! Video.js v4.12.11 Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */ 
(function() {var b=void 0,f=!0,j=null,l=!1;function m(){return function(){}}function n(a){return function(){return this[a]}}function p(a){return function(){return a}}var s;document.createElement("video");document.createElement("audio");document.createElement("track");
function t(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(t.Da[a])return c&&t.log.warn('Player "'+a+'" is already initialised. Options will not be applied.'),d&&t.Da[a].I(d),t.Da[a];a=t.m(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new t.Player(a,c,d)}var videojs=window.videojs=t;t.jc="4.12";t.wd="https:"==document.location.protocol?"https://":"http://";t.VERSION="4.12.11";
t.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:2E3,children:{mediaLoader:{},posterImage:{},loadingSpinner:{},textTrackDisplay:{},bigPlayButton:{},controlBar:{},errorDisplay:{},textTrackSettings:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.Jf||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."};
"GENERATED_CDN_VSN"!==t.jc&&(videojs.options.flash.swf=t.wd+"vjs.zencdn.net/"+t.jc+"/video-js.swf");t.Kd=function(a,c){t.options.languages[a]=t.options.languages[a]!==b?t.$.Ba(t.options.languages[a],c):c;return t.options.languages};t.Da={};"function"===typeof define&&define.amd?define("videojs",[],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);t.Ha=t.CoreObject=m();
t.Ha.extend=function(a){var c,d;a=a||{};c=a.init||a.l||this.prototype.init||this.prototype.l||m();d=function(){c.apply(this,arguments)};d.prototype=t.i.create(this.prototype);d.prototype.constructor=d;d.extend=t.Ha.extend;d.create=t.Ha.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};t.Ha.create=function(){var a=t.i.create(this.prototype);this.apply(a,arguments);return a};
t.b=function(a,c,d){if(t.i.isArray(c))return v(t.b,a,c,d);var e=t.getData(a);e.G||(e.G={});e.G[c]||(e.G[c]=[]);d.s||(d.s=t.s++);e.G[c].push(d);e.ca||(e.disabled=l,e.ca=function(c){if(!e.disabled){c=t.Qb(c);var d=e.G[c.type];if(d)for(var d=d.slice(0),k=0,q=d.length;k<q&&!c.Rc();k++)d[k].call(a,c)}});1==e.G[c].length&&(a.addEventListener?a.addEventListener(c,e.ca,l):a.attachEvent&&a.attachEvent("on"+c,e.ca))};
t.n=function(a,c,d){if(t.Mc(a)){var e=t.getData(a);if(e.G){if(t.i.isArray(c))return v(t.n,a,c,d);if(c){var g=e.G[c];if(g){if(d){if(d.s)for(e=0;e<g.length;e++)g[e].s===d.s&&g.splice(e--,1)}else e.G[c]=[];t.Bc(a,c)}}else for(g in e.G)c=g,e.G[c]=[],t.Bc(a,c)}}};t.Bc=function(a,c){var d=t.getData(a);0===d.G[c].length&&(delete d.G[c],a.removeEventListener?a.removeEventListener(c,d.ca,l):a.detachEvent&&a.detachEvent("on"+c,d.ca));t.kb(d.G)&&(delete d.G,delete d.ca,delete d.disabled);t.kb(d)&&t.cd(a)};
t.Qb=function(a){function c(){return f}function d(){return l}if(!a||!a.Wb){var e=a||window.event;a={};for(var g in e)"layerX"!==g&&("layerY"!==g&&"keyLocation"!==g)&&("returnValue"==g&&e.preventDefault||(a[g]=e[g]));a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){e.preventDefault&&e.preventDefault();a.returnValue=l;a.je=c;a.defaultPrevented=f};a.je=d;a.defaultPrevented=l;a.stopPropagation=function(){e.stopPropagation&&
e.stopPropagation();a.cancelBubble=f;a.Wb=c};a.Wb=d;a.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation();a.Rc=c;a.stopPropagation()};a.Rc=d;if(a.clientX!=j){g=document.documentElement;var h=document.body;a.pageX=a.clientX+(g&&g.scrollLeft||h&&h.scrollLeft||0)-(g&&g.clientLeft||h&&h.clientLeft||0);a.pageY=a.clientY+(g&&g.scrollTop||h&&h.scrollTop||0)-(g&&g.clientTop||h&&h.clientTop||0)}a.which=a.charCode||a.keyCode;a.button!=j&&(a.button=a.button&1?0:a.button&
4?1:a.button&2?2:0)}return a};t.o=function(a,c){var d=t.Mc(a)?t.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof c&&(c={type:c,target:a});c=t.Qb(c);d.ca&&d.ca.call(a,c);if(e&&!c.Wb()&&c.bubbles!==l)t.o(e,c);else if(!e&&!c.defaultPrevented&&(d=t.getData(c.target),c.target[c.type])){d.disabled=f;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=l}return!c.defaultPrevented};
t.N=function(a,c,d){function e(){t.n(a,c,e);d.apply(this,arguments)}if(t.i.isArray(c))return v(t.N,a,c,d);e.s=d.s=d.s||t.s++;t.b(a,c,e)};function v(a,c,d,e){t.xc.forEach(d,function(d){a(c,d,e)})}var w=Object.prototype.hasOwnProperty;t.f=function(a,c){var d;c=c||{};d=document.createElement(a||"div");t.i.da(c,function(a,c){-1!==a.indexOf("aria-")||"role"==a?d.setAttribute(a,c):d[a]=c});return d};t.wa=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};t.i={};
t.i.create=Object.create||function(a){function c(){}c.prototype=a;return new c};t.i.da=function(a,c,d){for(var e in a)w.call(a,e)&&c.call(d||this,e,a[e])};t.i.D=function(a,c){if(!c)return a;for(var d in c)w.call(c,d)&&(a[d]=c[d]);return a};t.i.Sd=function(a,c){var d,e,g;a=t.i.copy(a);for(d in c)w.call(c,d)&&(e=a[d],g=c[d],a[d]=t.i.lb(e)&&t.i.lb(g)?t.i.Sd(e,g):c[d]);return a};t.i.copy=function(a){return t.i.D({},a)};
t.i.lb=function(a){return!!a&&"object"===typeof a&&"[object Object]"===a.toString()&&a.constructor===Object};t.i.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};t.le=function(a){return a!==a};t.bind=function(a,c,d){function e(){return c.apply(a,arguments)}c.s||(c.s=t.s++);e.s=d?d+"_"+c.s:c.s;return e};t.va={};t.s=1;t.expando="vdata"+(new Date).getTime();t.getData=function(a){var c=a[t.expando];c||(c=a[t.expando]=t.s++);t.va[c]||(t.va[c]={});return t.va[c]};
t.Mc=function(a){a=a[t.expando];return!(!a||t.kb(t.va[a]))};t.cd=function(a){var c=a[t.expando];if(c){delete t.va[c];try{delete a[t.expando]}catch(d){a.removeAttribute?a.removeAttribute(t.expando):a[t.expando]=j}}};t.kb=function(a){for(var c in a)if(a[c]!==j)return l;return f};t.Qa=function(a,c){return-1!==(" "+a.className+" ").indexOf(" "+c+" ")};t.p=function(a,c){t.Qa(a,c)||(a.className=""===a.className?c:a.className+" "+c)};
t.r=function(a,c){var d,e;if(t.Qa(a,c)){d=a.className.split(" ");for(e=d.length-1;0<=e;e--)d[e]===c&&d.splice(e,1);a.className=d.join(" ")}};t.A=t.f("video");var x=document.createElement("track");x.Xb="captions";x.jd="en";x.label="English";t.A.appendChild(x);t.P=navigator.userAgent;t.Dd=/iPhone/i.test(t.P);t.Cd=/iPad/i.test(t.P);t.Ed=/iPod/i.test(t.P);t.Bd=t.Dd||t.Cd||t.Ed;var aa=t,y;var z=t.P.match(/OS (\d+)_/i);y=z&&z[1]?z[1]:b;aa.lf=y;t.Ad=/Android/i.test(t.P);var ba=t,B;
var C=t.P.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),D,E;C?(D=C[1]&&parseFloat(C[1]),E=C[2]&&parseFloat(C[2]),B=D&&E?parseFloat(C[1]+"."+C[2]):D?D:j):B=j;ba.ic=B;t.Fd=t.Ad&&/webkit/i.test(t.P)&&2.3>t.ic;t.kc=/Firefox/i.test(t.P);t.mf=/Chrome/i.test(t.P);t.qa=/MSIE\s8\.0/.test(t.P);t.Gb=!!("ontouchstart"in window||window.yd&&document instanceof window.yd);t.xd="backgroundSize"in t.A.style;
t.ed=function(a,c){t.i.da(c,function(c,e){e===j||"undefined"===typeof e||e===l?a.removeAttribute(c):a.setAttribute(c,e===f?"":e)})};t.Pa=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0<a.attributes.length){d=a.attributes;for(var h=d.length-1;0<=h;h--){e=d[h].name;g=d[h].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==j?f:l;c[e]=g}}return c};
t.wf=function(a,c){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c):a.currentStyle&&(d=a["client"+c.substr(0,1).toUpperCase()+c.substr(1)]+"px");return d};t.Vb=function(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)};t.eb={};t.m=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};
t.Oa=function(a,c){c=c||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),h=Math.floor(c/60%60),k=Math.floor(c/3600);if(isNaN(a)||Infinity===a)g=e=d="-";g=0<g||0<k?g+":":"";return g+(((g||10<=h)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};t.Md=function(){document.body.focus();document.onselectstart=p(l)};t.bf=function(){document.onselectstart=p(f)};t.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};t.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};
t.ya=function(a,c){return a===b&&c===b?{length:0,start:function(){throw Error("This TimeRanges object is empty");},end:function(){throw Error("This TimeRanges object is empty");}}:{length:1,start:function(){return a},end:function(){return c}}};t.Ne=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?t.log("LocalStorage Full (VideoJS)",d):18==d.code?t.log("LocalStorage not allowed (VideoJS)",d):t.log("LocalStorage Error (VideoJS)",d)}};
t.ae=function(a){a.match(/^https?:\/\//)||(a=t.f("div",{innerHTML:'<a href="'+a+'">x</a>'}).firstChild.href);return a};
t.Fe=function(a){var c,d,e,g;g="protocol hostname port pathname search hash host".split(" ");d=t.f("a",{href:a});if(e=""===d.host&&"file:"!==d.protocol)c=t.f("div"),c.innerHTML='<a href="'+a+'"></a>',d=c.firstChild,c.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(c);a={};for(var h=0;h<g.length;h++)a[g[h]]=d[g[h]];"http:"===a.protocol&&(a.host=a.host.replace(/:80$/,""));"https:"===a.protocol&&(a.host=a.host.replace(/:443$/,""));e&&document.body.removeChild(c);return a};
function F(a,c){var d,e;d=Array.prototype.slice.call(c);e=m();e=window.console||{log:e,warn:e,error:e};a?d.unshift(a.toUpperCase()+":"):a="log";t.log.history.push(d);d.unshift("VIDEOJS:");if(e[a].apply)e[a].apply(e,d);else e[a](d.join(" "))}t.log=function(){F(j,arguments)};t.log.history=[];t.log.error=function(){F("error",arguments)};t.log.warn=function(){F("warn",arguments)};
t.Zd=function(a){var c,d;a.getBoundingClientRect&&a.parentNode&&(c=a.getBoundingClientRect());if(!c)return{left:0,top:0};a=document.documentElement;d=document.body;return{left:t.round(c.left+(window.pageXOffset||d.scrollLeft)-(a.clientLeft||d.clientLeft||0)),top:t.round(c.top+(window.pageYOffset||d.scrollTop)-(a.clientTop||d.clientTop||0))}};t.xc={};t.xc.forEach=function(a,c,d){if(t.i.isArray(a)&&c instanceof Function)for(var e=0,g=a.length;e<g;++e)c.call(d||t,a[e],e,a);return a};
t.gf=function(a,c){var d,e,g,h,k,q,r;"string"===typeof a&&(a={uri:a});videojs.$.Ba({method:"GET",timeout:45E3},a);c=c||m();q=function(){window.clearTimeout(k);c(j,e,e.response||e.responseText)};r=function(a){window.clearTimeout(k);if(!a||"string"===typeof a)a=Error(a);c(a,e)};d=window.XMLHttpRequest;"undefined"===typeof d&&(d=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");
});e=new d;e.uri=a.uri;d=t.Fe(a.uri);g=window.location;d.protocol+d.host!==g.protocol+g.host&&window.XDomainRequest&&!("withCredentials"in e)?(e=new window.XDomainRequest,e.onload=q,e.onerror=r,e.onprogress=m(),e.ontimeout=m()):(h="file:"==d.protocol||"file:"==g.protocol,e.onreadystatechange=function(){if(4===e.readyState){if(e.Ze)return r("timeout");200===e.status||h&&0===e.status?q():r()}},a.timeout&&(k=window.setTimeout(function(){4!==e.readyState&&(e.Ze=f,e.abort())},a.timeout)));try{e.open(a.method||
"GET",a.uri,f)}catch(u){r(u);return}a.withCredentials&&(e.withCredentials=f);a.responseType&&(e.responseType=a.responseType);try{e.send()}catch(A){r(A)}};t.$={};t.$.Ba=function(a,c){var d,e,g;a=t.i.copy(a);for(d in c)c.hasOwnProperty(d)&&(e=a[d],g=c[d],a[d]=t.i.lb(e)&&t.i.lb(g)?t.$.Ba(e,g):c[d]);return a};t.z=m();s=t.z.prototype;s.cb={};s.b=function(a,c){var d=this.addEventListener;this.addEventListener=Function.prototype;t.b(this,a,c);this.addEventListener=d};s.addEventListener=t.z.prototype.b;
s.n=function(a,c){t.n(this,a,c)};s.removeEventListener=t.z.prototype.n;s.N=function(a,c){t.N(this,a,c)};s.o=function(a){var c=a.type||a;"string"===typeof a&&(a={type:c});a=t.Qb(a);if(this.cb[c]&&this["on"+c])this["on"+c](a);t.o(this,a)};s.dispatchEvent=t.z.prototype.o;
t.a=t.Ha.extend({l:function(a,c,d){this.d=a;this.q=t.i.copy(this.q);c=this.options(c);this.Ra=c.id||c.el&&c.el.id;this.Ra||(this.Ra=(a.id&&a.id()||"no_player")+"_component_"+t.s++);this.ue=c.name||j;this.c=c.el||this.f();this.R=[];this.gb={};this.hb={};this.Oc();this.I(d);if(c.dd!==l){var e,g;this.k().reportUserActivity&&(e=t.bind(this.k(),this.k().reportUserActivity),this.b("touchstart",function(){e();this.clearInterval(g);g=this.setInterval(e,250)}),a=function(){e();this.clearInterval(g)},this.b("touchmove",
e),this.b("touchend",a),this.b("touchcancel",a))}}});s=t.a.prototype;s.dispose=function(){this.o({type:"dispose",bubbles:l});if(this.R)for(var a=this.R.length-1;0<=a;a--)this.R[a].dispose&&this.R[a].dispose();this.hb=this.gb=this.R=j;this.n();this.c.parentNode&&this.c.parentNode.removeChild(this.c);t.cd(this.c);this.c=j};s.d=f;s.k=n("d");s.options=function(a){return a===b?this.q:this.q=t.$.Ba(this.q,a)};s.f=function(a,c){return t.f(a,c)};
s.v=function(a){var c=this.d.language(),d=this.d.languages();return d&&d[c]&&d[c][a]?d[c][a]:a};s.m=n("c");s.xa=function(){return this.B||this.c};s.id=n("Ra");s.name=n("ue");s.children=n("R");s.be=function(a){return this.gb[a]};s.ea=function(a){return this.hb[a]};
s.ba=function(a,c){var d,e;"string"===typeof a?(e=a,c=c||{},d=c.componentClass||t.wa(e),c.name=e,d=new window.videojs[d](this.d||this,c)):d=a;this.R.push(d);"function"===typeof d.id&&(this.gb[d.id()]=d);(e=e||d.name&&d.name())&&(this.hb[e]=d);"function"===typeof d.el&&d.el()&&this.xa().appendChild(d.el());return d};
s.removeChild=function(a){"string"===typeof a&&(a=this.ea(a));if(a&&this.R){for(var c=l,d=this.R.length-1;0<=d;d--)if(this.R[d]===a){c=f;this.R.splice(d,1);break}c&&(this.gb[a.id()]=j,this.hb[a.name()]=j,(c=a.m())&&c.parentNode===this.xa()&&this.xa().removeChild(a.m()))}};
s.Oc=function(){var a,c,d,e,g,h;a=this;c=a.options();if(d=c.children)if(h=function(d,e){c[d]!==b&&(e=c[d]);e!==l&&(a[d]=a.ba(d,e))},t.i.isArray(d))for(var k=0;k<d.length;k++)e=d[k],"string"==typeof e?(g=e,e={}):g=e.name,h(g,e);else t.i.da(d,h)};s.V=p("");
s.b=function(a,c,d){var e,g,h;"string"===typeof a||t.i.isArray(a)?t.b(this.c,a,t.bind(this,c)):(e=t.bind(this,d),h=this,g=function(){h.n(a,c,e)},g.s=e.s,this.b("dispose",g),d=function(){h.n("dispose",g)},d.s=e.s,a.nodeName?(t.b(a,c,e),t.b(a,"dispose",d)):"function"===typeof a.b&&(a.b(c,e),a.b("dispose",d)));return this};
s.n=function(a,c,d){!a||"string"===typeof a||t.i.isArray(a)?t.n(this.c,a,c):(d=t.bind(this,d),this.n("dispose",d),a.nodeName?(t.n(a,c,d),t.n(a,"dispose",d)):(a.n(c,d),a.n("dispose",d)));return this};s.N=function(a,c,d){var e,g,h;"string"===typeof a||t.i.isArray(a)?t.N(this.c,a,t.bind(this,c)):(e=t.bind(this,d),g=this,h=function(){g.n(a,c,h);e.apply(this,arguments)},h.s=e.s,this.b(a,c,h));return this};s.o=function(a){t.o(this.c,a);return this};
s.I=function(a){a&&(this.za?a.call(this):(this.pb===b&&(this.pb=[]),this.pb.push(a)));return this};s.Xa=function(){this.za=f;var a=this.pb;if(a&&0<a.length){for(var c=0,d=a.length;c<d;c++)a[c].call(this);this.pb=[];this.o("ready")}};s.Qa=function(a){return t.Qa(this.c,a)};s.p=function(a){t.p(this.c,a);return this};s.r=function(a){t.r(this.c,a);return this};s.show=function(){this.r("vjs-hidden");return this};s.Y=function(){this.p("vjs-hidden");return this};function G(a){a.r("vjs-lock-showing")}
s.width=function(a,c){return ca(this,"width",a,c)};s.height=function(a,c){return ca(this,"height",a,c)};s.Ud=function(a,c){return this.width(a,f).height(c)};function ca(a,c,d,e){if(d!==b){if(d===j||t.le(d))d=0;a.c.style[c]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:"auto"===d?"":d+"px";e||a.o("resize");return a}if(!a.c)return 0;d=a.c.style[c];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.c["offset"+t.wa(c)],10)}
function da(a){var c,d,e,g,h,k,q,r;c=0;d=j;a.b("touchstart",function(a){1===a.touches.length&&(d=t.i.copy(a.touches[0]),c=(new Date).getTime(),g=f)});a.b("touchmove",function(a){1<a.touches.length?g=l:d&&(k=a.touches[0].pageX-d.pageX,q=a.touches[0].pageY-d.pageY,r=Math.sqrt(k*k+q*q),10<r&&(g=l))});h=function(){g=l};a.b("touchleave",h);a.b("touchcancel",h);a.b("touchend",function(a){d=j;g===f&&(e=(new Date).getTime()-c,200>e&&(a.preventDefault(),this.o("tap")))})}
s.setTimeout=function(a,c){function d(){this.clearTimeout(e)}a=t.bind(this,a);var e=setTimeout(a,c);d.s="vjs-timeout-"+e;this.b("dispose",d);return e};s.clearTimeout=function(a){function c(){}clearTimeout(a);c.s="vjs-timeout-"+a;this.n("dispose",c);return a};s.setInterval=function(a,c){function d(){this.clearInterval(e)}a=t.bind(this,a);var e=setInterval(a,c);d.s="vjs-interval-"+e;this.b("dispose",d);return e};
s.clearInterval=function(a){function c(){}clearInterval(a);c.s="vjs-interval-"+a;this.n("dispose",c);return a};t.w=t.a.extend({l:function(a,c){t.a.call(this,a,c);da(this);this.b("tap",this.u);this.b("click",this.u);this.b("focus",this.nb);this.b("blur",this.mb)}});s=t.w.prototype;
s.f=function(a,c){var d;c=t.i.D({className:this.V(),role:"button","aria-live":"polite",tabIndex:0},c);d=t.a.prototype.f.call(this,a,c);c.innerHTML||(this.B=t.f("div",{className:"vjs-control-content"}),this.Lb=t.f("span",{className:"vjs-control-text",innerHTML:this.v(this.ua)||"Need Text"}),this.B.appendChild(this.Lb),d.appendChild(this.B));return d};s.V=function(){return"vjs-control "+t.a.prototype.V.call(this)};s.u=m();s.nb=function(){t.b(document,"keydown",t.bind(this,this.la))};
s.la=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.u()};s.mb=function(){t.n(document,"keydown",t.bind(this,this.la))};t.U=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.Ld=this.ea(this.q.barName);this.handle=this.ea(this.q.handleName);this.b("mousedown",this.ob);this.b("touchstart",this.ob);this.b("focus",this.nb);this.b("blur",this.mb);this.b("click",this.u);this.b(a,"controlsvisible",this.update);this.b(a,this.Yc,this.update)}});s=t.U.prototype;
s.f=function(a,c){c=c||{};c.className+=" vjs-slider";c=t.i.D({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return t.a.prototype.f.call(this,a,c)};s.ob=function(a){a.preventDefault();t.Md();this.p("vjs-sliding");this.b(document,"mousemove",this.ma);this.b(document,"mouseup",this.Ca);this.b(document,"touchmove",this.ma);this.b(document,"touchend",this.Ca);this.ma(a)};s.ma=m();
s.Ca=function(){t.bf();this.r("vjs-sliding");this.n(document,"mousemove",this.ma);this.n(document,"mouseup",this.Ca);this.n(document,"touchmove",this.ma);this.n(document,"touchend",this.Ca);this.update()};s.update=function(){if(this.c){var a,c=this.Tb(),d=this.handle,e=this.Ld;if("number"!==typeof c||c!==c||0>c||Infinity===c)c=0;a=c;if(d){a=this.c.offsetWidth;var g=d.m().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.m().style.left=t.round(100*c,2)+"%"}e&&(e.m().style.width=t.round(100*a,2)+"%")}};
function ea(a,c){var d,e,g,h;d=a.c;e=t.Zd(d);h=g=d.offsetWidth;d=a.handle;if(a.options().vertical)return h=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.m().offsetHeight,h+=d/2,g-=d),Math.max(0,Math.min(1,(h-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.m().offsetWidth,g+=d/2,h-=d);return Math.max(0,Math.min(1,(e-g)/h))}s.nb=function(){this.b(document,"keydown",this.la)};
s.la=function(a){if(37==a.which||40==a.which)a.preventDefault(),this.kd();else if(38==a.which||39==a.which)a.preventDefault(),this.ld()};s.mb=function(){this.n(document,"keydown",this.la)};s.u=function(a){a.stopImmediatePropagation();a.preventDefault()};t.ha=t.a.extend();t.ha.prototype.defaultValue=0;t.ha.prototype.f=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=t.i.D({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},c);return t.a.prototype.f.call(this,"div",c)};
t.ra=t.a.extend();function fa(a,c){a.ba(c);c.b("click",t.bind(a,function(){G(this)}))}t.ra.prototype.f=function(){var a=this.options().Dc||"ul";this.B=t.f(a,{className:"vjs-menu-content"});a=t.a.prototype.f.call(this,"div",{append:this.B,className:"vjs-menu"});a.appendChild(this.B);t.b(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};t.M=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.selected(c.selected)}});
t.M.prototype.f=function(a,c){return t.w.prototype.f.call(this,"li",t.i.D({className:"vjs-menu-item",innerHTML:this.v(this.q.label)},c))};t.M.prototype.u=function(){this.selected(f)};t.M.prototype.selected=function(a){a?(this.p("vjs-selected"),this.c.setAttribute("aria-selected",f)):(this.r("vjs-selected"),this.c.setAttribute("aria-selected",l))};
t.O=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.update();this.b("keydown",this.la);this.c.setAttribute("aria-haspopup",f);this.c.setAttribute("role","button")}});s=t.O.prototype;s.update=function(){var a=this.Ma();this.Aa&&this.removeChild(this.Aa);this.Aa=a;this.ba(a);this.H&&0===this.H.length?this.Y():this.H&&1<this.H.length&&this.show()};s.Ka=l;
s.Ma=function(){var a=new t.ra(this.d);this.options().title&&a.xa().appendChild(t.f("li",{className:"vjs-menu-title",innerHTML:t.wa(this.options().title),Xe:-1}));if(this.H=this.createItems())for(var c=0;c<this.H.length;c++)fa(a,this.H[c]);return a};s.La=m();s.V=function(){return this.className+" vjs-menu-button "+t.w.prototype.V.call(this)};s.nb=m();s.mb=m();s.u=function(){this.N("mouseout",t.bind(this,function(){G(this.Aa);this.c.blur()}));this.Ka?H(this):ga(this)};
s.la=function(a){32==a.which||13==a.which?(this.Ka?H(this):ga(this),a.preventDefault()):27==a.which&&(this.Ka&&H(this),a.preventDefault())};function ga(a){a.Ka=f;a.Aa.p("vjs-lock-showing");a.c.setAttribute("aria-pressed",f);a.H&&0<a.H.length&&a.H[0].m().focus()}function H(a){a.Ka=l;G(a.Aa);a.c.setAttribute("aria-pressed",l)}t.J=function(a){"number"===typeof a?this.code=a:"string"===typeof a?this.message=a:"object"===typeof a&&t.i.D(this,a);this.message||(this.message=t.J.Td[this.code]||"")};
t.J.prototype.code=0;t.J.prototype.message="";t.J.prototype.status=j;t.J.jb="MEDIA_ERR_CUSTOM MEDIA_ERR_ABORTED MEDIA_ERR_NETWORK MEDIA_ERR_DECODE MEDIA_ERR_SRC_NOT_SUPPORTED MEDIA_ERR_ENCRYPTED".split(" ");
t.J.Td={1:"You aborted the video playback",2:"A network error caused the video download to fail part-way.",3:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",4:"The video could not be loaded, either because the server or network failed or because the format is not supported.",5:"The video is encrypted and we do not have the keys to decrypt it."};for(var I=0;I<t.J.jb.length;I++)t.J[t.J.jb[I]]=I,t.J.prototype[t.J.jb[I]]=I;
var J,ha,K,L;
J=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "),"webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "),"mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "),"msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ")];
ha=J[0];for(L=0;L<J.length;L++)if(J[L][1]in document){K=J[L];break}if(K){t.eb.Sb={};for(L=0;L<K.length;L++)t.eb.Sb[ha[L]]=K[L]}
t.Player=t.a.extend({l:function(a,c,d){this.L=a;a.id=a.id||"vjs_video_"+t.s++;this.Ye=a&&t.Pa(a);c=t.i.D(ia(a),c);this.Tc=c.language||t.options.language;this.oe=c.languages||t.options.languages;this.K={};this.Zc=c.poster||"";this.Mb=!!c.controls;a.controls=l;c.dd=l;ja(this,"audio"===this.L.nodeName.toLowerCase());t.a.call(this,this,c,d);this.controls()?this.p("vjs-controls-enabled"):this.p("vjs-controls-disabled");ja(this)&&this.p("vjs-audio");t.Da[this.Ra]=this;c.plugins&&t.i.da(c.plugins,function(a,
c){this[a](c)},this);var e,g,h,k,q;e=t.bind(this,this.reportUserActivity);this.b("mousedown",function(){e();this.clearInterval(g);g=this.setInterval(e,250)});this.b("mousemove",function(a){if(a.screenX!=k||a.screenY!=q)k=a.screenX,q=a.screenY,e()});this.b("mouseup",function(){e();this.clearInterval(g)});this.b("keydown",e);this.b("keyup",e);this.setInterval(function(){if(this.Ga){this.Ga=l;this.userActive(f);this.clearTimeout(h);var a=this.options().inactivityTimeout;0<a&&(h=this.setTimeout(function(){this.Ga||
this.userActive(l)},a))}},250)}});s=t.Player.prototype;s.language=function(a){if(a===b)return this.Tc;this.Tc=a;return this};s.languages=n("oe");s.q=t.options;s.dispose=function(){this.o("dispose");this.n("dispose");t.Da[this.Ra]=j;this.L&&this.L.player&&(this.L.player=j);this.c&&this.c.player&&(this.c.player=j);this.h&&this.h.dispose();t.a.prototype.dispose.call(this)};
function ia(a){var c,d,e={sources:[],tracks:[]};c=t.Pa(a);d=c["data-setup"];d!==j&&t.i.D(c,t.JSON.parse(d||"{}"));t.i.D(e,c);if(a.hasChildNodes()){var g,h;a=a.childNodes;g=0;for(h=a.length;g<h;g++)c=a[g],d=c.nodeName.toLowerCase(),"source"===d?e.sources.push(t.Pa(c)):"track"===d&&e.tracks.push(t.Pa(c))}return e}
s.f=function(){var a=this.c=t.a.prototype.f.call(this,"div"),c=this.L,d;c.removeAttribute("width");c.removeAttribute("height");d=t.Pa(c);t.i.da(d,function(c){"class"==c?a.className=d[c]:a.setAttribute(c,d[c])});c.id+="_html5_api";c.className="vjs-tech";c.player=a.player=this;this.p("vjs-paused");this.width(this.q.width,f);this.height(this.q.height,f);c.he=c.networkState;c.parentNode&&c.parentNode.insertBefore(a,c);t.Vb(c,a);this.c=a;this.b("loadstart",this.ye);this.b("waiting",this.Ee);this.b(["canplay",
"canplaythrough","playing","ended"],this.De);this.b("seeking",this.Be);this.b("seeked",this.Ae);this.b("ended",this.ve);this.b("play",this.ac);this.b("firstplay",this.we);this.b("pause",this.$b);this.b("progress",this.ze);this.b("durationchange",this.Wc);this.b("fullscreenchange",this.xe);return a};
function ka(a,c,d){a.h&&(a.za=l,a.h.dispose(),a.h=l);"Html5"!==c&&a.L&&(t.e.Nb(a.L),a.L=j);a.Va=c;a.za=l;var e=t.i.D({source:d,parentEl:a.c},a.q[c.toLowerCase()]);d&&(a.Gc=d.type,d.src==a.K.src&&0<a.K.currentTime&&(e.startTime=a.K.currentTime),a.K.src=d.src);a.h=new window.videojs[c](a,e);a.h.I(function(){this.d.Xa()})}s.ye=function(){this.r("vjs-ended");this.error(j);this.paused()?la(this,l):this.o("firstplay")};s.Nc=l;
function la(a,c){c!==b&&a.Nc!==c&&((a.Nc=c)?(a.p("vjs-has-started"),a.o("firstplay")):a.r("vjs-has-started"))}s.ac=function(){this.r("vjs-ended");this.r("vjs-paused");this.p("vjs-playing");la(this,f)};s.Ee=function(){this.p("vjs-waiting")};s.De=function(){this.r("vjs-waiting")};s.Be=function(){this.p("vjs-seeking")};s.Ae=function(){this.r("vjs-seeking")};s.we=function(){this.q.starttime&&this.currentTime(this.q.starttime);this.p("vjs-has-started")};s.$b=function(){this.r("vjs-playing");this.p("vjs-paused")};
s.ze=function(){1==this.bufferedPercent()&&this.o("loadedalldata")};s.ve=function(){this.p("vjs-ended");this.q.loop?(this.currentTime(0),this.play()):this.paused()||this.pause()};s.Wc=function(){var a=M(this,"duration");a&&(0>a&&(a=Infinity),this.duration(a),Infinity===a?this.p("vjs-live"):this.r("vjs-live"))};s.xe=function(){this.isFullscreen()?this.p("vjs-fullscreen"):this.r("vjs-fullscreen")};
function N(a,c,d){if(a.h&&!a.h.za)a.h.I(function(){this[c](d)});else try{a.h[c](d)}catch(e){throw t.log(e),e;}}function M(a,c){if(a.h&&a.h.za)try{return a.h[c]()}catch(d){throw a.h[c]===b?t.log("Video.js: "+c+" method not defined for "+a.Va+" playback technology.",d):"TypeError"==d.name?(t.log("Video.js: "+c+" unavailable on "+a.Va+" playback technology element.",d),a.h.za=l):t.log(d),d;}}s.play=function(){N(this,"play");return this};s.pause=function(){N(this,"pause");return this};
s.paused=function(){return M(this,"paused")===l?l:f};s.currentTime=function(a){return a!==b?(N(this,"setCurrentTime",a),this):this.K.currentTime=M(this,"currentTime")||0};s.duration=function(a){if(a!==b)return this.K.duration=parseFloat(a),this;this.K.duration===b&&this.Wc();return this.K.duration||0};s.remainingTime=function(){return this.duration()-this.currentTime()};s.buffered=function(){var a=M(this,"buffered");if(!a||!a.length)a=t.ya(0,0);return a};
s.bufferedPercent=function(){var a=this.duration(),c=this.buffered(),d=0,e,g;if(!a)return 0;for(var h=0;h<c.length;h++)e=c.start(h),g=c.end(h),g>a&&(g=a),d+=g-e;return d/a};s.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.K.volume=a,N(this,"setVolume",a),t.Ne(a),this;a=parseFloat(M(this,"volume"));return isNaN(a)?1:a};s.muted=function(a){return a!==b?(N(this,"setMuted",a),this):M(this,"muted")||l};s.Ua=function(){return M(this,"supportsFullScreen")||l};s.Qc=l;
s.isFullscreen=function(a){return a!==b?(this.Qc=!!a,this):this.Qc};s.isFullScreen=function(a){t.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)};
s.requestFullscreen=function(){var a=t.eb.Sb;this.isFullscreen(f);a?(t.b(document,a.fullscreenchange,t.bind(this,function(c){this.isFullscreen(document[a.fullscreenElement]);this.isFullscreen()===l&&t.n(document,a.fullscreenchange,arguments.callee);this.o("fullscreenchange")})),this.c[a.requestFullscreen]()):this.h.Ua()?N(this,"enterFullScreen"):(this.Jc(),this.o("fullscreenchange"));return this};
s.requestFullScreen=function(){t.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")');return this.requestFullscreen()};s.exitFullscreen=function(){var a=t.eb.Sb;this.isFullscreen(l);if(a)document[a.exitFullscreen]();else this.h.Ua()?N(this,"exitFullScreen"):(this.Ob(),this.o("fullscreenchange"));return this};s.cancelFullScreen=function(){t.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()");return this.exitFullscreen()};
s.Jc=function(){this.ke=f;this.Vd=document.documentElement.style.overflow;t.b(document,"keydown",t.bind(this,this.Kc));document.documentElement.style.overflow="hidden";t.p(document.body,"vjs-full-window");this.o("enterFullWindow")};s.Kc=function(a){27===a.keyCode&&(this.isFullscreen()===f?this.exitFullscreen():this.Ob())};s.Ob=function(){this.ke=l;t.n(document,"keydown",this.Kc);document.documentElement.style.overflow=this.Vd;t.r(document.body,"vjs-full-window");this.o("exitFullWindow")};
s.selectSource=function(a){for(var c=0,d=this.q.techOrder;c<d.length;c++){var e=t.wa(d[c]),g=window.videojs[e];if(g){if(g.isSupported())for(var h=0,k=a;h<k.length;h++){var q=k[h];if(g.canPlaySource(q))return{source:q,h:e}}}else t.log.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.')}return l};
s.src=function(a){if(a===b)return M(this,"src");t.i.isArray(a)?ma(this,a):"string"===typeof a?this.src({src:a}):a instanceof Object&&(a.type&&!window.videojs[this.Va].canPlaySource(a)?ma(this,[a]):(this.K.src=a.src,this.Gc=a.type||"",this.I(function(){window.videojs[this.Va].prototype.hasOwnProperty("setSource")?N(this,"setSource",a):N(this,"src",a.src);"auto"==this.q.preload&&this.load();this.q.autoplay&&this.play()})));return this};
function ma(a,c){var d=a.selectSource(c);d?d.h===a.Va?a.src(d.source):ka(a,d.h,d.source):(a.setTimeout(function(){this.error({code:4,message:this.v(this.options().notSupportedMessage)})},0),a.Xa())}s.load=function(){N(this,"load");return this};s.currentSrc=function(){return M(this,"currentSrc")||this.K.src||""};s.Rd=function(){return this.Gc||""};s.Sa=function(a){return a!==b?(N(this,"setPreload",a),this.q.preload=a,this):M(this,"preload")};
s.autoplay=function(a){return a!==b?(N(this,"setAutoplay",a),this.q.autoplay=a,this):M(this,"autoplay")};s.loop=function(a){return a!==b?(N(this,"setLoop",a),this.q.loop=a,this):M(this,"loop")};s.poster=function(a){if(a===b)return this.Zc;a||(a="");this.Zc=a;N(this,"setPoster",a);this.o("posterchange");return this};
s.controls=function(a){return a!==b?(a=!!a,this.Mb!==a&&((this.Mb=a)?(this.r("vjs-controls-disabled"),this.p("vjs-controls-enabled"),this.o("controlsenabled")):(this.r("vjs-controls-enabled"),this.p("vjs-controls-disabled"),this.o("controlsdisabled"))),this):this.Mb};t.Player.prototype.fc;s=t.Player.prototype;
s.usingNativeControls=function(a){return a!==b?(a=!!a,this.fc!==a&&((this.fc=a)?(this.p("vjs-using-native-controls"),this.o("usingnativecontrols")):(this.r("vjs-using-native-controls"),this.o("usingcustomcontrols"))),this):this.fc};s.ka=j;s.error=function(a){if(a===b)return this.ka;if(a===j)return this.ka=a,this.r("vjs-error"),this;this.ka=a instanceof t.J?a:new t.J(a);this.o("error");this.p("vjs-error");t.log.error("(CODE:"+this.ka.code+" "+t.J.jb[this.ka.code]+")",this.ka.message,this.ka);return this};
s.ended=function(){return M(this,"ended")};s.seeking=function(){return M(this,"seeking")};s.seekable=function(){return M(this,"seekable")};s.Ga=f;s.reportUserActivity=function(){this.Ga=f};s.ec=f;
s.userActive=function(a){return a!==b?(a=!!a,a!==this.ec&&((this.ec=a)?(this.Ga=f,this.r("vjs-user-inactive"),this.p("vjs-user-active"),this.o("useractive")):(this.Ga=l,this.h&&this.h.N("mousemove",function(a){a.stopPropagation();a.preventDefault()}),this.r("vjs-user-active"),this.p("vjs-user-inactive"),this.o("userinactive"))),this):this.ec};s.playbackRate=function(a){return a!==b?(N(this,"setPlaybackRate",a),this):this.h&&this.h.featuresPlaybackRate?M(this,"playbackRate"):1};s.Pc=l;
function ja(a,c){return c!==b?(a.Pc=!!c,a):a.Pc}s.networkState=function(){return M(this,"networkState")};s.readyState=function(){return M(this,"readyState")};s.textTracks=function(){return this.h&&this.h.textTracks()};s.Z=function(){return this.h&&this.h.remoteTextTracks()};s.addTextTrack=function(a,c,d){return this.h&&this.h.addTextTrack(a,c,d)};s.ia=function(a){return this.h&&this.h.addRemoteTextTrack(a)};s.Ea=function(a){this.h&&this.h.removeRemoteTextTrack(a)};t.wb=t.a.extend();
t.wb.prototype.q={xf:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},liveDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{},playbackRateMenuButton:{},subtitlesButton:{},captionsButton:{},chaptersButton:{}}};t.wb.prototype.f=function(){return t.f("div",{className:"vjs-control-bar"})};t.lc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});
t.lc.prototype.f=function(){var a=t.a.prototype.f.call(this,"div",{className:"vjs-live-controls vjs-control"});this.B=t.f("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.v("Stream Type")+"</span>"+this.v("LIVE"),"aria-live":"off"});a.appendChild(this.B);return a};t.oc=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.b(a,"play",this.ac);this.b(a,"pause",this.$b)}});s=t.oc.prototype;s.ua="Play";s.V=function(){return"vjs-play-control "+t.w.prototype.V.call(this)};
s.u=function(){this.d.paused()?this.d.play():this.d.pause()};s.ac=function(){this.r("vjs-paused");this.p("vjs-playing");this.c.children[0].children[0].innerHTML=this.v("Pause")};s.$b=function(){this.r("vjs-playing");this.p("vjs-paused");this.c.children[0].children[0].innerHTML=this.v("Play")};t.xb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.b(a,"timeupdate",this.ga)}});
t.xb.prototype.f=function(){var a=t.a.prototype.f.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.B=t.f("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00',"aria-live":"off"});a.appendChild(this.B);return a};t.xb.prototype.ga=function(){var a=this.d.qb?this.d.K.currentTime:this.d.currentTime();this.B.innerHTML='<span class="vjs-control-text">'+this.v("Current Time")+"</span> "+t.Oa(a,this.d.duration())};
t.yb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.b(a,"timeupdate",this.ga);this.b(a,"loadedmetadata",this.ga)}});t.yb.prototype.f=function(){var a=t.a.prototype.f.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.B=t.f("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.v("Duration Time")+"</span> 0:00","aria-live":"off"});a.appendChild(this.B);return a};
t.yb.prototype.ga=function(){var a=this.d.duration();a&&(this.B.innerHTML='<span class="vjs-control-text">'+this.v("Duration Time")+"</span> "+t.Oa(a))};t.uc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});t.uc.prototype.f=function(){return t.a.prototype.f.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/</span></div>"})};t.Fb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.b(a,"timeupdate",this.ga)}});
t.Fb.prototype.f=function(){var a=t.a.prototype.f.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.B=t.f("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.v("Remaining Time")+"</span> -0:00","aria-live":"off"});a.appendChild(this.B);return a};t.Fb.prototype.ga=function(){this.d.duration()&&(this.B.innerHTML='<span class="vjs-control-text">'+this.v("Remaining Time")+"</span> -"+t.Oa(this.d.remainingTime()))};
t.$a=t.w.extend({l:function(a,c){t.w.call(this,a,c)}});t.$a.prototype.ua="Fullscreen";t.$a.prototype.V=function(){return"vjs-fullscreen-control "+t.w.prototype.V.call(this)};t.$a.prototype.u=function(){this.d.isFullscreen()?(this.d.exitFullscreen(),this.Lb.innerHTML=this.v("Fullscreen")):(this.d.requestFullscreen(),this.Lb.innerHTML=this.v("Non-Fullscreen"))};t.Eb=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});t.Eb.prototype.q={children:{seekBar:{}}};
t.Eb.prototype.f=function(){return t.a.prototype.f.call(this,"div",{className:"vjs-progress-control vjs-control"})};t.rc=t.U.extend({l:function(a,c){t.U.call(this,a,c);this.b(a,"timeupdate",this.Fa);a.I(t.bind(this,this.Fa))}});s=t.rc.prototype;s.q={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};s.Yc="timeupdate";s.f=function(){return t.U.prototype.f.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};
s.Fa=function(){var a=this.d.qb?this.d.K.currentTime:this.d.currentTime();this.c.setAttribute("aria-valuenow",t.round(100*this.Tb(),2));this.c.setAttribute("aria-valuetext",t.Oa(a,this.d.duration()))};s.Tb=function(){return this.d.currentTime()/this.d.duration()};s.ob=function(a){t.U.prototype.ob.call(this,a);this.d.qb=f;this.d.p("vjs-scrubbing");this.ef=!this.d.paused();this.d.pause()};s.ma=function(a){a=ea(this,a)*this.d.duration();a==this.d.duration()&&(a-=0.1);this.d.currentTime(a)};
s.Ca=function(a){t.U.prototype.Ca.call(this,a);this.d.qb=l;this.d.r("vjs-scrubbing");this.ef&&this.d.play()};s.ld=function(){this.d.currentTime(this.d.currentTime()+5)};s.kd=function(){this.d.currentTime(this.d.currentTime()-5)};t.Bb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.b(a,"progress",this.update)}});t.Bb.prototype.f=function(){return t.a.prototype.f.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.v("Loaded")+"</span>: 0%</span>"})};
t.Bb.prototype.update=function(){var a,c,d,e,g=this.d.buffered();a=this.d.duration();var h,k=this.d;h=k.buffered();k=k.duration();h=h.end(h.length-1);h>k&&(h=k);k=this.c.children;this.c.style.width=100*(h/a||0)+"%";for(a=0;a<g.length;a++)c=g.start(a),d=g.end(a),(e=k[a])||(e=this.c.appendChild(t.f())),e.style.left=100*(c/h||0)+"%",e.style.width=100*((d-c)/h||0)+"%";for(a=k.length;a>g.length;a--)this.c.removeChild(k[a-1])};t.nc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});
t.nc.prototype.f=function(){return t.a.prototype.f.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.v("Progress")+"</span>: 0%</span>"})};t.ab=t.ha.extend({l:function(a,c){t.ha.call(this,a,c);this.b(a,"timeupdate",this.ga)}});t.ab.prototype.defaultValue="00:00";t.ab.prototype.f=function(){return t.ha.prototype.f.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})};
t.ab.prototype.ga=function(){var a=this.d.qb?this.d.K.currentTime:this.d.currentTime();this.c.innerHTML='<span class="vjs-control-text">'+t.Oa(a,this.d.duration())+"</span>"};t.Ib=t.a.extend({l:function(a,c){t.a.call(this,a,c);a.h&&a.h.featuresVolumeControl===l&&this.p("vjs-hidden");this.b(a,"loadstart",function(){a.h.featuresVolumeControl===l?this.p("vjs-hidden"):this.r("vjs-hidden")})}});t.Ib.prototype.q={children:{volumeBar:{}}};
t.Ib.prototype.f=function(){return t.a.prototype.f.call(this,"div",{className:"vjs-volume-control vjs-control"})};t.Hb=t.U.extend({l:function(a,c){t.U.call(this,a,c);this.b(a,"volumechange",this.Fa);a.I(t.bind(this,this.Fa))}});s=t.Hb.prototype;s.Fa=function(){this.c.setAttribute("aria-valuenow",t.round(100*this.d.volume(),2));this.c.setAttribute("aria-valuetext",t.round(100*this.d.volume(),2)+"%")};s.q={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};
s.Yc="volumechange";s.f=function(){return t.U.prototype.f.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};s.ma=function(a){this.d.muted()&&this.d.muted(l);this.d.volume(ea(this,a))};s.Tb=function(){return this.d.muted()?0:this.d.volume()};s.ld=function(){this.d.volume(this.d.volume()+0.1)};s.kd=function(){this.d.volume(this.d.volume()-0.1)};t.vc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});
t.vc.prototype.f=function(){return t.a.prototype.f.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};t.Jb=t.ha.extend();t.Jb.prototype.defaultValue="00:00";t.Jb.prototype.f=function(){return t.ha.prototype.f.call(this,"div",{className:"vjs-volume-handle"})};
t.sa=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.b(a,"volumechange",this.update);a.h&&a.h.featuresVolumeControl===l&&this.p("vjs-hidden");this.b(a,"loadstart",function(){a.h.featuresVolumeControl===l?this.p("vjs-hidden"):this.r("vjs-hidden")})}});t.sa.prototype.f=function(){return t.w.prototype.f.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.v("Mute")+"</span></div>"})};
t.sa.prototype.u=function(){this.d.muted(this.d.muted()?l:f)};t.sa.prototype.update=function(){var a=this.d.volume(),c=3;0===a||this.d.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.d.muted()?this.c.children[0].children[0].innerHTML!=this.v("Unmute")&&(this.c.children[0].children[0].innerHTML=this.v("Unmute")):this.c.children[0].children[0].innerHTML!=this.v("Mute")&&(this.c.children[0].children[0].innerHTML=this.v("Mute"));for(a=0;4>a;a++)t.r(this.c,"vjs-vol-"+a);t.p(this.c,"vjs-vol-"+c)};
t.Ia=t.O.extend({l:function(a,c){t.O.call(this,a,c);this.b(a,"volumechange",this.ff);a.h&&a.h.featuresVolumeControl===l&&this.p("vjs-hidden");this.b(a,"loadstart",function(){a.h.featuresVolumeControl===l?this.p("vjs-hidden"):this.r("vjs-hidden")});this.p("vjs-menu-button")}});t.Ia.prototype.Ma=function(){var a=new t.ra(this.d,{Dc:"div"}),c=new t.Hb(this.d,this.q.volumeBar);c.b("focus",function(){a.p("vjs-lock-showing")});c.b("blur",function(){G(a)});a.ba(c);return a};
t.Ia.prototype.u=function(){t.sa.prototype.u.call(this);t.O.prototype.u.call(this)};t.Ia.prototype.f=function(){return t.w.prototype.f.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.v("Mute")+"</span></div>"})};t.Ia.prototype.ff=t.sa.prototype.update;t.pc=t.O.extend({l:function(a,c){t.O.call(this,a,c);this.td();this.sd();this.b(a,"loadstart",this.td);this.b(a,"ratechange",this.sd)}});s=t.pc.prototype;s.ua="Playback Rate";
s.className="vjs-playback-rate";s.f=function(){var a=t.O.prototype.f.call(this);this.Sc=t.f("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.Sc);return a};s.Ma=function(){var a=new t.ra(this.k()),c=this.k().options().playbackRates;if(c)for(var d=c.length-1;0<=d;d--)a.ba(new t.Db(this.k(),{rate:c[d]+"x"}));return a};s.Fa=function(){this.m().setAttribute("aria-valuenow",this.k().playbackRate())};
s.u=function(){for(var a=this.k().playbackRate(),c=this.k().options().playbackRates,d=c[0],e=0;e<c.length;e++)if(c[e]>a){d=c[e];break}this.k().playbackRate(d)};function na(a){return a.k().h&&a.k().h.featuresPlaybackRate&&a.k().options().playbackRates&&0<a.k().options().playbackRates.length}s.td=function(){na(this)?this.r("vjs-hidden"):this.p("vjs-hidden")};s.sd=function(){na(this)&&(this.Sc.innerHTML=this.k().playbackRate()+"x")};
t.Db=t.M.extend({Dc:"button",l:function(a,c){var d=this.label=c.rate,e=this.$c=parseFloat(d,10);c.label=d;c.selected=1===e;t.M.call(this,a,c);this.b(a,"ratechange",this.update)}});t.Db.prototype.u=function(){t.M.prototype.u.call(this);this.k().playbackRate(this.$c)};t.Db.prototype.update=function(){this.selected(this.k().playbackRate()==this.$c)};t.qc=t.w.extend({l:function(a,c){t.w.call(this,a,c);this.update();a.b("posterchange",t.bind(this,this.update))}});s=t.qc.prototype;
s.dispose=function(){this.k().n("posterchange",this.update);t.w.prototype.dispose.call(this)};s.f=function(){var a=t.f("div",{className:"vjs-poster",tabIndex:-1});t.xd||(this.Pb=t.f("img"),a.appendChild(this.Pb));return a};s.update=function(){var a=this.k().poster();this.oa(a);a?this.show():this.Y()};s.oa=function(a){var c;this.Pb?this.Pb.src=a:(c="",a&&(c='url("'+a+'")'),this.c.style.backgroundImage=c)};s.u=function(){this.d.play()};t.mc=t.a.extend({l:function(a,c){t.a.call(this,a,c)}});
t.mc.prototype.f=function(){return t.a.prototype.f.call(this,"div",{className:"vjs-loading-spinner"})};t.ub=t.w.extend();t.ub.prototype.f=function(){return t.w.prototype.f.call(this,"div",{className:"vjs-big-play-button",innerHTML:'<span aria-hidden="true"></span>',"aria-label":"play video"})};t.ub.prototype.u=function(){this.d.play()};t.zb=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.update();this.b(a,"error",this.update)}});
t.zb.prototype.f=function(){var a=t.a.prototype.f.call(this,"div",{className:"vjs-error-display"});this.B=t.f("div");a.appendChild(this.B);return a};t.zb.prototype.update=function(){this.k().error()&&(this.B.innerHTML=this.v(this.k().error().message))};var O;t.j=t.a.extend({l:function(a,c,d){c=c||{};c.dd=l;t.a.call(this,a,c,d);this.featuresProgressEvents||this.se();this.featuresTimeupdateEvents||this.te();this.ge();this.featuresNativeTextTracks||this.Wd();this.ie()}});s=t.j.prototype;
s.ge=function(){var a,c;a=this.k();c=function(){a.controls()&&!a.usingNativeControls()&&this.Jd()};this.I(c);this.b(a,"controlsenabled",c);this.b(a,"controlsdisabled",this.Ie);this.I(function(){this.networkState&&0<this.networkState()&&this.k().o("loadstart")})};
s.Jd=function(){var a;this.b("mousedown",this.u);this.b("touchstart",function(){a=this.d.userActive()});this.b("touchmove",function(){a&&this.k().reportUserActivity()});this.b("touchend",function(a){a.preventDefault()});da(this);this.b("tap",this.Ce)};s.Ie=function(){this.n("tap");this.n("touchstart");this.n("touchmove");this.n("touchleave");this.n("touchcancel");this.n("touchend");this.n("click");this.n("mousedown")};
s.u=function(a){0===a.button&&this.k().controls()&&(this.k().paused()?this.k().play():this.k().pause())};s.Ce=function(){this.k().userActive(!this.k().userActive())};s.se=function(){this.Uc=f;this.af()};s.re=function(){this.Uc=l;this.md()};s.af=function(){this.He=this.setInterval(function(){var a=this.k().bufferedPercent();this.Nd!=a&&this.k().o("progress");this.Nd=a;1===a&&this.md()},500)};s.md=function(){this.clearInterval(this.He)};
s.te=function(){var a=this.d;this.Zb=f;this.b(a,"play",this.qd);this.b(a,"pause",this.tb);this.N("timeupdate",function(){this.featuresTimeupdateEvents=f;this.Vc()})};s.Vc=function(){var a=this.d;this.Zb=l;this.tb();this.n(a,"play",this.qd);this.n(a,"pause",this.tb)};s.qd=function(){this.Fc&&this.tb();this.Fc=this.setInterval(function(){this.k().o("timeupdate")},250)};s.tb=function(){this.clearInterval(this.Fc);this.k().o("timeupdate")};s.dispose=function(){this.Uc&&this.re();this.Zb&&this.Vc();t.a.prototype.dispose.call(this)};
s.cc=function(){this.Zb&&this.k().o("timeupdate")};s.ie=function(){function a(){var a=c.ea("textTrackDisplay");a&&a.C()}var c=this.d,d;if(d=this.textTracks())d.addEventListener("removetrack",a),d.addEventListener("addtrack",a),this.b("dispose",t.bind(this,function(){d.removeEventListener("removetrack",a);d.removeEventListener("addtrack",a)}))};
s.Wd=function(){var a=this.d,c,d,e;window.WebVTT||(e=document.createElement("script"),e.src=a.options()["vtt.js"]||"../node_modules/vtt.js/dist/vtt.js",a.m().appendChild(e),window.WebVTT=f);if(d=this.textTracks())c=function(){var c,d,e;e=a.ea("textTrackDisplay");e.C();for(c=0;c<this.length;c++)d=this[c],d.removeEventListener("cuechange",t.bind(e,e.C)),"showing"===d.mode&&d.addEventListener("cuechange",t.bind(e,e.C))},d.addEventListener("change",c),this.b("dispose",t.bind(this,function(){d.removeEventListener("change",
c)}))};s.textTracks=function(){this.d.pd=this.d.pd||new t.F;return this.d.pd};s.Z=function(){this.d.ad=this.d.ad||new t.F;return this.d.ad};O=function(a,c,d,e,g){var h=a.textTracks();g=g||{};g.kind=c;d&&(g.label=d);e&&(g.language=e);g.player=a.d;a=new t.t(g);P(h,a);return a};t.j.prototype.addTextTrack=function(a,c,d){if(!a)throw Error("TextTrack kind is required but was not provided");return O(this,a,c,d)};t.j.prototype.ia=function(a){a=O(this,a.kind,a.label,a.language,a);P(this.Z(),a);return{T:a}};
t.j.prototype.Ea=function(a){Q(this.textTracks(),a);Q(this.Z(),a)};t.j.prototype.fd=m();t.j.prototype.featuresVolumeControl=f;t.j.prototype.featuresFullscreenResize=l;t.j.prototype.featuresPlaybackRate=l;t.j.prototype.featuresProgressEvents=l;t.j.prototype.featuresTimeupdateEvents=l;t.j.prototype.featuresNativeTextTracks=l;
t.j.hc=function(a){a.Ta=function(c,d){var e=a.gd;e||(e=a.gd=[]);d===b&&(d=e.length);e.splice(d,0,c)};a.rb=function(c){for(var d=a.gd||[],e,g=0;g<d.length;g++)if(e=d[g].fb(c))return d[g];return j};a.Ac=function(c){var d=a.rb(c);return d?d.fb(c):""};a.prototype.na=function(c){var d=a.rb(c);d||(a.S?d=a.S:t.log.error("No source hander found for the current source."));this.ja();this.n("dispose",this.ja);this.ib=c;this.dc=d.Ub(c,this);this.b("dispose",this.ja);return this};a.prototype.ja=function(){this.dc&&
this.dc.dispose&&this.dc.dispose()}};t.media={};
t.e=t.j.extend({l:function(a,c,d){var e,g,h;if(c.nativeCaptions===l||c.nativeTextTracks===l)this.featuresNativeTextTracks=l;t.j.call(this,a,c,d);for(d=t.e.Ab.length-1;0<=d;d--)this.b(t.e.Ab[d],this.Xd);(c=c.source)&&(this.c.currentSrc!==c.src||a.L&&3===a.L.he)&&this.na(c);if(this.c.hasChildNodes()){d=this.c.childNodes;e=d.length;for(c=[];e--;)g=d[e],h=g.nodeName.toLowerCase(),"track"===h&&(this.featuresNativeTextTracks?P(this.Z(),g.track):c.push(g));for(d=0;d<c.length;d++)this.c.removeChild(c[d])}this.featuresNativeTextTracks&&
this.b("loadstart",t.bind(this,this.fe));if(t.Gb&&a.options().nativeControlsForTouch===f){var k,q,r,u;k=this;q=this.k();c=q.controls();k.c.controls=!!c;r=function(){k.c.controls=f};u=function(){k.c.controls=l};q.b("controlsenabled",r);q.b("controlsdisabled",u);c=function(){q.n("controlsenabled",r);q.n("controlsdisabled",u)};k.b("dispose",c);q.b("usingcustomcontrols",c);q.usingNativeControls(f)}a.I(function(){this.src()&&(this.L&&this.q.autoplay&&this.paused())&&(delete this.L.poster,this.play())});
this.Xa()}});s=t.e.prototype;s.dispose=function(){t.e.Nb(this.c);t.j.prototype.dispose.call(this)};
s.f=function(){var a=this.d,c,d,e,g=a.L;if(!g||this.movingMediaElementInDOM===l){g?(e=g.cloneNode(l),t.e.Nb(g),g=e,a.L=j):(g=t.f("video"),e=videojs.$.Ba({},a.Ye),(!t.Gb||a.options().nativeControlsForTouch!==f)&&delete e.controls,t.ed(g,t.i.D(e,{id:a.id()+"_html5_api","class":"vjs-tech"})));g.player=a;if(a.q.rd)for(e=0;e<a.q.rd.length;e++)c=a.q.rd[e],d=document.createElement("track"),d.Xb=c.Xb,d.label=c.label,d.jd=c.jd,d.src=c.src,"default"in c&&d.setAttribute("default","default"),g.appendChild(d);
t.Vb(g,a.m())}c=["autoplay","preload","loop","muted"];for(e=c.length-1;0<=e;e--){d=c[e];var h={};"undefined"!==typeof a.q[d]&&(h[d]=a.q[d]);t.ed(g,h)}return g};s.fe=function(){for(var a=this.c.querySelectorAll("track"),c,d=a.length,e={captions:1,subtitles:1};d--;)if((c=a[d].T)&&c.kind in e&&!a[d]["default"])c.mode="disabled"};s.Xd=function(a){"error"==a.type&&this.error()?this.k().error(this.error().code):(a.bubbles=l,this.k().o(a))};s.play=function(){this.c.play()};s.pause=function(){this.c.pause()};
s.paused=function(){return this.c.paused};s.currentTime=function(){return this.c.currentTime};s.cc=function(a){try{this.c.currentTime=a}catch(c){t.log(c,"Video is not ready. (Video.js)")}};s.duration=function(){return this.c.duration||0};s.buffered=function(){return this.c.buffered};s.volume=function(){return this.c.volume};s.Te=function(a){this.c.volume=a};s.muted=function(){return this.c.muted};s.Pe=function(a){this.c.muted=a};s.width=function(){return this.c.offsetWidth};s.height=function(){return this.c.offsetHeight};
s.Ua=function(){return"function"==typeof this.c.webkitEnterFullScreen&&(/Android/.test(t.P)||!/Chrome|Mac OS X 10.5/.test(t.P))?f:l};s.Ic=function(){var a=this.c;"webkitDisplayingFullscreen"in a&&this.N("webkitbeginfullscreen",function(){this.d.isFullscreen(f);this.N("webkitendfullscreen",function(){this.d.isFullscreen(l);this.d.o("fullscreenchange")});this.d.o("fullscreenchange")});a.paused&&a.networkState<=a.kf?(this.c.play(),this.setTimeout(function(){a.pause();a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()};
s.Yd=function(){this.c.webkitExitFullScreen()};function oa(a,c){var d=/^blob\:/i;return c&&a&&d.test(a)?c:a}s.src=function(a){var c=this.c.src;if(a===b)return oa(c,this.hd);this.oa(a)};s.oa=function(a){this.c.src=a};s.load=function(){this.c.load()};s.currentSrc=function(){var a=this.c.currentSrc;return!this.ib?a:oa(a,this.ib.src)};s.poster=function(){return this.c.poster};s.fd=function(a){this.c.poster=a};s.Sa=function(){return this.c.Sa};s.Re=function(a){this.c.Sa=a};s.autoplay=function(){return this.c.autoplay};
s.Me=function(a){this.c.autoplay=a};s.controls=function(){return this.c.controls};s.loop=function(){return this.c.loop};s.Oe=function(a){this.c.loop=a};s.error=function(){return this.c.error};s.seeking=function(){return this.c.seeking};s.seekable=function(){return this.c.seekable};s.ended=function(){return this.c.ended};s.playbackRate=function(){return this.c.playbackRate};s.Qe=function(a){this.c.playbackRate=a};s.networkState=function(){return this.c.networkState};s.readyState=function(){return this.c.readyState};
s.textTracks=function(){return!this.featuresNativeTextTracks?t.j.prototype.textTracks.call(this):this.c.textTracks};s.addTextTrack=function(a,c,d){return!this.featuresNativeTextTracks?t.j.prototype.addTextTrack.call(this,a,c,d):this.c.addTextTrack(a,c,d)};
s.ia=function(a){if(!this.featuresNativeTextTracks)return t.j.prototype.ia.call(this,a);var c=document.createElement("track");a=a||{};a.kind&&(c.kind=a.kind);a.label&&(c.label=a.label);if(a.language||a.srclang)c.srclang=a.language||a.srclang;a["default"]&&(c["default"]=a["default"]);a.id&&(c.id=a.id);a.src&&(c.src=a.src);this.m().appendChild(c);c.track.mode="metadata"===c.T.kind?"hidden":"disabled";c.onload=function(){var a=c.track;2<=c.readyState&&("metadata"===a.kind&&"hidden"!==a.mode?a.mode="hidden":
"metadata"!==a.kind&&"disabled"!==a.mode&&(a.mode="disabled"),c.onload=j)};P(this.Z(),c.T);return c};s.Ea=function(a){if(!this.featuresNativeTextTracks)return t.j.prototype.Ea.call(this,a);var c,d;Q(this.Z(),a);c=this.m().querySelectorAll("track");for(d=0;d<c.length;d++)if(c[d]===a||c[d].track===a){c[d].parentNode.removeChild(c[d]);break}};t.e.isSupported=function(){try{t.A.volume=0.5}catch(a){return l}return!!t.A.canPlayType};t.j.hc(t.e);var pa=t.e.prototype.na,qa=t.e.prototype.ja;
t.e.prototype.na=function(a){var c=pa.call(this,a);this.hd=a.src;return c};t.e.prototype.ja=function(){this.hd=b;return qa.call(this)};t.e.S={};t.e.S.fb=function(a){function c(a){try{return t.A.canPlayType(a)}catch(c){return""}}return a.type?c(a.type):a.src?(a=(a=a.src.match(/\.([^.\/\?]+)(\?[^\/]+)?$/i))&&a[1],c("video/"+a)):""};t.e.S.Ub=function(a,c){c.oa(a.src)};t.e.S.dispose=m();t.e.Ta(t.e.S);t.e.Pd=function(){var a=t.A.volume;t.A.volume=a/2+0.1;return a!==t.A.volume};
t.e.Od=function(){var a=t.A.playbackRate;t.A.playbackRate=a/2+0.1;return a!==t.A.playbackRate};t.e.We=function(){var a;(a=!!t.A.textTracks)&&0<t.A.textTracks.length&&(a="number"!==typeof t.A.textTracks[0].mode);a&&t.kc&&(a=l);return a};t.e.prototype.featuresVolumeControl=t.e.Pd();t.e.prototype.featuresPlaybackRate=t.e.Od();t.e.prototype.movingMediaElementInDOM=!t.Bd;t.e.prototype.featuresFullscreenResize=f;t.e.prototype.featuresProgressEvents=f;t.e.prototype.featuresNativeTextTracks=t.e.We();
var S,ra=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,sa=/^video\/mp4/i;t.e.Xc=function(){4<=t.ic&&(S||(S=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&ra.test(a)?"maybe":S.call(this,a)});t.Fd&&(S||(S=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&sa.test(a)?"maybe":S.call(this,a)})};t.e.cf=function(){var a=t.A.constructor.prototype.canPlayType;t.A.constructor.prototype.canPlayType=S;S=j;return a};
t.e.Xc();t.e.Ab="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");t.e.Nb=function(a){if(a){a.player=j;for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src");if("function"===typeof a.load)try{a.load()}catch(c){}}};
t.g=t.j.extend({l:function(a,c,d){t.j.call(this,a,c,d);var e=c.source;d=a.id()+"_flash_api";var g=a.q,g=t.i.D({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:g.autoplay,preload:g.Sa,loop:g.loop,muted:g.muted},c.flashVars),h=t.i.D({wmode:"opaque",bgcolor:"#000000"},c.params);d=t.i.D({id:d,name:d,"class":"vjs-tech"},c.attributes);e&&this.I(function(){this.na(e)});t.Vb(this.c,c.parentEl);c.startTime&&this.I(function(){this.load();
this.play();this.currentTime(c.startTime)});t.kc&&this.I(function(){this.b("mousemove",function(){this.k().o({type:"mousemove",bubbles:l})})});a.b("stageclick",a.reportUserActivity);this.c=t.g.Hc(c.swf,this.c,g,h,d)}});s=t.g.prototype;s.dispose=function(){t.j.prototype.dispose.call(this)};s.play=function(){this.c.vjs_play()};s.pause=function(){this.c.vjs_pause()};s.src=function(a){return a===b?this.currentSrc():this.oa(a)};
s.oa=function(a){a=t.ae(a);this.c.vjs_src(a);if(this.d.autoplay()){var c=this;this.setTimeout(function(){c.play()},0)}};t.g.prototype.setCurrentTime=function(a){this.pe=a;this.c.vjs_setProperty("currentTime",a);t.j.prototype.cc.call(this)};t.g.prototype.currentTime=function(){return this.seeking()?this.pe||0:this.c.vjs_getProperty("currentTime")};t.g.prototype.currentSrc=function(){return this.ib?this.ib.src:this.c.vjs_getProperty("currentSrc")};t.g.prototype.load=function(){this.c.vjs_load()};
t.g.prototype.poster=function(){this.c.vjs_getProperty("poster")};t.g.prototype.setPoster=m();s=t.g.prototype;s.seekable=function(){return 0===this.duration()?t.ya():t.ya(0,this.duration())};s.buffered=function(){return!this.c.vjs_getProperty?t.ya():t.ya(0,this.c.vjs_getProperty("buffered"))};s.duration=function(){return!this.c.vjs_getProperty?0:this.c.vjs_getProperty("duration")};s.Ua=p(l);s.Ic=p(l);
function ta(){var a=T[U],c=a.charAt(0).toUpperCase()+a.slice(1);ua["set"+c]=function(c){return this.c.vjs_setProperty(a,c)}}function va(a){ua[a]=function(){return this.c.vjs_getProperty(a)}}
var ua=t.g.prototype,T="rtmpConnection rtmpStream preload defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),wa="error networkState readyState seeking initialTime startOffsetTime paused played ended videoTracks audioTracks videoWidth videoHeight".split(" "),U;for(U=0;U<T.length;U++)va(T[U]),ta();for(U=0;U<wa.length;U++)va(wa[U]);t.g.isSupported=function(){return 10<=t.g.version()[0]};t.j.hc(t.g);t.g.S={};
t.g.S.fb=function(a){return!a.type?"":a.type.replace(/;.*/,"").toLowerCase()in t.g.$d?"maybe":""};t.g.S.Ub=function(a,c){c.oa(a.src)};t.g.S.dispose=m();t.g.Ta(t.g.S);t.g.$d={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};t.g.onReady=function(a){var c;if(c=(a=t.m(a))&&a.parentNode&&a.parentNode.player)a.player=c,t.g.checkReady(c.h)};t.g.checkReady=function(a){a.m()&&(a.m().vjs_getProperty?a.Xa():this.setTimeout(function(){t.g.checkReady(a)},50))};
t.g.onEvent=function(a,c){t.m(a).player.o(c)};t.g.onError=function(a,c){var d=t.m(a).player,e="FLASH: "+c;"srcnotfound"==c?d.error({code:4,message:e}):d.error(e)};
t.g.version=function(){var a="0,0,0";try{a=(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(d){}}return a.split(",")};
t.g.Hc=function(a,c,d,e,g){a=t.g.de(a,d,e,g);a=t.f("div",{innerHTML:a}).childNodes[0];d=c.parentNode;c.parentNode.replaceChild(a,c);a[t.expando]=c[t.expando];var h=d.childNodes[0];setTimeout(function(){h.style.display="block"},1E3);return a};
t.g.de=function(a,c,d,e){var g="",h="",k="";c&&t.i.da(c,function(a,c){g+=a+"="+c+"&amp;"});d=t.i.D({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);t.i.da(d,function(a,c){h+='<param name="'+a+'" value="'+c+'" />'});e=t.i.D({data:a,width:"100%",height:"100%"},e);t.i.da(e,function(a,c){k+=a+'="'+c+'" '});return'<object type="application/x-shockwave-flash" '+k+">"+h+"</object>"};t.g.Ve={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};t.g.If=function(a,c){return a+"&"+c};
t.g.Ue=function(a){var c={Cc:"",nd:""};if(!a)return c;var d=a.indexOf("&"),e;-1!==d?e=d+1:(d=e=a.lastIndexOf("/")+1,0===d&&(d=e=a.length));c.Cc=a.substring(0,d);c.nd=a.substring(e,a.length);return c};t.g.ne=function(a){return a in t.g.Ve};t.g.Hd=/^rtmp[set]?:\/\//i;t.g.me=function(a){return t.g.Hd.test(a)};t.g.bc={};t.g.bc.fb=function(a){return t.g.ne(a.type)||t.g.me(a.src)?"maybe":""};t.g.bc.Ub=function(a,c){var d=t.g.Ue(a.src);c.setRtmpConnection(d.Cc);c.setRtmpStream(d.nd)};t.g.Ta(t.g.bc);
t.Gd=t.a.extend({l:function(a,c,d){t.a.call(this,a,c,d);if(!a.q.sources||0===a.q.sources.length){c=0;for(d=a.q.techOrder;c<d.length;c++){var e=t.wa(d[c]),g=window.videojs[e];if(g&&g.isSupported()){ka(a,e);break}}}else a.src(a.q.sources)}});t.sc={disabled:"disabled",hidden:"hidden",showing:"showing"};t.Id={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"};
t.t=function(a){var c,d,e,g,h,k,q,r,u,A,R;a=a||{};if(!a.player)throw Error("A player was not provided.");c=this;if(t.qa)for(R in c=document.createElement("custom"),t.t.prototype)c[R]=t.t.prototype[R];c.d=a.player;e=t.sc[a.mode]||"disabled";g=t.Id[a.kind]||"subtitles";h=a.label||"";k=a.language||a.srclang||"";d=a.id||"vjs_text_track_"+t.s++;if("metadata"===g||"chapters"===g)e="hidden";c.X=[];c.Ja=[];q=new t.W(c.X);r=new t.W(c.Ja);A=l;u=t.bind(c,function(){this.activeCues;A&&(this.trigger("cuechange"),
A=l)});"disabled"!==e&&c.d.b("timeupdate",u);Object.defineProperty(c,"kind",{get:function(){return g},set:Function.prototype});Object.defineProperty(c,"label",{get:function(){return h},set:Function.prototype});Object.defineProperty(c,"language",{get:function(){return k},set:Function.prototype});Object.defineProperty(c,"id",{get:function(){return d},set:Function.prototype});Object.defineProperty(c,"mode",{get:function(){return e},set:function(a){t.sc[a]&&(e=a,"showing"===e&&this.d.b("timeupdate",u),
this.o("modechange"))}});Object.defineProperty(c,"cues",{get:function(){return!this.Yb?j:q},set:Function.prototype});Object.defineProperty(c,"activeCues",{get:function(){var a,c,d,e,g;if(!this.Yb)return j;if(0===this.cues.length)return r;e=this.d.currentTime();a=0;c=this.cues.length;for(d=[];a<c;a++)g=this.cues[a],g.startTime<=e&&g.endTime>=e?d.push(g):g.startTime===g.endTime&&(g.startTime<=e&&g.startTime+0.5>=e)&&d.push(g);A=l;if(d.length!==this.Ja.length)A=f;else for(a=0;a<d.length;a++)-1===xa.call(this.Ja,
d[a])&&(A=f);this.Ja=d;r.sb(this.Ja);return r},set:Function.prototype});a.src?ya(a.src,c):c.Yb=f;if(t.qa)return c};t.t.prototype=t.i.create(t.z.prototype);t.t.prototype.constructor=t.t;t.t.prototype.cb={cuechange:"cuechange"};t.t.prototype.wc=function(a){var c=this.d.textTracks(),d=0;if(c)for(;d<c.length;d++)c[d]!==this&&c[d].bd(a);this.X.push(a);this.cues.sb(this.X)};t.t.prototype.bd=function(a){for(var c=0,d=this.X.length,e,g=l;c<d;c++)e=this.X[c],e===a&&(this.X.splice(c,1),g=f);g&&this.Ec.sb(this.X)};
var ya,V,xa;ya=function(a,c){t.gf(a,t.bind(this,function(a,e,g){if(a)return t.log.error(a);c.Yb=f;V(g,c)}))};V=function(a,c){if("function"!==typeof window.WebVTT)window.setTimeout(function(){V(a,c)},25);else{var d=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder());d.oncue=function(a){c.wc(a)};d.onparsingerror=function(a){t.log.error(a)};d.parse(a);d.flush()}};
xa=function(a,c){var d;if(this==j)throw new TypeError('"this" is null or not defined');var e=Object(this),g=e.length>>>0;if(0===g)return-1;d=+c||0;Infinity===Math.abs(d)&&(d=0);if(d>=g)return-1;for(d=Math.max(0<=d?d:g-Math.abs(d),0);d<g;){if(d in e&&e[d]===a)return d;d++}return-1};
t.F=function(a){var c=this,d,e=0;if(t.qa)for(d in c=document.createElement("custom"),t.F.prototype)c[d]=t.F.prototype[d];a=a||[];c.Wa=[];for(Object.defineProperty(c,"length",{get:function(){return this.Wa.length}});e<a.length;e++)P(c,a[e]);if(t.qa)return c};t.F.prototype=t.i.create(t.z.prototype);t.F.prototype.constructor=t.F;t.F.prototype.cb={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var za in t.F.prototype.cb)t.F.prototype["on"+za]=j;
function P(a,c){var d=a.Wa.length;""+d in a||Object.defineProperty(a,d,{get:function(){return this.Wa[d]}});c.addEventListener("modechange",t.bind(a,function(){this.o("change")}));a.Wa.push(c);a.o({type:"addtrack",T:c})}function Q(a,c){for(var d=0,e=a.length,g;d<e;d++)if(g=a[d],g===c){a.Wa.splice(d,1);break}a.o({type:"removetrack",T:c})}t.F.prototype.ee=function(a){for(var c=0,d=this.length,e=j,g;c<d;c++)if(g=this[c],g.id===a){e=g;break}return e};
t.W=function(a){var c=this,d;if(t.qa)for(d in c=document.createElement("custom"),t.W.prototype)c[d]=t.W.prototype[d];t.W.prototype.sb.call(c,a);Object.defineProperty(c,"length",{get:n("qe")});if(t.qa)return c};t.W.prototype.sb=function(a){var c=this.length||0,d=0,e=a.length;this.X=a;this.qe=a.length;a=function(a){""+a in this||Object.defineProperty(this,""+a,{get:function(){return this.X[a]}})};if(c<e)for(d=c;d<e;d++)a.call(this,d)};
t.W.prototype.ce=function(a){for(var c=0,d=this.length,e=j,g;c<d;c++)if(g=this[c],g.id===a){e=g;break}return e};t.ta=t.a.extend({l:function(a,c,d){t.a.call(this,a,c,d);a.b("loadstart",t.bind(this,this.$e));a.I(t.bind(this,function(){if(a.h&&a.h.featuresNativeTextTracks)this.Y();else{var c,d,h;a.b("fullscreenchange",t.bind(this,this.C));d=a.q.tracks||[];for(c=0;c<d.length;c++)h=d[c],this.d.ia(h)}}))}});t.ta.prototype.$e=function(){this.d.h&&this.d.h.featuresNativeTextTracks?this.Y():this.show()};
t.ta.prototype.f=function(){return t.a.prototype.f.call(this,"div",{className:"vjs-text-track-display"})};t.ta.prototype.Qd=function(){"function"===typeof window.WebVTT&&window.WebVTT.processCues(window,[],this.c)};function W(a,c){return"rgba("+parseInt(a[1]+a[1],16)+","+parseInt(a[2]+a[2],16)+","+parseInt(a[3]+a[3],16)+","+c+")"}
var Aa={yf:"monospace",Ef:"sans-serif",Gf:"serif",zf:'"Andale Mono", "Lucida Console", monospace',Af:'"Courier New", monospace',Cf:"sans-serif",Df:"serif",pf:'"Comic Sans MS", Impact, fantasy',Ff:'"Monotype Corsiva", cursive',Hf:'"Andale Mono", "Lucida Console", monospace, sans-serif'};t.ta.prototype.C=function(){var a=this.d.textTracks(),c=0,d;this.Qd();if(a)for(;c<a.length;c++)d=a[c],"showing"===d.mode&&this.df(d)};
t.ta.prototype.df=function(a){if("function"===typeof window.WebVTT&&a.activeCues){for(var c=0,d=this.d.textTrackSettings.Lc(),e,g=[];c<a.activeCues.length;c++)g.push(a.activeCues[c]);window.WebVTT.processCues(window,a.activeCues,this.c);for(c=g.length;c--;){a=g[c].qf;d.color&&(a.firstChild.style.color=d.color);if(d.od)try{a.firstChild.style.color=W(d.color||"#fff",d.od)}catch(h){}d.backgroundColor&&(a.firstChild.style.backgroundColor=d.backgroundColor);if(d.zc)try{a.firstChild.style.backgroundColor=
W(d.backgroundColor||"#000",d.zc)}catch(k){}if(d.gc)if(d.vd)try{a.style.backgroundColor=W(d.gc,d.vd)}catch(q){}else a.style.backgroundColor=d.gc;d.Na&&("dropshadow"===d.Na?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===d.Na?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===d.Na?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===d.Na&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222"));
d.Rb&&1!==d.Rb&&(e=window.Bf(a.style.fontSize),a.style.fontSize=e*d.Rb+"px",a.style.height="auto",a.style.top="auto",a.style.bottom="2px");d.fontFamily&&"default"!==d.fontFamily&&("small-caps"===d.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=Aa[d.fontFamily])}}};
t.aa=t.M.extend({l:function(a,c){var d=this.T=c.track,e=a.textTracks(),g,h;e&&(g=t.bind(this,function(){var a="showing"===this.T.mode,c,d,g;if(this instanceof t.Cb){a=f;d=0;for(g=e.length;d<g;d++)if(c=e[d],c.kind===this.T.kind&&"showing"===c.mode){a=l;break}}this.selected(a)}),e.addEventListener("change",g),a.b("dispose",function(){e.removeEventListener("change",g)}));c.label=d.label||d.language||"Unknown";c.selected=d["default"]||"showing"===d.mode;t.M.call(this,a,c);e&&e.onchange===b&&this.b(["tap",
"click"],function(){if("object"!==typeof window.zd)try{h=new window.zd("change")}catch(a){}h||(h=document.createEvent("Event"),h.initEvent("change",f,f));e.dispatchEvent(h)})}});t.aa.prototype.u=function(){var a=this.T.kind,c=this.d.textTracks(),d,e=0;t.M.prototype.u.call(this);if(c)for(;e<c.length;e++)d=c[e],d.kind===a&&(d.mode=d===this.T?"showing":"disabled")};t.Cb=t.aa.extend({l:function(a,c){c.track={kind:c.kind,player:a,label:c.kind+" off","default":l,mode:"disabled"};t.aa.call(this,a,c);this.selected(f)}});
t.vb=t.aa.extend({l:function(a,c){c.track={kind:c.kind,player:a,label:c.kind+" settings","default":l,mode:"disabled"};t.aa.call(this,a,c);this.p("vjs-texttrack-settings")}});t.vb.prototype.u=function(){this.k().ea("textTrackSettings").show()};
t.Q=t.O.extend({l:function(a,c){var d,e;t.O.call(this,a,c);d=this.d.textTracks();1>=this.H.length&&this.Y();d&&(e=t.bind(this,this.update),d.addEventListener("removetrack",e),d.addEventListener("addtrack",e),this.d.b("dispose",function(){d.removeEventListener("removetrack",e);d.removeEventListener("addtrack",e)}))}});
t.Q.prototype.La=function(){var a=[],c,d;this instanceof t.pa&&(!this.k().h||!this.k().h.featuresNativeTextTracks)&&a.push(new t.vb(this.d,{kind:this.fa}));a.push(new t.Cb(this.d,{kind:this.fa}));d=this.d.textTracks();if(!d)return a;for(var e=0;e<d.length;e++)c=d[e],c.kind===this.fa&&a.push(new t.aa(this.d,{track:c}));return a};t.pa=t.Q.extend({l:function(a,c,d){t.Q.call(this,a,c,d);this.c.setAttribute("aria-label","Captions Menu")}});t.pa.prototype.fa="captions";t.pa.prototype.ua="Captions";
t.pa.prototype.className="vjs-captions-button";t.pa.prototype.update=function(){var a=2;t.Q.prototype.update.call(this);this.k().h&&this.k().h.featuresNativeTextTracks&&(a=1);this.H&&this.H.length>a?this.show():this.Y()};t.bb=t.Q.extend({l:function(a,c,d){t.Q.call(this,a,c,d);this.c.setAttribute("aria-label","Subtitles Menu")}});t.bb.prototype.fa="subtitles";t.bb.prototype.ua="Subtitles";t.bb.prototype.className="vjs-subtitles-button";
t.Ya=t.Q.extend({l:function(a,c,d){t.Q.call(this,a,c,d);this.c.setAttribute("aria-label","Chapters Menu")}});s=t.Ya.prototype;s.fa="chapters";s.ua="Chapters";s.className="vjs-chapters-button";s.La=function(){var a=[],c,d;d=this.d.textTracks();if(!d)return a;for(var e=0;e<d.length;e++)c=d[e],c.kind===this.fa&&a.push(new t.aa(this.d,{track:c}));return a};
s.Ma=function(){for(var a=this.d.textTracks()||[],c=0,d=a.length,e,g,h=this.H=[];c<d;c++)if(e=a[c],e.kind==this.fa)if(e.Ec){g=e;break}else e.mode="hidden",window.setTimeout(t.bind(this,function(){this.Ma()}),100);a=this.Aa;a===b&&(a=new t.ra(this.d),a.xa().appendChild(t.f("li",{className:"vjs-menu-title",innerHTML:t.wa(this.fa),Xe:-1})));if(g){e=g.cues;for(var k,c=0,d=e.length;c<d;c++)k=e[c],k=new t.Za(this.d,{track:g,cue:k}),h.push(k),a.ba(k);this.ba(a)}0<this.H.length&&this.show();return a};
t.Za=t.M.extend({l:function(a,c){var d=this.T=c.track,e=this.cue=c.cue,g=a.currentTime();c.label=e.text;c.selected=e.startTime<=g&&g<e.endTime;t.M.call(this,a,c);d.addEventListener("cuechange",t.bind(this,this.update))}});t.Za.prototype.u=function(){t.M.prototype.u.call(this);this.d.currentTime(this.cue.startTime);this.update(this.cue.startTime)};t.Za.prototype.update=function(){var a=this.cue,c=this.d.currentTime();this.selected(a.startTime<=c&&c<a.endTime)};
function X(a){var c;a.Le?c=a.Le[0]:a.options&&(c=a.options[a.options.selectedIndex]);return c.value}function Y(a,c){var d,e;if(c){for(d=0;d<a.options.length&&!(e=a.options[d],e.value===c);d++);a.selectedIndex=d}}
t.tc=t.a.extend({l:function(a,c){t.a.call(this,a,c);this.Y();t.b(this.m().querySelector(".vjs-done-button"),"click",t.bind(this,function(){this.Ke();this.Y()}));t.b(this.m().querySelector(".vjs-default-button"),"click",t.bind(this,function(){this.m().querySelector(".vjs-fg-color > select").selectedIndex=0;this.m().querySelector(".vjs-bg-color > select").selectedIndex=0;this.m().querySelector(".window-color > select").selectedIndex=0;this.m().querySelector(".vjs-text-opacity > select").selectedIndex=
0;this.m().querySelector(".vjs-bg-opacity > select").selectedIndex=0;this.m().querySelector(".vjs-window-opacity > select").selectedIndex=0;this.m().querySelector(".vjs-edge-style select").selectedIndex=0;this.m().querySelector(".vjs-font-family select").selectedIndex=0;this.m().querySelector(".vjs-font-percent select").selectedIndex=2;this.C()}));t.b(this.m().querySelector(".vjs-fg-color > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-bg-color > select"),"change",t.bind(this,
this.C));t.b(this.m().querySelector(".window-color > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-text-opacity > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-bg-opacity > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-window-opacity > select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-font-percent select"),"change",t.bind(this,this.C));t.b(this.m().querySelector(".vjs-edge-style select"),"change",t.bind(this,
this.C));t.b(this.m().querySelector(".vjs-font-family select"),"change",t.bind(this,this.C));a.options().persistTextTrackSettings&&this.Je()}});s=t.tc.prototype;s.f=function(){return t.a.prototype.f.call(this,"div",{className:"vjs-caption-settings vjs-modal-overlay",innerHTML:'<div class="vjs-tracksettings"><div class="vjs-tracksettings-colors"><div class="vjs-fg-color vjs-tracksetting"><label class="vjs-label">Foreground</label><select><option value="">---</option><option value="#FFF">White</option><option value="#000">Black</option><option value="#F00">Red</option><option value="#0F0">Green</option><option value="#00F">Blue</option><option value="#FF0">Yellow</option><option value="#F0F">Magenta</option><option value="#0FF">Cyan</option></select><span class="vjs-text-opacity vjs-opacity"><select><option value="">---</option><option value="1">Opaque</option><option value="0.5">Semi-Opaque</option></select></span></div><div class="vjs-bg-color vjs-tracksetting"><label class="vjs-label">Background</label><select><option value="">---</option><option value="#FFF">White</option><option value="#000">Black</option><option value="#F00">Red</option><option value="#0F0">Green</option><option value="#00F">Blue</option><option value="#FF0">Yellow</option><option value="#F0F">Magenta</option><option value="#0FF">Cyan</option></select><span class="vjs-bg-opacity vjs-opacity"><select><option value="">---</option><option value="1">Opaque</option><option value="0.5">Semi-Transparent</option><option value="0">Transparent</option></select></span></div><div class="window-color vjs-tracksetting"><label class="vjs-label">Window</label><select><option value="">---</option><option value="#FFF">White</option><option value="#000">Black</option><option value="#F00">Red</option><option value="#0F0">Green</option><option value="#00F">Blue</option><option value="#FF0">Yellow</option><option value="#F0F">Magenta</option><option value="#0FF">Cyan</option></select><span class="vjs-window-opacity vjs-opacity"><select><option value="">---</option><option value="1">Opaque</option><option value="0.5">Semi-Transparent</option><option value="0">Transparent</option></select></span></div></div><div class="vjs-tracksettings-font"><div class="vjs-font-percent vjs-tracksetting"><label class="vjs-label">Font Size</label><select><option value="0.50">50%</option><option value="0.75">75%</option><option value="1.00" selected>100%</option><option value="1.25">125%</option><option value="1.50">150%</option><option value="1.75">175%</option><option value="2.00">200%</option><option value="3.00">300%</option><option value="4.00">400%</option></select></div><div class="vjs-edge-style vjs-tracksetting"><label class="vjs-label">Text Edge Style</label><select><option value="none">None</option><option value="raised">Raised</option><option value="depressed">Depressed</option><option value="uniform">Uniform</option><option value="dropshadow">Dropshadow</option></select></div><div class="vjs-font-family vjs-tracksetting"><label class="vjs-label">Font Family</label><select><option value="">Default</option><option value="monospaceSerif">Monospace Serif</option><option value="proportionalSerif">Proportional Serif</option><option value="monospaceSansSerif">Monospace Sans-Serif</option><option value="proportionalSansSerif">Proportional Sans-Serif</option><option value="casual">Casual</option><option value="script">Script</option><option value="small-caps">Small Caps</option></select></div></div></div><div class="vjs-tracksettings-controls"><button class="vjs-default-button">Defaults</button><button class="vjs-done-button">Done</button></div>'})};
s.Lc=function(){var a,c,d,e,g,h,k,q,r,u;a=this.m();g=X(a.querySelector(".vjs-edge-style select"));h=X(a.querySelector(".vjs-font-family select"));k=X(a.querySelector(".vjs-fg-color > select"));d=X(a.querySelector(".vjs-text-opacity > select"));q=X(a.querySelector(".vjs-bg-color > select"));c=X(a.querySelector(".vjs-bg-opacity > select"));r=X(a.querySelector(".window-color > select"));e=X(a.querySelector(".vjs-window-opacity > select"));a=window.parseFloat(X(a.querySelector(".vjs-font-percent > select")));
c={backgroundOpacity:c,textOpacity:d,windowOpacity:e,edgeStyle:g,fontFamily:h,color:k,backgroundColor:q,windowColor:r,fontPercent:a};for(u in c)(""===c[u]||"none"===c[u]||"fontPercent"===u&&1===c[u])&&delete c[u];return c};
s.Se=function(a){var c=this.m();Y(c.querySelector(".vjs-edge-style select"),a.Na);Y(c.querySelector(".vjs-font-family select"),a.fontFamily);Y(c.querySelector(".vjs-fg-color > select"),a.color);Y(c.querySelector(".vjs-text-opacity > select"),a.od);Y(c.querySelector(".vjs-bg-color > select"),a.backgroundColor);Y(c.querySelector(".vjs-bg-opacity > select"),a.zc);Y(c.querySelector(".window-color > select"),a.gc);Y(c.querySelector(".vjs-window-opacity > select"),a.vd);(a=a.Rb)&&(a=a.toFixed(2));Y(c.querySelector(".vjs-font-percent > select"),
a)};s.Je=function(){var a;try{a=JSON.parse(window.localStorage.getItem("vjs-text-track-settings"))}catch(c){}a&&this.Se(a)};s.Ke=function(){var a;if(this.d.options().persistTextTrackSettings){a=this.Lc();try{t.kb(a)?window.localStorage.removeItem("vjs-text-track-settings"):window.localStorage.setItem("vjs-text-track-settings",JSON.stringify(a))}catch(c){}}};s.C=function(){var a=this.d.ea("textTrackDisplay");a&&a.C()};
if("undefined"!==typeof window.JSON&&"function"===typeof window.JSON.parse)t.JSON=window.JSON;else{t.JSON={};var Z=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;t.JSON.parse=function(a,c){function d(a,e){var k,q,r=a[e];if(r&&"object"===typeof r)for(k in r)Object.prototype.hasOwnProperty.call(r,k)&&(q=d(r,k),q!==b?r[k]=q:delete r[k]);return c.call(a,e,r)}var e;a=String(a);Z.lastIndex=0;Z.test(a)&&(a=a.replace(Z,function(a){return"\\u"+("0000"+
a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data");}}
t.yc=function(){var a,c,d,e;a=document.getElementsByTagName("video");c=document.getElementsByTagName("audio");var g=[];if(a&&0<a.length){d=0;for(e=a.length;d<e;d++)g.push(a[d])}if(c&&0<c.length){d=0;for(e=c.length;d<e;d++)g.push(c[d])}if(g&&0<g.length){d=0;for(e=g.length;d<e;d++)if((c=g[d])&&c.getAttribute)c.player===b&&(a=c.getAttribute("data-setup"),a!==j&&videojs(c));else{t.Kb();break}}else t.ud||t.Kb()};t.Kb=function(){setTimeout(t.yc,1)};
"complete"===document.readyState?t.ud=f:t.N(window,"load",function(){t.ud=f});t.Kb();t.Ge=function(a,c){t.Player.prototype[a]=c};var Ba=this;function $(a,c){var d=a.split("."),e=Ba;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&c!==b?e[g]=c:e=e[g]?e[g]:e[g]={}};$("videojs",t);$("_V_",t);$("videojs.options",t.options);$("videojs.players",t.Da);$("videojs.TOUCH_ENABLED",t.Gb);$("videojs.cache",t.va);$("videojs.Component",t.a);t.a.prototype.player=t.a.prototype.k;t.a.prototype.options=t.a.prototype.options;t.a.prototype.init=t.a.prototype.l;t.a.prototype.dispose=t.a.prototype.dispose;t.a.prototype.createEl=t.a.prototype.f;t.a.prototype.contentEl=t.a.prototype.xa;t.a.prototype.el=t.a.prototype.m;t.a.prototype.addChild=t.a.prototype.ba;
t.a.prototype.getChild=t.a.prototype.ea;t.a.prototype.getChildById=t.a.prototype.be;t.a.prototype.children=t.a.prototype.children;t.a.prototype.initChildren=t.a.prototype.Oc;t.a.prototype.removeChild=t.a.prototype.removeChild;t.a.prototype.on=t.a.prototype.b;t.a.prototype.off=t.a.prototype.n;t.a.prototype.one=t.a.prototype.N;t.a.prototype.trigger=t.a.prototype.o;t.a.prototype.triggerReady=t.a.prototype.Xa;t.a.prototype.show=t.a.prototype.show;t.a.prototype.hide=t.a.prototype.Y;
t.a.prototype.width=t.a.prototype.width;t.a.prototype.height=t.a.prototype.height;t.a.prototype.dimensions=t.a.prototype.Ud;t.a.prototype.ready=t.a.prototype.I;t.a.prototype.addClass=t.a.prototype.p;t.a.prototype.removeClass=t.a.prototype.r;t.a.prototype.hasClass=t.a.prototype.Qa;t.a.prototype.buildCSSClass=t.a.prototype.V;t.a.prototype.localize=t.a.prototype.v;t.a.prototype.setInterval=t.a.prototype.setInterval;t.a.prototype.setTimeout=t.a.prototype.setTimeout;$("videojs.EventEmitter",t.z);
t.z.prototype.on=t.z.prototype.b;t.z.prototype.addEventListener=t.z.prototype.addEventListener;t.z.prototype.off=t.z.prototype.n;t.z.prototype.removeEventListener=t.z.prototype.removeEventListener;t.z.prototype.one=t.z.prototype.N;t.z.prototype.trigger=t.z.prototype.o;t.z.prototype.dispatchEvent=t.z.prototype.dispatchEvent;t.Player.prototype.ended=t.Player.prototype.ended;t.Player.prototype.enterFullWindow=t.Player.prototype.Jc;t.Player.prototype.exitFullWindow=t.Player.prototype.Ob;
t.Player.prototype.preload=t.Player.prototype.Sa;t.Player.prototype.remainingTime=t.Player.prototype.remainingTime;t.Player.prototype.supportsFullScreen=t.Player.prototype.Ua;t.Player.prototype.currentType=t.Player.prototype.Rd;t.Player.prototype.requestFullScreen=t.Player.prototype.requestFullScreen;t.Player.prototype.requestFullscreen=t.Player.prototype.requestFullscreen;t.Player.prototype.cancelFullScreen=t.Player.prototype.cancelFullScreen;t.Player.prototype.exitFullscreen=t.Player.prototype.exitFullscreen;
t.Player.prototype.isFullScreen=t.Player.prototype.isFullScreen;t.Player.prototype.isFullscreen=t.Player.prototype.isFullscreen;t.Player.prototype.textTracks=t.Player.prototype.textTracks;t.Player.prototype.remoteTextTracks=t.Player.prototype.Z;t.Player.prototype.addTextTrack=t.Player.prototype.addTextTrack;t.Player.prototype.addRemoteTextTrack=t.Player.prototype.ia;t.Player.prototype.removeRemoteTextTrack=t.Player.prototype.Ea;t.Player.prototype.seekable=t.Player.prototype.seekable;
$("videojs.MediaLoader",t.Gd);$("videojs.TextTrackDisplay",t.ta);$("videojs.ControlBar",t.wb);$("videojs.Button",t.w);$("videojs.PlayToggle",t.oc);$("videojs.FullscreenToggle",t.$a);$("videojs.BigPlayButton",t.ub);$("videojs.LoadingSpinner",t.mc);$("videojs.CurrentTimeDisplay",t.xb);$("videojs.DurationDisplay",t.yb);$("videojs.TimeDivider",t.uc);$("videojs.RemainingTimeDisplay",t.Fb);$("videojs.LiveDisplay",t.lc);$("videojs.ErrorDisplay",t.zb);$("videojs.Slider",t.U);$("videojs.ProgressControl",t.Eb);
$("videojs.SeekBar",t.rc);$("videojs.LoadProgressBar",t.Bb);$("videojs.PlayProgressBar",t.nc);$("videojs.SeekHandle",t.ab);$("videojs.VolumeControl",t.Ib);$("videojs.VolumeBar",t.Hb);$("videojs.VolumeLevel",t.vc);$("videojs.VolumeMenuButton",t.Ia);$("videojs.VolumeHandle",t.Jb);$("videojs.MuteToggle",t.sa);$("videojs.PosterImage",t.qc);$("videojs.Menu",t.ra);$("videojs.MenuItem",t.M);$("videojs.MenuButton",t.O);$("videojs.PlaybackRateMenuButton",t.pc);$("videojs.ChaptersTrackMenuItem",t.Za);
$("videojs.TextTrackButton",t.Q);$("videojs.TextTrackMenuItem",t.aa);$("videojs.OffTextTrackMenuItem",t.Cb);$("videojs.CaptionSettingsMenuItem",t.vb);t.O.prototype.createItems=t.O.prototype.La;t.Q.prototype.createItems=t.Q.prototype.La;t.Ya.prototype.createItems=t.Ya.prototype.La;$("videojs.SubtitlesButton",t.bb);$("videojs.CaptionsButton",t.pa);$("videojs.ChaptersButton",t.Ya);$("videojs.MediaTechController",t.j);t.j.withSourceHandlers=t.j.hc;t.j.prototype.featuresVolumeControl=t.j.prototype.vf;
t.j.prototype.featuresFullscreenResize=t.j.prototype.rf;t.j.prototype.featuresPlaybackRate=t.j.prototype.sf;t.j.prototype.featuresProgressEvents=t.j.prototype.tf;t.j.prototype.featuresTimeupdateEvents=t.j.prototype.uf;t.j.prototype.setPoster=t.j.prototype.fd;t.j.prototype.textTracks=t.j.prototype.textTracks;t.j.prototype.remoteTextTracks=t.j.prototype.Z;t.j.prototype.addTextTrack=t.j.prototype.addTextTrack;t.j.prototype.addRemoteTextTrack=t.j.prototype.ia;t.j.prototype.removeRemoteTextTrack=t.j.prototype.Ea;
$("videojs.Html5",t.e);t.e.Events=t.e.Ab;t.e.isSupported=t.e.isSupported;t.e.canPlaySource=t.e.Ac;t.e.patchCanPlayType=t.e.Xc;t.e.unpatchCanPlayType=t.e.cf;t.e.prototype.setCurrentTime=t.e.prototype.cc;t.e.prototype.setVolume=t.e.prototype.Te;t.e.prototype.setMuted=t.e.prototype.Pe;t.e.prototype.setPreload=t.e.prototype.Re;t.e.prototype.setAutoplay=t.e.prototype.Me;t.e.prototype.setLoop=t.e.prototype.Oe;t.e.prototype.enterFullScreen=t.e.prototype.Ic;t.e.prototype.exitFullScreen=t.e.prototype.Yd;
t.e.prototype.playbackRate=t.e.prototype.playbackRate;t.e.prototype.setPlaybackRate=t.e.prototype.Qe;t.e.registerSourceHandler=t.e.Ta;t.e.selectSourceHandler=t.e.rb;t.e.prototype.setSource=t.e.prototype.na;t.e.prototype.disposeSourceHandler=t.e.prototype.ja;t.e.prototype.textTracks=t.e.prototype.textTracks;t.e.prototype.remoteTextTracks=t.e.prototype.Z;t.e.prototype.addTextTrack=t.e.prototype.addTextTrack;t.e.prototype.addRemoteTextTrack=t.e.prototype.ia;t.e.prototype.removeRemoteTextTrack=t.e.prototype.Ea;
$("videojs.Flash",t.g);t.g.isSupported=t.g.isSupported;t.g.canPlaySource=t.g.Ac;t.g.onReady=t.g.onReady;t.g.embed=t.g.Hc;t.g.version=t.g.version;t.g.prototype.setSource=t.g.prototype.na;t.g.registerSourceHandler=t.g.Ta;t.g.selectSourceHandler=t.g.rb;t.g.prototype.setSource=t.g.prototype.na;t.g.prototype.disposeSourceHandler=t.g.prototype.ja;$("videojs.TextTrack",t.t);$("videojs.TextTrackList",t.F);$("videojs.TextTrackCueList",t.W);$("videojs.TextTrackSettings",t.tc);t.t.prototype.id=t.t.prototype.id;
t.t.prototype.label=t.t.prototype.label;t.t.prototype.kind=t.t.prototype.Xb;t.t.prototype.mode=t.t.prototype.mode;t.t.prototype.cues=t.t.prototype.Ec;t.t.prototype.activeCues=t.t.prototype.of;t.t.prototype.addCue=t.t.prototype.wc;t.t.prototype.removeCue=t.t.prototype.bd;t.F.prototype.getTrackById=t.F.prototype.ee;t.W.prototype.getCueById=t.F.prototype.ce;$("videojs.CaptionsTrack",t.hf);$("videojs.SubtitlesTrack",t.nf);$("videojs.ChaptersTrack",t.jf);$("videojs.autoSetup",t.yc);
$("videojs.plugin",t.Ge);$("videojs.createTimeRange",t.ya);$("videojs.util",t.$);t.$.mergeOptions=t.$.Ba;t.addLanguage=t.Kd;})();

/* vtt.js - v0.12.1 (https://github.com/mozilla/vtt.js) built on 08-07-2015 */
!function(a){var b=a.vttjs={},c=b.VTTCue,d=b.VTTRegion,e=a.VTTCue,f=a.VTTRegion;b.shim=function(){b.VTTCue=c,b.VTTRegion=d},b.restore=function(){b.VTTCue=e,b.VTTRegion=f}}(this),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=h[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){if("string"!=typeof a)return!1;var b=i[a.toLowerCase()];return b?a.toLowerCase():!1}function e(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)a[d]=c[d]}return a}function f(a,b,f){var h=this,i=/MSIE\s8\.0/.test(navigator.userAgent),j={};i?h=document.createElement("custom"):j.enumerable=!0,h.hasBeenReset=!1;var k="",l=!1,m=a,n=b,o=f,p=null,q="",r=!0,s="auto",t="start",u=50,v="middle",w=50,x="middle";return Object.defineProperty(h,"id",e({},j,{get:function(){return k},set:function(a){k=""+a}})),Object.defineProperty(h,"pauseOnExit",e({},j,{get:function(){return l},set:function(a){l=!!a}})),Object.defineProperty(h,"startTime",e({},j,{get:function(){return m},set:function(a){if("number"!=typeof a)throw new TypeError("Start time must be set to a number.");m=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"endTime",e({},j,{get:function(){return n},set:function(a){if("number"!=typeof a)throw new TypeError("End time must be set to a number.");n=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"text",e({},j,{get:function(){return o},set:function(a){o=""+a,this.hasBeenReset=!0}})),Object.defineProperty(h,"region",e({},j,{get:function(){return p},set:function(a){p=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"vertical",e({},j,{get:function(){return q},set:function(a){var b=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");q=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"snapToLines",e({},j,{get:function(){return r},set:function(a){r=!!a,this.hasBeenReset=!0}})),Object.defineProperty(h,"line",e({},j,{get:function(){return s},set:function(a){if("number"!=typeof a&&a!==g)throw new SyntaxError("An invalid number or illegal string was specified.");s=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"lineAlign",e({},j,{get:function(){return t},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");t=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"position",e({},j,{get:function(){return u},set:function(a){if(0>a||a>100)throw new Error("Position must be between 0 and 100.");u=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",e({},j,{get:function(){return v},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");v=b,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",e({},j,{get:function(){return w},set:function(a){if(0>a||a>100)throw new Error("Size must be between 0 and 100.");w=a,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",e({},j,{get:function(){return x},set:function(a){var b=d(a);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");x=b,this.hasBeenReset=!0}})),h.displayState=void 0,i?h:void 0}var g="auto",h={"":!0,lr:!0,rl:!0},i={start:!0,middle:!0,end:!0,left:!0,right:!0};f.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},a.VTTCue=a.VTTCue||f,b.VTTCue=f}(this,this.vttjs||{}),function(a,b){function c(a){if("string"!=typeof a)return!1;var b=f[a.toLowerCase()];return b?a.toLowerCase():!1}function d(a){return"number"==typeof a&&a>=0&&100>=a}function e(){var a=100,b=3,e=0,f=100,g=0,h=100,i="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a},set:function(b){if(!d(b))throw new Error("Width must be between 0 and 100.");a=b}},lines:{enumerable:!0,get:function(){return b},set:function(a){if("number"!=typeof a)throw new TypeError("Lines must be set to a number.");b=a}},regionAnchorY:{enumerable:!0,get:function(){return f},set:function(a){if(!d(a))throw new Error("RegionAnchorX must be between 0 and 100.");f=a}},regionAnchorX:{enumerable:!0,get:function(){return e},set:function(a){if(!d(a))throw new Error("RegionAnchorY must be between 0 and 100.");e=a}},viewportAnchorY:{enumerable:!0,get:function(){return h},set:function(a){if(!d(a))throw new Error("ViewportAnchorY must be between 0 and 100.");h=a}},viewportAnchorX:{enumerable:!0,get:function(){return g},set:function(a){if(!d(a))throw new Error("ViewportAnchorX must be between 0 and 100.");g=a}},scroll:{enumerable:!0,get:function(){return i},set:function(a){var b=c(a);if(b===!1)throw new SyntaxError("An invalid or illegal string was specified.");i=b}}})}var f={"":!0,up:!0};a.VTTRegion=a.VTTRegion||e,b.VTTRegion=e}(this,this.vttjs||{}),function(a){function b(a,b){this.name="ParsingError",this.code=a.code,this.message=b||a.message}function c(a){function b(a,b,c,d){return 3600*(0|a)+60*(0|b)+(0|c)+(0|d)/1e3}var c=a.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return c?c[3]?b(c[1],c[2],c[3].replace(":",""),c[4]):c[1]>59?b(c[1],c[2],0,c[4]):b(0,c[1],c[2],c[4]):null}function d(){this.values=o(null)}function e(a,b,c,d){var e=d?a.split(d):[a];for(var f in e)if("string"==typeof e[f]){var g=e[f].split(c);if(2===g.length){var h=g[0],i=g[1];b(h,i)}}}function f(a,f,g){function h(){var d=c(a);if(null===d)throw new b(b.Errors.BadTimeStamp,"Malformed timestamp: "+k);return a=a.replace(/^[^\sa-zA-Z-]+/,""),d}function i(a,b){var c=new d;e(a,function(a,b){switch(a){case"region":for(var d=g.length-1;d>=0;d--)if(g[d].id===b){c.set(a,g[d].region);break}break;case"vertical":c.alt(a,b,["rl","lr"]);break;case"line":var e=b.split(","),f=e[0];c.integer(a,f),c.percent(a,f)?c.set("snapToLines",!1):null,c.alt(a,f,["auto"]),2===e.length&&c.alt("lineAlign",e[1],["start","middle","end"]);break;case"position":e=b.split(","),c.percent(a,e[0]),2===e.length&&c.alt("positionAlign",e[1],["start","middle","end"]);break;case"size":c.percent(a,b);break;case"align":c.alt(a,b,["start","middle","end","left","right"])}},/:/,/\s/),b.region=c.get("region",null),b.vertical=c.get("vertical",""),b.line=c.get("line","auto"),b.lineAlign=c.get("lineAlign","start"),b.snapToLines=c.get("snapToLines",!0),b.size=c.get("size",100),b.align=c.get("align","middle"),b.position=c.get("position",{start:0,left:0,middle:50,end:100,right:100},b.align),b.positionAlign=c.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},b.align)}function j(){a=a.replace(/^\s+/,"")}var k=a;if(j(),f.startTime=h(),j(),"-->"!==a.substr(0,3))throw new b(b.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+k);a=a.substr(3),j(),f.endTime=h(),j(),i(a,f)}function g(a,b){function d(){function a(a){return b=b.substr(a.length),a}if(!b)return null;var c=b.match(/^([^<]*)(<[^>]+>?)?/);return a(c[1]?c[1]:c[2])}function e(a){return p[a]}function f(a){for(;o=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(o[0],e);return a}function g(a,b){return!s[b.localName]||s[b.localName]===a.localName}function h(b,c){var d=q[b];if(!d)return null;var e=a.document.createElement(d);e.localName=d;var f=r[b];return f&&c&&(e[f]=c.trim()),e}for(var i,j=a.document.createElement("div"),k=j,l=[];null!==(i=d());)if("<"!==i[0])k.appendChild(a.document.createTextNode(f(i)));else{if("/"===i[1]){l.length&&l[l.length-1]===i.substr(2).replace(">","")&&(l.pop(),k=k.parentNode);continue}var m,n=c(i.substr(1,i.length-2));if(n){m=a.document.createProcessingInstruction("timestamp",n),k.appendChild(m);continue}var o=i.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!o)continue;if(m=h(o[1],o[3]),!m)continue;if(!g(k,m))continue;o[2]&&(m.className=o[2].substr(1).replace("."," ")),l.push(o[1]),k.appendChild(m),k=m}return j}function h(a){function b(a,b){for(var c=b.childNodes.length-1;c>=0;c--)a.push(b.childNodes[c])}function c(a){if(!a||!a.length)return null;var d=a.pop(),e=d.textContent||d.innerText;if(e){var f=e.match(/^.*(\n|\r)/);return f?(a.length=0,f[0]):e}return"ruby"===d.tagName?c(a):d.childNodes?(b(a,d),c(a)):void 0}var d,e=[],f="";if(!a||!a.childNodes)return"ltr";for(b(e,a);f=c(e);)for(var g=0;g<f.length;g++){d=f.charCodeAt(g);for(var h=0;h<t.length;h++)if(t[h]===d)return"rtl"}return"ltr"}function i(a){if("number"==typeof a.line&&(a.snapToLines||a.line>=0&&a.line<=100))return a.line;if(!a.track||!a.track.textTrackList||!a.track.textTrackList.mediaElement)return-1;for(var b=a.track,c=b.textTrackList,d=0,e=0;e<c.length&&c[e]!==b;e++)"showing"===c[e].mode&&d++;return-1*++d}function j(){}function k(a,b,c){var d=/MSIE\s8\.0/.test(navigator.userAgent),e="rgba(255, 255, 255, 1)",f="rgba(0, 0, 0, 0.8)";d&&(e="rgb(255, 255, 255)",f="rgb(0, 0, 0)"),j.call(this),this.cue=b,this.cueDiv=g(a,b.text);var i={color:e,backgroundColor:f,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};d||(i.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl",i.unicodeBidi="plaintext"),this.applyStyles(i,this.cueDiv),this.div=a.document.createElement("div"),i={textAlign:"middle"===b.align?"center":b.align,font:c.font,whiteSpace:"pre-line",position:"absolute"},d||(i.direction=h(this.cueDiv),i.writingMode=""===b.vertical?"horizontal-tb":"lr"===b.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(i),this.div.appendChild(this.cueDiv);var k=0;switch(b.positionAlign){case"start":k=b.position;break;case"middle":k=b.position-b.size/2;break;case"end":k=b.position-b.size}this.applyStyles(""===b.vertical?{left:this.formatStyle(k,"%"),width:this.formatStyle(b.size,"%")}:{top:this.formatStyle(k,"%"),height:this.formatStyle(b.size,"%")}),this.move=function(a){this.applyStyles({top:this.formatStyle(a.top,"px"),bottom:this.formatStyle(a.bottom,"px"),left:this.formatStyle(a.left,"px"),right:this.formatStyle(a.right,"px"),height:this.formatStyle(a.height,"px"),width:this.formatStyle(a.width,"px")})}}function l(a){var b,c,d,e,f=/MSIE\s8\.0/.test(navigator.userAgent);if(a.div){c=a.div.offsetHeight,d=a.div.offsetWidth,e=a.div.offsetTop;var g=(g=a.div.childNodes)&&(g=g[0])&&g.getClientRects&&g.getClientRects();a=a.div.getBoundingClientRect(),b=g?Math.max(g[0]&&g[0].height||0,a.height/g.length):0}this.left=a.left,this.right=a.right,this.top=a.top||e,this.height=a.height||c,this.bottom=a.bottom||e+(a.height||c),this.width=a.width||d,this.lineHeight=void 0!==b?b:a.lineHeight,f&&!this.lineHeight&&(this.lineHeight=13)}function m(a,b,c,d){function e(a,b){for(var e,f=new l(a),g=1,h=0;h<b.length;h++){for(;a.overlapsOppositeAxis(c,b[h])||a.within(c)&&a.overlapsAny(d);)a.move(b[h]);if(a.within(c))return a;var i=a.intersectPercentage(c);g>i&&(e=new l(a),g=i),a=new l(f)}return e||f}var f=new l(b),g=b.cue,h=i(g),j=[];if(g.snapToLines){var k;switch(g.vertical){case"":j=["+y","-y"],k="height";break;case"rl":j=["+x","-x"],k="width";break;case"lr":j=["-x","+x"],k="width"}var m=f.lineHeight,n=m*Math.round(h),o=c[k]+m,p=j[0];Math.abs(n)>o&&(n=0>n?-1:1,n*=Math.ceil(o/m)*m),0>h&&(n+=""===g.vertical?c.height:c.width,j=j.reverse()),f.move(p,n)}else{var q=f.lineHeight/c.height*100;switch(g.lineAlign){case"middle":h-=q/2;break;case"end":h-=q}switch(g.vertical){case"":b.applyStyles({top:b.formatStyle(h,"%")});break;case"rl":b.applyStyles({left:b.formatStyle(h,"%")});break;case"lr":b.applyStyles({right:b.formatStyle(h,"%")})}j=["+y","-x","+x","-y"],f=new l(b)}var r=e(f,j);b.move(r.toCSSCompatValues(c))}function n(){}var o=Object.create||function(){function a(){}return function(b){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return a.prototype=b,new a}}();b.prototype=o(Error.prototype),b.prototype.constructor=b,b.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},d.prototype={set:function(a,b){this.get(a)||""===b||(this.values[a]=b)},get:function(a,b,c){return c?this.has(a)?this.values[a]:b[c]:this.has(a)?this.values[a]:b},has:function(a){return a in this.values},alt:function(a,b,c){for(var d=0;d<c.length;++d)if(b===c[d]){this.set(a,b);break}},integer:function(a,b){/^-?\d+$/.test(b)&&this.set(a,parseInt(b,10))},percent:function(a,b){var c;return(c=b.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(b=parseFloat(b),b>=0&&100>=b)?(this.set(a,b),!0):!1}};var p={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},q={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},r={v:"title",lang:"lang"},s={rt:"ruby"},t=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];j.prototype.applyStyles=function(a,b){b=b||this.div;for(var c in a)a.hasOwnProperty(c)&&(b.style[c]=a[c])},j.prototype.formatStyle=function(a,b){return 0===a?0:a+b},k.prototype=o(j.prototype),k.prototype.constructor=k,l.prototype.move=function(a,b){switch(b=void 0!==b?b:this.lineHeight,a){case"+x":this.left+=b,this.right+=b;break;case"-x":this.left-=b,this.right-=b;break;case"+y":this.top+=b,this.bottom+=b;break;case"-y":this.top-=b,this.bottom-=b}},l.prototype.overlaps=function(a){return this.left<a.right&&this.right>a.left&&this.top<a.bottom&&this.bottom>a.top},l.prototype.overlapsAny=function(a){for(var b=0;b<a.length;b++)if(this.overlaps(a[b]))return!0;return!1},l.prototype.within=function(a){return this.top>=a.top&&this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right},l.prototype.overlapsOppositeAxis=function(a,b){switch(b){case"+x":return this.left<a.left;case"-x":return this.right>a.right;case"+y":return this.top<a.top;case"-y":return this.bottom>a.bottom}},l.prototype.intersectPercentage=function(a){var b=Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left)),c=Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top)),d=b*c;return d/(this.height*this.width)},l.prototype.toCSSCompatValues=function(a){return{top:this.top-a.top,bottom:a.bottom-this.bottom,left:this.left-a.left,right:a.right-this.right,height:this.height,width:this.width}},l.getSimpleBoxPosition=function(a){var b=a.div?a.div.offsetHeight:a.tagName?a.offsetHeight:0,c=a.div?a.div.offsetWidth:a.tagName?a.offsetWidth:0,d=a.div?a.div.offsetTop:a.tagName?a.offsetTop:0;a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a;var e={left:a.left,right:a.right,top:a.top||d,height:a.height||b,bottom:a.bottom||d+(a.height||b),width:a.width||c};return e},n.StringDecoder=function(){return{decode:function(a){if(!a)return"";if("string"!=typeof a)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}},n.convertCueToDOMTree=function(a,b){return a&&b?g(a,b):null};var u=.05,v="sans-serif",w="1.5%";n.processCues=function(a,b,c){function d(a){for(var b=0;b<a.length;b++)if(a[b].hasBeenReset||!a[b].displayState)return!0;return!1}if(!a||!b||!c)return null;for(;c.firstChild;)c.removeChild(c.firstChild);var e=a.document.createElement("div");if(e.style.position="absolute",e.style.left="0",e.style.right="0",e.style.top="0",e.style.bottom="0",e.style.margin=w,c.appendChild(e),d(b)){var f=[],g=l.getSimpleBoxPosition(e),h=Math.round(g.height*u*100)/100,i={font:h+"px "+v};!function(){for(var c,d,h=0;h<b.length;h++)d=b[h],c=new k(a,d,i),e.appendChild(c.div),m(a,c,g,f),d.displayState=c.div,f.push(l.getSimpleBoxPosition(c))}()}else for(var j=0;j<b.length;j++)e.appendChild(b[j].displayState)},n.Parser=function(a,b,c){c||(c=b,b={}),b||(b={}),this.window=a,this.vttjs=b,this.state="INITIAL",this.buffer="",this.decoder=c||new TextDecoder("utf8"),this.regionList=[]},n.Parser.prototype={reportOrThrowError:function(a){if(!(a instanceof b))throw a;this.onparsingerror&&this.onparsingerror(a)},parse:function(a){function c(){for(var a=i.buffer,b=0;b<a.length&&"\r"!==a[b]&&"\n"!==a[b];)++b;var c=a.substr(0,b);return"\r"===a[b]&&++b,"\n"===a[b]&&++b,i.buffer=a.substr(b),c}function g(a){var b=new d;if(e(a,function(a,c){switch(a){case"id":b.set(a,c);break;case"width":b.percent(a,c);break;case"lines":b.integer(a,c);break;case"regionanchor":case"viewportanchor":var e=c.split(",");if(2!==e.length)break;var f=new d;if(f.percent("x",e[0]),f.percent("y",e[1]),!f.has("x")||!f.has("y"))break;b.set(a+"X",f.get("x")),b.set(a+"Y",f.get("y"));break;case"scroll":b.alt(a,c,["up"])}},/=/,/\s/),b.has("id")){var c=new(i.vttjs.VTTRegion||i.window.VTTRegion);c.width=b.get("width",100),c.lines=b.get("lines",3),c.regionAnchorX=b.get("regionanchorX",0),c.regionAnchorY=b.get("regionanchorY",100),c.viewportAnchorX=b.get("viewportanchorX",0),c.viewportAnchorY=b.get("viewportanchorY",100),c.scroll=b.get("scroll",""),i.onregion&&i.onregion(c),i.regionList.push({id:b.get("id"),region:c})}}function h(a){e(a,function(a,b){switch(a){case"Region":g(b)}},/:/)}var i=this;a&&(i.buffer+=i.decoder.decode(a,{stream:!0}));try{var j;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;j=c();var k=j.match(/^WEBVTT([ \t].*)?$/);if(!k||!k[0])throw new b(b.Errors.BadSignature);i.state="HEADER"}for(var l=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(l?l=!1:j=c(),i.state){case"HEADER":/:/.test(j)?h(j):j||(i.state="ID");continue;case"NOTE":j||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(j)){i.state="NOTE";break}if(!j)continue;if(i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,""),i.state="CUE",-1===j.indexOf("-->")){i.cue.id=j;continue}case"CUE":try{f(j,i.cue,i.regionList)}catch(m){i.reportOrThrowError(m),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var n=-1!==j.indexOf("-->");if(!j||n&&(l=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=j;continue;case"BADCUE":j||(i.state="ID");continue}}}catch(m){i.reportOrThrowError(m),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var a=this;try{if(a.buffer+=a.decoder.decode(),(a.cue||"HEADER"===a.state)&&(a.buffer+="\n\n",a.parse()),"INITIAL"===a.state)throw new b(b.Errors.BadSignature)}catch(c){a.reportOrThrowError(c)}return a.onflush&&a.onflush(),this}},a.WebVTT=n}(this,this.vttjs||{});
/*! Picturefill - v3.0.1 - 2015-09-30
 * http://scottjehl.github.io/picturefill
 * Copyright (c) 2015 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT
 */
/*! Gecko-Picture - v1.0
 * https://github.com/scottjehl/picturefill/tree/3.0/src/plugins/gecko-picture
 * Firefox's early picture implementation (prior to FF41) is static and does
 * not react to viewport changes. This tiny module fixes this.
 */
(function(window) {
	/*jshint eqnull:true */
	var ua = navigator.userAgent;

	if ( window.HTMLPictureElement && ((/ecko/).test(ua) && ua.match(/rv\:(\d+)/) && RegExp.$1 < 41) ) {
		addEventListener("resize", (function() {
			var timer;

			var dummySrc = document.createElement("source");

			var fixRespimg = function(img) {
				var source, sizes;
				var picture = img.parentNode;

				if (picture.nodeName.toUpperCase() === "PICTURE") {
					source = dummySrc.cloneNode();

					picture.insertBefore(source, picture.firstElementChild);
					setTimeout(function() {
						picture.removeChild(source);
					});
				} else if (!img._pfLastSize || img.offsetWidth > img._pfLastSize) {
					img._pfLastSize = img.offsetWidth;
					sizes = img.sizes;
					img.sizes += ",100vw";
					setTimeout(function() {
						img.sizes = sizes;
					});
				}
			};

			var findPictureImgs = function() {
				var i;
				var imgs = document.querySelectorAll("picture > img, img[srcset][sizes]");
				for (i = 0; i < imgs.length; i++) {
					fixRespimg(imgs[i]);
				}
			};
			var onResize = function() {
				clearTimeout(timer);
				timer = setTimeout(findPictureImgs, 99);
			};
			var mq = window.matchMedia && matchMedia("(orientation: landscape)");
			var init = function() {
				onResize();

				if (mq && mq.addListener) {
					mq.addListener(onResize);
				}
			};

			dummySrc.srcset = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";

			if (/^[c|i]|d$/.test(document.readyState || "")) {
				init();
			} else {
				document.addEventListener("DOMContentLoaded", init);
			}

			return onResize;
		})());
	}
})(window);

/*! Picturefill - v3.0.1
 * http://scottjehl.github.io/picturefill
 * Copyright (c) 2015 https://github.com/scottjehl/picturefill/blob/master/Authors.txt;
 *  License: MIT
 */

(function( window, document, undefined ) {
	// Enable strict mode
	"use strict";

	// HTML shim|v it for old IE (IE9 will still need the HTML video tag workaround)
	document.createElement( "picture" );

	var warn, eminpx, alwaysCheckWDescriptor, evalId;
	// local object for method references and testing exposure
	var pf = {};
	var noop = function() {};
	var image = document.createElement( "img" );
	var getImgAttr = image.getAttribute;
	var setImgAttr = image.setAttribute;
	var removeImgAttr = image.removeAttribute;
	var docElem = document.documentElement;
	var types = {};
	var cfg = {
		//resource selection:
		algorithm: ""
	};
	var srcAttr = "data-pfsrc";
	var srcsetAttr = srcAttr + "set";
	// ua sniffing is done for undetectable img loading features,
	// to do some non crucial perf optimizations
	var ua = navigator.userAgent;
	var supportAbort = (/rident/).test(ua) || ((/ecko/).test(ua) && ua.match(/rv\:(\d+)/) && RegExp.$1 > 35 );
	var curSrcProp = "currentSrc";
	var regWDesc = /\s+\+?\d+(e\d+)?w/;
	var regSize = /(\([^)]+\))?\s*(.+)/;
	var setOptions = window.picturefillCFG;
	/**
	 * Shortcut property for https://w3c.github.io/webappsec/specs/mixedcontent/#restricts-mixed-content ( for easy overriding in tests )
	 */
	// baseStyle also used by getEmValue (i.e.: width: 1em is important)
	var baseStyle = "position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)";
	var fsCss = "font-size:100%!important;";
	var isVwDirty = true;

	var cssCache = {};
	var sizeLengthCache = {};
	var DPR = window.devicePixelRatio;
	var units = {
		px: 1,
		"in": 96
	};
	var anchor = document.createElement( "a" );
	/**
	 * alreadyRun flag used for setOptions. is it true setOptions will reevaluate
	 * @type {boolean}
	 */
	var alreadyRun = false;

	// Reusable, non-"g" Regexes

	// (Don't use \s, to avoid matching non-breaking space.)
	var regexLeadingSpaces = /^[ \t\n\r\u000c]+/,
	    regexLeadingCommasOrSpaces = /^[, \t\n\r\u000c]+/,
	    regexLeadingNotSpaces = /^[^ \t\n\r\u000c]+/,
	    regexTrailingCommas = /[,]+$/,
	    regexNonNegativeInteger = /^\d+$/,

	    // ( Positive or negative or unsigned integers or decimals, without or without exponents.
	    // Must include at least one digit.
	    // According to spec tests any decimal point must be followed by a digit.
	    // No leading plus sign is allowed.)
	    // https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number
	    regexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;

	var on = function(obj, evt, fn, capture) {
		if ( obj.addEventListener ) {
			obj.addEventListener(evt, fn, capture || false);
		} else if ( obj.attachEvent ) {
			obj.attachEvent( "on" + evt, fn);
		}
	};

	/**
	 * simple memoize function:
	 */

	var memoize = function(fn) {
		var cache = {};
		return function(input) {
			if ( !(input in cache) ) {
				cache[ input ] = fn(input);
			}
			return cache[ input ];
		};
	};

	// UTILITY FUNCTIONS

	// Manual is faster than RegEx
	// http://jsperf.com/whitespace-character/5
	function isSpace(c) {
		return (c === "\u0020" || // space
		        c === "\u0009" || // horizontal tab
		        c === "\u000A" || // new line
		        c === "\u000C" || // form feed
		        c === "\u000D");  // carriage return
	}

	/**
	 * gets a mediaquery and returns a boolean or gets a css length and returns a number
	 * @param css mediaqueries or css length
	 * @returns {boolean|number}
	 *
	 * based on: https://gist.github.com/jonathantneal/db4f77009b155f083738
	 */
	var evalCSS = (function() {

		var regLength = /^([\d\.]+)(em|vw|px)$/;
		var replace = function() {
			var args = arguments, index = 0, string = args[0];
			while (++index in args) {
				string = string.replace(args[index], args[++index]);
			}
			return string;
		};

		var buildStr = memoize(function(css) {

			return "return " + replace((css || "").toLowerCase(),
				// interpret `and`
				/\band\b/g, "&&",

				// interpret `,`
				/,/g, "||",

				// interpret `min-` as >=
				/min-([a-z-\s]+):/g, "e.$1>=",

				// interpret `max-` as <=
				/max-([a-z-\s]+):/g, "e.$1<=",

				//calc value
				/calc([^)]+)/g, "($1)",

				// interpret css values
				/(\d+[\.]*[\d]*)([a-z]+)/g, "($1 * e.$2)",
				//make eval less evil
				/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/ig, ""
			) + ";";
		});

		return function(css, length) {
			var parsedLength;
			if (!(css in cssCache)) {
				cssCache[css] = false;
				if (length && (parsedLength = css.match( regLength ))) {
					cssCache[css] = parsedLength[ 1 ] * units[parsedLength[ 2 ]];
				} else {
					/*jshint evil:true */
					try{
						cssCache[css] = new Function("e", buildStr(css))(units);
					} catch(e) {}
					/*jshint evil:false */
				}
			}
			return cssCache[css];
		};
	})();

	var setResolution = function( candidate, sizesattr ) {
		if ( candidate.w ) { // h = means height: || descriptor.type === 'h' do not handle yet...
			candidate.cWidth = pf.calcListLength( sizesattr || "100vw" );
			candidate.res = candidate.w / candidate.cWidth ;
		} else {
			candidate.res = candidate.d;
		}
		return candidate;
	};

	/**
	 *
	 * @param opt
	 */
	var picturefill = function( opt ) {
		var elements, i, plen;

		var options = opt || {};

		if ( options.elements && options.elements.nodeType === 1 ) {
			if ( options.elements.nodeName.toUpperCase() === "IMG" ) {
				options.elements =  [ options.elements ];
			} else {
				options.context = options.elements;
				options.elements =  null;
			}
		}

		elements = options.elements || pf.qsa( (options.context || document), ( options.reevaluate || options.reselect ) ? pf.sel : pf.selShort );

		if ( (plen = elements.length) ) {

			pf.setupRun( options );
			alreadyRun = true;

			// Loop through all elements
			for ( i = 0; i < plen; i++ ) {
				pf.fillImg(elements[ i ], options);
			}

			pf.teardownRun( options );
		}
	};

	/**
	 * outputs a warning for the developer
	 * @param {message}
	 * @type {Function}
	 */
	warn = ( window.console && console.warn ) ?
		function( message ) {
			console.warn( message );
		} :
		noop
	;

	if ( !(curSrcProp in image) ) {
		curSrcProp = "src";
	}

	// Add support for standard mime types.
	types[ "image/jpeg" ] = true;
	types[ "image/gif" ] = true;
	types[ "image/png" ] = true;

	function detectTypeSupport( type, typeUri ) {
		// based on Modernizr's lossless img-webp test
		// note: asynchronous
		var image = new window.Image();
		image.onerror = function() {
			types[ type ] = false;
			picturefill();
		};
		image.onload = function() {
			types[ type ] = image.width === 1;
			picturefill();
		};
		image.src = typeUri;
		return "pending";
	}

	// test svg support
	types[ "image/svg+xml" ] = document.implementation.hasFeature( "http://wwwindow.w3.org/TR/SVG11/feature#Image", "1.1" );

	/**
	 * updates the internal vW property with the current viewport width in px
	 */
	function updateMetrics() {

		isVwDirty = false;
		DPR = window.devicePixelRatio;
		cssCache = {};
		sizeLengthCache = {};

		pf.DPR = DPR || 1;

		units.width = Math.max(window.innerWidth || 0, docElem.clientWidth);
		units.height = Math.max(window.innerHeight || 0, docElem.clientHeight);

		units.vw = units.width / 100;
		units.vh = units.height / 100;

		evalId = [ units.height, units.width, DPR ].join("-");

		units.em = pf.getEmValue();
		units.rem = units.em;
	}

	function chooseLowRes( lowerValue, higherValue, dprValue, isCached ) {
		var bonusFactor, tooMuch, bonus, meanDensity;

		//experimental
		if (cfg.algorithm === "saveData" ){
			if ( lowerValue > 2.7 ) {
				meanDensity = dprValue + 1;
			} else {
				tooMuch = higherValue - dprValue;
				bonusFactor = Math.pow(lowerValue - 0.6, 1.5);

				bonus = tooMuch * bonusFactor;

				if (isCached) {
					bonus += 0.1 * bonusFactor;
				}

				meanDensity = lowerValue + bonus;
			}
		} else {
			meanDensity = (dprValue > 1) ?
				Math.sqrt(lowerValue * higherValue) :
				lowerValue;
		}

		return meanDensity > dprValue;
	}

	function applyBestCandidate( img ) {
		var srcSetCandidates;
		var matchingSet = pf.getSet( img );
		var evaluated = false;
		if ( matchingSet !== "pending" ) {
			evaluated = evalId;
			if ( matchingSet ) {
				srcSetCandidates = pf.setRes( matchingSet );
				pf.applySetCandidate( srcSetCandidates, img );
			}
		}
		img[ pf.ns ].evaled = evaluated;
	}

	function ascendingSort( a, b ) {
		return a.res - b.res;
	}

	function setSrcToCur( img, src, set ) {
		var candidate;
		if ( !set && src ) {
			set = img[ pf.ns ].sets;
			set = set && set[set.length - 1];
		}

		candidate = getCandidateForSrc(src, set);

		if ( candidate ) {
			src = pf.makeUrl(src);
			img[ pf.ns ].curSrc = src;
			img[ pf.ns ].curCan = candidate;

			if ( !candidate.res ) {
				setResolution( candidate, candidate.set.sizes );
			}
		}
		return candidate;
	}

	function getCandidateForSrc( src, set ) {
		var i, candidate, candidates;
		if ( src && set ) {
			candidates = pf.parseSet( set );
			src = pf.makeUrl(src);
			for ( i = 0; i < candidates.length; i++ ) {
				if ( src === pf.makeUrl(candidates[ i ].url) ) {
					candidate = candidates[ i ];
					break;
				}
			}
		}
		return candidate;
	}

	function getAllSourceElements( picture, candidates ) {
		var i, len, source, srcset;

		// SPEC mismatch intended for size and perf:
		// actually only source elements preceding the img should be used
		// also note: don't use qsa here, because IE8 sometimes doesn't like source as the key part in a selector
		var sources = picture.getElementsByTagName( "source" );

		for ( i = 0, len = sources.length; i < len; i++ ) {
			source = sources[ i ];
			source[ pf.ns ] = true;
			srcset = source.getAttribute( "srcset" );

			// if source does not have a srcset attribute, skip
			if ( srcset ) {
				candidates.push( {
					srcset: srcset,
					media: source.getAttribute( "media" ),
					type: source.getAttribute( "type" ),
					sizes: source.getAttribute( "sizes" )
				} );
			}
		}
	}

	/**
	 * Srcset Parser
	 * By Alex Bell |  MIT License
	 *
	 * @returns Array [{url: _, d: _, w: _, h:_, set:_(????)}, ...]
	 *
	 * Based super duper closely on the reference algorithm at:
	 * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute
	 */

	// 1. Let input be the value passed to this algorithm.
	// (TO-DO : Explain what "set" argument is here. Maybe choose a more
	// descriptive & more searchable name.  Since passing the "set" in really has
	// nothing to do with parsing proper, I would prefer this assignment eventually
	// go in an external fn.)
	function parseSrcset(input, set) {

		function collectCharacters(regEx) {
			var chars,
			    match = regEx.exec(input.substring(pos));
			if (match) {
				chars = match[ 0 ];
				pos += chars.length;
				return chars;
			}
		}

		var inputLength = input.length,
		    url,
		    descriptors,
		    currentDescriptor,
		    state,
		    c,

		    // 2. Let position be a pointer into input, initially pointing at the start
		    //    of the string.
		    pos = 0,

		    // 3. Let candidates be an initially empty source set.
		    candidates = [];

		/**
		* Adds descriptor properties to a candidate, pushes to the candidates array
		* @return undefined
		*/
		// (Declared outside of the while loop so that it's only created once.
		// (This fn is defined before it is used, in order to pass JSHINT.
		// Unfortunately this breaks the sequencing of the spec comments. :/ )
		function parseDescriptors() {

			// 9. Descriptor parser: Let error be no.
			var pError = false,

			// 10. Let width be absent.
			// 11. Let density be absent.
			// 12. Let future-compat-h be absent. (We're implementing it now as h)
			    w, d, h, i,
			    candidate = {},
			    desc, lastChar, value, intVal, floatVal;

			// 13. For each descriptor in descriptors, run the appropriate set of steps
			// from the following list:
			for (i = 0 ; i < descriptors.length; i++) {
				desc = descriptors[ i ];

				lastChar = desc[ desc.length - 1 ];
				value = desc.substring(0, desc.length - 1);
				intVal = parseInt(value, 10);
				floatVal = parseFloat(value);

				// If the descriptor consists of a valid non-negative integer followed by
				// a U+0077 LATIN SMALL LETTER W character
				if (regexNonNegativeInteger.test(value) && (lastChar === "w")) {

					// If width and density are not both absent, then let error be yes.
					if (w || d) {pError = true;}

					// Apply the rules for parsing non-negative integers to the descriptor.
					// If the result is zero, let error be yes.
					// Otherwise, let width be the result.
					if (intVal === 0) {pError = true;} else {w = intVal;}

				// If the descriptor consists of a valid floating-point number followed by
				// a U+0078 LATIN SMALL LETTER X character
				} else if (regexFloatingPoint.test(value) && (lastChar === "x")) {

					// If width, density and future-compat-h are not all absent, then let error
					// be yes.
					if (w || d || h) {pError = true;}

					// Apply the rules for parsing floating-point number values to the descriptor.
					// If the result is less than zero, let error be yes. Otherwise, let density
					// be the result.
					if (floatVal < 0) {pError = true;} else {d = floatVal;}

				// If the descriptor consists of a valid non-negative integer followed by
				// a U+0068 LATIN SMALL LETTER H character
				} else if (regexNonNegativeInteger.test(value) && (lastChar === "h")) {

					// If height and density are not both absent, then let error be yes.
					if (h || d) {pError = true;}

					// Apply the rules for parsing non-negative integers to the descriptor.
					// If the result is zero, let error be yes. Otherwise, let future-compat-h
					// be the result.
					if (intVal === 0) {pError = true;} else {h = intVal;}

				// Anything else, Let error be yes.
				} else {pError = true;}
			} // (close step 13 for loop)

			// 15. If error is still no, then append a new image source to candidates whose
			// URL is url, associated with a width width if not absent and a pixel
			// density density if not absent. Otherwise, there is a parse error.
			if (!pError) {
				candidate.url = url;

				if (w) { candidate.w = w;}
				if (d) { candidate.d = d;}
				if (h) { candidate.h = h;}
				if (!h && !d && !w) {candidate.d = 1;}
				if (candidate.d === 1) {set.has1x = true;}
				candidate.set = set;

				candidates.push(candidate);
			}
		} // (close parseDescriptors fn)

		/**
		* Tokenizes descriptor properties prior to parsing
		* Returns undefined.
		* (Again, this fn is defined before it is used, in order to pass JSHINT.
		* Unfortunately this breaks the logical sequencing of the spec comments. :/ )
		*/
		function tokenize() {

			// 8.1. Descriptor tokeniser: Skip whitespace
			collectCharacters(regexLeadingSpaces);

			// 8.2. Let current descriptor be the empty string.
			currentDescriptor = "";

			// 8.3. Let state be in descriptor.
			state = "in descriptor";

			while (true) {

				// 8.4. Let c be the character at position.
				c = input.charAt(pos);

				//  Do the following depending on the value of state.
				//  For the purpose of this step, "EOF" is a special character representing
				//  that position is past the end of input.

				// In descriptor
				if (state === "in descriptor") {
					// Do the following, depending on the value of c:

				  // Space character
				  // If current descriptor is not empty, append current descriptor to
				  // descriptors and let current descriptor be the empty string.
				  // Set state to after descriptor.
					if (isSpace(c)) {
						if (currentDescriptor) {
							descriptors.push(currentDescriptor);
							currentDescriptor = "";
							state = "after descriptor";
						}

					// U+002C COMMA (,)
					// Advance position to the next character in input. If current descriptor
					// is not empty, append current descriptor to descriptors. Jump to the step
					// labeled descriptor parser.
					} else if (c === ",") {
						pos += 1;
						if (currentDescriptor) {
							descriptors.push(currentDescriptor);
						}
						parseDescriptors();
						return;

					// U+0028 LEFT PARENTHESIS (()
					// Append c to current descriptor. Set state to in parens.
					} else if (c === "\u0028") {
						currentDescriptor = currentDescriptor + c;
						state = "in parens";

					// EOF
					// If current descriptor is not empty, append current descriptor to
					// descriptors. Jump to the step labeled descriptor parser.
					} else if (c === "") {
						if (currentDescriptor) {
							descriptors.push(currentDescriptor);
						}
						parseDescriptors();
						return;

					// Anything else
					// Append c to current descriptor.
					} else {
						currentDescriptor = currentDescriptor + c;
					}
				// (end "in descriptor"

				// In parens
				} else if (state === "in parens") {

					// U+0029 RIGHT PARENTHESIS ())
					// Append c to current descriptor. Set state to in descriptor.
					if (c === ")") {
						currentDescriptor = currentDescriptor + c;
						state = "in descriptor";

					// EOF
					// Append current descriptor to descriptors. Jump to the step labeled
					// descriptor parser.
					} else if (c === "") {
						descriptors.push(currentDescriptor);
						parseDescriptors();
						return;

					// Anything else
					// Append c to current descriptor.
					} else {
						currentDescriptor = currentDescriptor + c;
					}

				// After descriptor
				} else if (state === "after descriptor") {

					// Do the following, depending on the value of c:
					// Space character: Stay in this state.
					if (isSpace(c)) {

					// EOF: Jump to the step labeled descriptor parser.
					} else if (c === "") {
						parseDescriptors();
						return;

					// Anything else
					// Set state to in descriptor. Set position to the previous character in input.
					} else {
						state = "in descriptor";
						pos -= 1;

					}
				}

				// Advance position to the next character in input.
				pos += 1;

			// Repeat this step.
			} // (close while true loop)
		}

		// 4. Splitting loop: Collect a sequence of characters that are space
		//    characters or U+002C COMMA characters. If any U+002C COMMA characters
		//    were collected, that is a parse error.
		while (true) {
			collectCharacters(regexLeadingCommasOrSpaces);

			// 5. If position is past the end of input, return candidates and abort these steps.
			if (pos >= inputLength) {
				return candidates; // (we're done, this is the sole return path)
			}

			// 6. Collect a sequence of characters that are not space characters,
			//    and let that be url.
			url = collectCharacters(regexLeadingNotSpaces);

			// 7. Let descriptors be a new empty list.
			descriptors = [];

			// 8. If url ends with a U+002C COMMA character (,), follow these substeps:
			//		(1). Remove all trailing U+002C COMMA characters from url. If this removed
			//         more than one character, that is a parse error.
			if (url.slice(-1) === ",") {
				url = url.replace(regexTrailingCommas, "");
				// (Jump ahead to step 9 to skip tokenization and just push the candidate).
				parseDescriptors();

			//	Otherwise, follow these substeps:
			} else {
				tokenize();
			} // (close else of step 8)

		// 16. Return to the step labeled splitting loop.
		} // (Close of big while loop.)
	}

	/*
	 * Sizes Parser
	 *
	 * By Alex Bell |  MIT License
	 *
	 * Non-strict but accurate and lightweight JS Parser for the string value <img sizes="here">
	 *
	 * Reference algorithm at:
	 * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-sizes-attribute
	 *
	 * Most comments are copied in directly from the spec
	 * (except for comments in parens).
	 *
	 * Grammar is:
	 * <source-size-list> = <source-size># [ , <source-size-value> ]? | <source-size-value>
	 * <source-size> = <media-condition> <source-size-value>
	 * <source-size-value> = <length>
	 * http://www.w3.org/html/wg/drafts/html/master/embedded-content.html#attr-img-sizes
	 *
	 * E.g. "(max-width: 30em) 100vw, (max-width: 50em) 70vw, 100vw"
	 * or "(min-width: 30em), calc(30vw - 15px)" or just "30vw"
	 *
	 * Returns the first valid <css-length> with a media condition that evaluates to true,
	 * or "100vw" if all valid media conditions evaluate to false.
	 *
	 */

	function parseSizes(strValue) {

		// (Percentage CSS lengths are not allowed in this case, to avoid confusion:
		// https://html.spec.whatwg.org/multipage/embedded-content.html#valid-source-size-list
		// CSS allows a single optional plus or minus sign:
		// http://www.w3.org/TR/CSS2/syndata.html#numbers
		// CSS is ASCII case-insensitive:
		// http://www.w3.org/TR/CSS2/syndata.html#characters )
		// Spec allows exponential notation for <number> type:
		// http://dev.w3.org/csswg/css-values/#numbers
		var regexCssLengthWithUnits = /^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i;

		// (This is a quick and lenient test. Because of optional unlimited-depth internal
		// grouping parens and strict spacing rules, this could get very complicated.)
		var regexCssCalc = /^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;

		var i;
		var unparsedSizesList;
		var unparsedSizesListLength;
		var unparsedSize;
		var lastComponentValue;
		var size;

		// UTILITY FUNCTIONS

		//  (Toy CSS parser. The goals here are:
		//  1) expansive test coverage without the weight of a full CSS parser.
		//  2) Avoiding regex wherever convenient.
		//  Quick tests: http://jsfiddle.net/gtntL4gr/3/
		//  Returns an array of arrays.)
		function parseComponentValues(str) {
			var chrctr;
			var component = "";
			var componentArray = [];
			var listArray = [];
			var parenDepth = 0;
			var pos = 0;
			var inComment = false;

			function pushComponent() {
				if (component) {
					componentArray.push(component);
					component = "";
				}
			}

			function pushComponentArray() {
				if (componentArray[0]) {
					listArray.push(componentArray);
					componentArray = [];
				}
			}

			// (Loop forwards from the beginning of the string.)
			while (true) {
				chrctr = str.charAt(pos);

				if (chrctr === "") { // ( End of string reached.)
					pushComponent();
					pushComponentArray();
					return listArray;
				} else if (inComment) {
					if ((chrctr === "*") && (str[pos + 1] === "/")) { // (At end of a comment.)
						inComment = false;
						pos += 2;
						pushComponent();
						continue;
					} else {
						pos += 1; // (Skip all characters inside comments.)
						continue;
					}
				} else if (isSpace(chrctr)) {
					// (If previous character in loop was also a space, or if
					// at the beginning of the string, do not add space char to
					// component.)
					if ( (str.charAt(pos - 1) && isSpace( str.charAt(pos - 1) ) ) || !component ) {
						pos += 1;
						continue;
					} else if (parenDepth === 0) {
						pushComponent();
						pos +=1;
						continue;
					} else {
						// (Replace any space character with a plain space for legibility.)
						chrctr = " ";
					}
				} else if (chrctr === "(") {
					parenDepth += 1;
				} else if (chrctr === ")") {
					parenDepth -= 1;
				} else if (chrctr === ",") {
					pushComponent();
					pushComponentArray();
					pos += 1;
					continue;
				} else if ( (chrctr === "/") && (str.charAt(pos + 1) === "*") ) {
					inComment = true;
					pos += 2;
					continue;
				}

				component = component + chrctr;
				pos += 1;
			}
		}

		function isValidNonNegativeSourceSizeValue(s) {
			if (regexCssLengthWithUnits.test(s) && (parseFloat(s) >= 0)) {return true;}
			if (regexCssCalc.test(s)) {return true;}
			// ( http://www.w3.org/TR/CSS2/syndata.html#numbers says:
			// "-0 is equivalent to 0 and is not a negative number." which means that
			// unitless zero and unitless negative zero must be accepted as special cases.)
			if ((s === "0") || (s === "-0") || (s === "+0")) {return true;}
			return false;
		}

		// When asked to parse a sizes attribute from an element, parse a
		// comma-separated list of component values from the value of the element's
		// sizes attribute (or the empty string, if the attribute is absent), and let
		// unparsed sizes list be the result.
		// http://dev.w3.org/csswg/css-syntax/#parse-comma-separated-list-of-component-values

		unparsedSizesList = parseComponentValues(strValue);
		unparsedSizesListLength = unparsedSizesList.length;

		// For each unparsed size in unparsed sizes list:
		for (i = 0; i < unparsedSizesListLength; i++) {
			unparsedSize = unparsedSizesList[i];

			// 1. Remove all consecutive <whitespace-token>s from the end of unparsed size.
			// ( parseComponentValues() already omits spaces outside of parens. )

			// If unparsed size is now empty, that is a parse error; continue to the next
			// iteration of this algorithm.
			// ( parseComponentValues() won't push an empty array. )

			// 2. If the last component value in unparsed size is a valid non-negative
			// <source-size-value>, let size be its value and remove the component value
			// from unparsed size. Any CSS function other than the calc() function is
			// invalid. Otherwise, there is a parse error; continue to the next iteration
			// of this algorithm.
			// http://dev.w3.org/csswg/css-syntax/#parse-component-value
			lastComponentValue = unparsedSize[unparsedSize.length - 1];

			if (isValidNonNegativeSourceSizeValue(lastComponentValue)) {
				size = lastComponentValue;
				unparsedSize.pop();
			} else {
				continue;
			}

			// 3. Remove all consecutive <whitespace-token>s from the end of unparsed
			// size. If unparsed size is now empty, return size and exit this algorithm.
			// If this was not the last item in unparsed sizes list, that is a parse error.
			if (unparsedSize.length === 0) {
				return size;
			}

			// 4. Parse the remaining component values in unparsed size as a
			// <media-condition>. If it does not parse correctly, or it does parse
			// correctly but the <media-condition> evaluates to false, continue to the
			// next iteration of this algorithm.
			// (Parsing all possible compound media conditions in JS is heavy, complicated,
			// and the payoff is unclear. Is there ever an situation where the
			// media condition parses incorrectly but still somehow evaluates to true?
			// Can we just rely on the browser/polyfill to do it?)
			unparsedSize = unparsedSize.join(" ");
			if (!(pf.matchesMedia( unparsedSize ) ) ) {
				continue;
			}

			// 5. Return size and exit this algorithm.
			return size;
		}

		// If the above algorithm exhausts unparsed sizes list without returning a
		// size value, return 100vw.
		return "100vw";
	}

	// namespace
	pf.ns = ("pf" + new Date().getTime()).substr(0, 9);

	// srcset support test
	pf.supSrcset = "srcset" in image;
	pf.supSizes = "sizes" in image;
	pf.supPicture = !!window.HTMLPictureElement;

	if (pf.supSrcset && pf.supPicture && !pf.supSizes) {
		(function(image2) {
			image.srcset = "data:,a";
			image2.src = "data:,a";
			pf.supSrcset = image.complete === image2.complete;
			pf.supPicture = pf.supSrcset && pf.supPicture;
		})(document.createElement("img"));
	}

	// using pf.qsa instead of dom traversing does scale much better,
	// especially on sites mixing responsive and non-responsive images
	pf.selShort = "picture>img,img[srcset]";
	pf.sel = pf.selShort;
	pf.cfg = cfg;

	if ( pf.supSrcset ) {
		pf.sel += ",img[" + srcsetAttr + "]";
	}

	/**
	 * Shortcut property for `devicePixelRatio` ( for easy overriding in tests )
	 */
	pf.DPR = (DPR  || 1 );
	pf.u = units;

	// container of supported mime types that one might need to qualify before using
	pf.types =  types;

	alwaysCheckWDescriptor = pf.supSrcset && !pf.supSizes;

	pf.setSize = noop;

	/**
	 * Gets a string and returns the absolute URL
	 * @param src
	 * @returns {String} absolute URL
	 */

	pf.makeUrl = memoize(function(src) {
		anchor.href = src;
		return anchor.href;
	});

	/**
	 * Gets a DOM element or document and a selctor and returns the found matches
	 * Can be extended with jQuery/Sizzle for IE7 support
	 * @param context
	 * @param sel
	 * @returns {NodeList}
	 */
	pf.qsa = function(context, sel) {
		return context.querySelectorAll(sel);
	};

	/**
	 * Shortcut method for matchMedia ( for easy overriding in tests )
	 * wether native or pf.mMQ is used will be decided lazy on first call
	 * @returns {boolean}
	 */
	pf.matchesMedia = function() {
		if ( window.matchMedia && (matchMedia( "(min-width: 0.1em)" ) || {}).matches ) {
			pf.matchesMedia = function( media ) {
				return !media || ( matchMedia( media ).matches );
			};
		} else {
			pf.matchesMedia = pf.mMQ;
		}

		return pf.matchesMedia.apply( this, arguments );
	};

	/**
	 * A simplified matchMedia implementation for IE8 and IE9
	 * handles only min-width/max-width with px or em values
	 * @param media
	 * @returns {boolean}
	 */
	pf.mMQ = function( media ) {
		return media ? evalCSS(media) : true;
	};

	/**
	 * Returns the calculated length in css pixel from the given sourceSizeValue
	 * http://dev.w3.org/csswg/css-values-3/#length-value
	 * intended Spec mismatches:
	 * * Does not check for invalid use of CSS functions
	 * * Does handle a computed length of 0 the same as a negative and therefore invalid value
	 * @param sourceSizeValue
	 * @returns {Number}
	 */
	pf.calcLength = function( sourceSizeValue ) {

		var value = evalCSS(sourceSizeValue, true) || false;
		if (value < 0) {
			value = false;
		}

		return value;
	};

	/**
	 * Takes a type string and checks if its supported
	 */

	pf.supportsType = function( type ) {
		return ( type ) ? types[ type ] : true;
	};

	/**
	 * Parses a sourceSize into mediaCondition (media) and sourceSizeValue (length)
	 * @param sourceSizeStr
	 * @returns {*}
	 */
	pf.parseSize = memoize(function( sourceSizeStr ) {
		var match = ( sourceSizeStr || "" ).match(regSize);
		return {
			media: match && match[1],
			length: match && match[2]
		};
	});

	pf.parseSet = function( set ) {
		if ( !set.cands ) {
			set.cands = parseSrcset(set.srcset, set);
		}
		return set.cands;
	};

	/**
	 * returns 1em in css px for html/body default size
	 * function taken from respondjs
	 * @returns {*|number}
	 */
	pf.getEmValue = function() {
		var body;
		if ( !eminpx && (body = document.body) ) {
			var div = document.createElement( "div" ),
				originalHTMLCSS = docElem.style.cssText,
				originalBodyCSS = body.style.cssText;

			div.style.cssText = baseStyle;

			// 1em in a media query is the value of the default font size of the browser
			// reset docElem and body to ensure the correct value is returned
			docElem.style.cssText = fsCss;
			body.style.cssText = fsCss;

			body.appendChild( div );
			eminpx = div.offsetWidth;
			body.removeChild( div );

			//also update eminpx before returning
			eminpx = parseFloat( eminpx, 10 );

			// restore the original values
			docElem.style.cssText = originalHTMLCSS;
			body.style.cssText = originalBodyCSS;

		}
		return eminpx || 16;
	};

	/**
	 * Takes a string of sizes and returns the width in pixels as a number
	 */
	pf.calcListLength = function( sourceSizeListStr ) {
		// Split up source size list, ie ( max-width: 30em ) 100%, ( max-width: 50em ) 50%, 33%
		//
		//                           or (min-width:30em) calc(30% - 15px)
		if ( !(sourceSizeListStr in sizeLengthCache) || cfg.uT ) {
			var winningLength = pf.calcLength( parseSizes( sourceSizeListStr ) );

			sizeLengthCache[ sourceSizeListStr ] = !winningLength ? units.width : winningLength;
		}

		return sizeLengthCache[ sourceSizeListStr ];
	};

	/**
	 * Takes a candidate object with a srcset property in the form of url/
	 * ex. "images/pic-medium.png 1x, images/pic-medium-2x.png 2x" or
	 *     "images/pic-medium.png 400w, images/pic-medium-2x.png 800w" or
	 *     "images/pic-small.png"
	 * Get an array of image candidates in the form of
	 *      {url: "/foo/bar.png", resolution: 1}
	 * where resolution is http://dev.w3.org/csswg/css-values-3/#resolution-value
	 * If sizes is specified, res is calculated
	 */
	pf.setRes = function( set ) {
		var candidates;
		if ( set ) {

			candidates = pf.parseSet( set );

			for ( var i = 0, len = candidates.length; i < len; i++ ) {
				setResolution( candidates[ i ], set.sizes );
			}
		}
		return candidates;
	};

	pf.setRes.res = setResolution;

	pf.applySetCandidate = function( candidates, img ) {
		if ( !candidates.length ) {return;}
		var candidate,
			i,
			j,
			length,
			bestCandidate,
			curSrc,
			curCan,
			candidateSrc,
			abortCurSrc;

		var imageData = img[ pf.ns ];
		var dpr = pf.DPR;

		curSrc = imageData.curSrc || img[curSrcProp];

		curCan = imageData.curCan || setSrcToCur(img, curSrc, candidates[0].set);

		// if we have a current source, we might either become lazy or give this source some advantage
		if ( curCan && curCan.set === candidates[ 0 ].set ) {

			// if browser can abort image request and the image has a higher pixel density than needed
			// and this image isn't downloaded yet, we skip next part and try to save bandwidth
			abortCurSrc = (supportAbort && !img.complete && curCan.res - 0.1 > dpr);

			if ( !abortCurSrc ) {
				curCan.cached = true;

				// if current candidate is "best", "better" or "okay",
				// set it to bestCandidate
				if ( curCan.res >= dpr ) {
					bestCandidate = curCan;
				}
			}
		}

		if ( !bestCandidate ) {

			candidates.sort( ascendingSort );

			length = candidates.length;
			bestCandidate = candidates[ length - 1 ];

			for ( i = 0; i < length; i++ ) {
				candidate = candidates[ i ];
				if ( candidate.res >= dpr ) {
					j = i - 1;

					// we have found the perfect candidate,
					// but let's improve this a little bit with some assumptions ;-)
					if (candidates[ j ] &&
						(abortCurSrc || curSrc !== pf.makeUrl( candidate.url )) &&
						chooseLowRes(candidates[ j ].res, candidate.res, dpr, candidates[ j ].cached)) {

						bestCandidate = candidates[ j ];

					} else {
						bestCandidate = candidate;
					}
					break;
				}
			}
		}

		if ( bestCandidate ) {

			candidateSrc = pf.makeUrl( bestCandidate.url );

			imageData.curSrc = candidateSrc;
			imageData.curCan = bestCandidate;

			if ( candidateSrc !== curSrc ) {
				pf.setSrc( img, bestCandidate );
			}
			pf.setSize( img );
		}
	};

	pf.setSrc = function( img, bestCandidate ) {
		var origWidth;
		img.src = bestCandidate.url;

		// although this is a specific Safari issue, we don't want to take too much different code paths
		if ( bestCandidate.set.type === "image/svg+xml" ) {
			origWidth = img.style.width;
			img.style.width = (img.offsetWidth + 1) + "px";

			// next line only should trigger a repaint
			// if... is only done to trick dead code removal
			if ( img.offsetWidth + 1 ) {
				img.style.width = origWidth;
			}
		}
	};

	pf.getSet = function( img ) {
		var i, set, supportsType;
		var match = false;
		var sets = img [ pf.ns ].sets;

		for ( i = 0; i < sets.length && !match; i++ ) {
			set = sets[i];

			if ( !set.srcset || !pf.matchesMedia( set.media ) || !(supportsType = pf.supportsType( set.type )) ) {
				continue;
			}

			if ( supportsType === "pending" ) {
				set = supportsType;
			}

			match = set;
			break;
		}

		return match;
	};

	pf.parseSets = function( element, parent, options ) {
		var srcsetAttribute, imageSet, isWDescripor, srcsetParsed;

		var hasPicture = parent && parent.nodeName.toUpperCase() === "PICTURE";
		var imageData = element[ pf.ns ];

		if ( imageData.src === undefined || options.src ) {
			imageData.src = getImgAttr.call( element, "src" );
			if ( imageData.src ) {
				setImgAttr.call( element, srcAttr, imageData.src );
			} else {
				removeImgAttr.call( element, srcAttr );
			}
		}

		if ( imageData.srcset === undefined || options.srcset || !pf.supSrcset || element.srcset ) {
			srcsetAttribute = getImgAttr.call( element, "srcset" );
			imageData.srcset = srcsetAttribute;
			srcsetParsed = true;
		}

		imageData.sets = [];

		if ( hasPicture ) {
			imageData.pic = true;
			getAllSourceElements( parent, imageData.sets );
		}

		if ( imageData.srcset ) {
			imageSet = {
				srcset: imageData.srcset,
				sizes: getImgAttr.call( element, "sizes" )
			};

			imageData.sets.push( imageSet );

			isWDescripor = (alwaysCheckWDescriptor || imageData.src) && regWDesc.test(imageData.srcset || "");

			// add normal src as candidate, if source has no w descriptor
			if ( !isWDescripor && imageData.src && !getCandidateForSrc(imageData.src, imageSet) && !imageSet.has1x ) {
				imageSet.srcset += ", " + imageData.src;
				imageSet.cands.push({
					url: imageData.src,
					d: 1,
					set: imageSet
				});
			}

		} else if ( imageData.src ) {
			imageData.sets.push( {
				srcset: imageData.src,
				sizes: null
			} );
		}

		imageData.curCan = null;
		imageData.curSrc = undefined;

		// if img has picture or the srcset was removed or has a srcset and does not support srcset at all
		// or has a w descriptor (and does not support sizes) set support to false to evaluate
		imageData.supported = !( hasPicture || ( imageSet && !pf.supSrcset ) || isWDescripor );

		if ( srcsetParsed && pf.supSrcset && !imageData.supported ) {
			if ( srcsetAttribute ) {
				setImgAttr.call( element, srcsetAttr, srcsetAttribute );
				element.srcset = "";
			} else {
				removeImgAttr.call( element, srcsetAttr );
			}
		}

		if (imageData.supported && !imageData.srcset && ((!imageData.src && element.src) ||  element.src !== pf.makeUrl(imageData.src))) {
			if (imageData.src === null) {
				element.removeAttribute("src");
			} else {
				element.src = imageData.src;
			}
		}

		imageData.parsed = true;
	};

	pf.fillImg = function(element, options) {
		var imageData;
		var extreme = options.reselect || options.reevaluate;

		// expando for caching data on the img
		if ( !element[ pf.ns ] ) {
			element[ pf.ns ] = {};
		}

		imageData = element[ pf.ns ];

		// if the element has already been evaluated, skip it
		// unless `options.reevaluate` is set to true ( this, for example,
		// is set to true when running `picturefill` on `resize` ).
		if ( !extreme && imageData.evaled === evalId ) {
			return;
		}

		if ( !imageData.parsed || options.reevaluate ) {
			pf.parseSets( element, element.parentNode, options );
		}

		if ( !imageData.supported ) {
			applyBestCandidate( element );
		} else {
			imageData.evaled = evalId;
		}
	};

	pf.setupRun = function() {
		if ( !alreadyRun || isVwDirty || (DPR !== window.devicePixelRatio) ) {
			updateMetrics();
		}
	};

	// If picture is supported, well, that's awesome.
	if ( pf.supPicture ) {
		picturefill = noop;
		pf.fillImg = noop;
	} else {

		 // Set up picture polyfill by polling the document
		(function() {
			var isDomReady;
			var regReady = window.attachEvent ? /d$|^c/ : /d$|^c|^i/;

			var run = function() {
				var readyState = document.readyState || "";

				timerId = setTimeout(run, readyState === "loading" ? 200 :  999);
				if ( document.body ) {
					pf.fillImgs();
					isDomReady = isDomReady || regReady.test(readyState);
					if ( isDomReady ) {
						clearTimeout( timerId );
					}

				}
			};

			var timerId = setTimeout(run, document.body ? 9 : 99);

			// Also attach picturefill on resize and readystatechange
			// http://modernjavascript.blogspot.com/2013/08/building-better-debounce.html
			var debounce = function(func, wait) {
				var timeout, timestamp;
				var later = function() {
					var last = (new Date()) - timestamp;

					if (last < wait) {
						timeout = setTimeout(later, wait - last);
					} else {
						timeout = null;
						func();
					}
				};

				return function() {
					timestamp = new Date();

					if (!timeout) {
						timeout = setTimeout(later, wait);
					}
				};
			};
			var lastClientWidth = docElem.clientHeight;
			var onResize = function() {
				isVwDirty = Math.max(window.innerWidth || 0, docElem.clientWidth) !== units.width || docElem.clientHeight !== lastClientWidth;
				lastClientWidth = docElem.clientHeight;
				if ( isVwDirty ) {
					pf.fillImgs();
				}
			};

			on( window, "resize", debounce(onResize, 99 ) );
			on( document, "readystatechange", run );
		})();
	}

	pf.picturefill = picturefill;
	//use this internally for easy monkey patching/performance testing
	pf.fillImgs = picturefill;
	pf.teardownRun = noop;

	/* expose methods for testing */
	picturefill._ = pf;

	window.picturefillCFG = {
		pf: pf,
		push: function(args) {
			var name = args.shift();
			if (typeof pf[name] === "function") {
				pf[name].apply(pf, args);
			} else {
				cfg[name] = args[0];
				if (alreadyRun) {
					pf.fillImgs( { reselect: true } );
				}
			}
		}
	};

	while (setOptions && setOptions.length) {
		window.picturefillCFG.push(setOptions.shift());
	}

	/* expose picturefill */
	window.picturefill = picturefill;

	/* expose picturefill */
	if ( typeof module === "object" && typeof module.exports === "object" ) {
		// CommonJS, just export
		module.exports = picturefill;
	} else if ( typeof define === "function" && define.amd ) {
		// AMD support
		define( "picturefill", function() { return picturefill; } );
	}

	// IE8 evals this sync, so it must be the last thing we do
	if ( !pf.supPicture ) {
		types[ "image/webp" ] = detectTypeSupport("image/webp", "data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==" );
	}

} )( window, document );

(function ($) {

  $('.tx-indexedsearch-rules h2').on('click', function (evt) {
    $('.tx-indexedsearch-rules .on-demand').slideToggle({
      duration: 200
    });
  });

})(jQuery);

/**
 * Owl carousel
 * @version 2.0.0-beta.3
 * @author Bartosz Wojciechowski
 * @license The MIT License (MIT)
 * @todo Lazy Load Icon
 * @todo prevent animationend bubling
 * @todo itemsScaleUp
 * @todo Test Zepto
 * @todo stagePadding calculate wrong active classes
 */
function customPager() {
  $(".gallery.big").each(function () {
    var t = $(this);
    t.append('<div class="customPager"><ul></ul></div>'), t.find("img").each(function (e) {
      var i = e + 1;
      1 == i ? t.find(".customPager ul").append('<li class="owl-page active"><span>' + i + "</span></li>") : t.find(".customPager ul").append('<li class="owl-page"><span >' + i + "</span></li>")
    })
  }), $(".customPager li").on("click", function () {
    var t = $(this).text() - parseInt(1);
    $(this).parents(".gallery").find(".customPager li").removeClass("active"), $(this).addClass("active"), $(this).parents(".gallery").find(".csc-textpic-center-inner").trigger("to.owl.carousel", [t, 500, !0])
  })
}

function setCustomPager(t) {
  var e = t;
  $(".customPager li").removeClass("active"), $(".customPager li").eq(e).addClass("active")
}

function hasScrolled() {
  var t = $(this).scrollTop();
  Math.abs(lastScrollTop - t) <= delta || (t > lastScrollTop && t > navbarHeight ? $(".head").fadeOut(150) : t + $(window).height() < $(document).height() && $(".head").fadeIn(150), lastScrollTop = t)
}

function hideBoxes() {
  $(".contacts-community .nocontact, .contacts-community .azvcontact, .contacts-community .box.colored").hide()
}

function setHeights() {
  $(".contacts-community .box.colored:visible .innerWrap").matchHeight()
}

function initThisOwl(t) {
  $(".sectionteaser .wrapper .tBoxes#" + t).owlCarousel({
    items: 5,
    itemElement: "div",
    dots: !1,
    responsiveClass: !0,
    responsive: {
      0: {
        items: 2,
        dots: !0
      },
      500: {
        items: 4,
        dots: !0
      },
      1200: {
        items: 5,
        dots: !1
      }
    }
  })
}

function msieversion() {
  var t = window.navigator.userAgent,
    e = t.indexOf("MSIE");
  return (e > 0 || navigator.userAgent.match(/Trident.*rv\:11\./)) && $("html").addClass("iebrowser"), !1
}

!function ($, t, e, i) {
  function s(t, e) {
    this.settings = null, this.options = $.extend({}, s.Defaults, e), this.$element = $(t), this._handlers = {}, this._plugins = {}, this._supress = {}, this._current = null, this._speed = null, this._coordinates = [], this._breakpoint = null, this._width = null, this._items = [], this._clones = [], this._mergers = [], this._widths = [], this._invalidated = {}, this._pipe = [], this._drag = {
      time: null,
      target: null,
      pointer: null,
      stage: {
        start: null,
        current: null
      },
      direction: null
    }, this._states = {
      current: {},
      tags: {
        initializing: ["busy"],
        animating: ["busy"],
        dragging: ["interacting"]
      }
    }, $.each(["onResize", "onThrottledResize"], $.proxy(function (t, e) {
      this._handlers[e] = $.proxy(this[e], this)
    }, this)), $.each(s.Plugins, $.proxy(function (t, e) {
      this._plugins[t.charAt(0).toLowerCase() + t.slice(1)] = new e(this)
    }, this)), $.each(s.Workers, $.proxy(function (t, e) {
      this._pipe.push({
        filter: e.filter,
        run: $.proxy(e.run, this)
      })
    }, this)), this.setup(), this.initialize()
  }

  s.Defaults = {
    items: 3,
    loop: !1,
    center: !1,
    rewind: !1,
    mouseDrag: !0,
    touchDrag: !0,
    pullDrag: !0,
    freeDrag: !1,
    margin: 0,
    stagePadding: 0,
    merge: !1,
    mergeFit: !0,
    autoWidth: !1,
    startPosition: 0,
    rtl: !1,
    smartSpeed: 250,
    fluidSpeed: !1,
    dragEndSpeed: !1,
    responsive: {},
    responsiveRefreshRate: 200,
    responsiveBaseElement: t,
    fallbackEasing: "swing",
    info: !1,
    nestedItemSelector: !1,
    itemElement: "div",
    stageElement: "div",
    refreshClass: "owl-refresh",
    loadedClass: "owl-loaded",
    loadingClass: "owl-loading",
    rtlClass: "owl-rtl",
    responsiveClass: "owl-responsive",
    dragClass: "owl-drag",
    itemClass: "owl-item",
    stageClass: "owl-stage",
    stageOuterClass: "owl-stage-outer",
    grabClass: "owl-grab"
  }, s.Width = {
    Default: "default",
    Inner: "inner",
    Outer: "outer"
  }, s.Type = {
    Event: "event",
    State: "state"
  }, s.Plugins = {}, s.Workers = [{
    filter: ["width", "settings"],
    run: function () {
      this._width = this.$element.width()
    }
  }, {
    filter: ["width", "items", "settings"],
    run: function (t) {
      t.current = this._items && this._items[this.relative(this._current)]
    }
  }, {
    filter: ["items", "settings"],
    run: function () {
      this.$stage.children(".cloned").remove()
    }
  }, {
    filter: ["width", "items", "settings"],
    run: function (t) {
      var e = this.settings.margin || "",
        i = !this.settings.autoWidth,
        s = this.settings.rtl,
        o = {
          width: "auto",
          "margin-left": s ? e : "",
          "margin-right": s ? "" : e
        };
      !i && this.$stage.children().css(o), t.css = o
    }
  }, {
    filter: ["width", "items", "settings"],
    run: function (t) {
      var e = (this.width() / this.settings.items).toFixed(3) - this.settings.margin,
        i = null,
        s = this._items.length,
        o = !this.settings.autoWidth,
        n = [];
      for (t.items = {
        merge: !1,
        width: e
      }; s--;) i = this._mergers[s], i = this.settings.mergeFit && Math.min(i, this.settings.items) || i, t.items.merge = i > 1 || t.items.merge, n[s] = o ? e * i : this._items[s].width();
      this._widths = n
    }
  }, {
    filter: ["items", "settings"],
    run: function () {
      var t = [],
        e = this._items,
        i = this.settings,
        s = Math.max(2 * i.items, 4),
        o = 2 * Math.ceil(e.length / 2),
        n = i.loop && e.length ? i.rewind ? s : Math.max(s, o) : 0,
        r = "",
        a = "";
      for (n /= 2; n--;) t.push(this.normalize(t.length / 2, !0)), r += e[t[t.length - 1]][0].outerHTML, t.push(this.normalize(e.length - 1 - (t.length - 1) / 2, !0)), a = e[t[t.length - 1]][0].outerHTML + a;
      this._clones = t, $(r).addClass("cloned").appendTo(this.$stage), $(a).addClass("cloned").prependTo(this.$stage)
    }
  }, {
    filter: ["width", "items", "settings"],
    run: function () {
      for (var t = this.settings.rtl ? 1 : -1, e = this._clones.length + this._items.length, i = -1, s = 0, o = 0, n = []; ++i < e;) s = n[i - 1] || 0, o = this._widths[this.relative(i)] + this.settings.margin, n.push(s + o * t);
      this._coordinates = n
    }
  }, {
    filter: ["width", "items", "settings"],
    run: function () {
      var t = this.settings.stagePadding,
        e = this._coordinates,
        i = {
          width: Math.ceil(Math.abs(e[e.length - 1])) + 2 * t,
          "padding-left": t || "",
          "padding-right": t || ""
        };
      this.$stage.css(i)
    }
  }, {
    filter: ["width", "items", "settings"],
    run: function (t) {
      var e = this._coordinates.length,
        i = !this.settings.autoWidth,
        s = this.$stage.children();
      if (i && t.items.merge)
        for (; e--;) t.css.width = this._widths[this.relative(e)], s.eq(e).css(t.css);
      else i && (t.css.width = t.items.width, s.css(t.css))
    }
  }, {
    filter: ["items"],
    run: function () {
      this._coordinates.length < 1 && this.$stage.removeAttr("style")
    }
  }, {
    filter: ["width", "items", "settings"],
    run: function (t) {
      t.current = t.current ? this.$stage.children().index(t.current) : 0, t.current = Math.max(this.minimum(), Math.min(this.maximum(), t.current)), this.reset(t.current)
    }
  }, {
    filter: ["position"],
    run: function () {
      this.animate(this.coordinates(this._current))
    }
  }, {
    filter: ["width", "position", "items", "settings"],
    run: function () {
      var t = this.settings.rtl ? 1 : -1,
        e = 2 * this.settings.stagePadding,
        i = this.coordinates(this.current()) + e,
        s = i + this.width() * t,
        o, n, r = [],
        a, l;
      for (a = 0, l = this._coordinates.length; a < l; a++) o = this._coordinates[a - 1] || 0, n = Math.abs(this._coordinates[a]) + e * t, (this.op(o, "<=", i) && this.op(o, ">", s) || this.op(n, "<", i) && this.op(n, ">", s)) && r.push(a);
      this.$stage.children(".active").removeClass("active"), this.$stage.children(":eq(" + r.join("), :eq(") + ")").addClass("active"), this.settings.center && (this.$stage.children(".center").removeClass("center"), this.$stage.children().eq(this.current()).addClass("center"))
    }
  }], s.prototype.initialize = function () {
    if (this.enter("initializing"), this.trigger("initialize"), this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl), this.settings.autoWidth && !this.is("pre-loading")) {
      var t, e, s;
      t = this.$element.find("img"), e = this.settings.nestedItemSelector ? "." + this.settings.nestedItemSelector : i, s = this.$element.children(e).width(), t.length && s <= 0 && this.preloadAutoWidthImages(t)
    }
    this.$element.addClass(this.options.loadingClass), this.$stage = $("<" + this.settings.stageElement + ' class="' + this.settings.stageClass + '"/>').wrap('<div class="' + this.settings.stageOuterClass + '"/>'), this.$element.append(this.$stage.parent()), this.replace(this.$element.children().not(this.$stage.parent())), this.$element.is(":visible") ? this.refresh() : this.invalidate("width"), this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass), this.registerEventHandlers(), this.leave("initializing"), this.trigger("initialized")
  }, s.prototype.setup = function () {
    var t = this.viewport(),
      e = this.options.responsive,
      i = -1,
      s = null;
    e ? ($.each(e, function (e) {
      e <= t && e > i && (i = Number(e))
    }), s = $.extend({}, this.options, e[i]), delete s.responsive, s.responsiveClass && this.$element.attr("class", this.$element.attr("class").replace(new RegExp("(" + this.options.responsiveClass + "-)\\S+\\s", "g"), "$1" + i))) : s = $.extend({}, this.options), null !== this.settings && this._breakpoint === i || (this.trigger("change", {
      property: {
        name: "settings",
        value: s
      }
    }), this._breakpoint = i, this.settings = s, this.invalidate("settings"), this.trigger("changed", {
      property: {
        name: "settings",
        value: this.settings
      }
    }))
  }, s.prototype.optionsLogic = function () {
    this.settings.autoWidth && (this.settings.stagePadding = !1, this.settings.merge = !1)
  }, s.prototype.prepare = function (t) {
    var e = this.trigger("prepare", {
      content: t
    });
    return e.data || (e.data = $("<" + this.settings.itemElement + "/>").addClass(this.options.itemClass).append(t)), this.trigger("prepared", {
      content: e.data
    }), e.data
  }, s.prototype.update = function () {
    for (var t = 0, e = this._pipe.length, i = $.proxy(function (t) {
      return this[t]
    }, this._invalidated), s = {}; t < e;) (this._invalidated.all || $.grep(this._pipe[t].filter, i).length > 0) && this._pipe[t].run(s), t++;
    this._invalidated = {}, !this.is("valid") && this.enter("valid")
  }, s.prototype.width = function (t) {
    switch (t = t || s.Width.Default) {
      case s.Width.Inner:
      case s.Width.Outer:
        return this._width;
      default:
        return this._width - 2 * this.settings.stagePadding + this.settings.margin
    }
  }, s.prototype.refresh = function () {
    this.enter("refreshing"), this.trigger("refresh"), this.setup(), this.optionsLogic(), this.$element.addClass(this.options.refreshClass), this.update(), this.$element.removeClass(this.options.refreshClass), this.leave("refreshing"), this.trigger("refreshed")
  }, s.prototype.onThrottledResize = function () {
    t.clearTimeout(this.resizeTimer), this.resizeTimer = t.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate)
  }, s.prototype.onResize = function () {
    return !!this._items.length && (this._width !== this.$element.width() && (!!this.$element.is(":visible") && (this.enter("resizing"), this.trigger("resize").isDefaultPrevented() ? (this.leave("resizing"), !1) : (this.invalidate("width"), this.refresh(), this.leave("resizing"), void this.trigger("resized")))))
  }, s.prototype.registerEventHandlers = function () {
    $.support.transition && this.$stage.on($.support.transition.end + ".owl.core", $.proxy(this.onTransitionEnd, this)), this.settings.responsive !== !1 && this.on(t, "resize", this._handlers.onThrottledResize), this.settings.mouseDrag && (this.$element.addClass(this.options.dragClass), this.$stage.on("mousedown.owl.core", $.proxy(this.onDragStart, this)), this.$stage.on("dragstart.owl.core selectstart.owl.core", function () {
      return !1
    })), this.settings.touchDrag && (this.$stage.on("touchstart.owl.core", $.proxy(this.onDragStart, this)), this.$stage.on("touchcancel.owl.core", $.proxy(this.onDragEnd, this)))
  }, s.prototype.onDragStart = function (t) {
    var i = null;
    3 !== t.which && ($.support.transform ? (i = this.$stage.css("transform").replace(/.*\(|\)| /g, "").split(","), i = {
      x: i[16 === i.length ? 12 : 4],
      y: i[16 === i.length ? 13 : 5]
    }) : (i = this.$stage.position(), i = {
      x: this.settings.rtl ? i.left + this.$stage.width() - this.width() + this.settings.margin : i.left,
      y: i.top
    }), this.is("animating") && ($.support.transform ? this.animate(i.x) : this.$stage.stop(), this.invalidate("position")), this.$element.toggleClass(this.options.grabClass, "mousedown" === t.type), this.speed(0), this._drag.time = (new Date).getTime(), this._drag.target = $(t.target), this._drag.stage.start = i, this._drag.stage.current = i, this._drag.pointer = this.pointer(t), $(e).on("mouseup.owl.core touchend.owl.core", $.proxy(this.onDragEnd, this)), $(e).one("mousemove.owl.core touchmove.owl.core", $.proxy(function (t) {
      var i = this.difference(this._drag.pointer, this.pointer(t));
      $(e).on("mousemove.owl.core touchmove.owl.core", $.proxy(this.onDragMove, this)), Math.abs(i.x) < Math.abs(i.y) && this.is("valid") || (t.preventDefault(), this.enter("dragging"), this.trigger("drag"))
    }, this)))
  }, s.prototype.onDragMove = function (t) {
    var e = null,
      i = null,
      s = null,
      o = this.difference(this._drag.pointer, this.pointer(t)),
      n = this.difference(this._drag.stage.start, o);
    this.is("dragging") && (t.preventDefault(), this.settings.loop ? (e = this.coordinates(this.minimum()), i = this.coordinates(this.maximum() + 1) - e, n.x = ((n.x - e) % i + i) % i + e) : (e = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum()), i = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum()), s = this.settings.pullDrag ? -1 * o.x / 5 : 0, n.x = Math.max(Math.min(n.x, e + s), i + s)), this._drag.stage.current = n, this.animate(n.x))
  }, s.prototype.onDragEnd = function (t) {
    var i = this.difference(this._drag.pointer, this.pointer(t)),
      s = this._drag.stage.current,
      o = i.x > 0 ^ this.settings.rtl ? "left" : "right";
    $(e).off(".owl.core"), this.$element.removeClass(this.options.grabClass), (0 !== i.x && this.is("dragging") || !this.is("valid")) && (this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed), this.current(this.closest(s.x, 0 !== i.x ? o : this._drag.direction)), this.invalidate("position"), this.update(), this._drag.direction = o, (Math.abs(i.x) > 3 || (new Date).getTime() - this._drag.time > 300) && this._drag.target.one("click.owl.core", function () {
      return !1
    })), this.is("dragging") && (this.leave("dragging"), this.trigger("dragged"))
  }, s.prototype.closest = function (t, e) {
    var i = -1,
      s = 30,
      o = this.width(),
      n = this.coordinates();
    return this.settings.freeDrag || $.each(n, $.proxy(function (r, a) {
      return t > a - s && t < a + s ? i = r : this.op(t, "<", a) && this.op(t, ">", n[r + 1] || a - o) && (i = "left" === e ? r + 1 : r), i === -1
    }, this)), this.settings.loop || (this.op(t, ">", n[this.minimum()]) ? i = t = this.minimum() : this.op(t, "<", n[this.maximum()]) && (i = t = this.maximum())), i
  }, s.prototype.animate = function (t) {
    var e = this.speed() > 0;
    this.is("animating") && this.onTransitionEnd(), e && (this.enter("animating"), this.trigger("translate")), $.support.transform3d && $.support.transition ? this.$stage.css({
      transform: "translate3d(" + t + "px,0px,0px)",
      transition: this.speed() / 1e3 + "s"
    }) : e ? this.$stage.animate({
      left: t + "px"
    }, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this)) : this.$stage.css({
      left: t + "px"
    })
  }, s.prototype.is = function (t) {
    return this._states.current[t] && this._states.current[t] > 0
  }, s.prototype.current = function (t) {
    if (t === i) return this._current;
    if (0 === this._items.length) return i;
    if (t = this.normalize(t), this._current !== t) {
      var e = this.trigger("change", {
        property: {
          name: "position",
          value: t
        }
      });
      e.data !== i && (t = this.normalize(e.data)), this._current = t, this.invalidate("position"), this.trigger("changed", {
        property: {
          name: "position",
          value: this._current
        }
      })
    }
    return this._current
  }, s.prototype.invalidate = function (t) {
    return "string" === $.type(t) && (this._invalidated[t] = !0, this.is("valid") && this.leave("valid")), $.map(this._invalidated, function (t, e) {
      return e
    })
  }, s.prototype.reset = function (t) {
    t = this.normalize(t), t !== i && (this._speed = 0, this._current = t, this.suppress(["translate", "translated"]), this.animate(this.coordinates(t)), this.release(["translate", "translated"]))
  }, s.prototype.normalize = function (t, e) {
    var s = this._items.length,
      o = e ? 0 : this._clones.length;
    return !$.isNumeric(t) || s < 1 ? t = i : (t < 0 || t >= s + o) && (t = ((t - o / 2) % s + s) % s + o / 2), t
  }, s.prototype.relative = function (t) {
    return t -= this._clones.length / 2, this.normalize(t, !0)
  }, s.prototype.maximum = function (t) {
    var e = this.settings,
      i = this._coordinates.length,
      s = Math.abs(this._coordinates[i - 1]) - this._width,
      o = -1,
      n;
    if (e.loop) i = this._clones.length / 2 + this._items.length - 1;
    else if (e.autoWidth || e.merge)
      for (; i - o > 1;) Math.abs(this._coordinates[n = i + o >> 1]) < s ? o = n : i = n;
    else i = e.center ? this._items.length - 1 : this._items.length - e.items;
    return t && (i -= this._clones.length / 2), Math.max(i, 0)
  }, s.prototype.minimum = function (t) {
    return t ? 0 : this._clones.length / 2
  }, s.prototype.items = function (t) {
    return t === i ? this._items.slice() : (t = this.normalize(t, !0), this._items[t])
  }, s.prototype.mergers = function (t) {
    return t === i ? this._mergers.slice() : (t = this.normalize(t, !0), this._mergers[t])
  }, s.prototype.clones = function (t) {
    var e = this._clones.length / 2,
      s = e + this._items.length,
      o = function (t) {
        return t % 2 === 0 ? s + t / 2 : e - (t + 1) / 2
      };
    return t === i ? $.map(this._clones, function (t, e) {
      return o(e)
    }) : $.map(this._clones, function (e, i) {
      return e === t ? o(i) : null
    })
  }, s.prototype.speed = function (t) {
    return t !== i && (this._speed = t), this._speed
  }, s.prototype.coordinates = function (t) {
    var e = null;
    return t === i ? $.map(this._coordinates, $.proxy(function (t, e) {
      return this.coordinates(e)
    }, this)) : (this.settings.center ? (e = this._coordinates[t], e += (this.width() - e + (this._coordinates[t - 1] || 0)) / 2 * (this.settings.rtl ? -1 : 1)) : e = this._coordinates[t - 1] || 0, e)
  }, s.prototype.duration = function (t, e, i) {
    return Math.min(Math.max(Math.abs(e - t), 1), 6) * Math.abs(i || this.settings.smartSpeed)
  }, s.prototype.to = function (t, e) {
    var i = this.current(),
      s = null,
      o = t - this.relative(i),
      n = (o > 0) - (o < 0),
      r = this._items.length,
      a = this.minimum(),
      l = this.maximum();
    this.settings.loop ? (!this.settings.rewind && Math.abs(o) > r / 2 && (o += n * -1 * r), t = i + o, s = ((t - a) % r + r) % r + a, s !== t && s - o <= l && s - o > 0 && (i = s - o, t = s, this.reset(i))) : this.settings.rewind ? (l += 1, t = (t % l + l) % l) : t = Math.max(a, Math.min(l, t)), this.speed(this.duration(i, t, e)), this.current(t), this.$element.is(":visible") && this.update()
  }, s.prototype.next = function (t) {
    t = t || !1, this.to(this.relative(this.current()) + 1, t)
  }, s.prototype.prev = function (t) {
    t = t || !1, this.to(this.relative(this.current()) - 1, t)
  }, s.prototype.onTransitionEnd = function (t) {
    return (t === i || (t.stopPropagation(), (t.target || t.srcElement || t.originalTarget) === this.$stage.get(0))) && (this.leave("animating"), void this.trigger("translated"))
  }, s.prototype.viewport = function () {
    var i;
    if (this.options.responsiveBaseElement !== t) i = $(this.options.responsiveBaseElement).width();
    else if (t.innerWidth) i = t.innerWidth;
    else {
      if (!e.documentElement || !e.documentElement.clientWidth) throw "Can not detect viewport width.";
      i = e.documentElement.clientWidth
    }
    return i
  }, s.prototype.replace = function (t) {
    this.$stage.empty(), this._items = [], t && (t = t instanceof jQuery ? t : $(t)), this.settings.nestedItemSelector && (t = t.find("." + this.settings.nestedItemSelector)), t.filter(function () {
      return 1 === this.nodeType
    }).each($.proxy(function (t, e) {
      e = this.prepare(e), this.$stage.append(e), this._items.push(e), this._mergers.push(1 * e.find("[data-merge]").andSelf("[data-merge]").attr("data-merge") || 1)
    }, this)), this.reset($.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0), this.invalidate("items")
  }, s.prototype.add = function (t, e) {
    var s = this.relative(this._current);
    e = e === i ? this._items.length : this.normalize(e, !0), t = t instanceof jQuery ? t : $(t), this.trigger("add", {
      content: t,
      position: e
    }), t = this.prepare(t), 0 === this._items.length || e === this._items.length ? (0 === this._items.length && this.$stage.append(t), 0 !== this._items.length && this._items[e - 1].after(t), this._items.push(t), this._mergers.push(1 * t.find("[data-merge]").andSelf("[data-merge]").attr("data-merge") || 1)) : (this._items[e].before(t), this._items.splice(e, 0, t), this._mergers.splice(e, 0, 1 * t.find("[data-merge]").andSelf("[data-merge]").attr("data-merge") || 1)), this._items[s] && this.reset(this._items[s].index()), this.invalidate("items"), this.trigger("added", {
      content: t,
      position: e
    })
  }, s.prototype.remove = function (t) {
    t = this.normalize(t, !0), t !== i && (this.trigger("remove", {
      content: this._items[t],
      position: t
    }), this._items[t].remove(), this._items.splice(t, 1), this._mergers.splice(t, 1), this.invalidate("items"), this.trigger("removed", {
      content: null,
      position: t
    }))
  }, s.prototype.preloadAutoWidthImages = function (t) {
    t.each($.proxy(function (t, e) {
      this.enter("pre-loading"), e = $(e), $(new Image).one("load", $.proxy(function (t) {
        e.attr("src", t.target.src), e.css("opacity", 1), this.leave("pre-loading"), !this.is("pre-loading") && !this.is("initializing") && this.refresh()
      }, this)).attr("src", e.attr("src") || e.attr("data-src") || e.attr("data-src-retina"))
    }, this))
  }, s.prototype.destroy = function () {
    this.$element.off(".owl.core"), this.$stage.off(".owl.core"), $(e).off(".owl.core"), this.settings.responsive !== !1 && (t.clearTimeout(this.resizeTimer), this.off(t, "resize", this._handlers.onThrottledResize));
    for (var i in this._plugins) this._plugins[i].destroy();
    this.$stage.children(".cloned").remove(), this.$stage.unwrap(), this.$stage.children().contents().unwrap(), this.$stage.children().unwrap(), this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class", this.$element.attr("class").replace(new RegExp(this.options.responsiveClass + "-\\S+\\s", "g"), "")).removeData("owl.carousel")
  }, s.prototype.op = function (t, e, i) {
    var s = this.settings.rtl;
    switch (e) {
      case "<":
        return s ? t > i : t < i;
      case ">":
        return s ? t < i : t > i;
      case ">=":
        return s ? t <= i : t >= i;
      case "<=":
        return s ? t >= i : t <= i
    }
  }, s.prototype.on = function (t, e, i, s) {
    t.addEventListener ? t.addEventListener(e, i, s) : t.attachEvent && t.attachEvent("on" + e, i)
  }, s.prototype.off = function (t, e, i, s) {
    t.removeEventListener ? t.removeEventListener(e, i, s) : t.detachEvent && t.detachEvent("on" + e, i)
  }, s.prototype.trigger = function (t, e, i, o, n) {
    var r = {
        item: {
          count: this._items.length,
          index: this.current()
        }
      },
      a = $.camelCase($.grep(["on", t, i], function (t) {
        return t
      }).join("-").toLowerCase()),
      l = $.Event([t, "owl", i || "carousel"].join(".").toLowerCase(), $.extend({
        relatedTarget: this
      }, r, e));
    return this._supress[t] || ($.each(this._plugins, function (t, e) {
      e.onTrigger && e.onTrigger(l)
    }), this.register({
      type: s.Type.Event,
      name: t
    }), this.$element.trigger(l), this.settings && "function" == typeof this.settings[a] && this.settings[a].call(this, l)), l
  }, s.prototype.enter = function (t) {
    $.each([t].concat(this._states.tags[t] || []), $.proxy(function (t, e) {
      this._states.current[e] === i && (this._states.current[e] = 0), this._states.current[e]++
    }, this))
  }, s.prototype.leave = function (t) {
    $.each([t].concat(this._states.tags[t] || []), $.proxy(function (t, e) {
      this._states.current[e]--
    }, this))
  }, s.prototype.register = function (t) {
    if (t.type === s.Type.Event) {
      if ($.event.special[t.name] || ($.event.special[t.name] = {}), !$.event.special[t.name].owl) {
        var e = $.event.special[t.name]._default;
        $.event.special[t.name]._default = function (t) {
          return !e || !e.apply || t.namespace && t.namespace.indexOf("owl") !== -1 ? t.namespace && t.namespace.indexOf("owl") > -1 : e.apply(this, arguments)
        }, $.event.special[t.name].owl = !0
      }
    } else t.type === s.Type.State && (this._states.tags[t.name] ? this._states.tags[t.name] = this._states.tags[t.name].concat(t.tags) : this._states.tags[t.name] = t.tags, this._states.tags[t.name] = $.grep(this._states.tags[t.name], $.proxy(function (e, i) {
      return $.inArray(e, this._states.tags[t.name]) === i
    }, this)))
  }, s.prototype.suppress = function (t) {
    $.each(t, $.proxy(function (t, e) {
      this._supress[e] = !0
    }, this))
  }, s.prototype.release = function (t) {
    $.each(t, $.proxy(function (t, e) {
      delete this._supress[e]
    }, this))
  }, s.prototype.pointer = function (e) {
    var i = {
      x: null,
      y: null
    };
    return e = e.originalEvent || e || t.event, e = e.touches && e.touches.length ? e.touches[0] : e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, e.pageX ? (i.x = e.pageX, i.y = e.pageY) : (i.x = e.clientX, i.y = e.clientY), i
  }, s.prototype.difference = function (t, e) {
    return {
      x: t.x - e.x,
      y: t.y - e.y
    }
  }, $.fn.owlCarousel = function (t) {
    var e = Array.prototype.slice.call(arguments, 1);
    return this.each(function () {
      var i = $(this),
        o = i.data("owl.carousel");
      o || (o = new s(this, "object" == typeof t && t), i.data("owl.carousel", o), $.each(["next", "prev", "to", "destroy", "refresh", "replace", "add", "remove"], function (t, e) {
        o.register({
          type: s.Type.Event,
          name: e
        }), o.$element.on(e + ".owl.carousel.core", $.proxy(function (t) {
          t.namespace && t.relatedTarget !== this && (this.suppress([e]), o[e].apply(this, [].slice.call(arguments, 1)), this.release([e]))
        }, o))
      })), "string" == typeof t && "_" !== t.charAt(0) && o[t].apply(o, e)
    })
  }, $.fn.owlCarousel.Constructor = s
}(window.Zepto || window.jQuery, window, document),
  function ($, t, e, i) {
    var s = function (t) {
      this._core = t, this._interval = null, this._visible = null, this._handlers = {
        "initialized.owl.carousel": $.proxy(function (t) {
          t.namespace && this._core.settings.autoRefresh && this.watch()
        }, this)
      }, this._core.options = $.extend({}, s.Defaults, this._core.options), this._core.$element.on(this._handlers)
    };
    s.Defaults = {
      autoRefresh: !0,
      autoRefreshInterval: 500
    }, s.prototype.watch = function () {
      this._interval || (this._visible = this._core.$element.is(":visible"), this._interval = t.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval))
    }, s.prototype.refresh = function () {
      this._core.$element.is(":visible") !== this._visible && (this._visible = !this._visible, this._core.$element.toggleClass("owl-hidden", !this._visible), this._visible && this._core.invalidate("width") && this._core.refresh())
    }, s.prototype.destroy = function () {
      var e, i;
      t.clearInterval(this._interval);
      for (e in this._handlers) this._core.$element.off(e, this._handlers[e]);
      for (i in Object.getOwnPropertyNames(this)) "function" != typeof this[i] && (this[i] = null)
    }, $.fn.owlCarousel.Constructor.Plugins.AutoRefresh = s
  }(window.Zepto || window.jQuery, window, document),
  function ($, t, e, i) {
    var s = function (t) {
      this._core = t, this._loaded = [], this._handlers = {
        "initialized.owl.carousel change.owl.carousel": $.proxy(function (t) {
          if (t.namespace && this._core.settings && this._core.settings.lazyLoad && (t.property && "position" == t.property.name || "initialized" == t.type))
            for (var e = this._core.settings, i = e.center && Math.ceil(e.items / 2) || e.items, s = e.center && i * -1 || 0, o = (t.property && t.property.value || this._core.current()) + s, n = this._core.clones().length, r = $.proxy(function (t, e) {
              this.load(e)
            }, this); s++ < i;) this.load(n / 2 + this._core.relative(o)), n && $.each(this._core.clones(this._core.relative(o)), r), o++
        }, this)
      }, this._core.options = $.extend({}, s.Defaults, this._core.options), this._core.$element.on(this._handlers)
    };
    s.Defaults = {
      lazyLoad: !1
    }, s.prototype.load = function (e) {
      var i = this._core.$stage.children().eq(e),
        s = i && i.find(".owl-lazy");
      !s || $.inArray(i.get(0), this._loaded) > -1 || (s.each($.proxy(function (e, i) {
        var s = $(i),
          o, n = t.devicePixelRatio > 1 && s.attr("data-src-retina") || s.attr("data-src");
        this._core.trigger("load", {
          element: s,
          url: n
        }, "lazy"), s.is("img") ? s.one("load.owl.lazy", $.proxy(function () {
          s.css("opacity", 1), this._core.trigger("loaded", {
            element: s,
            url: n
          }, "lazy")
        }, this)).attr("src", n) : (o = new Image, o.onload = $.proxy(function () {
          s.css({
            "background-image": "url(" + n + ")",
            opacity: "1"
          }), this._core.trigger("loaded", {
            element: s,
            url: n
          }, "lazy")
        }, this), o.src = n)
      }, this)), this._loaded.push(i.get(0)))
    }, s.prototype.destroy = function () {
      var t, e;
      for (t in this.handlers) this._core.$element.off(t, this.handlers[t]);
      for (e in Object.getOwnPropertyNames(this)) "function" != typeof this[e] && (this[e] = null)
    }, $.fn.owlCarousel.Constructor.Plugins.Lazy = s
  }(window.Zepto || window.jQuery, window, document),
  function ($, t, e, i) {
    var s = function (t) {
      this._core = t, this._handlers = {
        "initialized.owl.carousel refreshed.owl.carousel": $.proxy(function (t) {
          t.namespace && this._core.settings.autoHeight && this.update()
        }, this),
        "changed.owl.carousel": $.proxy(function (t) {
          t.namespace && this._core.settings.autoHeight && "position" == t.property.name && this.update()
        }, this),
        "loaded.owl.lazy": $.proxy(function (t) {
          t.namespace && this._core.settings.autoHeight && t.element.closest("." + this._core.settings.itemClass).index() === this._core.current() && this.update()
        }, this)
      }, this._core.options = $.extend({}, s.Defaults, this._core.options), this._core.$element.on(this._handlers)
    };
    s.Defaults = {
      autoHeight: !1,
      autoHeightClass: "owl-height"
    }, s.prototype.update = function () {
      var t = this._core._current,
        e = t + this._core.settings.items,
        i = this._core.$stage.children().toArray().slice(t, e);
      heights = [], maxheight = 0, $.each(i, function (t, e) {
        heights.push($(e).height())
      }), maxheight = Math.max.apply(null, heights), this._core.$stage.parent().height(maxheight).addClass(this._core.settings.autoHeightClass)
    }, s.prototype.destroy = function () {
      var t, e;
      for (t in this._handlers) this._core.$element.off(t, this._handlers[t]);
      for (e in Object.getOwnPropertyNames(this)) "function" != typeof this[e] && (this[e] = null)
    }, $.fn.owlCarousel.Constructor.Plugins.AutoHeight = s
  }(window.Zepto || window.jQuery, window, document),
  function ($, t, e, i) {
    var s = function (t) {
      this._core = t, this._videos = {}, this._playing = null, this._handlers = {
        "initialized.owl.carousel": $.proxy(function (t) {
          t.namespace && this._core.register({
            type: "state",
            name: "playing",
            tags: ["interacting"]
          })
        }, this),
        "resize.owl.carousel": $.proxy(function (t) {
          t.namespace && this._core.settings.video && this.isInFullScreen() && t.preventDefault()
        }, this),
        "refreshed.owl.carousel": $.proxy(function (t) {
          t.namespace && this._core.is("resizing") && this._core.$stage.find(".cloned .owl-video-frame").remove()
        }, this),
        "changed.owl.carousel": $.proxy(function (t) {
          t.namespace && "position" === t.property.name && this._playing && this.stop()
        }, this),
        "prepared.owl.carousel": $.proxy(function (t) {
          if (t.namespace) {
            var e = $(t.content).find(".owl-video");
            e.length && (e.css("display", "none"), this.fetch(e, $(t.content)))
          }
        }, this)
      }, this._core.options = $.extend({}, s.Defaults, this._core.options), this._core.$element.on(this._handlers), this._core.$element.on("click.owl.video", ".owl-video-play-icon", $.proxy(function (t) {
        this.play(t)
      }, this))
    };
    s.Defaults = {
      video: !1,
      videoHeight: !1,
      videoWidth: !1
    }, s.prototype.fetch = function (t, e) {
      var i = t.attr("data-vimeo-id") ? "vimeo" : "youtube",
        s = t.attr("data-vimeo-id") || t.attr("data-youtube-id"),
        o = t.attr("data-width") || this._core.settings.videoWidth,
        n = t.attr("data-height") || this._core.settings.videoHeight,
        r = t.attr("href");
      if (!r) throw new Error("Missing video URL.");
      if (s = r.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/), s[3].indexOf("youtu") > -1) i = "youtube";
      else {
        if (!(s[3].indexOf("vimeo") > -1)) throw new Error("Video URL not supported.");
        i = "vimeo"
      }
      s = s[6], this._videos[r] = {
        type: i,
        id: s,
        width: o,
        height: n
      }, e.attr("data-video", r), this.thumbnail(t, this._videos[r])
    }, s.prototype.thumbnail = function (t, e) {
      var i, s, o, n = e.width && e.height ? 'style="width:' + e.width + "px;height:" + e.height + 'px;"' : "",
        r = t.find("img"),
        a = "src",
        l = "",
        h = this._core.settings,
        c = function (e) {
          s = '<div class="owl-video-play-icon"></div>', i = h.lazyLoad ? '<div class="owl-video-tn ' + l + '" ' + a + '="' + e + '"></div>' : '<div class="owl-video-tn" style="opacity:1;background-image:url(' + e + ')"></div>', t.after(i), t.after(s)
        };
      return t.wrap('<div class="owl-video-wrapper"' + n + "></div>"), this._core.settings.lazyLoad && (a = "data-src", l = "owl-lazy"), r.length ? (c(r.attr(a)), r.remove(), !1) : void ("youtube" === e.type ? (o = "http://img.youtube.com/vi/" + e.id + "/hqdefault.jpg", c(o)) : "vimeo" === e.type && $.ajax({
        type: "GET",
        url: "http://vimeo.com/api/v2/video/" + e.id + ".json",
        jsonp: "callback",
        dataType: "jsonp",
        success: function (t) {
          o = t[0].thumbnail_large, c(o)
        }
      }))
    }, s.prototype.stop = function () {
      this._core.trigger("stop", null, "video"), this._playing.find(".owl-video-frame").remove(), this._playing.removeClass("owl-video-playing"), this._playing = null, this._core.leave("playing"), this._core.trigger("stopped", null, "video")
    }, s.prototype.play = function (t) {
      var e = $(t.target),
        i = e.closest("." + this._core.settings.itemClass),
        s = this._videos[i.attr("data-video")],
        o = s.width || "100%",
        n = s.height || this._core.$stage.height(),
        r;
      this._playing || (this._core.enter("playing"), this._core.trigger("play", null, "video"), i = this._core.items(this._core.relative(i.index())), this._core.reset(i.index()), "youtube" === s.type ? r = '<iframe width="' + o + '" height="' + n + '" src="http://www.youtube.com/embed/' + s.id + "?autoplay=1&v=" + s.id + '" frameborder="0" allowfullscreen></iframe>' : "vimeo" === s.type && (r = '<iframe src="http://player.vimeo.com/video/' + s.id + '?autoplay=1" width="' + o + '" height="' + n + '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'), $('<div class="owl-video-frame">' + r + "</div>").insertAfter(i.find(".owl-video")), this._playing = i.addClass("owl-video-playing"))
    }, s.prototype.isInFullScreen = function () {
      var t = e.fullscreenElement || e.mozFullScreenElement || e.webkitFullscreenElement;
      return t && $(t).parent().hasClass("owl-video-frame")
    }, s.prototype.destroy = function () {
      var t, e;
      this._core.$element.off("click.owl.video");
      for (t in this._handlers) this._core.$element.off(t, this._handlers[t]);
      for (e in Object.getOwnPropertyNames(this)) "function" != typeof this[e] && (this[e] = null)
    }, $.fn.owlCarousel.Constructor.Plugins.Video = s
  }(window.Zepto || window.jQuery, window, document),
  function ($, t, e, i) {
    var s = function (t) {
      this.core = t, this.core.options = $.extend({}, s.Defaults, this.core.options), this.swapping = !0, this.previous = i, this.next = i, this.handlers = {
        "change.owl.carousel": $.proxy(function (t) {
          t.namespace && "position" == t.property.name && (this.previous = this.core.current(), this.next = t.property.value)
        }, this),
        "drag.owl.carousel dragged.owl.carousel translated.owl.carousel": $.proxy(function (t) {
          t.namespace && (this.swapping = "translated" == t.type)
        }, this),
        "translate.owl.carousel": $.proxy(function (t) {
          t.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn) && this.swap()
        }, this)
      }, this.core.$element.on(this.handlers)
    };
    s.Defaults = {
      animateOut: !1,
      animateIn: !1
    }, s.prototype.swap = function () {
      if (1 === this.core.settings.items && $.support.animation && $.support.transition) {
        this.core.speed(0);
        var t, e = $.proxy(this.clear, this),
          i = this.core.$stage.children().eq(this.previous),
          s = this.core.$stage.children().eq(this.next),
          o = this.core.settings.animateIn,
          n = this.core.settings.animateOut;
        this.core.current() !== this.previous && (n && (t = this.core.coordinates(this.previous) - this.core.coordinates(this.next), i.one($.support.animation.end, e).css({
          left: t + "px"
        }).addClass("animated owl-animated-out").addClass(n)), o && s.one($.support.animation.end, e).addClass("animated owl-animated-in").addClass(o))
      }
    }, s.prototype.clear = function (t) {
      $(t.target).css({
        left: ""
      }).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut), this.core.onTransitionEnd()
    }, s.prototype.destroy = function () {
      var t, e;
      for (t in this.handlers) this.core.$element.off(t, this.handlers[t]);
      for (e in Object.getOwnPropertyNames(this)) "function" != typeof this[e] && (this[e] = null)
    }, $.fn.owlCarousel.Constructor.Plugins.Animate = s
  }(window.Zepto || window.jQuery, window, document),
  function ($, t, e, i) {
    var s = function (t) {
      this._core = t, this._interval = null, this._paused = !1, this._handlers = {
        "changed.owl.carousel": $.proxy(function (t) {
          t.namespace && "settings" === t.property.name && (this._core.settings.autoplay ? this.play() : this.stop())
        }, this),
        "initialized.owl.carousel": $.proxy(function (t) {
          t.namespace && this._core.settings.autoplay && this.play()
        }, this),
        "play.owl.autoplay": $.proxy(function (t, e, i) {
          t.namespace && this.play(e, i)
        }, this),
        "stop.owl.autoplay": $.proxy(function (t) {
          t.namespace && this.stop()
        }, this),
        "mouseover.owl.autoplay": $.proxy(function () {
          this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause()
        }, this),
        "mouseleave.owl.autoplay": $.proxy(function () {
          this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.play()
        }, this)
      }, this._core.$element.on(this._handlers), this._core.options = $.extend({}, s.Defaults, this._core.options)
    };
    s.Defaults = {
      autoplay: !1,
      autoplayTimeout: 5e3,
      autoplayHoverPause: !1,
      autoplaySpeed: !1
    }, s.prototype.play = function (i, s) {
      this._paused = !1, this._core.is("rotating") || (this._core.enter("rotating"), this._interval = t.setInterval($.proxy(function () {
        this._paused || this._core.is("busy") || this._core.is("interacting") || e.hidden || this._core.next(s || this._core.settings.autoplaySpeed)
      }, this), i || this._core.settings.autoplayTimeout))
    }, s.prototype.stop = function () {
      this._core.is("rotating") && (t.clearInterval(this._interval), this._core.leave("rotating"))
    }, s.prototype.pause = function () {
      this._core.is("rotating") && (this._paused = !0)
    }, s.prototype.destroy = function () {
      var t, e;
      this.stop();
      for (t in this._handlers) this._core.$element.off(t, this._handlers[t]);
      for (e in Object.getOwnPropertyNames(this)) "function" != typeof this[e] && (this[e] = null)
    }, $.fn.owlCarousel.Constructor.Plugins.autoplay = s
  }(window.Zepto || window.jQuery, window, document),
  function ($, t, e, i) {
    "use strict";
    var s = function (t) {
      this._core = t, this._initialized = !1, this._pages = [], this._controls = {}, this._templates = [], this.$element = this._core.$element, this._overrides = {
        next: this._core.next,
        prev: this._core.prev,
        to: this._core.to
      }, this._handlers = {
        "prepared.owl.carousel": $.proxy(function (t) {
          t.namespace && this._core.settings.dotsData && this._templates.push('<div class="' + this._core.settings.dotClass + '">' + $(t.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot") + "</div>")
        }, this),
        "added.owl.carousel": $.proxy(function (t) {
          t.namespace && this._core.settings.dotsData && this._templates.splice(t.position, 0, this._templates.pop())
        }, this),
        "remove.owl.carousel": $.proxy(function (t) {
          t.namespace && this._core.settings.dotsData && this._templates.splice(t.position, 1)
        }, this),
        "changed.owl.carousel": $.proxy(function (t) {
          t.namespace && "position" == t.property.name && this.draw()
        }, this),
        "initialized.owl.carousel": $.proxy(function (t) {
          t.namespace && !this._initialized && (this._core.trigger("initialize", null, "navigation"), this.initialize(), this.update(), this.draw(), this._initialized = !0, this._core.trigger("initialized", null, "navigation"))
        }, this),
        "refreshed.owl.carousel": $.proxy(function (t) {
          t.namespace && this._initialized && (this._core.trigger("refresh", null, "navigation"), this.update(), this.draw(), this._core.trigger("refreshed", null, "navigation"))
        }, this)
      }, this._core.options = $.extend({}, s.Defaults, this._core.options), this.$element.on(this._handlers)
    };
    s.Defaults = {
      nav: !1,
      navText: ["prev", "next"],
      navSpeed: !1,
      navElement: "div",
      navContainer: !1,
      navContainerClass: "owl-nav",
      navClass: ["owl-prev", "owl-next"],
      slideBy: 1,
      dotClass: "owl-dot",
      dotsClass: "owl-dots",
      dots: !0,
      dotsEach: !1,
      dotsData: !1,
      dotsSpeed: !1,
      dotsContainer: !1
    }, s.prototype.initialize = function () {
      var t, e = this._core.settings;
      this._controls.$relative = (e.navContainer ? $(e.navContainer) : $("<div>").addClass(e.navContainerClass).appendTo(this.$element)).addClass("disabled"), this._controls.$previous = $("<" + e.navElement + ">").addClass(e.navClass[0]).html(e.navText[0]).prependTo(this._controls.$relative).on("click", $.proxy(function (t) {
        this.prev(e.navSpeed)
      }, this)), this._controls.$next = $("<" + e.navElement + ">").addClass(e.navClass[1]).html(e.navText[1]).appendTo(this._controls.$relative).on("click", $.proxy(function (t) {
        this.next(e.navSpeed)
      }, this)), e.dotsData || (this._templates = [$("<div>").addClass(e.dotClass).append($("<span>")).prop("outerHTML")]), this._controls.$absolute = (e.dotsContainer ? $(e.dotsContainer) : $("<div>").addClass(e.dotsClass).appendTo(this.$element)).addClass("disabled"), this._controls.$absolute.on("click", "div", $.proxy(function (t) {
        var i = $(t.target).parent().is(this._controls.$absolute) ? $(t.target).index() : $(t.target).parent().index();
        t.preventDefault(), this.to(i, e.dotsSpeed)
      }, this));
      for (t in this._overrides) this._core[t] = $.proxy(this[t], this)
    }, s.prototype.destroy = function () {
      var t, e, i, s;
      for (t in this._handlers) this.$element.off(t, this._handlers[t]);
      for (e in this._controls) this._controls[e].remove();
      for (s in this.overides) this._core[s] = this._overrides[s];
      for (i in Object.getOwnPropertyNames(this)) "function" != typeof this[i] && (this[i] = null)
    }, s.prototype.update = function () {
      var t, e, i, s = this._core.clones().length / 2,
        o = s + this._core.items().length,
        n = this._core.maximum(!0),
        r = this._core.settings,
        a = r.center || r.autoWidth || r.dotsData ? 1 : r.dotsEach || r.items;
      if ("page" !== r.slideBy && (r.slideBy = Math.min(r.slideBy, r.items)), r.dots || "page" == r.slideBy)
        for (this._pages = [], t = s, e = 0, i = 0; t < o; t++) {
          if (e >= a || 0 === e) {
            if (this._pages.push({
              start: Math.min(n, t - s),
              end: t - s + a - 1
            }), Math.min(n, t - s) === n) break;
            e = 0, ++i
          }
          e += this._core.mergers(this._core.relative(t))
        }
    }, s.prototype.draw = function () {
      var t, e = this._core.settings,
        i = this._core.items().length <= e.items,
        s = this._core.relative(this._core.current()),
        o = e.loop || e.rewind;
      this._controls.$relative.toggleClass("disabled", !e.nav || i), e.nav && (this._controls.$previous.toggleClass("disabled", !o && s <= this._core.minimum(!0)), this._controls.$next.toggleClass("disabled", !o && s >= this._core.maximum(!0))), this._controls.$absolute.toggleClass("disabled", !e.dots || i), e.dots && (t = this._pages.length - this._controls.$absolute.children().length, e.dotsData && 0 !== t ? this._controls.$absolute.html(this._templates.join("")) : t > 0 ? this._controls.$absolute.append(new Array(t + 1).join(this._templates[0])) : t < 0 && this._controls.$absolute.children().slice(t).remove(), this._controls.$absolute.find(".active").removeClass("active"), this._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass("active"))
    }, s.prototype.onTrigger = function (t) {
      var e = this._core.settings;
      t.page = {
        index: $.inArray(this.current(), this._pages),
        count: this._pages.length,
        size: e && (e.center || e.autoWidth || e.dotsData ? 1 : e.dotsEach || e.items)
      }
    }, s.prototype.current = function () {
      var t = this._core.relative(this._core.current());
      return $.grep(this._pages, $.proxy(function (e, i) {
        return e.start <= t && e.end >= t
      }, this)).pop()
    }, s.prototype.getPosition = function (t) {
      var e, i, s = this._core.settings;
      return "page" == s.slideBy ? (e = $.inArray(this.current(), this._pages), i = this._pages.length, t ? ++e : --e, e = this._pages[(e % i + i) % i].start) : (e = this._core.relative(this._core.current()), i = this._core.items().length, t ? e += s.slideBy : e -= s.slideBy), e
    }, s.prototype.next = function (t) {
      $.proxy(this._overrides.to, this._core)(this.getPosition(!0), t)
    }, s.prototype.prev = function (t) {
      $.proxy(this._overrides.to, this._core)(this.getPosition(!1), t)
    }, s.prototype.to = function (t, e, i) {
      var s;
      i ? $.proxy(this._overrides.to, this._core)(t, e) : (s = this._pages.length, $.proxy(this._overrides.to, this._core)(this._pages[(t % s + s) % s].start, e))
    }, $.fn.owlCarousel.Constructor.Plugins.Navigation = s
  }(window.Zepto || window.jQuery, window, document),
  function ($, t, e, i) {
    "use strict";
    var s = function (e) {
      this._core = e, this._hashes = {}, this.$element = this._core.$element, this._handlers = {
        "initialized.owl.carousel": $.proxy(function (e) {
          e.namespace && "URLHash" === this._core.settings.startPosition && $(t).trigger("hashchange.owl.navigation")
        }, this),
        "prepared.owl.carousel": $.proxy(function (t) {
          if (t.namespace) {
            var e = $(t.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");
            if (!e) return;
            this._hashes[e] = t.content
          }
        }, this),
        "changed.owl.carousel": $.proxy(function (e) {
          if (e.namespace && "position" === e.property.name) {
            var i = this._core.items(this._core.relative(this._core.current())),
              s = $.map(this._hashes, function (t, e) {
                return t === i ? e : null
              }).join();
            if (!s || t.location.hash.slice(1) === s) return;
            t.location.hash = s
          }
        }, this)
      }, this._core.options = $.extend({}, s.Defaults, this._core.options), this.$element.on(this._handlers), $(t).on("hashchange.owl.navigation", $.proxy(function (e) {
        var s = t.location.hash.substring(1),
          o = this._core.$stage.children(),
          n = this._hashes[s] && o.index(this._hashes[s]);
        n !== i && n !== this._core.current() && this._core.to(this._core.relative(n), !1, !0)
      }, this))
    };
    s.Defaults = {
      URLhashListener: !1
    }, s.prototype.destroy = function () {
      var e, i;
      $(t).off("hashchange.owl.navigation");
      for (e in this._handlers) this._core.$element.off(e, this._handlers[e]);
      for (i in Object.getOwnPropertyNames(this)) "function" != typeof this[i] && (this[i] = null)
    }, $.fn.owlCarousel.Constructor.Plugins.Hash = s
  }(window.Zepto || window.jQuery, window, document),
  function ($, t, e, i) {
    function s(t, e) {
      var s = !1,
        o = t.charAt(0).toUpperCase() + t.slice(1);
      return $.each((t + " " + r.join(o + " ") + o).split(" "), function (t, o) {
        if (n[o] !== i) return s = !e || o, !1
      }), s
    }

    function o(t) {
      return s(t, !0)
    }

    var n = $("<support>").get(0).style,
      r = "Webkit Moz O ms".split(" "),
      a = {
        transition: {
          end: {
            WebkitTransition: "webkitTransitionEnd",
            MozTransition: "transitionend",
            OTransition: "oTransitionEnd",
            transition: "transitionend"
          }
        },
        animation: {
          end: {
            WebkitAnimation: "webkitAnimationEnd",
            MozAnimation: "animationend",
            OAnimation: "oAnimationEnd",
            animation: "animationend"
          }
        }
      },
      l = {
        csstransforms: function () {
          return !!s("transform")
        },
        csstransforms3d: function () {
          return !!s("perspective")
        },
        csstransitions: function () {
          return !!s("transition")
        },
        cssanimations: function () {
          return !!s("animation")
        }
      };
    l.csstransitions() && ($.support.transition = new String(o("transition")), $.support.transition.end = a.transition.end[$.support.transition]), l.cssanimations() && ($.support.animation = new String(o("animation")), $.support.animation.end = a.animation.end[$.support.animation]), l.csstransforms() && ($.support.transform = new String(o("transform")), $.support.transform3d = l.csstransforms3d())
  }(window.Zepto || window.jQuery, window, document),
  function ($) {
    $.fn.imagefill = function (t) {
      function e() {
        n = 0, r = 0, s.each(function () {
          o = $(this).find(l.target).width() / $(this).find(l.target).height();
          var t = $(this).outerWidth(),
            e = $(this).outerHeight();
          n += $(this).outerHeight(), r += $(this).outerWidth();
          var i = t / e;
          i < o ? $(this).find(l.target).css({
            width: "auto",
            height: e,
            top: 0,
            left: -(e * o - t) / 2
          }) : $(this).find(l.target).css({
            width: t,
            height: "auto",
            top: -(t / o - e) / 2,
            left: 0
          })
        })
      }

      function i() {
        var t = 0,
          o = 0;
        s.each(function () {
          o += $(this).outerHeight(), t += $(this).outerWidth()
        }), n === o && r === t || e(), setTimeout(i, l.throttle)
      }

      var s = this,
        o = 1,
        n = 0,
        r = 0,
        a = {
          runOnce: !1,
          target: "img",
          throttle: 200
        },
        l = $.extend({}, a, t),
        h = s.find(l.target).addClass("loading").css({
          position: "absolute"
        }),
        c = s.css("position");
      return s.css({
        overflow: "hidden",
        position: "static" === c ? "relative" : c
      }), s.each(function () {
        n += $(this).outerHeight(), r += $(this).outerWidth()
      }), s.imagesLoaded().done(function (t) {
        o = h.width() / h.height(), h.removeClass("loading"), e(), l.runOnce || i()
      }), this
    }
  }(jQuery),
  function (t, e) {
    var i = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
    t.fn.imagesLoaded = function (s) {
      function o() {
        var e = t(d),
          i = t(p);
        a && (p.length ? a.reject(h, e, i) : a.resolve(h)), t.isFunction(s) && s.call(r, h, e, i)
      }

      function n(e, s) {
        e.src === i || -1 !== t.inArray(e, c) || (c.push(e), s ? p.push(e) : d.push(e), t.data(e, "imagesLoaded", {
          isBroken: s,
          src: e.src
        }), l && a.notifyWith(t(e), [s, h, t(d), t(p)]), h.length === c.length && (setTimeout(o), h.unbind(".imagesLoaded")))
      }

      var r = this,
        a = t.isFunction(t.Deferred) ? t.Deferred() : 0,
        l = t.isFunction(a.notify),
        h = r.find("img").add(r.filter("img")),
        c = [],
        d = [],
        p = [];
      return t.isPlainObject(s) && t.each(s, function (t, e) {
        "callback" === t ? s = e : a && a[t](e)
      }), h.length ? h.bind("load.imagesLoaded error.imagesLoaded", function (t) {
        n(t.target, "error" === t.type)
      }).each(function (s, o) {
        var r = o.src,
          a = t.data(o, "imagesLoaded");
        a && a.src === r ? n(o, a.isBroken) : o.complete && o.naturalWidth !== e ? n(o, 0 === o.naturalWidth || 0 === o.naturalHeight) : (o.readyState || o.complete) && (o.src = i, o.src = r)
      }) : o(), a ? a.promise(r) : r
    }
  }(jQuery),
  function ($, t, e) {
    function i(t, e) {
      this.bodyOverflowX, this.callbacks = {
        hide: [],
        show: []
      }, this.checkInterval = null, this.Content, this.$el = $(t), this.$elProxy, this.elProxyPosition, this.enabled = !0, this.options = $.extend({}, a, e), this.mouseIsOverProxy = !1, this.namespace = "tooltipster-" + Math.round(1e5 * Math.random()), this.Status = "hidden", this.timerHide = null, this.timerShow = null, this.$tooltip, this.options.iconTheme = this.options.iconTheme.replace(".", ""), this.options.theme = this.options.theme.replace(".", ""), this._init()
    }

    function s(t, e) {
      var i = !0;
      return $.each(t, function (s, o) {
        if ("undefined" == typeof e[s] || t[s] !== e[s]) return i = !1, !1
      }), i
    }

    function o() {
      return !h && l
    }

    function n() {
      var t = e.body || e.documentElement,
        i = t.style,
        s = "transition";
      if ("string" == typeof i[s]) return !0;
      v = ["Moz", "Webkit", "Khtml", "O", "ms"], s = s.charAt(0).toUpperCase() + s.substr(1);
      for (var o = 0; o < v.length; o++)
        if ("string" == typeof i[v[o] + s]) return !0;
      return !1
    }

    var r = "tooltipster",
      a = {
        animation: "fade",
        arrow: !0,
        arrowColor: "",
        autoClose: !0,
        content: null,
        contentAsHTML: !1,
        contentCloning: !0,
        debug: !0,
        delay: 200,
        minWidth: 0,
        maxWidth: null,
        functionInit: function (t, e) {
        },
        functionBefore: function (t, e) {
          e()
        },
        functionReady: function (t, e) {
        },
        functionAfter: function (t) {
        },
        hideOnClick: !1,
        icon: "(?)",
        iconCloning: !0,
        iconDesktop: !1,
        iconTouch: !1,
        iconTheme: "tooltipster-icon",
        interactive: !1,
        interactiveTolerance: 350,
        multiple: !1,
        offsetX: 0,
        offsetY: 0,
        onlyOne: !1,
        position: "top",
        positionTracker: !1,
        positionTrackerCallback: function (t) {
          "hover" == this.option("trigger") && this.option("autoClose") && this.hide()
        },
        restoration: "current",
        speed: 350,
        timer: 0,
        theme: "tooltipster-default",
        touchDevices: !0,
        trigger: "hover",
        updateAnimation: !0
      };
    i.prototype = {
      _init: function () {
        var t = this;
        if (e.querySelector) {
          var i = null;
          void 0 === t.$el.data("tooltipster-initialTitle") && (i = t.$el.attr("title"), void 0 === i && (i = null), t.$el.data("tooltipster-initialTitle", i)), null !== t.options.content ? t._content_set(t.options.content) : t._content_set(i);
          var s = t.options.functionInit.call(t.$el, t.$el, t.Content);
          "undefined" != typeof s && t._content_set(s), t.$el.removeAttr("title").addClass("tooltipstered"), !l && t.options.iconDesktop || l && t.options.iconTouch ? ("string" == typeof t.options.icon ? (t.$elProxy = $('<span class="' + t.options.iconTheme + '"></span>'), t.$elProxy.text(t.options.icon)) : t.options.iconCloning ? t.$elProxy = t.options.icon.clone(!0) : t.$elProxy = t.options.icon, t.$elProxy.insertAfter(t.$el)) : t.$elProxy = t.$el, "hover" == t.options.trigger ? (t.$elProxy.on("mouseenter." + t.namespace, function () {
            o() && !t.options.touchDevices || (t.mouseIsOverProxy = !0, t._show())
          }).on("mouseleave." + t.namespace, function () {
            o() && !t.options.touchDevices || (t.mouseIsOverProxy = !1)
          }), l && t.options.touchDevices && t.$elProxy.on("touchstart." + t.namespace, function () {
            t._showNow()
          })) : "click" == t.options.trigger && t.$elProxy.on("click." + t.namespace, function () {
            o() && !t.options.touchDevices || t._show()
          })
        }
      },
      _show: function () {
        var t = this;
        "shown" != t.Status && "appearing" != t.Status && (t.options.delay ? t.timerShow = setTimeout(function () {
          ("click" == t.options.trigger || "hover" == t.options.trigger && t.mouseIsOverProxy) && t._showNow()
        }, t.options.delay) : t._showNow())
      },
      _showNow: function (e) {
        var i = this;
        i.options.functionBefore.call(i.$el, i.$el, function () {
          if (i.enabled && null !== i.Content) {
            e && i.callbacks.show.push(e), i.callbacks.hide = [], clearTimeout(i.timerShow), i.timerShow = null, clearTimeout(i.timerHide), i.timerHide = null, i.options.onlyOne && $(".tooltipstered").not(i.$el).each(function (t, e) {
              var i = $(e),
                s = i.data("tooltipster-ns");
              $.each(s, function (t, e) {
                var s = i.data(e),
                  o = s.status(),
                  n = s.option("autoClose");
                "hidden" !== o && "disappearing" !== o && n && s.hide()
              })
            });
            var s = function () {
              i.Status = "shown", $.each(i.callbacks.show, function (t, e) {
                e.call(i.$el)
              }), i.callbacks.show = []
            };
            if ("hidden" !== i.Status) {
              var o = 0;
              "disappearing" === i.Status ? (i.Status = "appearing", n() ? (i.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-" + i.options.animation + "-show"), i.options.speed > 0 && i.$tooltip.delay(i.options.speed), i.$tooltip.queue(s)) : i.$tooltip.stop().fadeIn(s)) : "shown" === i.Status && s()
            } else {
              i.Status = "appearing";
              var o = i.options.speed;
              i.bodyOverflowX = $("body").css("overflow-x"), $("body").css("overflow-x", "hidden");
              var r = "tooltipster-" + i.options.animation,
                a = "-webkit-transition-duration: " + i.options.speed + "ms; -webkit-animation-duration: " + i.options.speed + "ms; -moz-transition-duration: " + i.options.speed + "ms; -moz-animation-duration: " + i.options.speed + "ms; -o-transition-duration: " + i.options.speed + "ms; -o-animation-duration: " + i.options.speed + "ms; -ms-transition-duration: " + i.options.speed + "ms; -ms-animation-duration: " + i.options.speed + "ms; transition-duration: " + i.options.speed + "ms; animation-duration: " + i.options.speed + "ms;",
                h = i.options.minWidth ? "min-width:" + Math.round(i.options.minWidth) + "px;" : "",
                c = i.options.maxWidth ? "max-width:" + Math.round(i.options.maxWidth) + "px;" : "",
                d = i.options.interactive ? "pointer-events: auto;" : "";
              if (i.$tooltip = $('<div class="tooltipster-base ' + i.options.theme + '" style="' + h + " " + c + " " + d + " " + a + '"><div class="tooltipster-content"></div></div>'), n() && i.$tooltip.addClass(r), i._content_insert(), i.$tooltip.appendTo("body"), i.reposition(), i.options.functionReady.call(i.$el, i.$el, i.$tooltip), n() ? (i.$tooltip.addClass(r + "-show"), i.options.speed > 0 && i.$tooltip.delay(i.options.speed), i.$tooltip.queue(s)) : i.$tooltip.css("display", "none").fadeIn(i.options.speed, s), i._interval_set(), $(t).on("scroll." + i.namespace + " resize." + i.namespace, function () {
                i.reposition()
              }), i.options.autoClose)
                if ($("body").off("." + i.namespace), "hover" == i.options.trigger) {
                  if (l && setTimeout(function () {
                    $("body").on("touchstart." + i.namespace, function () {
                      i.hide()
                    })
                  }, 0), i.options.interactive) {
                    l && i.$tooltip.on("touchstart." + i.namespace, function (t) {
                      t.stopPropagation()
                    });
                    var p = null;
                    i.$elProxy.add(i.$tooltip).on("mouseleave." + i.namespace + "-autoClose", function () {
                      clearTimeout(p), p = setTimeout(function () {
                        i.hide()
                      }, i.options.interactiveTolerance)
                    }).on("mouseenter." + i.namespace + "-autoClose", function () {
                      clearTimeout(p)
                    })
                  } else i.$elProxy.on("mouseleave." + i.namespace + "-autoClose", function () {
                    i.hide()
                  });
                  i.options.hideOnClick && i.$elProxy.on("click." + i.namespace + "-autoClose", function () {
                    i.hide()
                  })
                } else "click" == i.options.trigger && (setTimeout(function () {
                  $("body").on("click." + i.namespace + " touchstart." + i.namespace, function () {
                    i.hide()
                  })
                }, 0), i.options.interactive && i.$tooltip.on("click." + i.namespace + " touchstart." + i.namespace, function (t) {
                  t.stopPropagation()
                }))
            }
            i.options.timer > 0 && (i.timerHide = setTimeout(function () {
              i.timerHide = null, i.hide()
            }, i.options.timer + o))
          }
        })
      },
      _interval_set: function () {
        var t = this;
        t.checkInterval = setInterval(function () {
          if (0 === $("body").find(t.$el).length || 0 === $("body").find(t.$elProxy).length || "hidden" == t.Status || 0 === $("body").find(t.$tooltip).length) "shown" != t.Status && "appearing" != t.Status || t.hide(), t._interval_cancel();
          else if (t.options.positionTracker) {
            var e = t._repositionInfo(t.$elProxy),
              i = !1;
            s(e.dimension, t.elProxyPosition.dimension) && ("fixed" === t.$elProxy.css("position") ? s(e.position, t.elProxyPosition.position) && (i = !0) : s(e.offset, t.elProxyPosition.offset) && (i = !0)), i || (t.reposition(), t.options.positionTrackerCallback.call(t, t.$el))
          }
        }, 200)
      },
      _interval_cancel: function () {
        clearInterval(this.checkInterval), this.checkInterval = null
      },
      _content_set: function (t) {
        "object" == typeof t && null !== t && this.options.contentCloning && (t = t.clone(!0)), this.Content = t
      },
      _content_insert: function () {
        var t = this,
          e = this.$tooltip.find(".tooltipster-content");
        "string" != typeof t.Content || t.options.contentAsHTML ? e.empty().append(t.Content) : e.text(t.Content)
      },
      _update: function (t) {
        var e = this;
        e._content_set(t), null !== e.Content ? "hidden" !== e.Status && (e._content_insert(), e.reposition(), e.options.updateAnimation && (n() ? (e.$tooltip.css({
          width: "",
          "-webkit-transition": "all " + e.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms",
          "-moz-transition": "all " + e.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms",
          "-o-transition": "all " + e.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms",
          "-ms-transition": "all " + e.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms",
          transition: "all " + e.options.speed + "ms, width 0ms, height 0ms, left 0ms, top 0ms"
        }).addClass("tooltipster-content-changing"), setTimeout(function () {
          "hidden" != e.Status && (e.$tooltip.removeClass("tooltipster-content-changing"), setTimeout(function () {
            "hidden" !== e.Status && e.$tooltip.css({
              "-webkit-transition": e.options.speed + "ms",
              "-moz-transition": e.options.speed + "ms",
              "-o-transition": e.options.speed + "ms",
              "-ms-transition": e.options.speed + "ms",
              transition: e.options.speed + "ms"
            })
          }, e.options.speed))
        }, e.options.speed)) : e.$tooltip.fadeTo(e.options.speed, .5, function () {
          "hidden" != e.Status && e.$tooltip.fadeTo(e.options.speed, 1)
        }))) : e.hide()
      },
      _repositionInfo: function (t) {
        return {
          dimension: {
            height: t.outerHeight(!1),
            width: t.outerWidth(!1)
          },
          offset: t.offset(),
          position: {
            left: parseInt(t.css("left")),
            top: parseInt(t.css("top"))
          }
        }
      },
      hide: function (e) {
        var i = this;
        e && i.callbacks.hide.push(e), i.callbacks.show = [], clearTimeout(i.timerShow), i.timerShow = null, clearTimeout(i.timerHide), i.timerHide = null;
        var s = function () {
          $.each(i.callbacks.hide, function (t, e) {
            e.call(i.$el)
          }), i.callbacks.hide = []
        };
        if ("shown" == i.Status || "appearing" == i.Status) {
          i.Status = "disappearing";
          var o = function () {
            i.Status = "hidden", "object" == typeof i.Content && null !== i.Content && i.Content.detach(), i.$tooltip.remove(), i.$tooltip = null, $(t).off("." + i.namespace), $("body").off("." + i.namespace).css("overflow-x", i.bodyOverflowX), $("body").off("." + i.namespace), i.$elProxy.off("." + i.namespace + "-autoClose"), i.options.functionAfter.call(i.$el, i.$el), s()
          };
          n() ? (i.$tooltip.clearQueue().removeClass("tooltipster-" + i.options.animation + "-show").addClass("tooltipster-dying"), i.options.speed > 0 && i.$tooltip.delay(i.options.speed), i.$tooltip.queue(o)) : i.$tooltip.stop().fadeOut(i.options.speed, o)
        } else "hidden" == i.Status && s();
        return i
      },
      show: function (t) {
        return this._showNow(t), this
      },
      update: function (t) {
        return this.content(t)
      },
      content: function (t) {
        return "undefined" == typeof t ? this.Content : (this._update(t), this)
      },
      reposition: function () {
        function e() {
          var e = $(t).scrollLeft();
          O - e < 0 && (o = O - e, O = e), O + a - e > n && (o = O - (n + e - a), O = n + e - a)
        }

        function i(e, i) {
          r.offset.top - $(t).scrollTop() - h - E - 12 < 0 && i.indexOf("top") > -1 && (M = e), r.offset.top + r.dimension.height + h + 12 + E > $(t).scrollTop() + $(t).height() && i.indexOf("bottom") > -1 && (M = e, I = r.offset.top - h - E - 12)
        }

        var s = this;
        if (0 !== $("body").find(s.$tooltip).length) {
          s.$tooltip.css("width", ""), s.elProxyPosition = s._repositionInfo(s.$elProxy);
          var o = null,
            n = $(t).width(),
            r = s.elProxyPosition,
            a = s.$tooltip.outerWidth(!1),
            l = s.$tooltip.innerWidth() + 1,
            h = s.$tooltip.outerHeight(!1);
          if (s.$elProxy.is("area")) {
            var c = s.$elProxy.attr("shape"),
              d = s.$elProxy.parent().attr("name"),
              p = $('img[usemap="#' + d + '"]'),
              u = p.offset().left,
              f = p.offset().top,
              g = void 0 !== s.$elProxy.attr("coords") ? s.$elProxy.attr("coords").split(",") : void 0;
            if ("circle" == c) {
              var m = parseInt(g[0]),
                _ = parseInt(g[1]),
                v = parseInt(g[2]);
              r.dimension.height = 2 * v, r.dimension.width = 2 * v, r.offset.top = f + _ - v, r.offset.left = u + m - v
            } else if ("rect" == c) {
              var m = parseInt(g[0]),
                _ = parseInt(g[1]),
                y = parseInt(g[2]),
                w = parseInt(g[3]);
              r.dimension.height = w - _, r.dimension.width = y - m, r.offset.top = f + _, r.offset.left = u + m
            } else if ("poly" == c) {
              for (var b = [], x = [], C = 0, k = 0, T = 0, S = 0, P = "even", z = 0; z < g.length; z++) {
                var D = parseInt(g[z]);
                "even" == P ? (D > T && (T = D, 0 === z && (C = T)), D < C && (C = D), P = "odd") : (D > S && (S = D, 1 == z && (k = S)), D < k && (k = D), P = "even")
              }
              r.dimension.height = S - k, r.dimension.width = T - C, r.offset.top = f + k, r.offset.left = u + C
            } else r.dimension.height = p.outerHeight(!1), r.dimension.width = p.outerWidth(!1), r.offset.top = f, r.offset.left = u
          }
          var O = 0,
            A = 0,
            I = 0,
            E = parseInt(s.options.offsetY),
            j = parseInt(s.options.offsetX),
            M = s.options.position;
          if ("top" == M) {
            var H = r.offset.left + a - (r.offset.left + r.dimension.width);
            O = r.offset.left + j - H / 2, I = r.offset.top - h - E - 12, e(), i("bottom", "top")
          }
          if ("top-left" == M && (O = r.offset.left + j, I = r.offset.top - h - E - 12, e(), i("bottom-left", "top-left")), "top-right" == M && (O = r.offset.left + r.dimension.width + j - a, I = r.offset.top - h - E - 12, e(), i("bottom-right", "top-right")), "bottom" == M) {
            var H = r.offset.left + a - (r.offset.left + r.dimension.width);
            O = r.offset.left - H / 2 + j, I = r.offset.top + r.dimension.height + E + 12, e(), i("top", "bottom")
          }
          if ("bottom-left" == M && (O = r.offset.left + j, I = r.offset.top + r.dimension.height + E + 12, e(), i("top-left", "bottom-left")), "bottom-right" == M && (O = r.offset.left + r.dimension.width + j - a, I = r.offset.top + r.dimension.height + E + 12, e(), i("top-right", "bottom-right")), "left" == M) {
            O = r.offset.left - j - a - 12, A = r.offset.left + j + r.dimension.width + 12;
            var W = r.offset.top + h - (r.offset.top + r.dimension.height);
            if (I = r.offset.top - W / 2 - E, O < 0 && A + a > n) {
              var L = 2 * parseFloat(s.$tooltip.css("border-width")),
                R = a + O - L;
              s.$tooltip.css("width", R + "px"), h = s.$tooltip.outerHeight(!1), O = r.offset.left - j - R - 12 - L, W = r.offset.top + h - (r.offset.top + r.dimension.height), I = r.offset.top - W / 2 - E
            } else O < 0 && (O = r.offset.left + j + r.dimension.width + 12, o = "left")
          }
          if ("right" == M) {
            O = r.offset.left + j + r.dimension.width + 12, A = r.offset.left - j - a - 12;
            var W = r.offset.top + h - (r.offset.top + r.dimension.height);
            if (I = r.offset.top - W / 2 - E, O + a > n && A < 0) {
              var L = 2 * parseFloat(s.$tooltip.css("border-width")),
                R = n - O - L;
              s.$tooltip.css("width", R + "px"), h = s.$tooltip.outerHeight(!1), W = r.offset.top + h - (r.offset.top + r.dimension.height), I = r.offset.top - W / 2 - E
            } else O + a > n && (O = r.offset.left - j - a - 12, o = "right")
          }
          if (s.options.arrow) {
            var q = "tooltipster-arrow-" + M;
            if (s.options.arrowColor.length < 1) var B = s.$tooltip.css("background-color");
            else var B = s.options.arrowColor;
            if (o ? "left" == o ? (q = "tooltipster-arrow-right", o = "") : "right" == o ? (q = "tooltipster-arrow-left", o = "") : o = "left:" + Math.round(o) + "px;" : o = "", "top" == M || "top-left" == M || "top-right" == M) var N = parseFloat(s.$tooltip.css("border-bottom-width")),
              U = s.$tooltip.css("border-bottom-color");
            else if ("bottom" == M || "bottom-left" == M || "bottom-right" == M) var N = parseFloat(s.$tooltip.css("border-top-width")),
              U = s.$tooltip.css("border-top-color");
            else if ("left" == M) var N = parseFloat(s.$tooltip.css("border-right-width")),
              U = s.$tooltip.css("border-right-color");
            else if ("right" == M) var N = parseFloat(s.$tooltip.css("border-left-width")),
              U = s.$tooltip.css("border-left-color");
            else var N = parseFloat(s.$tooltip.css("border-bottom-width")),
                U = s.$tooltip.css("border-bottom-color");
            N > 1 && N++;
            var F = "";
            if (0 !== N) {
              var Q = "",
                Z = "border-color: " + U + ";";
              q.indexOf("bottom") !== -1 ? Q = "margin-top: -" + Math.round(N) + "px;" : q.indexOf("top") !== -1 ? Q = "margin-bottom: -" + Math.round(N) + "px;" : q.indexOf("left") !== -1 ? Q = "margin-right: -" + Math.round(N) + "px;" : q.indexOf("right") !== -1 && (Q = "margin-left: -" + Math.round(N) + "px;"), F = '<span class="tooltipster-arrow-border" style="' + Q + " " + Z + ';"></span>'
            }
            s.$tooltip.find(".tooltipster-arrow").remove();
            var V = '<div class="' + q + ' tooltipster-arrow" style="' + o + '">' + F + '<span style="border-color:' + B + ';"></span></div>';
            s.$tooltip.append(V)
          }
          s.$tooltip.css({
            top: Math.round(I) + "px",
            left: Math.round(O) + "px"
          })
        }
        return s
      },
      enable: function () {
        return this.enabled = !0, this
      },
      disable: function () {
        return this.hide(), this.enabled = !1, this
      },
      destroy: function () {
        var t = this;
        t.hide(), t.$el[0] !== t.$elProxy[0] && t.$elProxy.remove(), t.$el.removeData(t.namespace).off("." + t.namespace);
        var e = t.$el.data("tooltipster-ns");
        if (1 === e.length) {
          var i = null;
          "previous" === t.options.restoration ? i = t.$el.data("tooltipster-initialTitle") : "current" === t.options.restoration && (i = "string" == typeof t.Content ? t.Content : $("<div></div>").append(t.Content).html()), i && t.$el.attr("title", i), t.$el.removeClass("tooltipstered").removeData("tooltipster-ns").removeData("tooltipster-initialTitle")
        } else e = $.grep(e, function (e, i) {
          return e !== t.namespace
        }), t.$el.data("tooltipster-ns", e);
        return t
      },
      elementIcon: function () {
        return this.$el[0] !== this.$elProxy[0] ? this.$elProxy[0] : void 0
      },
      elementTooltip: function () {
        return this.$tooltip ? this.$tooltip[0] : void 0
      },
      option: function (t, e) {
        return "undefined" == typeof e ? this.options[t] : (this.options[t] = e, this)
      },
      status: function () {
        return this.Status
      }
    }, $.fn[r] = function () {
      var t = arguments;
      if (0 === this.length) {
        if ("string" == typeof t[0]) {
          var e = !0;
          switch (t[0]) {
            case "setDefaults":
              $.extend(a, t[1]);
              break;
            default:
              e = !1
          }
          return !!e || this
        }
        return this
      }
      if ("string" == typeof t[0]) {
        var s = "#*$~&";
        return this.each(function () {
          var e = $(this).data("tooltipster-ns"),
            i = e ? $(this).data(e[0]) : null;
          if (!i) throw new Error("You called Tooltipster's \"" + t[0] + '" method on an uninitialized element');
          if ("function" != typeof i[t[0]]) throw new Error('Unknown method .tooltipster("' + t[0] + '")');
          var o = i[t[0]](t[1], t[2]);
          if (o !== i) return s = o, !1
        }), "#*$~&" !== s ? s : this
      }
      var o = [],
        n = t[0] && "undefined" != typeof t[0].multiple,
        r = n && t[0].multiple || !n && a.multiple,
        l = t[0] && "undefined" != typeof t[0].debug,
        h = l && t[0].debug || !l && a.debug;
      return this.each(function () {
        var e = !1,
          s = $(this).data("tooltipster-ns"),
          n = null;
        s ? r ? e = !0 : h && console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.') : e = !0, e && (n = new i(this, t[0]), s || (s = []), s.push(n.namespace), $(this).data("tooltipster-ns", s), $(this).data(n.namespace, n)), o.push(n)
      }), r ? o : this
    };
    var l = !!("ontouchstart" in t),
      h = !1;
    $("body").one("mousemove", function () {
      h = !0
    })
  }(jQuery, window, document),
  function (t, e, $, i) {
    "use strict";
    var s = $("html"),
      o = $(t),
      n = $(e),
      r = $.fancybox = function () {
        r.open.apply(this, arguments)
      },
      a = navigator.userAgent.match(/msie/i),
      l = null,
      h = e.createTouch !== i,
      c = function (t) {
        return t && t.hasOwnProperty && t instanceof $
      },
      d = function (t) {
        return t && "string" === $.type(t)
      },
      p = function (t) {
        return d(t) && t.indexOf("%") > 0
      },
      u = function (t) {
        return t && !(t.style.overflow && "hidden" === t.style.overflow) && (t.clientWidth && t.scrollWidth > t.clientWidth || t.clientHeight && t.scrollHeight > t.clientHeight)
      },
      f = function (t, e) {
        var i = parseInt(t, 10) || 0;
        return e && p(t) && (i = r.getViewport()[e] / 100 * i), Math.ceil(i)
      },
      g = function (t, e) {
        return f(t, e) + "px"
      };
    $.extend(r, {
      version: "2.1.5",
      defaults: {
        padding: 15,
        margin: 20,
        width: 800,
        height: 600,
        minWidth: 100,
        minHeight: 100,
        maxWidth: 9999,
        maxHeight: 9999,
        pixelRatio: 1,
        autoSize: !0,
        autoHeight: !1,
        autoWidth: !1,
        autoResize: !0,
        autoCenter: !h,
        fitToView: !0,
        aspectRatio: !1,
        topRatio: .5,
        leftRatio: .5,
        scrolling: "auto",
        wrapCSS: "",
        arrows: !0,
        closeBtn: !0,
        closeClick: !1,
        nextClick: !1,
        mouseWheel: !0,
        autoPlay: !1,
        playSpeed: 3e3,
        preload: 3,
        modal: !1,
        loop: !0,
        ajax: {
          dataType: "html",
          headers: {
            "X-fancyBox": !0
          }
        },
        iframe: {
          scrolling: "auto",
          preload: !0
        },
        swf: {
          wmode: "transparent",
          allowfullscreen: "true",
          allowscriptaccess: "always"
        },
        keys: {
          next: {
            13: "left",
            34: "up",
            39: "left",
            40: "up"
          },
          prev: {
            8: "right",
            33: "down",
            37: "right",
            38: "down"
          },
          close: [27],
          play: [32],
          toggle: [70]
        },
        direction: {
          next: "left",
          prev: "right"
        },
        scrollOutside: !0,
        index: 0,
        type: null,
        href: null,
        content: null,
        title: null,
        tpl: {
          wrap: '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
          image: '<img class="fancybox-image" src="{href}" alt="" />',
          iframe: '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (a ? ' allowtransparency="true"' : "") + "></iframe>",
          error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
          closeBtn: '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
          next: '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
          prev: '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
        },
        openEffect: "fade",
        openSpeed: 250,
        openEasing: "swing",
        openOpacity: !0,
        openMethod: "zoomIn",
        closeEffect: "fade",
        closeSpeed: 250,
        closeEasing: "swing",
        closeOpacity: !0,
        closeMethod: "zoomOut",
        nextEffect: "elastic",
        nextSpeed: 250,
        nextEasing: "swing",
        nextMethod: "changeIn",
        prevEffect: "elastic",
        prevSpeed: 250,
        prevEasing: "swing",
        prevMethod: "changeOut",
        helpers: {
          overlay: !0,
          title: !0
        },
        onCancel: $.noop,
        beforeLoad: $.noop,
        afterLoad: $.noop,
        beforeShow: $.noop,
        afterShow: $.noop,
        beforeChange: $.noop,
        beforeClose: $.noop,
        afterClose: $.noop
      },
      group: {},
      opts: {},
      previous: null,
      coming: null,
      current: null,
      isActive: !1,
      isOpen: !1,
      isOpened: !1,
      wrap: null,
      skin: null,
      outer: null,
      inner: null,
      player: {
        timer: null,
        isActive: !1
      },
      ajaxLoad: null,
      imgPreload: null,
      transitions: {},
      helpers: {},
      open: function (t, e) {
        if (t && ($.isPlainObject(e) || (e = {}), !1 !== r.close(!0))) return $.isArray(t) || (t = c(t) ? $(t).get() : [t]), $.each(t, function (s, o) {
          var n = {},
            a, l, h, p, u, f, g;
          "object" === $.type(o) && (o.nodeType && (o = $(o)), c(o) ? (n = {
            href: o.data("fancybox-href") || o.attr("href"),
            title: o.data("fancybox-title") || o.attr("title"),
            isDom: !0,
            element: o
          }, $.metadata && $.extend(!0, n, o.metadata())) : n = o), a = e.href || n.href || (d(o) ? o : null), l = e.title !== i ? e.title : n.title || "", h = e.content || n.content, p = h ? "html" : e.type || n.type, !p && n.isDom && (p = o.data("fancybox-type"), p || (u = o.prop("class").match(/fancybox\.(\w+)/), p = u ? u[1] : null)), d(a) && (p || (r.isImage(a) ? p = "image" : r.isSWF(a) ? p = "swf" : "#" === a.charAt(0) ? p = "inline" : d(o) && (p = "html", h = o)), "ajax" === p && (f = a.split(/\s+/, 2), a = f.shift(), g = f.shift())), h || ("inline" === p ? a ? h = $(d(a) ? a.replace(/.*(?=#[^\s]+$)/, "") : a) : n.isDom && (h = o) : "html" === p ? h = a : p || a || !n.isDom || (p = "inline", h = o)), $.extend(n, {
            href: a,
            type: p,
            content: h,
            title: l,
            selector: g
          }), t[s] = n
        }), r.opts = $.extend(!0, {}, r.defaults, e), e.keys !== i && (r.opts.keys = !!e.keys && $.extend({}, r.defaults.keys, e.keys)), r.group = t, r._start(r.opts.index)
      },
      cancel: function () {
        var t = r.coming;
        t && !1 !== r.trigger("onCancel") && (r.hideLoading(), r.ajaxLoad && r.ajaxLoad.abort(), r.ajaxLoad = null, r.imgPreload && (r.imgPreload.onload = r.imgPreload.onerror = null), t.wrap && t.wrap.stop(!0, !0).trigger("onReset").remove(), r.coming = null, r.current || r._afterZoomOut(t))
      },
      close: function (t) {
        r.cancel(), !1 !== r.trigger("beforeClose") && (r.unbindEvents(), r.isActive && (r.isOpen && t !== !0 ? (r.isOpen = r.isOpened = !1, r.isClosing = !0, $(".fancybox-item, .fancybox-nav").remove(), r.wrap.stop(!0, !0).removeClass("fancybox-opened"), r.transitions[r.current.closeMethod]()) : ($(".fancybox-wrap").stop(!0).trigger("onReset").remove(), r._afterZoomOut())))
      },
      play: function (t) {
        var e = function () {
            clearTimeout(r.player.timer)
          },
          i = function () {
            e(), r.current && r.player.isActive && (r.player.timer = setTimeout(r.next, r.current.playSpeed))
          },
          s = function () {
            e(), n.unbind(".player"), r.player.isActive = !1, r.trigger("onPlayEnd")
          },
          o = function () {
            r.current && (r.current.loop || r.current.index < r.group.length - 1) && (r.player.isActive = !0, n.bind({
              "onCancel.player beforeClose.player": s,
              "onUpdate.player": i,
              "beforeLoad.player": e
            }), i(), r.trigger("onPlayStart"))
          };
        t === !0 || !r.player.isActive && t !== !1 ? o() : s()
      },
      next: function (t) {
        var e = r.current;
        e && (d(t) || (t = e.direction.next), r.jumpto(e.index + 1, t, "next"))
      },
      prev: function (t) {
        var e = r.current;
        e && (d(t) || (t = e.direction.prev), r.jumpto(e.index - 1, t, "prev"))
      },
      jumpto: function (t, e, s) {
        var o = r.current;
        o && (t = f(t), r.direction = e || o.direction[t >= o.index ? "next" : "prev"], r.router = s || "jumpto", o.loop && (t < 0 && (t = o.group.length + t % o.group.length), t %= o.group.length), o.group[t] !== i && (r.cancel(), r._start(t)))
      },
      reposition: function (t, e) {
        var i = r.current,
          s = i ? i.wrap : null,
          o;
        s && (o = r._getPosition(e), t && "scroll" === t.type ? (delete o.position, s.stop(!0, !0).animate(o, 200)) : (s.css(o), i.pos = $.extend({}, i.dim, o)))
      },
      update: function (t) {
        var e = t && t.type,
          i = !e || "orientationchange" === e;
        i && (clearTimeout(l), l = null), r.isOpen && !l && (l = setTimeout(function () {
          var s = r.current;
          s && !r.isClosing && (r.wrap.removeClass("fancybox-tmp"), (i || "load" === e || "resize" === e && s.autoResize) && r._setDimension(), "scroll" === e && s.canShrink || r.reposition(t), r.trigger("onUpdate"), l = null)
        }, i && !h ? 0 : 300))
      },
      toggle: function (t) {
        r.isOpen && (r.current.fitToView = "boolean" === $.type(t) ? t : !r.current.fitToView, h && (r.wrap.removeAttr("style").addClass("fancybox-tmp"), r.trigger("onUpdate")), r.update())
      },
      hideLoading: function () {
        n.unbind(".loading"), $("#fancybox-loading").remove()
      },
      showLoading: function () {
        var t, e;
        r.hideLoading(), t = $('<div id="fancybox-loading"><div></div></div>').click(r.cancel).appendTo("body"), n.bind("keydown.loading", function (t) {
          27 === (t.which || t.keyCode) && (t.preventDefault(), r.cancel())
        }), r.defaults.fixed || (e = r.getViewport(), t.css({
          position: "absolute",
          top: .5 * e.h + e.y,
          left: .5 * e.w + e.x
        }))
      },
      getViewport: function () {
        var e = r.current && r.current.locked || !1,
          i = {
            x: o.scrollLeft(),
            y: o.scrollTop()
          };
        return e ? (i.w = e[0].clientWidth, i.h = e[0].clientHeight) : (i.w = h && t.innerWidth ? t.innerWidth : o.width(), i.h = h && t.innerHeight ? t.innerHeight : o.height()), i
      },
      unbindEvents: function () {
        r.wrap && c(r.wrap) && r.wrap.unbind(".fb"), n.unbind(".fb"), o.unbind(".fb")
      },
      bindEvents: function () {
        var t = r.current,
          e;
        t && (o.bind("orientationchange.fb" + (h ? "" : " resize.fb") + (t.autoCenter && !t.locked ? " scroll.fb" : ""), r.update), e = t.keys, e && n.bind("keydown.fb", function (s) {
          var o = s.which || s.keyCode,
            n = s.target || s.srcElement;
          return (27 !== o || !r.coming) && void (s.ctrlKey || s.altKey || s.shiftKey || s.metaKey || n && (n.type || $(n).is("[contenteditable]")) || $.each(e, function (e, n) {
            return t.group.length > 1 && n[o] !== i ? (r[e](n[o]), s.preventDefault(), !1) : $.inArray(o, n) > -1 ? (r[e](), s.preventDefault(), !1) : void 0
          }))
        }), $.fn.mousewheel && t.mouseWheel && r.wrap.bind("mousewheel.fb", function (e, i, s, o) {
          for (var n = e.target || null, a = $(n), l = !1; a.length && !(l || a.is(".fancybox-skin") || a.is(".fancybox-wrap"));) l = u(a[0]), a = $(a).parent();
          0 === i || l || r.group.length > 1 && !t.canShrink && (o > 0 || s > 0 ? r.prev(o > 0 ? "down" : "left") : (o < 0 || s < 0) && r.next(o < 0 ? "up" : "right"), e.preventDefault())
        }))
      },
      trigger: function (t, e) {
        var i, s = e || r.coming || r.current;
        if (s) {
          if ($.isFunction(s[t]) && (i = s[t].apply(s, Array.prototype.slice.call(arguments, 1))), i === !1) return !1;
          s.helpers && $.each(s.helpers, function (e, i) {
            i && r.helpers[e] && $.isFunction(r.helpers[e][t]) && r.helpers[e][t]($.extend(!0, {}, r.helpers[e].defaults, i), s)
          }), n.trigger(t)
        }
      },
      isImage: function (t) {
        return d(t) && t.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)
      },
      isSWF: function (t) {
        return d(t) && t.match(/\.(swf)((\?|#).*)?$/i)
      },
      _start: function (t) {
        var e = {},
          i, s, o, n, a;
        if (t = f(t), i = r.group[t] || null, !i) return !1;
        if (e = $.extend(!0, {}, r.opts, i), n = e.margin, a = e.padding, "number" === $.type(n) && (e.margin = [n, n, n, n]), "number" === $.type(a) && (e.padding = [a, a, a, a]), e.modal && $.extend(!0, e, {
          closeBtn: !1,
          closeClick: !1,
          nextClick: !1,
          arrows: !1,
          mouseWheel: !1,
          keys: null,
          helpers: {
            overlay: {
              closeClick: !1
            }
          }
        }), e.autoSize && (e.autoWidth = e.autoHeight = !0), "auto" === e.width && (e.autoWidth = !0), "auto" === e.height && (e.autoHeight = !0), e.group = r.group, e.index = t, r.coming = e, !1 === r.trigger("beforeLoad")) return void (r.coming = null);
        if (o = e.type, s = e.href, !o) return r.coming = null, !(!r.current || !r.router || "jumpto" === r.router) && (r.current.index = t, r[r.router](r.direction));
        if (r.isActive = !0, "image" !== o && "swf" !== o || (e.autoHeight = e.autoWidth = !1, e.scrolling = "visible"), "image" === o && (e.aspectRatio = !0), "iframe" === o && h && (e.scrolling = "scroll"), e.wrap = $(e.tpl.wrap).addClass("fancybox-" + (h ? "mobile" : "desktop") + " fancybox-type-" + o + " fancybox-tmp " + e.wrapCSS).appendTo(e.parent || "body"), $.extend(e, {
          skin: $(".fancybox-skin", e.wrap),
          outer: $(".fancybox-outer", e.wrap),
          inner: $(".fancybox-inner", e.wrap)
        }), $.each(["Top", "Right", "Bottom", "Left"], function (t, i) {
          e.skin.css("padding" + i, g(e.padding[t]))
        }), r.trigger("onReady"), "inline" === o || "html" === o) {
          if (!e.content || !e.content.length) return r._error("content")
        } else if (!s) return r._error("href");
        "image" === o ? r._loadImage() : "ajax" === o ? r._loadAjax() : "iframe" === o ? r._loadIframe() : r._afterLoad()
      },
      _error: function (t) {
        $.extend(r.coming, {
          type: "html",
          autoWidth: !0,
          autoHeight: !0,
          minWidth: 0,
          minHeight: 0,
          scrolling: "no",
          hasError: t,
          content: r.coming.tpl.error
        }), r._afterLoad()
      },
      _loadImage: function () {
        var t = r.imgPreload = new Image;
        t.onload = function () {
          this.onload = this.onerror = null, r.coming.width = this.width / r.opts.pixelRatio, r.coming.height = this.height / r.opts.pixelRatio, r._afterLoad()
        }, t.onerror = function () {
          this.onload = this.onerror = null, r._error("image")
        }, t.src = r.coming.href, t.complete !== !0 && r.showLoading()
      },
      _loadAjax: function () {
        var t = r.coming;
        r.showLoading(), r.ajaxLoad = $.ajax($.extend({}, t.ajax, {
          url: t.href,
          error: function (t, e) {
            r.coming && "abort" !== e ? r._error("ajax", t) : r.hideLoading()
          },
          success: function (e, i) {
            "success" === i && (t.content = e, r._afterLoad())
          }
        }))
      },
      _loadIframe: function () {
        var t = r.coming,
          e = $(t.tpl.iframe.replace(/\{rnd\}/g, (new Date).getTime())).attr("scrolling", h ? "auto" : t.iframe.scrolling).attr("src", t.href);
        $(t.wrap).bind("onReset", function () {
          try {
            $(this).find("iframe").hide().attr("src", "//about:blank").end().empty()
          } catch (t) {
          }
        }), t.iframe.preload && (r.showLoading(), e.one("load", function () {
          $(this).data("ready", 1), h || $(this).bind("load.fb", r.update), $(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show(), r._afterLoad()
        })), t.content = e.appendTo(t.inner), t.iframe.preload || r._afterLoad()
      },
      _preloadImages: function () {
        var t = r.group,
          e = r.current,
          i = t.length,
          s = e.preload ? Math.min(e.preload, i - 1) : 0,
          o, n;
        for (n = 1; n <= s; n += 1) o = t[(e.index + n) % i], "image" === o.type && o.href && ((new Image).src = o.href)
      },
      _afterLoad: function () {
        var t = r.coming,
          e = r.current,
          i = "fancybox-placeholder",
          s, o, n, a, l, h;
        if (r.hideLoading(), t && r.isActive !== !1) {
          if (!1 === r.trigger("afterLoad", t, e)) return t.wrap.stop(!0).trigger("onReset").remove(), void (r.coming = null);
          switch (e && (r.trigger("beforeChange", e), e.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()), r.unbindEvents(), s = t, o = t.content, n = t.type, a = t.scrolling, $.extend(r, {
            wrap: s.wrap,
            skin: s.skin,
            outer: s.outer,
            inner: s.inner,
            current: s,
            previous: e
          }), l = s.href, n) {
            case "inline":
            case "ajax":
            case "html":
              s.selector ? o = $("<div>").html(o).find(s.selector) : c(o) && (o.data(i) || o.data(i, $('<div class="' + i + '"></div>').insertAfter(o).hide()), o = o.show().detach(), s.wrap.bind("onReset", function () {
                $(this).find(o).length && o.hide().replaceAll(o.data(i)).data(i, !1)
              }));
              break;
            case "image":
              o = s.tpl.image.replace("{href}", l);
              break;
            case "swf":
              o = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + l + '"></param>', h = "", $.each(s.swf, function (t, e) {
                o += '<param name="' + t + '" value="' + e + '"></param>', h += " " + t + '="' + e + '"'
              }), o += '<embed src="' + l + '" type="application/x-shockwave-flash" width="100%" height="100%"' + h + "></embed></object>"
          }
          c(o) && o.parent().is(s.inner) || s.inner.append(o), r.trigger("beforeShow"), s.inner.css("overflow", "yes" === a ? "scroll" : "no" === a ? "hidden" : a), r._setDimension(), r.reposition(), r.isOpen = !1, r.coming = null, r.bindEvents(), r.isOpened ? e.prevMethod && r.transitions[e.prevMethod]() : $(".fancybox-wrap").not(s.wrap).stop(!0).trigger("onReset").remove(), r.transitions[r.isOpened ? s.nextMethod : s.openMethod](), r._preloadImages()
        }
      },
      _setDimension: function () {
        var t = r.getViewport(),
          e = 0,
          i = !1,
          s = !1,
          o = r.wrap,
          n = r.skin,
          a = r.inner,
          l = r.current,
          h = l.width,
          c = l.height,
          d = l.minWidth,
          u = l.minHeight,
          m = l.maxWidth,
          _ = l.maxHeight,
          v = l.scrolling,
          y = l.scrollOutside ? l.scrollbarWidth : 0,
          w = l.margin,
          b = f(w[1] + w[3]),
          x = f(w[0] + w[2]),
          C, k, T, S, P, z, D, O, A, I, E, j, M, H, W;
        if (o.add(n).add(a).width("auto").height("auto").removeClass("fancybox-tmp"), C = f(n.outerWidth(!0) - n.width()), k = f(n.outerHeight(!0) - n.height()), T = b + C, S = x + k, P = p(h) ? (t.w - T) * f(h) / 100 : h, z = p(c) ? (t.h - S) * f(c) / 100 : c, "iframe" === l.type) {
          if (H = l.content, l.autoHeight && 1 === H.data("ready")) try {
            H[0].contentWindow.document.location && (a.width(P).height(9999), W = H.contents().find("body"), y && W.css("overflow-x", "hidden"), z = W.outerHeight(!0))
          } catch (t) {
          }
        } else (l.autoWidth || l.autoHeight) && (a.addClass("fancybox-tmp"), l.autoWidth || a.width(P), l.autoHeight || a.height(z), l.autoWidth && (P = a.width()), l.autoHeight && (z = a.height()), a.removeClass("fancybox-tmp"));
        if (h = f(P), c = f(z), A = P / z, d = f(p(d) ? f(d, "w") - T : d), m = f(p(m) ? f(m, "w") - T : m), u = f(p(u) ? f(u, "h") - S : u), _ = f(p(_) ? f(_, "h") - S : _), D = m, O = _, l.fitToView && (m = Math.min(t.w - T, m), _ = Math.min(t.h - S, _)), j = t.w - b, M = t.h - x, l.aspectRatio ? (h > m && (h = m, c = f(h / A)), c > _ && (c = _, h = f(c * A)), h < d && (h = d, c = f(h / A)), c < u && (c = u, h = f(c * A))) : (h = Math.max(d, Math.min(h, m)), l.autoHeight && "iframe" !== l.type && (a.width(h), c = a.height()), c = Math.max(u, Math.min(c, _))), l.fitToView)
          if (a.width(h).height(c), o.width(h + C), I = o.width(), E = o.height(), l.aspectRatio)
            for (;
              (I > j || E > M) && h > d && c > u && !(e++ > 19);) c = Math.max(u, Math.min(_, c - 10)), h = f(c * A), h < d && (h = d, c = f(h / A)), h > m && (h = m, c = f(h / A)), a.width(h).height(c), o.width(h + C), I = o.width(), E = o.height();
          else h = Math.max(d, Math.min(h, h - (I - j))), c = Math.max(u, Math.min(c, c - (E - M)));
        y && "auto" === v && c < z && h + C + y < j && (h += y), a.width(h).height(c), o.width(h + C), I = o.width(), E = o.height(), i = (I > j || E > M) && h > d && c > u, s = l.aspectRatio ? h < D && c < O && h < P && c < z : (h < D || c < O) && (h < P || c < z), $.extend(l, {
          dim: {
            width: g(I),
            height: g(E)
          },
          origWidth: P,
          origHeight: z,
          canShrink: i,
          canExpand: s,
          wPadding: C,
          hPadding: k,
          wrapSpace: E - n.outerHeight(!0),
          skinSpace: n.height() - c
        }), !H && l.autoHeight && c > u && c < _ && !s && a.height("auto")
      },
      _getPosition: function (t) {
        var e = r.current,
          i = r.getViewport(),
          s = e.margin,
          o = r.wrap.width() + s[1] + s[3],
          n = r.wrap.height() + s[0] + s[2],
          a = {
            position: "absolute",
            top: s[0],
            left: s[3]
          };
        return e.autoCenter && e.fixed && !t && n <= i.h && o <= i.w ? a.position = "fixed" : e.locked || (a.top += i.y, a.left += i.x), a.top = g(Math.max(a.top, a.top + (i.h - n) * e.topRatio)), a.left = g(Math.max(a.left, a.left + (i.w - o) * e.leftRatio)), a
      },
      _afterZoomIn: function () {
        var t = r.current;
        t && (r.isOpen = r.isOpened = !0, r.wrap.css("overflow", "visible").addClass("fancybox-opened"), r.update(), (t.closeClick || t.nextClick && r.group.length > 1) && r.inner.css("cursor", "pointer").bind("click.fb", function (e) {
          $(e.target).is("a") || $(e.target).parent().is("a") || (e.preventDefault(), r[t.closeClick ? "close" : "next"]())
        }), t.closeBtn && $(t.tpl.closeBtn).appendTo(r.skin).bind("click.fb", function (t) {
          t.preventDefault(), r.close()
        }), t.arrows && r.group.length > 1 && ((t.loop || t.index > 0) && $(t.tpl.prev).appendTo(r.outer).bind("click.fb", r.prev), (t.loop || t.index < r.group.length - 1) && $(t.tpl.next).appendTo(r.outer).bind("click.fb", r.next)), r.trigger("afterShow"), t.loop || t.index !== t.group.length - 1 ? r.opts.autoPlay && !r.player.isActive && (r.opts.autoPlay = !1, r.play()) : r.play(!1))
      },
      _afterZoomOut: function (t) {
        t = t || r.current, $(".fancybox-wrap").trigger("onReset").remove(), $.extend(r, {
          group: {},
          opts: {},
          router: !1,
          current: null,
          isActive: !1,
          isOpened: !1,
          isOpen: !1,
          isClosing: !1,
          wrap: null,
          skin: null,
          outer: null,
          inner: null
        }), r.trigger("afterClose", t)
      }
    }), r.transitions = {
      getOrigPosition: function () {
        var t = r.current,
          e = t.element,
          i = t.orig,
          s = {},
          o = 50,
          n = 50,
          a = t.hPadding,
          l = t.wPadding,
          h = r.getViewport();
        return !i && t.isDom && e.is(":visible") && (i = e.find("img:first"), i.length || (i = e)), c(i) ? (s = i.offset(), i.is("img") && (o = i.outerWidth(), n = i.outerHeight())) : (s.top = h.y + (h.h - n) * t.topRatio, s.left = h.x + (h.w - o) * t.leftRatio), ("fixed" === r.wrap.css("position") || t.locked) && (s.top -= h.y, s.left -= h.x), s = {
          top: g(s.top - a * t.topRatio),
          left: g(s.left - l * t.leftRatio),
          width: g(o + l),
          height: g(n + a)
        }
      },
      step: function (t, e) {
        var i, s, o, n = e.prop,
          a = r.current,
          l = a.wrapSpace,
          h = a.skinSpace;
        "width" !== n && "height" !== n || (i = e.end === e.start ? 1 : (t - e.start) / (e.end - e.start), r.isClosing && (i = 1 - i), s = "width" === n ? a.wPadding : a.hPadding, o = t - s, r.skin[n](f("width" === n ? o : o - l * i)), r.inner[n](f("width" === n ? o : o - l * i - h * i)))
      },
      zoomIn: function () {
        var t = r.current,
          e = t.pos,
          i = t.openEffect,
          s = "elastic" === i,
          o = $.extend({
            opacity: 1
          }, e);
        delete o.position, s ? (e = this.getOrigPosition(), t.openOpacity && (e.opacity = .1)) : "fade" === i && (e.opacity = .1), r.wrap.css(e).animate(o, {
          duration: "none" === i ? 0 : t.openSpeed,
          easing: t.openEasing,
          step: s ? this.step : null,
          complete: r._afterZoomIn
        })
      },
      zoomOut: function () {
        var t = r.current,
          e = t.closeEffect,
          i = "elastic" === e,
          s = {
            opacity: .1
          };
        i && (s = this.getOrigPosition(), t.closeOpacity && (s.opacity = .1)), r.wrap.animate(s, {
          duration: "none" === e ? 0 : t.closeSpeed,
          easing: t.closeEasing,
          step: i ? this.step : null,
          complete: r._afterZoomOut
        })
      },
      changeIn: function () {
        var t = r.current,
          e = t.nextEffect,
          i = t.pos,
          s = {
            opacity: 1
          },
          o = r.direction,
          n = 200,
          a;
        i.opacity = .1, "elastic" === e && (a = "down" === o || "up" === o ? "top" : "left", "down" === o || "right" === o ? (i[a] = g(f(i[a]) - n), s[a] = "+=" + n + "px") : (i[a] = g(f(i[a]) + n), s[a] = "-=" + n + "px")), "none" === e ? r._afterZoomIn() : r.wrap.css(i).animate(s, {
          duration: t.nextSpeed,
          easing: t.nextEasing,
          complete: r._afterZoomIn
        })
      },
      changeOut: function () {
        var t = r.previous,
          e = t.prevEffect,
          i = {
            opacity: .1
          },
          s = r.direction,
          o = 200;
        "elastic" === e && (i["down" === s || "up" === s ? "top" : "left"] = ("up" === s || "left" === s ? "-" : "+") + "=" + o + "px"), t.wrap.animate(i, {
          duration: "none" === e ? 0 : t.prevSpeed,
          easing: t.prevEasing,
          complete: function () {
            $(this).trigger("onReset").remove()
          }
        })
      }
    }, r.helpers.overlay = {
      defaults: {
        closeClick: !0,
        speedOut: 200,
        showEarly: !0,
        css: {},
        locked: !h,
        fixed: !0
      },
      overlay: null,
      fixed: !1,
      el: $("html"),
      create: function (t) {
        t = $.extend({}, this.defaults, t), this.overlay && this.close(), this.overlay = $('<div class="fancybox-overlay"></div>').appendTo(r.coming ? r.coming.parent : t.parent), this.fixed = !1, t.fixed && r.defaults.fixed && (this.overlay.addClass("fancybox-overlay-fixed"), this.fixed = !0)
      },
      open: function (t) {
        var e = this;
        t = $.extend({}, this.defaults, t), this.overlay ? this.overlay.unbind(".overlay").width("auto").height("auto") : this.create(t), this.fixed || (o.bind("resize.overlay", $.proxy(this.update, this)), this.update()), t.closeClick && this.overlay.bind("click.overlay", function (t) {
          if ($(t.target).hasClass("fancybox-overlay")) return r.isActive ? r.close() : e.close(), !1
        }), this.overlay.css(t.css).show()
      },
      close: function () {
        var t, e;
        o.unbind("resize.overlay"), this.el.hasClass("fancybox-lock") && ($(".fancybox-margin").removeClass("fancybox-margin"), t = o.scrollTop(), e = o.scrollLeft(), this.el.removeClass("fancybox-lock"), o.scrollTop(t).scrollLeft(e)), $(".fancybox-overlay").remove().hide(), $.extend(this, {
          overlay: null,
          fixed: !1
        })
      },
      update: function () {
        var t = "100%",
          i;
        this.overlay.width(t).height("100%"), a ? (i = Math.max(e.documentElement.offsetWidth, e.body.offsetWidth), n.width() > i && (t = n.width())) : n.width() > o.width() && (t = n.width()), this.overlay.width(t).height(n.height())
      },
      onReady: function (t, e) {
        var i = this.overlay;
        $(".fancybox-overlay").stop(!0, !0), i || this.create(t), t.locked && this.fixed && e.fixed && (i || (this.margin = n.height() > o.height() && $("html").css("margin-right").replace("px", "")), e.locked = this.overlay.append(e.wrap), e.fixed = !1), t.showEarly === !0 && this.beforeShow.apply(this, arguments)
      },
      beforeShow: function (t, e) {
        var i, s;
        e.locked && (this.margin !== !1 && ($("*").filter(function () {
          return "fixed" === $(this).css("position") && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap")
        }).addClass("fancybox-margin"), this.el.addClass("fancybox-margin")), i = o.scrollTop(), s = o.scrollLeft(), this.el.addClass("fancybox-lock"), o.scrollTop(i).scrollLeft(s)), this.open(t)
      },
      onUpdate: function () {
        this.fixed || this.update()
      },
      afterClose: function (t) {
        this.overlay && !r.coming && this.overlay.fadeOut(t.speedOut, $.proxy(this.close, this))
      }
    }, r.helpers.title = {
      defaults: {
        type: "float",
        position: "bottom"
      },
      beforeShow: function (t) {
        var e = r.current,
          i = e.title,
          s = t.type,
          o, n;
        if ($.isFunction(i) && (i = i.call(e.element, e)), d(i) && "" !== $.trim(i)) {
          switch (o = $('<div class="fancybox-title fancybox-title-' + s + '-wrap">' + i + "</div>"), s) {
            case "inside":
              n = r.skin;
              break;
            case "outside":
              n = r.wrap;
              break;
            case "over":
              n = r.inner;
              break;
            default:
              n = r.skin, o.appendTo("body"), a && o.width(o.width()), o.wrapInner('<span class="child"></span>'), r.current.margin[2] += Math.abs(f(o.css("margin-bottom")))
          }
          o["top" === t.position ? "prependTo" : "appendTo"](n)
        }
      }
    }, $.fn.fancybox = function (t) {
      var e, i = $(this),
        s = this.selector || "",
        o = function (o) {
          var n = $(this).blur(),
            a = e,
            l, h;
          o.ctrlKey || o.altKey || o.shiftKey || o.metaKey || n.is(".fancybox-wrap") || (l = t.groupAttr || "data-fancybox-group", h = n.attr(l), h || (l = "rel", h = n.get(0)[l]), h && "" !== h && "nofollow" !== h && (n = s.length ? $(s) : i, n = n.filter("[" + l + '="' + h + '"]'), a = n.index(this)), t.index = a, r.open(n, t) !== !1 && o.preventDefault())
        };
      return t = t || {}, e = t.index || 0, s && t.live !== !1 ? n.undelegate(s, "click.fb-start").delegate(s + ":not('.fancybox-item, .fancybox-nav')", "click.fb-start", o) : i.unbind("click.fb-start").bind("click.fb-start", o), this.filter("[data-fancybox-start=1]").trigger("click"), this
    }, n.ready(function () {
      var e, o;
      $.scrollbarWidth === i && ($.scrollbarWidth = function () {
        var t = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),
          e = t.children(),
          i = e.innerWidth() - e.height(99).innerWidth();
        return t.remove(), i
      }), $.support.fixedPosition === i && ($.support.fixedPosition = function () {
        var t = $('<div style="position:fixed;top:20px;"></div>').appendTo("body"),
          e = 20 === t[0].offsetTop || 15 === t[0].offsetTop;
        return t.remove(), e
      }()), $.extend(r.defaults, {
        scrollbarWidth: $.scrollbarWidth(),
        fixed: $.support.fixedPosition,
        parent: $("body")
      }), e = $(t).width(), s.addClass("fancybox-lock-test"), o = $(t).width(), s.removeClass("fancybox-lock-test"), $("<style type='text/css'>.fancybox-margin{margin-right:" + (o - e) + "px;}</style>").appendTo("head")
    })
  }(window, document, jQuery),
  function (t) {
    "function" == typeof define && define.amd ? define(["jquery"], t) : t("object" == typeof module && module.exports ? require("jquery") : jQuery)
  }(function ($) {
    function t(t) {
      var e = {},
        i = /^jQuery\d+$/;
      return $.each(t.attributes, function (t, s) {
        s.specified && !i.test(s.name) && (e[s.name] = s.value)
      }), e
    }

    function e(t, e) {
      var i = this,
        o = $(i);
      if (i.value === o.attr("placeholder") && o.hasClass(d.customClass))
        if (i.value = "", o.removeClass(d.customClass), o.data("placeholder-password")) {
          if (o = o.hide().nextAll('input[type="password"]:first').show().attr("id", o.removeAttr("id").data("placeholder-id")), t === !0) return o[0].value = e, e;
          o.focus()
        } else i == s() && i.select()
    }

    function i(i) {
      var s, o = this,
        n = $(o),
        r = o.id;
      if (i && "blur" === i.type) {
        if (n.hasClass(d.customClass)) return;
        if ("password" === o.type && (s = n.prevAll('input[type="text"]:first'), s.length > 0 && s.is(":visible"))) return
      }
      if ("" === o.value) {
        if ("password" === o.type) {
          if (!n.data("placeholder-textinput")) {
            try {
              s = n.clone().prop({
                type: "text"
              })
            } catch (e) {
              s = $("<input>").attr($.extend(t(this), {
                type: "text"
              }))
            }
            s.removeAttr("name").data({
              "placeholder-enabled": !0,
              "placeholder-password": n,
              "placeholder-id": r
            }).bind("focus.placeholder", e), n.data({
              "placeholder-textinput": s,
              "placeholder-id": r
            }).before(s)
          }
          o.value = "", n = n.removeAttr("id").hide().prevAll('input[type="text"]:first').attr("id", n.data("placeholder-id")).show()
        } else {
          var a = n.data("placeholder-password");
          a && (a[0].value = "", n.attr("id", n.data("placeholder-id")).show().nextAll('input[type="password"]:last').hide().removeAttr("id"))
        }
        n.addClass(d.customClass), n[0].value = n.attr("placeholder")
      } else n.removeClass(d.customClass)
    }

    function s() {
      try {
        return document.activeElement
      } catch (t) {
      }
    }

    var o = "[object OperaMini]" === Object.prototype.toString.call(window.operamini),
      n = "placeholder" in document.createElement("input") && !o,
      r = "placeholder" in document.createElement("textarea") && !o,
      a = $.valHooks,
      l = $.propHooks,
      h, c, d = {};
    n && r ? (c = $.fn.placeholder = function () {
      return this
    }, c.input = !0, c.textarea = !0) : (c = $.fn.placeholder = function (t) {
      var s = {
        customClass: "placeholder"
      };
      return d = $.extend({}, s, t), this.filter((n ? "textarea" : ":input") + "[placeholder]").not("." + d.customClass).bind({
        "focus.placeholder": e,
        "blur.placeholder": i
      }).data("placeholder-enabled", !0).trigger("blur.placeholder")
    }, c.input = n, c.textarea = r, h = {
      get: function (t) {
        var e = $(t),
          i = e.data("placeholder-password");
        return i ? i[0].value : e.data("placeholder-enabled") && e.hasClass(d.customClass) ? "" : t.value
      },
      set: function (t, o) {
        var n = $(t),
          r, a;
        return "" !== o && (r = n.data("placeholder-textinput"), a = n.data("placeholder-password"), r ? (e.call(r[0], !0, o) || (t.value = o), r[0].value = o) : a && (e.call(t, !0, o) || (a[0].value = o), t.value = o)), n.data("placeholder-enabled") ? ("" === o ? (t.value = o, t != s() && i.call(t)) : (n.hasClass(d.customClass) && e.call(t), t.value = o), n) : (t.value = o, n)
      }
    }, n || (a.input = h, l.value = h), r || (a.textarea = h, l.value = h), $(function () {
      $(document).delegate("form", "submit.placeholder", function () {
        var t = $("." + d.customClass, this).each(function () {
          e.call(this, !0, "")
        });
        setTimeout(function () {
          t.each(i)
        }, 10)
      })
    }), $(window).bind("beforeunload.placeholder", function () {
      $("." + d.customClass).each(function () {
        this.value = ""
      })
    }))
  }),
  function () {
    var $, t, e, i, s, o = {}.hasOwnProperty,
      n = function (t, e) {
        function i() {
          this.constructor = t
        }

        for (var s in e) o.call(e, s) && (t[s] = e[s]);
        return i.prototype = e.prototype, t.prototype = new i, t.__super__ = e.prototype, t
      };
    i = function () {
      function t() {
        this.options_index = 0, this.parsed = []
      }

      return t.prototype.add_node = function (t) {
        return "OPTGROUP" === t.nodeName.toUpperCase() ? this.add_group(t) : this.add_option(t)
      }, t.prototype.add_group = function (t) {
        var e, i, s, o, n, r;
        for (e = this.parsed.length, this.parsed.push({
          array_index: e,
          group: !0,
          label: this.escapeExpression(t.label),
          title: t.title ? t.title : void 0,
          children: 0,
          disabled: t.disabled,
          classes: t.className
        }), n = t.childNodes, r = [], s = 0, o = n.length; s < o; s++) i = n[s], r.push(this.add_option(i, e, t.disabled));
        return r
      }, t.prototype.add_option = function (t, e, i) {
        if ("OPTION" === t.nodeName.toUpperCase()) return "" !== t.text ? (null != e && (this.parsed[e].children += 1), this.parsed.push({
          array_index: this.parsed.length,
          options_index: this.options_index,
          value: t.value,
          text: t.text,
          html: t.innerHTML,
          title: t.title ? t.title : void 0,
          selected: t.selected,
          disabled: i === !0 ? i : t.disabled,
          group_array_index: e,
          group_label: null != e ? this.parsed[e].label : null,
          classes: t.className,
          style: t.style.cssText
        })) : this.parsed.push({
          array_index: this.parsed.length,
          options_index: this.options_index,
          empty: !0
        }), this.options_index += 1
      }, t.prototype.escapeExpression = function (t) {
        var e, i;
        return null == t || t === !1 ? "" : /[\&\<\>\"\'\`]/.test(t) ? (e = {
          "<": "&lt;",
          ">": "&gt;",
          '"': "&quot;",
          "'": "&#x27;",
          "`": "&#x60;"
        }, i = /&(?!\w+;)|[\<\>\"\'\`]/g, t.replace(i, function (t) {
          return e[t] || "&amp;"
        })) : t
      }, t
    }(), i.select_to_array = function (t) {
      var e, s, o, n, r;
      for (s = new i, r = t.childNodes, o = 0, n = r.length; o < n; o++) e = r[o], s.add_node(e);
      return s.parsed
    }, t = function () {
      function t(e, i) {
        this.form_field = e, this.options = null != i ? i : {}, t.browser_is_supported() && (this.is_multiple = this.form_field.multiple, this.set_default_text(), this.set_default_values(), this.setup(), this.set_up_html(), this.register_observers(), this.on_ready())
      }

      return t.prototype.set_default_values = function () {
        var t = this;
        return this.click_test_action = function (e) {
          return t.test_active_click(e)
        }, this.activate_action = function (e) {
          return t.activate_field(e)
        }, this.active_field = !1, this.mouse_on_container = !1, this.results_showing = !1, this.result_highlighted = null, this.allow_single_deselect = null != this.options.allow_single_deselect && null != this.form_field.options[0] && "" === this.form_field.options[0].text && this.options.allow_single_deselect, this.disable_search_threshold = this.options.disable_search_threshold || 0, this.disable_search = this.options.disable_search || !1, this.enable_split_word_search = null == this.options.enable_split_word_search || this.options.enable_split_word_search, this.group_search = null == this.options.group_search || this.options.group_search, this.search_contains = this.options.search_contains || !1, this.single_backstroke_delete = null == this.options.single_backstroke_delete || this.options.single_backstroke_delete, this.max_selected_options = this.options.max_selected_options || 1 / 0, this.inherit_select_classes = this.options.inherit_select_classes || !1, this.display_selected_options = null == this.options.display_selected_options || this.options.display_selected_options, this.display_disabled_options = null == this.options.display_disabled_options || this.options.display_disabled_options, this.include_group_label_in_selected = this.options.include_group_label_in_selected || !1
      }, t.prototype.set_default_text = function () {
        return this.form_field.getAttribute("data-placeholder") ? this.default_text = this.form_field.getAttribute("data-placeholder") : this.is_multiple ? this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || t.default_multiple_text : this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || t.default_single_text, this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || t.default_no_result_text
      }, t.prototype.choice_label = function (t) {
        return this.include_group_label_in_selected && null != t.group_label ? "<b class='group-name'>" + t.group_label + "</b>" + t.html : t.html
      }, t.prototype.mouse_enter = function () {
        return this.mouse_on_container = !0
      }, t.prototype.mouse_leave = function () {
        return this.mouse_on_container = !1
      }, t.prototype.input_focus = function (t) {
        var e = this;
        if (this.is_multiple) {
          if (!this.active_field) return setTimeout(function () {
            return e.container_mousedown()
          }, 50)
        } else if (!this.active_field) return this.activate_field()
      }, t.prototype.input_blur = function (t) {
        var e = this;
        if (!this.mouse_on_container) return this.active_field = !1, setTimeout(function () {
          return e.blur_test()
        }, 100)
      }, t.prototype.results_option_build = function (t) {
        var e, i, s, o, n;
        for (e = "", n = this.results_data, s = 0, o = n.length; s < o; s++) i = n[s], e += i.group ? this.result_add_group(i) : this.result_add_option(i), (null != t ? t.first : void 0) && (i.selected && this.is_multiple ? this.choice_build(i) : i.selected && !this.is_multiple && this.single_set_selected_text(this.choice_label(i)));
        return e
      }, t.prototype.result_add_option = function (t) {
        var e, i;
        return t.search_match && this.include_option_in_results(t) ? (e = [], t.disabled || t.selected && this.is_multiple || e.push("active-result"), !t.disabled || t.selected && this.is_multiple || e.push("disabled-result"), t.selected && e.push("result-selected"), null != t.group_array_index && e.push("group-option"), "" !== t.classes && e.push(t.classes), i = document.createElement("li"), i.className = e.join(" "), i.style.cssText = t.style, i.setAttribute("data-option-array-index", t.array_index), i.innerHTML = t.search_text, t.title && (i.title = t.title), this.outerHTML(i)) : ""
      }, t.prototype.result_add_group = function (t) {
        var e, i;
        return (t.search_match || t.group_match) && t.active_options > 0 ? (e = [], e.push("group-result"), t.classes && e.push(t.classes), i = document.createElement("li"), i.className = e.join(" "), i.innerHTML = t.search_text, t.title && (i.title = t.title), this.outerHTML(i)) : ""
      }, t.prototype.results_update_field = function () {
        if (this.set_default_text(), this.is_multiple || this.results_reset_cleanup(), this.result_clear_highlight(), this.results_build(), this.results_showing) return this.winnow_results()
      }, t.prototype.reset_single_select_options = function () {
        var t, e, i, s, o;
        for (s = this.results_data, o = [], e = 0, i = s.length; e < i; e++) t = s[e], t.selected ? o.push(t.selected = !1) : o.push(void 0);
        return o
      }, t.prototype.results_toggle = function () {
        return this.results_showing ? this.results_hide() : this.results_show()
      }, t.prototype.results_search = function (t) {
        return this.results_showing ? this.winnow_results() : this.results_show()
      }, t.prototype.winnow_results = function () {
        var t, e, i, s, o, n, r, a, l, h, c, d;
        for (this.no_results_clear(), s = 0, n = this.get_search_text(), t = n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), l = new RegExp(t, "i"), i = this.get_search_regex(t), d = this.results_data, h = 0, c = d.length; h < c; h++) e = d[h], e.search_match = !1, o = null, this.include_option_in_results(e) && (e.group && (e.group_match = !1, e.active_options = 0), null != e.group_array_index && this.results_data[e.group_array_index] && (o = this.results_data[e.group_array_index], 0 === o.active_options && o.search_match && (s += 1), o.active_options += 1), e.search_text = e.group ? e.label : e.html, e.group && !this.group_search || (e.search_match = this.search_string_match(e.search_text, i), e.search_match && !e.group && (s += 1), e.search_match ? (n.length && (r = e.search_text.search(l), a = e.search_text.substr(0, r + n.length) + "</span>" + e.search_text.substr(r + n.length), e.search_text = a.substr(0, r) + "<span>" + a.substr(r)), null != o && (o.group_match = !0)) : null != e.group_array_index && this.results_data[e.group_array_index].search_match && (e.search_match = !0)));
        return this.result_clear_highlight(), s < 1 && n.length ? (this.update_results_content(""), this.no_results(n)) : (this.update_results_content(this.results_option_build()), this.winnow_results_set_highlight())
      }, t.prototype.get_search_regex = function (t) {
        var e;
        return e = this.search_contains ? "" : "^", new RegExp(e + t, "i")
      }, t.prototype.search_string_match = function (t, e) {
        var i, s, o, n;
        if (e.test(t)) return !0;
        if (this.enable_split_word_search && (t.indexOf(" ") >= 0 || 0 === t.indexOf("[")) && (s = t.replace(/\[|\]/g, "").split(" "), s.length))
          for (o = 0, n = s.length; o < n; o++)
            if (i = s[o], e.test(i)) return !0
      }, t.prototype.choices_count = function () {
        var t, e, i, s;
        if (null != this.selected_option_count) return this.selected_option_count;
        for (this.selected_option_count = 0, s = this.form_field.options, e = 0, i = s.length; e < i; e++) t = s[e], t.selected && (this.selected_option_count += 1);
        return this.selected_option_count;
      }, t.prototype.choices_click = function (t) {
        if (t.preventDefault(), !this.results_showing && !this.is_disabled) return this.results_show()
      }, t.prototype.keyup_checker = function (t) {
        var e, i;
        switch (e = null != (i = t.which) ? i : t.keyCode, this.search_field_scale(), e) {
          case 8:
            if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) return this.keydown_backstroke();
            if (!this.pending_backstroke) return this.result_clear_highlight(), this.results_search();
            break;
          case 13:
            if (t.preventDefault(), this.results_showing) return this.result_select(t);
            break;
          case 27:
            return this.results_showing && this.results_hide(), !0;
          case 9:
          case 38:
          case 40:
          case 16:
          case 91:
          case 17:
            break;
          default:
            return this.results_search()
        }
      }, t.prototype.clipboard_event_checker = function (t) {
        var e = this;
        return setTimeout(function () {
          return e.results_search()
        }, 50)
      }, t.prototype.container_width = function () {
        return null != this.options.width ? this.options.width : "" + this.form_field.offsetWidth + "px"
      }, t.prototype.include_option_in_results = function (t) {
        return !(this.is_multiple && !this.display_selected_options && t.selected) && (!(!this.display_disabled_options && t.disabled) && !t.empty)
      }, t.prototype.search_results_touchstart = function (t) {
        return this.touch_started = !0, this.search_results_mouseover(t)
      }, t.prototype.search_results_touchmove = function (t) {
        return this.touch_started = !1, this.search_results_mouseout(t)
      }, t.prototype.search_results_touchend = function (t) {
        if (this.touch_started) return this.search_results_mouseup(t)
      }, t.prototype.outerHTML = function (t) {
        var e;
        return t.outerHTML ? t.outerHTML : (e = document.createElement("div"), e.appendChild(t), e.innerHTML)
      }, t.browser_is_supported = function () {
        return "Microsoft Internet Explorer" === window.navigator.appName ? document.documentMode >= 8 : !/iP(od|hone)/i.test(window.navigator.userAgent) && (!/Android/i.test(window.navigator.userAgent) || !/Mobile/i.test(window.navigator.userAgent))
      }, t.default_multiple_text = "Bitte etwas auswählen", t.default_single_text = "Bitte etwas auswählen", t.default_no_result_text = "Keine Ergebnisse für", t
    }(), $ = jQuery, $.fn.extend({
      chosen: function (i) {
        return t.browser_is_supported() ? this.each(function (t) {
          var s, o;
          s = $(this), o = s.data("chosen"), "destroy" === i && o instanceof e ? o.destroy() : o instanceof e || s.data("chosen", new e(this, i))
        }) : this
      }
    }), e = function (t) {
      function e() {
        return s = e.__super__.constructor.apply(this, arguments)
      }

      return n(e, t), e.prototype.setup = function () {
        return this.form_field_jq = $(this.form_field), this.current_selectedIndex = this.form_field.selectedIndex, this.is_rtl = this.form_field_jq.hasClass("chosen-rtl")
      }, e.prototype.set_up_html = function () {
        var t, e;
        return t = ["chosen-container"], t.push("chosen-container-" + (this.is_multiple ? "multi" : "single")), this.inherit_select_classes && this.form_field.className && t.push(this.form_field.className), this.is_rtl && t.push("chosen-rtl"), e = {
          class: t.join(" "),
          style: "width: " + this.container_width() + ";",
          title: this.form_field.title
        }, this.form_field.id.length && (e.id = this.form_field.id.replace(/[^\w]/g, "_") + "_chosen"), this.container = $("<div />", e), this.is_multiple ? this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>') : this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'), this.form_field_jq.hide().after(this.container), this.dropdown = this.container.find("div.chosen-drop").first(), this.search_field = this.container.find("input").first(), this.search_results = this.container.find("ul.chosen-results").first(), this.search_field_scale(), this.search_no_results = this.container.find("li.no-results").first(), this.is_multiple ? (this.search_choices = this.container.find("ul.chosen-choices").first(), this.search_container = this.container.find("li.search-field").first()) : (this.search_container = this.container.find("div.chosen-search").first(), this.selected_item = this.container.find(".chosen-single").first()), this.results_build(), this.set_tab_index(), this.set_label_behavior()
      }, e.prototype.on_ready = function () {
        return this.form_field_jq.trigger("chosen:ready", {
          chosen: this
        })
      }, e.prototype.register_observers = function () {
        var t = this;
        return this.container.bind("touchstart.chosen", function (e) {
          return t.container_mousedown(e), e.preventDefault()
        }), this.container.bind("touchend.chosen", function (e) {
          return t.container_mouseup(e), e.preventDefault()
        }), this.container.bind("mousedown.chosen", function (e) {
          t.container_mousedown(e)
        }), this.container.bind("mouseup.chosen", function (e) {
          t.container_mouseup(e)
        }), this.container.bind("mouseenter.chosen", function (e) {
          t.mouse_enter(e)
        }), this.container.bind("mouseleave.chosen", function (e) {
          t.mouse_leave(e)
        }), this.search_results.bind("mouseup.chosen", function (e) {
          t.search_results_mouseup(e)
        }), this.search_results.bind("mouseover.chosen", function (e) {
          t.search_results_mouseover(e)
        }), this.search_results.bind("mouseout.chosen", function (e) {
          t.search_results_mouseout(e)
        }), this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen", function (e) {
          t.search_results_mousewheel(e)
        }), this.search_results.bind("touchstart.chosen", function (e) {
          t.search_results_touchstart(e)
        }), this.search_results.bind("touchmove.chosen", function (e) {
          t.search_results_touchmove(e)
        }), this.search_results.bind("touchend.chosen", function (e) {
          t.search_results_touchend(e)
        }), this.form_field_jq.bind("chosen:updated.chosen", function (e) {
          t.results_update_field(e)
        }), this.form_field_jq.bind("chosen:activate.chosen", function (e) {
          t.activate_field(e)
        }), this.form_field_jq.bind("chosen:open.chosen", function (e) {
          t.container_mousedown(e)
        }), this.form_field_jq.bind("chosen:close.chosen", function (e) {
          t.input_blur(e)
        }), this.search_field.bind("blur.chosen", function (e) {
          t.input_blur(e)
        }), this.search_field.bind("keyup.chosen", function (e) {
          t.keyup_checker(e)
        }), this.search_field.bind("keydown.chosen", function (e) {
          t.keydown_checker(e)
        }), this.search_field.bind("focus.chosen", function (e) {
          t.input_focus(e)
        }), this.search_field.bind("cut.chosen", function (e) {
          t.clipboard_event_checker(e)
        }), this.search_field.bind("paste.chosen", function (e) {
          t.clipboard_event_checker(e)
        }), this.is_multiple ? this.search_choices.bind("click.chosen", function (e) {
          t.choices_click(e)
        }) : this.container.bind("click.chosen", function (t) {
          t.preventDefault()
        })
      }, e.prototype.destroy = function () {
        return $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action), this.search_field[0].tabIndex && (this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex), this.container.remove(), this.form_field_jq.removeData("chosen"), this.form_field_jq.show()
      }, e.prototype.search_field_disabled = function () {
        return this.is_disabled = this.form_field_jq[0].disabled, this.is_disabled ? (this.container.addClass("chosen-disabled"), this.search_field[0].disabled = !0, this.is_multiple || this.selected_item.unbind("focus.chosen", this.activate_action), this.close_field()) : (this.container.removeClass("chosen-disabled"), this.search_field[0].disabled = !1, this.is_multiple ? void 0 : this.selected_item.bind("focus.chosen", this.activate_action))
      }, e.prototype.container_mousedown = function (t) {
        if (!this.is_disabled && (t && "mousedown" === t.type && !this.results_showing && t.preventDefault(), null == t || !$(t.target).hasClass("search-choice-close"))) return this.active_field ? this.is_multiple || !t || $(t.target)[0] !== this.selected_item[0] && !$(t.target).parents("a.chosen-single").length || (t.preventDefault(), this.results_toggle()) : (this.is_multiple && this.search_field.val(""), $(this.container[0].ownerDocument).bind("click.chosen", this.click_test_action), this.results_show()), this.activate_field()
      }, e.prototype.container_mouseup = function (t) {
        if ("ABBR" === t.target.nodeName && !this.is_disabled) return this.results_reset(t)
      }, e.prototype.search_results_mousewheel = function (t) {
        var e;
        if (t.originalEvent && (e = t.originalEvent.deltaY || -t.originalEvent.wheelDelta || t.originalEvent.detail), null != e) return t.preventDefault(), "DOMMouseScroll" === t.type && (e = 40 * e), this.search_results.scrollTop(e + this.search_results.scrollTop())
      }, e.prototype.blur_test = function (t) {
        if (!this.active_field && this.container.hasClass("chosen-container-active")) return this.close_field()
      }, e.prototype.close_field = function () {
        return $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action), this.active_field = !1, this.results_hide(), this.container.removeClass("chosen-container-active"), this.clear_backstroke(), this.show_search_field_default(), this.search_field_scale()
      }, e.prototype.activate_field = function () {
        return this.container.addClass("chosen-container-active"), this.active_field = !0, this.search_field.val(this.search_field.val()), this.search_field.focus()
      }, e.prototype.test_active_click = function (t) {
        var e;
        return e = $(t.target).closest(".chosen-container"), e.length && this.container[0] === e[0] ? this.active_field = !0 : this.close_field()
      }, e.prototype.results_build = function () {
        return this.parsing = !0, this.selected_option_count = null, this.results_data = i.select_to_array(this.form_field), this.is_multiple ? this.search_choices.find("li.search-choice").remove() : this.is_multiple || (this.single_set_selected_text(), this.disable_search || this.form_field.options.length <= this.disable_search_threshold ? (this.search_field[0].readOnly = !0, this.container.addClass("chosen-container-single-nosearch")) : (this.search_field[0].readOnly = !1, this.container.removeClass("chosen-container-single-nosearch"))), this.update_results_content(this.results_option_build({
          first: !0
        })), this.search_field_disabled(), this.show_search_field_default(), this.search_field_scale(), this.parsing = !1
      }, e.prototype.result_do_highlight = function (t) {
        var e, i, s, o, n;
        if (t.length) {
          if (this.result_clear_highlight(), this.result_highlight = t, this.result_highlight.addClass("highlighted"), s = parseInt(this.search_results.css("maxHeight"), 10), n = this.search_results.scrollTop(), o = s + n, i = this.result_highlight.position().top + this.search_results.scrollTop(), e = i + this.result_highlight.outerHeight(), e >= o) return this.search_results.scrollTop(e - s > 0 ? e - s : 0);
          if (i < n) return this.search_results.scrollTop(i)
        }
      }, e.prototype.result_clear_highlight = function () {
        return this.result_highlight && this.result_highlight.removeClass("highlighted"), this.result_highlight = null
      }, e.prototype.results_show = function () {
        return this.is_multiple && this.max_selected_options <= this.choices_count() ? (this.form_field_jq.trigger("chosen:maxselected", {
          chosen: this
        }), !1) : (this.container.addClass("chosen-with-drop"), this.results_showing = !0, this.search_field.focus(), this.search_field.val(this.search_field.val()), this.winnow_results(), this.form_field_jq.trigger("chosen:showing_dropdown", {
          chosen: this
        }))
      }, e.prototype.update_results_content = function (t) {
        return this.search_results.html(t)
      }, e.prototype.results_hide = function () {
        return this.results_showing && (this.result_clear_highlight(), this.container.removeClass("chosen-with-drop"), this.form_field_jq.trigger("chosen:hiding_dropdown", {
          chosen: this
        })), this.results_showing = !1
      }, e.prototype.set_tab_index = function (t) {
        var e;
        if (this.form_field.tabIndex) return e = this.form_field.tabIndex, this.form_field.tabIndex = -1, this.search_field[0].tabIndex = e
      }, e.prototype.set_label_behavior = function () {
        var t = this;
        if (this.form_field_label = this.form_field_jq.parents("label"), !this.form_field_label.length && this.form_field.id.length && (this.form_field_label = $("label[for='" + this.form_field.id + "']")), this.form_field_label.length > 0) return this.form_field_label.bind("click.chosen", function (e) {
          return t.is_multiple ? t.container_mousedown(e) : t.activate_field()
        })
      }, e.prototype.show_search_field_default = function () {
        return this.is_multiple && this.choices_count() < 1 && !this.active_field ? (this.search_field.val(this.default_text), this.search_field.addClass("default")) : (this.search_field.val(""), this.search_field.removeClass("default"))
      }, e.prototype.search_results_mouseup = function (t) {
        var e;
        if (e = $(t.target).hasClass("active-result") ? $(t.target) : $(t.target).parents(".active-result").first(), e.length) return this.result_highlight = e, this.result_select(t), this.search_field.focus()
      }, e.prototype.search_results_mouseover = function (t) {
        var e;
        if (e = $(t.target).hasClass("active-result") ? $(t.target) : $(t.target).parents(".active-result").first()) return this.result_do_highlight(e)
      }, e.prototype.search_results_mouseout = function (t) {
        if ($(t.target).hasClass("active-result")) return this.result_clear_highlight()
      }, e.prototype.choice_build = function (t) {
        var e, i, s = this;
        return e = $("<li />", {
          class: "search-choice"
        }).html("<span>" + this.choice_label(t) + "</span>"), t.disabled ? e.addClass("search-choice-disabled") : (i = $("<a />", {
          class: "search-choice-close",
          "data-option-array-index": t.array_index
        }), i.bind("click.chosen", function (t) {
          return s.choice_destroy_link_click(t)
        }), e.append(i)), this.search_container.before(e)
      }, e.prototype.choice_destroy_link_click = function (t) {
        if (t.preventDefault(), t.stopPropagation(), !this.is_disabled) return this.choice_destroy($(t.target))
      }, e.prototype.choice_destroy = function (t) {
        if (this.result_deselect(t[0].getAttribute("data-option-array-index"))) return this.show_search_field_default(), this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1 && this.results_hide(), t.parents("li").first().remove(), this.search_field_scale()
      }, e.prototype.results_reset = function () {
        if (this.reset_single_select_options(), this.form_field.options[0].selected = !0, this.single_set_selected_text(), this.show_search_field_default(), this.results_reset_cleanup(), this.form_field_jq.trigger("change"), this.active_field) return this.results_hide()
      }, e.prototype.results_reset_cleanup = function () {
        return this.current_selectedIndex = this.form_field.selectedIndex, this.selected_item.find("abbr").remove()
      }, e.prototype.result_select = function (t) {
        var e, i;
        if (this.result_highlight) return e = this.result_highlight, this.result_clear_highlight(), this.is_multiple && this.max_selected_options <= this.choices_count() ? (this.form_field_jq.trigger("chosen:maxselected", {
          chosen: this
        }), !1) : (this.is_multiple ? e.removeClass("active-result") : this.reset_single_select_options(), i = this.results_data[e[0].getAttribute("data-option-array-index")], i.selected = !0, this.form_field.options[i.options_index].selected = !0, this.selected_option_count = null, this.is_multiple ? this.choice_build(i) : this.single_set_selected_text(this.choice_label(i)), (t.metaKey || t.ctrlKey) && this.is_multiple || this.results_hide(), this.search_field.val(""), (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) && this.form_field_jq.trigger("change", {
          selected: this.form_field.options[i.options_index].value
        }), this.current_selectedIndex = this.form_field.selectedIndex, t.preventDefault(), this.search_field_scale())
      }, e.prototype.single_set_selected_text = function (t) {
        return null == t && (t = this.default_text), t === this.default_text ? this.selected_item.addClass("chosen-default") : (this.single_deselect_control_build(), this.selected_item.removeClass("chosen-default")), this.selected_item.find("span").html(t)
      }, e.prototype.result_deselect = function (t) {
        var e;
        return e = this.results_data[t], !this.form_field.options[e.options_index].disabled && (e.selected = !1, this.form_field.options[e.options_index].selected = !1, this.selected_option_count = null, this.result_clear_highlight(), this.results_showing && this.winnow_results(), this.form_field_jq.trigger("change", {
          deselected: this.form_field.options[e.options_index].value
        }), this.search_field_scale(), !0)
      }, e.prototype.single_deselect_control_build = function () {
        if (this.allow_single_deselect) return this.selected_item.find("abbr").length || this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'), this.selected_item.addClass("chosen-single-with-deselect")
      }, e.prototype.get_search_text = function () {
        return $("<div/>").text($.trim(this.search_field.val())).html()
      }, e.prototype.winnow_results_set_highlight = function () {
        var t, e;
        if (e = this.is_multiple ? [] : this.search_results.find(".result-selected.active-result"), t = e.length ? e.first() : this.search_results.find(".active-result").first(), null != t) return this.result_do_highlight(t)
      }, e.prototype.no_results = function (t) {
        var e;
        return e = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>'), e.find("span").first().html(t), this.search_results.append(e), this.form_field_jq.trigger("chosen:no_results", {
          chosen: this
        })
      }, e.prototype.no_results_clear = function () {
        return this.search_results.find(".no-results").remove()
      }, e.prototype.keydown_arrow = function () {
        var t;
        return this.results_showing && this.result_highlight ? (t = this.result_highlight.nextAll("li.active-result").first()) ? this.result_do_highlight(t) : void 0 : this.results_show()
      }, e.prototype.keyup_arrow = function () {
        var t;
        return this.results_showing || this.is_multiple ? this.result_highlight ? (t = this.result_highlight.prevAll("li.active-result"), t.length ? this.result_do_highlight(t.first()) : (this.choices_count() > 0 && this.results_hide(), this.result_clear_highlight())) : void 0 : this.results_show()
      }, e.prototype.keydown_backstroke = function () {
        var t;
        return this.pending_backstroke ? (this.choice_destroy(this.pending_backstroke.find("a").first()), this.clear_backstroke()) : (t = this.search_container.siblings("li.search-choice").last(), t.length && !t.hasClass("search-choice-disabled") ? (this.pending_backstroke = t, this.single_backstroke_delete ? this.keydown_backstroke() : this.pending_backstroke.addClass("search-choice-focus")) : void 0)
      }, e.prototype.clear_backstroke = function () {
        return this.pending_backstroke && this.pending_backstroke.removeClass("search-choice-focus"), this.pending_backstroke = null
      }, e.prototype.keydown_checker = function (t) {
        var e, i;
        switch (e = null != (i = t.which) ? i : t.keyCode, this.search_field_scale(), 8 !== e && this.pending_backstroke && this.clear_backstroke(), e) {
          case 8:
            this.backstroke_length = this.search_field.val().length;
            break;
          case 9:
            this.results_showing && !this.is_multiple && this.result_select(t), this.mouse_on_container = !1;
            break;
          case 13:
            this.results_showing && t.preventDefault();
            break;
          case 32:
            this.disable_search && t.preventDefault();
            break;
          case 38:
            t.preventDefault(), this.keyup_arrow();
            break;
          case 40:
            t.preventDefault(), this.keydown_arrow()
        }
      }, e.prototype.search_field_scale = function () {
        var t, e, i, s, o, n, r, a, l;
        if (this.is_multiple) {
          for (i = 0, r = 0, o = "position:absolute; left: -1000px; top: -1000px; display:none;", n = ["font-size", "font-style", "font-weight", "font-family", "line-height", "text-transform", "letter-spacing"], a = 0, l = n.length; a < l; a++) s = n[a], o += s + ":" + this.search_field.css(s) + ";";
          return t = $("<div />", {
            style: o
          }), t.text(this.search_field.val()), $("body").append(t), r = t.width() + 25, t.remove(), e = this.container.outerWidth(), r > e - 10 && (r = e - 10), this.search_field.css({
            width: r + "px"
          })
        }
      }, e
    }(t)
  }.call(this),
  function ($) {
    var t = -1,
      e = -1,
      i = function (t) {
        return parseFloat(t) || 0
      },
      s = function (t) {
        var e = 1,
          s = $(t),
          o = null,
          n = [];
        return s.each(function () {
          var t = $(this),
            s = t.offset().top - i(t.css("margin-top")),
            r = n.length > 0 ? n[n.length - 1] : null;
          null === r ? n.push(t) : Math.floor(Math.abs(o - s)) <= e ? n[n.length - 1] = r.add(t) : n.push(t), o = s
        }), n
      },
      o = function (t) {
        var e = {
          byRow: !0,
          property: "height",
          target: null,
          remove: !1
        };
        return "object" == typeof t ? $.extend(e, t) : ("boolean" == typeof t ? e.byRow = t : "remove" === t && (e.remove = !0), e)
      },
      n = $.fn.matchHeight = function (t) {
        var e = o(t);
        if (e.remove) {
          var i = this;
          return this.css(e.property, ""), $.each(n._groups, function (t, e) {
            e.elements = e.elements.not(i)
          }), this
        }
        return this.length <= 1 && !e.target ? this : (n._groups.push({
          elements: this,
          options: e
        }), n._apply(this, e), this)
      };
    n._groups = [], n._throttle = 80, n._maintainScroll = !1, n._beforeUpdate = null, n._afterUpdate = null, n._apply = function (t, e) {
      var r = o(e),
        a = $(t),
        l = [a],
        h = $(window).scrollTop(),
        c = $("html").outerHeight(!0),
        d = a.parents().filter(":hidden");
      return d.each(function () {
        var t = $(this);
        t.data("style-cache", t.attr("style"))
      }), d.css("display", "block"), r.byRow && !r.target && (a.each(function () {
        var t = $(this),
          e = t.css("display");
        "inline-block" !== e && "inline-flex" !== e && (e = "block"), t.data("style-cache", t.attr("style")), t.css({
          display: e,
          "padding-top": "0",
          "padding-bottom": "0",
          "margin-top": "0",
          "margin-bottom": "0",
          "border-top-width": "0",
          "border-bottom-width": "0",
          height: "100px"
        })
      }), l = s(a), a.each(function () {
        var t = $(this);
        t.attr("style", t.data("style-cache") || "")
      })), $.each(l, function (t, e) {
        var s = $(e),
          o = 0;
        if (r.target) o = r.target.outerHeight(!1);
        else {
          if (r.byRow && s.length <= 1) return void s.css(r.property, "");
          s.each(function () {
            var t = $(this),
              e = t.css("display");
            "inline-block" !== e && "inline-flex" !== e && (e = "block");
            var i = {
              display: e
            };
            i[r.property] = "", t.css(i), t.outerHeight(!1) > o && (o = t.outerHeight(!1)), t.css("display", "")
          })
        }
        s.each(function () {
          var t = $(this),
            e = 0;
          r.target && t.is(r.target) || ("border-box" !== t.css("box-sizing") && (e += i(t.css("border-top-width")) + i(t.css("border-bottom-width")), e += i(t.css("padding-top")) + i(t.css("padding-bottom"))), t.css(r.property, o - e + "px"))
        })
      }), d.each(function () {
        var t = $(this);
        t.attr("style", t.data("style-cache") || null)
      }), n._maintainScroll && $(window).scrollTop(h / c * $("html").outerHeight(!0)), this
    }, n._applyDataApi = function () {
      var t = {};
      $("[data-match-height], [data-mh]").each(function () {
        var e = $(this),
          i = e.attr("data-mh") || e.attr("data-match-height");
        i in t ? t[i] = t[i].add(e) : t[i] = e
      }), $.each(t, function () {
        this.matchHeight(!0)
      })
    };
    var r = function (t) {
      n._beforeUpdate && n._beforeUpdate(t, n._groups), $.each(n._groups, function () {
        n._apply(this.elements, this.options)
      }), n._afterUpdate && n._afterUpdate(t, n._groups)
    };
    n._update = function (i, s) {
      if (s && "resize" === s.type) {
        var o = $(window).width();
        if (o === t) return;
        t = o
      }
      i ? e === -1 && (e = setTimeout(function () {
        r(s), e = -1
      }, n._throttle)) : r(s)
    }, $(n._applyDataApi), $(window).bind("load", function (t) {
      n._update(!1, t)
    }), $(window).bind("resize orientationchange", function (t) {
      n._update(!0, t)
    })
  }(jQuery),
  function ($) {
    $.belowthefold = function (t, e) {
      var i = $(window).height() + $(window).scrollTop();
      return i <= $(t).offset().top - e.threshold
    }, $.abovethetop = function (t, e) {
      var i = $(window).scrollTop();
      return i >= $(t).offset().top + $(t).height() - e.threshold
    }, $.rightofscreen = function (t, e) {
      var i = $(window).width() + $(window).scrollLeft();
      return i <= $(t).offset().left - e.threshold
    }, $.leftofscreen = function (t, e) {
      var i = $(window).scrollLeft();
      return i >= $(t).offset().left + $(t).width() - e.threshold
    }, $.inviewport = function (t, e) {
      return !($.rightofscreen(t, e) || $.leftofscreen(t, e) || $.belowthefold(t, e) || $.abovethetop(t, e))
    }, $.extend($.expr[":"], {
      "below-the-fold": function (t, e, i) {
        return $.belowthefold(t, {
          threshold: 0
        })
      },
      "above-the-top": function (t, e, i) {
        return $.abovethetop(t, {
          threshold: 0
        })
      },
      "left-of-screen": function (t, e, i) {
        return $.leftofscreen(t, {
          threshold: 0
        })
      },
      "right-of-screen": function (t, e, i) {
        return $.rightofscreen(t, {
          threshold: 0
        })
      },
      "in-viewport": function (t, e, i) {
        return $.inviewport(t, {
          threshold: 0
        })
      }
    })
  }(jQuery), $(function () {
  baseUrl = $("base").attr("href");
  var t = $(".sectionteaser .csc-textpic-text a");
  t.each(function () {
    var t = $(this).attr("href"),
      e = $(this).parents(".item");
    e.mouseover(function () {
      $(this).addClass("over")
    }), e.mouseleave(function () {
      $(this).removeClass("over")
    }), e.click(function () {
      window.location.href = baseUrl + t
    })
  });
  var e = $(".bottomboxes figure a");
  e.each(function () {
    var t = $(this).attr("href"),
      e = $(this).parents(".item");
    e.mouseover(function () {
      $(this).addClass("over")
    }), e.mouseleave(function () {
      $(this).removeClass("over")
    }), e.click(function () {
      window.location.href = baseUrl + t
    })
  });
  var i = $(".box.quicklink a");
  i.each(function () {
    var t = $(this).attr("href"),
      e = $(this).parents(".box");
    e.mouseover(function () {
      $(this).addClass("over")
    }), e.mouseleave(function () {
      $(this).removeClass("over")
    }), e.click(function () {
      window.location.href = baseUrl + t
    })
  })
}), $(function () {
  $(".gallery.big .ce-inner").addClass("owl-carousel"), $(".gallery.two .ce-inner").addClass("owl-carousel"), $(".gallery.three .ce-inner").addClass("owl-carousel"), slidesBig = $(".gallery.big .ce-center .ce-inner"), slidesTwo = $(".gallery.two .ce-center .ce-inner"), slidesThree = $(".gallery.three .ce-center .ce-inner"), $(".gallery.big div.ce-image .ce-column figure.image").each(function () {
    var t = $(this).find("img"),
      e = t.attr("width"),
      i = $(this).find(".image-caption");
    i.wrapInner("<span />"), t.wrap('<div class="imageContainer"><div class="icWrap"></div></div>')
  }), slidesBig.on("initialized.owl.carousel", function () {
    $(".gallery.big div.ce-image .ce-column figure.image").each(function () {
      var t = $(this).find("img"),
        e = t.attr("width"),
        i = $(this).find(".image-caption");
      i.find("span").css("width", e + "px")
    })
  }), $(".gallery.big").each(function (t) {
    $(this).append('<div class="customDots_' + t + ' owl-dots"></div>'), $(this).find(".ce-inner").owlCarousel({
      items: 1,
      stopOnHover: !0,
      navigation: !0,
      paginationSpeed: 1e3,
      goToFirstSpeed: 2e3,
      nav: !0,
      autoHeight: !0,
      dots: !0,
      lazyLoad: !0,
      dotsContainer: ".customDots_" + t
    })
  }), slidesBig.on("changed.owl.carousel", function (t) {
    var e = t.item.index,
      i = $(t.target).find(".owl-item").eq(e).find("img").width(),
      s = $(t.target).find(".owl-item").eq(e).find(".image-caption span");
    s.css("width", i + "px")
  }), slidesTwo.on("initialized.owl.carousel", function (t) {
    // var e = slidesTwo.find("figure a").length;
    // 0 === e ? (slidesTwo.find(".owl-item figure img").wrap('<div class="fixheight"><div></div></div>'), slidesTwo.find(".owl-item figure > .fixheight").matchHeight()) : slidesTwo.find(".owl-item figure > a").wrapInner('<div class="fixheight"></div>').matchHeight()
  }), slidesTwo.owlCarousel({
    items: 2,
    nav: !0,
    dots: !0,
    responsiveClass: !0,
    responsiveRefreshRate: 100,
    responsive: {
      0: {
        items: 1,
        nav: !1
      },
      540: {
        items: 2,
        nav: !0
      }
    }
  }), slidesThree.on("initialized.owl.carousel", function (t) {
    var e = slidesThree.find(".owl-carousel").height();
    slidesThree.find(".owl-nav > div").css("margin-top", "-" + e + "px")
  }), slidesThree.owlCarousel({
    items: 3,
    nav: !0,
    dots: !0,
    dotsEach: !0,
    callbacks: !0,
    responsiveClass: !0,
    responsiveRefreshRate: 100,
    responsive: {
      0: {
        items: 1,
        nav: !1
      },
      500: {
        items: 2,
        nav: !1
      },
      820: {
        items: 3,
        nav: !0
      }
    }
  }), $(".sectionteaser .wrapper .tBoxes.starter").owlCarousel({
    items: 5,
    itemElement: "div",
    dots: !1,
    responsiveClass: !0,
    responsive: {
      0: {
        items: 1,
        dots: !0
      },
      500: {
        items: 2,
        dots: !0
      },
      800: {
        items: 3,
        dots: !0
      },
      1200: {
        items: 5,
        dots: !1
      }
    }
  })
}), $(function () {
  $("#uid157 .article.list").each(function () {
    var t = $(this).find("span.dyear").text();
    $(this).attr("data-year", t)
  });
  var t = $("#uid157 .article.list"),
    e = {};
  t.each(function () {
    e[$(this).data("year")] = ""
  });
  for (year in e) t.filter("[data-year=" + year + "]").wrapAll('<div class="item accordion year" data-accyear="' + year + '"></div');
  $(".item.accordion.year").each(function () {
    var t = $(this).data("accyear");
    $(this).prepend("<h2>" + t + "</h2>")
  });
  var i = $(".item.accordion");
  i.each(function () {
    var t = $(this),
      e = t.nextAll(".item"),
      i = $(this).find(".csc-textpicHeader").length;
    if (i >= 1) {
      var s = $(this).find(".csc-textpicHeader"),
        o = $(this).html();
      if (s.children("h2").append('<i class="fa fa-plus"></i>'), s.nextAll().wrapAll('<div class="accContent"></div>'), s.click(function () {
        var t = $(this);
        1 == t.parents(".accordion").hasClass("open") ? (t.find("h2").removeClass("active"), t.next(".accContent").slideUp(250), t.parents(".accordion").removeClass("open"), t.find("i").addClass("fa-plus"), t.find("i").removeClass("fa-minus")) : ($(".accordion h2").removeClass("active"), t.find("h2").addClass("active"), $(".accordion .accContent").slideUp(250), $(".accordion").removeClass("open"), $(".accordion h2 i").removeClass("fa-minus"), $(".accordion h2 i").addClass("fa-plus"), t.find("i").removeClass("fa-plus"), t.find("i").addClass("fa-minus"), t.next(".accContent").slideDown(250), t.parents(".accordion").addClass("open"))
      }), 1 == $(this).hasClass("open")) {
        var n = $(this);
        n.find(".accContent").show(), n.addClass("open"), n.children("h2").addClass("active"), n.find("i").addClass("fa-minus").removeClass("fa-plus")
      }
    } else {
      var s = $(this).children("h2"),
        o = $(this).html();
      if (s.append('<i class="fa fa-plus"></i>'), s.siblings().wrapAll('<div class="accContent"></div>'), s.click(function () {
        var t = $(this);
        1 == t.parent(".accordion").hasClass("open") ? (t.removeClass("active"), t.next(".accContent").slideUp(250), t.parent(".accordion").removeClass("open"), t.find("i").addClass("fa-plus"), t.find("i").removeClass("fa-minus")) : ($(".accordion h2").removeClass("active"), t.addClass("active"), $(".accordion .accContent").slideUp(250), $(".accordion").removeClass("open"), $(".accordion h2 i").removeClass("fa-minus"), $(".accordion h2 i").addClass("fa-plus"), t.find("i").removeClass("fa-plus"), t.find("i").addClass("fa-minus"), t.next(".accContent").slideDown(250), t.parent(".accordion").addClass("open"))
      }), 1 == $(this).hasClass("open")) {
        var n = $(this);
        n.find(".accContent").show(), n.addClass("open"), n.children("h2").addClass("active"), n.find("i").addClass("fa-minus").removeClass("fa-plus")
      }
    }
    e.hasClass("accordion") === !1 && t.addClass("frame-space-after-40")
  })
}), $(function () {
  $(".nav > li").each(function () {
    var t = $(this).find("ul").length;
    t >= 1 && $(this).addClass("hasSubNav")
  }), $(".nav ul.sub > li").each(function () {
    var t = $(this).find("ul").length;
    t >= 1 && $(this).addClass("hasSubNavLevel2")
  }), $(".mobileNav a").click(function () {
    $(this).toggleClass("active"), $(".navWrapper").slideToggle(200), $("html, body").toggleClass("noscroll")
  }), $("li.hasSubNav").each(function () {
    $(this).append('<a href="javascript:;" class="toggleSubnav"><span class="icon-keyboard_arrow_down"></span></a>')
  }), $("li.hasSubNavLevel2").each(function () {
    $(this).append('<a href="javascript:;" class="toggleSubnav2"><span class="icon-keyboard_arrow_down"></span></a>')
  }), $(".toggleSubnav").on("click", function () {
    return $(this).hasClass("active") ? ($(this).parent("li").find(".subnav").slideUp(200), $(this).removeClass("active"), $(this).find("span").addClass("icon-keyboard_arrow_down"), $(this).find("span").removeClass("icon-keyboard_arrow_up"), !1) : ($(".toggleSubnav").find("span").addClass("icon-keyboard_arrow_down"), $(".toggleSubnav").find("span").removeClass("icon-keyboard_arrow_up"), $(this).find("span").removeClass("icon-keyboard_arrow_down"), $(this).find("span").addClass("icon-keyboard_arrow_up"), $(".toggleSubnav.active").parent("li").find(".subnav").slideUp(200), $(".toggleSubnav").removeClass("active"), $(this).parent("li").find(".subnav").slideToggle(200), void $(this).toggleClass("active"))
  }), $(".toggleSubnav2").on("click", function () {
    return $(this).hasClass("active") ? ($(this).parent("li").find("ul").slideUp(200), $(this).removeClass("active"), $(this).find("span").addClass("icon-keyboard_arrow_down"), $(this).find("span").removeClass("icon-keyboard_arrow_up"), !1) : ($(".toggleSubnav2").find("span").addClass("icon-keyboard_arrow_down"), $(".toggleSubnav2").find("span").removeClass("icon-keyboard_arrow_up"), $(this).find("span").removeClass("icon-keyboard_arrow_down"), $(this).find("span").addClass("icon-keyboard_arrow_up"), $(".toggleSubnav2.active").parent("li").find("ul").slideUp(200), $(".toggleSubnav2").removeClass("active"), $(this).parent("li").find("ul").slideToggle(200), void $(this).toggleClass("active"))
  });
  var t;
  lastScrollTop = 0, delta = 5, navbarHeight = $(".head").outerHeight(), $(window).scroll(function (e) {
    t = !0
  }), setInterval(function () {
    t && (hasScrolled(), t = !1)
  }, 250)
}), $(function () {
  $(".tabcontainer").each(function (t) {
    var e = t + 1;
    $(this).attr("id", "tab" + e), 1 == e && $(this).show()
  }), $(".tabs li").each(function (t) {
    var e = t + 1;
    $(this).attr("data-tab", "tab" + e), 1 == e && $(this).addClass("active")
  }), $(".tabs li").click(function () {
    var t = $(this).data("tab");
    $(".tabcontainer").hide(), $("#" + t).show(), $(".tabs li").removeClass("active"), $(this).addClass("active")
  }), $(".goToTab").click(function () {
    var t = $(this).data("gototab");
    $(".tabcontainer").hide(), $("#" + t).show(), $(".tabs li").removeClass("active"), $(".tabs li[data-tab=" + t + "]").addClass("active")
  })
}), $(function () {
  $(".graphlink").tooltipster({
    animation: "grow"
  }), $(".infobox.default").each(function (t) {
    0 == t && $(this).find(".showPrevInfo").hide(), t == $(".infobox.default").length - 1 && $(this).find(".showNextInfo").hide()
  }), $(".infobox.brown").each(function (t) {
    0 == t && $(this).find(".showPrevInfo").hide(), t == $(".infobox.brown").length - 1 && $(this).find(".showNextInfo").hide()
  }), $(".openinfo").click(function () {
    var t = $(this).parent(".wasserkreislauf");
    t.find(".graphlink").hide(), t.find("img.graphic").fadeOut(300), $(this).next(".infobox").css("opacity", 0).delay(300).slideDown(300).animate({
      opacity: 1
    }, {
      queue: !1,
      duration: 300
    })
  }), $(".closeInfobox").click(function () {
    var t = $(this).parents(".wasserkreislauf");
    $(".infobox").fadeOut(300), t.find(".graphlink").delay(300).fadeIn(300), t.find("img.graphic").delay(300).fadeIn(300)
  }), $(".showPrevInfo, .showNextInfo").click(function () {
    dataBox = $(this).parents(".infobox").data("infobox"), prevInfo = dataBox - 1, nextInfo = dataBox + 1, $(".infobox").hide(), 1 == $(this).hasClass("showPrevInfo") ? $(".infobox[data-infobox=" + prevInfo + "]").show() : $(".infobox[data-infobox=" + nextInfo + "]").show()
  }), $(".tipster").tooltipster({
    animation: "grow"
  })
}), $(function () {
  $("select.ansprechpartner").chosen(), $(".contacts-community select.ansprechpartner").on("change", function () {
    return newCommunity = $(this).val(), numCommunity = $('.contacts-community .box.colored[data-community*="' + newCommunity + '"]').length, communityAzvOnly = $(this).find("option:selected").data("azvonly"), "nix" == newCommunity ? (hideBoxes(), !1) : (hideBoxes(), $('.contacts-community .box.colored[data-community*="' + newCommunity + '"]').css("display", "inline-block"), 0 == numCommunity && ($(".contacts-community .nocontact").show(), $(".contacts-community .azvbetreut").hide()), 1 == communityAzvOnly && ($(".contacts-community .nocontact").hide(), $(".contacts-community .azvcontact.w100").show()), $('.contactcommunity:visible[data-azvbetreut="1"]').length >= 1 ? $(".contacts-community .azvbetreut").css("display", "inline-block") : $(".contacts-community .azvbetreut").hide(), void setHeights())
  }), $(".contacts-azv select.ansprechpartner").on("change", function () {
    var t = $(this).val();
    $(".contacts-azv .contactperson").hide(), $('.contacts-azv .contactperson[data-azvarea="' + t + '"]').css("display", "inline-block")
  })
}), $(function () {
  $(".quickstart ul li").each(function (t) {
    $(this).attr("data-item", "quick" + t)
  }), $(".tBoxes").each(function (t) {
    $(this).attr("id", "quick" + t)
  }), $(".quickstart ul li:last-child a").addClass("active")
  //   $(".quickstart ul li a").click(function(t) {
  // 	t.preventDefault(), 1 == $(".quickstart span.icon-list").is(":visible") && $(".quickstart ul").slideUp(200), $(".quickstart ul li a").removeClass("active"), $(this).addClass("active");
  // 	var e = $(this).parent("li").data("item");
  // 	$(".tBoxes").hide(), $("#" + e).show(), initThisOwl(e)
  // })
}), $(function () {
  $(".bspin").tooltipster({
    animation: "grow"
  }), $(".gemeinde_picker select").on("change", function (evt) {
    var t = $(this).val().trim();
    $(".baustellen .item").hide(), $('.baustellen .item[data-gemeinde="' + t + '"]').show(), $(".baustellen .box").remove(), 0 == $('.baustellen .item[data-gemeinde="' + t + '"]').length && "all" != t ? ($(".baustellen .legende").hide(), $(".baustellen").append('<div class="box colored green"><div class="innerWrap"><p><strong>' + t + "</strong>: aktuell keine Baustellen in dieser Gemeinde.</p></div></div>")) : $(".baustellen .legende").show(), "all" == t ? $(".baustellen .legende").hide() : ($("html, body").animate({
      scrollTop: $(".baustellen").offset().top - 50
    }, 750), $('.baustellen .item[data-gemeinde="' + t + '"]').addClass("active").animate({
      opacity: 1
    }, 2500, function () {
      $(this).removeClass("active")
    }))
  }), $(".bspin").click(function (evt) {
    var t = $(this).data("baustelle").trim();
    $(".baustellen .item").hide(), $('.baustellen .item[data-gemeinde="' + t + '"]').show(), $(".baustellen .box").remove(), $(".baustellen .legende").show(), $(".gemeinde_picker select option[value=" + t + "]").attr("selected", "selected"), $("html, body").animate({
      scrollTop: $(".baustellen").offset().top - 50
    }, 750), $('.baustellen .item[data-gemeinde="' + t + '"]').addClass("active").animate({
      opacity: 1
    }, 2500, function () {
      $(this).removeClass("active")
    })
  })
}), $(function () {
  $("body").hasClass("pid328") === !0 ? ($fbMaxWidth = 1200, $fbMaxHeight = 900) : ($fbMaxWidth = 800, $fbMaxHeight = 600), $(".lightbox").fancybox({
    maxWidth: $fbMaxWidth,
    maxHeight: $fbMaxHeight,
    fitToView: !0,
    width: "70%",
    height: "70%",
    autoSize: !1,
    closeClick: !1,
    openEffect: "none",
    closeEffect: "none",
    padding: 0,
    helpers: {
      title: {
        type: "inside"
      }
    }
  })
}), $(function () {
  var t = window.innerWidth;
  t >= 421 && $(".hero").imagefill()
}), videojs.options.flash.swf = "typo3conf/ext/atl_provider/Resources/Public/system/js/video-js.swf", Modernizr.load([{
  test: Modernizr.mq("only all"),
  nope: "typo3conf/ext/atl_provider/Resources/Public/system/js/respond.js"
}]), $(function () {
  var t = window.location.href;
  msieversion(), $(".hero .item").delay(5e3).animate({
    opacity: 0
  }, 1500, function () {
    $(this).remove()
  }), $("input, textarea").placeholder(), 1 == $(".downloads").is(":in-viewport") ? $(".dlthema").hide() : $(".dlthema").show(), $(".sectionteaser a").each(function () {
    var t = $(this).text().length;
    t >= 22 && t <= 32 && $(this).css("width", "215px"), t <= 21 && $(this).css("width", "170px")
  });
  var e = $(".icon-email a").attr("href");
  $(".icon-email a").attr("href", e + " " + t), $(".icon-spread a.sharesheet").click(function () {
    $("ul.socialshare").slideToggle(200)
  }), $(".box.colored:visible .innerWrap").matchHeight(), $("table").wrap('<div class="tableWrap" />'), $(".box.download").each(function () {
    $(this).find(".download").parent("p").addClass("nomar")
  }), $(".dlthema").click(function () {
    $("html, body").animate({
      scrollTop: $("#downloads").offset().top - 130
    }, 1200)
  }), $(".csc-textpic").each(function () {
    var t = $(this).find("figcaption").length;
    t >= 1 && $(this).addClass("csc-textpic-border")
  }), $(".mobileSearch a").click(function () {
    $(".quicksearch").fadeToggle(200), 1 == $(".navWrapper").is(":visible") && ($(".navWrapper").slideUp(200), $(".head .quick.mobileNav a").removeClass("active")), $(".head .quicksearch input.searchinput").focus()
  }), $(".quickstart span.icon-list").click(function () {
    $(".quickstart ul").slideToggle(200)
  })
});
//# sourceMappingURL=./main.min.js.map
