").append(T.parseHTML(e)).find(r):e)})).complete(n&&function(e,t){s.each(n,i||[e.responseText,t,e])}),this},T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){T.fn[t]=function(e){return this.on(t,e)}})),T.each(["get","post"],(function(e,t){T[t]=function(e,n,r,i){return T.isFunction(n)&&(i=i||r,r=n,n=o),T.ajax({url:e,type:t,dataType:i,data:n,success:r})}})),T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yt,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(vt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":i.String,"text html":!0,"text json":T.parseJSON,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Lt(Lt(e,T.ajaxSettings),t):Lt(T.ajaxSettings,e)},ajaxPrefilter:Ht(Pt),ajaxTransport:Ht(At),ajax:function(e,t){"object"==typeof e&&(t=e,e=o),t=t||{};var n,r,i,a,s,c,l,u,d=T.ajaxSetup({},t),f=d.context||d,p=d.context&&(f.nodeType||f.jquery)?T(f):T.event,h=T.Deferred(),g=T.Callbacks("once memory"),m=d.statusCode||{},v={},y={},b=0,x="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!u)for(u={};t=Tt.exec(a);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||x;return l&&l.abort(t),C(0,t),this}};if(h.promise(w).complete=g.add,w.success=w.done,w.error=w.fail,d.url=((e||d.url||yt)+"").replace(wt,"").replace(St,vt[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=T.trim(d.dataType||"*").toLowerCase().match(S)||[""],null==d.crossDomain&&(n=kt.exec(d.url.toLowerCase()),d.crossDomain=!(!n||n[1]===vt[1]&&n[2]===vt[2]&&(n[3]||("http:"===n[1]?80:443))==(vt[3]||("http:"===vt[1]?80:443)))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=T.param(d.data,d.traditional)),jt(Pt,d,t,w),2===b)return w;for(r in(c=d.global)&&0==T.active++&&T.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Et.test(d.type),i=d.url,d.hasContent||(d.data&&(i=d.url+=(xt.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=Ct.test(i)?i.replace(Ct,"$1_="+bt++):i+(xt.test(i)?"&":"?")+"_="+bt++)),d.ifModified&&(T.lastModified[i]&&w.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&w.setRequestHeader("If-None-Match",T.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&w.setRequestHeader("Content-Type",d.contentType),w.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Dt+"; q=0.01":""):d.accepts["*"]),d.headers)w.setRequestHeader(r,d.headers[r]);if(d.beforeSend&&(!1===d.beforeSend.call(f,w,d)||2===b))return w.abort();for(r in x="abort",{success:1,error:1,complete:1})w[r](d[r]);if(l=jt(At,d,t,w)){w.readyState=1,c&&p.trigger("ajaxSend",[w,d]),d.async&&d.timeout>0&&(s=setTimeout((function(){w.abort("timeout")}),d.timeout));try{b=1,l.send(v,C)}catch(e){if(!(2>b))throw e;C(-1,e)}}else C(-1,"No Transport");function C(e,t,n,r){var u,v,y,x,C,E=t;2!==b&&(b=2,s&&clearTimeout(s),l=o,a=r||"",w.readyState=e>0?4:0,n&&(x=function(e,t,n){var r,i,a,s,c=e.contents,l=e.dataTypes,u=e.responseFields;for(s in u)s in n&&(t[u[s]]=n[s]);for(;"*"===l[0];)l.shift(),i===o&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(s in c)if(c[s]&&c[s].test(i)){l.unshift(s);break}if(l[0]in n)a=l[0];else{for(s in n){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}r||(r=s)}a=a||r}return a?(a!==l[0]&&l.unshift(a),n[a]):o}(d,w,n)),e>=200&&300>e||304===e?(d.ifModified&&((C=w.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=C),(C=w.getResponseHeader("etag"))&&(T.etag[i]=C)),204===e?(u=!0,E="nocontent"):304===e?(u=!0,E="notmodified"):(E=(u=function(e,t){var n,r,i,o,a={},s=0,c=e.dataTypes.slice(),l=c[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=c[++s];)if("*"!==r){if("*"!==l&&l!==r){if(!(i=a[l+" "+r]||a["* "+r]))for(n in a)if((o=n.split(" "))[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){!0===i?i=a[n]:!0!==a[n]&&(r=o[0],c.splice(s--,0,r));break}if(!0!==i)if(i&&e.throws)t=i(t);else try{t=i(t)}catch(e){return{state:"parsererror",error:i?e:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}(d,x)).state,v=u.data,u=!(y=u.error))):(y=E,(e||!E)&&(E="error",0>e&&(e=0))),w.status=e,w.statusText=(t||E)+"",u?h.resolveWith(f,[v,E,w]):h.rejectWith(f,[w,E,y]),w.statusCode(m),m=o,c&&p.trigger(u?"ajaxSuccess":"ajaxError",[w,d,u?v:y]),g.fireWith(f,[w,E]),c&&(p.trigger("ajaxComplete",[w,d]),--T.active||T.event.trigger("ajaxStop")))}return w},getScript:function(e,t){return T.get(e,o,t,"script")},getJSON:function(e,t,n){return T.get(e,t,n,"json")}}),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return T.globalEval(e),e}}}),T.ajaxPrefilter("script",(function(e){e.cache===o&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)})),T.ajaxTransport("script",(function(e){if(e.crossDomain){var t,n=l.head||T("head")[0]||l.documentElement;return{send:function(r,i){(t=l.createElement("script")).async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(o,!0)}}}}));var It=[],Ft=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=It.pop()||T.expando+"_"+bt++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",(function(e,t,n){var r,a,s,c=!1!==e.jsonp&&(Ft.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ft.test(e.data)&&"data");return c||"jsonp"===e.dataTypes[0]?(r=e.jsonpCallback=T.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,c?e[c]=e[c].replace(Ft,"$1"+r):!1!==e.jsonp&&(e.url+=(xt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||T.error(r+" was not called"),s[0]},e.dataTypes[0]="json",a=i[r],i[r]=function(){s=arguments},n.always((function(){i[r]=a,e[r]&&(e.jsonpCallback=t.jsonpCallback,It.push(r)),s&&T.isFunction(a)&&a(s[0]),s=a=o})),"script"):o}));var Ot,Mt,qt=0,Bt=i.ActiveXObject&&function(){var e;for(e in Ot)Ot[e](o,!0)};function Rt(){try{return new i.XMLHttpRequest}catch(e){}}T.ajaxSettings.xhr=i.ActiveXObject?function(){return!this.isLocal&&Rt()||function(){try{return new i.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}()}:Rt,Mt=T.ajaxSettings.xhr(),T.support.cors=!!Mt&&"withCredentials"in Mt,(Mt=T.support.ajax=!!Mt)&&T.ajaxTransport((function(e){var t;if(!e.crossDomain||T.support.cors)return{send:function(n,r){var a,s,c=e.xhr();if(e.username?c.open(e.type,e.url,e.async,e.username,e.password):c.open(e.type,e.url,e.async),e.xhrFields)for(s in e.xhrFields)c[s]=e.xhrFields[s];e.mimeType&&c.overrideMimeType&&c.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");try{for(s in n)c.setRequestHeader(s,n[s])}catch(e){}c.send(e.hasContent&&e.data||null),t=function(n,i){var s,l,u,d;try{if(t&&(i||4===c.readyState))if(t=o,a&&(c.onreadystatechange=T.noop,Bt&&delete Ot[a]),i)4!==c.readyState&&c.abort();else{d={},s=c.status,l=c.getAllResponseHeaders(),"string"==typeof c.responseText&&(d.text=c.responseText);try{u=c.statusText}catch(e){u=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=d.text?200:404}}catch(e){i||r(-1,e)}d&&r(s,u,d,l)},e.async?4===c.readyState?setTimeout(t):(a=++qt,Bt&&(Ot||(Ot={},T(i).unload(Bt)),Ot[a]=t),c.onreadystatechange=t):t()},abort:function(){t&&t(o,!0)}}}));var _t,zt,Qt=/^(?:toggle|show|hide)$/,$t=RegExp("^(?:([+-])=|)("+E+")([a-z%]*)$","i"),Xt=/queueHooks$/,Wt=[function(e,t,n){var r,i,o,a,s,c,l,u,d,f=this,p=e.style,h={},g=[],m=e.nodeType&&it(e);for(i in n.queue||(null==(u=T._queueHooks(e,"fx")).unqueued&&(u.unqueued=0,d=u.empty.fire,u.empty.fire=function(){u.unqueued||d()}),u.unqueued++,f.always((function(){f.always((function(){u.unqueued--,T.queue(e,"fx").length||u.empty.fire()}))}))),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===T.css(e,"display")&&"none"===T.css(e,"float")&&(T.support.inlineBlockNeedsLayout&&"inline"!==lt(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",T.support.shrinkWrapBlocks||f.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),t)if(a=t[i],Qt.exec(a)){if(delete t[i],c=c||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){"hidden"in(s=T._data(e,"fxshow")||T._data(e,"fxshow",{}))&&(m=s.hidden),c&&(s.hidden=!m),m?T(e).show():f.done((function(){T(e).hide()})),f.done((function(){var t;for(t in T._removeData(e,"fxshow"),h)T.style(e,t,h[t])}));for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||T.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}],Ut={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=$t.exec(t),a=i.cur(),s=+a||0,c=1,l=20;if(o){if(n=+o[2],"px"!==(r=o[3]||(T.cssNumber[e]?"":"px"))&&s){s=T.css(i.elem,e,!0)||n||1;do{s/=c=c||".5",T.style(i.elem,e,s+r)}while(c!==(c=i.cur()/a)&&1!==c&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Vt(){return setTimeout((function(){_t=o})),_t=T.now()}function Yt(e,t,n){var r,i,o=0,a=Wt.length,s=T.Deferred().always((function(){delete c.elem})),c=function(){if(i)return!1;for(var t=_t||Vt(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;a>o;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),1>r&&a?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:T.extend({},t),opts:T.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:_t||Vt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=T.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),u=l.props;for(function(e,t){var n,r,i,o,a;for(i in e)if(r=T.camelCase(i),o=t[r],n=e[i],T.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),(a=T.cssHooks[r])&&"expand"in a)for(i in n=a.expand(n),delete e[r],n)i in e||(e[i]=n[i],t[i]=o);else t[r]=o}(u,l.opts.specialEasing);a>o;o++)if(r=Wt[o].call(l,e,u,l.opts))return r;return function(e,t){T.each(t,(function(t,n){for(var r=(Ut[t]||[]).concat(Ut["*"]),i=0,o=r.length;o>i;i++)if(r[i].call(e,t,n))return}))}(l,u),T.isFunction(l.opts.start)&&l.opts.start.call(e,l),T.fx.timer(T.extend(c,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function Jt(e,t,n,r,i){return new Jt.prototype.init(e,t,n,r,i)}function Gt(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)r["margin"+(n=tt[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function Kt(e){return T.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}T.Animation=T.extend(Yt,{tweener:function(e,t){T.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],Ut[n]=Ut[n]||[],Ut[n].unshift(t)},prefilter:function(e,t){t?Wt.unshift(e):Wt.push(e)}}),T.Tween=Jt,Jt.prototype={constructor:Jt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(T.cssNumber[n]?"":"px")},cur:function(){var e=Jt.propHooks[this.prop];return e&&e.get?e.get(this):Jt.propHooks._default.get(this)},run:function(e){var t,n=Jt.propHooks[this.prop];return this.pos=t=this.options.duration?T.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Jt.propHooks._default.set(this),this}},Jt.prototype.init.prototype=Jt.prototype,Jt.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=T.css(e.elem,e.prop,""))&&"auto"!==t?t:0:e.elem[e.prop]},set:function(e){T.fx.step[e.prop]?T.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[T.cssProps[e.prop]]||T.cssHooks[e.prop])?T.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Jt.propHooks.scrollTop=Jt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},T.each(["toggle","show","hide"],(function(e,t){var n=T.fn[t];T.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(Gt(t,!0),e,r,i)}})),T.fn.extend({fadeTo:function(e,t,n,r){return this.filter(it).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=T.isEmptyObject(e),o=T.speed(t,n,r),a=function(){var t=Yt(this,T.extend({},e),o);a.finish=function(){t.stop(!0)},(i||T._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=o),t&&!1!==e&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=T.timers,a=T._data(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&Xt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&T.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=T._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=T.timers,a=r?r.length:0;for(n.finish=!0,T.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),T.each({slideDown:Gt("show"),slideUp:Gt("hide"),slideToggle:Gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){T.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),T.speed=function(e,t,n){var r=e&&"object"==typeof e?T.extend({},e):{complete:n||!n&&t||T.isFunction(e)&&e,duration:e,easing:n&&t||t&&!T.isFunction(t)&&t};return r.duration=T.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in T.fx.speeds?T.fx.speeds[r.duration]:T.fx.speeds._default,(null==r.queue||!0===r.queue)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){T.isFunction(r.old)&&r.old.call(this),r.queue&&T.dequeue(this,r.queue)},r},T.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},T.timers=[],T.fx=Jt.prototype.init,T.fx.tick=function(){var e,t=T.timers,n=0;for(_t=T.now();t.length>n;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||T.fx.stop(),_t=o},T.fx.timer=function(e){e()&&T.timers.push(e)&&T.fx.start()},T.fx.interval=13,T.fx.start=function(){zt||(zt=setInterval(T.fx.tick,T.fx.interval))},T.fx.stop=function(){clearInterval(zt),zt=null},T.fx.speeds={slow:600,fast:200,_default:400},T.fx.step={},T.expr&&T.expr.filters&&(T.expr.filters.animated=function(e){return T.grep(T.timers,(function(t){return e===t.elem})).length}),T.fn.offset=function(e){if(arguments.length)return e===o?this:this.each((function(t){T.offset.setOffset(this,e,t)}));var t,n,r={top:0,left:0},i=this[0],a=i&&i.ownerDocument;return a?(t=a.documentElement,T.contains(t,i)?(typeof i.getBoundingClientRect!==c&&(r=i.getBoundingClientRect()),n=Kt(a),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r):void 0},T.offset={setOffset:function(e,t,n){var r=T.css(e,"position");"static"===r&&(e.style.position="relative");var i,o,a=T(e),s=a.offset(),c=T.css(e,"top"),l=T.css(e,"left"),u={},d={};("absolute"===r||"fixed"===r)&&T.inArray("auto",[c,l])>-1?(i=(d=a.position()).top,o=d.left):(i=parseFloat(c)||0,o=parseFloat(l)||0),T.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(u.top=t.top-s.top+i),null!=t.left&&(u.left=t.left-s.left+o),"using"in t?t.using.call(e,u):a.css(u)}},T.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===T.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),T.nodeName(e[0],"html")||(n=e.offset()),n.top+=T.css(e[0],"borderTopWidth",!0),n.left+=T.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-T.css(r,"marginTop",!0),left:t.left-n.left-T.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||l.documentElement;e&&!T.nodeName(e,"html")&&"static"===T.css(e,"position");)e=e.offsetParent;return e||l.documentElement}))}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n=/Y/.test(t);T.fn[e]=function(r){return T.access(this,(function(e,r,i){var a=Kt(e);return i===o?a?t in a?a[t]:a.document.documentElement[r]:e[r]:(a?a.scrollTo(n?T(a).scrollLeft():i,n?i:T(a).scrollTop()):e[r]=i,o)}),e,r,arguments.length,null)}})),T.each({Height:"height",Width:"width"},(function(e,t){T.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){T.fn[r]=function(r,i){var a=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===i?"margin":"border");return T.access(this,(function(t,n,r){var i;return T.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):r===o?T.css(t,n,s):T.style(t,n,r,s)}),t,a?r:o,a,null)}}))})),i.jQuery=i.$=T,n(3).jQuery&&(void 0===(r=function(){return T}.apply(t,[]))||(e.exports=r))}(window);var i=window.H5P=window.H5P||{};i.jQuery=jQuery.noConflict(!0),i.jQuery.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)}))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t){var n=window.H5P=window.H5P||{};n.Event=function(e,t,n){this.type=e,this.data=t;var r=!1,i=!1,o=!1;void 0===n&&(n={}),!0===n.bubbles&&(r=!0),!0===n.external&&(i=!0),this.preventBubbling=function(){r=!1},this.getBubbles=function(){return r},this.scheduleForExternal=function(){return!(!i||o)&&(o=!0,!0)}},n.EventDispatcher=function(){var e=this,t={};this.on=function(n,r,i){if("function"!=typeof r)throw TypeError("listener must be a function");e.trigger("newListener",{type:n,listener:r});var o={listener:r,thisArg:i};t[n]?t[n].push(o):t[n]=[o]},this.once=function(t,n,r){if(!(n instanceof Function))throw TypeError("listener must be a function");var i=function(t){e.off(t.type,i),n.call(this,t)};e.on(t,i,r)},this.off=function(n,r){if(void 0!==r&&!(r instanceof Function))throw TypeError("listener must be a function");if(void 0!==t[n]){if(void 0===r)return delete t[n],void e.trigger("removeListener",n);for(var i=0;i
0&&(this.data.statement.result.score.scaled=Math.round(e/t*1e4)/1e4))),this.data.statement.result.completion=void 0===r?"completed"===this.getVerb()||"answered"===this.getVerb():r,void 0!==i&&(this.data.statement.result.success=i),n&&n.activityStartTime){var o=Math.round((Date.now()-n.activityStartTime)/10)/100;this.data.statement.result.duration="PT"+o+"S"}},n.XAPIEvent.prototype.setVerb=function(e){-1!==n.jQuery.inArray(e,n.XAPIEvent.allowedXAPIVerbs)?this.data.statement.verb={id:"http://adlnet.gov/expapi/verbs/"+e,display:{"en-US":e}}:void 0!==e.id&&(this.data.statement.verb=e)},n.XAPIEvent.prototype.getVerb=function(e){var t=this.data.statement;return"verb"in t?!0===e?t.verb:t.verb.id.slice(31):null},n.XAPIEvent.prototype.setObject=function(e){if(e.contentId)if(this.data.statement.object={id:this.getContentXAPIId(e),objectType:"Activity",definition:{extensions:{"http://h5p.org/x-api/h5p-local-content-id":e.contentId}}},e.subContentId)this.data.statement.object.definition.extensions["http://h5p.org/x-api/h5p-subContentId"]=e.subContentId,"function"==typeof e.getTitle&&(this.data.statement.object.definition.name={"en-US":e.getTitle()});else{var t=n.getContentForInstance(e.contentId);t&&t.metadata&&t.metadata.title&&(this.data.statement.object.definition.name={"en-US":n.createTitle(t.metadata.title)})}else this.data.statement.object={definition:{}}},n.XAPIEvent.prototype.setContext=function(e){e.parent&&(e.parent.contentId||e.parent.subContentId)&&(this.data.statement.context={contextActivities:{parent:[{id:this.getContentXAPIId(e.parent),objectType:"Activity"}]}}),e.libraryInfo&&(void 0===this.data.statement.context&&(this.data.statement.context={contextActivities:{}}),this.data.statement.context.contextActivities.category=[{id:"http://h5p.org/libraries/"+e.libraryInfo.versionedNameNoSpaces,objectType:"Activity"}])},n.XAPIEvent.prototype.setActor=function(){if(void 0!==H5PIntegration.user)this.data.statement.actor={name:H5PIntegration.user.name,mbox:"mailto:"+H5PIntegration.user.mail,objectType:"Agent"};else{var e;try{localStorage.H5PUserUUID?e=localStorage.H5PUserUUID:(e=n.createUUID(),localStorage.H5PUserUUID=e)}catch(t){e="not-trackable-"+n.createUUID()}this.data.statement.actor={account:{name:e,homePage:H5PIntegration.siteUrl},objectType:"Agent"}}},n.XAPIEvent.prototype.getMaxScore=function(){return this.getVerifiedStatementValue(["result","score","max"])},n.XAPIEvent.prototype.getScore=function(){return this.getVerifiedStatementValue(["result","score","raw"])},n.XAPIEvent.prototype.getContentXAPIId=function(e){var t;return e.contentId&&H5PIntegration&&H5PIntegration.contents&&H5PIntegration.contents["cid-"+e.contentId]&&(t=H5PIntegration.contents["cid-"+e.contentId].url,e.subContentId&&(t+="?subContentId="+e.subContentId)),t},n.XAPIEvent.prototype.isFromChild=function(){var e=this.getVerifiedStatementValue(["context","contextActivities","parent",0,"id"]);return!e||-1===e.indexOf("subContentId")},n.XAPIEvent.prototype.getVerifiedStatementValue=function(e){for(var t=this.data.statement,n=0;n6)&&(i.fullScreenBrowserPrefix="webkit")):document.documentElement.mozRequestFullScreen?i.fullScreenBrowserPrefix="moz":document.documentElement.msRequestFullscreen&&(i.fullScreenBrowserPrefix="ms"),i.opened={},i.init=function(e){void 0===i.$body&&(i.$body=i.jQuery(document.body)),void 0===i.fullscreenSupported&&(i.fullscreenSupported=!(r.fullscreenDisabled||i.fullscreenDisabled||i.isFramed&&!1!==i.externalEmbed&&!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled))),void 0===i.canHasFullScreen&&(i.canHasFullScreen=i.fullscreenSupported),i.jQuery(".h5p-content:not(.h5p-initialized)",e).each((function(){var e=i.jQuery(this).addClass("h5p-initialized"),t=i.jQuery('').appendTo(e),n=e.data("content-id"),o=r.contents["cid-"+n];if(void 0===o)return i.error("No data for content id "+n+". Perhaps the library is gone?");var a={library:o.library,params:JSON.parse(o.jsonContent),metadata:o.metadata};i.getUserData(n,"state",(function(e,c){if(c)a.userDatas={state:c};else if(null===c&&r.saveFreq){delete o.contentUserData;var l=new i.Dialog("content-user-data-reset","Data Reset",""+i.t("contentChanged")+"
"+i.t("startingOver")+'
OK
',t);i.jQuery(l).on("dialog-opened",(function(e,t){var r=function(e){"click"!==e.type&&32!==e.which||(l.close(),i.deleteUserData(n,"state",0))};t.find(".h5p-dialog-ok-button").click(r).keypress(r),i.trigger(s,"resize")})).on("dialog-closed",(function(){i.trigger(s,"resize")})),l.open()}}));var s=i.newRunnable(a,n,t,!0,{standalone:!0});i.offlineRequestQueue=new i.OfflineRequestQueue({instance:s}),1==o.fullScreen&&i.fullscreenSupported&&i.jQuery('').prependTo(t).children().click((function(){i.fullScreen(t,s)})).keydown((function(e){if(32===e.which||13===e.which)return i.fullScreen(t,s),!1}));var c,l=o.displayOptions,u=!1;if(l.frame){if(l.copyright){var d=i.getCopyrights(s,a.params,n,a.metadata);d||(l.copyright=!1)}var f=new i.ActionBar(l),p=f.getDOMElement();f.on("reuse",(function(){i.openReuseDialog(p,o,a,s,n),s.triggerXAPI("accessed-reuse")})),f.on("copyrights",(function(){new i.Dialog("copyrights",i.t("copyrightInformation"),d,t).open(!0),s.triggerXAPI("accessed-copyright")})),f.on("embed",(function(){i.openEmbedDialog(p,o.embedCode,o.resizeCode,{width:e.width(),height:e.height()},s),s.triggerXAPI("accessed-embed")})),f.hasActions()&&(u=!0,p.insertAfter(t))}if(e.addClass(u?"h5p-frame":"h5p-no-frame"),i.opened[n]=new Date,i.on(s,"finish",(function(e){void 0!==e.data&&i.setFinished(n,e.data.score,e.data.maxScore,e.data.time)})),i.on(s,"xAPI",i.xAPICompletedListener),!1!==r.saveFreq&&(s.getCurrentState instanceof Function||"function"==typeof s.getCurrentState)){var h,g=function(){var e=s.getCurrentState();void 0!==e&&i.setUserData(n,"state",e,{deleteOnChange:!0}),r.saveFreq&&(h=setTimeout(g,1e3*r.saveFreq))};r.saveFreq&&(h=setTimeout(g,1e3*r.saveFreq)),i.on(s,"xAPI",(function(e){var t=e.getVerb();"completed"!==t&&"progressed"!==t||(clearTimeout(h),h=setTimeout(g,3e3))}))}if(i.isFramed)if(!1===i.externalEmbed){var m=window.frameElement;i.on(s,"resize",(function(){clearTimeout(c),c=setTimeout((function(){!function(){if(!window.parent.H5P.isFullscreen){var e=m.parentElement.style.height;m.parentElement.style.height=m.parentElement.clientHeight+"px",m.getBoundingClientRect(),m.style.height="1px",m.style.height=m.contentDocument.body.scrollHeight+"px",m.parentElement.style.height=e}}()}),1)}))}else if(i.communicator){var v=!1;i.communicator.on("ready",(function(){i.communicator.send("hello")})),i.communicator.on("hello",(function(){v=!0,document.body.style.height="auto",document.body.style.overflow="hidden",i.trigger(s,"resize")})),i.communicator.on("resizePrepared",(function(){i.communicator.send("resize",{scrollHeight:document.body.scrollHeight})})),i.communicator.on("resize",(function(){i.trigger(s,"resize")})),i.on(s,"resize",(function(){i.isFullscreen||(clearTimeout(c),c=setTimeout((function(){v?i.communicator.send("prepareResize",{scrollHeight:document.body.scrollHeight,clientHeight:document.body.clientHeight}):i.communicator.send("hello")}),0))}))}i.isFramed&&!1!==i.externalEmbed||i.jQuery(window.parent).resize((function(){window.parent.H5P.isFullscreen,i.trigger(s,"resize")})),i.instances.push(s),i.trigger(s,"resize"),e.addClass("using-mouse"),e.on("mousedown keydown keyup",(function(t){e.toggleClass("using-mouse","mousedown"===t.type)})),i.externalDispatcher&&i.externalDispatcher.trigger("initialized")})),i.jQuery("iframe.h5p-iframe:not(.h5p-initialized)",e).each((function(){var e=i.jQuery(this).addClass("h5p-initialized").data("content-id");this.contentDocument.open(),this.contentDocument.write(''+i.getHeadTags(e)+''),this.contentDocument.close()}))},i.getHeadTags=function(e){var t=function(e){for(var t="",n=0;n';return t},n=function(e){for(var t="",n=0;n<\/script>';return t};return''+t(r.core.styles)+t(r.contents["cid-"+e].styles)+n(r.core.scripts)+n(r.contents["cid-"+e].scripts)+"