var buildNumber=57;var buildDate="20150908 14:03";(function(a,b){function c(a){var b=na[a]={},c,d,a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}function d(a,c,d){if(d===b&&1===a.nodeType)if(d="data-"+c.replace(Ta,"-$1").toLowerCase(),d=a.getAttribute(d),"string"===typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:i.isNumeric(d)?parseFloat(d):Ua.test(d)?i.parseJSON(d):d}catch(e){}i.data(a,c,d)}else d=b;return d}function e(a){for(var b in a)if(!("data"===b&&i.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function f(a,
b,c){var d=b+"defer",e=b+"queue",f=b+"mark",g=i._data(a,d);g&&("queue"===c||!i._data(a,e))&&("mark"===c||!i._data(a,f))&&setTimeout(function(){!i._data(a,e)&&!i._data(a,f)&&(i.removeData(a,d,!0),g.fire())},0)}function g(){return!1}function h(){return!0}function j(a,b,c){b=b||0;if(i.isFunction(b))return i.grep(a,function(a,d){return!!b.call(a,d,a)===c});if(b.nodeType)return i.grep(a,function(a){return a===b===c});if("string"===typeof b){var d=i.grep(a,function(a){return 1===a.nodeType});if(Va.test(b))return i.filter(b,
d,!c);b=i.filter(b,d)}return i.grep(a,function(a){return 0<=i.inArray(a,b)===c})}function k(a){var b=oa.split("|"),a=a.createDocumentFragment();if(a.createElement)for(;b.length;)a.createElement(b.pop());return a}function l(a,b){if(1===b.nodeType&&i.hasData(a)){var c,d,e;d=i._data(a);var f=i._data(b,d),g=d.events;if(g)for(c in delete f.handle,f.events={},g)for(d=0,e=g[c].length;d<e;d++)i.event.add(b,c+(g[c][d].namespace?".":"")+g[c][d].namespace,g[c][d],g[c][d].data);if(f.data)f.data=i.extend({},f.data)}}
function m(a,b){var c;if(1===b.nodeType){b.clearAttributes&&b.clearAttributes();b.mergeAttributes&&b.mergeAttributes(a);c=b.nodeName.toLowerCase();if("object"===c)b.outerHTML=a.outerHTML;else if("input"===c&&("checkbox"===a.type||"radio"===a.type)){if(a.checked)b.defaultChecked=b.checked=a.checked;if(b.value!==a.value)b.value=a.value}else if("option"===c)b.selected=a.defaultSelected;else if("input"===c||"textarea"===c)b.defaultValue=a.defaultValue;b.removeAttribute(i.expando)}}function n(a){return"undefined"!==
typeof a.getElementsByTagName?a.getElementsByTagName("*"):"undefined"!==typeof a.querySelectorAll?a.querySelectorAll("*"):[]}function p(a){if("checkbox"===a.type||"radio"===a.type)a.defaultChecked=a.checked}function o(a){var b=(a.nodeName||"").toLowerCase();"input"===b?p(a):"script"!==b&&"undefined"!==typeof a.getElementsByTagName&&i.grep(a.getElementsByTagName("input"),p)}function r(a,b){b.src?i.ajax({url:b.src,async:!1,dataType:"script"}):i.globalEval((b.text||b.textContent||b.innerHTML||"").replace(Wa,
"/*$0*/"));b.parentNode&&b.parentNode.removeChild(b)}function s(a,b,c){var d="width"===b?a.offsetWidth:a.offsetHeight,e="width"===b?Xa:Ya,f=0,g=e.length;if(0<d){if("border"!==c)for(;f<g;f++)c||(d-=parseFloat(i.css(a,"padding"+e[f]))||0),d="margin"===c?d+(parseFloat(i.css(a,c+e[f]))||0):d-(parseFloat(i.css(a,"border"+e[f]+"Width"))||0);return d+"px"}d=J(a,b,b);if(0>d||null==d)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;f<g;f++)d+=parseFloat(i.css(a,"padding"+e[f]))||0,"padding"!==c&&(d+=parseFloat(i.css(a,
"border"+e[f]+"Width"))||0),"margin"===c&&(d+=parseFloat(i.css(a,c+e[f]))||0);return d+"px"}function t(a){return function(b,c){var u;"string"!==typeof b&&(c=b,b="*");if(i.isFunction(c))for(var d=b.toLowerCase().split(pa),e=0,f=d.length,g,h;e<f;e++)g=d[e],(h=/^\+/.test(g))&&(g=g.substr(1)||"*"),u=a[g]=a[g]||[],g=u,g[h?"unshift":"push"](c)}}function z(a,c,d,e,f,g){f=f||c.dataTypes[0];g=g||{};g[f]=!0;for(var f=a[f],h=0,i=f?f.length:0,j=a===da,k;h<i&&(j||!k);h++)k=f[h](c,d,e),"string"===typeof k&&(!j||
g[k]?k=b:(c.dataTypes.unshift(k),k=z(a,c,d,e,k,g)));if((j||!k)&&!g["*"])k=z(a,c,d,e,"*",g);return k}function C(a,c){var d,e,f=i.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&i.extend(!0,a,e)}function B(a,b,c,d){if(i.isArray(b))i.each(b,function(b,e){c||Za.test(a)?d(a,e):B(a+"["+("object"===typeof e||i.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&null!=b&&"object"===typeof b)for(var e in b)B(a+"["+e+"]",b[e],c,d);else d(a,b)}function D(){try{return new a.XMLHttpRequest}catch(b){}}
function K(){setTimeout(L,0);return Y=i.now()}function L(){Y=b}function w(a,b){var c={};i.each(qa.concat.apply([],qa.slice(0,b)),function(){c[this]=a});return c}function ra(a){if(!ea[a]){var b=q.body,c=i("<"+a+">").appendTo(b),d=c.css("display");c.remove();if("none"===d||""===d){if(!F)F=q.createElement("iframe"),F.frameBorder=F.width=F.height=0;b.appendChild(F);if(!O||!F.createElement)O=(F.contentWindow||F.contentDocument).document,O.write(("CSS1Compat"===q.compatMode?"<!doctype html>":"")+"<html><body>"),
O.close();c=O.createElement(a);O.body.appendChild(c);d=i.css(c,"display");b.removeChild(F)}ea[a]=d}return ea[a]}function fa(a){return i.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var q=a.document,$a=a.navigator,ab=a.location,i=function(){function c(){if(!d.isReady){try{q.documentElement.doScroll("left")}catch(a){setTimeout(c,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,
m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,l=/^[\],:{}\s]*$/,n=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,o=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,D=/(mozilla)(?:.*? rv:([\w.]+))?/,C=/-([a-z]|[0-9])/ig,B=/^-ms-/,v=function(a,b){return(b+"").toUpperCase()},z=$a.userAgent,Z,U,bb=Object.prototype.toString,ga=Object.prototype.hasOwnProperty,ha=Array.prototype.push,X=Array.prototype.slice,
sa=String.prototype.trim,ta=Array.prototype.indexOf,ua={};d.fn=d.prototype={constructor:d,init:function(a,c,e){var f;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if("body"===a&&!c&&q.body)return this.context=q,this[0]=q.body,this.selector=a,this.length=1,this;if("string"===typeof a){if((f="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&3<=a.length?[null,a,null]:h.exec(a))&&(f[1]||!c)){if(f[1])return e=(c=c instanceof d?c[0]:c)?c.ownerDocument||c:q,(a=m.exec(a))?
d.isPlainObject(c)?(a=[q.createElement(a[1])],d.fn.attr.call(a,c,!0)):a=[e.createElement(a[1])]:(a=d.buildFragment([f[1]],[e]),a=(a.cacheable?d.clone(a.fragment):a.fragment).childNodes),d.merge(this,a);if((c=q.getElementById(f[2]))&&c.parentNode){if(c.id!==f[2])return e.find(a);this.length=1;this[0]=c}this.context=q;this.selector=a;return this}return!c||c.jquery?(c||e).find(a):this.constructor(c).find(a)}if(d.isFunction(a))return e.ready(a);if(a.selector!==b)this.selector=a.selector,this.context=
a.context;return d.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return X.call(this,0)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?ha.apply(e,a):d.merge(e,a);e.prevObject=this;e.context=this.context;if("find"===b)e.selector=this.selector+(this.selector?" ":"")+c;else if(b)e.selector=this.selector+"."+b+"("+c+")";return e},each:function(a,
b){return d.each(this,a,b)},ready:function(a){d.bindReady();Z.add(a);return this},eq:function(a){a=+a;return-1===a?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(X.apply(this,arguments),"slice",X.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:ha,sort:[].sort,splice:[].splice};
d.fn.init.prototype=d.fn;d.extend=d.fn.extend=function(){var a,c,e,f,g,u=arguments[0]||{},h=1,i=arguments.length,j=!1;"boolean"===typeof u&&(j=u,u=arguments[1]||{},h=2);"object"!==typeof u&&!d.isFunction(u)&&(u={});i===h&&(u=this,--h);for(;h<i;h++)if(null!=(a=arguments[h]))for(c in a)e=u[c],f=a[c],u!==f&&(j&&f&&(d.isPlainObject(f)||(g=d.isArray(f)))?(g?(g=!1,e=e&&d.isArray(e)?e:[]):e=e&&d.isPlainObject(e)?e:{},u[c]=d.extend(j,e,f)):f!==b&&(u[c]=f));return u};d.extend({noConflict:function(b){if(a.$===
d)a.$=f;if(b&&a.jQuery===d)a.jQuery=e;return d},isReady:!1,readyWait:1,holdReady:function(a){a?d.readyWait++:d.ready(!0)},ready:function(a){if(!0===a&&!--d.readyWait||!0!==a&&!d.isReady){if(!q.body)return setTimeout(d.ready,1);d.isReady=!0;!0!==a&&0<--d.readyWait||(Z.fireWith(q,[d]),d.fn.trigger&&d(q).trigger("ready").off("ready"))}},bindReady:function(){if(!Z){Z=d.Callbacks("once memory");if("complete"===q.readyState)return setTimeout(d.ready,1);if(q.addEventListener)q.addEventListener("DOMContentLoaded",
U,!1),a.addEventListener("load",d.ready,!1);else if(q.attachEvent){q.attachEvent("onreadystatechange",U);a.attachEvent("onload",d.ready);var b=!1;try{b=null==a.frameElement}catch(e){}q.documentElement.doScroll&&b&&c()}}},isFunction:function(a){return"function"===d.type(a)},isArray:Array.isArray||function(a){return"array"===d.type(a)},isWindow:function(a){return a&&"object"===typeof a&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==
a?""+a:ua[bb.call(a)]||"object"},isPlainObject:function(a){if(!a||"object"!==d.type(a)||a.nodeType||d.isWindow(a))return!1;try{if(a.constructor&&!ga.call(a,"constructor")&&!ga.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}for(var e in a);return e===b||ga.call(a,e)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw Error(a);},parseJSON:function(b){if("string"!==typeof b||!b)return null;b=d.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);
if(l.test(b.replace(n,"@").replace(p,"]").replace(o,"")))return(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(c){var e,f;try{a.DOMParser?(f=new DOMParser,e=f.parseFromString(c,"text/xml")):(e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(c))}catch(g){e=b}(!e||!e.documentElement||e.getElementsByTagName("parsererror").length)&&d.error("Invalid XML: "+c);return e},noop:function(){},globalEval:function(b){b&&i.test(b)&&(a.execScript||function(b){a.eval.call(a,
b)})(b)},camelCase:function(a){return a.replace(B,"ms-").replace(C,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,u=a.length,h=u===b||d.isFunction(a);if(e)if(h)for(f in a){if(!1===c.apply(a[f],e))break}else for(;g<u&&!(!1===c.apply(a[g++],e)););else if(h)for(f in a){if(!1===c.call(a[f],f,a[f]))break}else for(;g<u&&!(!1===c.call(a[g],g,a[g++])););return a},trim:sa?function(a){return null==a?"":sa.call(a)}:function(a){return null==
a?"":a.toString().replace(j,"").replace(k,"")},makeArray:function(a,b){var c=b||[];if(null!=a){var e=d.type(a);null==a.length||"string"===e||"function"===e||"regexp"===e||d.isWindow(a)?ha.call(c,a):d.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(ta)return ta.call(b,a,c);d=b.length;for(c=c?0>c?Math.max(0,d+c):c:0;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if("number"===typeof c.length)for(var f=c.length;e<f;e++)a[d++]=c[e];else for(;c[e]!==b;)a[d++]=
c[e++];a.length=d;return a},grep:function(a,b,c){for(var d=[],e,c=!!c,f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,e){var f,g,u=[],h=0,i=a.length;if(a instanceof d||i!==b&&"number"===typeof i&&(0<i&&a[0]&&a[i-1]||0===i||d.isArray(a)))for(;h<i;h++)f=c(a[h],h,e),null!=f&&(u[u.length]=f);else for(g in a)f=c(a[g],g,e),null!=f&&(u[u.length]=f);return u.concat.apply([],u)},guid:1,proxy:function(a,c){if("string"===typeof c)var e=a[c],c=a,a=e;if(!d.isFunction(a))return b;
var f=X.call(arguments,2),e=function(){return a.apply(c,f.concat(X.call(arguments)))};e.guid=a.guid=a.guid||e.guid||d.guid++;return e},access:function(a,c,e,f,g,u){var h=a.length;if("object"===typeof c){for(var i in c)d.access(a,i,c[i],f,g,e);return a}if(e!==b){f=!u&&f&&d.isFunction(e);for(i=0;i<h;i++)g(a[i],c,f?e.call(a[i],i,g(a[i],c)):e,u);return a}return h?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();a=r.exec(a)||s.exec(a)||t.exec(a)||0>a.indexOf("compatible")&&
D.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0,a,this);a.superclass=this;a.fn=a.prototype=this();a.fn.constructor=a;a.sub=this.sub;a.fn.init=function(c,e){e&&e instanceof d&&!(e instanceof a)&&(e=a(e));return d.fn.init.call(this,c,e,b)};a.fn.init.prototype=a.fn;var b=a(q);return a},browser:{}});d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){ua["[object "+b+"]"]=b.toLowerCase()});
z=d.uaMatch(z);if(z.browser)d.browser[z.browser]=!0,d.browser.version=z.version;if(d.browser.webkit)d.browser.safari=!0;i.test("\u00a0")&&(j=/^[\s\xA0]+/,k=/[\s\xA0]+$/);g=d(q);q.addEventListener?U=function(){q.removeEventListener("DOMContentLoaded",U,!1);d.ready()}:q.attachEvent&&(U=function(){"complete"===q.readyState&&(q.detachEvent("onreadystatechange",U),d.ready())});return d}(),na={};i.Callbacks=function(a){var a=a?na[a]||c(a):{},d=[],e=[],f,g,h,j,k,m=function(b){var c,e,f,g;for(c=0,e=b.length;c<
e;c++)f=b[c],g=i.type(f),"array"===g?m(f):"function"===g&&(!a.unique||!n.has(f))&&d.push(f)},l=function(b,c){c=c||[];f=!a.memory||[b,c];g=!0;k=h||0;h=0;for(j=d.length;d&&k<j;k++)if(!1===d[k].apply(b,c)&&a.stopOnFalse){f=!0;break}g=!1;d&&(a.once?!0===f?n.disable():d=[]:e&&e.length&&(f=e.shift(),n.fireWith(f[0],f[1])))},n={add:function(){if(d){var a=d.length;m(arguments);g?j=d.length:f&&!0!==f&&(h=a,l(f[0],f[1]))}return this},remove:function(){if(d)for(var b=arguments,c=0,e=b.length;c<e;c++)for(var f=
0;f<d.length&&!(b[c]===d[f]&&(g&&f<=j&&(j--,f<=k&&k--),d.splice(f--,1),a.unique));f++);return this},has:function(a){if(d)for(var b=0,c=d.length;b<c;b++)if(a===d[b])return!0;return!1},empty:function(){d=[];return this},disable:function(){d=e=f=b;return this},disabled:function(){return!d},lock:function(){e=b;(!f||!0===f)&&n.disable();return this},locked:function(){return!e},fireWith:function(b,c){e&&(g?a.once||e.push([b,c]):(!a.once||!f)&&l(b,c));return this},fire:function(){n.fireWith(this,arguments);
return this},fired:function(){return!!f}};return n};var ia=[].slice;i.extend({Deferred:function(a){var b=i.Callbacks("once memory"),c=i.Callbacks("once memory"),d=i.Callbacks("memory"),e="pending",f={resolve:b,reject:c,notify:d},g={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){h.done(a).fail(b).progress(c);return this},always:function(){h.done.apply(h,arguments).fail.apply(h,arguments);return this},pipe:function(a,b,c){return i.Deferred(function(d){i.each({done:[a,
"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],f;if(i.isFunction(c))h[a](function(){if((f=c.apply(this,arguments))&&i.isFunction(f.promise))f.promise().then(d.resolve,d.reject,d.notify);else d[e+"With"](this===h?d:this,[f])});else h[a](d[e])})}).promise()},promise:function(a){if(null==a)a=g;else for(var b in g)a[b]=g[b];return a}},h=g.promise({}),j;for(j in f)h[j]=f[j].fire,h[j+"With"]=f[j].fireWith;h.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e=
"rejected"},b.disable,d.lock);a&&a.call(h,h);return h},when:function(a){function b(a){return function(b){d[a]=1<arguments.length?ia.call(arguments,0):b;--h||j.resolveWith(j,d)}}function c(a){return function(b){g[a]=1<arguments.length?ia.call(arguments,0):b;j.notifyWith(k,g)}}var d=ia.call(arguments,0),e=0,f=d.length,g=Array(f),h=f,j=1>=f&&a&&i.isFunction(a.promise)?a:i.Deferred(),k=j.promise();if(1<f){for(;e<f;e++)d[e]&&d[e].promise&&i.isFunction(d[e].promise)?d[e].promise().then(b(e),j.reject,c(e)):
--h;h||j.resolveWith(j,d)}else j!==a&&j.resolveWith(j,f?[a]:[]);return k}});i.support=function(){var b,c,d,e,f,g,h,j,k=q.createElement("div");k.setAttribute("className","t");k.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";c=k.getElementsByTagName("*");d=k.getElementsByTagName("a")[0];if(!c||!c.length||!d)return{};e=q.createElement("select");f=e.appendChild(q.createElement("option"));c=k.getElementsByTagName("input")[0];b={leadingWhitespace:3===
k.firstChild.nodeType,tbody:!k.getElementsByTagName("tbody").length,htmlSerialize:!!k.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.55/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:"on"===c.value,optSelected:f.selected,getSetAttribute:"t"!==k.className,enctype:!!q.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==q.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0,
focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0};c.checked=!0;b.noCloneChecked=c.cloneNode(!0).checked;e.disabled=!0;b.optDisabled=!f.disabled;try{delete k.test}catch(m){b.deleteExpando=!1}!k.addEventListener&&k.attachEvent&&k.fireEvent&&(k.attachEvent("onclick",function(){b.noCloneEvent=!1}),k.cloneNode(!0).fireEvent("onclick"));c=q.createElement("input");c.value="t";c.setAttribute("type","radio");b.radioValue="t"===c.value;
c.setAttribute("checked","checked");k.appendChild(c);d=q.createDocumentFragment();d.appendChild(k.lastChild);b.checkClone=d.cloneNode(!0).cloneNode(!0).lastChild.checked;b.appendChecked=c.checked;d.removeChild(c);d.appendChild(k);k.innerHTML="";if(a.getComputedStyle)c=q.createElement("div"),c.style.width="0",c.style.marginRight="0",k.style.width="2px",k.appendChild(c),b.reliableMarginRight=0===(parseInt((a.getComputedStyle(c,null)||{marginRight:0}).marginRight,10)||0);if(k.attachEvent)for(h in{submit:1,
change:1,focusin:1})c="on"+h,j=c in k,j||(k.setAttribute(c,"return;"),j="function"===typeof k[c]),b[h+"Bubbles"]=j;d.removeChild(k);d=e=f=c=k=c=null;i(function(){var a,c,d,e,f=q.getElementsByTagName("body")[0];if(f){a=q.createElement("div");a.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";f.insertBefore(a,f.firstChild);k=q.createElement("div");a.appendChild(k);k.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
g=k.getElementsByTagName("td");j=0===g[0].offsetHeight;g[0].style.display="";g[1].style.display="none";b.reliableHiddenOffsets=j&&0===g[0].offsetHeight;k.innerHTML="";k.style.width=k.style.paddingLeft="1px";i.boxModel=b.boxModel=2===k.offsetWidth;if("undefined"!==typeof k.style.zoom)k.style.display="inline",k.style.zoom=1,b.inlineBlockNeedsLayout=2===k.offsetWidth,k.style.display="",k.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=2!==k.offsetWidth;k.style.cssText="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;visibility:hidden;border:0;";
k.innerHTML="<div style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;'><div></div></div><table style='position:absolute;top:0;left:0;width:1px;height:1px;margin:0;border:5px solid #000;padding:0;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";c=k.firstChild;d=c.firstChild;e={doesNotAddBorder:5!==d.offsetTop,doesAddBorderForTableAndCells:5===c.nextSibling.firstChild.firstChild.offsetTop};d.style.position="fixed";d.style.top="20px";e.fixedPosition=
20===d.offsetTop||15===d.offsetTop;d.style.position=d.style.top="";c.style.overflow="hidden";c.style.position="relative";e.subtractsBorderForOverflowNotVisible=-5===d.offsetTop;e.doesNotIncludeMarginInBodyOffset=1!==f.offsetTop;f.removeChild(a);k=null;i.extend(b,e)}});return b}();var Ua=/^(?:\{.*\}|\[.*\])$/,Ta=/([A-Z])/g;i.extend({cache:{},uuid:0,expando:"jQuery"+(i.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=
a.nodeType?i.cache[a[i.expando]]:a[i.expando];return!!a&&!e(a)},data:function(a,c,d,e){if(i.acceptData(a)){var f;f=i.expando;var g="string"===typeof c,h=a.nodeType,j=h?i.cache:a,k=h?a[f]:a[f]&&f,m="events"===c;if(k&&j[k]&&(m||e||j[k].data)||!(g&&d===b)){k||(h?a[f]=k=++i.uuid:k=f);if(!j[k]&&(j[k]={},!h))j[k].toJSON=i.noop;if("object"===typeof c||"function"===typeof c)e?j[k]=i.extend(j[k],c):j[k].data=i.extend(j[k].data,c);f=a=j[k];if(!e){if(!a.data)a.data={};a=a.data}d!==b&&(a[i.camelCase(c)]=d);if(m&&
!a[c])return f.events;g?(d=a[c],null==d&&(d=a[i.camelCase(c)])):d=a;return d}}},removeData:function(a,b,c){if(i.acceptData(a)){var d,f,g,h=i.expando,j=a.nodeType,k=j?i.cache:a,m=j?a[h]:h;if(k[m]){if(b&&(d=c?k[m]:k[m].data)){i.isArray(b)||(b in d?b=[b]:(b=i.camelCase(b),b=b in d?[b]:b.split(" ")));for(f=0,g=b.length;f<g;f++)delete d[b[f]];if(!(c?e:i.isEmptyObject)(d))return}if(!c&&(delete k[m].data,!e(k[m])))return;i.support.deleteExpando||!k.setInterval?delete k[m]:k[m]=null;j&&(i.support.deleteExpando?
delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}}},_data:function(a,b,c){return i.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=i.noData[a.nodeName.toLowerCase()];if(b)return!(!0===b||a.getAttribute("classid")!==b)}return!0}});i.fn.extend({data:function(a,c){var e,f,g,h=null;if("undefined"===typeof a){if(this.length&&(h=i.data(this[0]),1===this[0].nodeType&&!i._data(this[0],"parsedAttrs"))){f=this[0].attributes;for(var j=0,k=f.length;j<k;j++)g=f[j].name,0===g.indexOf("data-")&&
(g=i.camelCase(g.substring(5)),d(this[0],g,h[g]));i._data(this[0],"parsedAttrs",!0)}return h}if("object"===typeof a)return this.each(function(){i.data(this,a)});e=a.split(".");e[1]=e[1]?"."+e[1]:"";return c===b?(h=this.triggerHandler("getData"+e[1]+"!",[e[0]]),h===b&&this.length&&(h=i.data(this[0],a),h=d(this[0],a,h)),h===b&&e[1]?this.data(e[0]):h):this.each(function(){var b=i(this),d=[e[0],c];b.triggerHandler("setData"+e[1]+"!",d);i.data(this,a,c);b.triggerHandler("changeData"+e[1]+"!",d)})},removeData:function(a){return this.each(function(){i.removeData(this,
a)})}});i.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",i._data(a,b,(i._data(a,b)||0)+1))},_unmark:function(a,b,c){!0!==a&&(c=b,b=a,a=!1);if(b){var c=c||"fx",d=c+"mark";(a=a?0:(i._data(b,d)||1)-1)?i._data(b,d,a):(i.removeData(b,d,!0),f(b,c,"mark"))}},queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=i._data(a,b),c&&(!d||i.isArray(c)?d=i._data(a,b,i.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){var b=b||"fx",c=i.queue(a,b),d=c.shift(),e={};"inprogress"===d&&(d=c.shift());d&&
("fx"===b&&c.unshift("inprogress"),i._data(a,b+".run",e),d.call(a,function(){i.dequeue(a,b)},e));c.length||(i.removeData(a,b+"queue "+b+".run",!0),f(a,b,"queue"))}});i.fn.extend({queue:function(a,c){"string"!==typeof a&&(c=a,a="fx");return c===b?i.queue(this[0],a):this.each(function(){var b=i.queue(this,a,c);"fx"===a&&"inprogress"!==b[0]&&i.dequeue(this,a)})},dequeue:function(a){return this.each(function(){i.dequeue(this,a)})},delay:function(a,b){a=i.fx?i.fx.speeds[a]||a:a;return this.queue(b||"fx",
function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a){function c(){--g||d.resolveWith(e,[e])}"string"!==typeof a&&(a=b);for(var a=a||"fx",d=i.Deferred(),e=this,f=e.length,g=1,h=a+"defer",j=a+"queue",a=a+"mark",k;f--;)if(k=i.data(e[f],h,b,!0)||(i.data(e[f],j,b,!0)||i.data(e[f],a,b,!0))&&i.data(e[f],h,i.Callbacks("once memory"),!0))g++,k.add(c);c();return d.promise()}});var va=/[\n\t\r]/g,aa=/\s+/,cb=/\r/g,
db=/^(?:button|input)$/i,eb=/^(?:button|input|object|select|textarea)$/i,fb=/^a(?:rea)?$/i,wa=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,xa=i.support.getSetAttribute,H,ya,za;i.fn.extend({attr:function(a,b){return i.access(this,a,b,!0,i.attr)},removeAttr:function(a){return this.each(function(){i.removeAttr(this,a)})},prop:function(a,b){return i.access(this,a,b,!0,i.prop)},removeProp:function(a){a=i.propFix[a]||a;return this.each(function(){try{this[a]=
b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(i.isFunction(a))return this.each(function(b){i(this).addClass(a.call(this,b,this.className))});if(a&&"string"===typeof a){b=a.split(aa);for(c=0,d=this.length;c<d;c++)if(e=this[c],1===e.nodeType)if(!e.className&&1===b.length)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=i.trim(f)}}return this},removeClass:function(a){var c,d,e,f,g,h,j;if(i.isFunction(a))return this.each(function(b){i(this).removeClass(a.call(this,
b,this.className))});if(a&&"string"===typeof a||a===b){c=(a||"").split(aa);for(d=0,e=this.length;d<e;d++)if(f=this[d],1===f.nodeType&&f.className)if(a){g=(" "+f.className+" ").replace(va," ");for(h=0,j=c.length;h<j;h++)g=g.replace(" "+c[h]+" "," ");f.className=i.trim(g)}else f.className=""}return this},toggleClass:function(a,b){var c=typeof a,d="boolean"===typeof b;return i.isFunction(a)?this.each(function(c){i(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===
c)for(var e,f=0,g=i(this),h=b,j=a.split(aa);e=j[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else if("undefined"===c||"boolean"===c)this.className&&i._data(this,"__className__",this.className),this.className=this.className||!1===a?"":i._data(this,"__className__")||""})},hasClass:function(a){for(var a=" "+a+" ",b=0,c=this.length;b<c;b++)if(1===this[b].nodeType&&-1<(" "+this[b].className+" ").replace(va," ").indexOf(a))return!0;return!1},val:function(a){var c,d,e,f=this[0];if(arguments.length)return e=
i.isFunction(a),this.each(function(d){var f=i(this);if(1===this.nodeType&&(d=e?a.call(this,d,f.val()):a,null==d?d="":"number"===typeof d?d+="":i.isArray(d)&&(d=i.map(d,function(a){return null==a?"":a+""})),c=i.valHooks[this.nodeName.toLowerCase()]||i.valHooks[this.type],!c||!("set"in c)||c.set(this,d,"value")===b))this.value=d});if(f){if((c=i.valHooks[f.nodeName.toLowerCase()]||i.valHooks[f.type])&&"get"in c&&(d=c.get(f,"value"))!==b)return d;d=f.value;return"string"===typeof d?d.replace(cb,""):null==
d?"":d}}});i.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d=a.selectedIndex,e=[],f=a.options,g="select-one"===a.type;if(0>d)return null;a=g?d:0;for(c=g?d+1:f.length;a<c;a++)if(b=f[a],b.selected&&(i.support.optDisabled?!b.disabled:null===b.getAttribute("disabled"))&&(!b.parentNode.disabled||!i.nodeName(b.parentNode,"optgroup"))){b=i(b).val();if(g)return b;e.push(b)}return g&&!e.length&&f.length?i(f[d]).val():
e},set:function(a,b){var c=i.makeArray(b);i(a).find("option").each(function(){this.selected=0<=i.inArray(i(this).val(),c)});if(!c.length)a.selectedIndex=-1;return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var f,g,h=a.nodeType;if(a&&!(3===h||8===h||2===h)){if(e&&c in i.attrFn)return i(a)[c](d);if("undefined"===typeof a.getAttribute)return i.prop(a,c,d);if(e=1!==h||!i.isXMLDoc(a))c=c.toLowerCase(),g=i.attrHooks[c]||(wa.test(c)?ya:H);if(d!==
b)if(null===d)i.removeAttr(a,c);else{if(g&&"set"in g&&e&&(f=g.set(a,d,c))!==b)return f;a.setAttribute(c,""+d);return d}else{if(g&&"get"in g&&e&&null!==(f=g.get(a,c)))return f;f=a.getAttribute(c);return null===f?b:f}}},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&1===a.nodeType){d=b.toLowerCase().split(aa);for(f=d.length;g<f;g++)if(e=d[g])c=i.propFix[e]||e,i.attr(a,e,""),a.removeAttribute(xa?e:c),wa.test(e)&&c in a&&(a[c]=!1)}},attrHooks:{type:{set:function(a,b){if(db.test(a.nodeName)&&a.parentNode)i.error("type property can't be changed");
else if(!i.support.radioValue&&"radio"===b&&i.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b);if(c)a.value=c;return b}}},value:{get:function(a,b){return H&&i.nodeName(a,"button")?H.get(a,b):b in a?a.value:null},set:function(a,b,c){if(H&&i.nodeName(a,"button"))return H.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",
frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g=a.nodeType;if(a&&!(3===g||8===g||2===g)){if(1!==g||!i.isXMLDoc(a))c=i.propFix[c]||c,f=i.propHooks[c];return d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):eb.test(a.nodeName)||fb.test(a.nodeName)&&a.href?0:b}}}});i.attrHooks.tabindex=i.propHooks.tabIndex;
ya={get:function(a,c){var d,e=i.prop(a,c);return!0===e||"boolean"!==typeof e&&(d=a.getAttributeNode(c))&&!1!==d.nodeValue?c.toLowerCase():b},set:function(a,b,c){!1===b?i.removeAttr(a,c):(b=i.propFix[c]||c,b in a&&(a[b]=!0),a.setAttribute(c,c.toLowerCase()));return c}};if(!xa)za={name:!0,id:!0},H=i.valHooks.button={get:function(a,c){var d;return(d=a.getAttributeNode(c))&&(za[c]?""!==d.nodeValue:d.specified)?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);d||(d=q.createAttribute(c),a.setAttributeNode(d));
return d.nodeValue=b+""}},i.attrHooks.tabindex.set=H.set,i.each(["width","height"],function(a,b){i.attrHooks[b]=i.extend(i.attrHooks[b],{set:function(a,c){if(""===c)return a.setAttribute(b,"auto"),c}})}),i.attrHooks.contenteditable={get:H.get,set:function(a,b,c){""===b&&(b="false");H.set(a,b,c)}};i.support.hrefNormalized||i.each(["href","src","width","height"],function(a,c){i.attrHooks[c]=i.extend(i.attrHooks[c],{get:function(a){a=a.getAttribute(c,2);return null===a?b:a}})});if(!i.support.style)i.attrHooks.style=
{get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}};if(!i.support.optSelected)i.propHooks.selected=i.extend(i.propHooks.selected,{get:function(){return null}});if(!i.support.enctype)i.propFix.enctype="encoding";i.support.checkOn||i.each(["radio","checkbox"],function(){i.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}});i.each(["radio","checkbox"],function(){i.valHooks[this]=i.extend(i.valHooks[this],{set:function(a,
b){if(i.isArray(b))return a.checked=0<=i.inArray(i(a).val(),b)}})});var ja=/^(?:textarea|input|select)$/i,Aa=/^([^\.]*)?(?:\.(.+))?$/,gb=/\bhover(\.\S+)?\b/,hb=/^key/,ib=/^(?:mouse|contextmenu)|click/,Ba=/^(?:focusinfocus|focusoutblur)$/,jb=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,kb=function(a){if(a=jb.exec(a))a[1]=(a[1]||"").toLowerCase(),a[3]=a[3]&&RegExp("(?:^|\\s)"+a[3]+"(?:\\s|$)");return a},Ca=function(a){return i.event.special.hover?a:a.replace(gb,"mouseenter$1 mouseleave$1")};i.event={add:function(a,
c,d,e,f){var g,h,j,k,m,l,n,p,o;if(!(3===a.nodeType||8===a.nodeType||!c||!d||!(g=i._data(a)))){if(d.handler)n=d,d=n.handler;if(!d.guid)d.guid=i.guid++;j=g.events;if(!j)g.events=j={};h=g.handle;if(!h)g.handle=h=function(a){return"undefined"!==typeof i&&(!a||i.event.triggered!==a.type)?i.event.dispatch.apply(h.elem,arguments):b},h.elem=a;c=i.trim(Ca(c)).split(" ");for(g=0;g<c.length;g++){k=Aa.exec(c[g])||[];m=k[1];l=(k[2]||"").split(".").sort();o=i.event.special[m]||{};m=(f?o.delegateType:o.bindType)||
m;o=i.event.special[m]||{};k=i.extend({type:m,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,quick:kb(f),namespace:l.join(".")},n);p=j[m];if(!p&&(p=j[m]=[],p.delegateCount=0,!o.setup||!1===o.setup.call(a,e,l,h)))a.addEventListener?a.addEventListener(m,h,!1):a.attachEvent&&a.attachEvent("on"+m,h);if(o.add&&(o.add.call(a,k),!k.handler.guid))k.handler.guid=d.guid;f?p.splice(p.delegateCount++,0,k):p.push(k);i.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var f=i.hasData(a)&&
i._data(a),g,h,j,k,m,l,n,p,o,r;if(f&&(n=f.events)){b=i.trim(Ca(b||"")).split(" ");for(g=0;g<b.length;g++)if(h=Aa.exec(b[g])||[],j=k=h[1],h=h[2],j){p=i.event.special[j]||{};j=(d?p.delegateType:p.bindType)||j;o=n[j]||[];m=o.length;h=h?RegExp("(^|\\.)"+h.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(l=0;l<o.length;l++)if(r=o[l],(e||k===r.origType)&&(!c||c.guid===r.guid)&&(!h||h.test(r.namespace))&&(!d||d===r.selector||"**"===d&&r.selector))o.splice(l--,1),r.selector&&o.delegateCount--,
p.remove&&p.remove.call(a,r);0===o.length&&m!==o.length&&((!p.teardown||!1===p.teardown.call(a,h))&&i.removeEvent(a,j,f.handle),delete n[j])}else for(j in n)i.event.remove(a,j+b[g],c,d,!0);if(i.isEmptyObject(n)){if(b=f.handle)b.elem=null;i.removeData(a,["events","handle"],!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,f){if(!e||!(3===e.nodeType||8===e.nodeType)){var g=c.type||c,h=[],j,k,m,l,n;if(!Ba.test(g+i.event.triggered)&&(0<=g.indexOf("!")&&(g=g.slice(0,-1),j=
!0),0<=g.indexOf(".")&&(h=g.split("."),g=h.shift(),h.sort()),e&&!i.event.customEvent[g]||i.event.global[g]))if(c="object"===typeof c?c[i.expando]?c:new i.Event(g,c):new i.Event(g),c.type=g,c.isTrigger=!0,c.exclusive=j,c.namespace=h.join("."),c.namespace_re=c.namespace?RegExp("(^|\\.)"+h.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,j=0>g.indexOf(":")?"on"+g:"",e){c.result=b;if(!c.target)c.target=e;d=null!=d?i.makeArray(d):[];d.unshift(c);m=i.event.special[g]||{};if(!(m.trigger&&!1===m.trigger.apply(e,d))){n=
[[e,m.bindType||g]];if(!f&&!m.noBubble&&!i.isWindow(e)){l=m.delegateType||g;h=Ba.test(l+g)?e:e.parentNode;for(k=null;h;h=h.parentNode)n.push([h,l]),k=h;k&&k===e.ownerDocument&&n.push([k.defaultView||k.parentWindow||a,l])}for(k=0;k<n.length&&!c.isPropagationStopped();k++)h=n[k][0],c.type=n[k][1],(l=(i._data(h,"events")||{})[c.type]&&i._data(h,"handle"))&&l.apply(h,d),(l=j&&h[j])&&i.acceptData(h)&&!1===l.apply(h,d)&&c.preventDefault();c.type=g;if(!f&&!c.isDefaultPrevented()&&(!m._default||!1===m._default.apply(e.ownerDocument,
d))&&!("click"===g&&i.nodeName(e,"a"))&&i.acceptData(e))if(j&&e[g]&&("focus"!==g&&"blur"!==g||0!==c.target.offsetWidth)&&!i.isWindow(e))(k=e[j])&&(e[j]=null),i.event.triggered=g,e[g](),i.event.triggered=b,k&&(e[j]=k);return c.result}}else for(k in e=i.cache,e)e[k].events&&e[k].events[g]&&i.event.trigger(c,d,e[k].handle.elem,!0)}},dispatch:function(c){var c=i.event.fix(c||a.event),d=(i._data(this,"events")||{})[c.type]||[],e=d.delegateCount,f=[].slice.call(arguments,0),g=!c.exclusive&&!c.namespace,
h=[],j,k,m,l,n,p,o;f[0]=c;c.delegateTarget=this;if(e&&!c.target.disabled&&!(c.button&&"click"===c.type)){m=i(this);m.context=this.ownerDocument||this;for(k=c.target;k!=this;k=k.parentNode||this){n={};p=[];m[0]=k;for(j=0;j<e;j++){l=d[j];o=l.selector;if(n[o]===b){var r=n,q=o,s;if(l.quick){s=l.quick;var t=k.attributes||{};s=(!s[1]||k.nodeName.toLowerCase()===s[1])&&(!s[2]||(t.id||{}).value===s[2])&&(!s[3]||s[3].test((t["class"]||{}).value))}else s=m.is(o);r[q]=s}n[o]&&p.push(l)}p.length&&h.push({elem:k,
matches:p})}}d.length>e&&h.push({elem:this,matches:d.slice(e)});for(j=0;j<h.length&&!c.isPropagationStopped();j++){e=h[j];c.currentTarget=e.elem;for(d=0;d<e.matches.length&&!c.isImmediatePropagationStopped();d++)if(l=e.matches[d],g||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))if(c.data=l.data,c.handleObj=l,l=((i.event.special[l.origType]||{}).handle||l.handler).apply(e.elem,f),l!==b)c.result=l,!1===l&&(c.preventDefault(),c.stopPropagation())}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){if(null==a.which)a.which=null!=b.charCode?b.charCode:b.keyCode;return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,e,f=c.button,g=c.fromElement;if(null==a.pageX&&null!=c.clientX)d=a.target.ownerDocument||q,e=d.documentElement,d=d.body,a.pageX=c.clientX+(e&&e.scrollLeft||d&&d.scrollLeft||0)-(e&&e.clientLeft||
d&&d.clientLeft||0),a.pageY=c.clientY+(e&&e.scrollTop||d&&d.scrollTop||0)-(e&&e.clientTop||d&&d.clientTop||0);if(!a.relatedTarget&&g)a.relatedTarget=g===a.target?c.toElement:g;if(!a.which&&f!==b)a.which=f&1?1:f&2?3:f&4?2:0;return a}},fix:function(a){if(a[i.expando])return a;var c,d,e=a,f=i.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props,a=i.Event(e);for(c=g.length;c;)d=g[--c],a[d]=e[d];if(!a.target)a.target=e.srcElement||q;if(3===a.target.nodeType)a.target=a.target.parentNode;
if(a.metaKey===b)a.metaKey=a.ctrlKey;return f.filter?f.filter(a,e):a},special:{ready:{setup:i.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){if(i.isWindow(this))this.onbeforeunload=c},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}},simulate:function(a,b,c,d){a=i.extend(new i.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?i.event.trigger(a,null,b):i.event.dispatch.call(b,a);a.isDefaultPrevented()&&
c.preventDefault()}};i.event.handle=i.event.dispatch;i.removeEvent=q.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)};i.Event=function(a,b){if(!(this instanceof i.Event))return new i.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||!1===a.returnValue||a.getPreventDefault&&a.getPreventDefault()?h:g):this.type=a;b&&i.extend(this,b);this.timeStamp=a&&
a.timeStamp||i.now();this[i.expando]=!0};i.Event.prototype={preventDefault:function(){this.isDefaultPrevented=h;var a=this.originalEvent;if(a)a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=h;var a=this.originalEvent;if(a)a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=h;this.stopPropagation()},isDefaultPrevented:g,isPropagationStopped:g,isImmediatePropagationStopped:g};
i.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){i.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=a.relatedTarget,d=a.handleObj,e;if(!c||c!==this&&!i.contains(this,c))a.type=d.origType,e=d.handler.apply(this,arguments),a.type=b;return e}}});if(!i.support.submitBubbles)i.event.special.submit={setup:function(){if(i.nodeName(this,"form"))return!1;i.event.add(this,"click._submit keypress._submit",function(a){a=a.target;if((a=i.nodeName(a,"input")||i.nodeName(a,
"button")?a.form:b)&&!a._submit_attached)i.event.add(a,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&i.event.simulate("submit",this.parentNode,a,!0)}),a._submit_attached=!0})},teardown:function(){if(i.nodeName(this,"form"))return!1;i.event.remove(this,"._submit")}};if(!i.support.changeBubbles)i.event.special.change={setup:function(){if(ja.test(this.nodeName)){if("checkbox"===this.type||"radio"===this.type)i.event.add(this,"propertychange._change",function(a){if("checked"===a.originalEvent.propertyName)this._just_changed=
!0}),i.event.add(this,"click._change",function(a){if(this._just_changed&&!a.isTrigger)this._just_changed=!1,i.event.simulate("change",this,a,!0)});return!1}i.event.add(this,"beforeactivate._change",function(a){a=a.target;if(ja.test(a.nodeName)&&!a._change_attached)i.event.add(a,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&i.event.simulate("change",this.parentNode,a,!0)}),a._change_attached=!0})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||
"radio"!==b.type&&"checkbox"!==b.type)return a.handleObj.handler.apply(this,arguments)},teardown:function(){i.event.remove(this,"._change");return ja.test(this.nodeName)}};i.support.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){i.event.simulate(b,a.target,i.event.fix(a),!0)};i.event.special[b]={setup:function(){0===c++&&q.addEventListener(a,d,!0)},teardown:function(){0===--c&&q.removeEventListener(a,d,!0)}}});i.fn.extend({on:function(a,c,d,e,f){var h,
j;if("object"===typeof a){"string"!==typeof c&&(d=c,c=b);for(j in a)this.on(j,c,d,a[j],f);return this}null==d&&null==e?(e=c,d=c=b):null==e&&("string"===typeof c?(e=d,d=b):(e=d,d=c,c=b));if(!1===e)e=g;else if(!e)return this;if(1===f)h=e,e=function(a){i().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=i.guid++);return this.each(function(){i.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=
a.handleObj;i(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if("object"===typeof a){for(e in a)this.off(e,c,a[e]);return this}if(!1===c||"function"===typeof c)d=c,c=b;!1===d&&(d=g);return this.each(function(){i.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){i(this.context).on(a,this.selector,b,c);return this},die:function(a,b){i(this.context).off(a,
this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1==arguments.length?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){i.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return i.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||i.guid++,d=0,e=function(c){var e=(i._data(this,"lastToggle"+a.guid)||0)%d;i._data(this,"lastToggle"+a.guid,e+1);c.preventDefault();
return b[e].apply(this,arguments)||!1};for(e.guid=c;d<b.length;)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){i.fn[b]=function(a,c){null==c&&(c=a,a=null);return 0<arguments.length?this.on(b,null,a,c):this.trigger(b)};
i.attrFn&&(i.attrFn[b]=!0);if(hb.test(b))i.event.fixHooks[b]=i.event.keyHooks;if(ib.test(b))i.event.fixHooks[b]=i.event.mouseHooks});(function(){function a(b,c,d,f,g,h){for(var g=0,j=f.length;g<j;g++){var i=f[g];if(i){for(var k=!1,i=i[b];i;){if(i[e]===d){k=f[i.sizset];break}if(1===i.nodeType&&!h)i[e]=d,i.sizset=g;if(i.nodeName.toLowerCase()===c){k=i;break}i=i[b]}f[g]=k}}}function c(a,b,d,f,g,h){for(var g=0,i=f.length;g<i;g++){var j=f[g];if(j){for(var k=!1,j=j[a];j;){if(j[e]===d){k=f[j.sizset];break}if(1===
j.nodeType){if(!h)j[e]=d,j.sizset=g;if("string"!==typeof b){if(j===b){k=!0;break}}else if(0<n.filter(b,[j]).length){k=j;break}}j=j[a]}f[g]=k}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e="sizcache"+(Math.random()+"").replace(".",""),f=0,g=Object.prototype.toString,h=!1,j=!0,k=/\\/g,m=/\r\n/g,l=/\W/;[0,0].sort(function(){j=!1;return 0});var n=function(a,b,c,e){var c=c||[],f=b=b||q;if(1!==b.nodeType&&9!==
b.nodeType)return[];if(!a||"string"!==typeof a)return c;var h,j,i,k,u,m=!0,l=n.isXML(b),A=[],N=a;do if(d.exec(""),h=d.exec(N))if(N=h[3],A.push(h[1]),h[2]){k=h[3];break}while(h);if(1<A.length&&r.exec(a))if(2===A.length&&o.relative[A[0]])j=B(A[0]+A[1],b,e);else for(j=o.relative[A[0]]?[b]:n(A.shift(),b);A.length;)a=A.shift(),o.relative[a]&&(a+=A.shift()),j=B(a,j,e);else if(!e&&1<A.length&&9===b.nodeType&&!l&&o.match.ID.test(A[0])&&!o.match.ID.test(A[A.length-1])&&(h=n.find(A.shift(),b,l),b=h.expr?n.filter(h.expr,
h.set)[0]:h.set[0]),b){h=e?{expr:A.pop(),set:z(e)}:n.find(A.pop(),1===A.length&&("~"===A[0]||"+"===A[0])&&b.parentNode?b.parentNode:b,l);j=h.expr?n.filter(h.expr,h.set):h.set;for(0<A.length?i=z(j):m=!1;A.length;)h=u=A.pop(),o.relative[u]?h=A.pop():u="",null==h&&(h=b),o.relative[u](i,h,l)}else i=[];i||(i=j);i||n.error(u||a);if("[object Array]"===g.call(i))if(m)if(b&&1===b.nodeType)for(a=0;null!=i[a];a++)i[a]&&(!0===i[a]||1===i[a].nodeType&&n.contains(b,i[a]))&&c.push(j[a]);else for(a=0;null!=i[a];a++)i[a]&&
1===i[a].nodeType&&c.push(j[a]);else c.push.apply(c,i);else z(i,c);k&&(n(k,f,c,e),n.uniqueSort(c));return c};n.uniqueSort=function(a){if(C&&(h=j,a.sort(C),h))for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1);return a};n.matches=function(a,b){return n(a,null,null,b)};n.matchesSelector=function(a,b){return 0<n(b,null,null,[a]).length};n.find=function(a,b,c){var d,e,f,g,h,j;if(!a)return[];for(e=0,f=o.order.length;e<f;e++)if(h=o.order[e],g=o.leftMatch[h].exec(a))if(j=g[1],g.splice(1,1),"\\"!==
j.substr(j.length-1)&&(g[1]=(g[1]||"").replace(k,""),d=o.find[h](g,b,c),null!=d)){a=a.replace(o.match[h],"");break}d||(d="undefined"!==typeof b.getElementsByTagName?b.getElementsByTagName("*"):[]);return{set:d,expr:a}};n.filter=function(a,c,d,e){for(var f,g,h,j,i,k,u,m,l=a,A=[],N=c,S=c&&c[0]&&n.isXML(c[0]);a&&c.length;){for(h in o.filter)if(null!=(f=o.leftMatch[h].exec(a))&&f[2])if(k=o.filter[h],i=f[1],g=!1,f.splice(1,1),"\\"!==i.substr(i.length-1)){N===A&&(A=[]);if(o.preFilter[h])if(f=o.preFilter[h](f,
N,d,A,e,S)){if(!0===f)continue}else g=j=!0;if(f)for(u=0;null!=(i=N[u]);u++)i&&(j=k(i,f,u,N),m=e^j,d&&null!=j?m?g=!0:N[u]=!1:m&&(A.push(i),g=!0));if(j!==b){d||(N=A);a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===l)if(null==g)n.error(a);else break;l=a}return N};n.error=function(a){throw Error("Syntax error, unrecognized expression: "+a);};var p=n.getText=function(a){var b,c;b=a.nodeType;var d="";if(b)if(1===b||9===b){if("string"===typeof a.textContent)return a.textContent;if("string"===typeof a.innerText)return a.innerText.replace(m,
"");for(a=a.firstChild;a;a=a.nextSibling)d+=p(a)}else{if(3===b||4===b)return a.nodeValue}else for(b=0;c=a[b];b++)8!==c.nodeType&&(d+=p(c));return d},o=n.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c="string"===typeof b,d=c&&!l.test(b),c=c&&!d;d&&(b=b.toLowerCase());for(var d=0,e=a.length,f;d<e;d++)if(f=a[d]){for(;(f=f.previousSibling)&&1!==f.nodeType;);
a[d]=c||f&&f.nodeName.toLowerCase()===b?f||!1:f===b}c&&n.filter(b,a,!0)},">":function(a,b){var c,d="string"===typeof b,e=0,f=a.length;if(d&&!l.test(b))for(b=b.toLowerCase();e<f;e++){if(c=a[e])c=c.parentNode,a[e]=c.nodeName.toLowerCase()===b?c:!1}else{for(;e<f;e++)(c=a[e])&&(a[e]=d?c.parentNode:c.parentNode===b);d&&n.filter(b,a,!0)}},"":function(b,d,e){var g,h=f++,j=c;"string"===typeof d&&!l.test(d)&&(g=d=d.toLowerCase(),j=a);j("parentNode",d,h,b,g,e)},"~":function(b,d,e){var g,h=f++,j=c;"string"===
typeof d&&!l.test(d)&&(g=d=d.toLowerCase(),j=a);j("previousSibling",d,h,b,g,e)}},find:{ID:function(a,b,c){if("undefined"!==typeof b.getElementById&&!c)return(a=b.getElementById(a[1]))&&a.parentNode?[a]:[]},NAME:function(a,b){if("undefined"!==typeof b.getElementsByName){for(var c=[],d=b.getElementsByName(a[1]),e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return 0===c.length?null:c}},TAG:function(a,b){if("undefined"!==typeof b.getElementsByTagName)return b.getElementsByTagName(a[1])}},
preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(k,"")+" ";if(f)return a;for(var f=0,g;null!=(g=b[f]);f++)g&&(e^(g.className&&0<=(" "+g.className+" ").replace(/[\t\n\r]/g," ").indexOf(a))?c||d.push(g):c&&(b[f]=!1));return!1},ID:function(a){return a[1].replace(k,"")},TAG:function(a){return a[1].replace(k,"").toLowerCase()},CHILD:function(a){if("nth"===a[1]){a[2]||n.error(a[0]);a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===a[2]&&"2n"||"odd"===a[2]&&"2n+1"||
!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0;a[3]=b[3]-0}else a[2]&&n.error(a[0]);a[0]=f++;return a},ATTR:function(a,b,c,d,e,f){b=a[1]=a[1].replace(k,"");!f&&o.attrMap[b]&&(a[1]=o.attrMap[b]);a[4]=(a[4]||a[5]||"").replace(k,"");"~="===a[2]&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(a,b,c,e,f){if("not"===a[1])if(1<(d.exec(a[3])||"").length||/^\w/.test(a[3]))a[3]=n(a[3],null,null,b);else return a=n.filter(a[3],b,c,1^f),c||e.push.apply(e,a),!1;else if(o.match.POS.test(a[0])||o.match.CHILD.test(a[0]))return!0;
return a},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return!1===a.disabled&&"hidden"!==a.type},disabled:function(a){return!0===a.disabled},checked:function(a){return!0===a.checked},selected:function(a){return!0===a.selected},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!n(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return"input"===a.nodeName.toLowerCase()&&
"text"===c&&(b===c||null===b)},radio:function(a){return"input"===a.nodeName.toLowerCase()&&"radio"===a.type},checkbox:function(a){return"input"===a.nodeName.toLowerCase()&&"checkbox"===a.type},file:function(a){return"input"===a.nodeName.toLowerCase()&&"file"===a.type},password:function(a){return"input"===a.nodeName.toLowerCase()&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return("input"===b||"button"===b)&&"submit"===a.type},image:function(a){return"input"===a.nodeName.toLowerCase()&&
"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return("input"===b||"button"===b)&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return 0===b},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return 0===b%2},odd:function(a,b){return 1===
b%2},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if("contains"===e)return 0<=(a.textContent||a.innerText||p([a])||"").indexOf(b[3]);if("not"===e){b=b[3];c=0;for(d=b.length;c<d;c++)if(b[c]===a)return!1;return!0}n.error(e)},CHILD:function(a,b){var c,d,f,g,h,j;c=b[1];j=a;switch(c){case "only":case "first":for(;j=j.previousSibling;)if(1===
j.nodeType)return!1;if("first"===c)return!0;j=a;case "last":for(;j=j.nextSibling;)if(1===j.nodeType)return!1;return!0;case "nth":c=b[2];d=b[3];if(1===c&&0===d)return!0;f=b[0];if((g=a.parentNode)&&(g[e]!==f||!a.nodeIndex)){h=0;for(j=g.firstChild;j;j=j.nextSibling)if(1===j.nodeType)j.nodeIndex=++h;g[e]=f}j=a.nodeIndex-d;return 0===c?0===j:0===j%c&&0<=j/c}},ID:function(a,b){return 1===a.nodeType&&a.getAttribute("id")===b},TAG:function(a,b){return"*"===b&&1===a.nodeType||!!a.nodeName&&a.nodeName.toLowerCase()===
b},CLASS:function(a,b){return-1<(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)},ATTR:function(a,b){var c=b[1],c=n.attr?n.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):null!=a[c]?a[c]:a.getAttribute(c),d=c+"",e=b[2],f=b[4];return null==c?"!="===e:!e&&n.attr?null!=c:"="===e?d===f:"*="===e?0<=d.indexOf(f):"~="===e?0<=(" "+d+" ").indexOf(f):!f?d&&!1!==c:"!="===e?d!==f:"^="===e?0===d.indexOf(f):"$="===e?d.substr(d.length-f.length)===f:"|="===e?d===f||d.substr(0,f.length+1)===f+"-":!1},POS:function(a,
b,c,d){var e=o.setFilters[b[2]];if(e)return e(a,c,b,d)}}},r=o.match.POS,s=function(a,b){return"\\"+(b-0+1)},t;for(t in o.match)o.match[t]=RegExp(o.match[t].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[t]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[t].source.replace(/\\(\d+)/g,s));var z=function(a,b){a=Array.prototype.slice.call(a,0);return b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(q.documentElement.childNodes,0)}catch(D){z=function(a,b){var c=0,d=b||[];if("[object Array]"===
g.call(a))Array.prototype.push.apply(d,a);else if("number"===typeof a.length)for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var C,v;q.documentElement.compareDocumentPosition?C=function(a,b){return a===b?(h=!0,0):!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition?-1:1:a.compareDocumentPosition(b)&4?-1:1}:(C=function(a,b){if(a===b)return h=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[];c=a.parentNode;
d=b.parentNode;var g=c;if(c===d)return v(a,b);if(c){if(!d)return 1}else return-1;for(;g;)e.unshift(g),g=g.parentNode;for(g=d;g;)f.unshift(g),g=g.parentNode;c=e.length;d=f.length;for(g=0;g<c&&g<d;g++)if(e[g]!==f[g])return v(e[g],f[g]);return g===c?v(a,f[g],-1):v(e[g],b,1)},v=function(a,b,c){if(a===b)return c;for(a=a.nextSibling;a;){if(a===b)return-1;a=a.nextSibling}return 1});(function(){var a=q.createElement("div"),c="script"+(new Date).getTime(),d=q.documentElement;a.innerHTML="<a name='"+c+"'/>";
d.insertBefore(a,d.firstChild);if(q.getElementById(c))o.find.ID=function(a,c,d){if("undefined"!==typeof c.getElementById&&!d)return(c=c.getElementById(a[1]))?c.id===a[1]||"undefined"!==typeof c.getAttributeNode&&c.getAttributeNode("id").nodeValue===a[1]?[c]:b:[]},o.filter.ID=function(a,b){var c="undefined"!==typeof a.getAttributeNode&&a.getAttributeNode("id");return 1===a.nodeType&&c&&c.nodeValue===b};d.removeChild(a);d=a=null})();(function(){var a=q.createElement("div");a.appendChild(q.createComment(""));
if(0<a.getElementsByTagName("*").length)o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if("*"===a[1]){for(var d=[],e=0;c[e];e++)1===c[e].nodeType&&d.push(c[e]);c=d}return c};a.innerHTML="<a href='#'></a>";if(a.firstChild&&"undefined"!==typeof a.firstChild.getAttribute&&"#"!==a.firstChild.getAttribute("href"))o.attrHandle.href=function(a){return a.getAttribute("href",2)};a=null})();q.querySelectorAll&&function(){var a=n,b=q.createElement("div");b.innerHTML="<p class='TEST'></p>";if(!(b.querySelectorAll&&
0===b.querySelectorAll(".TEST").length)){n=function(b,c,d,e){c=c||q;if(!e&&!n.isXML(c)){var f=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(f&&(1===c.nodeType||9===c.nodeType)){if(f[1])return z(c.getElementsByTagName(b),d);if(f[2]&&o.find.CLASS&&c.getElementsByClassName)return z(c.getElementsByClassName(f[2]),d)}if(9===c.nodeType){if("body"===b&&c.body)return z([c.body],d);if(f&&f[3]){var g=c.getElementById(f[3]);if(g&&g.parentNode){if(g.id===f[3])return z([g],d)}else return z([],d)}try{return z(c.querySelectorAll(b),
d)}catch(h){}}else if(1===c.nodeType&&"object"!==c.nodeName.toLowerCase()){var f=c,j=(g=c.getAttribute("id"))||"__sizzle__",i=c.parentNode,k=/^\s*[+~]/.test(b);g?j=j.replace(/'/g,"\\$&"):c.setAttribute("id",j);if(k&&i)c=c.parentNode;try{if(!k||i)return z(c.querySelectorAll("[id='"+j+"'] "+b),d)}catch(u){}finally{g||f.removeAttribute("id")}}}return a(b,c,d,e)};for(var c in a)n[c]=a[c];b=null}}();(function(){var a=q.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||
a.msMatchesSelector;if(b){var c=!b.call(q.createElement("div"),"div"),d=!1;try{b.call(q.documentElement,"[test!='']:sizzle")}catch(e){d=!0}n.matchesSelector=function(a,e){e=e.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!n.isXML(a))try{if(d||!o.match.PSEUDO.test(e)&&!/!=/.test(e)){var f=b.call(a,e);if(f||!c||a.document&&11!==a.document.nodeType)return f}}catch(g){}return 0<n(e,null,null,[a]).length}}})();(function(){var a=q.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";
if(a.getElementsByClassName&&0!==a.getElementsByClassName("e").length&&(a.lastChild.className="e",1!==a.getElementsByClassName("e").length))o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if("undefined"!==typeof b.getElementsByClassName&&!c)return b.getElementsByClassName(a[1])},a=null})();n.contains=q.documentElement.contains?function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:q.documentElement.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:function(){return!1};
n.isXML=function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?"HTML"!==a.nodeName:!1};var B=function(a,b,c){for(var d,e=[],f="",b=b.nodeType?[b]:b;d=o.match.PSEUDO.exec(a);)f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;d=0;for(var g=b.length;d<g;d++)n(a,b[d],e,c);return n.filter(f,e)};n.attr=i.attr;n.selectors.attrMap={};i.find=n;i.expr=n.selectors;i.expr[":"]=i.expr.filters;i.unique=n.uniqueSort;i.text=n.getText;i.isXMLDoc=n.isXML;i.contains=n.contains})();var lb=/Until$/,
mb=/^(?:parents|prevUntil|prevAll)/,nb=/,/,Va=/^.[^:#\[\.,]*$/,ob=Array.prototype.slice,Da=i.expr.match.POS,pb={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({find:function(a){var b=this,c,d;if("string"!==typeof a)return i(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(i.contains(b[c],this))return!0});var e=this.pushStack("","find",a),f,g,h;for(c=0,d=this.length;c<d;c++)if(f=e.length,i.find(a,this[c],e),0<c)for(g=f;g<e.length;g++)for(h=0;h<f;h++)if(e[h]===e[g]){e.splice(g--,1);break}return e},
has:function(a){var b=i(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(i.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(j(this,a,!1),"not",a)},filter:function(a){return this.pushStack(j(this,a,!0),"filter",a)},is:function(a){return!!a&&("string"===typeof a?Da.test(a)?0<=i(a,this.context).index(this[0]):0<i.filter(a,this).length:0<this.filter(a).length)},closest:function(a,b){var c=[],d,e,f=this[0];if(i.isArray(a)){for(e=1;f&&f.ownerDocument&&f!==b;){for(d=
0;d<a.length;d++)i(f).is(a[d])&&c.push({selector:a[d],elem:f,level:e});f=f.parentNode;e++}return c}var g=Da.test(a)||"string"!==typeof a?i(a,b||this.context):0;for(d=0,e=this.length;d<e;d++)for(f=this[d];f;)if(g?-1<g.index(f):i.find.matchesSelector(f,a)){c.push(f);break}else if(f=f.parentNode,!f||!f.ownerDocument||f===b||11===f.nodeType)break;c=1<c.length?i.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){return!a?this[0]&&this[0].parentNode?this.prevAll().length:-1:"string"===
typeof a?i.inArray(this[0],i(a)):i.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c="string"===typeof a?i(a,b):i.makeArray(a&&a.nodeType?[a]:a),d=i.merge(this.get(),c);return this.pushStack(!c[0]||!c[0].parentNode||11===c[0].parentNode.nodeType||!d[0]||!d[0].parentNode||11===d[0].parentNode.nodeType?d:i.unique(d))},andSelf:function(){return this.add(this.prevObject)}});i.each({parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},parents:function(a){return i.dir(a,"parentNode")},
parentsUntil:function(a,b,c){return i.dir(a,"parentNode",c)},next:function(a){return i.nth(a,2,"nextSibling")},prev:function(a){return i.nth(a,2,"previousSibling")},nextAll:function(a){return i.dir(a,"nextSibling")},prevAll:function(a){return i.dir(a,"previousSibling")},nextUntil:function(a,b,c){return i.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return i.dir(a,"previousSibling",c)},siblings:function(a){return i.sibling(a.parentNode.firstChild,a)},children:function(a){return i.sibling(a.firstChild)},
contents:function(a){return i.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:i.makeArray(a.childNodes)}},function(a,b){i.fn[a]=function(c,d){var e=i.map(this,b,c);lb.test(a)||(d=c);d&&"string"===typeof d&&(e=i.filter(d,e));e=1<this.length&&!pb[a]?i.unique(e):e;if((1<this.length||nb.test(d))&&mb.test(a))e=e.reverse();return this.pushStack(e,a,ob.call(arguments).join(","))}});i.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return 1===b.length?i.find.matchesSelector(b[0],a)?[b[0]]:
[]:i.find.matches(a,b)},dir:function(a,c,d){for(var e=[],a=a[c];a&&9!==a.nodeType&&(d===b||1!==a.nodeType||!i(a).is(d));)1===a.nodeType&&e.push(a),a=a[c];return e},nth:function(a,b,c){for(var b=b||1,d=0;a&&!(1===a.nodeType&&++d===b);a=a[c]);return a},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var oa="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
qb=/ jQuery\d+="(?:\d+|null)"/g,ka=/^\s+/,Ea=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Fa=/<([\w:]+)/,rb=/<tbody/i,sb=/<|&#?\w+;/,tb=/<(?:script|style)/i,ub=/<(?:script|object|embed|option|style)/i,Ga=RegExp("<(?:"+oa+")","i"),Ha=/checked\s*(?:[^=]|=\s*.checked.)/i,vb=/\/(java|ecma)script/i,Wa=/^\s*<!(?:\[CDATA\[|\-\-)/,E={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>",
"</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ia=k(q);E.optgroup=E.option;E.tbody=E.tfoot=E.colgroup=E.caption=E.thead;E.th=E.td;if(!i.support.htmlSerialize)E._default=[1,"div<div>","</div>"];i.fn.extend({text:function(a){return i.isFunction(a)?this.each(function(b){var c=i(this);c.text(a.call(this,b,c.text()))}):"object"!==typeof a&&a!==b?this.empty().append((this[0]&&
this[0].ownerDocument||q).createTextNode(a)):i.text(this)},wrapAll:function(a){if(i.isFunction(a))return this.each(function(b){i(this).wrapAll(a.call(this,b))});if(this[0]){var b=i(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return i.isFunction(a)?this.each(function(b){i(this).wrapInner(a.call(this,b))}):this.each(function(){var b=
i(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=i.isFunction(a);return this.each(function(c){i(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1===this.nodeType&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1===this.nodeType&&this.insertBefore(a,
this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=i.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,
i.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;null!=(d=this[c]);c++)if(!a||i.filter(a,[d]).length)!b&&1===d.nodeType&&(i.cleanData(d.getElementsByTagName("*")),i.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;null!=(b=this[a]);a++)for(1===b.nodeType&&i.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a,b){a=null==a?!1:a;b=null==b?a:b;return this.map(function(){return i.clone(this,
a,b)})},html:function(a){if(a===b)return this[0]&&1===this[0].nodeType?this[0].innerHTML.replace(qb,""):null;if("string"===typeof a&&!tb.test(a)&&(i.support.leadingWhitespace||!ka.test(a))&&!E[(Fa.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ea,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)if(1===this[c].nodeType)i.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a}catch(e){this.empty().append(a)}}else i.isFunction(a)?this.each(function(b){var c=i(this);c.html(a.call(this,b,
c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(i.isFunction(a))return this.each(function(b){var c=i(this),d=c.html();c.replaceWith(a.call(this,b,d))});"string"!==typeof a&&(a=i(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;i(this).remove();b?i(b).before(a):i(c).append(a)})}return this.length?this.pushStack(i(i.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,
c,d){var e,f,g,h=a[0],j=[];if(!i.support.checkClone&&3===arguments.length&&"string"===typeof h&&Ha.test(h))return this.each(function(){i(this).domManip(a,c,d,!0)});if(i.isFunction(h))return this.each(function(e){var f=i(this);a[0]=h.call(this,e,c?f.html():b);f.domManip(a,c,d)});if(this[0]){e=h&&h.parentNode;e=i.support.parentNode&&e&&11===e.nodeType&&e.childNodes.length===this.length?{fragment:e}:i.buildFragment(a,this,j);g=e.fragment;if(f=1===g.childNodes.length?g=g.firstChild:g.firstChild){c=c&&
i.nodeName(f,"tr");f=0;for(var k=this.length,m=k-1;f<k;f++)d.call(c?i.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):this[f]:this[f],e.cacheable||1<k&&f<m?i.clone(g,!0,!0):g)}j.length&&i.each(j,r)}return this}});i.buildFragment=function(a,b,c){var d,e,f,g,h=a[0];b&&b[0]&&(g=b[0].ownerDocument||b[0]);g.createDocumentFragment||(g=q);if(1===a.length&&"string"===typeof h&&512>h.length&&g===q&&"<"===h.charAt(0)&&!ub.test(h)&&
(i.support.checkClone||!Ha.test(h))&&(i.support.html5Clone||!Ga.test(h)))e=!0,(f=i.fragments[h])&&1!==f&&(d=f);d||(d=g.createDocumentFragment(),i.clean(a,g,d,c));e&&(i.fragments[h]=f?d:1);return{fragment:d,cacheable:e}};i.fragments={};i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){i.fn[a]=function(c){var d=[],c=i(c),e=1===this.length&&this[0].parentNode;if(e&&11===e.nodeType&&1===e.childNodes.length&&1===c.length)return c[b](this[0]),
this;for(var e=0,f=c.length;e<f;e++){var g=(0<e?this.clone(!0):this).get();i(c[e])[b](g);d=d.concat(g)}return this.pushStack(d,a,c.selector)}});i.extend({clone:function(a,b,c){var d,e,f;i.support.html5Clone||!Ga.test("<"+a.nodeName)?d=a.cloneNode(!0):(d=q.createElement("div"),Ia.appendChild(d),d.innerHTML=a.outerHTML,d=d.firstChild);var g=d;if((!i.support.noCloneEvent||!i.support.noCloneChecked)&&(1===a.nodeType||11===a.nodeType)&&!i.isXMLDoc(a)){m(a,g);d=n(a);e=n(g);for(f=0;d[f];++f)e[f]&&m(d[f],
e[f])}if(b&&(l(a,g),c)){d=n(a);e=n(g);for(f=0;d[f];++f)l(d[f],e[f])}return g},clean:function(a,b,c,d){b=b||q;"undefined"===typeof b.createElement&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||q);for(var e=[],f,g=0,h;null!=(h=a[g]);g++)if("number"===typeof h&&(h+=""),h){if("string"===typeof h)if(sb.test(h)){h=h.replace(Ea,"<$1></$2>");f=(Fa.exec(h)||["",""])[1].toLowerCase();var j=E[f]||E._default,m=j[0],l=b.createElement("div");b===q?Ia.appendChild(l):k(b).appendChild(l);for(l.innerHTML=j[1]+h+j[2];m--;)l=
l.lastChild;if(!i.support.tbody){m=rb.test(h);j="table"===f&&!m?l.firstChild&&l.firstChild.childNodes:"<table>"===j[1]&&!m?l.childNodes:[];for(f=j.length-1;0<=f;--f)i.nodeName(j[f],"tbody")&&!j[f].childNodes.length&&j[f].parentNode.removeChild(j[f])}!i.support.leadingWhitespace&&ka.test(h)&&l.insertBefore(b.createTextNode(ka.exec(h)[0]),l.firstChild);h=l.childNodes}else h=b.createTextNode(h);var n;if(!i.support.appendChecked)if(h[0]&&"number"===typeof(n=h.length))for(f=0;f<n;f++)o(h[f]);else o(h);
h.nodeType?e.push(h):e=i.merge(e,h)}if(c){a=function(a){return!a.type||vb.test(a.type)};for(g=0;e[g];g++)d&&i.nodeName(e[g],"script")&&(!e[g].type||"text/javascript"===e[g].type.toLowerCase())?d.push(e[g].parentNode?e[g].parentNode.removeChild(e[g]):e[g]):(1===e[g].nodeType&&(b=i.grep(e[g].getElementsByTagName("script"),a),e.splice.apply(e,[g+1,0].concat(b))),c.appendChild(e[g]))}return e},cleanData:function(a){for(var b,c,d=i.cache,e=i.event.special,f=i.support.deleteExpando,g=0,h;null!=(h=a[g]);g++)if(!h.nodeName||
!i.noData[h.nodeName.toLowerCase()])if(c=h[i.expando]){if((b=d[c])&&b.events){for(var j in b.events)e[j]?i.event.remove(h,j):i.removeEvent(h,j,b.handle);if(b.handle)b.handle.elem=null}f?delete h[i.expando]:h.removeAttribute&&h.removeAttribute(i.expando);delete d[c]}}});var la=/alpha\([^)]*\)/i,wb=/opacity=([^)]*)/,xb=/([A-Z]|^ms)/g,Ja=/^-?\d+(?:px)?$/i,yb=/^-?\d/,zb=/^([\-+])=([\-+.\de]+)/,Ab={position:"absolute",visibility:"hidden",display:"block"},Xa=["Left","Right"],Ya=["Top","Bottom"],J,Ka,La;
i.fn.css=function(a,c){return 2===arguments.length&&c===b?this:i.access(this,a,c,!0,function(a,c,d){return d!==b?i.style(a,c,d):i.css(a,c)})};i.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=J(a,"opacity","opacity");return""===c?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":i.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&!(3===a.nodeType||8===a.nodeType||
!a.style)){var f,g=i.camelCase(c),h=a.style,j=i.cssHooks[g],c=i.cssProps[g]||g;if(d!==b){e=typeof d;if("string"===e&&(f=zb.exec(d)))d=+(f[1]+1)*+f[2]+parseFloat(i.css(a,c)),e="number";if(!(null==d||"number"===e&&isNaN(d)))if("number"===e&&!i.cssNumber[g]&&(d+="px"),!j||!("set"in j)||(d=j.set(a,d))!==b)try{h[c]=d}catch(k){}}else return j&&"get"in j&&(f=j.get(a,!1,e))!==b?f:h[c]}},css:function(a,c,d){var e,f,c=i.camelCase(c);f=i.cssHooks[c];c=i.cssProps[c]||c;"cssFloat"===c&&(c="float");if(f&&"get"in
f&&(e=f.get(a,!0,d))!==b)return e;if(J)return J(a,c)},swap:function(a,b,c){var d={},e;for(e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}});i.curCSS=i.css;i.each(["height","width"],function(a,b){i.cssHooks[b]={get:function(a,c,d){var e;if(c){if(0!==a.offsetWidth)return s(a,b,d);i.swap(a,Ab,function(){e=s(a,b,d)});return e}},set:function(a,b){if(Ja.test(b)){if(b=parseFloat(b),0<=b)return b+"px"}else return b}}});if(!i.support.opacity)i.cssHooks.opacity={get:function(a,
b){return wb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=i.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(1<=b&&""===i.trim(f.replace(la,""))&&(c.removeAttribute("filter"),d&&!d.filter))return;c.filter=la.test(f)?f.replace(la,e):f+" "+e}};i(function(){if(!i.support.reliableMarginRight)i.cssHooks.marginRight={get:function(a,b){var c;i.swap(a,{display:"inline-block"},
function(){c=b?J(a,"margin-right","marginRight"):a.style.marginRight});return c}}});q.defaultView&&q.defaultView.getComputedStyle&&(Ka=function(a,b){var c,d,e,b=b.replace(xb,"-$1").toLowerCase();if((d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null)))c=e.getPropertyValue(b),""===c&&!i.contains(a.ownerDocument.documentElement,a)&&(c=i.style(a,b));return c});q.documentElement.currentStyle&&(La=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;if(null===e&&f&&(c=f[b]))e=
c;if(!Ja.test(e)&&yb.test(e)){c=f.left;if(d=a.runtimeStyle&&a.runtimeStyle.left)a.runtimeStyle.left=a.currentStyle.left;f.left="fontSize"===b?"1em":e||0;e=f.pixelLeft+"px";f.left=c;if(d)a.runtimeStyle.left=d}return""===e?"auto":e});J=Ka||La;if(i.expr&&i.expr.filters)i.expr.filters.hidden=function(a){var b=a.offsetHeight;return 0===a.offsetWidth&&0===b||!i.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||i.css(a,"display"))},i.expr.filters.visible=function(a){return!i.expr.filters.hidden(a)};
var Bb=/%20/g,Za=/\[\]$/,Ma=/\r?\n/g,Cb=/#.*$/,Db=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Eb=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Fb=/^(?:GET|HEAD)$/,Gb=/^\/\//,Na=/\?/,Hb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Ib=/^(?:select|textarea)/i,pa=/\s+/,Jb=/([?&])_=[^&]*/,Oa=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,Pa=i.fn.load,da={},Qa={},I,M,Ra=["*/"]+["*"];try{I=ab.href}catch(Pb){I=q.createElement("a"),I.href=
"",I=I.href}M=Oa.exec(I.toLowerCase())||[];i.fn.extend({load:function(a,c,d){if("string"!==typeof a&&Pa)return Pa.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(0<=e)var f=a.slice(e,a.length),a=a.slice(0,e);e="GET";c&&(i.isFunction(c)?(d=c,c=b):"object"===typeof c&&(c=i.param(c,i.ajaxSettings.traditional),e="POST"));var g=this;i.ajax({url:a,type:e,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText;a.isResolved()&&(a.done(function(a){c=a}),g.html(f?i("<div>").append(c.replace(Hb,
"")).find(f):c));d&&g.each(d,[c,b,a])}});return this},serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?i.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Ib.test(this.nodeName)||Eb.test(this.type))}).map(function(a,b){var c=i(this).val();return null==c?null:i.isArray(c)?i.map(c,function(a){return{name:b.name,value:a.replace(Ma,"\r\n")}}):{name:b.name,value:c.replace(Ma,
"\r\n")}}).get()}});i.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){i.fn[b]=function(a){return this.on(b,a)}});i.each(["get","post"],function(a,c){i[c]=function(a,d,e,f){i.isFunction(d)&&(f=f||e,e=d,d=b);return i.ajax({type:c,url:a,data:d,success:e,dataType:f})}});i.extend({getScript:function(a,c){return i.get(a,b,c,"script")},getJSON:function(a,b,c){return i.get(a,b,c,"json")},ajaxSetup:function(a,b){b?C(a,i.ajaxSettings):(b=a,a=i.ajaxSettings);C(a,
b);return a},ajaxSettings:{url:I,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(M[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Ra},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":i.parseJSON,
"text xml":i.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:t(da),ajaxTransport:t(Qa),ajax:function(a,c){function d(a,c,l,n){if(2!==t){t=2;q&&clearTimeout(q);r=b;p=n||"";v.readyState=0<a?4:0;var u,o,A,n=c;if(l){var S=e,s=v,z=S.contents,B=S.dataTypes,D=S.responseFields,G,w,P,K;for(w in D)w in l&&(s[D[w]]=l[w]);for(;"*"===B[0];)B.shift(),G===b&&(G=S.mimeType||s.getResponseHeader("content-type"));if(G)for(w in z)if(z[w]&&z[w].test(G)){B.unshift(w);break}if(B[0]in l)P=B[0];else{for(w in l){if(!B[0]||
S.converters[w+" "+B[0]]){P=w;break}K||(K=w)}P=P||K}P?(P!==B[0]&&B.unshift(P),l=l[P]):l=void 0}else l=b;if(200<=a&&300>a||304===a){if(e.ifModified){if(G=v.getResponseHeader("Last-Modified"))i.lastModified[m]=G;if(G=v.getResponseHeader("Etag"))i.etag[m]=G}if(304===a)n="notmodified",u=!0;else try{G=e;G.dataFilter&&(l=G.dataFilter(l,G.dataType));var E=G.dataTypes;w={};var W,F,L=E.length,H,Q=E[0],I,M,R,T,J;for(W=1;W<L;W++){if(1===W)for(F in G.converters)"string"===typeof F&&(w[F.toLowerCase()]=G.converters[F]);
I=Q;Q=E[W];if("*"===Q)Q=I;else if("*"!==I&&I!==Q){M=I+" "+Q;R=w[M]||w["* "+Q];if(!R)for(T in J=b,w)if(H=T.split(" "),H[0]===I||"*"===H[0])if(J=w[H[1]+" "+Q]){T=w[T];!0===T?R=J:!0===J&&(R=T);break}!R&&!J&&i.error("No conversion from "+M.replace(" "," to "));!0!==R&&(l=R?R(l):J(T(l)))}}o=l;n="success";u=!0}catch(O){n="parsererror",A=O}}else if(A=n,!n||a)n="error",0>a&&(a=0);v.status=a;v.statusText=""+(c||n);u?h.resolveWith(f,[o,n,v]):h.rejectWith(f,[v,n,A]);v.statusCode(k);k=b;C&&g.trigger("ajax"+(u?
"Success":"Error"),[v,e,u?o:A]);j.fireWith(f,[v,n]);C&&(g.trigger("ajaxComplete",[v,e]),--i.active||i.event.trigger("ajaxStop"))}}"object"===typeof a&&(c=a,a=b);var c=c||{},e=i.ajaxSetup({},c),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof i)?i(f):i.event,h=i.Deferred(),j=i.Callbacks("once memory"),k=e.statusCode||{},m,l={},n={},p,o,r,q,s,t=0,C,B,v={readyState:0,setRequestHeader:function(a,b){if(!t){var c=a.toLowerCase(),a=n[c]=n[c]||a;l[a]=b}return this},getAllResponseHeaders:function(){return 2===
t?p:null},getResponseHeader:function(a){var c;if(2===t){if(!o)for(o={};c=Db.exec(p);)o[c[1].toLowerCase()]=c[2];c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){if(!t)e.mimeType=a;return this},abort:function(a){a=a||"abort";r&&r.abort(a);d(0,a);return this}};h.promise(v);v.success=v.done;v.error=v.fail;v.complete=j.add;v.statusCode=function(a){if(a){var b;if(2>t)for(b in a)k[b]=[k[b],a[b]];else b=a[v.status],v.then(b,b)}return this};e.url=((a||e.url)+"").replace(Cb,"").replace(Gb,
M[1]+"//");e.dataTypes=i.trim(e.dataType||"*").toLowerCase().split(pa);if(null==e.crossDomain)s=Oa.exec(e.url.toLowerCase()),e.crossDomain=!(!s||!(s[1]!=M[1]||s[2]!=M[2]||(s[3]||("http:"===s[1]?80:443))!=(M[3]||("http:"===M[1]?80:443))));if(e.data&&e.processData&&"string"!==typeof e.data)e.data=i.param(e.data,e.traditional);z(da,e,c,v);if(2===t)return!1;C=e.global;e.type=e.type.toUpperCase();e.hasContent=!Fb.test(e.type);C&&0===i.active++&&i.event.trigger("ajaxStart");if(!e.hasContent&&(e.data&&(e.url+=
(Na.test(e.url)?"&":"?")+e.data,delete e.data),m=e.url,!1===e.cache)){s=i.now();var D=e.url.replace(Jb,"$1_="+s);e.url=D+(D===e.url?(Na.test(e.url)?"&":"?")+"_="+s:"")}(e.data&&e.hasContent&&!1!==e.contentType||c.contentType)&&v.setRequestHeader("Content-Type",e.contentType);e.ifModified&&(m=m||e.url,i.lastModified[m]&&v.setRequestHeader("If-Modified-Since",i.lastModified[m]),i.etag[m]&&v.setRequestHeader("If-None-Match",i.etag[m]));v.setRequestHeader("Accept",e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?
e.accepts[e.dataTypes[0]]+("*"!==e.dataTypes[0]?", "+Ra+"; q=0.01":""):e.accepts["*"]);for(B in e.headers)v.setRequestHeader(B,e.headers[B]);if(e.beforeSend&&(!1===e.beforeSend.call(f,v,e)||2===t))return v.abort(),!1;for(B in{success:1,error:1,complete:1})v[B](e[B]);if(r=z(Qa,e,c,v)){v.readyState=1;C&&g.trigger("ajaxSend",[v,e]);e.async&&0<e.timeout&&(q=setTimeout(function(){v.abort("timeout")},e.timeout));try{t=1,r.send(l,d)}catch(w){if(2>t)d(-1,w);else throw w;}}else d(-1,"No Transport");return v},
param:function(a,c){var d=[],e=function(a,b){b=i.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b)c=i.ajaxSettings.traditional;if(i.isArray(a)||a.jquery&&!i.isPlainObject(a))i.each(a,function(){e(this.name,this.value)});else for(var f in a)B(f,a[f],c,e);return d.join("&").replace(Bb,"+")}});i.extend({active:0,lastModified:{},etag:{}});var Kb=i.now(),ba=/(\=)\?(&|$)|\?\?/i;i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return i.expando+"_"+Kb++}});i.ajaxPrefilter("json jsonp",
function(b,c,d){c="application/x-www-form-urlencoded"===b.contentType&&"string"===typeof b.data;if("jsonp"===b.dataTypes[0]||!1!==b.jsonp&&(ba.test(b.url)||c&&ba.test(b.data))){var e,f=b.jsonpCallback=i.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,g=a[f],h=b.url,j=b.data,k="$1"+f+"$2";!1!==b.jsonp&&(h=h.replace(ba,k),b.url===h&&(c&&(j=j.replace(ba,k)),b.data===j&&(h+=(/\?/.test(h)?"&":"?")+b.jsonp+"="+f)));b.url=h;b.data=j;a[f]=function(a){e=[a]};d.always(function(){a[f]=g;if(e&&
i.isFunction(g))a[f](e[0])});b.converters["script json"]=function(){e||i.error(f+" was not called");return e[0]};b.dataTypes[0]="json";return"script"}});i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){i.globalEval(a);return a}}});i.ajaxPrefilter("script",function(a){if(a.cache===b)a.cache=!1;if(a.crossDomain)a.type="GET",a.global=!1});i.ajaxTransport("script",
function(a){if(a.crossDomain){var c,d=q.head||q.getElementsByTagName("head")[0]||q.documentElement;return{send:function(e,f){c=q.createElement("script");c.async="async";if(a.scriptCharset)c.charset=a.scriptCharset;c.src=a.url;c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||f(200,"success")};d.insertBefore(c,d.firstChild)},abort:function(){if(c)c.onload(0,1)}}}});var ma=
a.ActiveXObject?function(){for(var a in V)V[a](0,1)}:!1,Lb=0,V;i.ajaxSettings.xhr=a.ActiveXObject?function(){var b;if(!(b=!this.isLocal&&D()))a:{try{b=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(c){}b=void 0}return b}:D;(function(a){i.extend(i.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})})(i.ajaxSettings.xhr());i.support.ajax&&i.ajaxTransport(function(c){if(!c.crossDomain||i.support.cors){var d;return{send:function(e,f){var g=c.xhr(),h,j;c.username?g.open(c.type,c.url,c.async,c.username,
c.password):g.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)g[j]=c.xhrFields[j];c.mimeType&&g.overrideMimeType&&g.overrideMimeType(c.mimeType);!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)g.setRequestHeader(j,e[j])}catch(k){}g.send(c.hasContent&&c.data||null);d=function(a,e){var j,k,m,l,n;try{if(d&&(e||4===g.readyState)){d=b;if(h)g.onreadystatechange=i.noop,ma&&delete V[h];if(e)4!==g.readyState&&g.abort();else{j=g.status;m=g.getAllResponseHeaders();
l={};if((n=g.responseXML)&&n.documentElement)l.xml=n;l.text=g.responseText;try{k=g.statusText}catch(p){k=""}!j&&c.isLocal&&!c.crossDomain?j=l.text?200:404:1223===j&&(j=204)}}}catch(o){e||f(-1,o)}l&&f(j,k,l,m)};!c.async||4===g.readyState?d():(h=++Lb,ma&&(V||(V={},i(a).unload(ma)),V[h]=d),g.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ea={},F,O,Mb=/^(?:toggle|show|hide)$/,Nb=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,ca,qa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width",
"marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],Y;i.fn.extend({show:function(a,b,c){if(a||0===a)return this.animate(w("show",3),a,b,c);for(var c=0,d=this.length;c<d;c++)if(a=this[c],a.style){b=a.style.display;if(!i._data(a,"olddisplay")&&"none"===b)b=a.style.display="";""===b&&"none"===i.css(a,"display")&&i._data(a,"olddisplay",ra(a.nodeName))}for(c=0;c<d;c++)if(a=this[c],a.style&&(b=a.style.display,""===b||"none"===b))a.style.display=i._data(a,"olddisplay")||"";return this},
hide:function(a,b,c){if(a||0===a)return this.animate(w("hide",3),a,b,c);for(var c=0,d=this.length;c<d;c++)a=this[c],a.style&&(b=i.css(a,"display"),"none"!==b&&!i._data(a,"olddisplay")&&i._data(a,"olddisplay",b));for(c=0;c<d;c++)if(this[c].style)this[c].style.display="none";return this},_toggle:i.fn.toggle,toggle:function(a,b,c){var d="boolean"===typeof a;i.isFunction(a)&&i.isFunction(b)?this._toggle.apply(this,arguments):null==a||d?this.each(function(){var b=d?a:i(this).is(":hidden");i(this)[b?"show":
"hide"]()}):this.animate(w("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function e(){var u;!1===f.queue&&i._mark(this);var b=i.extend({},f),c=1===this.nodeType,d=c&&i(this).is(":hidden"),g,h,j,k,m;b.animatedProperties={};for(j in a){g=i.camelCase(j);j!==g&&(a[g]=a[j],delete a[j]);h=a[g];i.isArray(h)?(b.animatedProperties[g]=h[1],u=a[g]=h[0],h=u):b.animatedProperties[g]=b.specialEasing&&
b.specialEasing[g]||b.easing||"swing";if("hide"===h&&d||"show"===h&&!d)return b.complete.call(this);if(c&&("height"===g||"width"===g))if(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],"inline"===i.css(this,"display")&&"none"===i.css(this,"float"))!i.support.inlineBlockNeedsLayout||"inline"===ra(this.nodeName)?this.style.display="inline-block":this.style.zoom=1}if(null!=b.overflow)this.style.overflow="hidden";for(j in a)if(c=new i.fx(this,b,j),h=a[j],Mb.test(h))if(g=i._data(this,
"toggle"+j)||("toggle"===h?d?"show":"hide":0))i._data(this,"toggle"+j,"show"===g?"hide":"show"),c[g]();else c[h]();else g=Nb.exec(h),k=c.cur(),g?(h=parseFloat(g[2]),m=g[3]||(i.cssNumber[j]?"":"px"),"px"!==m&&(i.style(this,j,(h||1)+m),k*=(h||1)/c.cur(),i.style(this,j,k+m)),g[1]&&(h=("-="===g[1]?-1:1)*h+k),c.custom(k,h,m)):c.custom(k,h,"");return!0}var f=i.speed(b,c,d);if(i.isEmptyObject(a))return this.each(f.complete,[!1]);a=i.extend({},a);return!1===f.queue?this.each(e):this.queue(f.queue,e)},stop:function(a,
c,d){"string"!==typeof a&&(d=c,c=a,a=b);c&&!1!==a&&this.queue(a||"fx",[]);return this.each(function(){var b,c=!1,e=i.timers,f=i._data(this);d||i._unmark(!0,this);if(null==a)for(b in f){if(f[b]&&f[b].stop&&b.indexOf(".run")===b.length-4){var g=f[b];i.removeData(this,b,!0);g.stop(d)}}else if(f[b=a+".run"]&&f[b].stop)f=f[b],i.removeData(this,b,!0),f.stop(d);for(b=e.length;b--;)if(e[b].elem===this&&(null==a||e[b].queue===a)){if(d)e[b](!0);else e[b].saveState();c=!0;e.splice(b,1)}(!d||!c)&&i.dequeue(this,
a)})}});i.each({slideDown:w("show",1),slideUp:w("hide",1),slideToggle:w("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){i.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}});i.extend({speed:function(a,b,c){var d=a&&"object"===typeof a?i.extend({},a):{complete:c||!c&&b||i.isFunction(a)&&a,duration:a,easing:c&&b||b&&!i.isFunction(b)&&b};d.duration=i.fx.off?0:"number"===typeof d.duration?d.duration:d.duration in i.fx.speeds?i.fx.speeds[d.duration]:
i.fx.speeds._default;if(null==d.queue||!0===d.queue)d.queue="fx";d.old=d.complete;d.complete=function(a){i.isFunction(d.old)&&d.old.call(this);d.queue?i.dequeue(this,d.queue):!1!==a&&i._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+0.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b;this.elem=a;this.prop=c;b.orig=b.orig||{}}});i.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,
this);(i.fx.step[this.prop]||i.fx.step._default)(this)},cur:function(){if(null!=this.elem[this.prop]&&(!this.elem.style||null==this.elem.style[this.prop]))return this.elem[this.prop];var a,b=i.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||"auto"===b?0:b:a},custom:function(a,c,d){function e(a){return f.step(a)}var f=this,g=i.fx;this.startTime=Y||K();this.end=c;this.now=this.start=a;this.pos=this.state=0;this.unit=d||this.unit||(i.cssNumber[this.prop]?"":"px");e.queue=this.options.queue;
e.elem=this.elem;e.saveState=function(){f.options.hide&&i._data(f.elem,"fxshow"+f.prop)===b&&i._data(f.elem,"fxshow"+f.prop,f.start)};e()&&i.timers.push(e)&&!ca&&(ca=setInterval(g.tick,g.interval))},show:function(){var a=i._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||i.style(this.elem,this.prop);this.options.show=!0;a!==b?this.custom(this.cur(),a):this.custom("width"===this.prop||"height"===this.prop?1:0,this.cur());i(this.elem).show()},hide:function(){this.options.orig[this.prop]=
i._data(this.elem,"fxshow"+this.prop)||i.style(this.elem,this.prop);this.options.hide=!0;this.custom(this.cur(),0)},step:function(a){var b,c=Y||K(),d=!0,e=this.elem,f=this.options;if(a||c>=f.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();f.animatedProperties[this.prop]=!0;for(b in f.animatedProperties)!0!==f.animatedProperties[b]&&(d=!1);if(d){null!=f.overflow&&!i.support.shrinkWrapBlocks&&i.each(["","X","Y"],function(a,b){e.style["overflow"+b]=f.overflow[a]});f.hide&&
i(e).hide();if(f.hide||f.show)for(b in f.animatedProperties)i.style(e,b,f.orig[b]),i.removeData(e,"fxshow"+b,!0),i.removeData(e,"toggle"+b,!0);if(a=f.complete)f.complete=!1,a.call(e)}return!1}Infinity==f.duration?this.now=c:(a=c-this.startTime,this.state=a/f.duration,this.pos=i.easing[f.animatedProperties[this.prop]](this.state,a,0,1,f.duration),this.now=this.start+(this.end-this.start)*this.pos);this.update();return!0}};i.extend(i.fx,{tick:function(){for(var a,b=i.timers,c=0;c<b.length;c++)a=b[c],
!a()&&b[c]===a&&b.splice(c--,1);b.length||i.fx.stop()},interval:13,stop:function(){clearInterval(ca);ca=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){i.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&null!=a.elem.style[a.prop]?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}});i.each(["width","height"],function(a,b){i.fx.step[b]=function(a){i.style(a.elem,b,Math.max(0,a.now)+a.unit)}});if(i.expr&&i.expr.filters)i.expr.filters.animated=function(a){return i.grep(i.timers,
function(b){return a===b.elem}).length};var Ob=/^t(?:able|d|h)$/i,Sa=/^(?:body|html)$/i;i.fn.offset="getBoundingClientRect"in q.documentElement?function(a){var b=this[0],c;if(a)return this.each(function(b){i.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return i.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,f=e.documentElement;if(!c||!i.contains(f,b))return c?{top:c.top,left:c.left}:{top:0,left:0};b=e.body;e=fa(e);
return{top:c.top+(e.pageYOffset||i.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:c.left+(e.pageXOffset||i.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(b){i.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return i.offset.bodyOffset(b);var c,d=b.offsetParent,e=b.ownerDocument,f=e.documentElement,g=e.body;c=(e=e.defaultView)?e.getComputedStyle(b,
null):b.currentStyle;for(var h=b.offsetTop,j=b.offsetLeft;(b=b.parentNode)&&b!==g&&b!==f&&!(i.support.fixedPosition&&"fixed"===c.position);){c=e?e.getComputedStyle(b,null):b.currentStyle;h-=b.scrollTop;j-=b.scrollLeft;if(b===d){h+=b.offsetTop;j+=b.offsetLeft;if(i.support.doesNotAddBorder&&(!i.support.doesAddBorderForTableAndCells||!Ob.test(b.nodeName)))h+=parseFloat(c.borderTopWidth)||0,j+=parseFloat(c.borderLeftWidth)||0;d=b.offsetParent}i.support.subtractsBorderForOverflowNotVisible&&"visible"!==
c.overflow&&(h+=parseFloat(c.borderTopWidth)||0,j+=parseFloat(c.borderLeftWidth)||0)}if("relative"===c.position||"static"===c.position)h+=g.offsetTop,j+=g.offsetLeft;i.support.fixedPosition&&"fixed"===c.position&&(h+=Math.max(f.scrollTop,g.scrollTop),j+=Math.max(f.scrollLeft,g.scrollLeft));return{top:h,left:j}};i.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;i.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(i.css(a,"marginTop"))||0,c+=parseFloat(i.css(a,"marginLeft"))||
0);return{top:b,left:c}},setOffset:function(a,b,c){var d=i.css(a,"position");if("static"===d)a.style.position="relative";var e=i(a),f=e.offset(),g=i.css(a,"top"),h=i.css(a,"left"),j={},k={};("absolute"===d||"fixed"===d)&&-1<i.inArray("auto",[g,h])?(k=e.position(),d=k.top,h=k.left):(d=parseFloat(g)||0,h=parseFloat(h)||0);i.isFunction(b)&&(b=b.call(a,c,f));if(null!=b.top)j.top=b.top-f.top+d;if(null!=b.left)j.left=b.left-f.left+h;"using"in b?b.using.call(a,j):e.css(j)}};i.fn.extend({position:function(){if(!this[0])return null;
var a=this[0],b=this.offsetParent(),c=this.offset(),d=Sa.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(i.css(a,"marginTop"))||0;c.left-=parseFloat(i.css(a,"marginLeft"))||0;d.top+=parseFloat(i.css(b[0],"borderTopWidth"))||0;d.left+=parseFloat(i.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||q.body;a&&!Sa.test(a.nodeName)&&"static"===i.css(a,"position");)a=a.offsetParent;return a})}});
i.each(["Left","Top"],function(a,c){var d="scroll"+c;i.fn[d]=function(c){var e,f;if(c===b){e=this[0];return!e?null:(f=fa(e))?"pageXOffset"in f?f[a?"pageYOffset":"pageXOffset"]:i.support.boxModel&&f.document.documentElement[d]||f.document.body[d]:e[d]}return this.each(function(){(f=fa(this))?f.scrollTo(!a?c:i(f).scrollLeft(),a?c:i(f).scrollTop()):this[d]=c})}});i.each(["Height","Width"],function(a,c){var d=c.toLowerCase();i.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(i.css(a,
d,"padding")):this[d]():null};i.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(i.css(b,d,a?"margin":"border")):this[d]():null};i.fn[d]=function(a){var e=this[0];if(!e)return null==a?null:this;if(i.isFunction(a))return this.each(function(b){var c=i(this);c[d](a.call(this,b,c[d]()))});if(i.isWindow(e)){var f=e.document.documentElement["client"+c],g=e.document.body;return"CSS1Compat"===e.document.compatMode&&f||g&&g["client"+c]||f}if(9===e.nodeType)return Math.max(e.documentElement["client"+
c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);return a===b?(e=i.css(e,d),f=parseFloat(e),i.isNumeric(f)?f:e):this.css(d,"string"===typeof a?a:a+"px")}});a.jQuery=a.$=i;"function"===typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return i})})(window);var trace={box:null,useTextArea:!0,suppress:!0,zeroTime:new Date,filter:null};
trace.log=function(a,b){if(!trace.suppress){if(!trace.box)box=trace.useTextArea?document.createElement("TEXTAREA"):document.createElement("DIV"),box.id="tracebox",box.style.position="absolute",box.style.width="200px",box.style.height="100px",box.style.left="100%",box.style.top="100%",box.style.overflow="scroll",box.style.margin="-120px 0 0 -220px",document.body.appendChild(box),trace.box=box;if(b||trace.logShouldClear)trace.box.innerHTML="",trace.box.value="";trace.useTextArea?trace.box.value=trace.box.value+
a+"\r\n":trace.box.innerHTML=trace.box.innerHTML+a+"<br/>";trace.logShouldClear=!1}};trace.logMulti=function(){if(!trace.suppress){for(var a="",b=!0,c=0;c<trace.logMulti.arguments.length;c++)b||(a+=", "),a+=trace.logMulti.arguments[c],b=!1;trace.log(a)}};trace.getTicks=function(){return new Date-trace.zeroTime};
trace.noteCanvasCommand=function(a){if(player.dumpCanvas){"_"!=a.substr(0,1)&&(a="context."+a);for(var a=a+"(",b=!0,c=1;c<window.trace.noteCanvasCommand.arguments.length;c++)b||(a+=", "),a+=window.trace.noteCanvasCommand.arguments[c],b=!1;player.canvasCommandLog.push(a+");")}};trace.dumpCanvasCommandLog=function(){if(player.dumpCanvas){for(var a="",b=player.canvasCommandLog.shift();b;)a+=b+"\r\n",b=player.canvasCommandLog.shift();console.log(a)}};
if(window.console){window.console.suppress=!0;window.console.logMulti=function(){if(!window.console.suppress){for(var a=new Date-trace.zeroTime+": ",b=!0,c=0;c<window.console.logMulti.arguments.length;c++)b||(a+=", "),a+=window.console.logMulti.arguments[c],b=!1;console.filter&&-1==a.indexOf(console.filter)||(window.console.log(a),window.console.logRemote&&window.console.logRemote(a),window.EventLogger&&window.EventLogger.logNote(a))}};if(-1<navigator.userAgent.indexOf("Chrome/")&&-1==location.search.indexOf("logging="))window.console.logMulti=
function(){for(var a=new Date-trace.zeroTime+": ",b=!0,c=0;c<window.console.logMulti.arguments.length;c++)b||(a+=", "),a+=window.console.logMulti.arguments[c],b=!1;if(!console.filter||-1!=a.indexOf(console.filter))window.console.log(new Date-trace.zeroTime,window.console.logMulti.arguments),window.console.logRemote&&window.console.logRemote(a);window.EventLogger&&window.EventLogger.logNote(a)};if(-1<location.search.indexOf("remote=1"))window.console.sockets=[],window.console.socketIndex=0,window.console.logRemote=
function(a){a="/Log?message="+encodeURIComponent(a)+"&rand="+Math.random();$.ajax({url:a})}}var ppDebug={m_arrDebug:[],WriteQueue:function(){for(var a=0;a<this.m_arrDebug.length;a++)this.debug_trace(this.m_arrDebug[a]);this.m_arrDebug=[]},Clear:function(){},debug_trace:function(){},debug_error:function(a){console.log("ERROR",a)}},g_nStartTime=new Date;function Elapsed(){return(new Date).getTime()-g_nStartTime}function ParseXML(){}window.trace=trace;window.EventLogger={logging:!1,currentContainer:null,containerStack:[],logItems:[],startDate:new Date,logBeginEvent:function(a,b){if(EventLogger.logging&&(!console.filter||b&&b.id==console.filter)){var c=new EventLogItem(a,b);EventLogger.currentContainer?(EventLogger.currentContainer.logItems.push(c),EventLogger.containerStack.push(EventLogger.currentContainer)):EventLogger.logItems.push(c);EventLogger.currentContainer=c}},logEndEvent:function(a){if(EventLogger.logging&&(!console.filter||a&&a.id==
console.filter))EventLogger.currentContainer=EventLogger.containerStack.pop()},logBeginAction:function(a,b){if(EventLogger.logging&&(!console.filter||b&&b.id==console.filter)){var c=new ActionLogItem(a,b);EventLogger.currentContainer?(EventLogger.currentContainer.logItems.push(c),EventLogger.containerStack.push(EventLogger.currentContainer)):EventLogger.logItems.push(c);EventLogger.currentContainer=c}},logEndAction:function(a){if(EventLogger.logging&&(!console.filter||a&&a.id==console.filter))EventLogger.currentContainer=
EventLogger.containerStack.pop()},logBeginActionGroup:function(a,b){if(EventLogger.logging&&(!console.filter||b&&b.id==console.filter)){var c=new ActionGroupLogItem(a,b);EventLogger.currentContainer?(EventLogger.currentContainer.logItems.push(c),EventLogger.containerStack.push(EventLogger.currentContainer)):EventLogger.logItems.push(c);EventLogger.currentContainer=c}},logEndActionGroup:function(){if(EventLogger.logging)EventLogger.currentContainer=EventLogger.containerStack.pop()},logNote:function(a){EventLogger.logging&&
!(console.filter&&-1==a.indexOf(console.filter))&&(EventLogger.currentContainer?EventLogger.currentContainer.logItems.push(a):EventLogger.logItems.push(a))}};function EventLogItem(a,b){this.timestamp=new Date-EventLogger.startDate;this.event=a;this.itemID=b?b.id:a.item?"~"+a.item.id:null;this.type=a.type;this.trigger=a.trigger;this.time=a.time;this.depth=EventLogger.containerStack.length;this.logItems=[]}EventLogItem.prototype.toString=function(){return timestamp+" "+event.trigger||event.type};
function ActionLogItem(a,b){this.timestamp=new Date-EventLogger.startDate;this.action=a;this.itemID=b?b.id:a.item?"~"+a.item.id:null;this.type=a.type;this.xml=(new XMLSerializer).serializeToString(a.xml);this.logItems=[]}ActionLogItem.prototype.toString=function(){return timestamp+" "+event.trigger||event.type};function ActionGroupLogItem(a,b){this.timestamp=new Date-EventLogger.startDate;this.groupID=a;this.itemID=b?b.id:null;this.logItems=[]};$.each("touchstart touchmove touchend orientationchange tap taphold swipe swipeleft swiperight swipeup swipedown scrollstart scrollstop".split(" "),function(a,b){$.fn[b]=function(a){return a?this.bind(b,a):this.trigger(b)};$.attrFn[b]=!0});var supportTouch=-1<navigator.userAgent.indexOf("iP"),scrollEvent="touchmove scroll",touchStartEvent=supportTouch?"touchstart":"mousedown",touchStopEvent=supportTouch?"touchend":"mouseup",touchMoveEvent=supportTouch?"touchmove":"mousemove";
$.event.special.scrollstart={enabled:!0,setup:function(){function a(a,d){c=d;var g=a.type;a.type=c?"scrollstart":"scrollstop";$.event.handle.call(b,a);a.type=g}var b=this,c,d;$(b).bind(scrollEvent,function(b){$.event.special.scrollstart.enabled&&(c||a(b,!0),clearTimeout(d),d=setTimeout(function(){a(b,!1)},50))})}};
$.event.special.tap={setup:function(){var a=this,b=$(a);b.bind(touchStartEvent,function(c){function d(){c.pageX=c.pageX||c.originalEvent.touches[0].pageX;c.pageY=c.pageY||c.originalEvent.touches[0].pageY;if(10<Math.abs(g[0]-c.pageX)||10<Math.abs(g[1]-c.pageY))e=!0}if(!(c.which&&1!==c.which)){c.pageX=c.pageX||c.originalEvent.touches[0].pageX;c.pageY=c.pageY||c.originalEvent.touches[0].pageY;var e=!1,f=!0,g=[c.pageX,c.pageY],h,j;j=setTimeout(function(){if(f&&!e)h=c.type,c.type="taphold",$.event.handle.call(a,
c),c.type=h},750);b.one(touchMoveEvent,d).one(touchStopEvent,function(c){b.unbind(touchMoveEvent,d);clearTimeout(j);f=!1;if(10<Math.abs(g[0]-c.pageX)||10<Math.abs(g[1]-c.pageY))e=!0;if(!e)h=c.type,c.type="tap",$.event.handle.call(a,c),c.type=h})}})}};
$.event.special.swipe={setup:function(){var a=$(this);a.bind(touchStartEvent,function(b){function c(a){if(e){var b=a.originalEvent.touches?a.originalEvent.touches[0]:a;f={time:(new Date).getTime(),coords:[b.pageX,b.pageY]};10<Math.abs(e.coords[0]-f.coords[0])&&a.preventDefault()}}var d=b.originalEvent.touches?b.originalEvent.touches[0]:b,e={time:(new Date).getTime(),coords:[d.pageX,d.pageY],origin:$(b.target)},f;a.bind(touchMoveEvent,c).one(touchStopEvent,function(){a.unbind(touchMoveEvent,c);e&&
f&&(1E3>f.time-e.time&&30<Math.abs(e.coords[0]-f.coords[0])&&75>Math.abs(e.coords[1]-f.coords[1])?e.origin.trigger("swipe").trigger(e.coords[0]>f.coords[0]?"swipeleft":"swiperight"):1E3>f.time-e.time&&30<Math.abs(e.coords[1]-f.coords[1])&&75>Math.abs(e.coords[0]-f.coords[0])&&e.origin.trigger("swipe").trigger(e.coords[1]>f.coords[1]?"swipeup":"swipedown"));e=f=void 0})})}};
(function(a){function b(){var a=d();a!==e&&(e=a,c.trigger("orientationchange"))}var c=a(window),d,e;a.event.special.orientationchange={setup:function(){if(a.support.orientation)return!1;e=d();c.bind("resize",b)},teardown:function(){if(a.support.orientation)return!1;c.unbind("resize",b)},add:function(a){var b=a.handler;a.handler=function(a){a.orientation=d();return b.apply(this,arguments)}}};d=function(){var a=document.documentElement;return a&&1.1>a.clientWidth/a.clientHeight?"portrait":"landscape"}})(jQuery);
$.each({scrollstop:"scrollstart",taphold:"tap",swipeup:"swipe",swipedown:"swipe",swipeleft:"swipe",swiperight:"swipe"},function(a,b){$.event.special[a]={setup:function(){$(this).bind(b,$.noop)}}});(function(){function a(a,b){var l;this.element="object"==typeof a?a:document.getElementById(a);this.wrapper=this.element.parentNode;this.element.style.webkitTransitionProperty="-webkit-transform";this.element.style.webkitTransitionTimingFunction="cubic-bezier(0,0,0.25,1)";this.element.style.webkitTransitionDuration="0";this.element.style.webkitTransform=j+"0,0"+k;this.options={bounce:c,momentum:c,checkDOMChanges:!0,topOnDOMChanges:!1,hScrollbar:c,vScrollbar:c,fadeScrollbar:d||!e,shrinkScrollbar:d||
!e,desktopCompatibility:!1,overflow:"auto",snap:!1,bounceLock:!1,directionLock:!0,scrollbarColor:"rgba(150,150,150,0.5)",onScrollEnd:function(){}};if("object"==typeof b)for(l in b)this.options[l]=b[l];if(this.options.desktopCompatibility)this.options.overflow="hidden";this.onScrollEnd=this.options.onScrollEnd;delete this.options.onScrollEnd;this.wrapper.style.overflow=this.options.overflow;this.refresh();window.addEventListener("onorientationchange"in window?"orientationchange":"resize",this,!1);
if(e||this.options.desktopCompatibility)this.element.addEventListener(f,this,!1),this.element.addEventListener(g,this,!1),this.element.addEventListener(h,this,!1);this.options.checkDOMChanges&&this.element.addEventListener("DOMSubtreeModified",this,!1)}function b(a,b,c,d,e){var f=document;this.dir=a;this.fade=c;this.shrink=d;this.uid=++l;this.bar=f.createElement("div");this.bar.style.cssText="position:absolute;top:0;left:0;-webkit-transition-timing-function:cubic-bezier(0,0,0.25,1);pointer-events:none;-webkit-transition-duration:0;-webkit-transition-delay:0;-webkit-transition-property:-webkit-transform;z-index:10;background:"+
e+";-webkit-transform:"+j+"0,0"+k+";"+("horizontal"==a?"-webkit-border-radius:3px 2px;min-width:6px;min-height:5px":"-webkit-border-radius:2px 3px;min-width:5px;min-height:6px");this.wrapper=f.createElement("div");this.wrapper.style.cssText="-webkit-mask:-webkit-canvas(scrollbar"+this.uid+this.dir+");position:absolute;z-index:10;pointer-events:none;overflow:hidden;opacity:0;-webkit-transition-duration:"+(c?"300ms":"0")+";-webkit-transition-delay:0;-webkit-transition-property:opacity;"+("horizontal"==
this.dir?"bottom:2px;left:2px;right:7px;height:5px":"top:2px;right:2px;bottom:7px;width:5px;");this.wrapper.appendChild(this.bar);b.appendChild(this.wrapper)}a.prototype={x:0,y:0,enabled:!0,handleEvent:function(a){switch(a.type){case f:this.touchStart(a);break;case g:this.touchMove(a);break;case h:this.touchEnd(a);break;case "webkitTransitionEnd":this.transitionEnd();break;case "orientationchange":case "resize":this.refresh();break;case "DOMSubtreeModified":this.onDOMModified(a)}},onDOMModified:function(a){var b=
this;a.target.parentNode==b.element&&(setTimeout(function(){b.refresh()},0),b.options.topOnDOMChanges&&(0!=b.x||0!=b.y)&&b.scrollTo(0,0,"0"))},refresh:function(){var a=this.x,c=this.y;this.scrollWidth=this.wrapper.clientWidth;this.scrollHeight=this.wrapper.clientHeight;this.scrollerWidth=this.element.offsetWidth;this.scrollerHeight=this.element.offsetHeight;this.maxScrollX=this.scrollWidth-this.scrollerWidth;this.maxScrollY=this.scrollHeight-this.scrollerHeight;this.directionY=this.directionX=0;if(this.scrollX)if(0<=
this.maxScrollX)a=0;else if(this.x<this.maxScrollX)a=this.maxScrollX;if(this.scrollY)if(0<=this.maxScrollY)c=0;else if(this.y<this.maxScrollY)c=this.maxScrollY;if(this.options.snap)this.maxPageX=-Math.floor(this.maxScrollX/this.scrollWidth),this.maxPageY=-Math.floor(this.maxScrollY/this.scrollHeight),c=this.snap(a,c),a=c.x,c=c.y;if(a!=this.x||c!=this.y)this.setTransitionTime("0"),this.setPosition(a,c,!0);this.scrollX=this.scrollerWidth>this.scrollWidth;this.scrollY=!this.options.bounceLock&&!this.scrollX||
this.scrollerHeight>this.scrollHeight;if(this.options.hScrollbar&&this.scrollX)this.scrollBarX=this.scrollBarX||new b("horizontal",this.wrapper,this.options.fadeScrollbar,this.options.shrinkScrollbar,this.options.scrollbarColor),this.scrollBarX.init(this.scrollWidth,this.scrollerWidth);else if(this.scrollBarX)this.scrollBarX=this.scrollBarX.remove();if(this.options.vScrollbar&&this.scrollY&&this.scrollerHeight>this.scrollHeight)this.scrollBarY=this.scrollBarY||new b("vertical",this.wrapper,this.options.fadeScrollbar,
this.options.shrinkScrollbar,this.options.scrollbarColor),this.scrollBarY.init(this.scrollHeight,this.scrollerHeight);else if(this.scrollBarY)this.scrollBarY=this.scrollBarY.remove()},setPosition:function(a,b,c){this.x=a;this.y=b;this.element.style.webkitTransform=j+this.x+"px,"+this.y+"px"+k;c||(this.scrollBarX&&this.scrollBarX.setPosition(this.x),this.scrollBarY&&this.scrollBarY.setPosition(this.y))},setTransitionTime:function(a){a=a||"0";this.element.style.webkitTransitionDuration=a;if(this.scrollBarX)this.scrollBarX.bar.style.webkitTransitionDuration=
a,this.scrollBarX.wrapper.style.webkitTransitionDuration=c&&this.options.fadeScrollbar?"300ms":"0";if(this.scrollBarY)this.scrollBarY.bar.style.webkitTransitionDuration=a,this.scrollBarY.wrapper.style.webkitTransitionDuration=c&&this.options.fadeScrollbar?"300ms":"0"},touchStart:function(a){var b;if(this.enabled){a.preventDefault();a.stopPropagation();this.scrolling=!0;this.moved=!1;this.distY=this.distX=0;this.setTransitionTime("0");if(this.options.momentum||this.options.snap)if(b=new WebKitCSSMatrix(window.getComputedStyle(this.element).webkitTransform),
b.e!=this.x||b.f!=this.y)document.removeEventListener("webkitTransitionEnd",this,!1),this.setPosition(b.e,b.f),this.moved=!0;this.touchStartX=e?a.changedTouches[0].pageX:a.pageX;this.scrollStartX=this.x;this.touchStartY=e?a.changedTouches[0].pageY:a.pageY;this.scrollStartY=this.y;this.scrollStartTime=a.timeStamp;this.directionY=this.directionX=0}},touchMove:function(a){if(this.scrolling){var b=e?a.changedTouches[0].pageX:a.pageX,c=e?a.changedTouches[0].pageY:a.pageY,d=this.scrollX?b-this.touchStartX:
0,f=this.scrollY?c-this.touchStartY:0,g=this.x+d,h=this.y+f;a.stopPropagation();this.touchStartX=b;this.touchStartY=c;if(0<=g||g<this.maxScrollX)g=this.options.bounce?Math.round(this.x+d/3):0<=g||0<=this.maxScrollX?0:this.maxScrollX;if(0<=h||h<this.maxScrollY)h=this.options.bounce?Math.round(this.y+f/3):0<=h||0<=this.maxScrollY?0:this.maxScrollY;if(5<this.distX+this.distY){if(this.options.directionLock)if(this.distX-3>this.distY)h=this.y,f=0;else if(this.distY-3>this.distX)g=this.x,d=0;this.setPosition(g,
h);this.moved=!0;this.directionX=0<d?-1:1;this.directionY=0<f?-1:1}else this.distX+=Math.abs(d),this.distY+=Math.abs(f)}},touchEnd:function(a){if(this.scrolling){var b=a.timeStamp-this.scrollStartTime,c=e?a.changedTouches[0]:a,d,f;d=0;f=this.x;var g=this.y;this.scrolling=!1;a.preventDefault();if(this.moved)if(!this.options.snap&&250<b)this.resetPosition();else{this.options.momentum&&(a=!0===this.scrollX?this.momentum(this.x-this.scrollStartX,b,this.options.bounce?-this.x+this.scrollWidth/5:-this.x,
this.options.bounce?this.x+this.scrollerWidth-this.scrollWidth+this.scrollWidth/5:this.x+this.scrollerWidth-this.scrollWidth):{dist:0,time:0},c=!0===this.scrollY?this.momentum(this.y-this.scrollStartY,b,this.options.bounce?-this.y+this.scrollHeight/5:-this.y,this.options.bounce?(0>this.maxScrollY?this.y+this.scrollerHeight-this.scrollHeight:0)+this.scrollHeight/5:this.y+this.scrollerHeight-this.scrollHeight):{dist:0,time:0},d=Math.max(Math.max(a.time,c.time),1),f=this.x+a.dist,g=this.y+c.dist);if(this.options.snap)a=
this.snap(f,g),f=a.x,g=a.y,d=Math.max(a.time,d);this.scrollTo(f,g,d+"ms")}else if(this.resetPosition(),e){for(d=c.target;1!=d.nodeType;)d=d.parentNode;a.preventDefault();f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,a.view,1,c.screenX,c.screenY,c.clientX,c.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,0,null);f._fake=!0;d.dispatchEvent(f)}}},transitionEnd:function(){document.removeEventListener("webkitTransitionEnd",this,!1);this.resetPosition()},resetPosition:function(){var a=
this,b=a.x,c=a.y;if(0<=a.x)b=0;else if(a.x<a.maxScrollX)b=a.maxScrollX;if(0<=a.y||0<a.maxScrollY)c=0;else if(a.y<a.maxScrollY)c=a.maxScrollY;b!=a.x||c!=a.y?a.scrollTo(b,c):(a.moved&&(a.onScrollEnd(),setTimeout(function(){a.moved=!1},0)),a.scrollBarX&&a.scrollBarX.hide(),a.scrollBarY&&a.scrollBarY.hide())},snap:function(a,b){var c,a=0<this.directionX?Math.floor(a/this.scrollWidth):0>this.directionX?Math.ceil(a/this.scrollWidth):Math.round(a/this.scrollWidth);this.pageX=-a;a*=this.scrollWidth;if(0<
a)a=this.pageX=0;else if(a<this.maxScrollX)this.pageX=this.maxPageX,a=this.maxScrollX;b=0<this.directionY?Math.floor(b/this.scrollHeight):0>this.directionY?Math.ceil(b/this.scrollHeight):Math.round(b/this.scrollHeight);this.pageY=-b;b*=this.scrollHeight;if(0<b)b=this.pageY=0;else if(b<this.maxScrollY)this.pageY=this.maxPageY,b=this.maxScrollY;c=Math.round(Math.max(500*(Math.abs(this.x-a)/this.scrollWidth),500*(Math.abs(this.y-b)/this.scrollHeight)));return{x:a,y:b,time:c}},scrollTo:function(a,b,c){this.x==
a&&this.y==b?this.resetPosition():(this.moved=!0,this.setTransitionTime(c||"350ms"),this.setPosition(a,b),"0"===c||"0s"==c||"0ms"==c?this.resetPosition():document.addEventListener("webkitTransitionEnd",this,!1))},scrollToPage:function(a,b,c){if(!this.options.snap)this.pageX=-Math.round(this.x/this.scrollWidth),this.pageY=-Math.round(this.y/this.scrollHeight);"next"==a?a=++this.pageX:"prev"==a&&(a=--this.pageX);"next"==b?b=++this.pageY:"prev"==b&&(b=--this.pageY);a=-a*this.scrollWidth;b=-b*this.scrollHeight;
b=this.snap(a,b);a=b.x;b=b.y;this.scrollTo(a,b,c||"500ms")},scrollToElement:function(a,b){if(a="object"==typeof a?a:this.element.querySelector(a)){var c=this.scrollX?-a.offsetLeft:0,d=this.scrollY?-a.offsetTop:0;if(0<=c)c=0;else if(c<this.maxScrollX)c=this.maxScrollX;if(0<=d)d=0;else if(d<this.maxScrollY)d=this.maxScrollY;this.scrollTo(c,d,b)}},momentum:function(a,b,c,d){var b=1E3*(Math.abs(a)/b),e=b*b/2.5/1E3,f=0;0<a&&e>c?(b=b*c/e/2.5,e=c):0>a&&e>d&&(b=b*d/e/2.5,e=d);f=b/1.2;return{dist:Math.round(e*
(0>a?-1:1)),time:Math.round(f)}},destroy:function(a){window.removeEventListener("onorientationchange"in window?"orientationchange":"resize",this,!1);this.element.removeEventListener(f,this,!1);this.element.removeEventListener(g,this,!1);this.element.removeEventListener(h,this,!1);document.removeEventListener("webkitTransitionEnd",this,!1);this.options.checkDOMChanges&&this.element.removeEventListener("DOMSubtreeModified",this,!1);if(this.scrollBarX)this.scrollBarX=this.scrollBarX.remove();if(this.scrollBarY)this.scrollBarY=
this.scrollBarY.remove();a&&this.wrapper.parentNode.removeChild(this.wrapper);return null}};b.prototype={init:function(a,b){var c=document,d=Math.PI;if("horizontal"==this.dir){if(this.maxSize!=this.wrapper.offsetWidth)this.maxSize=this.wrapper.offsetWidth,c=c.getCSSCanvasContext("2d","scrollbar"+this.uid+this.dir,this.maxSize,5),c.fillStyle="rgb(0,0,0)",c.beginPath(),c.arc(2.5,2.5,2.5,d/2,-d/2,!1),c.lineTo(this.maxSize-2.5,0),c.arc(this.maxSize-2.5,2.5,2.5,-d/2,d/2,!1),c.closePath(),c.fill()}else if(this.maxSize!=
this.wrapper.offsetHeight)this.maxSize=this.wrapper.offsetHeight,c=c.getCSSCanvasContext("2d","scrollbar"+this.uid+this.dir,5,this.maxSize),c.fillStyle="rgb(0,0,0)",c.beginPath(),c.arc(2.5,2.5,2.5,d,0,!1),c.lineTo(5,this.maxSize-2.5),c.arc(2.5,this.maxSize-2.5,2.5,0,d,!1),c.closePath(),c.fill();this.size=Math.max(Math.round(this.maxSize*this.maxSize/b),6);this.maxScroll=this.maxSize-this.size;this.toWrapperProp=this.maxScroll/(a-b);this.bar.style["horizontal"==this.dir?"width":"height"]=this.size+
"px"},setPosition:function(a){"1"!=this.wrapper.style.opacity&&this.show();a=Math.round(this.toWrapperProp*a);0>a?(a=this.shrink?a+3*a:0,7>this.size+a&&(a=-this.size+6)):a>this.maxScroll&&(a=this.shrink?a+3*(a-this.maxScroll):this.maxScroll,7>this.size+this.maxScroll-a&&(a=this.size+this.maxScroll-6));a="horizontal"==this.dir?j+a+"px,0"+k:j+"0,"+a+"px"+k;this.bar.style.webkitTransform=a},show:function(){if(c)this.wrapper.style.webkitTransitionDelay="0";this.wrapper.style.opacity="1"},hide:function(){if(c)this.wrapper.style.webkitTransitionDelay=
"350ms";this.wrapper.style.opacity="0"},remove:function(){this.wrapper.parentNode.removeChild(this.wrapper);return null}};var c="WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix,d=/iphone|ipad/gi.test(navigator.appVersion),e="ontouchstart"in window,f=e?"touchstart":"mousedown",g=e?"touchmove":"mousemove",h=e?"touchend":"mouseup",j="translate"+(c?"3d(":"("),k=c?",0)":")",l=0;window.iScroll=a})();var util={};util.format=function(a){var b=util.format.arguments[1],c=1;if("object"==typeof b){for(key in b)a=a.replace("{"+key+"}",b[key]);return a}!b||!b.splice?b=util.format.arguments:c=0;for(var d=c;d<b.length;d++)a=a.replace("{"+(d-c)+"}",b[d]);return a};util.min=function(a,b){return a>b?b:a};util.max=function(a,b){return a<b?b:a};util.count=function(a){var b=0;for(key in a)b++;return b};util.hasMutualKey=function(a,b){var c=!1;$.each(a,function(a){$.each(b,function(b){c=c||a==b})});return c};
util.asyncEach=function(a,b,c,d){d||(d=0);var e=[],f=0;$.each(a,function(a,b){var c={index:a,item:b,next:null};if(0<e.length)e[e.length-1].next=c;e.push(c);f++});var g=function(a){b(a.index,a.item);f--;a.next&&setTimeout(function(){g(a.next)},d)},h=function(){0==f&&c?c():setTimeout(function(){h()},10)};0<e.length&&g(e[0]);h()};util.popArrayElement=function(a,b){if(!a.indexOf)return null;var c=a.indexOf(b);return-1<c?a.splice(c,1)[0]:null};util.xmlToString=function(a){return(new XMLSerializer).serializeToString(a)};
jQuery.cookie=function(a,b,c){if(1<arguments.length&&"[object Object]"!==""+b){c=jQuery.extend({},c);if(null===b||void 0===b)c.expires=-1;if("number"===typeof c.expires){var d=c.expires,e=c.expires=new Date;e.setDate(e.getDate()+d)}b=""+b;return document.cookie=[encodeURIComponent(a),"=",c.raw?b:encodeURIComponent(b),c.expires?"; expires="+c.expires.toUTCString():"",c.path?"; path="+c.path:"",c.domain?"; domain="+c.domain:"",c.secure?"; secure":""].join("")}c=b||{};e=c.raw?function(a){return a}:decodeURIComponent;
return(d=RegExp("(?:^|; )"+encodeURIComponent(a)+"=([^;]*)").exec(document.cookie))?e(d[1]):null};
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){for(var b="",c,d,e,f,g,h,j=0,a=Base64._utf8_encode(a);j<a.length;)c=a.charCodeAt(j++),d=a.charCodeAt(j++),e=a.charCodeAt(j++),f=c>>2,c=(c&3)<<4|d>>4,g=(d&15)<<2|e>>6,h=e&63,isNaN(d)?g=h=64:isNaN(e)&&(h=64),b=b+this._keyStr.charAt(f)+this._keyStr.charAt(c)+this._keyStr.charAt(g)+this._keyStr.charAt(h);return b},decode:function(a){for(var b="",c,d,e,f,g,h=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");h<
a.length;)c=this._keyStr.indexOf(a.charAt(h++)),d=this._keyStr.indexOf(a.charAt(h++)),f=this._keyStr.indexOf(a.charAt(h++)),g=this._keyStr.indexOf(a.charAt(h++)),c=c<<2|d>>4,d=(d&15)<<4|f>>2,e=(f&3)<<6|g,b+=String.fromCharCode(c),64!=f&&(b+=String.fromCharCode(d)),64!=g&&(b+=String.fromCharCode(e));return b=Base64._utf8_decode(b)},_utf8_encode:function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=String.fromCharCode(d>>
6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){for(var b="",c=0,d=c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};function TaskQueue(){this.tasks=[];this.timeout=50;this.tick()}TaskQueue.prototype.add=function(a){this.tasks.push(a)};TaskQueue.prototype.tick=function(a){(a=this.tasks.shift())&&a();var b=this;setTimeout(function(){b.tick()},b.timeout)};function MatrixTransform(){this.reset()}MatrixTransform.fromValues=function(a,b,c,d,e,f){var g=new MatrixTransform;g.m[0]=a;g.m[1]=b;g.m[2]=c;g.m[3]=d;g.m[4]=e;g.m[5]=f;for(var h in g.m)if(isNaN(g.m[h]))throw"bad matrix value at "+h;return g};MatrixTransform.PI_OVER_180=Math.PI/180;MatrixTransform.prototype.reset=function(){this.m=[1,0,0,1,0,0]};MatrixTransform.prototype.copy=function(a){a=new MatrixTransform;a.m=[this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5]];return a};
MatrixTransform.prototype.multiply=function(a){var b=this.m[1]*a.m[0]+this.m[3]*a.m[1],c=this.m[0]*a.m[2]+this.m[2]*a.m[3],d=this.m[1]*a.m[2]+this.m[3]*a.m[3],e=this.m[0]*a.m[4]+this.m[2]*a.m[5]+this.m[4],f=this.m[1]*a.m[4]+this.m[3]*a.m[5]+this.m[5];this.m[0]=this.m[0]*a.m[0]+this.m[2]*a.m[1];this.m[1]=b;this.m[2]=c;this.m[3]=d;this.m[4]=e;this.m[5]=f};
MatrixTransform.prototype.concat=function(a){var b=this.m[1]*a.m[0]+this.m[3]*a.m[1],c=this.m[0]*a.m[2]+this.m[2]*a.m[3],d=this.m[1]*a.m[2]+this.m[3]*a.m[3],e=this.m[0]*a.m[4]+this.m[2]*a.m[5]+this.m[4],f=this.m[1]*a.m[4]+this.m[3]*a.m[5]+this.m[5];this.m[0]=this.m[0]*a.m[0]+this.m[2]*a.m[1];this.m[1]=b;this.m[2]=c;this.m[3]=d;this.m[4]=e;this.m[5]=f};
MatrixTransform.prototype.invert=function(){var a=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),b=-this.m[1]*a,c=-this.m[2]*a,d=this.m[0]*a,e=a*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),f=a*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);this.m[0]=this.m[3]*a;this.m[1]=b;this.m[2]=c;this.m[3]=d;this.m[4]=e;this.m[5]=f};MatrixTransform.prototype.rotateDegrees=function(a){this.rotate(a*MatrixTransform.PI_OVER_180)};
MatrixTransform.prototype.rotate=function(a){var b=Math.cos(a),a=Math.sin(a),c=this.m[1]*b+this.m[3]*a,d=this.m[0]*-a+this.m[2]*b,e=this.m[1]*-a+this.m[3]*b;this.m[0]=this.m[0]*b+this.m[2]*a;this.m[1]=c;this.m[2]=d;this.m[3]=e};MatrixTransform.prototype.getRotation=function(){return Math.asin(this.m[2])};MatrixTransform.prototype.translate=function(a,b){this.m[4]+=this.m[0]*a+this.m[2]*b;this.m[5]+=this.m[1]*a+this.m[3]*b};
MatrixTransform.prototype.scale=function(a,b){this.m[0]*=a;this.m[1]*=a;this.m[2]*=b;this.m[3]*=b};MatrixTransform.prototype.transformPoint=function(a,b){var c=a,d=b,a=c*this.m[0]+d*this.m[2]+this.m[4],b=c*this.m[1]+d*this.m[3]+this.m[5];return{x:a,y:b}};MatrixTransform.prototype.unTransformPoint=function(a,b){var c=this.copy();c.invert();return c.transformPoint(a,b)};MatrixTransform.prototype.applyContext=function(a){a.setTransform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])};
MatrixTransform.prototype.toCSSTransform=function(){return"matrix("+this.val(0)+","+this.val(1)+","+this.val(2)+","+this.val(3)+","+this.val(4)+","+this.val(5)+")"};MatrixTransform.prototype.val=function(a){return Math.round(100*this.m[a])/100};MatrixTransform.prototype.getRotation=function(){var a=this.transformPoint(0,0),b=this.transformPoint(1,0);return Math.atan2(b.y-a.y,b.x-a.x)};var Element=function(){this.ref=this.container=null;this.events=[];this.actionGroups={};this.variables={};this.states={};this.parent=null;this.children={};this.redrawOnVarChange=this.isDisabled=!1;this.log=[];this.absoluteId=""};Element.prototype.objectType="Element";Element.prototype.innerType="Element";Element.PixelSrc="data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";Element.BlackPixelSrc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2NkYGD4DwABCQEBtxmN7wAAAABJRU5ErkJggg==";
Element.prototype.childItems=function(){var a=[];$.each(this.children,function(b,c){"Item"==c.objectType&&a.push(c)});return a};Element.prototype.findDescendantById=function(a){var b=null,c;for(c in this.children){var d=this.children[c];!b&&d.id==a&&(b=d);!b&&d.findDescendantById&&(b=d.findDescendantById(a))}return b};
Element.prototype.hasDescendantByType=function(a){var b=!1,c;for(c in this.children){var d=this.children[c];!b&&d.innerType.toLowerCase()==a.toLowerCase()&&(b=!0);!b&&d.hasDescendantByType&&(b=d.hasDescendantByType(a))}return b};Element.prototype.getDescendantsByType=function(a){var b=[],c;for(c in this.children){var d=this.children[c];"Storyline"==this.innerType&&"Slide"==d.innerType||(d.innerType.toLowerCase()==a.toLowerCase()&&b.push(d),d.getDescendantsByType&&(b=b.concat(d.getDescendantsByType(a))))}return b};
Element.prototype.isAncestor=function(a){for(var b=this.parent;b;){if(a==b)return!0;b=b.parent}return!1};Element.prototype.findAncestorOfType=function(a){for(var b=this;b;){if(b.innerType==a)return b;b=b.parent}return null};Element.prototype.eachAncestor=function(a){for(var b=this.parent;b;)a(b),b=b.parent};
Element.prototype.getFullObjref=function(a){var b=this.absoluteId;if(0>=this.absoluteId.length)b=this.parent&&this.parent.id&&this.parent.getFullObjref?this.absoluteId=this.parent.getFullObjref()+"."+this.id:this.id;a&&(b="_player."+b);return b};Element.prototype.getFullVariableRef=function(a){a=this.parseObjref(a);return"_player."+a.target.getFullObjref()+"."+a.variable};
Element.prototype.restoreVariableResumeData=function(a){if(""==a)return"";for(var b=$(this.xml).children("variables").children("[resume='true'][type='boolean']"),c=$(this.xml).children("variables").children("[resume='true'][type!='boolean']"),a=new bwChunk(a),d=0;!a.EOF();)for(var e=a.NextUBase10(1),f=1;f<=e;)e&f&&(d<b.length?this.variables[$(b[d]).attr("name")]="true":this.extractNextSpecialBool&&this.extractNextSpecialBool()),d++,f*=2;for(var g,b=0;b<=c.length;b++)if(b<c.length){g=g?g.NextChunk():
a.NextChunk();d=$(c[b]);e=this.variableTypes[d.attr("name")];f=g.Data();switch(e){case "number":f=g.NextBase10();break;case "string":f=bwChunk.DecodeString(f)}this.variables[d.attr("name")]=f}else this.extractNextSpecialVar&&(g=g?g.NextChunk():a.NextChunk(),this.extractNextSpecialVar(g.Data()));return g?g.Remainder():a.Remainder()};Element.prototype.shouldStoreVariableResume=function(){return this.getVariableResumeData()!=bwChunk.EMPTY_CHUNK};
Element.prototype.getVariableResumeData=function(a){var b=this,c="",d="",e=1,f=0,g=!1,h=!1,j={},k=function(a,k){if(!j[a]&&b.variableResumes[a])switch(k!=b.variableDefaults[a]&&(h=!0),b.variableTypes[a]){case "bool":case "boolean":k&&"false"!=k&&(f+=e);e*=2;g=!0;32<e&&(e=1,d+=bwChunk.UBase10toN(f),g=!1,f=0);break;case "string":strTemp=bwChunk.EncodeString(k);c+=bwChunk.CreateChunk(strTemp);break;case "number":c+=bwChunk.CreateChunk(bwChunk.Base10toN(parseInt(k)))}};$.each(this.variables,k);this.getExtraResumeVars&&
$.each(this.getExtraResumeVars(),k);g&&(d+=bwChunk.UBase10toN(f));c=bwChunk.CreateChunk(d)+c;return!h?a?"":bwChunk.EMPTY_CHUNK:bwChunk.CreateChunk(c)};
Element.prototype.toData=function(a){var b=this,c={},d={};$.each(this.variables,function(a,f){if(f!=b.variableDefaults[a]&&!d[a]){if(!c.variables)c.variables={};c.variables[a]=f}});$.each(this.children,function(b,d){if(d.toData){var g=d.toData(a);if(!jQuery.isEmptyObject(g)){if(!c.children)c.children={};c.children[b]=g}}});if(this.shuffled)c.shuffled=!0;if(void 0!=this.shuffleX)c.shuffleX=this.shuffleX,c.shuffleY=this.shuffleY;if(this.visible)c.visible=!0;return c};
Element.prototype.updateFromData=function(a,b){var c=this;c.reset(b);a.variables&&$.each(a.variables,function(a,b){c.variables[a]!=b&&(c.variables[a]=b)});a.children&&$.each(a.children,function(a,e){var f=c.children[a];f&&f.updateFromData(e,b)});if(!b){if(a.shuffled){this.shuffled=!0;if(this.shuffleGroup)this.shuffleGroup.shuffled=!0;if(void 0!=a.shuffleX)this.shuffleX=a.shuffleX,this.shuffleY=a.shuffleY,this.x=this.shuffleX,this.y=this.shuffleY;if(void 0!=a.x){if(!isNaN(parseInt(a.x)))this.x=parseInt(a.x);
if(!isNaN(parseInt(a.y)))this.y=parseInt(a.y)}}if(c.slide&&c.slide==player.currentSlide()&&c.ref)a.visible?this.quickShow?this.quickShow():(this.show(),this.visible=!0):"ShuffleGroup"!=this.innerType&&(this.quickHide?this.quickHide():this.hide())}};
Element.prototype.reset=function(a,b){var c=this;$.each(this.variables,function(a,b){"Slide"==c.innerType&&"Visited"==a||void 0!=c.variableDefaults[a]&&c.variableDefaults[a]!=b&&(c.variables[a]=c.variableDefaults[a])});c.setEnabled(("false"==(c.variableDefaults._disabled||"false")).toString());if(!a&&"Slide"!=this.innerType)this.visible=!1;for(var d in this.children){var e=this.children[d];(!b||b(e))&&e.reset&&e.reset(a)}};
Element.prototype.setElementProperty=function(a,b,c){this[a]=b;if(c&&this.children)for(var d in this.children){var e=this.children[d];e.setElementProperty&&e.setElementProperty(a,b,c)}};
Element.prototype.constructElement=function(){this.events=[];this.actionGroups={};this.variables={};this.variableDefaults={};this.variableResumes={};this.variableTypes={};this.content={};this.states={};this.colors={};this.animations={};this.resources=[];this.eventSubscribers=[];this.hotContexts=[];this.matrix=new MatrixTransform;this.isRotated=!1;this.parent=null;this.children={};this.variableDefaults._default="true";this.variables.ObjectState="_default";this.variableDefaults.ObjectState="_default";
this.variables.OnStage="false";this.variableDefaults.OnStage="false";this.originalYOffset=this.originalXOffset=this.originalHeight=this.originalWidth=this.originalZ=this.originalY=this.originalX=this.rotation=this.yoffset=this.xoffset=this.rotateypos=this.rotatexpos=this.dragY=this.dragX=this.y=this.x=0;this.animated=!1;this.stateCount=0};Element.prototype.emptyElement=function(){if("Slide"!=this.innerType)this.constructElement(),this.xml=null};
Element.prototype.loadElementInfoFromXML=function(a){var b=this;this.events=[];$(a).children("events").children().each(function(a,d){var e=new StoryEvent(b);e.loadFromXML(d);b.events.push(e)});this.actionGroups={};$(a).children("actiongroups").children().each(function(a,d){var e=$(d).attr("id"),f=$(d).children("actions").children();b.actionGroups[e]=f});$(a).children("variables").children().each(function(a,d){b.variables[$(d).attr("name")]=$(d).attr("value");b.variableDefaults[$(d).attr("name")]=
$(d).attr("value");b.variableTypes[$(d).attr("name")]=$(d).attr("type");b.variableResumes[$(d).attr("name")]="true"==$(d).attr("resume")});$.each($(a).children("colors").children("color"),function(a,d){var e=$(d).attr("name"),f=new Background(b.ref);f.loadFromXML($(d),"fill");b.colors[e]=f});this.lmsid=$(a).attr("lmsid");b.variables.Id=$(a).attr("id");b.variableDefaults.Id=$(a).attr("id");b.resume="true"==$(a).attr("resume")};
Element.prototype.loadAnimationsFromXML=function(a){var b=this;b.animations={};$(a).children("animations").children("animation").each(function(a,d){var e=new Animation;e.loadFromXML(d,b);b.animations[e.id]=e;b.hasAnimations=!0})};Element.prototype.hasEvent=function(a,b){if(!this.events)return null;for(var c=0;c<this.events.length;c++){var d=this.events[c];if(d.trigger==a)return d}c=null;!c&&b&&this.parent&&this.parent.hasEvent&&(c=c||this.parent.hasEvent(a,b));return c};Element.constructors={};
Element.registerTagNames=function(a,b){$.each(b,function(b,d){Element.constructors[d]=a})};Element.prototype.allResourcesLoaded=function(){var a=!0;$.each(this.resources,function(b,c){a=a&&c.loaded});return a};Element.prototype.loadResources=function(){$.each(this.resources,function(a,b){b.load(player.deferredLoadingIndex++)})};Element.prototype.unloadResources=function(){$.each(this.resources,function(a,b){b.unload()})};
Element.prototype.loadChildrenFromXML=function(a,b,c,d){for(var a=$(a).children("objects").children(),e=0;e<a.length;e++){var f=a[e],g;"objgroup"==f.tagName?g=new ItemGroup(this.ref,b,c):"expandinglabel"==f.tagName?g=new ExpandingLabel(this.ref,b,c):"sequencectrl"==f.tagName?g=new SequenceCtrl(this.ref,b,c):"shufflegroup"==f.tagName?g=new ShuffleGroup(this.ref,b,c):"scrollarea"==f.tagName?g=new ScrollArea(this.ref,b,c):"stategroup"==f.tagName?g=new StateGroup(this.ref,b,c):"slideframe"==f.tagName?
g=new SlideFrame(this.ref,b,c):"dragitem"==f.tagName?g=new DragItem(this.ref,b,c):"droparea"==f.tagName?g=new DropArea(this.ref,this.slide,c):"droplist"==f.tagName?g=new DropList(this.ref,b,c):"textinput"==f.tagName?g=new TextInput(this.ref,b,c):"button"==f.tagName?g=new Button(this.ref,b,c):"image"==f.tagName?g=new ImageItem(this.ref,b,c):"webobject"==f.tagName?g=new WebObject(this.ref,b,c):"annotation"==f.tagName?g=new Annotation(this.ref,b,c):"vectorshape"==f.tagName?g=(g=$(f).attr("id"))&&0==
g.indexOf("hotspot_")&&g.indexOf("_marker")==g.length-7?new HotspotMarker(this.ref,b,c):ImageItem.extractAnimatedGif(f)?new ImageItem(this.ref,b,c):new VectorShape(this.ref,b,c):"swf"==f.tagName?(g=$(f).attr("id"),g=0==g.indexOf("hotspot")?new HotspotMarker(this.ref,b,c):new SWFItem(this.ref,b,c)):"video"==f.tagName?(g=new Video,g.directParent=this):g=new StageItem(this.ref,b,c);if(!g)break;g.parent=this;g.originalParent=this;g.offsetParent=this;g.loadFromXML(f,b,c);this.children[$(f).attr("id")]=
g;d&&d(g)}};Element.prototype.handleEventDeep=function(a,b,c,d){this.handleEvent(a,b,c,!1,!0,d);this.deepEach(function(e,f){f.handleEvent(a,b,c,!1,!0,d)})};Element.prototype.handleEvent=function(a,b,c,d,e,f){for(var g=!0,h=0;h<this.events.length;h++){var j=this.events[h];if(j.trigger==a&&(!j.filter||j.filter(b))&&(!c||c(this,b,j)))j.act(this,f),g=d}this.group&&!e&&this.group.handleEvent(a,b,c,d,e,f);!e&&g&&this.parent&&this.parent.handleEvent&&this.parent.handleEvent(a,b,c,d,e,f)};
Element.prototype.runActionGroup=function(a){var b=this.parseObjref(a),c=b.target,a=b.variable,d=c.actionGroups[a],e=!0;EventLogger.logBeginActionGroup(a,this);if(d)for(var f=0;f<d.length;f++)e&&(e=c.runAction(d[f]));if(b.processChildren)for(var g in this.children)if(d=this.children[g].actionGroups[a])for(f=0;f<d.length;f++)e&&(e=c.runAction(d[f]));EventLogger.logEndActionGroup(this);return e};
Element.prototype.runAction=function(a){var b=!0,c=this,d=$(a).attr("id"),e=$(a).get(0).tagName.toLowerCase();player.logActivity&&this.log.push([e,trace.getTicks()]);switch(e){case "adjustvar":case "show":case "hide":case "show_slidelayer":case "hide_slidelayer":case "hideallslidelayers":case "media_play":case "media_pause":case "media_toggle":case "set_volume":var f=new TimelineAction(c),d=new StoryEvent(c);d.isUserInitiated=!1;f.loadFromXML(a,d);f[e](d,c,!1);break;case "exe_actiongroup":b=this.runActionGroup(d);
break;case "if_action":f=c.evaluateCondition($(a).children("condition").first())?"then_actions":"else_actions";if(a=$(a).children(f).children())for(f=0;f<a.length;f++)b&&(b=c.runAction(a[f]));break;case "set_enabled":var e=$(a).children("objref").attr("value"),a=$(a).children("enabled").attr("value"),g=c.parseObjref(e).target;g.setEnabled(a);break;case "set_review":e=$(a).children("objref").attr("value");a="true"==$(a).children("enabled").attr("value");g=c.parseObjref(e).target;if(0==g.id.indexOf("hotspot"))g.isDisabled=
!0,g.parent.isDisabled=!0,g.ref.parent().find(".item.swf").show();g.setVariable("ReviewMode",!0);g.isDragItem&&"matching"==g.style&&g.updatePosition();g.set_review&&g.set_review(a);break;case "setdrawreview":e=$(a).attr("drawid");a="true"==$(a).attr("review");g=c.parseObjref(e).target;g.setVariable("ReviewMode",a);g.m_bReviewMode=a;break;case "setobjstate":(g=c.parseObjrefFromXML(a).target)||(g=c);a=$(a).children("stateref").attr("value");g.setStates(a,"true");break;case "setfocus":c.input&&c.input.get&&
c.input.get(0)&&c.input.get(0).focus();break;case "trigger_next_slide":player.currentSlide().handleEvent("onnextslide",null,null,!1,!1,!0);break;case "trigger_prev_slide":player.currentSlide().handleEvent("onprevslide");break;case "trigger_submit_slide":player.currentSlide().handleEvent("onsubmitslide");break;case "trigger_submitall_slide":Interaction.partialEvaluateSlide(player.currentSlide());player.currentSlide().handleEvent("onsubmitallslide");break;case "trigger_slide_finish":player.currentSlide().handleEvent("onfinishslide");
break;case "history_prev":b=player.showPreviousSlide();break;case "history_prev_scene":b=player.showPreviousSlide(function(a){return a.sceneIndex!=player.currentSlide().sceneIndex});break;case "history_prev_group":b=player.showPreviousSlide(function(a){return a.historygroupid!=player.currentSlide().historygroupid});break;case "reset_player":$.each(story.allSlides,function(a,b){b.resetSlide(!0,!0)});player.currentTime=0;break;case "resume_player":Video.iOSPrepare&&Video.iOSPrepare();Audio.iOSPrepare&&
Audio.iOSPrepare();Frame.requestFullScreen&&Frame.requestFullScreen()&&setTimeout(function(){player.frame.initOrientation()},100);if("true"==$(a).attr("resume")){a=player.resumeData;if(player.overrideResumeData)resumedata=player.overrideResumeData;try{player.useCompactResume?story.updateFromCompactData(a):story.updateFromData(JSON.parse(a))}catch(h){console.error("could not restore from resumeData",h)}}else story.clearLocalStorage(),SlideDraw.populateDraws();player.activeTimeline==player&&player.setInitialActiveTimeline();
e=story.parseObjref(story.resumeWindow).target;e.close();$(".slide:not(.framed)").hide();a=story.getStartingSlide(!0);player.showSlideID(story.startingslide,!0,function(){player.hasShownFirstSlide=!1;if(story.startingWindowInfo){story.startingWindowInfo.slide.loadContentFromXML();var a=0,b=function(){10<a++||player.currentSlide()&&player.currentSlide().transitionedIn&&story.startingWindowInfo.slide.fullyLoaded?story.startingWindowInfo.win.showSlide(story.startingWindowInfo.slide):setTimeout(b,100)};
b()}});break;case "notifylinkselected":a=$(a).attr("id");f=story.children[a];if(!f)f=story.parseObjref(a).target;f&&f.notifySelected(a);break;case "gotoplay":e=$(a).children("objref").attr("value");b=$(a).children("objref").attr("type");f=$(a).attr("window");a=c.parseObjref(e,b).target;b=c.performGoToPlay(f,a);break;case "closewndgotoslide":e=$(a).children("objref").attr("value");b=$(a).attr("closewindowid");d=$(a).attr("slidewindowid");a=c.parseObjref(e).target;e=player.currentWindow;if("_current"!=
b&&"_frame"!=b)e=story.parseObjref(f).target;if(e&&(e.slide.saveIfNecessary(),e.close(),e==player.currentWindow))player.currentWindow=null;b=c.performGoToPlay(d,a);break;case "playnextdrawslide":if("SlideDraw"==c.parent.innerType)player.currentDraw=c.parent,c.parent.sniffDrawIndex(c);else if(c.slide&&"SlideDraw"==c.slide.parent.innerType)player.currentDraw=c.slide.parent,c.slide.parent.sniffDrawIndex(c);if(player.currentDraw)player.currentDraw.playnextdrawslide();else debugger;break;case "nextunsubmittedslide":f=
c.parseObjrefFromXML(a).target;(a=f.findNextSlide(Quiz.SEARCH_UNSUBMITTED))&&(b=c.performGoToPlay("_current",a));break;case "nextunansweredslide":f=c.parseObjrefFromXML(a).target;(a=f.findNextSlide(Quiz.SEARCH_UNANSWERED))&&(b=c.performGoToPlay("_current",a));break;case "nextviewedslide":f=$(a).children("quizref").attr("value");a=$(a).children("completed_slide_ref").attr("value");f=c.parseObjref(f).target;a=c.parseObjref(a).target;(a=f.findNextSlide(Quiz.SEARCH_VIEWED,a))&&(b=c.performGoToPlay("_current",
a));break;case "close_window":d=$(a).attr("id");"_current"==d?player.currentWindow&&player.currentWindow.close():(e=story.parseObjref(d).target,e.close());break;case "close_player":window.manuallyClosing=!0;player.lmsManager.handleClosePlayer()||setTimeout(function(){player.isCrossDomainFrame?(window.open("","_self",""),window.close()):(top.window.open("","_self",""),top.window.close())},10);break;case "eval_interaction":d=$(a).attr("id");c.parseObjref(d).target.evaluate();break;case "eval_all_unanswered":f=
this.parseObjrefFromXML(a).target;Interaction.eval_all_unanswered(f,a);break;case "setquizcomplete":this.setquizcomplete?this.setquizcomplete(a):Interaction.setquizcomplete(a);break;case "object_action":e=$(a).attr("command");f=this.parseObjrefFromXML(a).target;if("function"==typeof f[e])return f[e](this.xml),!0;break;case "showtimer":d=$(a).attr("id");a=c.parseObjref(d).target;a.show();break;case "hidetimer":d=$(a).attr("id");a=c.parseObjref(d).target;a.hide();break;case "starttimer":d=$(a).attr("id");
a=c.parseObjref(d).target;a.start();break;case "pausetimer":d=$(a).attr("id");a=c.parseObjref(d).target;a.pause();break;case "resetquiz":f=c.parseObjrefFromXML(a).target;f.reset();f.attemptCount++;$.each(f.sliderefs,function(a,b){var d=c.parseObjref(b).target;d.compactResumeData=null;d.resumeData=null;d.resetSlide(!0,!0)});player.currentSlide().reset(!0,!0);break;case "exe_javascript":d=$(a).attr("id");window.ExecuteScript(d);break;case "emailto":a=$(a).attr("address");location.href="mailto:"+a;break;
case "enable_frame_control":f=$(a).attr("name");a="true"==$(a).attr("enable");player.frame.setControlEnabled(f,a);break;case "enable_window_control":f=$(a).attr("name");a="true"==$(a).attr("enable");player.frame.setWindowControlEnabled(f,a);break;case "setactivetimeline":if(player.useActiveTimeline){var j=c.parseObjrefFromXML(a).target;player.activeTimeline="Layer"==j.innerType?j:"Slide"==j.innerType?j:player}break;case "seek_timeline":if(player.useActiveTimeline){j=c.parseObjrefFromXML(a).target;
a=parseInt($(a).attr("position"));if("SlideFrame"==j.innerType&&j.framedSlide)j=j.framedSlide;j.currentTime=a;if(j.update)j.currentIndex=0,j.update(a,!1,!1)}break;case "resume_timeline":if(player.useActiveTimeline)j=c.parseObjrefFromXML(a).target,"Layer"==j.innerType?j.play():"Slide"==j.innerType?j.blockAndLoad(function(){j.play()}):player.play();break;case "pause_timeline":j=c.parseObjrefFromXML(a).target;"Layer"==j.innerType?player.layerPlaying=!1:"Slide"==j.innerType?j.pause():player.pause();break;
case "resetdepth":e=$(a).find("value").attr("value");g=c.parseObjref(e).target;g.setZIndex(this.originalZ);break;case "updatescrollpos":var e=$(a).find("scrollref ").attr("value"),g=c.parseObjref(e).target,f=$(a).find("pos").attr("type"),k=this.extractVariable($(a).find("pos").attr("value"),f);if(!g.scrollKeeper)g.scrollKeeper=$("<div class='scrollkeeper'></div>"),g.ref.append(g.scrollKeeper);var l=5,m=function(){if(g&&g.scrollKeeper&&g.ref&&(g.scrollKeeper.css("top",k),g.ref.get(0).scrollTop=k,clearTimeout(player.retrySetScrollTimeout),
g.ref.get(0).scrollTop!=k&&0<l--))player.retrySetScrollTimeout=setTimeout(m,100)};m();break;case "updatescrollheight":break;case "cancel_event":TimelineAction.actparams.cancelled=!0;break;case "save_resume_data":this.saveIfNecessary&&this.saveIfNecessary();story.saveToLocalStorage();break;case "debug_trace":$(a).attr("message");break;default:if(c[e])c[e](a);else if(f=new TimelineAction(c),d=new StoryEvent(c),f.loadFromXML(a,d),f[e])f[e](d,c,!1)}return b};
Element.prototype.setEnabled=function(a){this.isDisabled="false"==a;if("textinput"==this.type){if(this.input&&this.input.get&&this.input.get(0))this.input.get(0).disabled=this.isDisabled;this.render()}else if("droplist"==this.type&&this.select&&this.select.get&&this.select.get(0))this.select.get(0).disabled=this.isDisabled;this.ref&&(this.isDisabled?this.ref.addClass("disabled"):this.ref.removeClass("disabled"))};
Element.prototype.getProperty=function(a){switch(a){case "AbsoluteId":return this.getFullObjref();case "XPos":return this.x;case "YPos":return this.y;case "InitXPos":return this.originalX;case "InitYPos":return this.originalY;case "Rotation":return this.rotation;case "ScaleX":return this.xscale;case "ScaleY":return this.yscale;case "width":return this.width;case "height":return this.height;case "Position":if("ScrollArea"==this.innerType&&this.ref)return this.getScrollPosition()}return"function"===
typeof this[a]?this[a]():""};Element.prototype.GetProperty=function(a){return this.extractVariable(a)};Element.prototype.GetVariable=function(a){return this.extractVariable(a)};
Element.prototype.extractVariable=function(a,b){b=b||"var";switch(b){case "var":case "variable":case "property":var c=this.parseObjref(a),d=c.target.variables[c.variable];void 0==d&&(d=c.target.getProperty(c.variable));"property"==b&&story.properties[a]&&(d=story.properties[a]);return d;case "number":return parseFloat(a);case "boolean":return a;case "actparam":return TimelineAction.actparams[a];default:return a}};
Element.prototype.setVariable=function(a,b){var c=this.parseObjref(a);c.target.variables[c.variable]!=b&&(c.target.variables[c.variable]=b,c.target.handleVarChanged(a,"onvarchanged"))};
Element.prototype.registerVariableEventSubscriber=function(a,b,c){for(var d in this.eventSubscribers){var e=this.eventSubscribers[d];if(e.item==a&&e.varname==b)return}a={item:a,varname:b,check:Math.random(),priority:c};for(b=0;b<this.eventSubscribers.length;b++)if(this.eventSubscribers[b].priority<a.priority){this.eventSubscribers.splice(b,0,a);return}this.eventSubscribers.push(a)};
Element.prototype.handleVarChanged=function(a,b){for(var b=b||"onvarchanged",c=0;c<this.eventSubscribers.length;c++){var d=this.eventSubscribers[c];if(d.varname==a||d.item.getFullVariableRef(d.varname)==this.getFullVariableRef(a))d.item.handleEvent(b,a,null,!1,!0),d.item.render&&!d.item.renderScheduled&&d.item.render(d.item.lastRenderedState,this.redrawOnVarChange,null,"handleVarChanged")}};
Element.prototype.setProperty=function(a,b,c){var d=this.parseObjref(a),a=d.target.variables[d.variable]!=b;d.target.variables[d.variable]=b;a&&!c&&!this.group&&setTimeout(function(){d.target.handleVarChanged(d.variable,"onpropchanged")},0)};Element.prototype.parseObjrefFromXML=function(a){var b=$(a).find("objref").attr("value"),a=$(a).find("objref").attr("type");return this.parseObjref(b,a)};
Element.prototype.parseObjref=function(a,b){var c=this,d=a,e=!1,f=!0,g=!1;if(!a)return{target:null,variable:null,success:!1,isVariableRef:!1};var h=d.split(".");$.each(h,function(a,b){switch(b){case "":break;case "_this":break;case "_children":e=!0;break;case "_parent":if(c.parent)for(c=c.parent;"ShuffleGroup"==c.innerType;)c=c.parent;break;case "_player":c=story;break;default:var l=a==h.length-1,m=c.children[b];!m&&c.children[""]&&(m=c.children[""].children[b]);m?c=m:l&&(d=b,g=!0,"undefined"===typeof c.variables[b]&&
"function"!==typeof c[b]&&(f=!1))}});return"var"==b?this.parseObjref(c.variables[d]):{target:c,variable:d,processChildren:e,success:f,isVariableRef:g}};Element.prototype.setStates=function(a){this.render&&this.render(a,!1,null,"setStates");this.executeStateActions&&this.executeStateActions(a);this.variables.ObjectState=a};Element.prototype.store_resume_data=function(a){var b=$(a).attr("objref"),a=$(a).attr("varref"),b=this.parseObjref(b).target,c=b.GetResumeData(!0);b.setVariable(a,bwChunk.CreateChunk(c))};
Element.prototype.restore_resume_state=function(a){var b=$(a).attr("objref"),c=$(a).attr("varref");$(a).attr("limited");a=this.parseObjref(b).target;(c=a.extractVariable(c))&&a.restoreFromResumeData(c)};
Element.prototype.evaluateCondition=function(a,b){var c=this,d=function(){if(b){if(b.lmsCorrectResponses[0]&&b.lmsCorrectResponses[0].lmstext)return b.lmsCorrectResponses[0].lmstext;b.lmsCorrectResponses[0]={lmstext:""}}return""},e=function(a){if(b){var c=d();c&&(c+=" ");b.lmsCorrectResponses[0]={lmstext:c+a}}};switch($(a).get(0).tagName){case "condition":return $(a).children(),c.evaluateCondition($(a).children().first(),b);case "and":var f=!0;$(a).children().each(function(a,g){d()&&e("and");f=b?
c.evaluateCondition(g,b)&&f:f&&c.evaluateCondition(g)});return f;case "or":return f=!1,$(a).children().each(function(a,g){d()&&e("or");f=b?c.evaluateCondition(g,b)||f:f||c.evaluateCondition(g)}),f;case "nand":return f=!0,$(a).children().each(function(a,g){d()&&e("and");f=b?c.evaluateCondition(g,b)&&f:f&&c.evaluateCondition(g)}),!f;case "nor":return f=!1,$(a).children().each(function(a,g){d()&&e("nor");f=b?c.evaluateCondition(g,b)||f:f||c.evaluateCondition(g)}),!f;case "compare":var g=$(a),h=g.attr("operator"),
j=!0,k=g.attr("valuea"),k=c.extractVariable(k,g.attr("typea")),l=g.attr("valueb"),g=c.extractVariable(l,g.attr("typeb"));!isNaN(k)&&!isNaN(g)&&""!==k&&""!==g&&(k=parseFloat(k),g=parseFloat(g));var l=k==g,m="equals";switch(h){case "eq":m="equal to";break;case "iceq":l=k.toLowerCase()==g.toLowerCase();m="equal to";break;case "noteq":l=!l;m="not equal to";break;case "icneq":l=k.toLowerCase()!=g.toLowerCase();m="not equal to";break;case "gt":l=k>g;m="greater than";break;case "gte":l=k>=g;m="greater than or equal to";
break;case "lt":l=k<g;m="less than";break;case "lte":l=k<=g;m="less than or equal to";break;default:j=!1}e("Correct Response is "+m+" "+g);return!j?!1:l;case "hittestpoint":h=this.parseObjref($(a).children("objref").attr("value")).target;j=parseInt(this.extractVariable($(a).children("xpos").attr("value"),$(a).children("xpos").attr("type")));k=parseInt(this.extractVariable($(a).children("ypos").attr("value"),$(a).children("ypos").attr("type")));if(!h)return!1;h.slide&&h.slide.matrix.transformPoint(j,
k);return h.isPointActive(j,k);case "hasslidetext":var h=this.parseObjref(this.extractVariable($(a).children("slideref").attr("value"),$(a).children("slideref").attr("type"))).target,n=this.extractVariable($(a).children("searchref").attr("value"),$(a).children("searchref").attr("type")),n=n.toLowerCase(),p=!1;h.xml.find("[alttext]").each(function(a,b){p=p||-1<$(b).attr("alttext").toLowerCase().indexOf(n)});return p;case "containstext":return h=this.extractVariable($(a).children("targetref").attr("value"),
$(a).children("targetref").attr("type")),n=this.extractVariable($(a).children("searchref").attr("value"),$(a).children("searchref").attr("type")),$(a).attr("casesensitive")&&(h=h.toLowerCase(),n=n.toLowerCase()),p=-1<h.toLowerCase().indexOf(n);case "varexists":return h=this.parseObjref($(a).attr("value")),n=h.target.variables[h.variable],void 0!=n;case "isdescendant":return j=this.extractVariable($(a).attr("targeta"),$(a).attr("typea")),h=this.extractVariable($(a).attr("targetb"),$(a).attr("typeb")),
j=this.parseObjref(j).target,h=this.parseObjref(h).target,j.isAncestor(h);default:return!1}};Element.prototype.get_mouse_position=function(a){if(!this.isDisabled&&!this.parent.isDisabled){var b=swipe.getSlideCoords(this.slide),b=this.slide.matrix.unTransformPoint(b.x,b.y);this.setVariable($(a).children("xvar").attr("value"),b.x);this.setVariable($(a).children("yvar").attr("value"),b.y)}};
Element.prototype.moveto=function(a){var b=this.parseObjref($(a).children("objref").attr("value")).target,c=parseInt(this.extractVariable($(a).children("xpos").attr("value"),$(a).children("xpos").attr("type"))),d=parseInt(this.extractVariable($(a).children("ypos").attr("value"),$(a).children("ypos").attr("type")));if("true"==$(a).attr("addoffsetx"))var e=parseInt(this.extractVariable($(a).children("xoffset").attr("value"),$(a).children("xoffset").attr("type"))),c=c+e;"true"==$(a).attr("addoffsety")&&
(a=parseInt(this.extractVariable($(a).children("yoffset").attr("value"),$(a).children("yoffset").attr("type"))),d+=a);b.actionControlled=!0;b.ref.css("left",c+b.xoffset);b.ref.css("top",d+b.yoffset);b.x=c;b.y=d;b.updateMatrixComplete(!0)};Element.prototype.bringtofront=function(a){var b=this;if(a)b=this.parseObjref($(a).children("value").attr("value")).target;if(b.depth<b.slide.topZ)b.depth=++b.slide.topZ,b.setZIndex(b.depth)};
Element.prototype.open_webobject=function(a){if(this.webobject)this.webobject.remove(),this.webobject=null;var b=this.parent;"Slide"==this.innerType&&(b=this);this.webobject=$("<iframe class='item webobject'></iframe>");this.webobject.attr("src",$(a).attr("url"));this.webobject.attr("width",$(a).attr("width"));this.webobject.attr("height",$(a).attr("height"));this.webobject.css("left",$(a).attr("xpos")+"px");this.webobject.css("top",$(a).attr("ypos")+"px");this.webobject.css("z-index",this.depth);
b.ref.append(this.webobject);this.webobject.show()};Element.prototype.destroyWebobjects=function(){if(this.webobject)this.webobject.remove(),this.webobject=null};
Element.prototype.open_url=function(a){var b=$(a).attr("url"),c=$(a).attr("window"),d=$(a).attr("windowsize");$(a).attr("usedefaultcontrols");var e="true"==$(a).attr("status")?1:0,f="true"==$(a).attr("toolbar")?1:0,g="true"==$(a).attr("location")?1:0,h="true"==$(a).attr("menubar")?1:0,j="true"==$(a).attr("scrollbars")?1:0,k="true"==$(a).attr("resizable")?1:0,l=parseInt($(a).attr("width")),m=parseInt($(a).attr("height"));"open_video"==a.tagName&&(b=player.basepath+window.globals.strContentFolder+"/"+
b);a="location="+g+",menubar="+h+",resizable="+k+",status="+e+",scrollbars="+j+",toolbar="+f;switch(d){case "fullscreen":a+=",width="+(screen.width-33)+",height="+(screen.height-150);break;case "custom":a+=",width="+l+",height="+m}var n=this;if(!this.openingWindow)this.openingWindow=!0,setTimeout(function(){n.openingWindow=!1},500),story.popWindow=window.open(b,c,a),story.popWindow&&story.popWindow.focus&&story.popWindow.focus(),this.openingWindow=!1};Element.prototype.open_video=Element.prototype.open_url;
Element.prototype.exe_animation=function(a){var b=this.parseObjrefFromXML(a).target,c=$(a).attr("id"),a="true"==$(a).children("reverse").attr("value"),d=b.animations[c];EventLogger.logNote("exe_animation:"+c+", "+b.id);c=player;if(b.slide)c=b.slide;if(b.layer)c=b.layer;d.start(b.ref,a,c)};
Element.prototype.slideY=function(){for(var a=0,b=this;b&&!isNaN(b.y);)a+=parseInt(b.y),!isNaN(b.yoffset)&&b!=this&&(a+=b.yoffset),"ScrollArea"==b.innerType&&b.ref&&b.ref.get(0)&&b.ref.get(0).scrollTop&&(a-=parseInt(b.ref.get(0).scrollTop)),b=b.parent;return parseInt(a)};
Element.prototype.slideX=function(){for(var a=0,b=this;b&&!isNaN(b.x);)a+=parseInt(b.x),!isNaN(b.xoffset)&&b!=this&&(a+=b.xoffset),"ScrollArea"==b.innerType&&b.ref&&b.ref.get(0)&&b.ref.get(0).scrollLeft&&(a-=parseInt(b.ref.get(0).scrollLeft)),b=b.parent;return parseInt(a)};
Element.prototype.testOver=function(a,b){var c=this.matrix.unTransformPoint(a+this.xoffset,b+this.yoffset),c=0<=c.x&&c.x<=this.width&&0<=c.y&&c.y<=this.height;return this.nearestScrollAreaAncestor&&this.nearestScrollAreaAncestor.hasScrollBars()&&this.nearestScrollAreaAncestor.matrix.unTransformPoint(a,b).x+18>this.nearestScrollAreaAncestor.width?!1:c};
Element.prototype.deepEach=function(a,b,c){isNaN(c)&&(c=0);for(var d in this.children){var e=this.children[d];if(e&&(!b||b(e)))a(d,e,c),e.deepEach&&e.deepEach(a,b,c+1)}};Element.prototype.getAbsoluteMatrix=function(){for(var a=this.matrix.copy(),b=this.offsetParent,c=0;b&&b.matrix&&10>c++;)a.multiply(b.matrix),b=b.offsetParent;return a};
Element.prototype.updateMatrixComplete=function(a){this.offsetParent&&this.offsetParent.updateMatrixComplete&&this.offsetParent.updateMatrix&&this.offsetParent.updateMatrixComplete(!1);this.updateMatrix();a&&this.deepEach(function(a,c){c.matrix&&(c.isStageItem||"Slide"==c.innerType)&&c.updateMatrix()})};
Element.prototype.performGoToPlay=function(a,b){var c=!0;DragItem.cancelDrag();$(document.body).removeClass("pointercursor");"Scene"==b.innerType&&(b=b.getFirstSlide());if("SlideDraw"==b.innerType){var d=b,b=d.getFirstSlide();d.parent.compactResumeData=d.parent.getResumeData()}if((d=player.currentWindow)&&d.isPrompt&&"_current"==a)player.currentWindow.close(),d=player.currentWindow;if("Slide"==b.innerType){var e=!0;"_current"!=a&&(b.variables.WindowId=a);if("_current"!=a&&"_frame"!=a){TimelineAction.actparams._ActTargetWindow=
a;player.pause();var f=story.parseObjref(a).target,e=f==d;f.showSlide(b)}else"_current"==a&&null!=d?(TimelineAction.actparams._ActTargetWindow=d.getFullObjref(!0),player.pause(),d.showSlide(b)):(player.currentSlide()&&player.currentSlide(),f=player.currentSlide()==b,e=null==d,TimelineAction.actparams._ActTargetWindow="_frame",player.currentWindow=null,player.windowZoomModifier=1,f&&player.currentSlide().resetSlide(),player.showSlideIndex(b.slideIndex,null,!0,function(){player.pause();player.zoomParams=
null;player.play()}));e&&(c=!1)}return c};var Storyline=function(a){this.container=a;this.scenes=[];this.allSlides=[];this.slideLookup={};this.media=[];this.m_listViewedActionLinks=[];this.startingslide=null;this.quizzes={};this.timers={};this.pathlibs={};this.properties={};this.currentSceneIndex=0;this.constructElement()};Storyline.prototype=new Element;Storyline.prototype.objectType="Storyline";Storyline.prototype.innerType="Storyline";
Storyline.prototype.saveToLocalStorage=function(){if(player.hasAdvanced)if(player.useCompactResume){var a=story.toResumeData();try{localStorageAlias[story.resumeID]=a}catch(b){}}else a=JSON.stringify(story.toData(!0)),localStorageAlias[story.resumeID]=a};Storyline.prototype.clearLocalStorage=function(){localStorageAlias.removeItem(story.resumeID)};
Storyline.prototype.toResumeData=function(){var a=this,b="";if(0==player.history.length&&null==player.currentWindowSlide&&!player.hasAdvanced)return"";var c="",d=0;$.each(this.allSlides,function(a,b){b.variables.Visited&&b.trackviews&&(c+=bwChunk.UBase10toN(b.slideIndexForResume,2),d++)});1==d&&(c="");var b=b+bwChunk.CreateChunk(c),e="",f=Window.getWindowResumeData(0,story.allSlides[player.slideIndex],player.history),e=e+bwChunk.CreateChunk(f),g=0;$.each(this.children,function(a,b){if("Window"==b.innerType&&
(g++,b.visible)){var c=Window.getWindowResumeData(g,player.currentWindowSlide,b.history);e+=bwChunk.CreateChunk(c)}});var b=b+bwChunk.CreateChunk(e),f=story.getVariableResumeData(),b=b+f,h="";$.each(this.children,function(a,b){if("Scene"==b.innerType){var c=bwChunk.EMPTY_CHUNK;if(b.compactResumeData)c=b.compactResumeData;h+=c}});var b=b+h,j="";$.each(this.quizzes,function(a,b){j+=bwChunk.CreateChunk(b.GetResumeData())});var b=b+j,k="";$.each(this.timers,function(a,b){k+=bwChunk.CreateChunk(b.GetResumeData())});
var b=b+k,l="";$.each(this.m_listViewedActionLinks,function(b,c){l+=bwChunk.UBase10toN(a.m_listViewedActionLinks[c],2)});b+=bwChunk.CreateChunk(l);f=bwChunk.UBase10toN(b.length);return b=bwChunk.CreateChunk(f)+b};
Storyline.prototype.updateFromCompactData=function(a){var a=new bwChunk(a),b=a.Remainder(),c=bwChunk.UBaseNto10(a.Data());if(b.length!=c)return!1;a=a.NextChunk();c=a.NextChunk();b=new bwChunk(c.Data());c=c.NextChunk();story.restoreVariableResumeData(c.Data());c.Remainder();for(var c=c.NextChunk(),d=0,e=story.getDescendantsByType("Scene");!c.isNothing&&d<e.length;){var f=e[d];f&&(c.IsEmpty()?f.populateDraws():f.restoreFromResumeData(c.Data()));c=c.NextChunk();d++}Interaction.updateScore("from restoreFromResumeChunk");
var g=c;$.each(this.quizzes,function(a,b){var c=g;b.SetResumeData(c.Data());g=c.NextChunk()});$.each(this.timers,function(a,b){var c=g;b.SetResumeData(c.Data());g=c.NextChunk()});for(c=g.Data;0<c.length;){var h=bwChunk.UBaseNto10(c.substr(0,2)),j="";$.each(story.actionLinkIndices,function(a,b){b==h&&(j=a)});this.m_listViewedActionLinks[j]=h;c=c.substr(2)}for(;!b.IsEmpty();){var c=new bwChunk(b.Data()),k=bwChunk.UBaseNto10(c.Data()),l;if(0==k){c=Window.parseResumeChunk(b);if(c.slide)this.startingslide=
c.slide.getFullObjref();player.history=c.history}else{l=null;var m=1;$.each(this.children,function(a,b){"Window"==b.innerType&&(m==k&&(l=b),m++)});if(l&&(c=Window.parseResumeChunk(b),c.slide))c.win=l,this.startingWindowInfo=c}b=b.NextChunk()}for(SlideDraw.populateDraws();!a.EOF();){var n=a.NextUBase10(2),p=null;$.each(story.allSlides,function(a,b){b.slideIndexForResume==n&&(p=b)});if(p)player.restoreViewedState(p),player.slideList.markVisited(p),p.variables.Visited=!0}$.each(story.allSlides,function(a,
b){b.compactResumeData&&$.each(b.interactions,function(a,b){b.updateSlideList()})});Interaction.updateScore(null,"Storyline.prototype.updateFromCompactData");return!0};
Storyline.prototype.toData=function(a){var b=this,c={slideID:player.currentSlide().id,history:player.history};$.each(this.variables,function(a,e){if(e!=b.variableDefaults[a]){if(!c.variables)c.variables={};c.variables[a]=e}});$.each(this.children,function(b,e){if("Slide"!=e.innerType&&e.toData){var f=e.toData(a);if(!jQuery.isEmptyObject(f)){if(!c.children)c.children={};c.children[b]=f}}});return c};Storyline.prototype.updateBaseFromData=Element.prototype.updateFromData;
Storyline.prototype.updateFromData=function(a){try{this.updateBaseFromData(a);if(a.slideID)this.startingslide=a.slideID;if(a.history)player.history=a.history}catch(b){}};
Storyline.prototype.loadFromXML=function(a){var b=this;b.xml=$(a).children();this.scenes=[];this.allSlides=[];this.slideLookup={};this.media=[];this.currentSceneIndex=0;this.children={};this.resumeID=$(a).children().children("resume").attr("id");this.resumeWindow=$(a).children().children("resume").attr("window");this.resumeSlideID=$(a).children().children("resume").attr("slideid");this.resumeLMS="true"==$(a).children().children("resume").attr("lmsresume");this.resumeFlash="true"==$(a).children().children("resume").attr("flashresume");
this.resumePrompt="true"==$(a).children().children("resume").attr("prompt");this.frameWidth=parseInt($(a).children().children("display").attr("width"));this.frameHeight=parseInt($(a).children().children("display").attr("height"));-1<location.search.indexOf("&menu=1")&&(this.frameWidth+=200);$(a).find("display").children("windows").children("window").each(function(a,c){var f=new Window;f.loadFromXML(c,b);f.createRef();b.children[f.id]=f});b.slidemap=[];$(a).children().children("slidemap").children("slideref").each(function(a,
c){var f={};f.id=$(c).attr("id");b.slidemap.push(f)});$(a).children().children("pathlibs").children("pathlib").each(function(a,c){var f=new PathLib;f.loadFromXML(c,b);b.pathlibs[f.id]=f});b.entrypoint=$(a).find("bwContent").attr("entrypoint");b.startingslide=$(a).find("bwContent").attr("entrypoint");b.lessonduration=parseInt($(a).find("bwContent").attr("lessonduration"));var c=$(a).find("scene");b.pendingSceneCount=c.length;c.each(function(c,e){if(0!=c&&1==c)story.startingSlideIndex=story.allSlides.length;
var f=new Scene;f.id=$(e).attr("id");f.lmsid=$(e).attr("lmsid");f.startingslide=$(e).attr("startingslide");f.sceneIndex=c;f.parent=b;f.xml=e;f.loadElementInfoFromXML(e);trace.logMulti("scene",b.scenes.length+1,f.id);b.pendingSceneCount=0;$(e).children("slides").children("slide").each(function(a,c){var d=new Slide(b.container);d.loadFromXML($(c));d.parent=f;d.sceneIndex=f.sceneIndex;d.sceneSlideIndex=a;f.slides.push(d);f.children[$(c).attr("id")]=d;b.allSlides.push(d);b.slideLookup[$(c).attr("id")]=
d;b.children[d.id]=d;d.slideIndex=b.allSlides.length-1;d.slideIndexForResume=d.slideIndex+1});$(a).children().children("timers").children("timer").each(function(a,c){var d=new Timer;d.loadFromXML(c,b);b.children[d.id]=d;b.timers[d.id]=d});f.slideDraws=[];var g=0;$(e).children("slidedraws").children("slidedraw").each(function(a,b){var c=new SlideDraw;c.loadFromXML(b);c.parent=f;c.sceneDrawIndex=g;f.children[c.id]=c;f.slideDraws.push(c);g++});f.title="Scene "+c;b.children[f.id]=f});this.loadElementInfoFromXML($(a).children());
$(a).children().children("quizzes").children().each(function(a,c){var f=new Quiz;f.loadFromXML(c,b);b.quizzes[f.id]=f;b.children[f.id]=f});b.scoring=new Scoring;b.scoring.loadFromXML($(a).children().children("scoring"));SlideDraw.NextSlideIndex=this.allSlides.length+1;$(a).children().children("slidebank").each(function(a,c){var f=new SlideBank;f.loadFromXML(c,b);b.children[f.id]=f});c=b.getStartingSlide();story.startingSlideIndex=c.slideIndex;player.width=c.width;player.height=c.height;player.aspectRatio=
c.aspectRatio;if("SlideDraw"==c.innerType)c=c.getFirstSpecifiedSlide(),player.width=c.width,player.height=c.height,player.aspectRatio=c.aspectRatio;this.actionLinkIndices={};$(a).children().children("actionlinks").children("actionlink").each(function(a,c){var f=new ActionLink;f.loadFromXML(c,b);b.children[f.id]=f;b.actionLinkIndices[f.id]=a});$(a).children().children("slidemap").children("slideref").each(function(a,c){var f=$(c).attr("id"),g=b.parseObjref(f).target;$(c).children("assets").children("asset").each(function(a,
c){var d=$(c).attr("url");$(c).attr("mobileurl");var e=$(c).attr("htmlurl"),d=player.basepath+(e?e:d),e="image";switch(d.split(".").pop()){case "swf":d=d.replace(".swf",".png");e="swfImage";break;case "flv":case "mov":case "mp4":case "avi":e="video";break;case "mp3":e="audio"}switch(e){case "image":e=new Resource(b,d,function(){});if("Slide"==g.innerType)g.pushResource(e),e.src=d;break;case "video":e=Video.getStoreReference(g,d);if(!player.firstVideoAssetSrc)player.firstVideoAssetSrc=e;if(!g.firstVideoAssetSrc)g.firstVideoAssetSrc=
e;player.isMobile&&Video.addToRefStore(e,d)}})});story.globalAudio={};$(a).children().children("globalaudiolib").children("audio").each(function(a,b){var c=new Audio;c.loadFromXML(b);c.createRef();story.globalAudio[c.id]=c});player.loadingSlide=null};Storyline.prototype.getStartingSlide=function(a){var b=this.parseObjref(this.startingslide).target;switch(b.innerType){case "Scene":b=this.parseObjref(b.startingslide).target}"SlideDraw"==b.innerType&&a&&(b=b.getFirstSlide());return b};
Storyline.prototype.addSlide=function(){};Storyline.prototype.getSlideByID=function(a){for(var b=0;b<story.allSlides.length;b++)if(story.allSlides[b].id==a)return story.allSlides[b];return null};var Window=function(){this.xml="";this.constructElement();this.selected=!1;this.zoomModifier=1;this.history=[];this.visible=!1};Window.prototype=new Element;Window.prototype.objectType="Window";Window.prototype.innerType="Window";Window.getWindowResumeData=function(a,b,c){var a=""+bwChunk.CreateChunk(bwChunk.UBase10toN(a)),a=a+Slide.getResumeReference(b),d="";$.each(c,function(a,b){d+=Slide.getResumeReference(story.allSlides[b])});d+=Slide.getResumeReference(b);return a+=bwChunk.CreateChunk(d)};
Window.parseResumeChunk=function(a){var b={},c=new bwChunk(a.Data());a.Skip(c.ChunkData().length);c=Slide.getFromResumeChunk(a);b.slide=c;for(var d=[],a=new bwChunk(a.NextString());!a.EOF();)c=Slide.getFromResumeChunk(a),d.push(c.slideIndex);d.pop();b.history=d;return b};Window.closeAll=function(){$.each(story.children,function(a,b){"Window"==b.innerType&&b.close()})};
Window.prototype.loadFromXML=function(a,b){this.parent=b;this.children={};this.id=$(a).attr("id");this.linkid=$(a).attr("linkid");this.width=parseInt($(a).attr("width"))-2;this.height=parseInt($(a).attr("height"))-2;this.alignto=$(a).attr("alignto");this.align=$(a).attr("align");this.valign=$(a).attr("valign");-1<this.linkid.indexOf("StoryPopup")?(this.width-=6,this.height-=6,this.isPrompt=!1):this.isPrompt=!0;this.hasControls=-1<this.linkid.indexOf("Controls")};
Window.prototype.createRef=function(){var a=$("<div class='window'><h1>Title</h1><hr><div class='windowContent'></div></div>");a.css("width",this.width);a.css("height",this.height);a.css("margin","auto");a.addClass(this.id);this.contentRef=a.children("div").first();this.titleRef=a.children("h1").first();this.isPrompt&&a.addClass("prompt");switch(this.align){case "center":a.css("left","50%");a.css("margin-left",-this.width/2);break;default:console.log("unknown window align",this.align)}switch(this.valign){case "center":a.css("top",
"50%");a.css("margin-top",-this.height/2);break;default:console.log("unknown window valign",this.valign)}$("#slidecontainer").append(a);this.ref=a;this.ref.hide()};
Window.prototype.prepareLightbox=function(){var a=$(".frameInterstitial");0==a.length&&(a=$("<div class='frameInterstitial'></div>"),$(".framewrap").prepend(a));$(document.body).append($(".window.prompt"));if(!this.lightboxPrepared){$(document.body).append(this.ref);this.ref.addClass("lightbox");this.contentRef.css("width",this.width);this.contentRef.css("height",this.height);this.closeIcon=$("<div class='closeicon'><span>x</span></div>");this.closeIcon.css("left",0.85*player.width-10+"px");this.ref.append(this.closeIcon);
var b=this;this.closeIcon.click(function(){b==player.currentWindow&&b.close()});this.lightboxPrepared=!0}};
Window.prototype.prepareControls=function(){if(!(0<this.ref.find("#controls").length))this.controls=$("#controls").clone(!1),this.controls.css("left","0px"),this.controls.css("width",this.controls.width()-10),this.ref.append(this.controls),this.progressBar=new ProgressBar(null,this.controls.find("#progressbar"),!0),this.progressBar.onDragUpdate=player.progressBar.onDragUpdate,this.progressBar.zoomModifier=this.zoomModifier,this.controls.find(".submit-slide").parent().bind("click",function(){$(this).hasClass("disabled")||
$(this).hasClass("locked")||0<$(".modalfence:visible").length||story.handleEvent("onobjectevent","submit_pressed",null,!1,!1,!0)}),this.controls.find(".label.next").parent().bind("click",function(){!$(this).hasClass("disabled")&&!$(this).hasClass("locked")&&story.handleEvent("onobjectevent","next_pressed",null,!1,!1,!0)}),this.controls.find(".label.prev").parent().bind("click",function(){!$(this).hasClass("disabled")&&!$(this).hasClass("locked")&&story.handleEvent("onobjectevent","prev_pressed",null,
!1,!1,!0)}),this.controls.find(".finish-slide").parent().bind("click",function(){!$(this).hasClass("disabled")&&!$(this).hasClass("locked")&&story.handleEvent("onobjectevent","finish_pressed",null,!1,!1,!0)}),this.controls.find(".play").bind("click",function(){player.activeTimeline.play()}),this.controls.find(".pause").bind("click",function(){player.activeTimeline.pause()}),this.volumeSlider=new VolumeSlider(this.controls.find("#control-volume")),this.volumeSlider.onDragUpdate=function(a){$("audio,video").each(function(b,
c){c.volume=Math.min(a*player.clipVolume,1)});Audio.setMasterVolume&&Audio.setMasterVolume(a);VolumeSlider.updateVolumeIcon(a)}};
Window.prototype.closeLightbox=function(){if(!player.stackedWindow)$(".blocker").hide(),$(".interstitial").hide(),$(".frameInterstitial").hide(),$(".frameInterstitial").removeClass("dark"),$(".interstitial").removeClass("black"),player.showingInterstitial=!1,$("#slidecontainer").append($(".window.prompt"));player.currentWindowSlide.saveIfNecessary();player.currentWindowSlide.resetSlide();player.currentWindowSlide.hide();player.currentWindowSlide.unloadContent();player.currentWindow=null;player.currentWindowSlide=
null;player.currentSlide().handleEvent("ontransitionin",null,null,!1,!0);player.currentTime=player.currentSlide().currentTime};
Window.prototype.renderBackground=function(){var a={canvas:this.background.get(0),m_nXOffset:0,m_nYOffset:0,m_nWidth:this.width+100,m_nHeight:this.height};ppArt.DrawVector(a,"ZB1$v$vPCZy$f2L$_XA100jfZQA1$3N10OaXIA1ag70FCDY$v00LCYv0000PC_$3w2wPC_$9wn3PC_$9wn3PC_$9wn3PC_$9wn3e20PC_$9wn3PC_$PyDYg40PC_$PyDYPC_$VyYvLCYv_y00FCDY_y00e20FCDY_y009wn3_y00g409wn3_y003w2w_y00$v00VyYv$v00PyDYe20$v00PyDY$v009wn3g40$v009wn300003w2w3w2w$v009wn3$v003t3w00px000000E0505010100w00N10$$$$E0aEg70FC$v$v$vLCt1$v$vPC$v3wx_PC$v9w$vPC$v9w$vPC$v9w$vPC$v9w$ve20PC$v9w$vPC$vPy$vg40PC$vPy$vPC$vVyt1LCt1Zy$vFC$vZy$ve20FC$vZy$v9w$vZy$vg409w$vZy$v3wx_Zy$v$v$vVyt1$v$vPy$ve20$v$vPy$v$v$v9w$vg40$v$v9w$v$v$v3wx_3wx_$v$v9w$v$v$v3E",null,
player.fontlib,null)};Window.prototype.appendSlide=function(a){a.loadContentFromXML();this.slide&&this.slide.ref.remove();this.slide=a;this.contentRef.empty();this.contentRef.append(a.ref);this.titleRef.html(a.title)};
Window.prototype.close=function(){this.slide&&(player.pause(),this.slide.ref.remove());this.slide=null;this.ref.hide();this.closeLightbox();player.currentWindow=player.stackedWindow;player.currentWindowSlide=player.stackedWindowSlide;player.stackedWindow=null;player.stackedWindowSlide=null;this.visible=!1;player.windowZoomModifier=1;player.zoomParams=null;if(this.previousTimeline)player.activeTimeline=this.previousTimeline;if(player.currentFramedSlide)player.activeTimeline=player.currentFramedSlide;
player.pause();player.play();player.currentSlide().saveIfNecessary();story.saveToLocalStorage()};
Window.prototype.showSlide=function(a,b){var c=TimelineAction.actparams.cancelled;TimelineAction.actparams._ActTargetSlideId=a.getFullObjref(!0);TimelineAction.actparams._ActTargetWindow=a.variables.WindowId;TimelineAction.actparams._ActTargetSlideNavIndex=a.navindex;TimelineAction.actparams.cancelled=!1;player.currentSlide().handleEvent("onbeforeslidejump",null,null,!1,!0);if(TimelineAction.actparams.cancelled)TimelineAction.actparams.cancelled=c;else{TimelineAction.actparams.cancelled=c;if(player.currentWindow&&
player.currentWindow!=this)player.stackedWindow=player.currentWindow,player.stackedWindowSlide=player.currentWindowSlide,player.windowStack.push(player.currentWindow);if(-1<this.linkid.indexOf("StoryPopup"))this.isLightbox=!0,this.prepareLightbox();-1<this.linkid.indexOf("Controls")&&this.prepareControls();if(-1<this.linkid.indexOf("StoryWindow")){if(!Window.blocker)Window.blocker=$("<div class='blocker'></div>"),$(".contentpane").append(Window.blocker);Window.blocker.show()}player.currentSlide().saveIfNecessary();
player.currentWindowSlide&&(player.currentWindowSlide.saveIfNecessary(),player.currentWindowSlide.resetSlide());player.currentWindow=this;player.currentWindowSlide=a;this.ref.show();a.currentTime=0;a.createRef();this.appendSlide(a);a.ref.show();a.visible=!0;a.variables.WindowId=this.id;a.variableDefaults.WindowId=this.id;player.updateViewCount(a);a.update(0,!0);!b&&player.currentWindow&&player.currentWindowSlide&&player.currentWindow.history.push(player.currentWindowSlide.slideIndex);this.visible=
!0;if(this.isLightbox)c=$(".frameInterstitial"),c.addClass("dark"),c.show(),player.showingInterstitial=!0;player.currentSlide().handleEvent("ontransitionin",null,null,!1,!0);player.currentSlide().handleEvent("ontransitionincomplete",null,null,!1,!0);player.currentSlide().handleEvent("onslidestart");player.currentSlide().deepEach(function(a,b){b.handleEvent&&b.handleEvent("onslidestart",null,null,!1,!0)});this.previousTimeline=player.activeTimeline;player.pause();player.currentTime=0;a.transitionedIn=
!1;player.play(!1,!0,!1);if(player.hasShownFirstSlide)player.hasAdvanced=!0;player.hasShownFirstSlide=!0;story.saveToLocalStorage();player.windowZoomModifier=this.zoomModifier;a.fitToContainer();player.windowZoomModifier=this.zoomModifier}};var ResumePrompt=function(){this.xml="";this.constructElement();this.selected=!1};ResumePrompt.prototype=new Window;ResumePrompt.prototype.objectType="ResumePrompt";ResumePrompt.prototype.innerType="ResumePrompt";
ResumePrompt.prototype.createRef=function(){var a=this,b=$("<div class='window dialog'><h1>Resume</h1><p>Would you like to resume where you left off?</p><div class='choose'><span class='button yes'>Yes</span><span class='button no'>No</span></div></div>");this.contentRef=b.children("p").first();this.titleRef=b.children("h1").first();this.suppressRef=$("<div></div>");$(document.body).append(b);this.ref=b;var c=b.find(".yes"),d=b.find(".no");b.find(".button").bind("mousedown touchstart",function(){$(this).addClass("pressed")});
b.find(".button").bind("mouseup touchend mouseout",function(){$(this).removeClass("pressed")});c.bind("click",function(){a.slide.children.btn0.handleEvent("onrelease",null,null,!1,!1,!0);$(".interstitial").removeClass("resume");$(".interstitial").hide();$(".frameInterstitial").hide();player.showingInterstitial=!1});d.bind("click",function(){a.slide.children.btn1.handleEvent("onrelease",null,null,!1,!1,!0);$(".interstitial").removeClass("resume");$(".interstitial").hide();$(".frameInterstitial").hide();
player.showingInterstitial=!1});this.ref.hide()};ResumePrompt.prototype.appendSlide=function(a){this.slide&&this.slide.ref.remove();this.slide=a;this.suppressRef.append(a.ref);this.titleRef.html($(a.title).text());setTimeout(function(){a.ref.find(".item_ResumePromptSlide_Text").text();$(".interstitial").removeClass("black");$(".interstitial").addClass("resume");$(".interstitial").show();player.showingInterstitial=!0},1)};var Scene=function(){this.slides=[];this.slideDraws=[];this.constructElement()};Scene.prototype=new Element;Scene.prototype.objectType="Scene";Scene.prototype.innerType="Scene";
Scene.prototype.restoreFromResumeData=function(a){var b=this.getDescendantsByType("Slide"),c=[];$.each(b,function(a,b){b.resume&&c.push(b)});b=new bwChunk(a);this.restoreVariableResumeData(b.Data());for(var b=b.NextChunk(),d=0,e=0;!b.isNothing;){if(d>=c.length){var f=this.slideDraws[e];f&&f.restoreFromResumeData(b.Data());e++}else f=c[d],f.compactResumeData=b.ChunkData(),f.restoreFromResumeData(b.Data(),!0);b=b.NextChunk();d++}this.compactResumeData=bwChunk.CreateChunk(a)};
Scene.prototype.getResumeData=function(){var a;a=""+this.getVariableResumeData();var b="";$.each(this.children,function(a,c){c.compactResumeData?b+=c.compactResumeData:c.resume&&(b+=bwChunk.EMPTY_CHUNK)});var c="";$.each(this.children,function(a,b){if("SlideDraw"==b.innerType){if(!b.compactResumeData)b.compactResumeData=b.getResumeData();c+=b.compactResumeData||"0"}});b+=c;return bwChunk.CreateChunk(a+b)};
Scene.prototype.getFirstSlide=function(){for(var a=0;a<story.allSlides.length;a++)if(story.allSlides[a].parent.id==this.id)return story.allSlides[a];return this};Scene.prototype.populateDraws=function(){$.each(this.slideDraws,function(a,b){0==b.draw.length&&(b.createDraw(),b.populateDraw())})};var Timer=function(a,b,c){this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.content={fontsize:18,font:"Arial"};this.constructElement();this.events=[];this.active=!0;this.visible=!1;this.startPosition=0;this.startTime=null;this.currentPosition=0;this.visible=this.running=!1};Timer.prototype=new Element;Timer.prototype.innerType="Timer";Timer.prototype.objectType="Timer";Timer.prototype.toBaseData=Element.prototype.toData;
Timer.prototype.toData=function(a){a=this.toBaseData(a);if(0!=this.currentPosition)a.currentPosition=this.currentPosition;if(this.running)a.running=!0;if(this.visible)a.visible=!0;return a};Timer.prototype.updateBaseFromData=Element.prototype.updateFromData;Timer.prototype.updateFromData=function(a){this.updateBaseFromData(a);if(a.currentPosition)this.currentPosition=a.currentPosition;a.visible&&this.show();a.running&&this.start();if(a.variables&&a.variables.DropTargetId)this.dropArea=this.parent.children[a.variables.DropTargetId]};
Timer.prototype.GetResumeData=function(){var a="",a=this.running?"1":"0";return a+=bwChunk.Base10toN(this.currentPosition)};Timer.prototype.SetResumeData=function(a){var b="1"==a.substr(0,1),a=a.substr(1);this.currentPosition=bwChunk.BaseNto10(a);b?this.start():this.pause()};Timer.prototype.loadFromXML=function(a){this.loadElementInfoFromXML(a);this.id=$(a).attr("id");this.duration=parseInt($(a).attr("duration"))};Timer.prototype.show=function(){this.visible=!0;this.createRef();this.render();this.ref.show()};
Timer.prototype.hide=function(){this.visible=!1;this.ref.hide()};Timer.prototype.start=function(){var a=this;if(!(this.currentPosition>=this.duration)&&(this.startPosition=this.currentPosition,this.startTime=new Date,this.render(),!this.interval))this.interval=setInterval(function(){a.tick()},100)};Timer.prototype.pause=function(){if(this.interval)clearInterval(this.interval),this.interval=null};
Timer.prototype.tick=function(){this.currentPosition=this.startPosition+(new Date-this.startTime);if(this.currentPosition>this.duration)this.currentPosition=this.duration,this.pause(),this.handleEvent("timercomplete");this.updateText();this.render()};
Timer.prototype.createRef=function(){if(!this.ref)this.ref=$("<div class='timercaption'></div><canvas class='timer' width='20' height='20'></canvas>"),this.captionRef=$(this.ref.get(0)),this.canvasRef=$(this.ref.get(1)),player.isMobileFrame?$(document.body).append(this.ref):$(".framewrap").append(this.ref),this.context=this.canvasRef.get(0).getContext("2d")};
Timer.FormatMS=function(a){var b=Math.floor(a/1E3%60),c=Math.floor(a/1E3/60%60),a=Math.floor(a/1E3/60/60);return 0<a?a+":"+(c+100+"").substr(1)+":"+(b+100+"").substr(1):(c+100+"").substr(1)+":"+(b+100+"").substr(1)};Timer.Format=function(a,b,c,d){switch(c){case "remaining":return Timer.FormatMS(b-a);case "totalelapsed":return d?Timer.FormatMS(b)+" / "+Timer.FormatMS(a):Timer.FormatMS(a)+" / "+Timer.FormatMS(b);case "elapsed":return Timer.FormatMS(a)}return""};
Timer.prototype.updateText=function(){this.captionRef.html(Timer.Format(this.currentPosition,this.duration,player.frame.options.time_format))};
Timer.prototype.render=function(){if(this.context){this.context.clearRect(0,0,20,20);this.context.strokeStyle="#cfcfcf";this.context.fillStyle="#fff";this.context.lineWidth=1;if(!player.isMobileFrame)this.context.strokeStyle=player.frame.colorGroups.timer.stroke.toColorString();this.context.beginPath();this.context.arc(10,10,9.5,0,2*Math.PI,!1);this.context.fill();this.context.stroke();this.context.lineWidth=1;var a=this.context.createLinearGradient(0,0,0,20);a.addColorStop(0,"#039EF4");a.addColorStop(1,
"#0147E6");var b=this.context.createLinearGradient(0,0,0,20);b.addColorStop(0,"#FDE145");b.addColorStop(1,"#E4B202");player.isMobileFrame||(a=player.frame.colorGroups.timer.duration.toCanvasGradient(this.context,20),b=player.frame.colorGroups.timer.elapsed.toCanvasGradient(this.context,20));var c=-Math.PI/2,d=c-2*this.currentPosition/this.duration*Math.PI;this.context.beginPath();this.context.fillStyle=a;this.context.moveTo(10,10);this.context.arc(10,10,8,d,c,!0);this.context.fill();this.context.beginPath();
this.context.fillStyle=b;this.context.moveTo(10,10);this.context.arc(10,10,8,c,d,!0);this.context.closePath();this.context.fill()}};var Slide=function(a){this.container=a||$(document.body);this.ref=null;this.title="Untitled Slide";this.slideBank=this.quiz=this.transition=null;this.layers={};this.timelineEvents=[];this.clips=[];this.resources=[];this.interactions={};this.responses={};this.navLinks=[];this.layerStack=[];this.framedSlides={};this.renderBgLoadStack=[];this.loadedChunkXML=this.backgroundReady=this.ready=!1;this.currentIndex=this.zeroTime=this.currentTime=this.slideIndex=0;this.duration=5E3;this.active=!0;this.paused=
this.playing=!1;this.width=720;this.height=540;this.scale=1;this.topZ=5;this.constructElement();this.variables.Visited=!1;this.audioInitialized=this.fullyLoaded=this.variableDefaults.Visited=!1};Slide.prototype=new Element;Slide.prototype.objectType="Slide";Slide.prototype.innerType="Slide";
Slide.getResumeReference=function(a){var b;null==a?b=9:(b=""+(a.slideBank?"1":"0"),a.slideBank?(b+=bwChunk.CreateChunk(bwChunk.UBase10toN(a.drawSlideIndex)),b+=bwChunk.CreateChunk(bwChunk.UBase10toN(a.sceneIndex)),b+=bwChunk.CreateChunk(bwChunk.UBase10toN(a.drawIndex))):(b+=bwChunk.CreateChunk(bwChunk.UBase10toN(a.sceneSlideIndex)),b+=bwChunk.CreateChunk(bwChunk.UBase10toN(a.sceneIndex))));return b};
Slide.getFromResumeChunk=function(a){if("1"==a.NextString(1))var b=a.NextChunkedUBase10(),c=a.NextChunkedUBase10(),a=a.NextChunkedUBase10(),c=story.getDescendantsByType("Scene")[c],b=c.getDescendantsByType("SlideDraw")[a].orderedChildren[b];else b=a.NextChunkedUBase10(),c=a.NextChunkedUBase10(),c=story.getDescendantsByType("Scene")[c],b=c.slides[b];return b};
Slide.prototype.restoreFromResumeData=function(a,b){!this.fullyLoaded&&!b&&(this.loadContentFromXML(b),b=!0);var c=new bwChunk(a),c=new bwChunk(c.Data()),d=new bwChunk(c.Data());$.each(this.interactions,function(a,b){b.restoreFromResumeChunk(d);d=d.NextChunk()});if(!b){var e=[];this.deepEach(function(a,b){b.resume&&"ShuffleGroup"!=b.innerType&&e.push(b)},function(a){return"Layer"==a.innerType?!1:!0});c=c.NextChunk();this.currentTime=bwChunk.BaseNto10(c.Data(),c.Length());this.fixCurrentIndex();for(var c=
c.NextChunk(),f=new bwChunk(c.Data()),g=0;!f.isNothing;){var h=e[g];h&&h.restoreFromResumeData(f.ChunkData());f=f.NextChunk();g++}var j=[];$.each(this.children,function(a,b){"Layer"==b.innerType&&j.push(b)});g=c.NextChunk();h=new bwChunk(g.Data());for(f=0;!h.isNothing;)c=j[f],c.restoreFromResumeData(h.Data()),h=h.NextChunk(),f++,c.reset(),c.hide();g=g.NextChunk();for(h=new bwChunk(g.Data());!h.isNothing;)f=h.NextUBase10(),c=j[f],f=c.currentTime,c.slide==player.currentSlide()?c.show():(c.visible=!0,
c.setOnStage(!0)),c.currentTime=f,h=h.NextChunk();var c=g.NextChunk(),k=c.Data();this.clips.forEach(function(a){if("audio"==a.innerType){var b=new bwChunk(k);a.SetResumeData(b.Data());k=b.Remainder()}});this.restoreVariableResumeData(c.NextChunk().Data())}};
Slide.prototype.getResumeData=function(){var a="";if(this.resume&&this.variables.Visited){var b="",c="",d="",e="",f="";this.deepEach(function(a,c){c.resume&&"ShuffleGroup"!=c.innerType&&(b+=bwChunk.CreateChunk(c.GetResumeData()))},function(a){return"Layer"==a.innerType?!1:!0});this.clips.forEach(function(a){"audio"==a.innerType&&(e+=bwChunk.CreateChunk(a.GetResumeData()))});f="";$.each(this.interactions,function(a,b){f+=bwChunk.CreateChunk(b.GetResumeData())});var a=bwChunk.CreateChunk(f),g=bwChunk.Base10toN(this.currentTime),
a=a+bwChunk.CreateChunk(g),a=a+bwChunk.CreateChunk(b),h=[];$.each(this.children,function(a,b){"Layer"==b.innerType&&(b.visible&&h.push(b),b.resume&&(c+=bwChunk.CreateChunk(b.getResumeData())))});a+=bwChunk.CreateChunk(c);$.each(h,function(a,b){var c=b.getItemIndex();d+=bwChunk.CreateChunk(bwChunk.Base10toN(c))});a+=bwChunk.CreateChunk(d);a+=bwChunk.CreateChunk(e);g=this.getVariableResumeData();0<util.count(this.variables)&&(a+=g);a=bwChunk.CreateChunk(a)}return a};
Slide.prototype.rebuildInteractionData=function(){var a="";this.compactResumeData&&(a=new bwChunk(this.compactResumeData),a=(new bwChunk(a.Data())).Remainder());var b="",c="";$.each(this.interactions,function(a,b){c+=bwChunk.CreateChunk(b.GetResumeData())});b+=bwChunk.CreateChunk(c);this.compactResumeData=bwChunk.CreateChunk(b+a)};Slide.prototype.toBaseData=Element.prototype.toData;
Slide.prototype.toData=function(a){if(a&&this.resumeData){if(this.variables.Visited){if(!this.resumeData.variables)this.resumeData.variables={};this.resumeData.variables.Visited=!0}return this.resumeData}var b=this.toBaseData(a);$.each(this.interactions,function(a,d){var e=d.toData();if(!jQuery.isEmptyObject(e)){if(!b.interactions)b.interactions={};b.interactions[a]=e}});return b};Slide.prototype.updateBaseFromData=Element.prototype.updateFromData;
Slide.prototype.updateFromData=function(a){this.updateBaseFromData(a);this.variables.Visited&&player.slideList.markVisited(this);if(!this.resumeData)this.resumeData=a};
Slide.prototype.loadFromXML=function(a){var b=this;this.width=parseInt($(a).attr("width"));this.height=parseInt($(a).attr("height"));this.aspectRatio=this.width/this.height;this.id=$(a).attr("id");this.title=$(a).attr("title");this.html5url=$(a).attr("html5url");this.dataurl=$(a).attr("dataurl");this.trackviews="true"==$(a).attr("trackviews");this.resume="true"==$(a).attr("resume");this.enableseek="true"==$(a).attr("enableseek");this.enablereplay="true"==$(a).attr("enablereplay");this.slidelock="true"==
$(a).attr("slidelock");this.showmenuresulticon="true"==$(a).attr("showmenuresulticon");this.starttime=parseInt($(a).attr("starttime"));this.elapsedtimemode=$(a).attr("elapsedtimemode");this.navindex=parseInt($(a).attr("navindex"));this.viewgroupid=$(a).attr("viewgroupid");this.historygroupid=$(a).attr("historygroupid");if(!this.viewgroupid)this.viewgroupid=this.id;if(!this.historygroupid)this.historygroupid=this.id;this.globalaudioid=$(a).attr("globalaudioid");this.showanimationid=$(a).attr("showanimationid");
this.xml=a;if(this.loadedChunkXML=null==this.html5url)this.loadAudioFromXML(),this.loadBackgroundFromXML(),this.loadElementInfoFromXML(a);b.interactionCount=0;$(a).children("interactions").children("interaction").each(function(a,d){var e=new Interaction;e.loadFromXML(d,b);b.interactions[e.id]=e;b.children[e.id]=e;b.interactionCount++});this.transition=new Transition(this);player.preload&&this.loadContentFromXML();b.variables.WindowId="_frame";b.variableDefaults.WindowId="_frame"};
Slide.prototype.loadAudioFromXML=function(){var a=this;if(!this.audioInitialized)this.audioInitialized=!0,$(this.xml).children("audiolib").children("audio").each(function(b,c){var d=new Audio;d.loadFromXML(c,a,a.slide,a.layer);d.createRef();a.children[d.id]=d})};
Slide.prototype.loadBackgroundFromXML=function(){var a=this,b=$(a.xml).children("background").length+$(a.xml).children("slidewindowbg").length,c=function(c,e,f){var g=new Background(e);g.loadFromXML(c);c=new StageItem;if(g.src)c.content={src:g.src},c.resource=new Resource(c,g.src,function(){if(0>=--b)a.backgroundReady=!0;f&&f()}),c.resource.testIndex=c.resources.length,a.pushResource(c.resource);else if(0>=--b)a.backgroundReady=!0;e&&g.apply(e);return g};$(a.xml).children("background").each(function(b,
e){a.background=c(e,a.ref,function(){for(var b=0;b<a.renderBgLoadStack.length;b++)a.renderBgLoadStack[b].renderOnUpdate();a.renderBgLoadStack=[]})});$(a.xml).children("slidewindowbg").each(function(b,e){a.windowBackground=c(e,null)})};
Slide.prototype.blockAndLoad=function(a){var b=this;this.loadCallbackStack?this.loadCallbackStack.push(a):this.loadCallbackStack=[a];var c=function(){for(player.shouldShowLoadingSpinner=!1;b.loadCallbackStack.length;)b.loadCallbackStack.pop()();player.actionQueuePaused=!1};player.actionQueuePaused=!0;if(b.ready&&b.backgroundReady&&b.loadedChunkXML)c();else{var d=0;clearTimeout(b.readyWaitTimeout);b.readyWaitTimeout=null;var e=function(){b.ready&&b.backgroundReady&&b.loadedChunkXML||50<d++?c():b.readyWaitTimeout=
setTimeout(e,100)};player.slideLoadQueue&&0!=b.slideIndex&&player.slideLoadQueue.promote(b.slideIndex);player.shouldShowLoadingSpinner=!0;player.loadingSpinnerTimeout=setTimeout(function(){player.shouldShowLoadingSpinner&&(player.showLoadingSpinner(),b.restorePlayerControls())},1E3);e()}};Slide.prototype.restorePlayerControls=function(){};
Slide.prototype.loadContentFromXML=function(a){var b=this;if(this.loadedChunkXML){if(!this.fullyLoaded){this.fullyLoaded=!0;var c=b.xml;this.presenterref=$(c).children("presenterref").attr("id");this.presenterVideoUrl=$(c).children("presenterref").children("videodata").attr("url");this.presenterVideoWidth=parseInt($(c).children("presenterref").children("videodata").attr("width"));this.presenterVideoHeight=parseInt($(c).children("presenterref").children("videodata").attr("height"));var d=$(c).children("presenterref").children("videodata");
if(d[0])this.presenterVideoData={},this.presenterVideoData.id=this.presenterref,this.presenterVideoData.url=d.attr("url"),this.presenterVideoData.poster=d.attr("poster"),this.presenterVideoData.type=d.attr("type"),this.presenterVideoData.width=parseInt(d.attr("width")),this.presenterVideoData.height=parseInt(d.attr("height")),this.presenterVideoData.duration=parseInt(d.attr("duration"));a||this.loadAudioFromXML();this.loadChildrenFromXML(c,b,null,function(){});b.timelineEvents=[];$(c).children("timeline").each(function(a,
c){b.duration=parseInt($(c).attr("duration"));$(c).find("event").each(function(a,c){var d=new TimelineEvent(b);d.loadFromXML(c);b.timelineEvents.push(d)})});$(c).children("slidelayers").children("slidelayer").each(function(a,c){var d=new Layer(b.ref,b);d.loadFromXML(c);b.layers[d.id]=d;b.children[$(c).attr("id")]=d});this.resetSlide()}}else if(!this.loadingChunkXML)this.loadingChunkXML=!0,this.loadChunkXML(!0)};
Slide.prototype.integrateChunkXML=function(a,b){var c=this;Audio.currentlyDecoding||Slide.currentlyIntegrating?setTimeout(function(){c.integrateChunkXML(a,b)},100):(Slide.currentlyIntegrating=!0,$(a).children("slide").children().each(function(a,b){"slidewindowbg"!=b.tagName&&$(c.xml).append($(b))}),this.loadedChunkXML=!0,b&&(this.loadAudioFromXML(),this.loadElementInfoFromXML(c.xml),this.loadContentFromXML(),this.loadBackgroundFromXML(),this.loadAnimationsFromXML(c.xml),this.transition.loadFromXML(c.xml,
c),this.detectSimpleNavigation(),player.loadResourcesForSlide(c)),Slide.currentlyIntegrating=!1)};
Slide.prototype.loadChunkXML=function(a){var b=this;window.SlideXMLData=function(c,d){if("string"==typeof d){d=d.replace(/[\u000a\u000b\u000c\u000d\u0085\u2028\u2029]/g,"");d=d.replace(/&#x[0-8bcef];/ig,"");-1<location.search.indexOf("dumpxml=1")&&console.log(d);var g;window.ActiveXObject?(g=new ActiveXObject("Microsoft.XMLDOM"),g.loadXML(d)):g=(new DOMParser).parseFromString(d,"text/xml");d=g}b.id!=c?story.getSlideByID(c).integrateChunkXML(d,a):b.integrateChunkXML(d,a)};if(player.loadFromScript){var c=
document.getElementsByTagName("head")[0],d=document.createElement("script");d.type="text/javascript";d.src=player.basepath+b.html5url;c.appendChild(d)}else $.ajax({url:player.basepath+b.dataurl.replace(".swf",".xml"),dataType:"xml",success:function(c){b.integrateChunkXML(c,a)},error:function(){return!1}})};
Slide.prototype.detectSimpleNavigation=function(){var a=this;this.hasSimpleNavigation=!0;var b=$(this.xml).find('actiongroup[id="ActGrpOnNextButtonClick"]');if(0==b.length)this.hasSimpleNavigation=!1;b.each(function(b,d){var e=$(d).children("actions").children(),f=$(d).children("actions").children("gotoplay");if(1!=e.length||1!=f.length)a.hasSimpleNavigation=!1})};Slide.prototype.canUnloadContent=function(){$(this.xml).find("hittestpoint");return 0==$(this.xml).find("hittestpoint").length};
Slide.prototype.unloadContent=function(){if(this.fullyLoaded&&!player.preload){this.fullyLoaded=!1;var a=this,b=0,c=0;$.each(this.layers,function(a,b){b.emptyLayer()});var d=[];this.deepEach(function(a,b){"Slide"==b.innerType&&b.unloadContent();d.push(b)},function(a){return"audio"!=a.innerType&&"Interaction"!=a.innerType});$.each(d,function(a,c){c.emptyElement();b++});children={};$.each(this.children,function(a,b){"audio"!=b.innerType&&"Interaction"!=b.innerType&&(children[a]=b)});$.each(children,
function(b){delete a.children[b];c++});$(this.ref).find(".webobject").each(function(a,b){b.src="";$(b).remove()});a.timelineEvents=[]}};Slide.prototype.pushResource=function(a){for(var b=0;b<this.resources.length;b++)if(this.resources[b].src==a.src)return;this.resources.push(a)};Slide.runningIndex=0;
Slide.prototype.createRef=function(a){if(!this.ref)this.container=a||$("#slidecontainer"),this.ref="follow"==player.swipeMode?$('<div class="slide transitionable swipable"></div>'):$('<div class="slide transitionable"></div>'),this.ref.css("display","none"),this.ref.attr("runningindex",Slide.runningIndex++),this.background&&this.background.apply(this.ref),this.ref.get(0).id="slide_"+this.id,this.ref.get(0).item=this,this.rotateypos=this.rotatexpos=0,this.fitToContainer(),$.each(this.children,function(a,
c){c.createRef&&c.createRef()}),this.container.append(this.ref),this.ref.css("width",this.width+"px"),this.ref.css("height",this.height+"px"),player.reorient(!0)};
Slide.prototype.fitToContainer=function(){var a=player.frame.availableSlideWidth,b=player.frame.availableSlideHeight;if(player.currentWindow&&player.currentWindowSlide==this)a=player.currentWindow.width,b=player.currentWindow.height,!player.currentWindow.isPrompt&&player.currentWindow.hasControls&&(b=player.currentWindow.height-40);else if(player.currentFramedSlide==this||this.offsetParent&&"SlideFrame"==this.offsetParent.innerType)a=this.offsetParent.width,b=this.offsetParent.height;this.scale=1;
if((this.width>a||this.height>b)&&(!this.offsetParent||"SlideFrame"!=this.offsetParent.innerType||this.offsetParent.scalecontents)){var c=a/this.width,d=b/this.height;this.scale=Math.min(c,d)}else if(this.width<a||this.height<b)c=a/this.width,d=b/this.height,this.scale=Math.min(c,d);if(player.currentWindowSlide==this)player.currentWindow.zoomModifier=1;if(0.02>Math.abs(this.scale-1))this.scale=1;if(player.forceSlideScale)this.scale=player.forceSlideScale;this.y=this.x=0;if(this.width*this.scale<a)this.x=
parseInt((a-this.width*this.scale)/2);if(this.height*this.scale<b)this.y=parseInt((b-this.height*this.scale)/2);this.applySize(this.ref);this.updateMatrixComplete(!0)};Slide.prototype.reduce=function(){$.each(this.children,function(a,b){b.reduce&&b.reduce()});if(this.canvas)this.canvas.width=1,this.canvas.height=1};
Slide.prototype.destroyRef=function(){this.pause();if(player.currentFramedSlide==this)player.currentFramedSlide=null;for(key in this.children){var a=this.children[key];a.destroyRef&&(a.destroyRef(),delete this.children[key])}this.audioInitialized=!1;if(this.ref)this.ref.remove(),this.ref=null;this.presenter=null;this.clips=[]};Slide.prototype.findClip=function(a){var b=$.grep(this.clips,function(b){return b.id==a});return 0<b.length?b[0]:null};
Slide.prototype.topMostLayer=function(){return 0<this.layerStack.length?this.layerStack[this.layerStack.length-1]:this};
Slide.prototype.saveIfNecessary=function(){$.each(this.interactions,function(a,b){if(!b.variables.Status||"incomplete"==b.variables.Status||"unanswered"==b.variables.Status)b.evaluate(!0,!0,!0),b.variables.Status||(b.variables.Status="unanswered")});if(this.resume)this.currentTime=player.currentTime,player.useCompactResume?this.compactResumeData=this.getResumeData():this.resumeData=this.toData(),this.parent.compactResumeData=this.parent.getResumeData()};
Slide.prototype.resetSlide=function(a,b){this.currentOver=!1;if(this.resume&&!a)player.useCompactResume&&this.compactResumeData?this.restoreFromResumeData(this.compactResumeData):this.resumeData&&this.updateFromData(this.resumeData);else{this.deepEach(function(b,d){d.quickHide&&d.quickHide();d.reset(a)},function(a){return a.parent&&"Layer"==a.parent.innerType&&a.parent.resume?!1:"Interaction"==a.innerType?!0==b:!0});this.compactResumeData="";this.currentIndex=this.currentTime=0;this.paused=!1;if(player.currentSlide()==
this)player.currentTime=0;this.reset();this.update(this.currentTime,!0,!0);this.transitionedIn=!1}};Slide.prototype.resetBase=Element.prototype.reset;Slide.prototype.reset=function(a){this.resetBase(a,function(a){return"Interaction"==a.innerType?!1:!0})};Slide.prototype.resetInteractions=function(){this.resume||$.each(this.interactions,function(a,b){b.reset()})};
Slide.prototype.show=function(a,b,c){var d=this;this.createRef(this.container);player.modalLayer=null;this.visible=!0;$.each(d.layers,function(a,b){b.visible||b.hide()});$(".slide").removeClass("out");$(".slide.in").addClass("out");$(".slide").removeClass("in");d.ref.addClass("in");$(".slide:not(.in,.out,.framed)").css("display","none");d.ref.css("display","block");var e=this.transition;if(b&&"pan"==player.animations)e=new Transition(this),e.pan=!0,e.wipe=!1,e.reverse=!1,e.duration=350,e.direction=
b,e.transition=Transition.TransType.fly;var b=d,f=d.ref,g=$(".slide.out");if(e.wipe)b=0<g.length?g.get(0).item:null,f=$(".slide.out"),g=d.ref,$(".slide.out").addClass("over"),Transition.applyCss({"-webkit-transform":"translate3d(0px,0px,0px) scale(1) rotate(0deg)",opacity:1,"-webkit-transition-duration":"0s"},d.ref);g=function(){$(".slide.out").css("display","none");$(".slide.over").removeClass("over");if(a)d.paused=!1,player.play(!0),c&&c()};if(e&&0<e.duration&&0<f.length){this.currentIndex=0;this.update(this.currentTime,
!0,!0);var h=e.convertToAnimation(b,!0);h.item=b;this.rotatexpos=this.width/2;this.rotateypos=this.height/2;h.start(f,e.reverse,player,g);h.seek(h.target,h.reverse,0,!0)}else g();if("SlideDraw"==d.parent.innerType)player.currentDraw=d.parent,d.parent.sniffDrawIndex(d);d.currentIndex=0;this.transitionedIn=!1;player.zoomParams=null;d.transcript?d.transcript.show():player.frame.transcriptPanel&&player.frame.transcriptPanel.showTitleOnly(d.title);d.windowBackground?d.windowBackground.apply($("#slidecontainer")):
$("#slidecontainer").css("background","transparent")};Slide.prototype.hide=function(){this.handleTransitionOut();this.visible=!1;this.ref&&this.destroyRef()};Slide.prototype.fixCurrentIndex=function(){for(this.currentIndex=0;this.currentIndex<this.timelineEvents.length&&this.timelineEvents[this.currentIndex].time<=this.currentTime;)this.currentIndex++};
Slide.prototype.play=function(a,b,c){if(!(this!=player.currentSlide()&&this!=player.currentFramedSlide&&this!=player.currentWindowSlide))this.paused=!1,player.paused=!0,player.play(a,b,c),this!=player.currentSlide()&&this==player.currentFramedSlide&&!c&&this.resumeMedia()};
Slide.prototype.resumeMedia=function(){for(var a=this,b=0;b<a.currentIndex&&b<a.timelineEvents.length;b++){var c=a.timelineEvents[b],d=c.getMediaDuration();(0==d||c.time+d>a.currentTime)&&c.act(!1,!0)}this.deepEach(function(b,c){"video"==c.innerType&&!c.autoplay&&c.controllableFromTimeline&&!c.getIsPlaying()&&!(c.slide!=a&&c.slide!=player.currentFramedSlide)&&c.playClip()})};Slide.prototype.pause=function(a){this.paused=!0;this.playing=!1;this.pauseClips(a)};
Slide.prototype.tick=function(){if(this.paused)this.tickPresenter();else if(!this.animating||this.animationEnded){this.currentTime+=player.currentTickDuration;this.ended=!1;if(this.currentTime>=this.duration)this.handleEvent("ontimelinecomplete"),player.layerPlaying||this.handleEvent("onallopentimelinescomplete"),this.currentTime=parseInt(this.duration),this.pause(!0,!1),this.endedAnimationTime=player.animationTime,this.ended=!0;this.tickPresenter()}};
Slide.prototype.tickPresenter=function(){this.presenter&&this.presenter.tick(this)};
Slide.prototype.update=function(a,b,c){this.currentTime=a;if(this.loadedChunkXML){for(;1<this.currentIndex&&this.currentIndex<=this.timelineEvents.length&&parseInt(this.timelineEvents[this.currentIndex-1].time)>=parseInt(this.currentTime);)this.currentIndex--,this.timelineEvents[this.currentIndex].revert(a);for(;this.currentIndex<this.timelineEvents.length&&this.timelineEvents[this.currentIndex].time<=this.currentTime&&(!player.paused||c);)this.timelineEvents[this.currentIndex].act(b,!1),this.currentIndex++;
this.handleTransitionIn();this.updateLayers()}};Slide.prototype.playIntroMedia=function(){var a=this.timelineEvents[0];$.each(a.actions,function(b,c){("media_play"==c.type||"media_seek"==c.type||"media_toggle"==c.type)&&c.act(a,null,!1,!1,!1);"show"==c.type&&c.getItem()&&"video"==c.getItem().type&&c.act(a,null,!1,!1,!1)});this.playing=!0;this.paused=!1};Slide.prototype.tickLayers=function(){$.each(this.layers,function(a,b){b.visible&&!b.paused&&(b.currentTime+=player.currentTickDuration)})};
Slide.prototype.updateLayers=function(){$.each(this.layers,function(a,b){b.visible&&b.update()})};
Slide.prototype.handleTransitionIn=function(){if(!this.transitionedIn&&this.visible&&(this.transitionedIn=!0,this.handleEvent("ontransitionin",null,null,!1,!0),this.handleEvent("ontransitionincomplete",null,null,!1,!0),this.handleEvent("onslidestart"),this.deepEach(function(a,c){c.handleEvent&&c.handleEvent("onslidestart",null,null,!1,!0)}),!player.currentWindow||!(player.currentWindowSlide==this&&player.currentWindow.isPrompt))){var a=this.globalaudioid&&story.globalAudio[this.globalaudioid];if(a){if(this.globalaudioid!=
player.currentGlobalAudioID)player.currentGlobalAudioID&&story.globalAudio[player.currentGlobalAudioID].pauseClip(),player.currentGlobalAudioID=this.globalaudioid,a.setCurrentTime(0),a.playClip()}else if(player.currentGlobalAudioID)story.globalAudio[player.currentGlobalAudioID].pauseClip(),player.currentGlobalAudioID=null}};
Slide.prototype.handleTransitionOut=function(){if(this.transitionedIn)this.transitionedIn=!1,this.handleEvent("ontransitionout",null,null,!1,!0),this.handleEvent("ontransitionoutcomplete",null,null,!1,!0)};Slide.prototype.getQuiz=function(){var a=null;null!=this.quiz?a=this.quiz:null!=this.slideBank&&(a=this.slideBank.getQuiz());return a};
Slide.prototype.addchoiceresponse=function(a){var b=this.children[$(a).attr("interactionid")],a=$(a).attr("value"),c=this.extractVariable(a)||"true",d=b.parseObjref(a).target;"Choice"!=d.innerType&&$.each(b.choices,function(a,b){b.lmstext.toLowerCase()==c.toLowerCase()&&(d=b)});b.m_bAnswered=!0;"Choice"==d.innerType?(b.responses[a]=d,b.lmsResponses.push(new ResponseData(!1,d.id,"",d.lmstext,"")),d.selected=!0):(b.variables.Value=c,a=b.parseObjref(c).target,"Choice"==a.innerType?(a.selected=!0,b.lmsResponses.push(new ResponseData(!1,
a.id,"",a.lmstext,""))):b.lmsResponses.push(new ResponseData(!1,c,"",c,"")))};
Slide.prototype.addpairresponse=function(a){var b=this.children[$(a).attr("interactionid")],c=this.extractVariable($(a).attr("valuea"),$(a).attr("typea")),d=this.extractVariable($(a).attr("valueb"),$(a).attr("typeb"));if(c&&d)switch(a=b.parseObjref(c).target,d=b.parseObjref(d).target,a.addPair&&d.addPair&&(a.addPair(d),d.addPair(a)),b.interactionType){case "matching":case "sequence":case "likert":b.lmsResponses.push(new ResponseData(!0,d.id,a.id,d.lmstext,a.lmstext))}else b.parseObjref($(a).attr("valueb"));
b.m_bAnswered=!0};Slide.prototype.show_slidelayer=function(a){var b=this.parseObjrefFromXML(a).target,c=new Transition(b);c.loadFromXML(a);b.show(c);b.update(0)};Slide.prototype.set_frame_layout=function(a){player.currentSlide()==this||player.currentFramedSlide==this&&null==player.currentWindowSlide?player.frame.set_frame_layout(a):this.offsetParent&&this.offsetParent.slide&&"_frame"!=this.offsetParent.slide.variables.WindowId?this.set_window_control_layout(a):this.deferredFrameLayoutXML=a};
Slide.prototype.set_window_control_layout=function(a){player.frame.set_window_control_layout(a)};Slide.prototype.isPointActive=function(){return!1};Slide.prototype.isPointObscured=function(){return!1};Slide.prototype.notifySelected=function(a){$("ul.menu_list li").removeClass("selected");$("ul.slidelist li").removeClass("selected");$.each(this.navLinks,function(b,c){c.actionlinkid==a&&$.each(c.listitems,function(a,b){b.addClass("selected")})});player.slideList.scrollSelectedIntoView()};
Slide.prototype.simplify=function(a){var b=this.childItems(),c=$('<canvas class="simplebackground"></canvas>');c.attr("width",player.width);c.attr("height",player.height);var d=c.get(0).getContext("2d");this.ref.prepend($(c));var e=0,f=0,g=!1,h=!0;$.each(b,function(a,b){if(player.renderVectorShapes&&player.renderVectorsAsSVG&&b.content.path)b.canSimplify=!1;if(player.renderVectorShapes&&(b.hasImagelib||b.hasTextlib))b.canSimplify=!1;b.canSimplify&&h&&!b.group?f++:(h=!1,b.canSimplify=!1)});var j=function(b,
c,d,h){g=!0;var j=function(){e++;if(e==f)l(),$(s).unbind("load"),s.src=Element.PixelSrc,a&&a()},s=new Image;$(s).bind("load",function(){j()});$(s).bind("error",function(){j()});player.renderVectorShapes&&!player.renderVectorsAsSVG&&h&&h.content.path&&!h.hasImagelib&&!h.hasTextlib?e++:s.src=b;k.push({img:s,x:c,y:d,item:h})},k=[],l=function(){$.each(k,function(a,b){if(player.renderVectorShapes&&!player.renderVectorsAsSVG&&b.item&&b.item.content.path&&!b.item.hasImagelib&&!b.item.hasTextlib){var e={canvas:c.get(0),
m_nXOffset:b.x,m_nYOffset:b.y,m_nWidth:b.item.width,m_nHeight:b.item.height};ppArt.DrawVector(e,b.item.content.path);b.item.ref.addClass("vector")}else d.drawImage(b.img,b.x,b.y)})};this.background&&this.background.src&&(f++,j(this.background.src,0,0),this.ref.css("background","transparent"));$.each(b,function(a,b){if(b.canSimplify)j(b.content.src,b.x,b.y,b),b.ref.addClass("simplified"),b.simplified=!0,b.ref.attr("src",Element.PixelSrc),b.ref.css("background","transparent"),b.hasEvents||b.ref.remove(),
g=!0});a&&!g&&a()};Slide.prototype.pauseClips=function(a){var b=this;this.paused=!0;$.each(this.clips,function(b,d){if(d.ref&&!a){d.pauseClip();if(d.scheduled&&player.scheduledMediaSrc==d.content.src)clearTimeout(player.mediaTimeout),player.scheduledMediaSrc=null;d.justPaused=!0;setTimeout(function(){d.justPaused=!1},100)}});$.each(player.webAudioClips,function(a,d){d.slide==b&&d.pauseClip()})};
Slide.prototype.isSubmitted=function(){var a=!0;$.each(this.interactions,function(b,c){a=a&&(c.skipEnabled||c.variables.Status&&"incomplete"!=c.variables.Status&&void 0!=c.variables.Points)});return a};Slide.prototype.isAnswered=function(){var a=!0;$.each(this.interactions,function(b,c){a=a&&(c.m_bAnswered||c.skipEnabled)});return a};Slide.prototype.Viewed=function(){return this.variables.Visited?"true":"false"};
Element.prototype.forceRepaint=function(a){if((!a||player.isMobile)&&this.ref&&"block"==this.ref.css("display"))a=this.ref.get(0),this.ref.hide(),player.uselessOffsetHeight=a.offsetHeight,this.ref.show()};var StageItem=function(a){this.container=a;this.ref=null;this.constructElement();this.dirty=!0;this.destroyed=this.actionMoved=this.actionControlled=!1;this.content={}};StageItem.prototype=new Element;StageItem.prototype.objectType="Item";StageItem.prototype.innerType="Item";var Item=StageItem;StageItem.prototype.isStageItem=!0;
StageItem.prototype.getItemIndex=function(){var a=this,b=0,c=-1;if(this.itemIndex)return this.itemIndex;(this.layer||this.slide).deepEach(function(d,e){e.isStageItem&&"ShuffleGroup"!=e.innerType&&(e==a&&(c=b),b++)},function(a){return"Layer"==a.innerType?!1:!0});return this.itemIndex=c};
StageItem.prototype.getItemByResumeIndex=function(a){var b=0,c=null;(this.layer||this.slide).deepEach(function(d,e){e.isStageItem&&"ShuffleGroup"!=e.innerType&&(b==a&&(c=e),b++)},function(a){return"Layer"==a.innerType?!1:!0});return c};StageItem.FlagProperties={FLAG_STATE:1,FLAG_VARIABLE:2,FLAG_ONSTAGE:4,FLAG_DRAG_DROP:8,FLAG_USE_ANIMATION_FLAG:16,FLAG_DEPTH:32,FLAG_SHUFFLED:64,FLAG_ACTION_MOVED:128,FLAG_ACTION_CONTROLLED:256,FLAG_DISABLED:512,FLAG_REVIEW:1024,FLAG_MOUSE_OVER:2048};
StageItem.FlagTween={FLAG_TWEEN_POSITION:1,FLAG_TWEEN_SCALE:2,FLAG_TWEEN_ROTATION:4,FLAG_TWEEN_ALPHA:8,FLAG_TWEEN_COLOR_TRANSFORMS:16,FLAG_TWEEN_COLOR_MATRIXES:32};
StageItem.prototype.restoreFromResumeData=function(a){var b=StageItem.FlagProperties,a=new bwChunk(a),c=a.NextUBase10(2);if(c&b.FLAG_STATE){var d=a.NextUBase10(2),e="";$.each(this.states,function(a,b){b.index==d&&(e=a)});this.variables.ObjectState=e}c&b.FLAG_ONSTAGE?this.quickShow?this.quickShow():(this.show(),this.visible=!0):"ShuffleGroup"!=this.innerType&&(this.quickHide?this.quickHide():this.hide());if(c&b.FLAG_DRAG_DROP){var f=a.NextUBase10(2);a.NextUBase10(1);if("wordbank"==this.style)this.parent=
this.slide;if((f=this.getItemByResumeIndex(f))&&f.isDropArea)this.dropArea=f}if(c&b.FLAG_DEPTH)f=a.NextUBase10(2),this.ref?this.setZIndex(f):this.depth=f;if(c&b.FLAG_SHUFFLED){this.shuffled=!0;if(this.shuffleGroup)this.shuffleGroup.shuffled=!0;var f=a.NextBase10(2),g=a.NextBase10(2);this.shuffleX=f;this.shuffleY=g}if(c&b.FLAG_DISABLED)this.isDisabled=!0;f=a.Remainder();f=c&b.FLAG_VARIABLE?this.restoreVariableResumeData(a.NextString()):a.NextString();c&b.FLAG_USE_ANIMATION_FLAG&&this.SetAnimationResumeData(f);
if(c&b.FLAG_SHUFFLED&&!this.resumePositioned)this.x=this.shuffleX,this.y=this.shuffleY;if(c&b.FLAG_MOUSE_OVER)this.isMouseOver=!1,this.handleEvent("onrollout",null,null,!1,!1,!1)};
StageItem.prototype.SetAnimationResumeData=function(a){var b=StageItem.FlagTween,a=new bwChunk(a),c=a.Data();if(""!=c){var d=bwChunk.UBaseNto10(c.charAt(0)),c=c.substr(1);this.resumePositioned=!1;if(d&b.FLAG_TWEEN_POSITION){this.resumePositioned=!0;this.x=bwChunk.BaseNto10(c.substr(0,2));this.y=bwChunk.BaseNto10(c.substr(2,2));var e=bwChunk.UBaseNto10(c.substr(4,2));switch(e){case 4094:break;case 4095:this.parent=this.slide;break;default:this.originalParent=this.parent,this.parent=this.getItemByResumeIndex(e)}c=
c.substr(6)}if(d&b.FLAG_TWEEN_SCALE)this.scaleX=bwChunk.BaseNto10(c.substr(0,2))/100,this.scaleY=bwChunk.BaseNto10(c.substr(2,2))/100,c=c.substr(4);if(d&b.FLAG_TWEEN_ROTATION)this.rotation=bwChunk.BaseNto10(c.substr(0,2)),c=c.substr(2);if(d&b.FLAG_TWEEN_ALPHA)this.alpha=bwChunk.UBaseNto10(c.substr(0,2))/100,c.substr(2)}return a.Remainder()};
StageItem.prototype.GetResumeData=function(a){var b=StageItem.FlagProperties,c="",d="";if(this.resume||a){var e=this.shouldStoreVariableResume(),a=this.originalZ&&this.depth!=this.originalZ,f=0,g=this.x,h=this.y,g=this.shuffled&&(g!=this.shuffleX||h!=this.shuffleY)||!this.shuffled&&!isNaN(this.originalX)&&(g!=this.originalX||h!=this.originalY);if(this.variables.ObjectState!=bwUtils.DEFAULT_STATE){var j=(h=this.states[this.variables.ObjectState])?h.index:0;!h&&this.actionstates&&this.actionstateindices&&
(h=this.actionstates[this.variables.ObjectState],j=this.actionstateindices[this.variables.ObjectState]||0);0<=j&&(f+=b.FLAG_STATE,d+=bwChunk.UBase10toN(h.index,2))}e&&(f+=b.FLAG_VARIABLE);this.visible&&(f+=b.FLAG_ONSTAGE);this.dropArea&&(h=this.dropArea.getItemIndex(),j=this.dropArea.getDragItemIndex(this),-1<j&&(f+=b.FLAG_DRAG_DROP,d+=bwChunk.UBase10toN(h,2),d+=bwChunk.UBase10toN(j,1)));a&&(f+=b.FLAG_DEPTH,d+=bwChunk.Base10toN(this.depth,2));this.shuffled&&(f+=b.FLAG_SHUFFLED,d+=bwChunk.Base10toN(this.shuffleX,
2),d+=bwChunk.Base10toN(this.shuffleY,2));this.actionMoved&&(f+=b.FLAG_ACTION_MOVED);this.actionControlled&&(f+=b.FLAG_ACTION_CONTROLLED);this.isDisabled&&(f+=b.FLAG_DISABLED);this.isMouseOver&&(f+=b.FLAG_MOUSE_OVER)}g&&(f+=b.FLAG_USE_ANIMATION_FLAG);c+=bwChunk.UBase10toN(f,2);e&&(b=(new bwChunk(this.getVariableResumeData())).Data(),d+=b);g&&(d+=this.GetAnimationResumeData());return c+d};
StageItem.prototype.GetAnimationResumeData=function(){var a=0,b="",c=this.x,d=this.y;if(this.shuffled&&(c!=this.shuffleX||d!=this.shuffleX)||!this.shuffled&&!isNaN(this.originalX)&&(c!=this.originalX||d!=this.originalY))a+=StageItem.FlagTween.FLAG_TWEEN_POSITION,b+=bwChunk.Base10toN(c,2),b+=bwChunk.Base10toN(d,2),c=4094,this.originalParent&&this.parent!=this.originalParent&&(c="wordbank"==this.style?4094:"Slide"==this.parent.innerType?4095:this.parent.getItemIndex()),b+=bwChunk.UBase10toN(c,2);0<
a&&(b=bwChunk.UBase10toN(a,1)+b);return b=bwChunk.CreateChunk(b)};StageItem.prototype.getExtraResumeVars=function(){return{}};
StageItem.prototype.loadFromXML=function(a,b,c){this.slide=b;this.layer=c;this.children={};this.links={};this.jcanvas=null;this.innerType=this.type=a.tagName;this.id="undefined"===typeof $(a).attr("id")?$(a).attr("name"):$(a).attr("id");this.xml=a;this.loadElementInfoFromXML(a);$(a).find("html5data");this.scrolling="true"==$(a).attr("scrolling");this.shufflelock="true"==$(a).attr("shufflelock");this.usehandcursor="true"==$(a).attr("usehandcursor");this.hasEvents=0!=$(a).find("events").length;this.content.src=
Element.PixelSrc;this.loadContentFromXML(a);this.loadSizeFromXML(a);this.loadAnimationsFromXML(a);this.bitMask=new BitMask(!0,this.width,this.height);this.bitMask.itemID=this.id;if(this.shapemaskid=$(a).attr("shapemaskid"))if(a=this.parseObjref(this.shapemaskid).target,"vectorshape"==a.innerType)a.isShapeMask=!0;if(0<$(this.xml).children("dragdrop").length&&("true"==$(this.xml).children("dragdrop").first().attr("dragenabled")&&this.convertToDragItem(this.xml),"true"==$(this.xml).children("dragdrop").first().attr("dropenabled")&&
this.convertToDropArea(this.xml),"true"==$(this.xml).children("dragdrop").first().attr("dragoverenabled")))this.announceDragOver=!0,this.setupDragOver(this.xml)};StageItem.prototype.setupDragOver=function(){this.announceDragOver=!0;this.parseDragGroupsFromXML=DragItem.prototype.parseDragGroupsFromXML;this.parseDragGroupsFromXML(this.xml)};
StageItem.prototype.loadContentFromXML=function(a){var b=$(a).find("html5data");this.scrolling="true"==$(a).attr("scrolling");this.hasEvents=0!=$(a).find("events").length;switch(this.type){case "audio":this.canSimplify=!1;this.content.src=player.basepath+""+$(a).attr("url");this.content.duration=parseInt($(a).attr("duration"));slide&&slide.clips&&slide.clips.push&&slide.clips.push(this);if(layer&&layer.clips&&layer.clips.push)layer.clips.push(this),this.layered=!0;break;case "vectorshape":case "scrollarea":case "state":case "dragitem":case "droplist":case "droparea":case "button":case "expandinglabel":case "link":this.content.src=
Element.PixelSrc;if(0<$(a).children("textlib").length){this.textlib=$(a).children("textlib");if(!story.textlibs)story.textlibs={};if((b=this.textlib.children("textdata").attr("linkid"))&&0==this.textlib.find("path").length&&0==this.textlib.find("pr").length&&story.textlibs[b])this.textlib=story.textlibs[b];if(b&&(1==this.textlib.find("path").length||1==this.textlib.find("pr").length)&&!story.textlibs[b])story.textlibs[b]=this.textlib}else if(0<$(a).children("data").length)this.textlib=$(a).children("data");
0<$(a).children("imagelib").length&&this.loadImageDataFromXML(a);var b=$(a).children("data").children("vectordata").children("path"),c=$(a).children("data").children("vectordata").children("pr");if(1==b.length||1==c.length){var d=$(a).children("data").children("vectordata");if(null!=$(d).attr("top"))this.originalRectShape=this.rectShape=new ppRect(parseInt($(d).attr("left")),parseInt($(d).attr("top")),parseInt($(d).attr("right")),parseInt($(d).attr("bottom")));this.content.path=1==c.length?PathLib.getPathFromXML(c):
b.text();d.attr("alttext")}this.type="image";break;case "item":this.content.src=Element.PixelSrc;this.textlib=$(a);this.forceDivPattern=!0;this.type="image";break;case "textfield":this.content.src=Element.PixelSrc;if(0<b.length)this.content.src=player.basepath+"mobile/"+b.attr("url");this.textlib=$(a).children("data");break;case "image":this.content.src=$(a).find("imagedata").attr("url");this.content.src=this.content.src?player.basepath+"mobile/"+this.content.src.replace(globals.strContentFolder+
"/","").replace(".swf",".png"):"";if(0<b.length)this.content.src=player.basepath+"mobile/"+b.attr("url");break;case "textinput":this.canSimplify=!1,this.content.src=Element.PixelSrc}if(this.textlib&&this.content.src==Element.PixelSrc&&(b=this.textlib.children("textdata").children("vartext").first().text(),b||(b=this.textlib.children("textdata").attr("lmstext"))&&(b="<span>"+b+"</span>"),b))this.textTemplate=b=b.replace(/size='(.*?)(pt|)'/ig,"style='font-size:$1pt'"),this.textTemplateHeight=parseInt(this.textlib.children("textdata").attr("height")),
this.textTemplateWidth=parseInt(this.textlib.children("textdata").attr("width"));this.loadMaskFromXML(a)};StageItem.prototype.loadMaskFromXML=function(a){a=$(a).children("mask");if(0<a.length){var b=a.children("vectordata");this.vectorMask={xpos:parseInt(a.attr("xpos")),ypos:parseInt(a.attr("ypos")),left:parseInt(b.attr("left")),top:parseInt(b.attr("top")),right:parseInt(b.attr("right")),bottom:parseInt(b.attr("bottom")),path:PathLib.getPathFromXML(b.children("pr"))}}};
StageItem.prototype.loadMaskFromMaskShapeXML=function(){if(this.shapemaskid){var a=this.parseObjref(this.shapemaskid).target;a.isShapeMask=!0;var b=$(a.xml).children("data");if(0<b.length)b=b.children("vectordata"),this.vectorMask={xpos:parseInt($(a.xml).attr("xpos")),ypos:parseInt($(a.xml).attr("ypos")),left:parseInt(b.attr("left")),top:parseInt(b.attr("top")),right:parseInt(b.attr("right")),bottom:parseInt(b.attr("bottom")),path:PathLib.getPathFromXML(b.children("pr"))}}};
StageItem.prototype.loadImageDataFromXML=function(a){var b=this;b.imagelib=new ppImageLib;$(a).children("imagelib").children("imagedata").each(function(a,d){var e=b.imagelib.AddImage($(d).attr("id"),$(d).attr("type"),null,$(d).attr("width"),$(d).attr("height"),$(d).attr("mobiledx"),$(d).attr("mobiledy")),f=$(d).attr("altimage"),g=$(d).attr("url"),f=player.basepath+(f?f:g),g=$(d).attr("mask");b.content.mask=g;b.content.maskref=$(d).attr("maskref");if(-1<f.indexOf(".swf"))f=Element.PixelSrc;b.content.src=
f;g=b.createResource(b.slide,f,function(){b.blocked&&b.ref&&b.render(b.lastRenderedState,!0,null,"resource callback")});g.imgLibID=$(d).attr("id");g.src=f;if(!g.poolImage)g.poolImage=document.createElement("img"),g.poolImage.className="loader";e.imgNode=g.poolImage;e.Width=$(d).attr("width");e.Height=$(d).attr("height")})};
StageItem.prototype.loadSizeFromXML=function(a){var b=$(a).children("data").children("html5data"),c=$(a).children("data").children("vectordata");this.hasImagelib=0<$(a).find("imagelib").length;this.hasTextlib=0<$(a).find("textlib").length;if("audio"!=this.type)0<b.length?(this.xpos=parseInt($(a).attr("xpos")),this.ypos=parseInt($(a).attr("ypos")),this.xoffset=parseInt($(a).attr("xoffset"))||0,this.yoffset=parseInt($(a).attr("yoffset"))||0,this.x=this.xpos,this.y=this.ypos,this.width=parseInt(b.attr("width")),
this.height=parseInt(b.attr("height"))):("video"==this.type?(this.xpos=parseInt($(a).attr("xpos")),this.ypos=parseInt($(a).attr("ypos")),this.x=parseInt($(a).attr("xpos")),this.y=parseInt($(a).attr("ypos"))):(this.xpos=parseInt($(a).attr("xpos")),this.ypos=parseInt($(a).attr("ypos")),this.yoffset=this.xoffset=0,this.x=this.xpos,this.y=this.ypos),this.width=parseInt($(a).attr("width")),this.height=parseInt($(a).attr("height")));if(0<c.length){b=parseInt($(c).attr("right"))-parseInt($(c).attr("left"));
c=parseInt($(c).attr("bottom"))-parseInt($(c).attr("top"));if(b>this.width)this.width=b;if(c>this.height)this.height=c}this.originalX=this.x;this.originalY=this.y;this.originalXOffset=this.xoffset;this.originalyOffset=this.yoffset;this.rotatexpos=Math.round($(a).attr("rotatexpos"))||0;this.rotateypos=Math.round($(a).attr("rotateypos"))||0;this.rotation=parseInt($(a).attr("rotation"))||0;this.xscale=parseInt($(a).attr("xscale"))||0;this.yscale=parseInt($(a).attr("yscale"))||0;this.depth=parseInt($(a).attr("depth"))||
1;if(0==this.depth)this.depth=1;this.originalZ=this.depth;if(this.depth>this.slide.topZ)this.slide.topZ=this.depth};StageItem.prototype.createResource=function(a,b,c){b=new Resource(this,b,function(){c&&c()});if(!a.resources)a=a.slide;a.pushResource(b);this.resources.push(b);return b};
StageItem.prototype.createRef=function(){if(!this.destroyed)if(this.parent.ref||this.parent.createRef(),this.container=this.parent.ref,this.ref)this.render(null,!1,null,"StageItem createRef");else{this.ref=$('<div class="item"></div>');this.ref.addClass(this.type);this.ref.addClass(this.innerType.toLowerCase());this.ref.addClass("item_"+this.id);this.ref.get(0).id=this.getFullObjref();player.showItemInfo&&this.ref.append($('<div class="itemid">'+this.id+"</div>"));this.applySize(this.ref);"dragitem"==
this.innerType&&this.setZIndex(this.depth);this.container.append(this.ref);this.ref.get(0).item=this;"video"!=this.type&&"audio"!=this.type&&this.bindEvents();for(var a in this.children){var b=this.children[a];b.createRef&&b.createRef()}this.initDrag&&(this.initDrag(),this.convertRefToDragItem());("DropArea"==this.innerType||this.isDropArea)&&this.ref.addClass("droparea");this.announceDragOver&&this.ref.addClass("dragover");this.applyMaskRectangle();this.visible=!1;this.nearestScrollAreaAncestor=
this.findAncestorOfType("ScrollArea")}};StageItem.prototype.setInteractive=function(){this.ref.addClass("interactive");this.parent.setInteractive&&this.parent.setInteractive()};StageItem.prototype.setZIndex=function(a){if(!("Layer"==this.innerType||"ExpandingLabel"==this.innerType)){for(var b in this.children){var c=this.children[b];if(c.depth>a)a=c.depth}this.ref.css("z-index",a);this.depth=a;this.parent&&this.parent.setZIndex&&this.parent.setZIndex(a)}};
Element.prototype.updateMatrix=function(){this.matrix.reset();"ScrollArea"==this.innerType&&this.ref&&0!=this.ref.get(0).scrollTop&&this.matrix.translate(0,-this.ref.get(0).scrollTop);"sequencectrl"==this.innerType&&this.ref&&0!=this.ref.get(0).scrollTop&&this.matrix.translate(0,-this.ref.get(0).scrollTop);this.offsetParent&&!this.offsetParent.dragX&&!this.offsetParent.dragY&&(this.slide?this.matrix.translate(this.dragX*this.slide.scale||0,this.dragY*this.slide.scale||0):this.matrix.translate(this.dragX||
0,this.dragY||0));this.offsetParent&&this.offsetParent.matrix&&this.matrix.multiply(this.offsetParent.matrix.copy());this.centerpoint={x:this.rotatexpos-this.xoffset,y:this.rotateypos-this.yoffset};this.matrix.translate(this.x+this.xoffset+this.centerpoint.x,this.y+this.yoffset+this.centerpoint.y);this.matrix.rotateDegrees(this.rotation);this.matrix.translate(-this.centerpoint.x,-this.centerpoint.y);void 0!=this.scale&&this.matrix.scale(this.scale,this.scale);this.isRotated=this.parent&&this.parent.isRotated||
0!=this.rotation};
Element.prototype.applySize=function(a){this.updateMatrix();if(player.showMatrixDebug){if(!player.testCanvas)player.testCanvas=$("<canvas id='test' width='1000' height='1000' style='position:absolute;z-index:200;left:0px;top:0px;'></canvas>"),$("#slideframe").append(player.testCanvas),player.testContext=player.testCanvas.get(0).getContext("2d"),player.testContext.fillStyle="rgba(255,255,0,0.5)",player.testContext.fillStyle="rgba(0,0,0,0.5)",player.testContext.strokeStyle="rgba(0,255,0,0.5)";player.testContext.save();
this.matrix.applyContext(player.testContext);player.testContext.strokeStyle="rgba(0,255,0,0.5)";player.testContext.strokeRect(0,0,this.width,this.height);this.getAABB();player.testContext.restore()}a.css("left",this.x+this.xoffset+"px");a.css("top",this.y+this.yoffset+"px");"Video"!=this.innerType&&(a.css("width",this.width+"px"),a.css("height",this.height+"px"));"Layer"!=this.innerType&&"ExpandingLabel"!=this.innerType&&0<this.depth&&a.css("z-index",this.depth);var b="",c="";0!=this.rotation&&(b+=
" rotate("+this.rotation+"deg)",c+=" rotate("+this.rotation+"deg)");void 0!=this.scale&&(b+=" scale("+this.scale+","+this.scale+") ",c+=" scale("+this.scale+","+this.scale+") ");if(""!=b)a.css("-webkit-transform-origin",this.rotatexpos-this.xoffset+"px "+(this.rotateypos-this.yoffset)+"px"),a.css("-webkit-transform",b),a.css("-moz-transform-origin",this.rotatexpos-this.xoffset+"px "+(this.rotateypos-this.yoffset)+"px"),a.css("-moz-transform",b),a.css("-o-transform-origin",this.rotatexpos-this.xoffset+
"px "+(this.rotateypos-this.yoffset)+"px"),a.css("-o-transform",b),a.css("-ms-transform-origin",this.rotatexpos-this.xoffset+"px "+(this.rotateypos-this.yoffset)+"px"),a.css("-ms-transform",c),this.canSimplify=!1};
StageItem.prototype.bindEvents=function(){var a=this,b=function(b){if(a.isDisabled||swipe.moved)return!1;var c=(b.pageX-a.ref.offset().left+a.xoffset)/player.currentZoom(),f=(b.pageY-a.ref.offset().top+a.yoffset)/player.currentZoom();a.ref.offset();a.ref.offset();swipe.parseEventCoords(b);b=swipe.getSlideCoords(a.slide);return c<a.width&&f<a.height&&a.isPointActive(b.x,b.y)&&!a.isPointObscured(b.x,b.y)?!0:!1},c=!1;a.bindStoryEvent("click touchstart","ondoubleclick",function(a){if(b(a)){if(c)return!0;
c=!0;setTimeout(function(){c=!1},400)}return!1});a.bindStoryEvent("mousedown","onrightrelease",function(a){return 3==a.which});a.shouldBindEvent("onpress")||a.shouldBindEvent("onrelease")};StageItem.prototype.unBindEvents=function(){};StageItem.prototype.reduce=function(){$.each(this.children,function(a,b){b.reduce&&b.reduce()});if(this.canvas)this.canvas.width=1,this.canvas.height=1};
StageItem.prototype.destroyRef=function(){this.destroyed=!0;$.each(this.children,function(a,b){b.destroyRef&&b.destroyRef()});if(this.ref)this.ref.unbind(),this.ref.get(0).item=null,this.ref.get(0).id=null,removeDOMElement(this.ref),this.ref=null,this.destroyComponent("ref"),this.destroyComponent("contentRef"),this.destroyComponent("jcanvas"),this.destroyComponent("canvas"),this.destroyComponent("border"),this.dirty=!0;if(this.xml)this.xml=null;this.unloadResources()};
StageItem.prototype.destroyComponent=function(a){this[a]&&($(this[a]).remove(),this[a]=null)};var removeDOMElement=function(a){a.get&&(a=a.get(0));a.parentNode&&a.parentNode.removeChild(a)};StageItem.prototype.render=function(){if(this.ref)switch(this.innerType){case "swf":this.ref.css("background-color","orange"),player.addToShowQueue(me);case "textfield":case "image":this.content.src!=Element.PixelSrc&&(this.ref.css("background","transparent url("+escape(this.content.src)+") no-repeat"),player.addToShowQueue(me))}};
StageItem.prototype.show=function(a,b){if(!this.destroyed){this.createRef(this.parent.ref);this.loadResources();var c=this;if(this.visible&&!this.dirty)this.reAttachAnimations();else{this.dirty=!1;if(a&&a.isUserInitiated)this.actionControlled=!0;if("audio"!=this.type){"vectorshape"!=this.innerType&&this.applyMask();c.textlib&&c.textTemplate&&c.content.src==Element.PixelSrc&&c.textTemplate&&c.renderTextTemplate();if(b&&(0!=b.duration||"custom"==b.transition)){if(!this.ref)return;this.visible=!0;for(var d in this.children)this.children[d].bParentHidden&&
player.addToShowQueue(this.children[d]);player.addToShowQueue(c);c.handleEvent("ontransitionin",null,null,!1,!0);c.runningTransition=b;c.pendingHide=!1;c.pendingShow=!0;c.transitioning=!1;c.justShowed=!0;setTimeout(function(){c.justShowed=!1},0);d=b.convertToAnimation(c,!0);var e=player;if(a&&"TimelineEvent"==a.type)e=a.parentElement;c.animated=!0;d.start(c.ref,b.reverse,e,function(){c.transitioning=!1;if(c.ref&&c.pendingShow){c.pendingHide=!1;c.pendingShow=!1;for(var a in c.children)c.children[a].bParentHidden&&
(c.children[a].shapemaskid&&c.children[a].renderOnUpdate&&player.addToRenderQueue(c.children[a]),player.addToShowQueue(c.children[a]));player.addToShowQueue(c)}c.handleEvent("ontransitionincomplete",null,null,!1,!0)});c.transitioning=!0}else{if(!this.visible)c.justShowed=!0,setTimeout(function(){c.justShowed=!1},0);c.runningTransition=null;c.pendingHide=!1;c.pendingShow=!1;this.visible=!0;this.shapemaskid&&this.renderOnUpdate&&player.addToRenderQueue(c);this.bShowQueue=!0;player.addToShowQueue(c);
for(d in c.children)c.children[d].bParentHidden&&(c.children[d].shapemaskid&&c.children[d].renderOnUpdate&&player.addToRenderQueue(c.children[d]),player.addToShowQueue(c.children[d]));c.handleEvent("ontransitionin",null,null,!1,!0);c.handleEvent("ontransitionincomplete",null,null,!1,!0)}c.group&&c.group.show(null,null,null,!0)}0<c.events.length&&(!c.ref.data("events")||!c.ref.data("events").mouseup&&!c.ref.data("events").mousedown&&!c.ref.data("events").touchstart&&!c.ref.data("events").touchend)&&
this.bindEvents();this.setOnStage(!0);this.shuffleGroup&&this.shuffleGroup.shuffle()}}};StageItem.prototype.reAttachAnimations=function(){var a=this;$.each(player.currentAnimations,function(b,c){if(c.item.id==a.id)c.item=a,c.start(a.ref,c.reverse,c.timeline,c.endCallback,c.startTime)})};StageItem.prototype.setOnStage=function(a,b){this.setProperty("OnStage",(a&&this.visible).toString(),b);$.each(this.children,function(c,d){d.setOnStage&&d.setOnStage(a,b)})};
StageItem.prototype.quickShow=function(){this.visible=!0;if("audio"!=this.type&&this.slide&&this.slide==player.currentSlide()&&this.ref)player.addToShowQueue(this),this.pendingShow=this.pendingHide=!1;this.setOnStage(!0,!0)};StageItem.prototype.quickHide=function(){this.visible=!1;if("audio"!=this.type&&"ItemGroup"!=this.type&&this.slide&&this.slide==player.currentSlide()&&this.ref)this.ref.hide(),player.removeFromShowQueue(this),this.pendingShow=this.pendingHide=!1;this.setOnStage(!1,!0)};
StageItem.prototype.hide=function(a,b){if(this.visible&&this.ref){var c=this;this.visible=!1;if(a&&a.isUserInitiated)this.actionControlled=!0;if("audio"!=this.type){c.handleEvent("ontransitionout",null,null,!1,!0);if(b&&(0!=b.duration||"custom"==b.transition)){c.runningTransition=b;c.pendingHide=!0;c.pendingShow=!1;c.transitioning=!1;var d=b.convertToAnimation(c,!1),e=player;if(a&&"TimelineEvent"==a.type)e=a.parentElement;c.animated=!0;d.start(c.ref,b.reverse,e,function(){c.transitioning=!1;if(c.ref&&
c.pendingHide){c.pendingHide=!1;c.pendingShow=!1;for(var a in c.children)c.children[a].ref&&c.children[a].ref.hide(),c.children[a].bParentHidden=!0;c.ref.hide();player.removeFromShowQueue(c)}c.handleEvent("ontransitionoutcomplete",null,null,!1,!0)});c.transitioning=!0}else{c.runningTransition=null;c.pendingHide=!1;c.pendingShow=!1;if(this.ref){for(d in this.children)this.children[d].ref&&this.children[d].ref.hide(),this.children[d].bParentHidden=!0;this.ref.hide();player.removeFromShowQueue(this)}c.handleEvent("ontransitionoutcomplete",
null,null,!1,!0)}this.showOnFirstStep=!1;$.each(this.animations,function(a,b){b.showOnFirstStep=!1})}this.setOnStage(!1);this.showOnFirstStep=!1;if(this.animation)this.animation.showOnFirstStep=!1;Animation.endForItem(this)}};
StageItem.prototype.applyMask=function(){if(this.vectorMask){this.vectorMask.m_nXOffset=this.vectorMask.left;this.vectorMask.m_nYOffset=this.vectorMask.top;this.vectorMask.width=this.vectorMask.right-this.vectorMask.left;this.vectorMask.height=this.vectorMask.bottom-this.vectorMask.top;this.vectorMask.rectShape=new ppRect(this.vectorMask.left,this.vectorMask.top,this.vectorMask.right,this.vectorMask.bottom);if(!this.vectorMask.canvas)this.vectorMask.canvas=document.createElement("CANVAS"),this.vectorMask.canvas.width=
this.vectorMask.right-this.vectorMask.left,this.vectorMask.canvas.height=this.vectorMask.bottom-this.vectorMask.top;ppArt.itemID=this.id;ppArt.item=this;ppArt.DrawVector(this.vectorMask,this.vectorMask.path,null,null,null,null,null);var a=this.vectorMask.canvas.toDataURL();this.ref.css("mask-image","url("+a+")");this.ref.css("-webkit-mask-image","url("+a+")");this.ref.css("-moz-mask-image","url("+a+")");this.ref.css("-ms-mask-image","url("+a+")")}};
StageItem.prototype.applyMaskRectangle=function(){if(this.shapemaskid){var a=this.parseObjref(this.shapemaskid).target;this.maskShape=a;1>=Math.abs(a.x)&&1>=Math.abs(a.y)?(this.maskref=$("<div class='item shapemask'></div>"),this.maskref.css("width",a.width),this.maskref.css("height",a.height),this.maskref.css("left",a.x),this.maskref.css("top",a.y),this.maskref.css("z-index",this.depth),this.maskref.show(),this.parent.ref.append(this.maskref),this.maskref.append(this.ref)):(this.maskref=$("<div class='item shapemask'></div>"),
this.maskref.css("width",a.width),this.maskref.css("height",a.height),this.maskref.css("left",a.x),this.maskref.css("top",a.y),this.maskref.css("z-index",this.depth),this.maskref.show(),this.parent.ref.append(this.maskref),this.maskref.append(this.ref),this.maskTranslate="translate3d("+-a.x+"px, "+-a.y+"px, 0px) ",this.maskTranslateIE="translate("+-a.x+"px, "+-a.y+"px) ",this.ref.css("-webkit-transform",this.maskTranslate),this.ref.css("-moz-transform",this.maskTranslate),this.ref.css("-ms-transform",
this.maskTranslateIE));a.isShapeMask=!0;this.setZIndexBase=StageItem.prototype.setZIndex;this.setZIndex=function(a){this.setZIndexBase(a);this.maskref.css("z-index",this.depth)};this.deepEach(function(b,c){c.ancestorMaskShape=a})}};StageItem.prototype.shouldBindEvent=function(a){if(player.showItemInfo)return!0;var b=this,c=!1;$.each(b.events,function(d,e){if(e.trigger==a)c=!0;else{var f=b.parent;f&&f.shouldBindEvent&&!c&&(c=f.shouldBindEvent(a))}});return c};
StageItem.prototype.bindStoryEvent=function(a,b,c){if(this.shouldBindEvent(b)){var d=this;this.ref.bind(a,function(a){"onrelease"==b&&player.updateItemInfo(d);var f,g=function(f,g){$.each(f,function(f,h){if(h.trigger==b&&(!c||"function"!=typeof c||c(a)))h.act(d,!0),g=!1});return g};f=g(d.events,!0);d.group&&d.group.events&&d.group.events.length&&(f=g(d.group.events,f));return f})}};
StageItem.prototype.bindVarListener=function(a,b){if(void 0===b||isNaN(b))b=0;for(var c=this.parseObjref(a).target,c=0;c<this.events.length;c++){var d=this.events[c];if("onvarchanged"==d.trigger&&d.varname==a&&d.boundByItemID==this.id)return d}d=new StoryEvent(this);d.trigger="onvarchanged";d.varname=a;d.boundByItemID=this.id;d.filter=function(b){return b==a};c=new TimelineAction(this);c.type="render_item";c.item=this;d.actions.push(c);this.events.push(d);c=this.parseObjref(a).target;c.registerVariableEventSubscriber(this,
a,b);return d};
StageItem.prototype.renderTextTemplate=function(){function a(b,c){var d=parseInt($(c).attr("data-font-size"));d||(d=parseInt($(c).css("font-size").replace("px","")),$(c).attr("data-font-size",d));d=Math.floor(d*g);$(c).css("font-size",d+"px");$.each($(c).children(),a)}function b(b){for(;f.get(0).clientHeight>c.textTemplateHeight;)g-=b,a(0,f)}var c=this,d=c.textTemplate,d=d.replace(/pt'/ig,"px'"),e=d.match(/\&(.*?);/g);if(e)c.redrawOnVarChange=!0,$.each(e,function(a,b){var e=b.replace(/\&|\$|;/g,""),
f=c.extractVariable(e);if(null===f||"undefined"===typeof f)f="";!isNaN(parseFloat(f))&&isFinite(f)&&(f=Math.round(100*parseFloat(f))/100);d=d.replace(b,f);c.bindVarListener(e)});if(!c.contentRef)c.contentRef=c.ref;c.contentRef.empty();var f=$(d);f.css("font-weight","bold");if(!StageItem.contentSizer)StageItem.contentSizer=$("<div class='contentsizer'></div>"),$(document.body).append(StageItem.contentSizer);StageItem.contentSizer.css("width",c.textTemplateWidth);StageItem.contentSizer.append(f);var g=
1;b(0.05);1>g&&(g+=0.05,a(0,f),b(0.01));c.contentRef.append(f);var e=parseInt((c.width-c.textTemplateWidth)/2)-c.xoffset,h=parseInt((c.height-c.textTemplateHeight)/2)-c.yoffset;c.contentRef.css("width",c.textTemplateWidth+"px");c.contentRef.css("top",c.textTemplateHeight+"px");c.contentRef.css("left",e+"px");c.contentRef.css("top",h+"px");c.contentRef.find("p").first().css("width",c.textTemplateWidth);c.contentRef.find("p").first().css("height",c.textTemplateHeight)};
StageItem.prototype.getBitMask=function(){return this.lastRenderedState&&this.stateMasks&&this.stateMasks[this.lastRenderedState]?this.stateMasks[this.lastRenderedState]:this.bitMask};StageItem.prototype.fixRef=function(){if(!this.isState&&this.ref.get(0).id){var a=$("#"+this.ref.get(0).id);if(a.get(0)&&this.ref.get(0)!=a.get(0))this.ref=a}};
StageItem.prototype.getAABB=function(){var a=this,b=5E3,c=5E3,d=-5E3,e=-5E3;$.each([[0,0],[this.width,0],[this.width,this.height],[0,this.height]],function(f,g){var h=a.matrix.transformPoint(g[0]-a.xoffset,g[1]-a.yoffset),j=h.x,h=h.y;j<b&&(b=j);j>d&&(d=j);h<c&&(c=h);h>e&&(e=h)});player.showDebugOverlap&&player.testContext&&setTimeout(function(){player.testContext.strokeStyle="rgba(0,0,255,0.5)";player.testContext.strokeRect(b,c,d-b,e-c)},0);return new ppRect(b,c,d,e)};
StageItem.prototype.GetBoundingRect=StageItem.prototype.getAABB;
StageItem.prototype.getAABB_simple=function(){if(0==this.rotation){var a={};a.left=this.x+this.dragX;a.top=this.y+this.dragY;a.right=this.x+this.dragX+this.width;a.bottom=this.y+this.dragY+this.height;return a}var a={left:5E3,top:5E3,right:-5E3,bottom:-5E3},b=[[-this.width/2,-this.height/2],[this.width/2,-this.height/2],[this.width/2,this.height/2],[-this.width/2,this.height/2]],c=Math.cos(this.rotation*Math.PI/180),d=Math.sin(this.rotation*Math.PI/180);$.each(b,function(b,f){x=-f[0]*c+f[1]*d;y=f[0]*
d-f[1]*c;if(x<a.left)a.left=x;if(x>a.right)a.right=x;if(y<a.top)a.top=y;if(y>a.bottom)a.bottom=y});a.left+=this.x+this.dragX+this.rotatexpos;a.top+=this.y+this.dragY+this.rotateypos;a.right+=this.x+this.dragX+this.rotatexpos;a.bottom+=this.y+this.dragY+this.rotateypos;player.showDebugOverlap&&player.testContext&&setTimeout(function(){player.testContext.strokeStyle="rgba(0,0,255,0.5)";player.testContext.strokeRect(a.left,a.top,a.right-a.left,a.bottom-a.top)},0);return a};
StageItem.prototype.testRotatedOverlap=function(a){var b=this.getAABB(),c=a.getAABB(),d,e,f,g;d=BitMask.max(b.left,c.left);e=BitMask.min(b.right,c.right);f=BitMask.max(b.top,c.top);g=BitMask.min(b.bottom,c.bottom);if(b.right<c.left||b.left>c.right||b.bottom<c.top||b.top>c.bottom)return!1;if(player.showDebugOverlap){if(!player.testCanvas)player.testCanvas=$("<canvas id='test' width='1000' height='1000' style='position:absolute;z-index:200;left:0px;top:0px;'></canvas>"),$("#slideframe").append(player.testCanvas),
player.testContext=player.testCanvas.get(0).getContext("2d"),player.testContext.fillStyle="rgba(255,255,0,0.5)";player.testCanvas.show();clearTimeout(player.testCanvasClear);player.testCanvasClear=setTimeout(function(){player.testCanvas.hide()},1E3);if(!player.showDebugOverlapPersistent)player.testContext.clearRect(0,0,1E3,1E3),player.testContext.fillStyle="rgba(0,255,255,0.2)",player.testContext.fillRect(b.left,b.top,b.right-b.left,b.bottom-b.top),player.testContext.fillStyle="rgba(0,0,255,0.2)",
player.testContext.fillRect(c.left,c.top,c.right-c.left,c.bottom-c.top),player.testContext.strokeStyle="rgba(255,0,255,0.8)",player.testContext.strokeRect(d,f,e-d,g-f)}b=e-d;g=b*(g-f);for(c=0;c<g;c+=64){e=d+c%b;var h=f+Math.floor(c/b);if(player.showDebugOverlap)this.isPointActive(e,h)?a.isPointActive(e,h)?a.isPointObscured(e,h,this,function(a){return a.dropArea})?(player.testContext.fillStyle="rgba(255,0,0,0.9)",player.testContext.fillRect(e-1,h-1,2,2)):(player.testContext.fillStyle="rgba(0,255,0,0.9)",
player.testContext.fillRect(e-2,h-2,4,4)):(player.testContext.fillStyle="rgba(255,255,0,0.9)",player.testContext.fillRect(e-1,h-1,2,2)):(player.testContext.fillStyle=a.isPointActive(e,h)?"rgba(0,0,0,0.5)":"rgba(100,100,100,0.2)",player.testContext.fillRect(e-1,h-1,2,2));if(this.isPointActive(e,h)&&a.isPointActive(e,h)&&!a.isPointObscured(e,h,this,function(a){return a.dropArea}))return!0}return!1};var Layer=function(a,b){this.container=a||$(document.body);this.ref=null;this.constructElement();this.timelineEvents=[];this.clips=[];this.currentIndex=this.currentTime=0;this.duration=10;this.active=!0;this.slide=b;this.layer=null;this.offsetParent=this.parent=b;this.paused=this.viewed=!1};Layer.prototype=new StageItem;Layer.prototype.objectType="Layer";Layer.prototype.innerType="Layer";
Layer.prototype.getItemIndex=function(){var a=this,b=0,c=-1;if(this.itemIndex)return this.itemIndex;$.each(this.slide.children,function(d,e){"Layer"==e.innerType&&(e==a&&(c=b),b++)});return this.itemIndex=c};
Layer.prototype.restoreFromResumeData=function(a){this.compactResumeData=a;var b=[];this.deepEach(function(a,c){c.resume&&"ShuffleGroup"!=c.innerType&&b.push(c)});a=(new bwChunk(a)).NextChunk();this.currentTime=bwChunk.BaseNto10(a.Data(),a.Length());for(var a=a.NextChunk(),a=new bwChunk(a.Data()),c=0;!a.isNothing;){var d=b[c];d&&d.restoreFromResumeData(a.ChunkData());a=a.NextChunk();c++}};
Layer.prototype.getResumeData=function(){var a="";if(this.resume&&this.viewed){var b="",c="";this.deepEach(function(a,c){c.resume&&"ShuffleGroup"!=c.innerType&&(b+=bwChunk.CreateChunk(c.GetResumeData()))});this.clips.forEach(function(a){"audio"==a.innerType&&(c+=bwChunk.CreateChunk(a.GetResumeData()))});var a=a+bwChunk.EMPTY_CHUNK,d=bwChunk.Base10toN(this.currentTime),a=a+bwChunk.CreateChunk(d),a=a+bwChunk.CreateChunk(b),a=a+bwChunk.EMPTY_CHUNK,a=a+bwChunk.EMPTY_CHUNK,a=a+bwChunk.CreateChunk(c)}return a};
Layer.prototype.toBaseData=Element.prototype.toData;Layer.prototype.toData=function(){var a=this.toBaseData();a.currentTime=this.currentTime;return a};Layer.prototype.updateBaseFromData=Element.prototype.updateFromData;Layer.prototype.updateFromData=function(a){this.updateBaseFromData(a);this.currentTime=a.currentTime};
Layer.prototype.loadFromXML=function(a){var b=this;this.id=$(a).attr("id");this.modal="true"==$(a).attr("modal");this.resume="true"==$(a).attr("resume");this.pauseparent="true"==$(a).attr("pauseparent");this.depth=parseInt($(a).attr("depth"));this.loadChildrenFromXML(a,b.slide,b,function(a){a.canSimplify=!1});$(a).children("audiolib").children("audio").each(function(a,d){var e=new Audio;e.loadFromXML(d,b.slide,b);e.createRef();b.children[e.id]=e});$(a).find("timeline").each(function(a,d){b.duration=
parseInt($(d).attr("duration"));$(d).find("event").each(function(a,c){var d=new TimelineEvent(b);d.loadFromXML(c);b.timelineEvents.push(d)})});$(a).children("background").each(function(a,d){b.background=new Background(b.ref);b.background.loadFromXML(d);if(!b.background.src)b.backgroundReady=!0;b.ref&&b.background.apply(b.ref)});this.loadElementInfoFromXML(a);this.loadAnimationsFromXML(a);this.depth=++this.slide.topZ;this.type="layer"};Layer.prototype.resetBase=Element.prototype.reset;
Layer.prototype.reset=function(a){if(this.resume)player.useCompactResume&&this.compactResumeData?this.restoreFromResumeData(this.compactResumeData):this.resumeData&&this.updateFromData(this.resumeData);else{this.resetBase();if(!a)this.visible=!1,this.ref&&this.ref.hide();$.each(this.children,function(a,c){c.hide&&c.hide()})}};Layer.prototype.createBaseRef=StageItem.prototype.createRef;Layer.prototype.destroyBaseRef=StageItem.prototype.destroyRef;
Layer.prototype.createRef=function(){this.ref||(this.createBaseRef(),this.ref.removeClass("item"),this.ref.addClass("layer"),this.background&&this.background.apply(this.ref),this.ref.css("display","none"))};
Layer.prototype.show=function(a,b,c){this.createRef(this.parent.ref);var d=this;$(".currentlayer").removeClass("currentlayer");this.ref.addClass("currentlayer");this.viewed=!0;var e=this.ref,f=function(){b&&"function"===typeof b&&b()},g=this.visible;if(a&&0!=a.duration){if(e.css("display","block"),a.setTarget(this),!g)d.transitioning=!0,a.apply(function(){d.transitioning=!1;g||(d.handleEvent("ontransitionincomplete",null,null,!1,!0),f())},null,null,"ease-out",c),d.handleEvent("ontransitionin",null,
null,!1,!0),d.setOnStage(!0)}else d.runningTransition=null,e.css("display","block"),g||(d.handleEvent("ontransitionin",null,null,!1,!0),d.handleEvent("ontransitionincomplete",null,null,!1,!0),d.setOnStage(!0));this.pauseparent&&this.slide==player.currentSlide()&&player.pause(!0);player.modalLayer=null;if(this.modal){if(!this.modalfence)this.modalfence=$("<div class='modalfence'></div>"),this.parent.ref.append(this.modalfence),this.modalfence.bind("click",function(){return!1});player.modalLayer=d;
this.modalfence.show()}c=d.slide.topMostLayer();c!=d&&c.handleEvent("endtopmostlayer");util.popArrayElement(this.slide.layerStack,this);this.slide.layerStack.push(this);this.handleEvent("ontopmostlayer");this.depth=this.slide.topZ+1;this.slide.topZ=this.depth;if(g&&this.resume)this.ref.css("display","block");else{if(!g)this.currentIndex=this.currentTime=0;if(this.resume&&this.compactResumeData&&(this.restoreFromResumeData(this.compactResumeData),player.activeTimeline==this))player.activeTimeline.currentTime=
this.currentTime;this.visible=!0;this.paused=!1;(!a||0==a.duration)&&f()}};Layer.prototype.emptyLayer=function(){this.timelineEvents=[]};
Layer.prototype.hide=function(a){if(this.visible){this.visible=!1;player.modalLayer=null;var b=this,c=function(){b.ref.css("display","none");b.handleEvent("ontransitionoutcomplete",null,null,!1,!0);$.each(b.clips,function(a,b){b.pauseClip()});b.modalfence&&b.modalfence.hide();b.destroyWebobjects();b.resume?b.compactResumeData=b.getResumeData():b.reset();b.slide.topMostLayer()==b&&b.handleEvent("endtopmostlayer");util.popArrayElement(b.slide.layerStack,b);0<b.slide.layerStack.length?b.slide.layerStack[b.slide.layerStack.length-
1].handleEvent("ontopmostlayer"):(b.slide.handleEvent("ontopmostlayer"),player.activeTimeline=player);b.setOnStage(!1);b.pauseparent&&"Layer"!=player.activeTimeline.innerType&&player.play(!0,!0,!1)};b.handleEvent("ontransitionout",null,null,!1,!0);a&&0!=a.duration?(a.setTarget(this),a.apply(function(){c()},null,null,"ease-out")):(b.runningTransition=null,c())}};Layer.prototype.destroyWebobjects=function(){$.each(this.children,function(a,b){b.destroyWebobjects&&b.destroyWebobjects()})};
Layer.prototype.play=function(){this.paused=!1;$(".controlbar-button").find(".play").hide();$(".controlbar-button").find(".pause").show()};Layer.prototype.pause=function(){this.paused=!0;$.each(this.clips,function(a,b){if(b.ref&&player.currentClipSyncToTimeline&&(b.pauseClip(),player.scheduledMediaSrc==b.content.src))clearTimeout(player.mediaTimeout),player.scheduledMediaSrc=null});$(".controlbar-button").find(".play").show();$(".controlbar-button").find(".pause").hide()};
Layer.prototype.update=function(){if(!(this.currentTime>parseInt(this.duration)+100)){if(ProgressBar.getCurrentProgressBar().dragging&&player.currentClip)player.currentClip.currentTime=(player.activeTimeline.currentTime-player.currentClipStartTime)/1E3;if(player.activeTimeline==this)ProgressBar.getCurrentProgressBar().index=player.activeTimeline.currentTime,ProgressBar.getCurrentProgressBar().count=player.activeTimeline.duration,ProgressBar.getCurrentProgressBar().update(),this.paused?($(".controlbar-button").find(".play").show(),
$(".controlbar-button").find(".pause").hide()):($(".controlbar-button").find(".play").hide(),$(".controlbar-button").find(".pause").show());var a=null;$.each(this.clips,function(b,c){c.getIsPlaying()&&(a=c)});if(a)this.currentTime=parseInt(1E3*a.getCurrentTime()+player.currentClipStartTime);for(player.layerPlaying=!0;0<this.currentIndex&&this.timelineEvents[this.currentIndex-1].time>this.currentTime;)this.currentIndex--,this.timelineEvents[this.currentIndex].revert(this.currentTime);for(;this.currentIndex<
this.timelineEvents.length&&this.timelineEvents[this.currentIndex].time<=this.currentTime&&player.layerPlaying;)this.timelineEvents[this.currentIndex].act(),this.currentIndex++;if(this.currentTime>=this.duration)this.handleEvent("ontimelinecomplete",null,null,!1,!0),player.currentTime>=player.currentSlide().duration&&this.handleEvent("onallopentimelinescomplete"),player.layerPlaying=!1}};var SlideFrame=function(a,b,c){this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.constructElement();this.active=!0;this.visible=!1};SlideFrame.prototype=new StageItem;SlideFrame.prototype.innerType="SlideFrame";SlideFrame.prototype.objectType="Item";
SlideFrame.prototype.loadFromXML=function(a){var b=this;this.id=$(a).attr("id");this.resume=$(a).attr("resume");this.shapemaskid=$(a).attr("shapemaskid");this.xscale=parseInt($(a).attr("xscale"));this.yscale=parseInt($(a).attr("yscale"));this.alpha=parseInt($(a).attr("alpha"));this.scrolling=$(a).attr("scrolling");this.startingslide=$(a).attr("startingslide");this.scalecontents="true"==$(a).attr("scalecontents");this.xml=a;this.loadElementInfoFromXML(a);this.loadSizeFromXML(a);this.loadAnimationsFromXML(a);
if(this.shapemaskid=$(a).attr("shapemaskid"))if(a=this.parseObjref(this.shapemaskid).target,"vectorshape"==a.innerType)a.isShapeMask=!0;$(b.xml).children("background").each(function(a,d){b.background=new Background(b.ref);b.background.loadFromXML(d)});this.canSimplify=!1};SlideFrame.prototype.createBaseRef=StageItem.prototype.createRef;SlideFrame.prototype.destroyBaseRef=StageItem.prototype.destroyRef;SlideFrame.prototype.createRef=function(){this.ref||(this.createBaseRef(),this.background&&this.background.apply(this.ref))};
SlideFrame.prototype.destroyRef=function(){this.destroyBaseRef()};SlideFrame.prototype.pauseMyFramedSlides=function(){var a=this;$.each(player.framedSlides,function(b,c){c==a.framedSlide&&c.pauseClips()})};SlideFrame.prototype.pauseOtherFramedSlides=function(){var a=this;$.each(player.framedSlides,function(b,c){c!=a.framedSlide&&c.pauseClips()})};
SlideFrame.prototype.showSlide=function(a){var b=this;this.framedSlide=a;player.updateViewCount(a);player.framedSlides[a.id]=a;a.loadContentFromXML();a.offsetParent=b;a.blockAndLoad(function(){a.restorePlayerControls();player.hideLoadingSpinner();player.shouldShowLoadingSpinner=!1;clearTimeout(player.loadingSpinnerTimeout);a.width<b.width&&a.ref.css("left",parseInt(b.width-a.width)/2);a.height<b.height&&a.ref.css("top",parseInt(b.height-a.height)/2);a.createRef();a.ref.hide();b.ref.append(a.ref);
setTimeout(function(){if(a.ref){a.ref.show();a.play(!1,!1,a!=player.currentFramedSlide);a.deferredFrameLayoutXML&&a.set_frame_layout(a.deferredFrameLayoutXML);var c;player.neverPreload||setTimeout(function(){a.slideIndex+1<story.allSlides.length&&story.allSlides[a.slideIndex+1].loadContentFromXML()},1E3);a.variables.WindowId=b.slide.variables.WindowId}},0);a.ref.addClass("framed");a.updateMatrixComplete(!0);b.children={};b.children[a.id]=a;a.framedSlides[a.id]=a;a.visible=!0;a.framed=!0;player.slideLoadQueue.restart()})};
SlideFrame.prototype.showBase=StageItem.prototype.show;
SlideFrame.prototype.show=function(a,b,c){if(!this.visible){this.showBase(a,null,c);this.ref.show();a=story.parseObjref(this.startingslide).target;c||this.showSlide(a);this.framedSlide=a;player.currentFramedSlide=a;a.ref&&a.fitToContainer();a.currentTime=0;if(player.hasShownFirstSlide)player.hasAdvanced=!0;player.hasShownFirstSlide=!0;setTimeout(function(){player.currentSlide().saveIfNecessary();story.saveToLocalStorage()},0);a.transitionedIn=!1;a.visible=!0;a.handleTransitionIn()}};
SlideFrame.prototype.hideBase=SlideFrame.prototype.hide;SlideFrame.prototype.hide=function(a,b){this.hideBase(a,b);this.pauseMyFramedSlides();this.framedSlide&&(this.framedSlide.hide(),this.framedSlide.unloadContent())};
SlideFrame.prototype.emptyElement=function(){this.events=[];this.actionGroups={};this.content={};this.states={};this.colors={};this.resources=[];this.eventSubscribers=[];this.hotContexts=[];this.matrix=new MatrixTransform;this.isRotated=!1;this.parent=null;this.originalYOffset=this.originalXOffset=this.originalHeight=this.originalWidth=this.originalZ=this.originalY=this.originalX=this.rotation=this.yoffset=this.xoffset=this.rotateypos=this.rotatexpos=this.dragY=this.dragX=this.y=this.x=0;this.animated=
!1;this.stateCount=0;this.xml=null};var VectorShape=function(a){this.container=a||$(document.body);this.ref=null;this.constructElement();this.currentIndex=0;this.content={};this.colors={};this.type="vectorshape";this.active=!0;this.id=Math.random();this.name="item";this.visible=this.layered=!1;this.canSimplify=!0;this.hasEvents=!1;this.xml="";this.deferredResourceIndex=0;this.lastRenderedState="none";this.canvas=null;this.m_nYOffset=this.m_nXOffset=0;this.height=this.width=1E3;this.maxCharIndex=this.charIndex=0;this.vectorImage=null;
this.isShapeMask=this.vectorHot=!1};VectorShape.prototype=new StageItem;VectorShape.prototype.objectType="Item";VectorShape.prototype.innerType="vectorshape";VectorShape.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;
VectorShape.prototype.loadFromXML=function(a,b,c){var d=this;this.loadBaseFromXML(a,b,c);this.yoffset=this.xoffset=0;this.originalWidth=parseInt($(a).attr("width"));this.originalHeight=parseInt($(a).attr("height"));this.originalX=this.x;this.originalY=this.y;if(0<$(a).children("data").children("textdata").children("vartext").length)this.textlib=$(a).children("data");this.canSimplify=!1;this.maskpath=PathLib.getPathFromXML($(a).children("mask").children("vectordata").children("pr"));$(a).children("states").children().each(function(a,
b){var c=$(b).attr("name"),h=$(b).children("data").children("vectordata"),j={left:h.attr("left"),top:h.attr("top"),right:h.attr("right"),bottom:h.attr("bottom"),path:PathLib.getPathFromXML(h.children("pr")),index:a};if(!j.path||""==j.path)j.path=h.children("path").text();d.states[c]=j;d.stateCount++});this.loadLinksFromXML(a);this.loadMarkerEffectFromXML(a)};
VectorShape.prototype.loadLinksFromXML=function(a){var b=this;$(a).children("textlib").children("textdata").each(function(a,d){var e=$(d).attr("id");$(d).children("linkdata").children("link").each(function(a,c){var d=new LinkArea(b.ref,b.slide,b.layer,e);d.parent=b;d.loadFromXML(c,b.slide,b.layer);b.links[a+"_"+d.id]=d;b.hasLinks=!0})});if(b.hasLinks)b.isPointActive=StageItem.prototype.isPointActive};
VectorShape.prototype.loadMarkerEffectFromXML=function(a){var b=this;$(a).children("imagelib").children("imagedata").each(function(a,d){var e=$(d).attr("url"),f=parseInt($(d).attr("width")),g=parseInt($(d).attr("height"));if(-1<e.indexOf("_swirl.swf"))b.markerEffect={type:"swirl",width:f,height:g};else if(-1<e.indexOf("_glow.swf"))b.markerEffect={type:"glow",width:f,height:g}})};VectorShape.prototype.createBaseRef=StageItem.prototype.createRef;VectorShape.prototype.destroyBaseRef=StageItem.prototype.destroyRef;
VectorShape.prototype.createRef=function(){if(!this.ref){var a=this;this.createBaseRef();if(!this.contentRef)this.contentRef=$('<div class="item unhideable vartext"></div>');this.ref.append(this.contentRef);this.ref.css("width",a.originalWidth);this.ref.css("height",a.originalHeight);var b=$(a.xml).find("textdata").first().attr("valign");b&&a.contentRef.addClass("v"+b);this.markerEffect&&this.createMarkerEffectRef();b=$('<canvas class="content" width="'+a.originalWidth+'" height="'+a.originalHeight+
'"></canvas>');if(player.useBackgroundCanvasWorkaround)this.imageBufferName="b"+this.getFullObjref().replace(/[^0-9a-zA-Z]+/g,""),b=$('<div class="content" width="'+a.originalWidth+'" height="'+a.originalHeight+'"></div>'),b.css("width",a.originalWidth),b.css("height",a.originalHeight),b.css("background","-webkit-canvas("+this.imageBufferName+")");b.css("position","absolute");b.css("-webkit-transform","translate3d(0px,0px, 0px)");this.ref.append(b);this.jcanvas=b;this.canvas=b.get(0);this.context=
player.useBackgroundCanvasWorkaround?document.getCSSCanvasContext("2d",this.imageBufferName,a.originalWidth,a.originalHeight):this.canvas.getContext("2d");if(window.chrome&&!player.suppressVectorImage)this.vectorImage=document.createElement("img"),this.vectorImage.style.webkitTransform="translate3d(0px,0px, 0px)",this.vectorImage.style.position="absolute",this.ref.append(a.vectorImage);if(this.renderAsBackground)this.altRef=$('<div class="item unhideable alternate"></div>'),this.altRef.css("width",
a.originalWidth),this.altRef.css("height",a.originalHeight),this.ref.append(this.altRef);this.lastRenderedState=null;this.render(a.variables.ObjectState,!0,null,"VectorShape createRef");player.showLinkAreas&&$.each(a.links,function(b,d){d.createRef(a)});a.isShapeMask&&a.ref.remove()}};
VectorShape.prototype.createMarkerEffectRef=function(){this.markerEffectRef=$('<canvas class="markereffect" width="'+this.markerEffect.width+'" height="'+this.markerEffect.height+'"></canvas>');this.markerEffectRef.css("position","absolute");var a=this.markerEffectRef.get(0).getContext("2d"),b=this.markerEffect.width/2;switch(this.markerEffect.type){case "swirl":this.markerEffectRef.addClass("spinning");a.moveTo(b,b);a.arc(b,1.1*b,0.87*b,3*Math.PI/2,2*Math.PI,!1);a.lineTo(b,1.4*b);a.closePath();b=
a.createLinearGradient(0,0,0,this.markerEffect.height);b.addColorStop(0,"rgba(255,255,255,0)");b.addColorStop(0.5,"rgba(255,255,255,1)");b.addColorStop(1,"rgba(255,255,255,1)");a.fillStyle=b;a.fill();break;case "glow":this.markerEffectRef.addClass("pulsing"),b=a.createRadialGradient(b,b,0,b,b,b),b.addColorStop(0,"rgba(255, 255, 255, 1)"),b.addColorStop(0.5,"rgba(255, 255, 255, 1)"),b.addColorStop(1,"rgba(255, 255, 255, 0)"),a.fillStyle=b,a.fillRect(0,0,this.markerEffect.width,this.markerEffect.width)}this.ref.append(this.markerEffectRef);
this.updateMarkerEffectPosition()};VectorShape.prototype.updateMarkerEffectPosition=function(){if(this.markerEffect){var a=-(this.markerEffect.height-this.height)/2;this.markerEffectRef.css("left",-(this.markerEffect.width-this.width)/2);this.markerEffectRef.css("top",a)}};
VectorShape.prototype.destroyRef=function(){this.destroyBaseRef();if(this.canvas)$(this.canvas).remove(),this.canvas=null;if(null!=this.vectorImage)this.vectorImage.parentNode&&this.vectorImage.parentNode.removeChild(this.vectorImage),this.vectorImage.src="",this.vectorImage=null;if(this.contentRef)this.contentRef.remove(),this.contentRef=null;this.bitMask=this.lastRenderedState=null;this.stateMasks={}};VectorShape.prototype.renderCallback=function(){};
StageItem.prototype.getMask=function(){var a={path:"",offX:0,offY:0,transform:null,type:""};if(this.maskpath)a.path=this.maskpath,a.type="maskpath";else if(this.shapemaskid){var b=this.parseObjref(this.shapemaskid).target;a.path=b.content.path;a.transform=b.currentTransform;a.type="shapemask";a.item=b}return a};
VectorShape.prototype.render=function(a,b,c,d,e,f,g){null==a&&(a="_default");if(this.ref&&(b||a!=this.lastRenderedState||this.maskanimation)){if(!a)a=this.lastRenderedState;this.allResourcesLoaded()?(this.renderOnUpdateValues={},this.renderOnUpdateValues.closePathCallback=c,this.renderOnUpdateValues.debugFrom=d,this.renderOnUpdateValues.deferred=e,this.renderOnUpdateValues.strLinkId=f,this.renderOnUpdateValues.bDoRender=!0,this.renderOnUpdateValues.state=a,this.renderScheduled=!0,g?this.renderOnUpdate():
player.addToRenderQueue(this)):this.blocked=!0}};
VectorShape.prototype.renderOnUpdate=function(){var a=this.renderOnUpdateValues.state,b=this.renderOnUpdateValues.strLinkId;this.renderScheduled=this.renderOnUpdateValues.bDoRender=!1;this.lastRenderedState=a;if(this.ref&&!this.destroyed){var c=this;if(c.allResourcesLoaded()){c.blocked=!1;if(!c.canvas)c.canvas=$(this.ref).find("canvas").get(0);if(player.useSafeCanvas)this.canvas.getContext("2d"),this.ref.css("background-color","#"+parseInt(900*Math.random()+1100)%1E3);else{c.m_nXOffset=c.xoffset;
c.m_nYOffset=c.yoffset;c.width=c.width;c.height=c.height;var d=new ppTextLib(c.xml),e=c.content.path;if(c.states[a])e=c.states[a].path,c.rectShape=new ppRect(c.states[a].left,c.states[a].top,c.states[a].right,c.states[a].bottom);else if(this.originalRectShape)this.rectShape=this.originalRectShape;if(c.rectShape&&0==c.rectShape.right&&0==c.rectShape.bottom)c.rectShape.right=c.width,c.rectShape.bottom=c.height;if(e){var f=c.getMask(),g=f.path,h=this.context=player.useBackgroundCanvasWorkaround?document.getCSSCanvasContext("2d",
this.imageBufferName,c.originalWidth,c.originalHeight):this.canvas.getContext("2d"),j=null;if(g&&"shapemask"==f.type)this.maskanimation=!0,f.item.registerVariableEventSubscriber(c,"animationstep");g&&(j=function(a){h.setTransform(1,0,0,1,0,0);f.item&&(f.item.m_nXOffset!=a.offX||f.item.m_nYOffset!=a.offY)&&h.translate(f.item.m_nXOffset-a.offX,f.item.m_nYOffset-a.offY);if(null!=f.transform&&null!=f.transform.scale&&!isNaN(f.transform.scale.x)){if(0==f.transform.scale.y)f.transform.scale.y=1.0E-6;if(0==
f.transform.scale.x)f.transform.scale.x=1.0E-6;h.scale(f.transform.scale.x/100,f.transform.scale.y/100)}ppMask.DrawPath(h,c.rectShape,g,f.offX,f.offY);h.closePath();h.clip();h.setTransform(1,0,0,1,0,0);if(player.drawMaskDebugShapes){if(!c.debugMaskContext)a=$('<canvas class="content" width="'+c.width+'" height="'+c.height+'" style="border:solid 1px #000;margin:5px;"></canvas><textarea>'+g+"</textarea>"),$(document.body).append(a),c.debugMaskContext=a.get(0).getContext("2d");c.debugMaskContext.fillStyle=
"#ccc";c.debugMaskContext.strokeStyle="#000";c.debugMaskContext.clearRect(0,0,1E3,1E3);c.debugMaskContext.fillRect(0,0,1E3,1E3);c.debugMaskContext.fillStyle="#000";c.debugMaskContext.beginPath();ppMask.DrawPath(c.debugMaskContext,c.rectShape,g,f.offX,f.offY);c.debugMaskContext.fill();c.debugMaskContext.fillStyle="#66f";c.debugMaskContext.font="10px sans-serif";c.debugMaskContext.fillText(c.getFullObjref(),0,20)}});var k=new Date;ppArt.itemID=c.id;ppArt.item=c;ppArt.m_bMaskMode=!1;ppArt.DrawVector(c,
e,d,player.fontlib,c.imagelib,b,j);if(this.overStepped)c.height=c.requiredRenderHeight,c.rectShape.bottom=c.height,ppArt.DrawVector(c,e,d,player.fontlib,c.imagelib,b,j);ppArt.m_bRenderOnSlideBg&&c.slide&&c.slide.renderBgLoadStack.push(c);if(null!=c.vectorImage)try{var l=c.canvas.toDataURL("image/png");c.canvas.style.visibility="hidden";c.vectorImage.src=l}catch(m){c.canvas.style.visibility="visible",c.vectorImage.style.visibility="hidden"}if(player.drawMaskDebugShapes&&c.debugMaskContext){if(!c.debugCopyContext)b=
$('<canvas class="content" width="'+c.width+'" height="'+c.height+'" style="border:solid 1px #000;margin:5px;"></canvas>'),$(document.body).append(b),c.debugCopyContext=b.get(0).getContext("2d");c.debugCopyContext.fillStyle="#ccc";c.debugCopyContext.fillRect(0,0,1E3,1E3);c.debugCopyContext.drawImage(c.canvas,0,0,c.width,c.height,0,0,c.width,c.height)}for(var n in c.links)c.links[n].linkdx=ppArt.m_listTextOffsets[c.links[n].textid].x,c.links[n].linkdy=ppArt.m_listTextOffsets[c.links[n].textid].y;if(c.m_nXOffset!=
c.xoffset||c.m_nYOffset!=c.yoffset)c.xoffset=c.m_nXOffset,c.yoffset=c.m_nYOffset,c.applySize(c.ref),this.updateMarkerEffectPosition&&c.updateMarkerEffectPosition();parseInt(new Date-k);if(a&&!c.stateMasks)c.stateMasks={};k=function(){if(player.usePixelTesting)return new BitMask(!0,c.width,c.height);var a=new BitMask(!1,c.width,c.height,c.imageWidth||c.width,c.imageHeight||c.height);if(!c.content.mask&&c.content.maskref)c.content.mask=player.bitmasks[c.content.maskref];if(c.content.mask)a.loadFromRLE(c.content.mask),
a.pixels&&!a.isOpaque&&(c.width!=$(c.canvas).attr("width")||c.height!=$(c.canvas).attr("height"))&&a.resize($(c.canvas).attr("width"),$(c.canvas).attr("height"),-c.xoffset,-c.yoffset);else if(-1<c.content.src.indexOf(".jpg"))a.isOpaque=!0;else if(player.isLocalFileSystem&&c.imagelib)a.isOpaque=!0;else if(c.hasLinks)a.isOpaque=!0;else{a=new BitMask(!1,$(c.canvas).attr("width"),$(c.canvas).attr("height"));if(!c.context)c.context=c.canvas.getContext("2d");try{a.loadFromContext(c.context)}catch(b){a.isOpaque=
!0}}return a};if(a&&!c.stateMasks[a])c.stateMasks[a]=k();else if(!c.bitMask||c.bitMask.isOpaque)c.bitMask=k()}c.renderForeground&&c.renderForeground();c.updateDragPosition&&c.dragging&&c.updateDragPosition()}}else c.blocked=!0}};
VectorShape.prototype.renderForeground=function(){if(this.textlib){this.ref.addClass("textlib");var a=this.textlib.children("textdata").children("vartext").first().text();!a&&this.textlib.children("textdata").attr("lmstext")&&(a=this.textlib.children("textdata").attr("lmstext"),a="<span>"+a+"</span>");if(a)a=a.replace(/size='(.*?)(pt|)'/ig,"style='font-size:$1pt'"),this.textTemplate=a=a.replace(/pt'/ig,"px'"),this.renderTextTemplate()}else if(this.hasImagelib){if(!this.image)this.image=new Image,
this.image.src=this.content.src;this.ref.css("background","url("+escape(this.image.src)+")");this.ref.removeClass("failedcanvas")}};var Media=function(){this.playState=0;this.syncToTimeline=this.playOnUnblock=this.blocked=!1;this.syncTargetTimeline=null;this.triggerTime=-1;this.autoplay=!1;this.autoplayTime=-1;this.autoplayTimeline=null;this.isMedia=!0;this.mediaParent=null;this.silentMode=!1;this.intervalSilent=null};Media.prototype=new StageItem;Media.playState={PAUSED:0,TIMELINE_PAUSED:1,VIDEO_BUSY:2,BLOCKED_PLAYING:3,PLAYING:4,COMPLETE:5};Media.prototype.destroyMediaBaseRef=StageItem.prototype.destroyRef;
Media.prototype.resetStageItem=StageItem.prototype.reset;Media.prototype.resetElement=Element.prototype.reset;Media.prototype.debug_trace=function(){};Media.prototype.getTimelineAncestor=function(){for(var a=this.parent,b=4;a&&0<b--;){if("Layer"==a.innerType||"Slide"==a.innerType)return a;a=this.parent}return this.slide};Media.prototype.renderCallback=function(){};Media.prototype.render=function(){};
Media.prototype.setMediaSyncInfo=function(a,b){if("TimelineEvent"==a.type){if(this.syncToTimeline=!0,this.syncTargetTimeline=a.parentElement,this.triggerTime=a.time,b)this.autoplayTime=this.triggerTime,this.autoplayTimeline=this.syncTargetTimeline}else this.autoplay&&b?(this.syncToTimeline=!0,this.syncTargetTimeline=this.autoplayTimeline,this.triggerTime=this.autoplayTime):this.syncToTimeline=!1};
Media.prototype.blockOnMe=function(){if(!this.destroyed){if(this.checkReady){var a=this;if(!this.readyInterval)this.readyInterval=setInterval(function(){a.checkReady()},30)}player.block(this)}};Media.prototype.unblockIfBlocked=function(){clearInterval(this.readyInterval);this.readyInterval=null;player.unblock(this)};Media.prototype.addToBlockableMedia=function(){this.destroyed||player.addToBlockableMedia(this)};Media.prototype.removeFromBlockableMedia=function(){this.blocked=!1;player.removeFromBlockableMedia(this)};
Media.prototype.actionOnUnblocked=function(){if(this.playOnUnblock)this.blocked=!1,this.playClip()};Media.prototype.readyOrLoad=function(){return!0};
Media.prototype.timelinePaused=function(){if(this.autoplay&&this.syncTargetTimeline&&(this.syncToTimeline=!0,this.playState==Media.playState.PAUSED))this.playState=Media.playState.PLAYING;if(this.playState!=Media.playState.PAUSED&&this.playState!=Media.playState.COMPLETE)this.playOnUnblock=!1,this.removeFromBlockableMedia(),this.pauseSimple(),this.playState=Media.playState.TIMELINE_PAUSED};
Media.prototype.timelinePlayed=function(){if(this.playState!=Media.playState.PAUSED&&this.playState!=Media.playState.COMPLETE)if(this.blocked)this.playState=Media.playState.BLOCKED_PLAYING,this.playOnUnblock=!0,this.addToBlockableMedia();else if(!this.getIsPlaying())this.playState=Media.playState.TIMELINE_PAUSED,this.playClip()};Media.prototype.timelineSetup=function(){this.playState=Media.playState.TIMELINE_PAUSED};
Media.prototype.playClip=function(){this.playOnUnblock=!0;this.addToBlockableMedia();if(this.readyOrLoad()){if(player.blocked)return this.playState=Media.playState.BLOCKED_PLAYING,this.blocked=!0,!1;this.playState=Media.playState.PLAYING;return!0}this.playState=Media.playState.BLOCKED_PLAYING;this.blocked=!0;this.blockOnMe();return!1};
Media.prototype.pauseClip=function(){this.playOnUnblock=!1;this.removeFromBlockableMedia();this.unblockIfBlocked();if(this.playState!=Media.playState.COMPLETE)this.playState=Media.playState.PAUSED};Media.prototype.pauseOnBlock=function(){if(this.playState.PLAYING||this.playState.BLOCKED_PLAYING)this.playOnUnblock=!0;this.pauseSimple()};Media.prototype.pauseSimple=function(){};
Media.prototype.destroyRef=function(){this.removeFromBlockableMedia();this.unblockIfBlocked();clearTimeout(this.timeoutSilent);this.timeoutSilent=!0;this.syncTargetTimeline=this.autoplayTimeline=this.mediaParent=null;this.destroyMediaBaseRef()};Media.prototype.reset=function(a){this.isVideo?this.resetStageItem(a):this.resetElement(a);if(!a)this.playState=Media.playState.PAUSED,this.playOnUnblock=this.blocked=!1,this.removeFromBlockableMedia(),this.unblockIfBlocked()};
Media.prototype.getIsPlaying=function(){return this.playState==Media.playState.PLAYING||this.playState==Media.playState.BLOCKED_PLAYING};Media.prototype.setMeSilentMode=function(){this.pauseClip();this.silentMode=!0};Media.prototype.timelinePlayedSilent=function(){if(this.playState!=Media.playState.PAUSED&&this.playState!=Media.playState.COMPLETE)this.playState=Media.playState.PLAYING,this.playClipSilent()};
Media.prototype.timelinePausedSilent=function(){if(this.playState!=Media.playState.PAUSED&&this.playState!=Media.playState.COMPLETE)this.playState=Media.playState.TIMELINE_PAUSED};Media.prototype.playClipSilent=function(){this.playState=Media.playState.PLAYING;var a=this;if(null==this.timeoutSilent)this.timeoutSilent=setTimeout(function(){a.handleEvent("onmediacomplete")},500)};Media.prototype.pauseClipSilent=function(){this.playState=Media.playState.PAUSED};var Audio=function(a,b,c){this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.constructElement();this.currentIndex=0;this.content={};this.colors={};this.type="audio";this.active=!0;this.id=Math.random();this.name="item";this.layered=!1;this.canSimplify=!0;this.hasEvents=!1;this.audioRef=null;this.playing=!1;this.xml="";this.audioLoaded=this.playOnDecode=this.decodeOnLoad=this.decoding=this.decoded=!1};Audio.masterVolume=0.8;Audio.prototype=new Media;
Audio.prototype.objectType="Item";Audio.prototype.innerType="audio";Audio.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;Audio.prototype.resetMedia=Media.prototype.reset;Audio.prototype.destroyBaseRef=Media.prototype.destroyRef;Audio.prototype.playClipBase=Media.prototype.playClip;Audio.prototype.pauseClipBase=Media.prototype.pauseClip;
Audio.prototype.GetResumeData=function(){var a="";if(this.slide.resume){a=0;this.syncToTimeline&&(a+=1);this.playing&&(a+=2);if(this.playing||this.m_bResumeOnSeek)a+=4;a=a.toString()}return a};Audio.prototype.SetResumeData=function(a){if(0<a.length)a=parseInt(a,10),this.syncToTimeline=0<(a&1),this.m_bResumeOnSeek=0<(a&4)};
Audio.prototype.loadFromXML=function(a,b,c){this.parent=c?c:b;this.slide=b;this.layer=c;this.children={};this.xml=a;this.id=$(a).attr("id");this.loadElementInfoFromXML(a);this.content.src=player.basepath+$(a).attr("url");this.content.duration=parseInt($(a).attr("duration"));this.duration=this.content.duration;c&&c.clips&&c.clips.push?(c.clips.push(this),this.layered=!0):b&&b.clips&&b.clips.push&&b.clips.push(this);if(!this.resource&&this.slide)this.resource=this.createResource(this.slide,this.content.src)};
Audio.prototype.createRef=function(){if(this.ref)return!1;if(player.silentMode)return this.setSilent(),!0;var a=this;this.container=$(document.body);this.ref=$('<audio preload="auto" src="'+a.content.src+'"></audio>');this.container.append(this.ref);this.audioRef=this.ref.get(0);this.audioRef.item=this;this.ref.bind("canplay",function(){a.checkReady()});this.ref.bind("timeupdate",function(){a.checkReady()});this.ref.bind("error",function(){a.onLoadError()});this.ref.bind("stalled",function(){a.onLoadError()});
this.ref.bind("ended",function(){a.playState=Media.playState.COMPLETE;a.handleEvent("onmediacomplete")});this.ref.bind("play",function(){a.correctPosition()});return!0};Audio.setMasterVolume=function(a){Audio.masterVolume=a};Audio.prototype.checkReady=function(){this.audioRef&&3<=this.audioRef.readyState&&this.unblockIfBlocked()};Audio.prototype.onLoadError=function(){this.setSilent()};
Audio.prototype.correctPosition=function(){if(!isNaN(this.correctedPosition)&&this.shouldSetPosition)try{this.setCurrentTime(me.correctedPosition),this.shouldSetPosition=!1}catch(a){}};Audio.prototype.destroyRef=function(){this.pauseClip();this.audioRef=this.audioRef.item=null;this.destroyBaseRef()};Audio.prototype.reset=function(a){this.resetMedia(a);if(!a)this.pauseClip(),this.currentTime=0};Audio.prototype.readyOrLoad=function(){return this.audioRef&&3<=this.audioRef.readyState?!0:!1};
Audio.prototype.playClip=function(){if(this.playState!=Media.playState.PLAYING){if(this.syncToTimeline&&this.syncTargetTimeline&&0<=this.triggerTime)this.currentTime=(this.syncTargetTimeline.currentTime-this.triggerTime)/1E3;if(0>this.currentTime||1E3*this.currentTime>=this.content.duration)return this.pauseClip(),!1;if(!this.playClipBase())return!1;if(this.audioRef&&this.audioRef.play){if(this.currentTime!=this.audioRef.currentTime&&void 0!==this.currentTime)try{this.setCurrentTime(this.currentTime)}catch(a){}try{this.audioRef.play(),
this.audioRef.volume=Math.min(Audio.masterVolume*player.clipVolume,1)}catch(b){this.setSilent()}}return!0}};Audio.prototype.pauseClip=function(){this.pauseSimple();this.pauseClipBase()};Audio.prototype.pauseSimple=function(){if(this.audioRef&&this.audioRef.pause)try{this.audioRef.pause()}catch(a){}};Audio.prototype.getCurrentTime=function(){return this.audioRef?this.audioRef.currentTime:0};
Audio.prototype.setCurrentTime=function(a){if(this.audioRef&&(1E3*a<player.TICK_DURATION&&(a=0),0.5<Math.abs(a-this.audioRef.currentTime)))this.audioRef.currentTime=a};Audio.prototype.setSilent=function(){var a=this.getIsPlaying();this.setMeSilentMode();this.playClip=Media.prototype.playClipSilent;this.pauseClip=Media.prototype.pauseClipSilent;this.timelinePlayed=Media.prototype.timelinePlayedSilent;this.timelinePaused=Media.prototype.timelinePausedSilent;a&&this.playClip()};
Audio.prototype.setVolume=function(a){if(this.ref)this.ref.get(0).volume=a};var Video=function(a,b,c){this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.constructElement();this.currentIndex=0;this.content={};this.colors={};this.type="video";this.active=!0;this.id=Math.random();this.name="item";this.layered=!1;this.canSimplify=!0;this.hasEvents=!1;this.isVideo=this.isMedia=!0;this.videoDisabled=!1;this.posterCanvas=null;this.showPlay=!0;this.videoref=this.poster=null;this.readyCount=0;var d=this;this.onLoadError=function(){d.setLoadError()};this.onMediaReady=
function(){d.setMediaReady()};this.onMediaCompleted=function(){d.setMediaComplete()};this.onPosterClicked=function(){d.posterClicked()};this.onPosterLoaded=function(){d.posterLoaded()};this.xml=""};Video.iOSPrepare=function(){Video.restrictedMode=player.isMobile;Video.singleVideoRef.load();Video.singleVideoRef.play()};
Video.requestVideoRef=function(a,b){if(Video.restrictedMode){var c=a.slide&&a.slide.visible&&(a.slide==player.currentSlide()||a.slide.framed&&a.slide.offsetParent.slide==player.currentSlide());return null==Video.currentOwner||Video.currentOwner.destroyed||(!Video.currentOwner.getIsPlaying()||Video.currentOwner.slide!=a.slide)&&c||b?(Video.currentOwner&&!Video.currentOwner.destroyed&&Video.currentOwner.releaseVideo(),Video.currentOwner=a,Video.singleVideoRef):null}c=document.createElement("video");
c.style.position="absolute";return c};Video.singleVideoRef=document.createElement("video");Video.singleVideoRef.setAttribute("src","");Video.singleVideoRef.style.position="absolute";Video.currentOwner=null;Video.prototype=new Media;Video.prototype.objectType="Item";Video.prototype.innerType="video";Video.prototype.createBaseRef=StageItem.prototype.createRef;Video.prototype.showBase=StageItem.prototype.show;Video.prototype.resetMedia=Media.prototype.reset;Video.prototype.destroyBaseRef=Media.prototype.destroyRef;
Video.prototype.playClipBase=Media.prototype.playClip;Video.prototype.pauseClipBase=Media.prototype.pauseClip;
Video.prototype.setPresenterVideo=function(a,b,c,d,e,f,g,h){if(!this.ref)this.ref=$('<div class="presentervideo" style="width:'+g+"px; height:"+h+'px;" ></div>');this.slide=a;this.layer=null;this.container=b;this.children={};this.innerType=this.type="video";this.id="presenterVideo";this.width=g;this.height=h;this.content.src=c;this.content.poster=player.basepath+e;this.content.hasPoster=0<e.length;this.content.type=d;this.content.duration=f;this.content.autoplay=!0;this.content.showcontrols=!1;this.content.autorewind=
!1;this.content.loop=!1;this.syncToTimeline=!0;this.syncTargetTimeline=a;this.triggerTime=0;this.duration=this.content.duration;(this.autoplay=this.content.autoplay)&&this.timelineSetup();this.createPoster();this.isUnsupportedType="youtube"==this.content.type||-1<this.content.src.indexOf(".swf");this.content.src=this.content.src.replace(".flv",".mp4");a&&a.clips&&a.clips.push&&a.clips.push(this);if(!this.resource)this.resource=this.createResource(this.slide,this.content.src);this.canSimplify=!1;this.ref.get(0).appendChild(this.posterCanvas)};
Video.prototype.loadFromXML=function(a,b,c){this.slide=b;this.layer=c;this.children={};this.innerType=this.type="video";this.id=$(a).attr("id");this.xml=a;this.loadElementInfoFromXML(a);this.loadSizeFromXML(a);this.canSimplify=!1;var d=$(a).find("videodata");this.content.src=player.basepath+d.attr("url");this.content.poster=player.basepath+d.attr("poster");this.content.hasPoster=""!=d.attr("poster");this.content.type=d.attr("type");this.content.duration=d.attr("duration");this.content.autoplay="true"==
$(a).attr("autoplay");this.content.showcontrols="true"==$(a).attr("showcontrols");this.content.autorewind="true"==$(a).attr("autorewind");this.content.loop="true"==$(a).attr("loop");this.content.captureanimation="true"==$(a).attr("captureanimation");this.duration=this.content.duration;(this.autoplay=this.content.autoplay)&&this.timelineSetup();this.createPoster();this.isUnsupportedType="youtube"==this.content.type||-1<this.content.src.indexOf(".swf");this.usehandcursor="true"==$(a).attr("usehandcursor");
this.content.src=this.content.src.replace(".flv",".mp4");if(this.mediaParent&&"Layer"==this.mediaParent.innerType)c=this.mediaParent;c&&c.clips&&c.clips.push?(c.clips.push(this),this.layered=!0):b&&b.clips&&b.clips.push&&b.clips.push(this);if(!this.resource)this.resource=this.createResource(this.slide,this.content.src);this.canSimplify=!1};
Video.prototype.createRef=function(){if(this.parent.ref)this.container=this.parent.ref;else return this.parent.createRef(),!1;if(this.ref)return!1;this.created=!0;this.createBaseRef();this.ref.get(0).appendChild(this.posterCanvas);player.noVideo||this.isUnsupportedType?this.disableVideo():this.requestVideo();return!0};Video.prototype.setLoadError=function(){this.disableVideo()};Video.prototype.setMediaComplete=function(){this.playState=Media.playState.COMPLETE;this.handleEvent("onmediacomplete")};
Video.prototype.setMediaReady=function(){this.checkReady()};Video.prototype.isVideoReady=function(){var a=!1;if(this.videoref){if(1==this.videoref.readyState&&!this.playQueued)this.playQueued=!0,this.videoref.play(),this.videoref.pause();if((a=3<=this.videoref.readyState)&&!this.videoShowing)this.videoShowing=!0,this.hidePoster(),this.ref.get(0).appendChild(this.videoref)}return a};Video.prototype.checkReady=function(){this.isVideoReady()&&this.unblockIfBlocked()};
Video.prototype.correctPosition=function(){if(!isNaN(this.correctedPosition)&&this.shouldSetPosition)try{this.setCurrentTime(this.correctedPosition),this.shouldSetPosition=!1}catch(a){}};
Video.prototype.destroyRef=function(){this.videoref&&(this.videoref.removeEventListener("canplay",this.onMediaReady),this.videoref.removeEventListener("ended",this.onMediaCompleted),this.videoref.removeEventListener("error",this.onLoadError),null!=this.videoref.parentNode&&this.videoref.parentNode.removeChild(this.videoref));this.posterImg&&this.posterImg.removeEventListener("load",this.onPosterLoaded);this.posterCanvas&&this.posterCanvas.removeEventListener("click",this.onPosterClicked);this.onPosterClicked=
this.onPosterLoaded=this.onLoadError=this.onMediaCompleted=this.onMediaReady=null;this.pauseClip();if(Video.currentOwner==this)Video.currentOwner=null;this.posterImg=this.posterCanvas=this.videoref=null;this.destroyBaseRef()};Video.prototype.reset=function(a){this.resetMedia(a);if(!a)this.pauseClip(),this.currentTime=0};
Video.prototype.createPoster=function(){if(this.content.hasPoster)this.posterImg=document.createElement("img"),this.posterImg.addEventListener("load",this.onPosterLoaded),this.posterImg.src=this.content.poster,this.posterImg.style.width=this.width+"px",this.posterImg.style.height=this.height+"px",this.posterImg.style.position="absolute";this.posterCanvas=document.createElement("canvas");this.posterCanvas.width=this.width;this.posterCanvas.height=this.height;this.posterCanvas.style.position="absolute";
this.posterCanvas.addEventListener("click",this.onPosterClicked);this.drawPoster(!0)};Video.prototype.posterClicked=function(){this.requestVideo(!0)&&this.playClip()};Video.prototype.posterLoaded=function(){this.drawPoster(this.showPlay)};
Video.prototype.drawPoster=function(a){this.showPlay=a;var b=this.posterCanvas.getContext("2d");b.clearRect(0,0,this.posterCanvas.width,this.posterCanvas.height);this.posterImg&&this.posterImg.complete?b.drawImage(this.posterImg,0,0,this.width,this.height):(b.fillStyle="rgba(0, 0, 0, 1)",b.rect(0,0,this.width,this.height),b.fill());var c=this.width/2,d=this.height/2;if(a&&!this.videoDisabled)b.beginPath(),b.fillStyle="rgba(0, 0, 0, 1)",b.arc(c,d,36,0,2*Math.PI),b.fill(),b.beginPath(),b.fillStyle=
"rgba(255, 255, 255, 1)",b.moveTo(c-14,d-18),b.lineTo(c-14,d+18),b.lineTo(c+23,d),b.lineTo(c-14,d-18),b.fill()};
Video.prototype.setVideoControl=function(a){this.videoref=a;null!=this.videoref.parentNode&&this.videoref.parentNode.removeChild(this.videoref);this.playQueued=!1;this.hidePosterPlay();this.videoref.addEventListener("canplay",this.onMediaReady);this.videoref.addEventListener("ended",this.onMediaCompleted);this.videoref.addEventListener("error",this.onLoadError);this.videoref.setAttribute("src",this.content.src);this.videoref.style.width=this.width+"px";this.videoref.style.height=this.height+"px";
this.content.hasPoster?(!player.isChrome||player.isMobile)&&this.videoref.setAttribute("poster",this.content.poster):this.videoref.removeAttribute("poster");this.content.showcontrols?this.videoref.setAttribute("controls",""):this.videoref.removeAttribute("controls")};Video.prototype.requestVideo=function(a){return null==this.videoref?(a=Video.requestVideoRef(this,a))?(this.setVideoControl(a),!0):!1:!0};
Video.prototype.releaseVideo=function(){if(this.videoref)this.currentTime=this.videoref.currentTime,this.showPoster(),this.videoref.pause(),this.videoref.removeEventListener("canplay",this.onMediaReady),this.videoref.removeEventListener("ended",this.onMediaCompleted),this.videoref.removeEventListener("error",this.onLoadError),this.videoref=null,this.videoShowing=!1,this.unblockIfBlocked(),this.removeFromBlockableMedia();this.playState=Media.playState.VIDEO_BUSY};
Video.prototype.disableVideo=function(){var a=this.getIsPlaying();this.setMeSilentMode();this.playClip=Media.prototype.playClipSilent;this.pauseClip=Media.prototype.pauseClipSilent;this.timelinePlayed=Media.prototype.timelinePlayedSilent;this.timelinePaused=Media.prototype.timelinePausedSilent;this.videoDisabled=!0;this.drawPoster(!1);this.ref.get(0).appendChild(this.posterCanvas);a&&this.playClip()};Video.prototype.showPoster=function(){this.drawPoster(!0);this.ref.get(0).appendChild(this.posterCanvas)};
Video.prototype.hidePosterPlay=function(){this.drawPoster(!1)};Video.prototype.hidePoster=function(){this.posterCanvas.parent&&this.posterCanvas.parent.removeChild(this.posterCanvas)};
Video.prototype.show=function(a,b,c){this.showBase(a,b,c);this.container&&!this.content.autoplay&&0==this.ref.parent().length&&(this.container.append(this.ref),this.ref.show());this.setMediaSyncInfo(a,"TimelineEvent"==a.type);if(c){if(this.autoplay&&(this.timelineSetup(),this.isVideoReady()))this.videoref.currentTime=(this.syncTargetTimeline.currentTime-this.triggerTime)/1E3,this.videoref.play(),this.videoref.pause()}else this.startAutoPlay()};
Video.prototype.startAutoPlay=function(){this.autoplay?this.requestVideo()?this.playClip():this.playState=Media.playState.VIDEO_BUSY:this.requestVideo()};
Video.prototype.playClip=function(){var a=this.playState!=Media.playState.PLAYING;if(this.requestVideo()){if(!this.playClipBase())return!1;0==this.ref.parent().length&&(this.container.append(this.ref),this.ref.show());if(this.syncToTimeline&&this.syncTargetTimeline&&0<=this.triggerTime)this.currentTime=(this.syncTargetTimeline.currentTime-this.triggerTime)/1E3,a=!0;a&&(isNaN(this.currentTime)||this.setCurrentTime(this.currentTime));this.videoref.play()}};
Video.prototype.pauseClip=function(){this.pauseSimple();this.pauseClipBase()};Video.prototype.pauseSimple=function(){if(null!=this.videoref){if(this.playState==Media.playState.PLAYING)this.currentTime=this.videoref.currentTime;this.videoref.pause()}};Video.prototype.resumePlaySimple=function(){null!=this.videoref&&this.playState==Media.playState.PLAYING&&this.videoref.play()};Video.prototype.getCurrentTime=function(){return this.videoref?this.videoref.currentTime:this.currentTime};
Video.prototype.setCurrentTime=function(a){1E3*a<player.TICK_DURATION&&(a=0);this.currentTime=a;if(this.videoref)this.videoref.currentTime=this.currentTime};Video.prototype.setVolume=function(a){if(this.videoref)this.videoref.volume=a};Video.prototype.readyOrLoad=function(){return 3<=this.videoref.readyState?!0:!1};
Video.prototype.isPointObscured=function(a,b,c,d){var e=this.matrix.unTransformPoint(a,b);return this.content.showcontrols&&e.y>this.height-35?!0:StageItem.prototype.isPointObscured.call(this,a,b,c,d)};Video.getStoreReference=function(){return""};Video.getSrcFromStoreReference=function(){return null};Video.addToRefStore=function(){return null};var LinkArea=function(a,b,c,d){this.textid=d;this.linkdy=this.linkdx=0;this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.constructElement()};LinkArea.prototype=new VectorShape;LinkArea.prototype.innerType="LinkArea";LinkArea.prototype.objectType="Item";LinkArea.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;LinkArea.prototype.renderBase=VectorShape.prototype.render;LinkArea.prototype.renderOnUpdate=VectorShape.prototype.renderOnUpdate;
LinkArea.prototype.loadFromXML=function(a,b,c){this.loadBaseFromXML(a,b,c);b=$(a).children("textdata").children("vectortext").children("pr");if(1==b.length){a=$(a).children("textdata").children("vectortext");if(null!=$(a).attr("top"))this.originalRectShape=this.rectShape=new ppRect(parseInt($(a).attr("left")),parseInt($(a).attr("top")),parseInt($(a).attr("right")),parseInt($(a).attr("bottom")));if(1==b.length)this.content.path=PathLib.getPathFromXML(b)}this.type="LinkArea"};
LinkArea.prototype.createRef=function(){if(player.showLinkAreas)this.ref=$("<div class='item linkplaceholder'></div>"),this.applySize(this.ref),this.ref.show(),this.parent.ref.append(this.ref)};LinkArea.prototype.render=function(a){switch(a){case "onrollover":new ppTextLib(this.xml);this.parent.render(this.parent.lastRenderedState,!0,null,"LinkArea render",!1,this.id);break;case "onrollout":this.parent.render(null,!0)}};
LinkArea.prototype.handleIfOver=function(a,b,c){b=this.parent.getCanvasPoint(b.x,b.y);if(b.x>this.xpos+this.linkdx&&b.x<this.xpos+this.linkdx+this.width&&b.y>this.ypos+this.linkdy&&b.y<this.ypos+this.linkdy+this.height){if(!c||!this.isMouseOver)this.isMouseOver=!0,this.parent.handleEvent(a,this.id,null,!1,!1,!0),this.render(a);return!0}return!1};
LinkArea.prototype.handleIfOut=function(a,b){var c=this.parent.getCanvasPoint(b.x,b.y);if(!(c.x>this.xpos+this.linkdx&&c.x<this.xpos+this.linkdx+this.width&&c.y>this.ypos+this.linkdy&&c.y<this.ypos+this.linkdy+this.height)){if(this.isMouseOver)this.isMouseOver=!1,this.parent.handleEvent(a,this.id,null,!1,!1,!0),this.render(a);return!0}return!1};var TextInput=function(a,b,c){this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.content={fontsize:18,font:"Arial"};this.constructElement();this.events=[];this.active=!0;this.visible=!1;this.clickFocus=!0};TextInput.prototype=new StageItem;TextInput.prototype.innerType="TextInput";TextInput.prototype.objectType="Item";TextInput.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;TextInput.prototype.showBase=StageItem.prototype.show;TextInput.prototype.hideBase=StageItem.prototype.hide;
TextInput.prototype.extractNextSpecialVar=function(a){this.variables.Text=a;if(this.ref&&this.input)this.input[0].value=a};TextInput.prototype.getExtraResumeVars=function(){var a="";this.variableResumes.VAR_TEXT=!0;this.variableDefaults.VAR_TEXT=a;this.variableTypes.VAR_TEXT="string";if(this.ref&&this.input)a=this.input[0].value;return{VAR_TEXT:a}};
TextInput.prototype.loadFromXML=function(a,b,c){this.content.numeric="true"==$(a).attr("numeric");this.content.multiline="true"==$(a).attr("multiline");this.content.maxchars=parseInt($(a).attr("maxchars"));this.content.fontsize=$(a).attr("fontsize");this.content.textcolor=$(a).attr("textcolor").replace("0x","#");this.content.bold="true"==$(a).attr("bold");this.content.font=$(a).attr("font");this.bindto=$(a).attr("bindto");this.content.instructionText="";var d=$(a).children("data").children("textdata").text();
""==d&&(d=$(a).children("background").children("vectordata").attr("alttext"));if(""!=d)this.content.instructionText=d;var e=$(a).children("background").children("vectordata").children("path"),d=$(a).children("background").children("vectordata").children("pr");if(1==e.length||1==d.length){var f=$(a).children("background").children("vectordata");if(null!=$(f).attr("top"))this.originalRectShape=this.rectShape=new ppRect(parseInt($(f).attr("left")),parseInt($(f).attr("top")),parseInt($(f).attr("right")),
parseInt($(f).attr("bottom")));this.content.path=1==d.length?PathLib.getPathFromXML(d):e.text()}this.loadBaseFromXML(a,b,c);this.updateMatrixComplete();this.type="textinput";this.variables.Text="";b=$(a).children("data").children("textdata");f=$(a).children("data").children("textdata").children("vectortext");d=f.children("pr");if(1==d.length){this.placeholderSprite={canvas:null,m_nXOffset:0,m_nYOffset:0,width:1E3,height:1E3,charIndex:0,maxCharIndex:0,vectorHot:!1,isShapeMask:!1};if(null!=$(f).attr("top"))this.placeholderSprite.x=
$(b).attr("xpos")-5,this.placeholderSprite.y=$(b).attr("ypos"),this.placeholderSprite.width=$(b).attr("width"),this.placeholderSprite.height=$(b).attr("height"),this.placeholderSprite.rectShape=new ppRect(parseInt($(f).attr("left")),parseInt($(f).attr("top")),parseInt($(f).attr("right")),parseInt($(f).attr("bottom"))),this.placeholderSprite.rectShape.right=Math.max(this.placeholderSprite.rectShape.right,this.placeholderSprite.width),this.placeholderSprite.rectShape.bottom=Math.max(this.placeholderSprite.rectShape.bottom,
this.placeholderSprite.height),this.placeholderSprite.originalRectShape=this.rectShape;this.placeholderSprite.path=PathLib.getPathFromXML(d)}};TextInput.prototype.validate=function(){if(!this.input)return!1;var a=this.input.get(0).value;if(this.content.numeric&&!a.match(/^-?([0-9]*\.|)[0-9]*$/))return!1;if(!isNaN(this.content.maxchars)&&0<this.content.maxchars&&a.length>this.content.maxchars)this.input.get(0).value=a.substr(0,this.content.maxchars);return!0};
TextInput.prototype.createRef=function(){if(!this.ref){var a=this;this.container=this.parent.ref;this.ref=$('<div class="item textinput interactive"></div>');this.applySize(this.ref);this.container.append(this.ref);var b=this.content.multiline?$("<textarea tabindex='-1'>"):$("<input type='text' tabindex='-1'>");b.css("position","absolute");b.css("padding-left","10px");b.css("font-size",this.content.fontsize+"px");b.css("font-family",this.content.font+",Arial,Sans-Serif");b.css("color",this.content.textcolor);
b.attr("size",this.content.maxchars);this.placeholderSprite||b.attr("placeholder",this.content.instructionText);b.css("width",this.width-5);if(""!=this.variables.Text)b.get(0).value=this.variables.Text;var c=$("<canvas></canvas>");c.css("position","absolute");this.ref.append(c);this.canvas=c.get(0);this.placeholderSprite?(c=$("<canvas></canvas>"),c.css("position","absolute"),c.css("left",this.placeholderSprite.x+"px"),c.css("top",this.placeholderSprite.y+"px"),c.attr("width",this.width+"px"),c.attr("height",
this.height+"px"),c.attr("id",this.id+"_placeholder"),this.ref.append(c),this.placeholderSprite.canvas=c.get(0),this.placeholderRef=c):this.placeholderRef=$("<div/>");this.ref.append(b);this.input=b;this.input.get(0).item=this;if(this.isDisabled)this.input.get(0).disabled=!0;this.ref.addClass("interactive");this.contentRef=this.ref;this.ref.get(0).item=this;a.input.bind("change",function(){a.variables.Text=this.value;""!=a.input.get(0).value&&a.placeholderRef.hide()});a.input.bind("keydown",function(b){var c=
a.input.get(0),f=c.value;setTimeout(function(){if(player.iOSKeyboardFault)switch(b.keyCode){case 8:if(0<c.value.length)c.value=c.value.substr(0,c.value.length-1)}if(!a.validate(c.value))c.value=f;a.variables.Text=c.value;a.bindto&&""!=a.bindto&&a.setVariable(a.bindto,c.value)},0)});player.isMobile&&window!=top&&a.input.bind("keypress",function(b){var c=this,f=c.value;setTimeout(function(){var g=f+String.fromCharCode(b.charCode);if(c.value==f&&g.length>f.length&&g!=f&&a.validate(g))player.iOSKeyboardFault=
!0,1<g.length&&g.substr(1,1).toLowerCase()!=g.substr(1,1)&&(g=g.substr(0,1)+g.substr(1,1).toLowerCase()+g.substr(2)),c.value=g,c.focus()},0)});a.input.bind("focus",function(){a.placeholderRef.hide()});a.input.bind("blur",function(){a.handleEvent("onlosefocus",null,null,!1,!1,!0);""==a.input.get(0).value&&a.placeholderRef.show()});if(a.bindto&&""!=a.bindto)a.bindVarListener(a.bindto).act(a,!1),a.variables.Text=this.input.get(0).value;this.content.path?a.renderBackground("",!0,null,"textinput createref"):
($(this.canvas).hide(),this.ref.addClass("defaultbackground"));if(this.placeholderSprite)b=new ppTextLib(a.xml),ppArt.itemID=a.id,ppArt.item=a,ppArt.m_bMaskMode=!1,ppArt.DrawVector(this.placeholderSprite,this.placeholderSprite.path,b,player.fontlib,a.imagelib,null,null);(""!=a.input.get(0).value||a.variables.ReviewMode||a.isDisabled)&&this.placeholderRef.hide()}};TextInput.prototype.renderBackground=VectorShape.prototype.render;TextInput.prototype.renderOnUpdate=VectorShape.prototype.renderOnUpdate;
TextInput.prototype.render=function(){if(this.input){if(this.bindto&&""!=this.bindto){var a=this.extractVariable(this.bindto);if(a!=this.input.get(0).value)this.input.get(0).value=a;this.variables.Text=a}(""!=this.input.get(0).value||this.variables.ReviewMode||this.isDisabled)&&this.placeholderRef.hide()}};
TextInput.prototype.applySize=function(a){a.css("left",this.x+"px");a.css("top",this.y+"px");a.css("width",this.width+"px");a.css("height",this.height+"px");"Layer"!=this.innerType&&"ExpandingLabel"!=this.innerType&&0<this.depth&&a.css("z-index",this.depth);$(this.canvas).css("left",this.xoffset+"px");$(this.canvas).css("top",this.yoffset+"px");if(0!=this.rotation)a.css("-webkit-transform-origin",this.rotatexpos-this.xoffset+"px "+(this.rotateypos-this.yoffset)+"px"),a.css("-webkit-transform","rotate("+
this.rotation+"deg)"),a.css("-moz-transform-origin",this.rotatexpos-this.xoffset+"px "+(this.rotateypos-this.yoffset)+"px"),a.css("-moz-transform","rotate("+this.rotation+"deg)"),a.css("-o-transform-origin",this.rotatexpos-this.xoffset+"px "+(this.rotateypos-this.yoffset)+"px"),a.css("-o-transform","rotate("+this.rotation+"deg)"),a.css("-ms-transform-origin",this.rotatexpos-this.xoffset+"px "+(this.rotateypos-this.yoffset)+"px"),a.css("-ms-transform","rotate("+this.rotation+"deg)"),this.canSimplify=
!1};TextInput.prototype.set_review=function(a){a?this.placeholderRef.hide():this.input&&""==this.input.get(0).value&&this.placeholderRef.show()};var DragItem=function(a){this.container=a||$(document.body);this.ref=null;this.constructElement();this.currentIndex=0;this.content={};this.colors={};this.type="textfield";this.active=!0;this.id=Math.random();this.name="item";this.visible=this.layered=!1;this.canSimplify=!0;this.hasEvents=!1;this.xml="";this.deferredResourceIndex=0;this.fillet=10;this.lastRenderedState="none";this.snapy=this.snapx=0;this.multidrop=this.dragreturn=!0;this.dropoffsety=this.dropoffsetx=0;this.canvas=null;this.m_nYOffset=
this.m_nXOffset=0;this.height=this.width=1E3;this.downY=this.downX=this.dragY=this.dragX=0;this.dropArea=null;this.dragDropIDs={global:!0};this.dragOverIDs={global:!0};this.currentlyOver={};this.isDragItem=!0};DragItem.prototype=new Item;DragItem.prototype.objectType="Item";DragItem.prototype.innerType="Item";
DragItem.prototype.extractNextSpecialVar=function(a){if(a=this.getItemByResumeIndex(a))if(this.dropArea=a,this.dropArea.variables.DragConnectData=this.connectdata,"wordbank"==this.style)this.parent=this.dropArea.parent,this.x=this.dropArea.x,this.y=this.dropArea.y,this.depth=++this.slide.topZ};
DragItem.prototype.getExtraResumeVars=function(){var a=-1;this.variableResumes.VAR_SELECTED_ITEM=!0;this.variableDefaults.VAR_SELECTED_ITEM=-1;this.variableTypes.VAR_SELECTED_ITEM="number";this.dropArea&&(a=this.dropArea.getItemIndex());return{VAR_SELECTED_ITEM:a}};DragItem.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;DragItem.prototype.toBaseData=Element.prototype.toData;
DragItem.prototype.toData=function(a){a=this.toBaseData(a);a.x=this.x;a.y=this.y;if(this.depth!=this.originalZ)a.depth=this.depth;return a};DragItem.prototype.updateBaseFromData=Element.prototype.updateFromData;
DragItem.prototype.updateFromData=function(a,b){this.updateBaseFromData(a,b);if(!b){if(!isNaN(parseInt(a.x)))this.x=parseInt(a.x);if(!isNaN(parseInt(a.y)))this.y=parseInt(a.y);if(a.depth&&(this.depth=a.depth,this.depth>this.slide.topZ))this.slide.topZ=this.depth}if(a.variables&&a.variables.DropTargetId&&(this.dropArea=this.parent.children[a.variables.DropTargetId],!this.dropArea))this.dropArea=this.slide.findDescendantById(a.variables.DropTargetId);this.ref&&this.updatePosition()};
DragItem.prototype.resetBase=Element.prototype.reset;DragItem.prototype.reset=function(a){this.resetBase(a);if(!a){this.x=this.originalX;this.y=this.originalY;if(this.shuffled)this.x=this.shuffleX,this.y=this.shuffleY;this.xoffset=this.originalXOffset||0;this.yoffset=this.originalYOffset||0;this.dragY=this.dragX=0;this.dropArea=null;this.updatePosition();if(isNaN(this.x))this.x=this.originalX,this.y=this.originalY}};
StageItem.prototype.convertToDragItem=function(a){this.toBaseData=DragItem.prototype.toBaseData;this.toData=DragItem.prototype.toData;this.updateBaseFromData=DragItem.prototype.updateBaseFromData;this.updateFromData=DragItem.prototype.updateFromData;this.resetBase=DragItem.prototype.resetBase;this.reset=DragItem.prototype.reset;this.initDrag=DragItem.prototype.initDrag;this.mousedown=DragItem.prototype.mousedown;this.mousemove=DragItem.prototype.mousemove;this.mouseup=DragItem.prototype.mouseup;this.fixPositionEvent=
DragItem.prototype.fixPositionEvent;this.updateDragPosition=DragItem.prototype.updateDragPosition;this.testOverlap=DragItem.prototype.testOverlap;this.findDropArea=DragItem.prototype.findDropArea;this.dock=DragItem.prototype.dock;this.undock=DragItem.prototype.undock;this.updatePosition=DragItem.prototype.updatePosition;this.reParent=DragItem.prototype.reParent;this.getExtraResumeVars=DragItem.prototype.getExtraResumeVars;this.parseDragGroupsFromXML=DropArea.prototype.parseDragGroupsFromXML;this.extractNextSpecialVar=
DragItem.prototype.extractNextSpecialVar;this.updateScrollAreaAncestorPosition=DragItem.prototype.updateScrollAreaAncestorPosition;this.drop=DragItem.prototype.drop;this.cancelDrag=DragItem.prototype.cancelDrag;this.lastRenderedState="none";this.currentlyOver={};switch(this.innerType){case "textfield":case "image":break;case "ItemGroup":case "StateGroup":break;default:this.render=VectorShape.prototype.render,this.renderOnUpdate=VectorShape.prototype.renderOnUpdate}this.droptype=$(a).children("dragdrop").attr("droptype");
this.snapx=parseInt($(a).children("dragdrop").attr("snapx"));this.snapy=parseInt($(a).children("dragdrop").attr("snapy"));this.dragreturn="true"==$(a).children("dragdrop").attr("dragreturn");this.multidrop="true"==$(a).children("dragdrop").attr("multidrop");this.dropoffsetx=parseInt($(a).children("dragdrop").attr("dropoffsetx"));this.dropoffsety=parseInt($(a).children("dragdrop").attr("dropoffsety"));this.originalX=this.x;this.originalY=this.y;this.downY=this.downX=this.dragY=this.dragX=0;this.parseDragGroupsFromXML(a);
this.isDragItem=!0};StageItem.prototype.convertRefToDragItem=function(){this.ref.addClass("dragitem");this.setInteractive()};DragItem.prototype.bustScrollAreas=function(){};DragItem.initialized=!1;
DragItem.init=function(){DragItem.initialized=!0;DragItem.cargo=null;var a=function(a){DragItem.cargo&&(DragItem.cargo.mousemove(a),a.preventDefault())},b=function(a){DragItem.cargo&&(DragItem.cargo.mouseup(a),a.preventDefault())};player.isMobile?($(document.body).bind("touchmove",a),$(window).bind("touchend",b)):($(document.body).bind("mousemove",a),$(window).bind("mouseup",b))};DragItem.cancelDrag=function(){if(DragItem.cargo)DragItem.cargo.dragging=!1;DragItem.cargo=null;$(".item").removeClass("dragging")};
DragItem.prototype.loadFromXML=function(a,b,c){this.loadBaseFromXML(a,b,c);this.parseDragGroupsFromXML(a);this.style=$(a).attr("style");this.connectdata=$(a).attr("connectdata");this.reviewdata=$(a).attr("reviewdata");this.width=parseInt($(a).attr("width"));this.height=parseInt($(a).attr("height"));this.originalX=this.x;this.originalY=this.y;this.alttext=$(this.xml).find("textdata").attr("alttext");if("wordbank"==this.style&&!this.colors.hover)b=new Background(this.ref),b.rotation="90",b.fillType=
"linear",b.stops.push(b.parseStop('<color rgb="0xBBF8FB" alpha="100" stop="0" />')),b.stops.push(b.parseStop('<color rgb="0xA5E8EB" alpha="100" stop="100" />')),this.colors.hover=b;this.variables.DropTargetId="";b=$(a).children("data").children("textdata");a=$(a).children("data").children("textdata").children("vectortext");c=a.children("pr");if(1==c.length){this.textSprite={canvas:null,m_nXOffset:0,m_nYOffset:0,width:1E3,height:1E3,charIndex:0,maxCharIndex:0,vectorHot:!1,isShapeMask:!1};if(null!=
$(a).attr("top"))this.textSprite.x=$(b).attr("xpos"),this.textSprite.y=$(b).attr("ypos"),this.textSprite.width=$(b).attr("width"),this.textSprite.height=$(b).attr("height"),this.textSprite.rectShape=new ppRect(parseInt($(a).attr("left")),parseInt($(a).attr("top")),parseInt($(a).attr("right")),parseInt($(a).attr("bottom"))),this.textSprite.rectShape.right=Math.max(this.textSprite.rectShape.right,this.width),this.textSprite.rectShape.bottom=Math.max(this.textSprite.rectShape.bottom,this.height),this.textSprite.originalRectShape=
this.rectShape;this.textSprite.path=PathLib.getPathFromXML(c)}this.canSimplify=!1};
DragItem.prototype.parseDragGroupsFromXML=function(a){var b=$(a).children("dragdrop").children("dragoverids").children("dragoverid"),a=$(a).children("dragdrop").children("dragdropids").children("dragdropid");if(0==b.length&&0==a.length)this.dragDropIDs={global:!0},this.dragOverIDs={global:!0};else{this.dragDropIDs={};this.dragOverIDs={};var c=this;b.each(function(a,b){var f=$(b).text();c.dragOverIDs[f]=!0});a.each(function(a,b){var f=$(b).text();c.dragDropIDs[f]=!0})}};
DragItem.prototype.initDrag=function(){var a=this;a.canSimplify=!1;a.ref.bind("mouseover mousedown touchstart",function(){a.style&&!a.isDisabled&&!a.parent.isDisabled&&(("wordbank"==a.style||"matching"==a.style)&&a.dropArea?a.render("",!1,null,"over/down (docked) "+a.style):a.render("hover",!1,null,"over/down "+a.style))});a.ref.bind("mouseout",function(){a.style&&a.render("",!1,null,"mouseout "+a.style)});a.ref.bind("touchend",function(){a.style&&a.render("")});DragItem.initialized||DragItem.init();
a.updateMatrixComplete()};DragItem.prototype.createBaseRef=StageItem.prototype.createRef;
DragItem.prototype.createRef=function(){if(!this.ref){this.createBaseRef();this.ref.addClass("dragitem");this.setInteractive();var a=$("<canvas></canvas>");a.attr("width",this.width);a.attr("height",this.height);a.css("position","absolute");this.ref.append(a);var b=$("<canvas></canvas>");b.attr("width",this.width);b.attr("height",this.height);b.css("margin","0 0 0 "+2*this.fillet+"px");b.css("position","absolute");this.ref.append(b);if(this.textSprite){var c=$("<canvas></canvas>");c.css("position",
"absolute");c.css("left",this.textSprite.x+"px");c.css("top",this.textSprite.y+"px");c.attr("width",this.width+"px");c.attr("height",this.height+"px");c.attr("id",this.id+"_text");this.ref.append(c);this.textSprite.canvas=c.get(0);this.textRef=c}this.border=a.get(0);this.canvas=b.get(0);this.initDrag()}this.render(null,!0)};
DragItem.prototype.renderCallback=function(){this.width=this.originalWidth;this.height=this.originalHeight;this.render();this.contentRef.css("margin-top",parseInt(this.height/2)-10);this.contentRef.empty();this.contentRef.text(this.alttext)};
DragItem.prototype.render=function(a,b){if(this.ref&&(b||a!=this.lastRenderedState)){this.lastRenderedState=a;var c=this.border.getContext("2d"),d=parseInt(900*Math.random()+1100)%1E3;c.fillStyle="#"+d;c.fillStyle="#fff";c.lineWidth=1;c.strokeStyle="#ccc";d=c.createLinearGradient(0,0,0,this.height);d.addColorStop(0,"#fcfcfc");d.addColorStop(1,"#eaeaea");c.fillStyle=d;this.colors[a]&&this.colors[a].applyCanvas(c,this,!0,!1);d=this.fillet;switch(this.style){case "matching":c.clearRect(0,0,this.width,
this.height);c.beginPath();c.moveTo(d+0.5,0.5);c.lineTo(this.width-0.5,0.5);c.lineTo(this.width-0.5,this.height-0.5);c.lineTo(d+0.5,this.height-0.5);c.lineTo(d+0.5,this.height-d-0.5);c.lineTo(0.5,this.height-d-0.5);c.lineTo(0.5,d+0.5);c.lineTo(d+0.5,d+0.5);c.lineTo(d+0.5,0.5);c.fill();c.save();c.clip();c.strokeStyle="#fff";c.lineWidth=5;c.stroke();c.restore();c.save();c.lineWidth=1;c.strokeStyle="#ccc";if(c.setLineDash&&(this.variables.ReviewMode||!this.dropArea))c.strokeStyle="#aaa",c.setLineDash([1.3]);
if(this.colors[a])c.strokeStyle=this.colors[a].stops[0].color;c.stroke();c.restore();if(this.variables.ReviewMode){c.fillStyle="#DB0000";if(this.dropArea&&this.reviewdata==this.dropArea.reviewdata)c.fillStyle="#008520";d=8;c.beginPath();c.arc(8.5,8.5,d,0,2*Math.PI);c.fill();d=6.8;c.beginPath();c.strokeStyle="rgba(255,255,255,0.6)";c.lineWidth=0.8;c.arc(8.4,8.4,d,0,2*Math.PI);c.fill();c.stroke();c.fillStyle="#fff";c.font="10px sans-serif";c.textBaseline="top";1<this.reviewdata.length?c.fillText(this.reviewdata,
2,2):c.fillText(this.reviewdata,5,2);if(this.dropArea&&this.dropArea.matchingDragItem!=this)this.dropArea.matchingDragItem=this,this.dropArea.variables.ReviewMode=this.variables.ReviewMode,this.dropArea.render(this.dropArea.lastRenderedState,!0)}break;case "wordbank":d=this.height/2;c.beginPath();c.moveTo(d+0.5,0.5);c.lineTo(this.width-d-0.5,0.5);c.arc(this.width-d-0.5,d,d-c.lineWidth/2,3*Math.PI/2,Math.PI/2);c.lineTo(d+0.5,this.height-0.5);c.arc(d+0.5,d,d-c.lineWidth/2,Math.PI/2,3*Math.PI/2);c.fill();
c.save();c.clip();c.strokeStyle="#fff";c.lineWidth=3.4;c.stroke();c.restore();if(this.variables.ReviewMode)if("1"==this.reviewdata)c.lineWidth=2,c.strokeStyle="#008520";else if(this.dropArea)c.lineWidth=2,c.strokeStyle="#DB0000";if(0!=c.lineWidth){if(this.colors[a])c.strokeStyle=this.colors[a].stops[0].color;c.stroke()}break;default:c.fillRect(0.5,0.5,this.width,this.height-c.lineWidth),c.strokeRect(0.5,0.5,this.width,this.height-c.lineWidth)}if(this.textSprite)c=new ppTextLib(this.xml),ppArt.itemID=
this.id,ppArt.item=this,ppArt.m_bMaskMode=!1,ppArt.DrawVector(this.textSprite,this.textSprite.path,c,player.fontlib,this.imagelib,null,null)}};
DragItem.prototype.fixPositionEvent=function(a){if(!a.fixed){if(a.originalEvent.touches)0<a.originalEvent.touches.length?(a.pageX=a.originalEvent.touches[0].pageX,a.pageY=a.originalEvent.touches[0].pageY):(a.pageX=a.originalEvent.changedTouches[0].pageX,a.pageY=a.originalEvent.changedTouches[0].pageY);a.fixed=!0;a.pageX=parseInt(a.pageX/player.currentZoom());a.pageY=parseInt(a.pageY/player.currentZoom());var b=$(".framewrap").offset(),c=a.pageX-b.left,d=a.pageY-b.top;if(!player.frameScale||isNaN(player.frameScale))player.frameScale=
1;player.scaleWithTransform?(a.pageX=parseInt(c/player.frameScale+b.left),a.pageY=parseInt(d/player.frameScale+b.top)):(a.pageX=parseInt(c/player.frameScale+b.left/player.frameScale),a.pageY=parseInt(d/player.frameScale+b.top/player.frameScale));a.pageX=parseInt(a.pageX/this.slide.scale);a.pageY=parseInt(a.pageY/this.slide.scale)}};
DragItem.prototype.cancelDrag=function(){DragItem.cargo&&DragItem.cargo!=this?DragItem.cargo.cancelDrag():(this.dropArea=null,DragItem.dropArea=null,this.dragY=this.dragX=0,this.parent!=this.originalParent&&this.reParent(this.originalParent),this.drop(),this.updatePosition())};
DragItem.prototype.mousedown=function(a){var b=1;if(a.originalEvent&&a.originalEvent.touches&&(b=a.originalEvent.touches.length,1<b)){this.cancelDrag();return}if(!this.isDisabled&&!this.parent.isDisabled)if("wordbank"==this.style&&this.dropArea)this.render("");else{this.fixPositionEvent(a);this.downScrollTop=0;if(this.nearestScrollAreaAncestor)this.downScrollTop=this.nearestScrollAreaAncestor.ref.get(0).scrollTop;else if("sequence"==this.style)this.downScrollTop=this.parent.ref.get(0).scrollTop;this.findAncestorOfType("ScrollArea")&&
this.reParent(this.slide);this.downX=a.pageX;this.downY=a.pageY;this.lastX=this.x;this.lastY=this.y;if(this.depth<this.slide.topZ){if(!this.originalZ)this.originalZ=this.depth;this.depth=++this.slide.topZ;this.setZIndex(this.depth)}this.dragStarted=!1;this.dragging=!0;DragItem.cargo=this;this.ref.addClass("dragging");this.handleEvent("ondragstart",null,null,!1,!1,!0);this.handleEvent("onpress",null,null,!1,!1,!0)}};
DragItem.prototype.reParent=function(a){if(a&&a!=this.parent){var b=this.findAncestorOfType("ScrollArea"),c=a.findAncestorOfType("ScrollArea"),d=this.parent.ref.offset(),e=a.ref.offset(),f=0,g=0,h=0,j=0;if(b&&(f=b.ref.get(0).scrollTop,g=b.ref.get(0).scrollLeft,!b.scrollPlaceHolder))b.scrollPlaceHolder=$("<div class='scrollplaceholder'/>"),b.scrollPlaceHolder.css("top",b.ref.get(0).scrollHeight-1),b.scrollPlaceHolder.css("left",b.ref.get(0).scrollWidth-1),b.ref.append(b.scrollPlaceHolder);if(c)h=c.ref.get(0).scrollTop,
j=c.ref.get(0).scrollLeft;b=f-h;j=g-j;a.ref.append(this.ref);this.offsetParent=this.parent=a;g=player.scaleWithTransform?player.frameScale:1;j=(d.left-e.left-j)/g;b=(d.top-e.top-b)/g;if("matching"==this.style||"wordbank"==this.style)j=(d.left-e.left)/g,b=(d.top-e.top)/g,j/=this.slide.scale,b/=this.slide.scale;if(this.nearestScrollAreaAncestor&&a==this.originalParent)this.downScrollTop=this.downScrollTop||0,a=this.nearestScrollAreaAncestor.ref.get(0).scrollTop,this.downScrollTop!=a&&(b+=this.downScrollTop-
a);this.x=Math.round(this.x+j);this.y=Math.round(this.y+b);this.updateDragPosition()}};DragItem.prototype.mousemove=function(a){if(a.originalEvent&&a.originalEvent.touches&&1<a.originalEvent.touches.length)this.cancelDrag();else{this.fixPositionEvent(a);if(!this.dragStarted)this.dragStarted=!0,this.handleEvent("ondragdisconnect",null,null,!1,!0,!1);if(this.dragging)swipe.moved=!0,this.dragX=a.pageX-this.downX,this.dragY=a.pageY-this.downY,this.updateDragPosition(),this.findDropArea(),this.updateScrollAreaAncestorPosition(a)}};
DragItem.prototype.updateScrollAreaAncestorPosition=function(a){if(this.nearestScrollAreaAncestor){var b=this.nearestScrollAreaAncestor.ref.offset(),a=a.pageY-b.top;0>a&&(this.nearestScrollAreaAncestor.ref.get(0).scrollTop+=a,this.nearestScrollAreaAncestor.updateMatrixComplete(!0));a>this.nearestScrollAreaAncestor.ref.get(0).offsetHeight&&(this.nearestScrollAreaAncestor.ref.get(0).scrollTop+=a-this.nearestScrollAreaAncestor.ref.get(0).offsetHeight,this.nearestScrollAreaAncestor.updateMatrixComplete(!0))}};
DragItem.prototype.mouseup=function(a){this.fixPositionEvent(a);this.drop();this.mouseupCallback&&this.mouseupCallback(a);$.each(this.children,function(a,c){if(void 0!=c.dragX)c.dragX=0,c.dragY=0});!this.dropArea&&this.dragreturn?this.originalParent&&this.originalParent!=this.parent&&(this.reParent(this.originalParent),this.updatePosition()):this.dropArea&&"matching"!=this.style&&this.dropArea.parent!=this.parent&&(this.reParent(this.dropArea.parent),this.updatePosition());this.updateMatrixComplete(!0)};
DragItem.prototype.drop=function(){this.dragging=!1;DragItem.cargo=null;$(".item").removeClass("dragging");this.updateDragPosition();DragItem.dropArea?("matching"==this.style&&this.parent!=this.originalParent&&this.reParent(this.originalParent),this.dock(DragItem.dropArea),DragItem.dropArea=null,DropArea.update()):(this.undock(),this.dragreturn&&"sequence"!=this.style&&this.originalZ&&this.setZIndex(this.originalZ));this.setElementProperty("dragX",0,!0);this.setElementProperty("dragY",0,!0);swipe.moved=
!1;this.handleEvent("ondragend",null,null,!1,!1,!0);this.handleEvent("onrelease",null,null,!1,!1,!0)};DragItem.prototype.updateDragPosition=function(){this.ref.css("left",this.x+this.xoffset+this.dragX);this.ref.css("top",this.y+this.yoffset+this.dragY);this.updateMatrixComplete(!0)};
StageItem.prototype.testOverlap=function(a){if(0<$(".modalfence:visible").length)return!1;var b=this;if("ItemGroup"==a.innerType||"StateGroup"==a.innerType){var c=!1;$.each(a.children,function(a,e){c=c||b.testOverlap(e)});return c}return"ItemGroup"==b.innerType||"StateGroup"==b.innerType?(c=!1,$.each(b.children,function(d,e){e.testOverlap&&(e.setElementProperty("dragX",b.dragX,!0),e.setElementProperty("dragY",b.dragY,!0),c=c||e.testOverlap(a))}),c):this.testRotatedOverlap(a)};
VectorShape.prototype.getCanvasPoint=function(a,b){return this.matrix.unTransformPoint(a,b)};StageItem.prototype.isPointWithinMaskShape=function(a,b){return this.ancestorMaskShape?this.ancestorMaskShape.testOver(a,b):!0};StageItem.prototype.isPointActive=function(a,b,c,d){return!this.visible||this==c||d&&d(this)?!1:this.testOver(a,b)&&this.isPointWithinMaskShape(a,b)};
VectorShape.prototype.isPointActive=function(a,b,c,d){if(!this.vectorHot)return this.isHotContextPointActive(a,b);if(this==c||d&&d(this))return!1;c=this.getCanvasPoint(a,b);d=this.getBitMask();if(!this.testOver(a,b)||!this.isPointWithinMaskShape(a,b))return!1;a=d.isPointActive(c.x,c.y);if(BitMask.showDebug&&player.monitoringItem==this&&"_default_Hover"==this.lastRenderedState){if(!BitMask.testCanvas)BitMask.testCanvas=$("<canvas id='test' width='1000' height='1000' style='position:absolute;z-index:200;left:0px;top:0px;'></canvas>"),
$(document.body).append(BitMask.testCanvas),BitMask.testContext=BitMask.testCanvas.get(0).getContext("2d"),BitMask.testContext.fillStyle="rgba(255,255,0,0.5)";BitMask.testCanvas.show();clearTimeout(BitMask.testCanvasClear);BitMask.testCanvasClear=setTimeout(function(){BitMask.testCanvas.hide()},1E3);BitMask.testContext.clearRect(0,0,1E3,1E3);this.getBitMask().drawDebug(BitMask.testCanvas.get(0));BitMask.testContext.fillStyle=a?"rgba(0,255,0,1)":"rgba(255,0,0,1)";BitMask.testContext.fillRect(c.x-2,
c.y-2,4,4)}return a};VectorShape.prototype.isHotContextPointActive=function(a,b){if(0==this.hotContexts.length)return!1;var c=this.getCanvasPoint(a,b);if(0>=c.x||0>=c.y||c.x>=this.canvas.width||c.y>=this.canvas.height)return!1;for(var d=0;d<this.hotContexts.length;d++)if(0!=this.hotContexts[d].getImageData(c.x,c.y,1,1).data[3])return!0;return!1};StageItem.prototype.isAbove=function(a){for(var b=this;b;){for(var c=a;c;){if(c.parent==b.parent)return b.depth>c.depth;c=c.parent}b=b.parent}return!1};
StageItem.prototype.isPointObscured=function(a,b,c,d){var e=this,f=!1;e.slide.deepEach(function(g,h){if(!f&&h!=e&&h!=c&&h.isAbove&&h.isAbove(e)&&h.isPointActive(a,b)&&(!c||!c.isAncestor(h)))if("ScrollArea"==h.innerType){h.isAncestor(e);var j=h.ref.get(0).scrollTop;f=h.isPointActive(a,b-j,c,d)}else h.nearestScrollAreaAncestor&&h.nearestScrollAreaAncestor!=e.nearestScrollAreaAncestor?(j=h.nearestScrollAreaAncestor.ref.get(0).scrollTop,f=h.isPointActive(a,b-j,c,d)):h.isHotspotMarker||(f=!0)},function(a){var b=
d&&d(a);return a!=e&&a.visible&&a!=c&&!b});e.scrollArea&&(f=f||!e.scrollArea.isPointVisible(a,b));return f};
DragItem.prototype.findDropArea=function(){var a=this,b=null,c=1E5;$.each(a.slide.ref.find(".droparea"),function(d,e){if(e.item&&util.hasMutualKey(e.item.dragDropIDs,a.dragDropIDs)&&a.testOverlap(e.item)){var f=a.slideX()+a.dragX,g=a.slideY()+a.dragY,f=Math.sqrt(Math.pow(f-e.item.slideX(),2)+Math.pow(g-e.item.slideY(),2));if(f<c)b=e.item,c=f}});a.variables.DragOverId="";$.each(a.slide.ref.find(".dragover"),function(b,c){c.item&&util.hasMutualKey(c.item.dragOverIDs,a.dragOverIDs)&&a.testOverlap(c.item)?
(a.variables.DragOverId=c.item.id,a.currentlyOver[c.item.id]||a.handleEvent("ondragover",null,null,!1,!1,!1),a.currentlyOver[c.item.id]=!0):(a.currentlyOver[c.item.id]&&a.handleEvent("ondragout",null,null,!1,!1,!0),a.currentlyOver[c.item.id]=!1)});DragItem.dropArea=b;DropArea.update();return b};DragItem.prototype.swapPositionsWith=function(a){var b=this.y;this.y=a.y;a.y=b;this.ref.css("top",this.y+"px");a.ref.css("top",a.y+"px")};
DragItem.prototype.updatePosition=function(){var a=this.fillet||0;if(this.dropArea)switch(this.dropArea.droptype){case "matching":this.x=this.dropArea.x+this.dropArea.width-a;this.y=this.dropArea.y;if(this.variables.ReviewMode)this.x=parseInt(this.originalX);break;case "snap":this.x=this.dropArea.x+this.dropArea.snapx-this.snapx;this.y=this.dropArea.y+this.dropArea.snapy-this.snapy;break;case "tile":break;case "free":if(void 0==this.lastX)this.lastX=this.x,this.lastY=this.y;this.x=this.dragX+this.lastX;
this.y=this.dragY+this.lastY;this.lastX=this.x;this.lastY=this.y;break;case "stackoffset":break;case "stackrandom":if(void 0==this.randx&&(this.randx=Math.random(),this.randy=Math.random(),1==this.dropArea.dockedItemCount))this.randy=this.randx=0.5;var a=parseInt(2*this.randx*this.dropArea.dropoffsetx)-this.dropArea.dropoffsetx,b=parseInt(2*this.randy*this.dropArea.dropoffsety)-this.dropArea.dropoffsety;this.x=this.dropArea.x+this.dropArea.snapx-this.snapx+a;this.y=this.dropArea.y+this.dropArea.snapy-
this.snapy+b;break;case "wordbank":this.x=this.dropArea.x;this.y=this.dropArea.y;break;default:this.x=this.dropArea.x,this.y=this.dropArea.y}else if(this.dragreturn)if(this.shuffled&&"sequence"!=this.style){if(this.x=parseInt(this.shuffleX),"matching"!=this.style)this.y=parseInt(this.shuffleY)}else{if(this.x=parseInt(this.originalX),"matching"!=this.style)this.y=parseInt(this.originalY)}else this.x+=this.dragX,this.y+=this.dragY;this.x=Math.round(this.x);this.y=Math.round(this.y);this.ref&&(this.ref.css("left",
this.x+this.xoffset+"px"),this.ref.css("top",this.y+this.yoffset+"px"));this.updateMatrixComplete(!0)};DragItem.prototype.undock=function(a){if(this.dropArea)this.dropArea.variables.DragConnectData="",this.dropArea.dockedItemCount--,this.dropArea.dragItem=null;this.variables.DropTargetId="";if(!a)this.dropArea=null,this.dragreturn&&this.originalParent&&this.originalParent!=this.parent&&this.reParent(this.originalParent),this.updatePosition(),DropArea.unstackItem(this),DropArea.update()};
DragItem.prototype.dock=function(a){var b=this;"matching"==b.style?($.each(b.slide.ref.find(".dragitem"),function(c,d){var e=d.item;e&&e!=b&&Math.round(e.y)==Math.round(a.y)&&(b.reParent(e.parent),b.swapPositionsWith(e),e.undock())}),b.dropArea=a,b.render("",!1,null,"dock "+b.style)):"wordbank"==b.style&&($.each(b.slide.ref.find(".dragitem"),function(a,d){var e=d.item;e&&e!=b&&e.undock()}),b.render("",!1,null,"dock "+b.style));this.dropArea&&this.undock(!0);a.variables.DragConnectData=this.connectdata;
a.dragItem=this;a.dockedItemCount++;b.variables.DropTargetId=a.id;b.dropArea=a;DropArea.unstackItem(this,b.dropArea);b.updatePosition();b.render(b.lastRenderedState);a&&(!a.multidrop&&0<a.dockedItemCount&&$.each(b.slide.ref.find(".dragitem"),function(c,d){var e=d.item;if(e&&e!=b&&e.dropArea==a)e.x=parseInt(e.originalX),e.y=parseInt(e.originalY),e.undock()}),a.findSlot(this),a.updateSlotPositions());swipe.moved=!1;this.handleEvent("ondragconnect",null,null,!1,!1,!0);a.handleEvent("ondragconnect",null,
null,!1,!1,!0)};DragItem.prototype.set_review=function(){this.render("",!0)};var DropArea=function(a){this.container=a||$(document.body);this.ref=null;this.constructElement();this.currentIndex=0;this.content={};this.colors={};this.type="droparea";this.active=!0;this.id=Math.random();this.name="item";this.visible=this.layered=!1;this.canSimplify=!0;this.hasEvents=!1;this.xml="";this.deferredResourceIndex=0;this.fillet=10;this.droptype="matching";this.lastRenderedState="none";this.snapy=this.snapx=0;this.multidrop=this.dragreturn=!0;this.dropoffsety=this.dropoffsetx=0;this.slots=
[];this.dragItemIDs=[];this.dockedItemCount=0;this.canvas=this.dragItem=null;this.m_nYOffset=this.m_nXOffset=0;this.m_nHeight=this.m_nWidth=1E3;this.dragDropIDs={global:!0};this.dragOverIDs={global:!0};this.isDropArea=!0};DropArea.prototype=new StageItem;DropArea.prototype.objectType="Item";DropArea.prototype.innerType="DropArea";DropArea.prototype.extractNextSpecialVar=function(a){if(a=this.getItemByResumeIndex(a))this.dragItem=a};
DropArea.prototype.getExtraResumeVars=function(){var a=-1;this.variableResumes.VAR_SELECTED_ITEM=!0;this.variableDefaults.VAR_SELECTED_ITEM=-1;this.variableTypes.VAR_SELECTED_ITEM="number";switch(this.style){case "matching":case "wordbank":return this.dragItem&&(a=this.dragItem.getItemIndex()),{VAR_SELECTED_ITEM:a};default:return{}}};DropArea.prototype.toBaseData=Element.prototype.toData;
DropArea.prototype.toData=function(a){var b=this.toBaseData(a);if(this.DragConnectData)b.DragConnectData=this.DragConnectData;if(this.slots&&0<this.slots.length)b.slots=[],$.each(this.slots,function(a,d){b.slots.push(d.id)});return b};DropArea.prototype.updateBaseFromData=Element.prototype.updateFromData;
DropArea.prototype.updateFromData=function(a){var b=this;this.updateBaseFromData(a);if(a.DragConnectData)this.DragConnectData=a.DragConnectData;if(a.slots)this.slots=[],$.each(a.slots,function(a,d){var e=b.parent.children[d];e&&b.slots.push(e)})};DropArea.prototype.resetBase=Element.prototype.reset;DropArea.prototype.reset=function(){this.resetBase();this.slots=[];this.dragItemIDs=[];this.dockedItemCount=0};
StageItem.prototype.convertToDropArea=function(a){this.toBaseData=DropArea.prototype.toBaseData;this.toData=DropArea.prototype.toData;this.updateBaseFromData=DropArea.prototype.updateBaseFromData;this.updateFromData=DropArea.prototype.updateFromData;this.resetBase=DropArea.prototype.resetBase;this.reset=DropArea.prototype.reset;this.update=DragItem.prototype.update;this.findSlot=DropArea.prototype.findSlot;this.findTileSlot=DropArea.prototype.findTileSlot;this.findOffsetSlot=DropArea.prototype.findOffsetSlot;
this.updateSlotPositions=DropArea.prototype.updateSlotPositions;this.unstack=DropArea.prototype.unstack;this.parseDragGroupsFromXML=DropArea.prototype.parseDragGroupsFromXML;this.getDragItemIndex=DropArea.prototype.getDragItemIndex;this.getExtraResumeVars=DropArea.prototype.getExtraResumeVars;this.extractNextSpecialVar=DropArea.prototype.extractNextSpecialVar;this.lastRenderedState="none";switch(this.innerType){case "textfield":case "image":break;case "ItemGroup":case "StateGroup":this.render=function(){};
break;default:this.render=VectorShape.prototype.render,this.renderOnUpdate=VectorShape.prototype.renderOnUpdate}this.originalWidth=parseInt($(a).attr("width"));this.originalHeight=parseInt($(a).attr("height"));this.originalX=this.x;this.originalY=this.y;this.droptype=$(a).children("dragdrop").attr("droptype");this.snapx=parseInt($(a).children("dragdrop").attr("snapx"));this.snapy=parseInt($(a).children("dragdrop").attr("snapy"));this.dragreturn="true"==$(a).children("dragdrop").attr("dragreturn");
this.multidrop="true"==$(a).children("dragdrop").attr("multidrop");this.dropoffsetx=parseInt($(a).children("dragdrop").attr("dropoffsetx"));this.dropoffsety=parseInt($(a).children("dragdrop").attr("dropoffsety"));this.slots=[];this.dragItemIDs=[];this.dockedItemCount=0;this.isDropArea=!0;this.variables.DragConnectData="";this.variableDefaults.DragConnectData="";this.parseDragGroupsFromXML(a)};
DropArea.update=function(){$.each(player.currentSlide().ref.find(".droparea"),function(a,b){b.item&&(b.item==DragItem.dropArea?b.item.render("over"):b.item.render(),b.item.updateSlotPositions())});DragItem.cargo&&DragItem.dropArea&&DragItem.dropArea.findSlot(DragItem.cargo)};DropArea.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;DropArea.prototype.parseDragGroupsFromXML=DragItem.prototype.parseDragGroupsFromXML;
DropArea.prototype.loadFromXML=function(a,b,c){this.loadBaseFromXML(a,b,c);this.style=$(a).attr("style");this.droptype=$(a).attr("style");this.reviewdata=$(a).attr("reviewdata");this.originalWidth=parseInt($(a).attr("width"));this.originalHeight=parseInt($(a).attr("height"));this.alttext=$(this.xml).find("textdata").attr("alttext");this.variables.DragConnectData="";this.variableDefaults.DragConnectData="";b=$(a).children("data").children("textdata");a=$(a).children("data").children("textdata").children("vectortext");
c=a.children("pr");if(1==c.length){this.textSprite={canvas:null,m_nXOffset:0,m_nYOffset:0,width:1E3,height:1E3,charIndex:0,maxCharIndex:0,vectorHot:!1,isShapeMask:!1};if(null!=$(a).attr("top"))this.textSprite.x=$(b).attr("xpos"),this.textSprite.y=$(b).attr("ypos"),this.textSprite.width=$(b).attr("width"),this.textSprite.height=$(b).attr("height"),this.textSprite.rectShape=new ppRect(parseInt($(a).attr("left")),parseInt($(a).attr("top")),parseInt($(a).attr("right")),parseInt($(a).attr("bottom"))),
this.textSprite.rectShape.right=Math.max(this.textSprite.rectShape.right,this.width),this.textSprite.rectShape.bottom=Math.max(this.textSprite.rectShape.bottom,this.height),this.textSprite.originalRectShape=this.rectShape;this.textSprite.path=PathLib.getPathFromXML(c)}this.canSimplify=!1};DropArea.prototype.loadDragDropFromXML=function(){};DropArea.prototype.createBaseRef=StageItem.prototype.createRef;
DropArea.prototype.createRef=function(){if(this.ref)this.render(null,!0);else{this.type="droparea";this.createBaseRef();this.ref.addClass("droparea");var a=$("<canvas></canvas>");a.attr("width",this.width);a.attr("height",this.height);a.css("position","absolute");this.ref.append(a);var b=$("<canvas></canvas>");b.attr("width",this.width);b.attr("height",this.height);b.css("margin","0 0 0 "+this.fillet+"px");b.css("position","absolute");this.ref.append(b);if(this.textSprite){var c=$("<canvas></canvas>");
c.css("position","absolute");c.css("left",this.textSprite.x+"px");c.css("top",this.textSprite.y+"px");c.attr("width",this.width+"px");c.attr("height",this.height+"px");c.attr("id",this.id+"_text");this.ref.append(c);this.textSprite.canvas=c.get(0);this.textRef=c}this.border=a.get(0);this.jcanvas=b;this.canvas=b.get(0);this.bindEvents();this.render()}};
DropArea.prototype.bindEvents=function(){var a=this;a.ref.bind("dragstart",function(a){a.preventDefault()});a.ref.bind("mouseover",function(){DragItem.cargo&&a.render("over")});a.ref.bind("mouseout",function(){a.render("out")})};DropArea.prototype.renderCallback=function(){};
DropArea.prototype.render=function(a,b){if(this.ref&&(b||a!=this.lastRenderedState)){this.lastRenderedState=a;var c=this.border.getContext("2d"),d=parseInt(900*Math.random()+1100)%1E3;c.fillStyle="#"+d;c.fillStyle="#fff";c.lineWidth=1;c.strokeStyle="#ccc";d=c.createLinearGradient(0,0,0,this.height);d.addColorStop(0,"#fcfcfc");d.addColorStop(1,"#eaeaea");c.fillStyle=d;this.colors[a]&&this.colors[a].applyCanvas(c,this,!0,!1);switch(a){case "over":c.lineWidth=3;break;default:c.lineWidth=1}var d=c.lineWidth/
2,e=this.fillet;switch(this.style){case "matching":c.beginPath();c.moveTo(0+d,0+d);c.lineTo(this.width-d,0+d);c.lineTo(this.width-d,e-d);c.lineTo(this.width-e-d,e-d);c.lineTo(this.width-e-d,this.height-e+d);c.lineTo(this.width-d,this.height-e+d);c.lineTo(this.width-d,this.height-d);c.lineTo(0+d,this.height-d);c.lineTo(0+d,0+d);c.fill();c.save();c.clip();c.strokeStyle="#fff";c.lineWidth=5;c.stroke();c.restore();c.lineWidth=1;c.strokeStyle="#ccc";c.stroke();if(this.variables.ReviewMode){c.fillStyle=
"#DB0000";if(this.matchingDragItem&&this.matchingDragItem.reviewdata==this.reviewdata)c.fillStyle="#008520";e=8;c.beginPath();c.arc(8,8,e,0,2*Math.PI);c.fill();e=7;c.beginPath();c.fillStyle="#000";c.strokeStyle="rgba(255,255,255,0.5)";c.lineWidth=0.5;c.arc(8,8,e,0,2*Math.PI);c.fill();c.stroke();c.fillStyle="#fff";c.font="10px sans-serif";c.textBaseline="top";1<this.reviewdata.length?c.fillText(this.reviewdata,2,2):c.fillText(this.reviewdata,5,2)}break;case "wordbank":if(this.variables.ReviewMode)c.lineWidth=
2,c.strokeStyle="#DB0000";e=this.height/2;c.beginPath();c.moveTo(e+d,d);c.lineTo(this.width-e-d,d);c.arc(this.width-e-d,e,e-c.lineWidth/2,3*Math.PI/2,Math.PI/2);c.lineTo(e+d,this.height-d);c.arc(e+d,e,e-c.lineWidth/2,Math.PI/2,3*Math.PI/2);c.fill();c.stroke();break;default:c.fillRect(d,d,this.width,this.height-c.lineWidth),c.strokeRect(d,d,this.width,this.height-c.lineWidth)}if(this.textSprite)c=new ppTextLib(this.xml),ppArt.itemID=this.id,ppArt.item=this,ppArt.m_bMaskMode=!1,ppArt.DrawVector(this.textSprite,
this.textSprite.path,c,player.fontlib,this.imagelib,null,null)}};
DropArea.prototype.updateSlotPositions=function(){switch(this.droptype){case "stackrandom":case "free":return;case "stackoffset":for(var a=0,b=0;b<this.slots.length;b++){var c=this.slots[b];if(c!=DragItem.cargo)c.x=this.x+b*this.dropoffsetx,c.y=this.y+b*this.dropoffsety,c.ref.css("left",c.x+c.xoffset+"px"),c.ref.css("top",c.y+c.yoffset+"px"),c.updateMatrixComplete(!0),0==a?a=c.depth:c.setZIndex(a+b)}return}for(var d=a=0,e=0,b=0;b<this.slots.length;b++){c=this.slots[b];a+c.width>this.width&&(a=0,d+=
e);if(c!=DragItem.cargo)c.x=this.x+a,c.y=this.y+d,c.updatePosition();e=c.height;a+=c.width}};DropArea.prototype.findSlot=function(a){"tile"==this.droptype?(this.findTileSlot(a),this.updateSlotPositions()):"stackoffset"==this.droptype&&(this.findOffsetSlot(a),this.updateSlotPositions())};
DropArea.prototype.findTileSlot=function(a){var b=a.x-this.x+a.dragX+a.snapx,c=a.y-this.y+a.dragY+a.snapy,d=this.slots.indexOf(a);-1<d&&this.slots.splice(d,1);if(0>b&&0>c)this.slots.splice(0,0,a);else{for(var e=0,f=0,g=0,h=0,d=h=0;d<this.slots.length;d++){var j=this.slots[d],e=e+g;e+j.width>this.width&&(e=0,f+=h);g=j.width;h=j.height;if(b+a.width<=this.width&&b<=e+g&&c<=f+h){this.slots.splice(d,0,a);return}if(c<=f+h&&e+g>=this.width){this.slots.splice(d,0,a);return}}this.slots.push(a)}};
DropArea.prototype.findOffsetSlot=function(a){var b=a.x-this.x+a.dragX,c=a.y-this.y+a.dragY,d=this.slots.indexOf(a);-1<d&&this.slots.splice(d,1);for(d=0;d<this.slots.length;d++)if(b<d*this.dropoffsetx&&c<d*this.dropoffsety){this.slots.splice(d,0,a);return}this.slots.push(a)};DropArea.prototype.getDragItemIndex=function(a){if(0==this.slots.length)return 0;for(var b=0;b<this.slots.length;b++)if(this.slots[b]==a)return b;return-1};
DropArea.unstackItem=function(a,b){$.each(player.currentSlide().ref.find(".droparea"),function(c,d){d!=b&&d.item&&d.item.unstack(a)})};DropArea.prototype.unstack=function(a){a=this.slots.indexOf(a);-1<a&&this.slots.splice(a,1)};DragItem.prototype.set_review=function(){this.render("",!0)};var DropList=function(a,b,c){this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.content={fontsize:18,font:"Arial"};this.constructElement();this.events=[];this.active=!0;this.visible=!1;this.clickFocus=!0;this.originalIndices={}};DropList.prototype=new StageItem;DropList.prototype.innerType="DropList";DropList.prototype.objectType="Item";DropList.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;DropList.prototype.showBase=StageItem.prototype.show;
DropList.prototype.hideBase=StageItem.prototype.hide;DropList.prototype.toBaseData=Element.prototype.toData;DropList.prototype.toData=function(){var a=this.toBaseData();if(this.shuffleOrder)a.shuffleOrder=this.shuffleOrder;return a};DropList.prototype.updateBaseFromData=Element.prototype.updateFromData;DropList.prototype.updateFromData=function(a){this.updateBaseFromData(a);if(a.shuffleOrder)this.shuffleOrder=a.shuffleOrder};
DropList.prototype.extractNextSpecialVar=function(a){a=$(this.xml).children("data").children("itemlist").children().get(a);a=$(a).attr("itemdata");this.variables.SelectedItemData=a;this.ref&&this.select&&this.select.val(a)};DropList.prototype.getExtraResumeVars=function(){this.variableResumes.VAR_SELECTED_ITEM=!0;this.variableDefaults.VAR_SELECTED_ITEM=-1;this.variableTypes.VAR_SELECTED_ITEM="number";var a=-1;this.ref&&this.select&&(a=this.originalIndices[this.select.val()],void 0===a&&(a=-1));return{VAR_SELECTED_ITEM:a}};
DropList.prototype.loadFromXML=function(a,b,c){this.loadBaseFromXML(a,b,c);this.updateMatrixComplete();this.alttext=$(a).children("data").children("textdata ").attr("alttext");this.shuffle="true"==$(a).attr("shuffle");this.originalWidth=this.width;this.reviewWidth=parseInt($(a).attr("reviewwidth"));this.shuffleOrder=[];this.type="droplist"};DropList.prototype.update=function(){this.variables.SelectedItemData=this.select.val()};
DropList.prototype.createRef=function(){if(this.ref)this.update();else{var a=this;this.container=this.parent.ref;this.ref=$('<div class="item droplist interactive"></div>');this.applySize(this.ref);this.container.append(this.ref);this.canvas=this.ref.get(0);this.select=$('<select tabindex="-1"></select>');this.select.css("font-size",this.content.fontsize+"px");this.select.css("font-family",this.content.font+",Arial,Sans-Serif");this.applySize(this.select);this.ref.append(this.select);if(this.isDisabled)this.select.get(0).disabled=
!0;this.contentRef=this.ref;this.ref.get(0).item=this;var b={};$(this.xml).children("data").children("itemlist").children().each(function(c,e){var f=$(e).attr("itemdata"),g=$(e).children("textdata").attr("alttext"),h=$("<option value='"+f+"'>"+g+"</option>");a.originalIndices[f]=c;b[g]=h;a.shuffleOrder.length<=c&&a.shuffleOrder.push(0.5<Math.random());a.shuffle&&a.shuffleOrder[c]?a.select.prepend(h):a.select.append(h)});if(this.alttext&&""!=this.alttext)if(b[this.alttext])b[this.alttext].get(0).selected=
!0;else{var c=$("<option value=''>"+this.alttext+"</option>");a.select.prepend(c)}void 0!=this.variables.SelectedItemData&&this.select.val(this.variables.SelectedItemData);a.select.bind("change click",function(){a.update()});a.select.bind("blur",function(){a.handleEvent("onlosefocus",null,null,!1,!1,!0)});a.update()}};DropList.prototype.set_review=function(a){this.select&&this.select.css("width",a?this.reviewWidth:this.originalWidth)};var Button=function(a){this.container=a||$(document.body);this.ref=null;this.constructElement();this.currentIndex=0;this.content={};this.colors={};this.type="textfield";this.active=!0;this.id=Math.random();this.name="item";this.visible=this.layered=!1;this.canSimplify=!0;this.hasEvents=!1;this.xml="";this.deferredResourceIndex=0;this.canvas=null;this.m_nYOffset=this.m_nXOffset=0;this.height=this.width=1E3};Button.prototype=new StageItem;Button.prototype.objectType="Item";
Button.prototype.innerType="Item";Button.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;
Button.prototype.loadFromXML=function(a,b,c){this.loadBaseFromXML(a,b,c);this.style=$(a).attr("style");this.connectdata=$(a).attr("connectdata");this.originalWidth=parseInt($(a).attr("width"));this.originalHeight=parseInt($(a).attr("height"));this.originalX=this.x;this.originalY=this.y;if(0<$(a).children("data").children("textdata").children("vartext").length)this.textlib=$(a).children("data");b=$(a).children("data").children("textdata").children("vectortext").children("path");c=$(a).children("data").children("textdata").children("vectortext").children("pr");
if(1==b.length||1==c.length){a=$(a).children("data").children("textdata").children("vectortext");if(null!=$(a).attr("top"))this.originalRectShape=this.rectShape=new ppRect(parseInt($(a).attr("left")),parseInt($(a).attr("top")),parseInt($(a).attr("right")),parseInt($(a).attr("bottom")));this.content.path=1==c.length?PathLib.getPathFromXML(c):b.text()}this.canSimplify=!1};Button.prototype.createBaseRef=StageItem.prototype.createRef;
Button.prototype.createRef=function(){if(!this.ref&&(this.createBaseRef(),this.ref.addClass("interactive"),!(1<this.ref.children().length))){this.contentRef=$('<div class="item unhideable"></div>');this.contentRef.css("width","100%");this.ref.append(this.contentRef);var a=$("<canvas></canvas>");a.css("position","absolute");this.ref.append(a);var b=$("<canvas></canvas>");b.css("position","relative");this.ref.append(b);this.jcanvas=b;this.border=a.get(0);this.canvas=b.get(0);this.render("btn_bg");this.ref.get(0).item=
this;this.ref.css("width",this.width-2);this.ref.css("height",this.height-2)}};Button.prototype.destroyBaseRef=StageItem.prototype.destroyRef;Button.prototype.destroyRef=function(){this.ref.empty();this.contentRef.remove();this.contentRef=null;this.destroyBaseRef()};Button.prototype.bindEventsBase=StageItem.prototype.bindEvents;
Button.prototype.bindEvents=function(){var a=this;this.bindEventsBase();this.ref.bind("mouseover",function(){a.render("btn_hover")});this.ref.bind("mouseout mouseup",function(){a.render("btn_bg")});this.ref.bind("mousedown",function(){a.render("btn_down")})};Button.prototype.renderCallback=function(){this.width=this.originalWidth;this.height=this.originalHeight;this.render("btn_bg")};
Button.prototype.render=function(a){this.ref&&(this.colors[a]&&this.colors[a].apply(this.ref,this,!0,!1),this.colors.btn_border&&this.ref.css("border-color",this.colors.btn_border.toColorString()),this.renderVectorForeground(a))};Button.prototype.renderVectorForeground=VectorShape.prototype.render;Button.prototype.renderOnUpdate=VectorShape.prototype.renderOnUpdate;
Button.prototype.renderCanvas=function(a){if(this.ref){var b=this.border.getContext("2d"),c=parseInt(900*Math.random()+1100)%1E3;b.fillStyle="#"+c;b.fillStyle="#fff";b.lineWidth=1;b.strokeStyle="#ccc";c=b.createLinearGradient(0,0,0,this.height);c.addColorStop(0,"#fcfcfc");c.addColorStop(1,"#eaeaea");b.fillStyle=c;this.colors[a]&&this.colors[a].applyCanvas(b,this,!0,!1);b.fillRect(0.5,0.5,this.width,this.height-1);b.strokeRect(0.5,0.5,this.width,this.height-1)}};var ImageItem=function(a){this.container=a||$(document.body);this.ref=null;this.constructElement();this.type="image";this.active=!0;this.id=Math.random();this.name="item";this.visible=this.layered=!1;this.canSimplify=!0;this.hasEvents=!1;this.xml="";this.deferredResourceIndex=0;this.canvas=null;this.m_nYOffset=this.m_nXOffset=0;this.height=this.width=1E3};ImageItem.prototype=new StageItem;ImageItem.prototype.objectType="Item";ImageItem.prototype.innerType="Image";
ImageItem.extractAnimatedGif=function(a){var b=null;$(a).children("imagelib").children("imagedata").each(function(a,d){var e=$(d).attr("altimage");e&&e.indexOf(".gif")==e.length-4&&(b=e)});return b};ImageItem.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;
ImageItem.prototype.loadFromXML=function(a,b,c){this.loadBaseFromXML(a,b,c);this.width=parseInt($(a).attr("width"));this.height=parseInt($(a).attr("height"));this.loadSizeFromXML(a);this.loadAnimationsFromXML(a);this.zoomtype=$(a).attr("zoomtype");this.btnxpos=parseInt($(a).attr("btnxpos"));this.btnypos=parseInt($(a).attr("btnypos"));if(0<$(a).children("zoomdata").children("imagedata").length)this.zoomSrc=player.basepath+$(a).children("zoomdata").children("imagedata").attr("url"),this.zoomDataType=
$(a).children("zoomdata").children("imagedata").attr("type"),this.zoomWidth=parseInt($(a).children("zoomdata").children("imagedata").attr("width")),this.zoomHeight=parseInt($(a).children("zoomdata").children("imagedata").attr("height"));if(0<$(a).children("zoomdata").children("html5data").length)this.zoomSrc=player.basepath+"mobile/"+$(a).children("zoomdata").children("html5data").attr("url");this.canSimplify=!1;this.createStates(a)};
ImageItem.prototype.createStates=function(a){var b=this;$(a).children("states").children().each(function(a,d){var e=$(d).attr("name");b.states[e]={index:a};b.stateCount++})};
ImageItem.prototype.loadContentFromXML=function(a){this.content.src=Element.PixelSrc;var b=$(a).find("html5data"),c=null;0<b.length&&b.attr("url")&&(c="mobile/"+b.attr("url"));c||(c=$(a).children("zoomdata").children("imagedata").attr("url"));c||(c=$(a).children("data").children("imagedata").attr("url"));if(c&&(this.content.src=player.basepath+c,this.content.src.indexOf(".swf")==this.content.src.length-4))this.content.src=this.content.src.replace(".swf",".png"),this.content.src=this.content.src.replace(globals.strContentFolder,
"mobile");0<$(a).children("imagelib").length&&this.loadImageDataFromXML(a)};ImageItem.prototype.destroyBaseRef=StageItem.prototype.destroyRef;ImageItem.prototype.destroyRef=function(){if(this.zoomButton)this.zoomButton.remove(),this.zoomButton=null;if(this.zoomImage)this.zoomImage.remove(),this.zoomImage=null;this.destroyBaseRef()};ImageItem.prototype.createBaseRef=StageItem.prototype.createRef;
ImageItem.prototype.createRef=function(){if(!this.ref&&(this.createBaseRef(),this.loadContentFromXML(this.xml,this.slide,this.layer),this.contentRef=$('<image class="item unhideable"></image>'),this.contentRef.attr("width",this.width),this.contentRef.attr("height",this.height),this.contentRef.attr("src",this.content.src),this.ref.append(this.contentRef),this.ref.get(0).item=this,this.zoomDataType)){var a=$("<div class='zoombutton'><div class='zoombuttoninner'></div></div>");a.css("left",this.btnxpos);
a.css("top",this.btnypos);a.css("z-index",this.depth);this.ref.addClass("interactive");this.ref.addClass("clickable");this.ref.append(a);this.zoomButton=a;if(document.all&&player.isLocalFileSystem)this.zoomtype="flashwindow";"htmlwindow"==this.zoomtype?this.setupZoomExternal():this.setupZoomLightbox()}};
ImageItem.prototype.setupZoomLightbox=function(){var a=this,b=$("<image class='zoomimage'/>");b.attr("src",this.zoomSrc);b.attr("width",this.zoomWidth);b.attr("height",this.zoomHeight);$(document.body).append(b);b.hide();this.zoomImage=b;if(!a.clickEvent){b=new StoryEvent(a);b.trigger="onrelease";var c=new TimelineAction(a);c.type="zoom_image";c.xml="<zoom_image/>";c.item=a;b.actions.push(c);a.events.push(b);a.clickEvent=b}this.zoomButton.bind(player.isMobile?"touchend":"click",function(){a.zoom_image()})};
ImageItem.prototype.setZoomedCSS=function(a){var b=player.scaleWithTransform?1:player.frameScale,c=$(".framewrap").offset(),d=c.left*b,c=c.top*b,e=d+player.frame.containerWidth*player.frameScale,f=c+player.frame.containerHeight*player.frameScale,g=f-c,h=e-d,j=this.zoomWidth,k=this.zoomHeight,j=j*player.frameScale,k=k*player.frameScale,l=j/k;l>player.frame.aspectRatio&&j>h?(j=h,k=h*this.zoomHeight/this.zoomWidth):l<=player.frame.aspectRatio&&k>g&&(k=g,j=g/this.zoomHeight*this.zoomWidth);g=this.ref.offset().left*
b+this.width/2-j/2;b=this.ref.offset().top*b+this.height/2-k/2;g<d&&(g=d);b<c&&(b=c);g+j>e&&(g=g-(g+j)+e);b+k>f&&(b=b-(b+k)+f);a.css("width",j);a.css("height",k);a.css("left",g);a.css("top",b)};
ImageItem.prototype.zoom_image=function(){var a=this,b=this.zoomImage,c=player.scaleWithTransform?1:player.frameScale;b.css("width",a.width*player.frameScale);b.css("height",a.height*player.frameScale);b.css("left",a.ref.offset().left*c);b.css("top",a.ref.offset().top*c);b.css("-webkit-transition-property","width,height,left,top");b.css("-webkit-transition-duration","300ms");b.css("-moz-transition-property","width,height,left,top");b.css("-moz-transition-duration","300ms");b.css("-ms-transition-property",
"width,height,left,top");b.css("-ms-transition-duration","300ms");setTimeout(function(){a.setZoomedCSS(b)},0);setTimeout(function(){a.handleEvent("onzoomopened",null,null,!1,!0)},300);b.show();var d=$(".frameInterstitial");0==d.length&&(d=$("<div class='frameInterstitial'></div>"),$(".framewrap").prepend(d));d.removeClass("dark");player.modalInterstitial=!0;player.currentZoomImage=a;MouseEvents.suppressPendingHide();if(!a.addedHideable)MouseEvents.addHideable(".zoomimage",".zoombutton,.image",function(){player.modalInterstitial=
!1;a.zoomed&&(c=player.scaleWithTransform?1:player.frameScale,b.css("-webkit-transition-duration","200ms"),b.css("-moz-transition-duration","200ms"),b.css("-ms-transition-duration","200ms"),b.css("width",a.width*player.frameScale),b.css("height",a.height*player.frameScale),b.css("left",a.ref.offset().left*c),b.css("top",a.ref.offset().top*c),setTimeout(function(){$(".zoomimage").hide();a.handleEvent("onzoomclosed",null,null,!1,!0)},200),player.isIE&&$(".zoomimage").hide());d.hide();player.showingInterstitial=
!1;a.zoomed=!1;player.currentZoomImage=null}),a.addedHideable=!0;d.removeClass("black white");d.unbind();d.show();a.zoomed=!0;a.zoomedImage=b};ImageItem.ZoomRandom=Math.random();
ImageItem.prototype.setupZoomExternal=function(){var a=this,b=player.isMobile?"touchend":"click";if(!a.boundClick)a.boundClick=!0,this.ref.bind(b,function(){if(document.all)if(player.isLocalFileSystem)a.zoomWindow=window.open(a.zoomSrc,story.resumeID+ImageItem.ZoomRandom+"_zoom");else try{a.zoomWindow&&a.zoomWindow.close(),a.zoomWindow=window.open("",story.resumeID+ImageItem.ZoomRandom+"_zoom"),a.zoomWindow.document.body.innerHTML="<base href='"+location.href+"'><img src='"+a.zoomSrc+"' style='max-width:100%;max-height:100%;'/>"}catch(b){a.zoomWindow=
window.open(a.zoomSrc,story.resumeID+ImageItem.ZoomRandom+"_zoom")}else player.useSimpleZoom?a.zoomWindow=window.open(a.zoomSrc,story.resumeID+ImageItem.ZoomRandom+"_zoom"):(a.zoomWindow=window.open("",story.resumeID+"_zoom"),$(a.zoomWindow.document.body).empty(),$(a.zoomWindow.document.body).append($("<base href='"+location.href+"'><img src='"+a.zoomSrc+"' style='max-width:100%;max-height:100%;'/>")))})};ImageItem.prototype.render=function(){};var ItemGroup=function(a,b,c){this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.constructElement();this.active=!0;this.visible=!1};ItemGroup.prototype=new StageItem;ItemGroup.prototype.innerType="ItemGroup";ItemGroup.prototype.objectType="Item";
ItemGroup.prototype.loadFromXML=function(a){this.id=$(a).attr("id");this.shapemaskid=$(a).attr("shapemaskid");this.xml=a;this.loadElementInfoFromXML(a);this.loadSizeFromXML(a);this.loadAnimationsFromXML(a);if(0<$(this.xml).children("dragdrop").length&&("true"==$(this.xml).children("dragdrop").first().attr("dragenabled")&&this.convertToDragItem(this.xml),"true"==$(this.xml).children("dragdrop").first().attr("dropenabled")&&this.convertToDropArea(this.xml),"true"==$(this.xml).children("dragdrop").first().attr("dragoverenabled")))this.announceDragOver=
!0,this.setupDragOver(this.xml);this.loadChildrenFromXML(a,this.slide,this.layer,function(a){a.canSimplify=!1});this.canSimplify=!1};ItemGroup.prototype.createBaseRef=StageItem.prototype.createRef;ItemGroup.prototype.createRef=function(){this.ref||this.createBaseRef()};ItemGroup.prototype.renderForeground=function(){};ItemGroup.prototype.isPointActive=function(a,b,c,d){var e=!1,f;for(f in this.children){var g=this.children[f];if(g!=c&&(!d||!d(g)))e=e||g.isPointActive(a,b,c,d)}return e};var ShuffleGroup=function(a,b,c){this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.constructElement();this.active=!0;this.visible=!1};ShuffleGroup.prototype=new ItemGroup;ShuffleGroup.prototype.innerType="ShuffleGroup";ShuffleGroup.prototype.objectType="Item";ShuffleGroup.prototype.loadBaseFromXML=ItemGroup.prototype.loadFromXML;
ShuffleGroup.prototype.loadFromXML=function(a){var b=this;b.xml=a;this.loadBaseFromXML(a);this.shuffleAttr=$(a).attr("shuffle");this.canSimplify=!1;$.each(this.children,function(a,d){d.shuffleGroup=b})};ShuffleGroup.prototype.baseShow=ShuffleGroup.prototype.show;ShuffleGroup.prototype.show=function(a,b,c){this.baseShow(a,b,c);"false"!=this.shuffleAttr&&this.shuffle()};
ShuffleGroup.prototype.shuffle=function(){if(!("true"!=this.shuffleAttr||this.shuffled))0<$(this.xml).find("droplist").length?this.shuffleDropLists():this.shuffleElements(),this.shuffled=!0};ShuffleGroup.prototype.shuffleDropLists=function(){var a=this;$.each(this.children,function(b,c){"droplist"==c.innerType&&(a.shuffleSelect(c.select.get(0)),c.update())})};
ShuffleGroup.prototype.shuffleSelect=function(a){for(var b=a.options,c=[],d=b.length-1;0<=d;d--)c.push(b[d]),$(b[d]).remove();for(;c.length;)d=c.splice(this.getRandomIndex(c),1)[0],b.add(d);a.selectedIndex=0};
ShuffleGroup.prototype.shuffleElements=function(){var a=[],b=[],c=!0,d=-1E3,e={},f=0;$.each(this.children,function(g,h){h.shufflelock?e[f]=h:(-1E3!=d&&h.xpos!=d&&(c=!1),d=h.xpos,b.push(h),a.push(h));h.unshuffleX=h.x;h.unshuffleY=h.y;f++});if(c)this.shuffleStacked(e);else{for(;0<b.length&&0<a.length;){var g=b.pop(),h=this.getRandomIndex(a),h=a.splice(h,1)[0];h.originalX=h.unshuffleX;h.originalY=h.unshuffleY;h.x=g.unshuffleX;h.y=g.unshuffleY;h.ref&&(h.ref.css("top",h.y+"px"),h.ref.css("left",h.x+"px"))}$.each(this.children,
function(a,b){b.shuffled=!0;b.shuffleX=b.x;b.shuffleY=b.y;b.updateMatrixComplete(!0)})}};
ShuffleGroup.prototype.shuffleStacked=function(a){var b=[],c=[],d=1E3,e=0,f=[];$.each(this.children,function(a,e){if(!e.shufflelock){c.push(e);b.push(e);e.unshuffleX=e.x;e.unshuffleY=e.y;d=Math.min(d,e.ypos);a:{for(var g=0;g<f.length;g++)if(e.y<f[g].y){f.splice(g,0,e);break a}f.push(e)}}});1<f.length&&(e=f[1].y-(f[0].y+f[0].height),e=Math.max(e,0));var g=d;0==c.length&&(g=0);for(var h=0;0<b.length;){var j;a[h]?j=a[h]:(j=this.getRandomIndex(b),j=b.splice(j,1)[0]);j.originalX=j.unshuffleX;j.originalY=
j.unshuffleY;j.y=g;g+=j.height;g+=e;j.ref&&j.ref.css("top",j.y+j.yoffset+"px");h++}$.each(this.children,function(a,b){b.shuffled=!0;b.shuffleX=b.x;b.shuffleY=b.y;b.updateMatrixComplete(!0)})};
ShuffleGroup.prototype.shuffleRows=function(){if(!this.shuffled){this.shuffled=!0;var a={},b=[],c=[];$.each(this.children,function(d,f){a[f.x]&&(a={},b.push(c),c=[]);c.push(f);a[f.x]=f});b.push(c);for(var d=0;10>d;d++)this.swapRow(this.getRandomMember(b),this.getRandomMember(b));$.each(this.children,function(a,b){b.shuffled=!0;b.shuffleX=b.x;b.shuffleY=b.y})}};ShuffleGroup.prototype.getRandomIndex=function(a){return parseInt(Math.random()*a.length)};
ShuffleGroup.prototype.getRandomMember=function(a){var b=this.getRandomIndex(a);return a[b]};ShuffleGroup.prototype.swapRow=function(a,b){var c=this;a!=b&&$.each(a,function(a,e){c.swapItem(e,b[a])})};
ShuffleGroup.prototype.swapItem=function(a,b,c){if(!(a==b||!a||!b)){var d=a.y,e=a.x;a.y=b.y;b.y=d;a.originalY=a.y;b.originalY=b.y;a.ref.css("top",a.y+"px");b.ref.css("top",b.y+"px");if(c)a.x=b.x,b.x=e,a.originalX=a.x,b.originalX=b.x,a.ref.css("left",a.x+"px"),b.ref.css("left",b.x+"px");a.updateMatrixComplete(!0);b.updateMatrixComplete(!0)}};var ScrollArea=function(a,b,c){this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.constructElement();this.active=!0;this.visible=!1};ScrollArea.prototype=new ItemGroup;ScrollArea.prototype.innerType="ScrollArea";ScrollArea.prototype.objectType="Item";ScrollArea.prototype.loadBaseFromXML=ItemGroup.prototype.loadFromXML;
ScrollArea.prototype.loadFromXML=function(a){var b=this;b.xml=a;this.loadBaseFromXML(a);$(b.xml).children("background").each(function(a,d){b.background=new Background(b.ref);b.background.loadFromXML(d)});this.canSimplify=!1;$.each(this.children,function(a,d){d.scrollArea=b})};ScrollArea.prototype.baseShow=ScrollArea.prototype.show;ScrollArea.prototype.show=function(a,b,c){this.baseShow(a,b,c)};
ScrollArea.prototype.createRef=function(){this.parent.ref||this.parent.createRef();this.container=this.parent.ref;if(this.ref)this.render(null,!1,null,"StageItem createRef");else{var a=this;this.ref=$('<div class="item scrollarea"></div>');this.ref.addClass(this.type);this.ref.addClass(this.innerType.toLowerCase());this.ref.addClass("item_"+this.id);this.ref.attr("id","item_"+this.id);player.showItemInfo&&this.ref.append($('<div class="itemid">'+this.id+"</div>"));this.applySize(this.ref);this.container.append(this.ref);
this.ref.get(0).item=this;a.background&&a.background.apply(a.ref);$.each(this.children,function(a,c){c.createRef&&c.createRef()});a.visible=!1;this.ref.bind("scroll",function(){var b=a.ref.get(0);if(b.scrollHeight<=b.scrollTop+a.height)a.hasScrolledToEnd=!0;b=a.ref.get(0);b.style.cssText+=";-webkit-transform:rotateZ(0deg)";player.uselessOffsetHeight=b.offsetHeight;b.style.cssText+=";-webkit-transform:none";a.updateMatrixComplete(!0)});-1<navigator.userAgent.indexOf("AppleWebKit")&&-1<navigator.userAgent.indexOf("Macintosh")&&
a.ref.css("border","solid 1px transparent")}};ScrollArea.prototype.isPointVisible=function(a,b){var c=this.matrix.unTransformPoint(a,b),d=this.ref.get(0).scrollTop;return c.y>=d&&c.y<=d+this.height};ScrollArea.prototype.getScrollPosition=function(){return this.ref?this.ref.get(0).scrollTop:0};ScrollArea.prototype.Viewed=function(){return!this.ref?"false":this.ref.get(0).scrollHeight<=this.height||this.hasScrolledToEnd?"true":"false"};
ScrollArea.prototype.hasScrollBars=function(){return this.ref.get(0).offsetHeight<this.ref.get(0).scrollHeight};var StateGroup=function(a,b,c){this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.constructElement();this.active=!0;this.visible=!1};StateGroup.prototype=new ItemGroup;StateGroup.prototype.innerType="StateGroup";
StateGroup.prototype.loadFromXML=function(a){var b=this;this.id=$(a).attr("id");this.xml=a;this.loadElementInfoFromXML(a);this.loadSizeFromXML(a);this.loadAnimationsFromXML(a);if(0<$(this.xml).children("dragdrop").length&&("true"==$(b.xml).children("dragdrop").first().attr("dragenabled")&&b.convertToDragItem(b.xml),"true"==$(b.xml).children("dragdrop").first().attr("dropenabled")&&b.convertToDropArea(b.xml),"true"==$(b.xml).children("dragdrop").first().attr("dragoverenabled")))this.announceDragOver=
!0,b.setupDragOver(b.xml);this.loadChildrenFromXML(a,b.slide,b.layer,function(a){a.canSimplify=!1;a.group=b});this.canSimplify=!1;this.actionstates={};this.actionstateindices={};$(a).children("actionstates").children().each(function(a,d){var e=$(d).attr("name"),f=$(d).children("actions").children();b.actionstates[e]=f;b.actionstateindices[e]=a})};StateGroup.prototype.render=VectorShape.prototype.render;StateGroup.prototype.renderOnUpdate=VectorShape.prototype.renderOnUpdate;
StateGroup.prototype.executeStateActions=function(a){var b=this;(a=b.actionstates[a])&&$.each(a,function(a,d){b.runAction(d)})};var ExpandingLabel=function(a,b,c){this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.expandedHeight=0;this.constructElement();this.events=[];this.active=!0;this.showContent=this.showTitle=this.visible=!1;this.VAR_EXPANDED="_expanded";this.GROW_TITLE_TIME=250;this.GROW_CONTENT_TIME=500;this.ARROW_HEIGHT=18;this.FILL_BORDER="border";this.FILL_BG="bg";this.borderwidth=1;this.arrowxpos=this.arrowypos=0;this.m_strAlign="top";this.m_nContentHeight=0;this.m_nRadius=8;this.m_nTitleHeight=
80;this.m_bHideTitleOnComplete=this.m_bShowContentOnComplete=this.m_bAnimatingContentOut=this.m_bAnimatingContentIn=this.m_bAnimatingTitleOut=this.m_bAnimatingTitleIn=this.m_bContentShowing=this.m_bTitleShowing=!1;this.m_nGrowStartTime=0;this.m_nTextHeight=30;this.m_nMarginRight=this.m_nMarginLeft=5;this.m_nMarginRightTitle=20;this.m_nMarginText=this.m_nMarginBottom=this.m_nMarginTop=5;this.m_nHotspotHeight=0;this.m_bShowCloseButton=!1};ExpandingLabel.prototype=new StageItem;
ExpandingLabel.prototype.innerType="ExpandingLabel";ExpandingLabel.prototype.objectType="Item";ExpandingLabel.prototype.extractNextSpecialBool=function(){this.showContent=!0};ExpandingLabel.prototype.getExtraResumeVars=function(){this.variableResumes.VAR_EXPANDED=!0;this.variableDefaults.VAR_EXPANDED=!1;this.variableTypes.VAR_EXPANDED="bool";return{VAR_EXPANDED:this.showContent}};ExpandingLabel.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;
ExpandingLabel.prototype.loadFromXML=function(a,b,c){var d=$(a).children("objects");d.remove();this.loadBaseFromXML(a,b,c);this.expandedHeight=this.height;$(a).append(d);this.id=$(a).attr("id");this.xml=a;this.borderwidth=parseInt($(a).attr("borderwidth"));this.contentheight=parseInt($(a).attr("contentheight"));this.arrowxpos=parseInt($(a).attr("arrowxpos"));this.arrowypos=parseInt($(a).attr("arrowypos"));this.showclosebutton="true"==$(a).attr("showclosebutton");this.hasContent=0<$(a).children("objects").length;
if(0>this.arrowypos){this.m_strAlign="top";if(0>this.arrowxpos)this.arrowxpos=0;if(this.arrowxpos>this.width)this.arrowxpos=this.width;this.arrowypos=this.ARROW_HEIGHT}else if(this.arrowypos>this.expandedHeight){this.m_strAlign="bottom";if(0>this.arrowxpos)this.arrowxpos=0;if(this.arrowxpos>this.width)this.arrowxpos=this.width;this.arrowypos=this.expandedHeight+this.ARROW_HEIGHT}else if(this.arrowxpos>this.width)this.m_strAlign="left",this.arrowxpos=this.width+this.ARROW_HEIGHT;else if(0>this.arrowxpos)this.m_strAlign=
"right",this.arrowxpos=this.ARROW_HEIGHT;this.loadChildrenFromXML(a,this.slide,this.layer,function(a){a.canSimplify=!1});this.canSimplify=!1};ExpandingLabel.prototype.createBaseRef=StageItem.prototype.createRef;ExpandingLabel.prototype.destroyBaseRef=StageItem.prototype.destroyRef;ExpandingLabel.prototype.renderForeground=VectorShape.prototype.renderForeground;ExpandingLabel.prototype.renderVector=VectorShape.prototype.render;ExpandingLabel.prototype.renderOnUpdate=VectorShape.prototype.renderOnUpdate;
ExpandingLabel.prototype.createRef=function(){if(!this.ref){var a=this;this.createBaseRef();this.ref.addClass("expandinglabel interactive");this.ref.children().addClass("expandinglabelcontent");this.expandingLabelContent=this.ref.children();this.canvasWidth=a.width+2*a.borderwidth+a.ARROW_HEIGHT;this.canvasHeight=this.expandedHeight+2*a.borderwidth+a.ARROW_HEIGHT;var b=$('<canvas class="content" width="'+this.canvasWidth+'" height="'+this.canvasHeight+'"></canvas>');b.css("position","absolute");this.ref.append(b);
this.backgroundCanvas=b.get(0);b=$('<canvas class="content expandinglabeltitlecanvas" width="'+this.canvasWidth+'" height="'+this.canvasHeight+'"></canvas>');b.css("position","absolute");this.ref.append(b);this.jcanvas=b;this.canvas=b.get(0);this.contentRef=$('<div class="item unhideable expandinglabeltitle"></div>');this.contentRef.css("width","100%");this.ref.prepend(this.contentRef);this.ref.css("width",a.width);this.ref.css("height",this.expandedHeight);this.visible=!1;this.hide();setTimeout(function(){var b=
a.id.replace("_expandinglabel","");a.button=a.parent.children[b];a.button.ref&&a.button.ref.addClass("interactive")},0)}};
ExpandingLabel.prototype.show=function(a,b,c){this.createRef(this.parent.ref);if(this.visible){var d=this;if(b){if(!c||0==b.duration)this.visible=!0,this.variables.Expanded="true",d.ref.show(),d.handleEvent("ontransitionin",null,null,!1,!0),b.setTarget(this),b.apply(function(){d.handleEvent("ontransitionincomplete",null,null,!1,!0)})}else this.visible=!0,this.variables.Expanded="true",d.ref.show(),d.handleEvent("ontransitionin",null,null,!1,!0),d.handleEvent("ontransitionincomplete",null,null,!1,
!0)}};ExpandingLabel.prototype.hide=function(a,b){this.visible=!1;this.variables.Expanded="false";var c=this;c.handleEvent("ontransitionout",null,null,!1,!0);b?(b.setTarget(this),b.apply(function(){c.ref&&c.ref.hide();c.handleEvent("ontransitionoutcomplete",null,null,!1,!0)})):(this.ref&&this.ref.hide(),c.handleEvent("ontransitionoutcomplete",null,null,!1,!0))};
ExpandingLabel.prototype.render=function(a,b){this.renderVector(a,b);if(this.ref){var c=this.width,d=this.showContent||!this.hasContent?this.expandedHeight:this.m_nTextHeight+this.m_nMarginTop+this.m_nMarginBottom;yoffset=xoffset=0;var e=this.arrowypos;this.showContent?(this.ref.css("top",this.y),this.expandingLabelContent.show()):("right"==this.m_strAlign||"left"==this.m_strAlign?(e=this.arrowypos/this.expandedHeight*d,this.ref.css("top",this.y+this.arrowypos-e)):"bottom"==this.m_strAlign&&this.ref.css("top",
this.y+this.expandedHeight-d),this.expandingLabelContent.hide());var f=this.backgroundCanvas.getContext("2d");f.lineWidth=this.borderwidth;this.colors[this.FILL_BORDER].applyCanvas(f,this,!1,!0);this.colors[this.FILL_BG].applyCanvas(f,this,!0,!1);f.clearRect(0,0,this.canvasWidth,this.canvasHeight);f.save();f.translate(f.lineWidth/2,f.lineWidth/2);f.beginPath();$(this.canvas).css("margin","6px 8px 0px "+(f.lineWidth+5)+"px");switch(this.m_strAlign){case "top":f.translate(0,this.ARROW_HEIGHT);$(this.backgroundCanvas).css("margin-top",
-this.ARROW_HEIGHT+"px");this.DrawBottomCaption(f,0,-this.ARROW_HEIGHT,c,d,this.m_nRadius,this.arrowxpos,this.ARROW_HEIGHT);break;case "bottom":this.DrawTopCaption(f,0,0,c,d,this.m_nRadius,this.arrowxpos,this.ARROW_HEIGHT);break;case "left":this.DrawLeftCaption(f,0,0,c,d,this.m_nRadius,e,this.ARROW_HEIGHT);break;case "right":f.translate(this.ARROW_HEIGHT,0),$(this.backgroundCanvas).css("margin-left",-this.ARROW_HEIGHT+"px"),this.DrawRightCaption(f,-this.ARROW_HEIGHT,0,c,d,this.m_nRadius,e,this.ARROW_HEIGHT)}f.fill();
f.stroke();f.restore();this.renderForeground()}};ExpandingLabel.prototype.hideOthers=function(){var a=this;$(".expandinglabel").each(function(b,c){c.item&&c.item!=a&&c.item.hide()})};
ExpandingLabel.prototype.togglecontent=function(){this.showContent=!this.showContent;this.variables.Expanded=this.showContent.toString();this.showContent?($(".above").removeClass("above"),$(".showing").removeClass("showing"),this.hideOthers(),this.render(null,!0,this.width,this.expandedHeight),this.visible=!0,this.show(),this.ref.addClass("above showing"),this.button.ref.addClass("above showing"),this.handleEvent("onobjectevent","contentin",null,!1,!1,!0),this.handleEvent("onobjectevent","contentincomplete",
null,!1,!1,!0)):(this.hide(),$(".above").removeClass("above"),this.handleEvent("onobjectevent","contentout",null,!1,!1,!0),this.handleEvent("onobjectevent","contentoutcomplete",null,!1,!1,!0))};
ExpandingLabel.prototype.showcomplete=function(){this.showContent=!0;this.variables.Expanded=this.showContent.toString();$(".above").removeClass("above");$(".showing").removeClass("showing");this.hideOthers();this.render(null,!0,this.width,this.expandedHeight);this.visible=!0;this.show();this.ref.addClass("above showing");this.button.ref.addClass("above showing");this.handleEvent("onobjectevent","contentin")};
ExpandingLabel.prototype.hidecomplete=function(){this.variables.Expanded="false";this.hide();$(".above").removeClass("above");this.showTitle=this.showContent=!1};
ExpandingLabel.prototype.showtitle=function(){if(!this.showContent){var a=this.m_nTextHeight+this.m_nMarginTop+this.m_nMarginBottom,b=this.expandedHeight-a;this.showTitle=this.visible=!0;this.showContent=!1;this.variables.Expanded="false";this.show();$(".above").removeClass("above");this.ref.addClass("above");this.button.ref.addClass("above");this.render(null,!0,this.width,a,0,b)}};
ExpandingLabel.prototype.hidetitle=function(){if(!this.showContent)this.showContent=this.showTitle=this.visible=!1,this.variables.Expanded="false",this.hide(),$(".above").removeClass("above")};
ExpandingLabel.prototype.DrawTopCaption=function(a,b,c,d,e,f,g,h){0>f&&(f=0);var j=g<=f+h/2,k=g>=d-(f+h/2),l=g-h/2,m=d-(g+h/2),n=0;j&&(l=g,m=d-(g+h));k&&(l=g-h,m=d-g);0>l&&(l=0);0>m&&(m=0);l>d&&(l=d);m>d&&(m=d);var g=h/2,p=0,p=f;l+h>d&&(n=h,h=n-(l+n-d)/2,l-=(l+n-d)/2);m+h>d&&(n=h,h=n-(m+n-d)/2,m-=(m+n-d)/2);n=d-m;m<f&&(n=d-f);a.moveTo(b+n,c);a.lineTo(b+d-p,c);a.arcTo(b+d,c,b+d,c+p,p);p=f;m<f&&(p=m);a.lineTo(b+d,c+e-p);a.arcTo(b+d,c+e,b+d-p,c+e,p);p=f;a.lineTo(b+d-m,c+e);l<f&&(p=l);j?a.lineTo(b+l,
c+e+h):k?a.lineTo(b+d-m,c+e+h):a.lineTo(b+l+g,c+e+h);a.lineTo(b+l,c+e);a.lineTo(b+p,c+e);a.arcTo(b,c+e,b,c+e-p,p);p=f;a.lineTo(b,c+p);a.arcTo(b,c,b+p,c,p);a.lineTo(b+n,c)};
ExpandingLabel.prototype.DrawBottomCaption=function(a,b,c,d,e,f,g,h){0>f&&(f=0);var j=g<=f+h/2,k=g>=d-(f+h/2),l=g-h/2,m=d-(g+h/2),n=0;j&&(l=g,m=d-(g+h));k&&(l=g-h,m=d-g);0>l&&(l=0);0>m&&(m=0);l>d&&(l=d);m>d&&(m=d);var g=h/2,p=0,p=f;m<f&&(p=m);l+h>d&&(n=h,c+=(l+n-d)/2,h=n-(l+n-d)/2,l-=(l+n-d)/2);m+h>d&&(n=h,c+=(m+n-d)/2,h=n-(m+n-d)/2,m-=(m+n-d)/2);n=d-m;a.moveTo(b+n,c+h);a.lineTo(b+d-p,c+h);a.arcTo(b+d,c+h,b+d,c+h+p,p);p=f;a.lineTo(b+d,c+e+h-p);a.arcTo(b+d,c+h+e,b+d-p,c+e+h,p);p=f;a.lineTo(b+p,c+h+
e);a.arcTo(b,c+e+h,b,c+e+h-p,p);p=f;l<f&&(p=l);a.lineTo(b,c+h+p);a.arcTo(b,c+h,b+p,c+h,p);a.lineTo(b+l,c+h);j?a.lineTo(b+l,c):k?a.lineTo(b+d-m,c):a.lineTo(b+l+g,c);a.lineTo(b+n,c+h)};
ExpandingLabel.prototype.DrawLeftCaption=function(a,b,c,d,e,f,g,h){0>f&&(f=0);var j=g<=h/2,k=g>=e-h/2,l=g-h/2,m=e-(g+h/2),n=0;j&&(l=g,m=e-(g+h));k&&(l=g-h,m=e-g);0>l&&(l=0);0>m&&(m=0);l>e&&(l=e);m>e&&(m=e);n=f;g=d/2;a.moveTo(b+g,c);n=f;l<f&&(n=l);a.lineTo(b+d-n,c);a.arcTo(b+d,c,b+d,c+n,n);m+h>e&&(n=h,h=n-(m+n-e)/2,m-=(m+n-e)/2);if(l+h>e)var p=l,n=h,l=p-(p+n-e)/2,h=n-(p+n-e)/2;a.lineTo(b+d,c+l);j?a.lineTo(b+d+h,c+l):k?a.lineTo(b+d+h,c+e-m):a.lineTo(b+d+h,c+l+h/2);a.lineTo(b+d,c+l+h);n=f;m<f&&(n=m);
a.lineTo(b+d,c+e-n);a.arcTo(b+d,c+e,b+d-n,c+e,n);n=f;a.lineTo(b+n,c+e);a.arcTo(b,c+e,b,c+e-n,n);n=f;a.lineTo(b,c+n);a.arcTo(b,c,b+n,c,n);a.lineTo(b+g,c)};
ExpandingLabel.prototype.DrawRightCaption=function(a,b,c,d,e,f,g,h){0>f&&(f=0);var j=g<=h/2,k=g>=e-h/2,l=g-h/2,m=e-(g+h/2),n=0;j&&(l=g,m=e-(g+h));k&&(l=g-h,m=e-g);0>l&&(l=0);0>m&&(m=0);l>e&&(l=e);m>e&&(m=e);n=f;g=d/2;a.moveTo(b+h+g,c);a.lineTo(b+h+d-n,c);a.arcTo(b+h+d,c,b+h+d,c+n,n);a.lineTo(b+h+d,c+e-n);a.arcTo(b+h+d,c+e,b+h+d-n,c+e,n);n=f;m<f&&(n=m);a.lineTo(b+h+n,c+e);a.arcTo(b+h,c+e,b+h,c+e-n,n);m+h>e&&(n=h,b+=(m+n-e)/2,h=n-(m+n-e)/2,m-=(m+n-e)/2);l+h>e&&(d=l,n=h,b+=(d+n-e)/2,l=d-(d+n-e)/2,h=
n-(d+n-e)/2);a.lineTo(b+h,c+e-m);j?a.lineTo(b,c+l):k?a.lineTo(b,c+e-m):a.lineTo(b,c+l+h/2);a.lineTo(b+h,c+l);n=f;l<f&&(n=l);a.lineTo(b+h,c+n);a.arcTo(b+h,c,b+h+n,c,n);a.lineTo(b+h+g,c)};var SequenceCtrl=function(a,b,c){this.container=a||$(document.body);this.ref=null;this.constructElement();this.slide=b;this.layer=c;this.constructElement();this.events=[];this.active=!0;this.visible=!1;this.currentIndex=0;this.content={};this.colors={};this.active=!0;this.id=Math.random();this.name="item";this.visible=this.layered=!1;this.canSimplify=!0;this.hasEvents=!1;this.xml="";this.deferredResourceIndex=0;this.padY=20;this.padX=25;this.originalIndex=this.dropIndex=-1;this.indexedChildren=[]};
SequenceCtrl.prototype=new StageItem;SequenceCtrl.prototype.objectType="Item";SequenceCtrl.prototype.innerType="SequenceCtrl";SequenceCtrl.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;SequenceCtrl.prototype.shuffleRows=ShuffleGroup.prototype.shuffleRows;SequenceCtrl.prototype.shuffleElements=ShuffleGroup.prototype.shuffleElements;SequenceCtrl.prototype.getRandomMember=ShuffleGroup.prototype.getRandomMember;SequenceCtrl.prototype.getRandomIndex=ShuffleGroup.prototype.getRandomIndex;
SequenceCtrl.prototype.swapRow=ShuffleGroup.prototype.swapRow;SequenceCtrl.prototype.swapItem=ShuffleGroup.prototype.swapItem;SequenceCtrl.prototype.extractNextSpecialVar=function(a){for(var a=bwChunk.CreateChunk(a),a=new bwChunk(a),b=10,c=0;!a.EOF();){var d=this.indexedChildren[a.NextUBase10(1)];d.y=b;this.variables["_pos"+c]=d.itemdata;b+=d.height+this.padY;c++}};
SequenceCtrl.prototype.getExtraResumeVars=function(){this.variableResumes.VAR_ITEM_ORDER=!0;this.variableDefaults.VAR_ITEM_ORDER="";this.variableTypes.VAR_ITEM_ORDER="string";var a="";if(this.ref){var b=this.getOrderedItemList();$.each(b,function(b,d){a+=bwChunk.UBase10toN(d.sequenceIndex)})}return{VAR_ITEM_ORDER:a}};
SequenceCtrl.prototype.loadFromXML=function(a,b,c){var d=this;this.loadBaseFromXML(a,b,c);this.loadSizeFromXML(a);this.loadAnimationsFromXML(a);this.shortid=$(a).attr("id").replace("list_","");this.parent.children[this.shortid]=this;this.canSimplify=!1;var e=10;$(a).children("data").children("itemlist").children().each(function(a,c){var h=new SequenceItem(d.ref,b);h.offsetY=e;h.offsetX=d.padX;h.sequenceIndex=a;h.loadFromXML(c,b);h.width=d.width-d.padX;h.parent=d;h.offsetParent=d;d.children[h.id]=
h;d.indexedChildren[a]=h;e+=h.height+d.padY;d.indicatorWidth=h.width;d.indicatorOffsetX=h.x})};SequenceCtrl.prototype.createBaseRef=StageItem.prototype.createRef;
SequenceCtrl.prototype.createRef=function(){var a=this;if(!a.ref){this.container=this.parent.ref;this.ref=$('<div class="item sequencectrl interactive"></div>');this.container.append(this.ref);this.applySize(this.ref);this.indicator=$('<div class="sequenceindicator"></div>');this.indicator.css("width",this.width);this.container.append(this.indicator);this.contentRef=this.ref;this.ref.get(0).item=this;this.indicator.css("left",this.x+this.indicatorOffsetX);this.indicator.css("width",this.indicatorWidth);
var b=0;$.each(a.children,function(c,d){d.createRef();a.appendLineNumber(b++,d)});this.shuffleRows();this.ref.bind("scroll",function(){var b=a.ref.get(0);if(b.scrollHeight<=b.scrollTop+a.height)a.hasScrolledToEnd=!0;b=a.ref.get(0);b.style.cssText+=";-webkit-transform:rotateZ(0deg)";player.uselessOffsetHeight=b.offsetHeight;b.style.cssText+=";-webkit-transform:none";a.updateMatrixComplete(!0)});this.slide.ref.bind("scroll",function(){this.scrollLeft=this.scrollTop=0});this.updateScore()}};
SequenceCtrl.prototype.appendLineNumber=function(a,b){var c=b.offsetY,d=$('<div class="sequencelinenumber"></div>');d.text(a+1+".");d.css("top",-1E3);$(document.body).append(d);var e=d.height();0<e&&e<b.height&&(c+=(b.height-e)/2);d.css("top",c);this.variables.ReviewMode&&d.addClass("correct");this.ref.append(d)};
SequenceCtrl.prototype.getOrderedItemList=function(){var a=[];$.each(this.children,function(b,c){for(var d=!1,e=0;e<a.length;e++)if(!d&&c.y<a[e].y){a.splice(e,0,c);d=!0;break}d||a.push(c)});return a};SequenceCtrl.prototype.updateScore=function(){var a=this,b=a.getOrderedItemList();$.each(b,function(b,d){a.variables["_pos"+b]=d.itemdata;d.currentIndex=b})};
SequenceCtrl.prototype.set_review=function(){var a=this.ref.children(".sequencelinenumber"),b=this.getOrderedItemList();$.each(b,function(b,d){d.sequenceIndex==b?$(a[b]).addClass("correct"):$(a[b]).addClass("incorrect")})};SequenceCtrl.prototype.showBase=StageItem.prototype.show;SequenceCtrl.prototype.show=function(a,b,c,d){this.parent.ref&&(this.render(),this.showBase(a,b,c,d),d||$.each(this.children,function(d,f){f.show&&(f.ref.show(),f.render(),f.show(a,b,c))}))};
SequenceCtrl.prototype.Viewed=function(){return"true"};SequenceCtrl.prototype.Viewed=function(){return!this.ref?"false":this.ref.get(0).scrollHeight<=this.height||this.hasScrolledToEnd?"true":"false"};var SequenceItem=function(a){this.container=a||$(document.body);this.ref=null;this.constructElement();this.currentIndex=0;this.content={};this.colors={};this.type="item";this.active=!0;this.id=Math.random();this.name="item";this.visible=this.layered=!1;this.canSimplify=!0;this.hasEvents=!1;this.xml="";this.offsetY=this.offsetX=this.deferredResourceIndex=0;this.canvas=null;this.m_nYOffset=this.m_nXOffset=0;this.m_nHeight=this.m_nWidth=1E3};SequenceItem.prototype=new StageItem;
SequenceItem.prototype.objectType="Item";SequenceItem.prototype.innerType="SequenceItem";SequenceItem.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;
SequenceItem.prototype.loadFromXML=function(a,b,c){this.loadBaseFromXML(a,b,c);this.id=$(a).attr("itemdata").split("_")[1];this.itemdata=$(a).attr("itemdata");this.width=parseInt($(a).children("textdata").first().attr("width"));this.height=parseInt($(a).children("textdata").first().attr("height"));this.x=this.offsetX;this.y=this.offsetY;this.originalWidth=this.width;this.originalHeight=this.height;this.canSimplify=!1;b=new Background(this.ref);b.rotation="90";b.fillType="linear";b.stops.push(b.parseStop('<color rgb="0xBBF8FB" alpha="100" stop="0" />'));
b.stops.push(b.parseStop('<color rgb="0xA5E8EB" alpha="100" stop="100" />'));this.colors.hover=b;b=$(a).children("textdata");a=$(a).children("textdata").children("vectortext");c=a.children("pr");if(1==c.length){this.textSprite={canvas:null,m_nXOffset:0,m_nYOffset:0,width:1E3,height:1E3,charIndex:0,maxCharIndex:0,vectorHot:!1,isShapeMask:!1};if(null!=$(a).attr("top"))this.textSprite.x=$(b).attr("xpos"),this.textSprite.y=$(b).attr("ypos"),this.textSprite.width=$(b).attr("width"),this.textSprite.height=
$(b).attr("height"),this.textSprite.rectShape=new ppRect(parseInt($(a).attr("left")),parseInt($(a).attr("top")),parseInt($(a).attr("right")),parseInt($(a).attr("bottom"))),this.textSprite.rectShape.right=Math.max(this.textSprite.rectShape.right,this.width),this.textSprite.rectShape.bottom=Math.max(this.textSprite.rectShape.bottom,this.height),this.textSprite.originalRectShape=this.rectShape;this.textSprite.path=PathLib.getPathFromXML(c)}};SequenceItem.prototype.createBaseRef=StageItem.prototype.createRef;
SequenceItem.prototype.createRef=function(){if(this.ref)this.render();else{this.container=this.parent.ref;this.ref=$('<div class="item sequenceitem interactive"></div>');this.container.append(this.ref);this.ref.css("left",this.x+"px");this.ref.css("top",this.y+"px");this.ref.css("width",this.width+"px");this.ref.css("height",this.height+"px");this.contentRef=$('<div class="item unhideable"></div>');this.contentRef.css("margin","4px 20px");var a=$('<canvas class="content"></canvas>');a.css("position",
"relative");this.ref.append(a);this.canvas=a.get(0);$(this.ref).css("width",this.width);$(this.ref).css("height",this.height);$(this.canvas).attr("width",this.width);$(this.canvas).attr("height",this.height);if(this.textSprite)a=$("<canvas></canvas>"),a.css("position","absolute"),a.css("left",this.textSprite.x+"px"),a.css("top",this.textSprite.y+"px"),a.attr("width",this.width+"px"),a.attr("height",this.height+"px"),a.attr("id",this.id+"_text"),this.ref.append(a),this.textSprite.canvas=a.get(0),this.textRef=
a;this.textTemplate="<span>"+this.textlib.children("textdata").attr("lmstext")+"</span>";this.renderTextTemplate();this.ref.get(0).item=this;this.convertToDragItem(this.xml);this.style="sequence";this.dragreturn=!0;this.initDrag();this.render=SequenceItem.prototype.renderOverride;this.updateDragPosition=SequenceItem.prototype.updateDragPositionOverride;this.findDropArea=SequenceItem.prototype.findDropAreaOverride;this.mouseupCallback=SequenceItem.prototype.Drop;this.show()}};
SequenceItem.prototype.updateDragPositionOverride=function(){if(!this.ghost)this.ghost=this.ref.clone(),this.ghost.css("opacity",0.7),this.parent.container.append(this.ghost),this.ghostCanvas=this.ghost.find("canvas").get(0);var a=this.parent.ref.get(0).scrollTop,b=this.x+this.dragX+this.parent.x,a=this.getScrolledY()+this.parent.y-a;this.ghost.show();this.ghost.css("left",b);this.ghost.css("top",a);this.render("",this.ghostCanvas);this.render("hover",this.canvas)};
SequenceItem.prototype.renderCallback=function(){};
SequenceItem.prototype.renderOverride=function(a,b){var b=b||this.canvas,c=b.getContext("2d"),d=parseInt(900*Math.random()+1100)%1E3;c.fillStyle="#"+d;c.fillStyle="#fff";c.lineWidth=1;c.strokeStyle="#C7C7C7";d=c.createLinearGradient(0,0,0,this.height);d.addColorStop(0,"#fcfcfc");d.addColorStop(1,"#eaeaea");c.fillStyle=d;this.colors[a]&&this.colors[a].applyCanvas(c,this,!0,!1);d=this.height/2;c.beginPath();c.moveTo(d+0.5,0.5);c.lineTo(this.width-d-0.5,0.5);c.arc(this.width-d-0.5,d,d,3*Math.PI/2,Math.PI/
2);c.lineTo(d+0.5,this.height-0.5);c.arc(d+0.5,d,d,Math.PI/2,3*Math.PI/2);c.fill();c.save();c.clip();c.strokeStyle="#fff";c.lineWidth=3.4;c.stroke();c.restore();if(this.colors[a])c.strokeStyle=this.colors[a].stops[0].color;c.stroke();if(this.textSprite)c=new ppTextLib(this.xml),ppArt.itemID=this.id,ppArt.item=this,ppArt.m_bMaskMode=!1,ppArt.DrawVector(this.textSprite,this.textSprite.path,c,player.fontlib,this.imagelib,null,null)};
SequenceItem.prototype.getScrolledY=function(){var a=this.downScrollTop||0;return this.y+this.dragY+this.parent.ref.get(0).scrollTop-a};
SequenceItem.prototype.findDropAreaOverride=function(){for(var a=this.parent.getOrderedItemList(),b=-1,c=this.getScrolledY(),d=this.parent.y,e=a.length-1;0<=e;e--){var f=a[e];c<f.y+f.height/2&&(b=e,d=this.parent.y+f.y-this.parent.padY/2);if(f==this)this.parent.originalIndex=e}-1==b&&(f=a[a.length-1],d=this.parent.y+f.y+f.height+this.parent.padY/2);d-=this.parent.ref.get(0).scrollTop;this.parent.indicator.show();this.parent.indicator.css("top",d);this.parent.dropIndex=b;player.lastSequenceDropIndex=
b};
SequenceItem.prototype.Drop=function(){if(-1==this.parent.originalIndex)this.parent.indicator.hide(),this.ghost.hide();else{if(this.parent.dropIndex!=player.lastSequenceDropIndex)this.parent.dropIndex=player.lastSequenceDropIndex;this.parent.indicator.hide();this.ghost.hide();var a=this.parent.getOrderedItemList();if(-1==this.parent.dropIndex)this.parent.dropIndex=a.length;if(this.parent.dropIndex!=this.parent.originalIndex)for(var b=this.parent.dropIndex>this.parent.originalIndex?1:-1,c=this.parent.dropIndex>this.parent.originalIndex?
0:-1,d=this.parent.originalIndex;d!=this.parent.dropIndex+c;d+=b)this.parent.swapItem(this,a[d]);this.variables._checked="true";this.parent.updateScore();this.parent.dropIndex=-1;this.parent.originalIndex=-1}this.render()};var HotspotMarker=function(a){this.container=a||$(document.body);this.ref=null;this.constructElement();this.xml="";this.angle=0;this.speed=0.05;this.isHotspotMarker=!0};HotspotMarker.prototype=new StageItem;HotspotMarker.prototype.objectType="Item";HotspotMarker.prototype.innerType="HotspotMarker";HotspotMarker.prototype.toBaseData=Element.prototype.toData;HotspotMarker.prototype.toData=function(a){a=this.toBaseData(a);if(this.x!=this.originalX)a.x=this.x;if(this.y!=this.originalY)a.y=this.y;return a};
HotspotMarker.prototype.updateBaseFromData=Element.prototype.updateFromData;HotspotMarker.prototype.updateFromData=function(a){this.updateBaseFromData(a);if(a.x)this.x=a.x;if(a.y)this.y=a.y};HotspotMarker.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;HotspotMarker.prototype.loadFromXML=function(a,b,c){this.loadBaseFromXML(a,b,c);this.originalX=this.x;this.originalY=this.y;this.height=this.width=38;this.spinnerRadius=5;this.ring1Radius=7;this.ring2Radius=16};
HotspotMarker.prototype.createBaseRef=StageItem.prototype.createRef;
HotspotMarker.prototype.createRef=function(){if(this.ref)this.render();else{var a=this;this.createBaseRef();this.ref.addClass("hotspotmarker");this.ref.css("margin-left",-this.width/2);this.ref.css("margin-top",-this.height/2);var b=$("<canvas></canvas>");b.attr("width",this.width);b.attr("height",this.height);this.ref.append(b);this.jcanvas=b;this.canvas=b.get(0);var b=parseInt(this.parent.variables[this.id.replace("_marker","_xpos")]),c=parseInt(this.parent.variables[this.id.replace("_marker","_ypos")]);
!isNaN(b)&&-1<b?(this.ref.css("left",b),this.ref.css("top",c),setTimeout(function(){a.ref.show()},100)):(this.ref.css("left",-100),this.ref.css("top",-100));if(!this.spinning)this.step(),this.spinning=!0;this.ref.show()}};
HotspotMarker.prototype.render=function(){function a(a){a=a%6/4;1<a&&(a=0);0.5<a&&(a=1-a);0>a&&(a=0);return a}if(this.ref){var b=this.canvas.getContext("2d"),c=this.width/2-2;b.clearRect(0,0,this.width,this.height);b.save();b.translate(c+2,c+2);b.rotate(this.angle);b.beginPath();b.arc(0,0,this.spinnerRadius,0,2*Math.PI);b.fillStyle="#000";b.fill();b.beginPath();b.moveTo(0,0);b.arc(0,0,this.spinnerRadius,0,Math.PI/2);b.lineTo(0,0);b.arc(0,0,this.spinnerRadius,Math.PI,3*Math.PI/2);b.fillStyle="#fff";
b.fill();var c=a(this.angle+0.5),d=a(this.angle);if(0<c)b.strokeStyle="rgba(0,255,255,0)",b.strokeStyle="rgba(100,255,255,"+c+")",b.lineWidth=4,b.beginPath(),b.arc(0,0,this.ring1Radius,0,2*Math.PI),b.stroke(),b.beginPath(),b.strokeStyle="rgba(100,255,255,"+d+")",b.arc(0,0,this.ring2Radius,0,2*Math.PI),b.stroke();b.restore()}};
HotspotMarker.prototype.step=function(){var a=this;if(this.ref){this.angle+=this.speed;this.render();var a=this,b=a.ref.get(0);a.ref.show();setTimeout(function(){a.ref&&a.ref.show()},100)}HotspotMarker.requestAnimFrame()(function(){a.step()},b)};HotspotMarker.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}};var SWFItem=function(a,b,c){this.container=a||$(document.body);this.slide=b;this.layer=c;this.ref=null;this.constructElement();this.currentIndex=0;this.content={};this.colors={};this.type="swf";this.active=!0;this.id=Math.random();this.name="item";this.visible=this.layered=!1;this.canSimplify=!0;this.hasEvents=!1;this.xml=""};SWFItem.prototype=new StageItem;SWFItem.prototype.objectType="Item";SWFItem.prototype.innerType="SWFItem";SWFItem.prototype.createBaseRef=StageItem.prototype.createRef;
SWFItem.prototype.destroyBaseRef=StageItem.prototype.destroyRef;SWFItem.prototype.createRef=function(){this.ref?this.container.append(this.ref):(this.container=this.parent.ref,this.ref=$('<div class="item swf unsupported"><h1>Not Supported</h1>SWF objects cannot be rendered by the HTML5 player.</div>'),this.ref.addClass(this.type),this.applySize(this.ref),this.container.append(this.ref),this.ref.get(0).item=this)};SWFItem.prototype.renderCallback=function(){};SWFItem.prototype.render=function(){};var WebObject=function(a){this.container=a||$(document.body);this.ref=null;this.constructElement();this.type="webobject";this.active=!0;this.id=Math.random();this.name="item";this.visible=this.layered=!1;this.canSimplify=!0;this.hasEvents=!1;this.xml="";this.canvas=null;this.m_nYOffset=this.m_nXOffset=0;this.height=this.width=1E3};WebObject.prototype=new StageItem;WebObject.prototype.objectType="WebObject";WebObject.prototype.innerType="WebObject";WebObject.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;
WebObject.prototype.loadFromXML=function(a,b,c){this.loadBaseFromXML(a,b,c);this.canSimplify=!1};WebObject.prototype.loadContentFromXML=function(a){this.url=$(a).attr("url");if(0==!this.url.indexOf("http"))this.url=player.basepath+this.url;this.thumb=$(a).attr("thumb");this.loadtype=$(a).attr("loadtype")};WebObject.prototype.destroyBaseRef=StageItem.prototype.destroyRef;WebObject.prototype.destroyRef=function(){this.destroyBaseRef()};WebObject.prototype.createBaseRef=StageItem.prototype.createRef;
WebObject.prototype.createRef=function(){if(!this.ref)if(this.createBaseRef(),this.contentRef=$("<iframe class='item webobject unhideable'></iframe>"),this.contentRef.attr("width",this.width),this.contentRef.attr("height",this.height),this.ref.append(this.contentRef),this.contentRef.show(),"auto"==this.loadtype)this.contentRef.attr("src",this.url);else if(this.thumbRef=$("<image class='item unhideable'/>"),this.thumbRef.attr("width",this.width),this.thumbRef.attr("height",this.height),this.thumbRef.attr("src",
player.basepath+this.thumb),this.ref.append(this.thumbRef),this.thumbRef.show(),!this.clickEvent){var a=new StoryEvent(this);a.trigger="onrelease";var b=new TimelineAction(this);b.type="load_webobject";b.xml="<load_webobject/>";b.item=this;a.actions.push(b);this.events.push(a);this.clickEvent=a}};WebObject.prototype.render=function(){};WebObject.prototype.load_webobject=function(){this.contentRef.attr("src",this.url);this.thumbRef.removeClass("unhideable");this.thumbRef.hide()};var Annotation=function(a){this.container=a||$(document.body);this.ref=null;this.constructElement();this.type="Annotation";this.active=!0;this.id=Math.random();this.name="item";this.visible=this.layered=!1;this.canSimplify=!0;this.hasEvents=!1;this.xml="";this.canvas=null;this.m_nYOffset=this.m_nXOffset=0;this.height=this.width=1E3};Annotation.prototype=new StageItem;Annotation.prototype.objectType="Annotation";Annotation.prototype.innerType="Annotation";Annotation.prototype.loadBaseFromXML=StageItem.prototype.loadFromXML;
Annotation.prototype.loadFromXML=function(a,b,c){this.loadBaseFromXML(a,b,c);this.originalWidth=parseInt($(a).attr("width"));this.originalHeight=parseInt($(a).attr("height"));this.originalX=this.x;this.originalY=this.y;this.style=$(a).attr("style");this.arrowstyle=$(a).attr("arrowstyle");this.animationtype=$(a).attr("animationtype");this.loopcount=parseInt($(a).attr("loopcount"));this.borderwidth=parseInt($(a).attr("borderwidth"));this.boxradius=parseInt($(a).attr("boxradius"));this.xscale=parseInt($(a).attr("xscale"));
this.yscale=parseInt($(a).attr("yscale"));if(1<this.loopcount&&"draw"!=this.animationtype)this.loopcount=2*(this.loopcount-1)+1;this.canSimplify=!1;switch(this.style){case "arrow":this.convertToArrow();break;case "rectangle":this.convertToRectangle();break;case "spotlight":this.convertToSpotlight()}this.adjustSize&&this.adjustSize()};Annotation.prototype.destroyBaseRef=StageItem.prototype.destroyRef;
Annotation.prototype.destroyRef=function(){if(this.offCanvas)this.offCanvas.destroy?this.offCanvas.destroy():this.offCanvas.remove&&this.offCanvas.remove(),this.offCanvas=null;this.destroyBaseRef()};Annotation.prototype.createBaseRef=StageItem.prototype.createRef;
Annotation.prototype.createRef=function(){if(!this.ref){this.preCreateRef&&this.preCreateRef();this.createBaseRef();this.ref.css("width",this.width);this.ref.css("height",this.height);var a=$('<canvas class="content" width="'+this.width+'" height="'+this.height+'"></canvas>');a.css("position","absolute");this.ref.append(a);if("spotlight"==this.style)this.spotRef=$('<canvas class="content spotlight" width="'+this.slide.width+'" height="'+this.slide.height+'"></canvas>'),this.spotRef.css("position",
"absolute"),this.spotRef.css("z-index","990"),this.spotContext=this.spotRef.get(0).getContext("2d"),this.spotRef.hide(),this.slide.ref.append(this.spotRef);this.jcanvas=a;this.canvas=a.get(0);this.context=this.canvas.getContext("2d");this.lastRenderedState=null;this.render(null,!0,null,"VectorShape createRef")}};Annotation.prototype.baseShow=Annotation.prototype.show;
Annotation.prototype.show=function(a,b,c){this.baseShow(a,b,c);this.spotRef&&this.spotRef.show();b=player.currentSlide();-1==this.loopcount&&(b=player);c=b.currentTime;if(a&&"TimelineEvent"==a.type)c=a.time;this.animation||this.setupAnimation(b,c);this.animation.bwa.PlayAnimation();this.animation.start(this.ref,!1,b,function(){});this.ref.show()};Annotation.prototype.baseHide=Annotation.prototype.hide;Annotation.prototype.hide=function(a,b,c){this.baseHide(a,b,c);this.spotRef&&this.spotRef.hide()};
Annotation.prototype.setupAnimation=function(a,b){if(!this.animation)this.animation=new Animation,this.animation.uniqueID=this.id+="_"+Animation.sequence++,this.animation.persistent=!0,this.animation.item=this,this.animation.target=this.ref,this.animation.bwa=new bwAnnotationAnimation(this),this.animation.item.animations[this.animation.id]=this.animation,this.animation.bwa.setSegmentPhaseIn(!0),this.animation.bwa.setTriggerTime(b),this.animation.bwa.setStartTime(b),this.animation.bwa.setStartXPos(this.m_nShuffleXPos),
this.animation.bwa.setStartYPos(this.m_nShuffleYPos),this.animation.bwa.setEndXPos(this.m_nShuffleXPos),this.animation.bwa.setEndYPos(this.m_nShuffleYPos),this.animation.bwa.setSegmentDuration(this.GetSegmentDuration(this.animationtype)),this.animation.bwa.SetEffects(this.animationtype,this.loopcount),this.animation.duration=this.animation.bwa.getDuration()};
Annotation.prototype.render=function(){switch(this.style){case "arrow":this.renderArrow();break;case "rectangle":this.animationtype!=bwAnnotationAnimation.TRANS_STRETCH&&this.renderRectangle();break;case "spotlight":this.animationtype!=bwAnnotationAnimation.TRANS_DRAW&&this.UpdateDraw(1)}};Annotation.prototype.renderRectangle=function(){this.drawStrokedRoundRect(0,0,this.width,this.height)};
Annotation.prototype.drawStrokedRoundRect=function(a,b,c,d){this.context.clearRect(a,b,c,d);a+=this.borderwidth/2+1;b+=this.borderwidth/2+1;c-=this.borderwidth+2;d-=this.borderwidth+2;this.context.lineWidth=this.borderwidth;this.context.strokeStyle=this.colors.bordercolor.toColorString();this.drawRoundRect(a,b,c,d);this.context.stroke();a--;b--;this.context.strokeStyle="rgba(0,0,0,0.2)";this.drawRoundRect(a,b,c+2,d+2);this.context.stroke()};
Annotation.prototype.drawRoundRect=function(a,b,c,d,e){var f=this.boxradius,e=e||this.context;e.beginPath();e.moveTo(a+f,b);e.lineTo(a+c-f,b);e.arc(a+c-f,b+f,f,3*Math.PI/2,0,!1);e.lineTo(a+c,b+d-f);e.arc(a+c-f,b+d-f,f,0,Math.PI/2,!1);e.lineTo(a+f,b+d);e.arc(a+f,b+d-f,f,Math.PI/2,Math.PI,!1);e.lineTo(a,b+f);e.arc(a+f,b+f,f,Math.PI,3*Math.PI/2,!1)};Annotation.prototype.GetSegmentDuration=function(){return 333};
Annotation.prototype.UpdateTarget=function(a,b){if(a!=this.lastUpdatePercent)this.lastUpdatePercent=a,b!=bwAnnotationAnimation.TRANS_INT_APPEAR&&(b&bwAnnotationAnimation.TRANS_INT_FADE?this.UpdateFade(a):b&bwAnnotationAnimation.TRANS_INT_STRETCH?this.UpdateStretch(a):b&bwAnnotationAnimation.TRANS_INT_BOUNCE?this.UpdateBounce(a):b&bwAnnotationAnimation.TRANS_INT_DRAW&&this.UpdateDraw(a))};function AnnotationShape(){this.y=this.x=100;this.scale=1;this.rotation=Math.PI/8;this.fillStyle="#00f";this.borderStyle="#fff"}AnnotationShape.Shapes={};AnnotationShape.ShapeNames="anArrowRnd,anArrowSqr,anCheck,anTriangleLg,anTriangleSm,anV,anX".split(",");AnnotationShape.ShapeMap={arrowround:"anArrowRnd",arrowsquare:"anArrowSqr",check:"anCheck",arrowtriangle:"anTriangleSm",trianglelarge:"anTriangleLg",arrowv:"anV",cross:"anX"};
AnnotationShape.ShineDelta={anArrowRnd:[-12.4,2],anArrowSqr:[-11.9,-0.1999999999999993],anCheck:[0.09999999999999964,0.10000000000000053],anTriangleLg:[-12.100000000000001,-0.1999999999999993],anTriangleSm:[-8.200000000000001,-0.2999999999999998],anV:[-5.5,0],anX:[-0.10000000000000142,0]};
AnnotationShape.prototype.initialize=function(a){a.restore();a.save();a.setTransform(this.scale,0,0,this.scale,this.x,this.y);a.globalAlpha=1;switch(this.methodName){case "shadow":a.transform(1,0,0,1,0,1);a.globalAlpha=0.199;a.rotate(this.rotation);break;case "fill":a.rotate(this.rotation);break;case "border":a.rotate(this.rotation);break;case "mask":a.rotate(this.rotation);break;case "shine":var b=AnnotationShape.ShineDelta[this.shapeName];a.rotate(this.rotation);a.transform(1,0,0,1,b[0],b[1]);a.rotate(-this.rotation);
a.transform(1,0,0,1,-b[0],-b[1]);a.save();this.mask(a);a.restore();a.clip()}};AnnotationShape.prototype.draw=function(a){a.clearRect(0,0,1E3,1E3);var b=["shadow","border","fill","shine","drawmask"],c;for(c in b){var d=b[c];if(this[d])this[d](a)}a.restore()};AnnotationShape.prototype.getCurrentFillStyle=function(){return"shadow"==this.methodName?"#000":this.fillStyle};AnnotationShape.prototype.getCurrentBorderStyle=function(){return this.borderStyle};AnnotationShape.Shapes.anArrowRnd=new AnnotationShape;
AnnotationShape.Shapes.anArrowRnd.shadow=function(a){this.shapeName="anArrowRnd";this.methodName="shadow";this.initialize(a);a.transform(1,0,0,1,-29.3,-11.9);a.transform(1,0,0,1,14.2,12);a.beginPath();a.fillStyle=this.getCurrentFillStyle();a.moveTo(1.1,-12.8);a.quadraticCurveTo(-2,-12.5,-2,-8.9);a.lineTo(-2,-7.9);a.lineTo(-11,-7.9);a.quadraticCurveTo(-15,-7.9,-15,-3.9);a.lineTo(-15,5);a.quadraticCurveTo(-15.1,6.9,-14,7.9);a.quadraticCurveTo(-13.1,8.9,-11,8.9);a.lineTo(-2,8.9);a.lineTo(-2,9);a.quadraticCurveTo(-2,
11,-1,12);a.quadraticCurveTo(-0.1,13,1.7,13);a.lineTo(1.7,13);a.quadraticCurveTo(2.3,13,2.9,12.8);a.quadraticCurveTo(3,12.7,3,12.7);a.quadraticCurveTo(3.1,12.7,3.2,12.6);a.quadraticCurveTo(3.3,12.6,3.5,12.5);a.quadraticCurveTo(4.1,12.3,4.7,11.8);a.quadraticCurveTo(4.7,11.8,4.7,11.8);a.lineTo(14.3,2);a.quadraticCurveTo(15.1,1.1,15.2,0);a.quadraticCurveTo(15.1,-1,14.3,-1.9);a.lineTo(4.8,-11.5);a.quadraticCurveTo(4.8,-11.6,4.8,-11.6);a.quadraticCurveTo(4.3,-11.9,3.9,-12.1);a.lineTo(3.9,-12.2);a.quadraticCurveTo(3.7,
-12.3,3.5,-12.4);a.quadraticCurveTo(3.3,-12.5,3.1,-12.6);a.quadraticCurveTo(3,-12.6,3,-12.6);a.quadraticCurveTo(2.4,-12.9,1.7,-12.9);a.quadraticCurveTo(1.6,-12.9,1.6,-12.9);a.quadraticCurveTo(1.4,-12.9,1.1,-12.8);a.lineTo(1.1,-12.8);a.moveTo(13.2,0);a.quadraticCurveTo(13.2,0.3,12.9,0.7);a.lineTo(3.3,10.4);a.lineTo(3.3,10.3);a.quadraticCurveTo(3.1,10.5,2.8,10.7);a.quadraticCurveTo(2.7,10.7,2.6,10.7);a.quadraticCurveTo(2.5,10.7,2.4,10.8);a.quadraticCurveTo(2.3,10.8,2.3,10.9);a.quadraticCurveTo(2.2,
10.9,2.2,10.9);a.quadraticCurveTo(1.9,11,1.7,11);a.lineTo(1.7,11);a.quadraticCurveTo(0.7,11,0.2,10.6);a.quadraticCurveTo(-0.1,10,0,9);a.lineTo(0,7.9);a.quadraticCurveTo(-0.1,7.5,-0.3,7.2);a.quadraticCurveTo(-0.6,6.9,-1,6.9);a.lineTo(-11,6.9);a.quadraticCurveTo(-12.1,6.9,-12.6,6.5);a.quadraticCurveTo(-13.1,5.9,-13,5);a.lineTo(-13,-3.9);a.quadraticCurveTo(-13,-5.9,-11,-5.9);a.lineTo(-1,-5.9);a.quadraticCurveTo(-0.6,-5.9,-0.3,-6.2);a.quadraticCurveTo(-0.1,-6.5,0,-6.9);a.lineTo(0,-8.9);a.quadraticCurveTo(-0.1,
-10.7,1.4,-10.8);a.quadraticCurveTo(1.5,-10.9,1.6,-10.9);a.quadraticCurveTo(1.7,-10.9,1.7,-10.9);a.quadraticCurveTo(1.9,-10.9,2.2,-10.8);a.quadraticCurveTo(2.2,-10.8,2.2,-10.8);a.quadraticCurveTo(2.4,-10.7,2.6,-10.6);a.quadraticCurveTo(2.6,-10.6,2.7,-10.5);a.lineTo(2.7,-10.5);a.quadraticCurveTo(2.8,-10.4,3,-10.4);a.quadraticCurveTo(3.2,-10.3,3.5,-10.1);a.lineTo(12.9,-0.5);a.quadraticCurveTo(13.2,-0.2,13.2,0);a.lineTo(13.2,0);a.closePath();a.fill()};
AnnotationShape.Shapes.anArrowRnd.border=function(a){this.shapeName="anArrowRnd";this.methodName="border";this.initialize(a);a.transform(1,0,0,1,-27.299999999999997,-10);a.transform(1,0,0,1,12.2,10.1);a.beginPath();a.fillStyle=this.getCurrentBorderStyle();a.moveTo(2.6,-11.7);a.quadraticCurveTo(2.2,-11.9,1.7,-11.9);a.quadraticCurveTo(1.6,-11.9,1.6,-11.9);a.quadraticCurveTo(1.4,-11.9,1.3,-11.9);a.quadraticCurveTo(-1.1,-11.7,-1,-8.9);a.lineTo(-1,-6.9);a.lineTo(-11,-6.9);a.quadraticCurveTo(-14,-6.9,-14,
-3.9);a.lineTo(-14,4.9);a.quadraticCurveTo(-14.1,7.9,-11,7.9);a.lineTo(-1,7.9);a.lineTo(-1,9);a.quadraticCurveTo(-1,12.1,1.7,12);a.quadraticCurveTo(2.2,12,2.6,11.8);a.quadraticCurveTo(2.7,11.7,2.9,11.6);a.quadraticCurveTo(3,11.6,3.1,11.6);a.lineTo(3,11.6);a.quadraticCurveTo(3.6,11.5,4,11);a.lineTo(13.6,1.3);a.quadraticCurveTo(14.2,0.8,14.2,0);a.quadraticCurveTo(14.2,-0.7,13.6,-1.3);a.lineTo(4.1,-10.9);a.quadraticCurveTo(3.8,-11.2,3.4,-11.3);a.quadraticCurveTo(3.3,-11.3,3.3,-11.4);a.lineTo(3.3,-11.4);
a.quadraticCurveTo(3.2,-11.4,3,-11.5);a.quadraticCurveTo(2.8,-11.6,2.6,-11.7);a.lineTo(2.6,-11.7);a.moveTo(1.6,-9.9);a.quadraticCurveTo(1.6,-9.9,1.7,-9.9);a.quadraticCurveTo(1.9,-9.8,2.1,-9.7);a.quadraticCurveTo(2.3,-9.6,2.4,-9.6);a.quadraticCurveTo(2.5,-9.5,2.7,-9.5);a.lineTo(12.2,0);a.lineTo(2.5,9.6);a.quadraticCurveTo(2.3,9.7,2.1,9.8);a.quadraticCurveTo(1.9,9.9,1.7,10);a.quadraticCurveTo(0.8,10,0.8,9);a.lineTo(0.8,5.9);a.lineTo(-11,5.9);a.quadraticCurveTo(-12.1,5.9,-12,4.9);a.lineTo(-12,-3.9);
a.quadraticCurveTo(-12.1,-4.9,-11,-4.9);a.lineTo(0.8,-4.9);a.lineTo(0.8,-8.9);a.quadraticCurveTo(0.8,-9.8,1.6,-9.9);a.lineTo(1.6,-9.9);a.closePath();a.fill()};
AnnotationShape.Shapes.anArrowRnd.fill=function(a){this.shapeName="anArrowRnd";this.methodName="fill";this.initialize(a);a.transform(1,0,0,1,-27.3,-10);a.transform(1,0,0,1,12.2,10.1);a.beginPath();a.fillStyle=this.getCurrentFillStyle();a.moveTo(0.8,-8.9);a.quadraticCurveTo(0.8,-9.8,1.6,-9.9);a.quadraticCurveTo(1.6,-9.9,1.7,-9.9);a.quadraticCurveTo(1.9,-9.8,2.1,-9.7);a.quadraticCurveTo(2.3,-9.6,2.4,-9.6);a.quadraticCurveTo(2.5,-9.5,2.7,-9.5);a.lineTo(12.2,0);a.lineTo(2.5,9.6);a.quadraticCurveTo(2.3,
9.7,2.1,9.8);a.quadraticCurveTo(1.9,9.9,1.7,10);a.quadraticCurveTo(0.8,10,0.8,9);a.lineTo(0.8,5.9);a.lineTo(-11,5.9);a.quadraticCurveTo(-12.1,5.9,-12,4.9);a.lineTo(-12,-3.9);a.quadraticCurveTo(-12.1,-4.9,-11,-4.9);a.lineTo(0.8,-4.9);a.lineTo(0.8,-8.9);a.closePath();a.fill()};
AnnotationShape.Shapes.anArrowRnd.shine=function(a){this.shapeName="anArrowRnd";this.methodName="shine";this.initialize(a);a.transform(1,0,0,1,-12.4,2);a.transform(1,0,0,1,0,0);a.beginPath();a.fillStyle="rgba(0,255,0,0)";a.moveTo(-19.9,-19.9);a.lineTo(20,-19.9);a.lineTo(20,20);a.lineTo(-19.9,20);a.lineTo(-19.9,-19.9);a.closePath();a.fill();a.transform(1,0,0,1,0,-6.2);a.beginPath();var b=a.createLinearGradient(0,-12.1,0,12.3);b.addColorStop(0,"rgba(255,255,255,0.702)");b.addColorStop(1,"rgba(255,255,255,0.102)");
a.fillStyle=b;a.moveTo(-19.9,-11.1);a.lineTo(20,-11.1);a.lineTo(20,11.2);a.quadraticCurveTo(9.5,-5,-19.9,10.9);a.lineTo(-19.9,-11.1);a.closePath();a.fill()};
AnnotationShape.Shapes.anArrowRnd.mask=function(a){this.shapeName="anArrowRnd";this.methodName="mask";this.initialize(a);a.transform(1,0,0,1,-13.6,0.1);a.beginPath();a.moveTo(-0.5,-8.9);a.quadraticCurveTo(-0.5,-9.8,0.1,-9.9);a.quadraticCurveTo(0.1,-9.9,0.2,-9.9);a.quadraticCurveTo(0.4,-9.8,0.6,-9.7);a.quadraticCurveTo(0.8,-9.6,0.9,-9.6);a.quadraticCurveTo(1,-9.5,1.2,-9.5);a.lineTo(10.7,0);a.lineTo(1,9.6);a.quadraticCurveTo(0.8,9.7,0.6,9.8);a.quadraticCurveTo(0.4,9.9,0.2,10);a.quadraticCurveTo(-0.5,
10,-0.5,9);a.lineTo(-0.5,5.9);a.lineTo(-12.5,5.9);a.quadraticCurveTo(-13.6,5.9,-13.5,4.9);a.lineTo(-13.5,-3.9);a.quadraticCurveTo(-13.6,-4.9,-12.5,-4.9);a.lineTo(-0.5,-4.9);a.lineTo(-0.5,-8.9);a.closePath()};AnnotationShape.Shapes.anArrowSqr=new AnnotationShape;
AnnotationShape.Shapes.anArrowSqr.shadow=function(a){this.shapeName="anArrowSqr";this.methodName="shadow";this.initialize(a);a.transform(1,0,0,1,-28.900000000000002,-13.9);a.transform(1,0,0,1,13.7,14.7);a.beginPath();a.fillStyle=this.getCurrentFillStyle();a.moveTo(-0.8,-15.5);a.quadraticCurveTo(-2.1,-15.5,-2.9,-14.6);a.lineTo(-3,-14.6);a.lineTo(-6.5,-11.1);a.lineTo(-6.5,-11.1);a.quadraticCurveTo(-7.1,-10.6,-7.3,-9.8);a.quadraticCurveTo(-7.3,-9.7,-7.3,-9.7);a.quadraticCurveTo(-7.5,-9,-7.3,-8.2);a.lineTo(-7.3,
-8.2);a.quadraticCurveTo(-7.1,-7.5,-6.5,-6.8);a.lineTo(-6.5,-6.8);a.lineTo(-5,-5.3);a.lineTo(-11.6,-5.3);a.quadraticCurveTo(-12.8,-5.3,-13.6,-4.5);a.quadraticCurveTo(-13.7,-4.5,-13.7,-4.4);a.quadraticCurveTo(-14.5,-3.6,-14.6,-2.3);a.lineTo(-14.6,2.5);a.quadraticCurveTo(-14.5,3.7,-13.7,4.6);a.quadraticCurveTo(-12.8,5.4,-11.6,5.5);a.lineTo(-5,5.5);a.lineTo(-6.5,7);a.lineTo(-6.5,7);a.quadraticCurveTo(-7.4,7.8,-7.4,9.1);a.quadraticCurveTo(-7.4,10.4,-6.5,11.3);a.lineTo(-2.9,14.8);a.quadraticCurveTo(-2.1,
15.6,-0.9,15.7);a.quadraticCurveTo(0.2,15.6,1.1,14.8);a.lineTo(11,4.9);a.quadraticCurveTo(11.1,4.8,11.2,4.7);a.quadraticCurveTo(11.3,4.6,11.5,4.5);a.quadraticCurveTo(11.6,4.3,11.7,4.2);a.lineTo(13.8,2);a.quadraticCurveTo(14.6,1.1,14.7,0);a.quadraticCurveTo(14.6,-1.1,13.8,-1.9);a.lineTo(10.3,-5.5);a.quadraticCurveTo(10.1,-5.7,9.9,-5.8);a.lineTo(1.1,-14.6);a.quadraticCurveTo(0.2,-15.6,-0.8,-15.5);a.lineTo(-0.8,-15.5);a.moveTo(8.7,-4.2);a.quadraticCurveTo(8.8,-4.2,8.9,-4.1);a.lineTo(12.4,-0.5);a.quadraticCurveTo(12.7,
-0.3,12.7,0);a.quadraticCurveTo(12.7,0.3,12.4,0.7);a.lineTo(10.2,2.9);a.quadraticCurveTo(10.1,2.9,10.1,3);a.quadraticCurveTo(10,3.1,10,3.2);a.quadraticCurveTo(9.9,3.2,9.8,3.3);a.quadraticCurveTo(9.7,3.3,9.7,3.4);a.lineTo(-0.1,13.4);a.quadraticCurveTo(-0.4,13.7,-0.9,13.7);a.quadraticCurveTo(-1.3,13.7,-1.5,13.4);a.lineTo(-5.1,9.9);a.quadraticCurveTo(-5.4,9.5,-5.4,9.1);a.quadraticCurveTo(-5.4,8.7,-5.1,8.4);a.quadraticCurveTo(-5.1,8.4,-5.1,8.4);a.lineTo(-1.8,5.2);a.quadraticCurveTo(-1.5,4.9,-1.5,4.5);
a.quadraticCurveTo(-1.6,4,-1.9,3.8);a.quadraticCurveTo(-2.1,3.5,-2.5,3.5);a.lineTo(-11.6,3.5);a.quadraticCurveTo(-12,3.5,-12.2,3.2);a.quadraticCurveTo(-12.6,2.9,-12.6,2.5);a.lineTo(-12.6,-2.3);a.quadraticCurveTo(-12.6,-2.8,-12.3,-3);a.quadraticCurveTo(-12.2,-3.1,-12.2,-3.1);a.quadraticCurveTo(-12,-3.4,-11.6,-3.3);a.lineTo(-2.5,-3.3);a.quadraticCurveTo(-2.1,-3.4,-1.9,-3.6);a.quadraticCurveTo(-1.6,-3.9,-1.5,-4.3);a.quadraticCurveTo(-1.6,-4.8,-1.9,-5.1);a.lineTo(-5.1,-8.3);a.lineTo(-5.1,-8.2);a.quadraticCurveTo(-5.3,
-8.4,-5.3,-8.6);a.quadraticCurveTo(-5.3,-8.7,-5.3,-8.7);a.quadraticCurveTo(-5.4,-9,-5.4,-9.2);a.quadraticCurveTo(-5.3,-9.3,-5.3,-9.3);a.quadraticCurveTo(-5.3,-9.5,-5.1,-9.6);a.quadraticCurveTo(-5.1,-9.7,-5.1,-9.7);a.lineTo(-1.5,-13.2);a.lineTo(-1.5,-13.2);a.quadraticCurveTo(-1.2,-13.6,-0.8,-13.5);a.quadraticCurveTo(-0.4,-13.5,-0.1,-13.2);a.lineTo(8.6,-4.3);a.quadraticCurveTo(8.6,-4.3,8.7,-4.2);a.lineTo(8.7,-4.2);a.closePath();a.fill()};
AnnotationShape.Shapes.anArrowSqr.border=function(a){this.shapeName="anArrowSqr";this.methodName="border";this.initialize(a);a.transform(1,0,0,1,-26.9,-12);a.transform(1,0,0,1,11.7,12.7);a.beginPath();a.fillStyle=this.getCurrentBorderStyle();a.moveTo(-0.8,-14.6);a.quadraticCurveTo(-1.7,-14.6,-2.3,-14);a.lineTo(-5.8,-10.4);a.quadraticCurveTo(-6.2,-10,-6.3,-9.5);a.quadraticCurveTo(-6.5,-9,-6.3,-8.5);a.quadraticCurveTo(-6.2,-8,-5.8,-7.6);a.lineTo(-2.6,-4.4);a.lineTo(-11.6,-4.4);a.quadraticCurveTo(-12.4,
-4.4,-13,-3.8);a.quadraticCurveTo(-13.6,-3.2,-13.6,-2.4);a.lineTo(-13.6,2.4);a.quadraticCurveTo(-13.6,3.3,-13,3.9);a.quadraticCurveTo(-12.4,4.5,-11.6,4.4);a.lineTo(-2.6,4.4);a.lineTo(-5.8,7.7);a.quadraticCurveTo(-6.4,8.3,-6.4,9.1);a.quadraticCurveTo(-6.4,9.9,-5.8,10.5);a.lineTo(-2.3,14.1);a.quadraticCurveTo(-1.7,14.7,-0.9,14.6);a.quadraticCurveTo(0,14.7,0.4,14.1);a.lineTo(10.3,4.1);a.quadraticCurveTo(10.5,4,10.6,3.9);a.quadraticCurveTo(10.8,3.7,10.9,3.5);a.lineTo(13.1,1.3);a.quadraticCurveTo(13.7,
0.7,13.6,0);a.quadraticCurveTo(13.6,-0.7,13.1,-1.3);a.lineTo(9.5,-4.8);a.quadraticCurveTo(9.4,-5,9.2,-5.1);a.lineTo(0.4,-14);a.quadraticCurveTo(0,-14.6,-0.8,-14.6);a.lineTo(-0.8,-14.6);a.moveTo(9.2,2.4);a.lineTo(9.1,2.4);a.lineTo(-0.9,12.6);a.lineTo(-4.4,9.1);a.lineTo(2.1,2.4);a.lineTo(-11.6,2.4);a.lineTo(-11.6,-2.4);a.lineTo(2.1,-2.4);a.lineTo(-4.4,-9);a.lineTo(-0.9,-12.6);a.lineTo(8.1,-3.4);a.lineTo(8.1,-3.4);a.lineTo(11.6,0);a.lineTo(9.2,2.4);a.lineTo(9.2,2.4);a.closePath();a.fill()};
AnnotationShape.Shapes.anArrowSqr.fill=function(a){this.shapeName="anArrowSqr";this.methodName="fill";this.initialize(a);a.transform(0.998,0,0,0.998,-26.9758,-11.975);a.transform(1,0,0,1,11.8,12.7);a.beginPath();a.fillStyle=this.getCurrentFillStyle();a.moveTo(9.2,2.5);a.lineTo(-0.8,12.7);a.lineTo(-4.4,9.1);a.lineTo(2.1,2.5);a.lineTo(-11.6,2.5);a.lineTo(-11.6,-2.3);a.lineTo(2.1,-2.3);a.lineTo(-4.4,-9);a.lineTo(-0.9,-12.6);a.lineTo(8.1,-3.4);a.lineTo(8.1,-3.4);a.lineTo(11.7,0);a.lineTo(9.2,2.4);a.lineTo(9.2,
2.5);a.lineTo(9.2,2.5);a.closePath();a.fill()};
AnnotationShape.Shapes.anArrowSqr.shine=function(a){this.shapeName="anArrowSqr";this.methodName="shine";this.initialize(a);a.transform(1,0,0,1,-11.9,-0.1999999999999993);a.transform(1,0,0,1,0,0);a.beginPath();a.fillStyle="rgba(0,255,0,0)";a.moveTo(-19.9,-19.9);a.lineTo(20,-19.9);a.lineTo(20,20);a.lineTo(-19.9,20);a.lineTo(-19.9,-19.9);a.closePath();a.fill();a.transform(1,0,0,1,0,-6.2);a.beginPath();var b=a.createLinearGradient(0,-12.1,0,12.3);b.addColorStop(0,"rgba(255,255,255,0.702)");b.addColorStop(1,
"rgba(255,255,255,0.102)");a.fillStyle=b;a.moveTo(-19.9,-11.1);a.lineTo(20,-11.1);a.lineTo(20,11.2);a.quadraticCurveTo(9.5,-5,-19.9,10.9);a.lineTo(-19.9,-11.1);a.closePath();a.fill()};
AnnotationShape.Shapes.anArrowSqr.mask=function(a){this.shapeName="anArrowSqr";this.methodName="mask";this.initialize(a);a.transform(1,0,0,1,-13.4,0.7);a.beginPath();a.moveTo(7.3,2.5);a.lineTo(-2.6,12.6);a.lineTo(-6.2,9.1);a.lineTo(0.3,2.5);a.lineTo(-13.4,2.5);a.lineTo(-13.4,-2.3);a.lineTo(0.3,-2.3);a.lineTo(-6.2,-9);a.lineTo(-2.7,-12.5);a.lineTo(6.3,-3.4);a.lineTo(6.3,-3.4);a.lineTo(9.9,0);a.lineTo(7.4,2.4);a.lineTo(7.4,2.5);a.lineTo(7.3,2.5);a.closePath()};AnnotationShape.Shapes.anCheck=new AnnotationShape;
AnnotationShape.Shapes.anCheck.shadow=function(a){this.shapeName="anCheck";this.methodName="shadow";this.initialize(a);a.transform(1,0,0,1,-15,-12);a.transform(1,0,0,1,14.5,12);a.beginPath();a.fillStyle=this.getCurrentFillStyle();a.moveTo(9.5,-12);a.quadraticCurveTo(8.9,-12.6,8.1,-12.7);a.lineTo(8.2,-12.7);a.quadraticCurveTo(7.4,-12.9,6.7,-12.7);a.quadraticCurveTo(6.6,-12.7,6.6,-12.7);a.quadraticCurveTo(5.8,-12.5,5.3,-12);a.lineTo(-2,-4.5);a.lineTo(-5.1,-7.6);a.quadraticCurveTo(-5.7,-8.2,-6.5,-8.4);
a.lineTo(-6.4,-8.4);a.quadraticCurveTo(-7.2,-8.6,-7.9,-8.4);a.quadraticCurveTo(-8,-8.4,-8,-8.4);a.quadraticCurveTo(-8.9,-8.2,-9.4,-7.6);a.lineTo(-9.4,-7.6);a.lineTo(-14.5,-2.5);a.lineTo(-14.4,-2.5);a.quadraticCurveTo(-15.4,-1.6,-15.3,-0.4);a.quadraticCurveTo(-15.4,0.6,-14.4,1.5);a.lineTo(-4.1,12);a.quadraticCurveTo(-3.3,12.9,-2,12.9);a.quadraticCurveTo(-0.7,12.9,0,12);a.lineTo(14.6,-2.6);a.quadraticCurveTo(15.4,-3.5,15.5,-4.7);a.quadraticCurveTo(15.4,-5.8,14.6,-6.7);a.lineTo(14.6,-6.8);a.lineTo(9.5,
-12);a.lineTo(9.5,-12);a.moveTo(8.1,-10.6);a.lineTo(13.2,-5.4);a.lineTo(13.2,-5.4);a.quadraticCurveTo(13.5,-5.1,13.5,-4.7);a.quadraticCurveTo(13.5,-4.3,13.2,-4);a.lineTo(-1.2,10.6);a.quadraticCurveTo(-1.6,10.9,-2,10.9);a.quadraticCurveTo(-2.4,10.9,-2.7,10.7);a.lineTo(-13,0.1);a.quadraticCurveTo(-13.3,0,-13.3,-0.4);a.quadraticCurveTo(-13.3,-0.8,-13,-1.1);a.lineTo(-13,-1.1);a.lineTo(-7.9,-6.2);a.quadraticCurveTo(-7.9,-6.2,-7.9,-6.3);a.quadraticCurveTo(-7.8,-6.4,-7.6,-6.4);a.quadraticCurveTo(-7.5,-6.4,
-7.5,-6.5);a.quadraticCurveTo(-7.2,-6.5,-7,-6.4);a.quadraticCurveTo(-6.9,-6.4,-6.9,-6.4);a.quadraticCurveTo(-6.7,-6.4,-6.5,-6.2);a.lineTo(-2.7,-2.4);a.quadraticCurveTo(-2.4,-2.1,-2,-2.1);a.quadraticCurveTo(-1.6,-2.1,-1.3,-2.4);a.lineTo(6.7,-10.6);a.quadraticCurveTo(6.7,-10.6,6.7,-10.6);a.quadraticCurveTo(6.8,-10.8,7,-10.8);a.quadraticCurveTo(7.1,-10.8,7.1,-10.8);a.quadraticCurveTo(7.4,-10.9,7.6,-10.8);a.quadraticCurveTo(7.7,-10.8,7.7,-10.8);a.quadraticCurveTo(7.9,-10.7,8.1,-10.6);a.lineTo(8.1,-10.6);
a.closePath();a.fill()};
AnnotationShape.Shapes.anCheck.border=function(a){this.shapeName="anCheck";this.methodName="border";this.initialize(a);a.transform(1,0,0,1,-12.9,-10);a.transform(1,0,0,1,12.5,10);a.beginPath();a.fillStyle=this.getCurrentBorderStyle();a.moveTo(6.8,-11.8);a.quadraticCurveTo(7.3,-11.9,7.9,-11.8);a.quadraticCurveTo(8.4,-11.6,8.8,-11.3);a.lineTo(13.9,-6.1);a.quadraticCurveTo(14.5,-5.5,14.4,-4.7);a.quadraticCurveTo(14.5,-3.8,13.9,-3.3);a.lineTo(-0.6,11.3);a.quadraticCurveTo(-1.2,11.9,-2,11.9);a.quadraticCurveTo(-2.8,
11.9,-3.4,11.3);a.lineTo(-13.8,0.8);a.quadraticCurveTo(-14.4,0.3,-14.4,-0.4);a.quadraticCurveTo(-14.4,-1.2,-13.8,-1.8);a.lineTo(-8.7,-6.9);a.quadraticCurveTo(-8.3,-7.3,-7.8,-7.4);a.quadraticCurveTo(-7.3,-7.6,-6.7,-7.4);a.quadraticCurveTo(-6.2,-7.3,-5.8,-6.9);a.lineTo(-2,-3.1);a.lineTo(5.9,-11.3);a.quadraticCurveTo(6.3,-11.6,6.8,-11.8);a.lineTo(6.8,-11.8);a.moveTo(-2,-0.2);a.lineTo(-7.3,-5.5);a.lineTo(-12.4,-0.4);a.lineTo(-2,9.9);a.lineTo(12.4,-4.7);a.lineTo(7.3,-9.9);a.lineTo(-2,-0.2);a.closePath();
a.fill()};AnnotationShape.Shapes.anCheck.fill=function(a){this.shapeName="anCheck";this.methodName="fill";this.initialize(a);a.transform(1,0,0,1,-12.9,-10);a.transform(1,0,0,1,12.5,10);a.beginPath();a.fillStyle=this.getCurrentFillStyle();a.moveTo(12.5,-4.7);a.lineTo(7.3,-9.9);a.lineTo(-2,-0.2);a.lineTo(-7.3,-5.5);a.lineTo(-12.4,-0.4);a.lineTo(-2,10);a.lineTo(12.5,-4.7);a.closePath();a.fill()};
AnnotationShape.Shapes.anCheck.shine=function(a){this.shapeName="anCheck";this.methodName="shine";this.initialize(a);a.transform(1,0,0,1,0.09999999999999964,0.10000000000000053);a.transform(1,0,0,1,0,0);a.beginPath();a.fillStyle="rgba(0,255,0,0)";a.moveTo(-19.9,-19.9);a.lineTo(20,-19.9);a.lineTo(20,20);a.lineTo(-19.9,20);a.lineTo(-19.9,-19.9);a.closePath();a.fill();a.transform(1,0,0,1,0,-6.2);a.beginPath();var b=a.createLinearGradient(0,-12.1,0,12.3);b.addColorStop(0,"rgba(255,255,255,0.702)");b.addColorStop(1,
"rgba(255,255,255,0.102)");a.fillStyle=b;a.moveTo(-19.9,-11.1);a.lineTo(20,-11.1);a.lineTo(20,11.2);a.quadraticCurveTo(9.5,-5,-19.9,10.9);a.lineTo(-19.9,-11.1);a.closePath();a.fill()};AnnotationShape.Shapes.anCheck.mask=function(a){this.shapeName="anCheck";this.methodName="mask";this.initialize(a);a.transform(1,0,0,1,-0.4,0);a.beginPath();a.moveTo(12.5,-4.7);a.lineTo(7.3,-9.9);a.lineTo(-2,-0.2);a.lineTo(-7.3,-5.5);a.lineTo(-12.4,-0.4);a.lineTo(-2,10);a.lineTo(12.5,-4.7);a.closePath()};
AnnotationShape.Shapes.anTriangleLg=new AnnotationShape;
AnnotationShape.Shapes.anTriangleLg.border=function(a){this.shapeName="anTriangleLg";this.methodName="border";this.initialize(a);a.transform(1,0,0,0.998,-21.9,-11.875);a.transform(1,0,0,1,10.9,12.6);a.beginPath();a.fillStyle=this.getCurrentBorderStyle();a.moveTo(-8.9,-14.3);a.quadraticCurveTo(-8.1,-14,-7.2,-13.6);a.quadraticCurveTo(-7.2,-13.5,-7.1,-13.5);a.lineTo(-0.9,-9.6);a.lineTo(-0.9,-9.6);a.lineTo(11.9,-1.5);a.quadraticCurveTo(12.5,-1.1,12.7,-0.4);a.quadraticCurveTo(13,0,12.7,0.7);a.quadraticCurveTo(12.5,
1.3,11.9,1.7);a.lineTo(-7.1,13.6);a.quadraticCurveTo(-7.2,13.6,-7.2,13.7);a.quadraticCurveTo(-8.1,14.1,-8.9,14.4);a.quadraticCurveTo(-9.1,14.4,-9.2,14.4);a.quadraticCurveTo(-11,14.6,-11.8,13.6);a.quadraticCurveTo(-12.8,12.8,-12.8,11.1);a.lineTo(-12.8,-11.1);a.quadraticCurveTo(-12.8,-11.2,-12.8,-11.2);a.quadraticCurveTo(-12.7,-12.8,-11.8,-13.5);a.quadraticCurveTo(-11,-14.5,-9.2,-14.3);a.quadraticCurveTo(-9.1,-14.3,-8.9,-14.3);a.lineTo(-8.9,-14.3);a.moveTo(-10.6,-11.7);a.lineTo(-10.8,-11.1);a.quadraticCurveTo(-10.8,
-11,-10.8,-11);a.lineTo(-10.8,11.1);a.quadraticCurveTo(-10.7,12.6,-9.4,12.4);a.quadraticCurveTo(-8.8,12.3,-8.2,11.9);a.lineTo(10.8,0);a.lineTo(-4.7,-9.6);a.lineTo(-4.7,-9.6);a.lineTo(-8.2,-11.8);a.quadraticCurveTo(-8.8,-12.2,-9.4,-12.3);a.quadraticCurveTo(-10.4,-12.4,-10.7,-11.7);a.lineTo(-10.6,-11.7);a.closePath();a.fill()};
AnnotationShape.Shapes.anTriangleLg.fill=function(a){this.shapeName="anTriangleLg";this.methodName="fill";this.initialize(a);a.transform(1,0,0,0.996,-21.9,-11.9496);a.transform(1,0,0,1,10.9,12.5);a.beginPath();a.fillStyle=this.getCurrentFillStyle();a.moveTo(-8.1,11.9);a.quadraticCurveTo(-8.8,12.3,-9.4,12.4);a.quadraticCurveTo(-10.7,12.6,-10.8,11.1);a.lineTo(-10.8,-11);a.lineTo(-10.4,-12);a.quadraticCurveTo(-9.8,-12.8,-8.2,-11.8);a.lineTo(10.9,0.1);a.lineTo(-8.1,11.9);a.closePath();a.fill()};
AnnotationShape.Shapes.anTriangleLg.shine=function(a){this.shapeName="anTriangleLg";this.methodName="shine";this.initialize(a);a.transform(1,0,0,1,-12.100000000000001,-0.1999999999999993);a.transform(1,0,0,1,0,0);a.beginPath();a.fillStyle="rgba(0,255,0,0)";a.moveTo(-19.9,-19.9);a.lineTo(20,-19.9);a.lineTo(20,20);a.lineTo(-19.9,20);a.lineTo(-19.9,-19.9);a.closePath();a.fill();a.transform(1,0,0,1,0,-6.2);a.beginPath();var b=a.createLinearGradient(0,-12.1,0,12.3);b.addColorStop(0,"rgba(255,255,255,0.702)");
b.addColorStop(1,"rgba(255,255,255,0.102)");a.fillStyle=b;a.moveTo(-19.9,-11.1);a.lineTo(20,-11.1);a.lineTo(20,11.2);a.quadraticCurveTo(9.5,-5,-19.9,10.9);a.lineTo(-19.9,-11.1);a.closePath();a.fill()};
AnnotationShape.Shapes.anTriangleLg.mask=function(a){this.shapeName="anTriangleLg";this.methodName="mask";this.initialize(a);a.transform(1,0,0,1,-10.9,0.4);a.beginPath();a.moveTo(-8.2,11.9);a.quadraticCurveTo(-8.9,12.3,-9.5,12.4);a.quadraticCurveTo(-10.8,12.6,-10.9,11.1);a.lineTo(-10.9,-11);a.lineTo(-10.5,-11.9);a.quadraticCurveTo(-9.9,-12.7,-8.3,-11.8);a.lineTo(10.8,0.1);a.lineTo(-8.2,11.9);a.closePath()};AnnotationShape.Shapes.anTriangleSm=new AnnotationShape;
AnnotationShape.Shapes.anTriangleSm.shadow=function(a){this.shapeName="anTriangleSm";this.methodName="shadow";this.initialize(a);a.transform(0.995,0,0,1,-16.851499999999998,-15);a.transform(1,0,0,1,9.2,14.5);a.beginPath();a.strokeStyle="#000000";a.lineWidth="2";a.lineCap="round";a.lineJoin="round";a.miterLimit="10";a.moveTo(-2.6,-13.1);a.quadraticCurveTo(-3.4,-13.9,-4.4,-14.2);a.quadraticCurveTo(-4.5,-14.2,-4.5,-14.2);a.quadraticCurveTo(-4.9,-14.4,-5.3,-14.4);a.quadraticCurveTo(-7,-14.4,-8,-13.3);
a.quadraticCurveTo(-8.1,-13.2,-8.1,-13.1);a.quadraticCurveTo(-8.6,-12.6,-8.7,-12.1);a.lineTo(-8.7,-12.3);a.quadraticCurveTo(-8.9,-11.8,-9,-11.3);a.quadraticCurveTo(-9.1,-11,-9.1,-10.7);a.lineTo(-9.1,10.8);a.quadraticCurveTo(-9.1,11.5,-8.7,12.2);a.quadraticCurveTo(-8.6,12.6,-8.4,12.9);a.quadraticCurveTo(-8.3,13.1,-8,13.4);a.quadraticCurveTo(-7.2,14.2,-5.9,14.4);a.quadraticCurveTo(-5.8,14.5,-5.6,14.4);a.quadraticCurveTo(-5.5,14.4,-5.4,14.4);a.quadraticCurveTo(-5.3,14.4,-5.2,14.4);a.lineTo(-5.2,14.4);
a.quadraticCurveTo(-5,14.5,-4.8,14.4);a.quadraticCurveTo(-3.8,14.2,-2.9,13.4);a.quadraticCurveTo(-2.8,13.4,-2.7,13.3);a.lineTo(-1.6,12.2);a.quadraticCurveTo(-1.5,12.2,-1.5,12.1);a.quadraticCurveTo(-0.8,11.4,-0.2,10.8);a.lineTo(-0.1,10.7);a.quadraticCurveTo(4.2,6,8.7,1.3);a.quadraticCurveTo(9.2,0.7,9.2,0);a.quadraticCurveTo(9.2,-0.7,8.7,-1.3);a.quadraticCurveTo(4.3,-5.9,0,-10.5);a.quadraticCurveTo(0,-10.5,0,-10.5);a.quadraticCurveTo(-0.4,-10.9,-0.7,-11.3);a.quadraticCurveTo(-1.7,-12.2,-2.7,-13.2);
a.lineTo(-2.6,-13.1);a.closePath();a.stroke()};
AnnotationShape.Shapes.anTriangleSm.border=function(a){this.shapeName="anTriangleSm";this.methodName="border";this.initialize(a);a.transform(1,0,0,0.997,-14.9,-12.9622);a.transform(1,0,0,1,7.2,12.5);a.beginPath();a.fillStyle=this.getCurrentBorderStyle();a.moveTo(-2.6,-13.1);a.lineTo(-2.7,-13.2);a.quadraticCurveTo(-1.7,-12.2,-0.7,-11.3);a.quadraticCurveTo(-0.4,-10.9,0,-10.5);a.quadraticCurveTo(0,-10.5,0,-10.5);a.quadraticCurveTo(4.3,-5.9,8.7,-1.3);a.quadraticCurveTo(9.2,-0.7,9.2,0);a.quadraticCurveTo(9.2,
0.7,8.7,1.3);a.quadraticCurveTo(4.2,6,-0.1,10.7);a.lineTo(-0.2,10.8);a.quadraticCurveTo(-0.8,11.4,-1.5,12.1);a.quadraticCurveTo(-1.5,12.2,-1.6,12.2);a.lineTo(-2.7,13.3);a.quadraticCurveTo(-2.8,13.4,-2.9,13.4);a.quadraticCurveTo(-3.8,14.2,-4.8,14.4);a.quadraticCurveTo(-5,14.5,-5.2,14.4);a.lineTo(-5.2,14.4);a.quadraticCurveTo(-5.3,14.4,-5.4,14.4);a.quadraticCurveTo(-5.5,14.4,-5.6,14.4);a.quadraticCurveTo(-5.8,14.5,-5.9,14.4);a.quadraticCurveTo(-7.2,14.2,-8,13.4);a.quadraticCurveTo(-8.3,13.1,-8.4,12.9);
a.quadraticCurveTo(-8.6,12.6,-8.7,12.2);a.quadraticCurveTo(-9.1,11.5,-9.1,10.8);a.lineTo(-9.1,-10.7);a.quadraticCurveTo(-9.1,-11,-9,-11.3);a.quadraticCurveTo(-8.9,-11.8,-8.7,-12.3);a.lineTo(-8.7,-12.1);a.quadraticCurveTo(-8.6,-12.6,-8.1,-13.1);a.quadraticCurveTo(-8.1,-13.2,-8,-13.3);a.quadraticCurveTo(-7,-14.4,-5.3,-14.4);a.quadraticCurveTo(-4.9,-14.4,-4.5,-14.2);a.quadraticCurveTo(-4.5,-14.2,-4.4,-14.2);a.quadraticCurveTo(-3.4,-13.9,-2.6,-13.1);a.lineTo(-2.6,-13.1);a.moveTo(-4.1,-11.7);a.quadraticCurveTo(-4.5,
-12.2,-5.1,-12.3);a.quadraticCurveTo(-5.2,-12.4,-5.4,-12.4);a.quadraticCurveTo(-6.1,-12.3,-6.6,-11.9);a.quadraticCurveTo(-6.8,-11.6,-6.9,-11.4);a.quadraticCurveTo(-7.1,-11,-7.1,-10.7);a.lineTo(-7.1,-10.7);a.lineTo(-7.1,10.8);a.quadraticCurveTo(-7.1,11.2,-6.9,11.5);a.quadraticCurveTo(-6.9,11.6,-6.8,11.7);a.quadraticCurveTo(-6.7,11.8,-6.6,11.9);a.quadraticCurveTo(-6.2,12.4,-5.6,12.4);a.quadraticCurveTo(-5.5,12.4,-5.4,12.4);a.quadraticCurveTo(-5.3,12.5,-5.3,12.4);a.lineTo(-5.2,12.4);a.quadraticCurveTo(-4.6,
12.4,-4.2,11.9);a.quadraticCurveTo(-4.1,11.9,-4.1,11.8);a.lineTo(-3,10.7);a.quadraticCurveTo(-2.3,10,-1.6,9.3);a.quadraticCurveTo(2.7,4.6,7.2,0);a.quadraticCurveTo(2.8,-4.5,-1.4,-9.1);a.quadraticCurveTo(-1.8,-9.5,-2.1,-9.9);a.quadraticCurveTo(-3.1,-10.8,-4.1,-11.7);a.lineTo(-4.1,-11.7);a.closePath();a.fill()};
AnnotationShape.Shapes.anTriangleSm.fill=function(a){this.shapeName="anTriangleSm";this.methodName="fill";this.initialize(a);a.transform(1,0,0,1,-14.9,-12.9);a.transform(1,0,0,1,7.3,12.5);a.beginPath();a.fillStyle=this.getCurrentFillStyle();a.moveTo(-5.4,-12.4);a.quadraticCurveTo(-6.1,-12.3,-6.6,-11.9);a.quadraticCurveTo(-6.8,-11.6,-6.9,-11.4);a.quadraticCurveTo(-7.1,-11,-7.1,-10.7);a.lineTo(-7.1,-10.7);a.lineTo(-7.1,10.8);a.quadraticCurveTo(-7.1,11.2,-6.9,11.5);a.quadraticCurveTo(-6.9,11.6,-6.8,
11.7);a.quadraticCurveTo(-6.7,11.8,-6.6,11.9);a.quadraticCurveTo(-6.2,12.4,-5.6,12.4);a.quadraticCurveTo(-5.5,12.4,-5.4,12.4);a.quadraticCurveTo(-5.3,12.5,-5.3,12.4);a.lineTo(-5.2,12.4);a.quadraticCurveTo(-4.6,12.4,-4.2,11.9);a.quadraticCurveTo(-4.1,11.9,-4.1,11.8);a.lineTo(-3,10.7);a.quadraticCurveTo(-2.3,10,-1.6,9.3);a.quadraticCurveTo(2.7,4.6,7.2,0);a.quadraticCurveTo(2.8,-4.5,-1.4,-9.1);a.quadraticCurveTo(-1.8,-9.5,-2.2,-9.9);a.quadraticCurveTo(-3.1,-10.8,-4.1,-11.7);a.quadraticCurveTo(-4.5,-12.2,
-5.1,-12.3);a.quadraticCurveTo(-5.2,-12.4,-5.4,-12.4);a.lineTo(-5.4,-12.4);a.closePath();a.fill()};
AnnotationShape.Shapes.anTriangleSm.shine=function(a){this.shapeName="anTriangleSm";this.methodName="shine";this.initialize(a);a.transform(1,0,0,1,-8.200000000000001,-0.2999999999999998);a.transform(1,0,0,1,0,0);a.beginPath();a.fillStyle="rgba(0,255,0,0)";a.moveTo(-19.9,-19.9);a.lineTo(20,-19.9);a.lineTo(20,20);a.lineTo(-19.9,20);a.lineTo(-19.9,-19.9);a.closePath();a.fill();a.transform(1,0,0,1,0,-6.2);a.beginPath();var b=a.createLinearGradient(0,-12.1,0,12.3);b.addColorStop(0,"rgba(255,255,255,0.702)");
b.addColorStop(1,"rgba(255,255,255,0.102)");a.fillStyle=b;a.moveTo(-19.9,-11.1);a.lineTo(20,-11.1);a.lineTo(20,11.2);a.quadraticCurveTo(9.5,-5,-19.9,10.9);a.lineTo(-19.9,-11.1);a.closePath();a.fill()};
AnnotationShape.Shapes.anTriangleSm.mask=function(a){this.shapeName="anTriangleSm";this.methodName="mask";this.initialize(a);a.transform(1,0,0,1,-7.4,-0.4);a.beginPath();a.moveTo(-5.6,-12.4);a.quadraticCurveTo(-6.3,-12.3,-6.9,-11.9);a.quadraticCurveTo(-7.1,-11.6,-7.2,-11.4);a.quadraticCurveTo(-7.3,-11,-7.3,-10.7);a.lineTo(-7.4,-10.7);a.lineTo(-7.4,10.8);a.quadraticCurveTo(-7.3,11.2,-7.2,11.5);a.quadraticCurveTo(-7.1,11.6,-7,11.7);a.quadraticCurveTo(-7,11.8,-6.9,11.9);a.quadraticCurveTo(-6.4,12.4,
-5.9,12.4);a.quadraticCurveTo(-5.8,12.4,-5.7,12.4);a.quadraticCurveTo(-5.6,12.5,-5.5,12.4);a.lineTo(-5.5,12.4);a.quadraticCurveTo(-4.9,12.4,-4.5,11.9);a.quadraticCurveTo(-4.4,11.9,-4.3,11.8);a.lineTo(-3.2,10.7);a.quadraticCurveTo(-2.5,10,-1.9,9.3);a.quadraticCurveTo(2.4,4.6,7,0);a.quadraticCurveTo(2.5,-4.5,-1.7,-9.1);a.quadraticCurveTo(-2,-9.5,-2.4,-9.9);a.quadraticCurveTo(-3.4,-10.8,-4.3,-11.7);a.quadraticCurveTo(-4.7,-12.2,-5.3,-12.3);a.quadraticCurveTo(-5.5,-12.4,-5.6,-12.4);a.lineTo(-5.6,-12.4);
a.closePath()};AnnotationShape.Shapes.anV=new AnnotationShape;
AnnotationShape.Shapes.anV.shadow=function(a){this.shapeName="anV";this.methodName="shadow";this.initialize(a);a.transform(1,0,0,1,-18,-14);a.transform(1,0,0,1,10,14.4);a.beginPath();a.fillStyle=this.getCurrentFillStyle();a.moveTo(-1.9,-14.4);a.quadraticCurveTo(-3.5,-15.5,-5.5,-15.3);a.quadraticCurveTo(-7.6,-15.1,-9,-13.6);a.quadraticCurveTo(-9.1,-13.6,-9.1,-13.5);a.quadraticCurveTo(-10.5,-12.2,-10.8,-10.2);a.lineTo(-10.7,-10.3);a.quadraticCurveTo(-11.1,-8.2,-10.1,-6.4);a.quadraticCurveTo(-9.9,-6,
-9.5,-5.7);a.lineTo(-3.7,0);a.lineTo(-9.5,5.9);a.lineTo(-9.5,5.9);a.quadraticCurveTo(-9.7,6.1,-9.9,6.4);a.lineTo(-9.9,6.3);a.quadraticCurveTo(-11.1,8,-10.7,10.3);a.lineTo(-10.8,10.3);a.quadraticCurveTo(-10.5,12.3,-9,13.8);a.lineTo(-9,13.8);a.quadraticCurveTo(-9,13.8,-8.9,13.9);a.quadraticCurveTo(-7.6,15.1,-5.7,15.4);a.quadraticCurveTo(-5.6,15.4,-5.5,15.4);a.quadraticCurveTo(-5.5,15.4,-5.4,15.4);a.quadraticCurveTo(-5.4,15.4,-5.3,15.4);a.quadraticCurveTo(-3.5,15.5,-1.9,14.5);a.quadraticCurveTo(-1.9,
14.5,-1.8,14.5);a.quadraticCurveTo(-1.6,14.3,-1.4,14.2);a.quadraticCurveTo(-1.4,14.1,-1.3,14.1);a.lineTo(10.1,2.1);a.lineTo(10.1,2);a.quadraticCurveTo(10.9,1.1,10.9,0);a.quadraticCurveTo(10.9,-1,10.1,-1.9);a.lineTo(10.1,-1.9);a.lineTo(-1.3,-14);a.quadraticCurveTo(-1.4,-14,-1.4,-14.1);a.quadraticCurveTo(-1.6,-14.2,-1.8,-14.4);a.quadraticCurveTo(-1.9,-14.4,-1.9,-14.4);a.lineTo(-1.9,-14.4);a.moveTo(-2.7,-12.6);a.lineTo(8.7,-0.5);a.lineTo(8.7,-0.6);a.quadraticCurveTo(8.9,-0.3,8.9,0);a.quadraticCurveTo(8.9,
0.4,8.7,0.7);a.lineTo(8.7,0.7);a.lineTo(-2.7,12.7);a.quadraticCurveTo(-2.8,12.7,-2.9,12.8);a.quadraticCurveTo(-3,12.8,-3,12.9);a.quadraticCurveTo(-4.1,13.5,-5.2,13.4);a.quadraticCurveTo(-5.3,13.4,-5.3,13.4);a.lineTo(-5.4,13.4);a.quadraticCurveTo(-6.7,13.2,-7.6,12.4);a.lineTo(-7.6,12.4);a.lineTo(-7.6,12.4);a.quadraticCurveTo(-8.6,11.4,-8.8,10);a.lineTo(-8.8,10);a.quadraticCurveTo(-9,8.6,-8.2,7.5);a.lineTo(-8.2,7.5);a.quadraticCurveTo(-8.2,7.4,-8.1,7.3);a.lineTo(-8.1,7.3);a.lineTo(-1.6,0.7);a.quadraticCurveTo(-1.3,
0.4,-1.3,0);a.quadraticCurveTo(-1.3,-0.2,-1.6,-0.5);a.lineTo(-8.1,-7.2);a.quadraticCurveTo(-8.2,-7.3,-8.3,-7.3);a.quadraticCurveTo(-8.3,-7.4,-8.3,-7.4);a.quadraticCurveTo(-9,-8.6,-8.8,-9.9);a.quadraticCurveTo(-8.8,-9.9,-8.8,-10);a.quadraticCurveTo(-8.6,-11.3,-7.6,-12.2);a.quadraticCurveTo(-7.5,-12.2,-7.5,-12.3);a.quadraticCurveTo(-6.6,-13.2,-5.3,-13.3);a.quadraticCurveTo(-4.1,-13.4,-3,-12.8);a.quadraticCurveTo(-3,-12.8,-2.9,-12.7);a.quadraticCurveTo(-2.8,-12.7,-2.7,-12.6);a.lineTo(-2.7,-12.6);a.closePath();
a.fill()};
AnnotationShape.Shapes.anV.border=function(a){this.shapeName="anV";this.methodName="border";this.initialize(a);a.transform(1,0,0,0.998,-15.9,-11.975);a.transform(1,0,0,1,8,12.4);a.beginPath();a.fillStyle=this.getCurrentBorderStyle();a.moveTo(-5.4,-14.3);a.quadraticCurveTo(-3.8,-14.5,-2.4,-13.6);a.quadraticCurveTo(-2.2,-13.5,-2,-13.3);a.lineTo(9.4,-1.2);a.quadraticCurveTo(9.9,-0.7,9.9,0);a.quadraticCurveTo(9.9,0.8,9.4,1.4);a.lineTo(-2,13.4);a.quadraticCurveTo(-2.2,13.5,-2.4,13.7);a.quadraticCurveTo(-3.7,14.5,
-5.3,14.4);a.quadraticCurveTo(-5.4,14.4,-5.5,14.4);a.quadraticCurveTo(-7.1,14.1,-8.3,13.1);a.quadraticCurveTo(-8.3,13.1,-8.3,13);a.quadraticCurveTo(-9.6,11.8,-9.8,10.2);a.lineTo(-9.8,10.1);a.quadraticCurveTo(-10.1,8.3,-9.1,6.9);a.quadraticCurveTo(-9,6.7,-8.8,6.6);a.lineTo(-2.3,0);a.lineTo(-8.9,-6.5);a.quadraticCurveTo(-9.1,-6.7,-9.2,-6.9);a.quadraticCurveTo(-10,-8.4,-9.8,-10.1);a.quadraticCurveTo(-9.5,-11.8,-8.3,-12.9);a.lineTo(-8.3,-12.9);a.quadraticCurveTo(-7.1,-14.1,-5.4,-14.3);a.lineTo(-5.4,-14.3);
a.moveTo(-7.8,-9.8);a.quadraticCurveTo(-8,-8.8,-7.5,-8);a.lineTo(0.3,0);a.lineTo(-7.4,8);a.quadraticCurveTo(-8,8.8,-7.8,9.8);a.quadraticCurveTo(-7.7,10.9,-6.9,11.6);a.quadraticCurveTo(-6.2,12.3,-5.2,12.4);a.quadraticCurveTo(-4.3,12.5,-3.5,12);a.lineTo(7.9,0);a.lineTo(-3.5,-11.9);a.quadraticCurveTo(-4.3,-12.4,-5.2,-12.3);a.quadraticCurveTo(-6.2,-12.2,-6.9,-11.5);a.quadraticCurveTo(-7.7,-10.8,-7.8,-9.8);a.lineTo(-7.8,-9.8);a.closePath();a.fill()};
AnnotationShape.Shapes.anV.fill=function(a){this.shapeName="anV";this.methodName="fill";this.initialize(a);a.transform(1,0,0,0.998,-15.9,-11.975);a.transform(1,0,0,1,8,12.5);a.beginPath();a.fillStyle=this.getCurrentFillStyle();a.moveTo(-6.9,-11.5);a.quadraticCurveTo(-7.7,-10.8,-7.8,-9.8);a.quadraticCurveTo(-8,-8.8,-7.5,-8);a.lineTo(0.3,0);a.lineTo(-7.4,8);a.quadraticCurveTo(-8,8.8,-7.8,9.9);a.quadraticCurveTo(-7.7,10.9,-6.9,11.6);a.quadraticCurveTo(-6.2,12.3,-5.2,12.4);a.quadraticCurveTo(-4.3,12.5,
-3.5,12);a.lineTo(7.9,0);a.lineTo(-3.5,-11.9);a.quadraticCurveTo(-4.3,-12.4,-5.2,-12.3);a.quadraticCurveTo(-6.2,-12.2,-6.9,-11.5);a.lineTo(-6.9,-11.5);a.closePath();a.fill()};
AnnotationShape.Shapes.anV.shine=function(a){this.shapeName="anV";this.methodName="shine";this.initialize(a);a.transform(1,0,0,1,-5.5,0);a.transform(1,0,0,1,0,0);a.beginPath();a.fillStyle="rgba(0,255,0,0)";a.moveTo(-19.9,-19.9);a.lineTo(20,-19.9);a.lineTo(20,20);a.lineTo(-19.9,20);a.lineTo(-19.9,-19.9);a.closePath();a.fill();a.transform(1,0,0,1,0,-6.2);a.beginPath();var b=a.createLinearGradient(0,-12.1,0,12.3);b.addColorStop(0,"rgba(255,255,255,0.702)");b.addColorStop(1,"rgba(255,255,255,0.102)");
a.fillStyle=b;a.moveTo(-19.9,-11.1);a.lineTo(20,-11.1);a.lineTo(20,11.2);a.quadraticCurveTo(9.5,-5,-19.9,10.9);a.lineTo(-19.9,-11.1);a.closePath();a.fill()};
AnnotationShape.Shapes.anV.mask=function(a){this.shapeName="anV";this.methodName="mask";this.initialize(a);a.transform(1,0,0,1,-7.9,0.4);a.beginPath();a.moveTo(-6.9,-11.5);a.quadraticCurveTo(-7.7,-10.8,-7.8,-9.8);a.quadraticCurveTo(-8,-8.8,-7.5,-8);a.lineTo(0.3,0);a.lineTo(-7.4,8);a.quadraticCurveTo(-8,8.8,-7.8,9.9);a.quadraticCurveTo(-7.7,10.9,-6.9,11.6);a.quadraticCurveTo(-6.2,12.3,-5.2,12.4);a.quadraticCurveTo(-4.3,12.5,-3.5,12);a.lineTo(7.9,0);a.lineTo(-3.5,-11.9);a.quadraticCurveTo(-4.3,-12.4,
-5.2,-12.3);a.quadraticCurveTo(-6.2,-12.2,-6.9,-11.5);a.lineTo(-6.9,-11.5);a.closePath()};AnnotationShape.Shapes.anX=new AnnotationShape;
AnnotationShape.Shapes.anX.shadow=function(a){this.shapeName="anX";this.methodName="shadow";this.initialize(a);a.transform(1,0,0,1,-13.9,-14);a.transform(1,0,0,1,14.5,14.5);a.beginPath();a.fillStyle=this.getCurrentFillStyle();a.moveTo(6,-15.4);a.quadraticCurveTo(4.7,-15.3,3.9,-14.5);a.lineTo(0,-10.6);a.lineTo(-3.7,-14.5);a.quadraticCurveTo(-4.6,-15.3,-5.9,-15.4);a.quadraticCurveTo(-7.1,-15.3,-8,-14.5);a.lineTo(-14.5,-8);a.quadraticCurveTo(-15.3,-7.2,-15.4,-5.9);a.quadraticCurveTo(-15.3,-4.6,-14.5,
-3.8);a.lineTo(-10.5,0);a.lineTo(-14.5,3.9);a.quadraticCurveTo(-15.4,4.8,-15.4,6);a.quadraticCurveTo(-15.3,7.3,-14.5,8.2);a.lineTo(-8,14.6);a.quadraticCurveTo(-7.2,15.4,-5.9,15.5);a.quadraticCurveTo(-4.7,15.4,-3.8,14.6);a.lineTo(-3.8,14.6);a.lineTo(0,10.7);a.lineTo(3.9,14.6);a.quadraticCurveTo(4.7,15.4,6,15.5);a.quadraticCurveTo(7.2,15.4,8.1,14.6);a.lineTo(8.1,14.6);a.lineTo(14.6,8.2);a.lineTo(14.6,8.2);a.quadraticCurveTo(15.4,7.3,15.5,6);a.quadraticCurveTo(15.4,4.7,14.6,3.9);a.lineTo(10.7,0);a.lineTo(14.6,
-3.7);a.lineTo(14.6,-3.7);a.quadraticCurveTo(15.5,-4.6,15.5,-5.8);a.quadraticCurveTo(15.4,-7,14.6,-7.9);a.lineTo(14.6,-8);a.lineTo(8.2,-14.5);a.lineTo(8.2,-14.5);a.quadraticCurveTo(7.3,-15.3,6,-15.4);a.lineTo(6,-15.4);a.moveTo(6.8,-13.1);a.lineTo(13.2,-6.6);a.quadraticCurveTo(13.5,-6.2,13.5,-5.8);a.quadraticCurveTo(13.4,-5.4,13.2,-5.1);a.lineTo(13.2,-5.1);a.lineTo(8.6,-0.6);a.quadraticCurveTo(8.3,-0.3,8.3,0);a.quadraticCurveTo(8.3,0.4,8.6,0.6);a.lineTo(13.2,5.3);a.quadraticCurveTo(13.5,5.6,13.5,6);
a.quadraticCurveTo(13.5,6.4,13.2,6.8);a.lineTo(6.7,13.2);a.quadraticCurveTo(6.4,13.5,6,13.5);a.quadraticCurveTo(5.6,13.5,5.3,13.2);a.lineTo(0.6,8.6);a.quadraticCurveTo(0.4,8.3,0,8.3);a.quadraticCurveTo(-0.3,8.2,-0.5,8.5);a.lineTo(-5.2,13.2);a.lineTo(-5.2,13.2);a.quadraticCurveTo(-5.5,13.5,-5.9,13.5);a.quadraticCurveTo(-6.3,13.5,-6.6,13.2);a.lineTo(-13.1,6.8);a.quadraticCurveTo(-13.4,6.4,-13.4,6);a.quadraticCurveTo(-13.3,5.6,-13.1,5.3);a.lineTo(-8.4,0.7);a.quadraticCurveTo(-8.1,0.4,-8.1,0);a.quadraticCurveTo(-8.1,
-0.2,-8.4,-0.5);a.lineTo(-13.1,-5.2);a.quadraticCurveTo(-13.4,-5.5,-13.4,-5.9);a.quadraticCurveTo(-13.4,-6.3,-13.1,-6.6);a.lineTo(-6.5,-13.1);a.quadraticCurveTo(-6.3,-13.4,-5.9,-13.4);a.quadraticCurveTo(-5.4,-13.4,-5.1,-13.1);a.lineTo(-0.5,-8.5);a.quadraticCurveTo(-0.2,-8.2,0,-8.2);a.quadraticCurveTo(0.4,-8.2,0.7,-8.5);a.lineTo(5.3,-13.1);a.quadraticCurveTo(5.6,-13.4,6,-13.4);a.quadraticCurveTo(6.4,-13.4,6.8,-13.1);a.lineTo(6.8,-13.1);a.closePath();a.fill()};
AnnotationShape.Shapes.anX.border=function(a){this.shapeName="anX";this.methodName="border";this.initialize(a);a.transform(1,0,0,1,-12,-12);a.transform(1,0,0,1,12.5,12.5);a.beginPath();a.fillStyle=this.getCurrentBorderStyle();a.moveTo(-5.9,-14.3);a.quadraticCurveTo(-5,-14.4,-4.4,-13.8);a.lineTo(0,-9.1);a.lineTo(4.6,-13.7);a.quadraticCurveTo(5.2,-14.3,6,-14.3);a.quadraticCurveTo(6.8,-14.3,7.4,-13.7);a.lineTo(13.9,-7.2);a.quadraticCurveTo(14.5,-6.7,14.4,-5.8);a.quadraticCurveTo(14.4,-5,13.8,-4.4);a.lineTo(9.2,
0);a.lineTo(13.9,4.6);a.quadraticCurveTo(14.5,5.2,14.4,6);a.quadraticCurveTo(14.4,6.8,13.8,7.4);a.lineTo(7.4,13.9);a.quadraticCurveTo(6.8,14.5,6,14.5);a.quadraticCurveTo(5.2,14.5,4.6,13.9);a.lineTo(0,9.3);a.lineTo(-4.5,13.9);a.quadraticCurveTo(-5.1,14.5,-5.9,14.5);a.quadraticCurveTo(-6.7,14.5,-7.3,13.9);a.lineTo(-13.8,7.4);a.quadraticCurveTo(-14.4,6.8,-14.4,6);a.quadraticCurveTo(-14.4,5.2,-13.8,4.6);a.lineTo(-9.1,0);a.lineTo(-13.8,-4.5);a.quadraticCurveTo(-14.4,-5.1,-14.4,-5.9);a.quadraticCurveTo(-14.4,
-6.7,-13.8,-7.3);a.lineTo(-7.3,-13.8);a.quadraticCurveTo(-6.7,-14.4,-5.9,-14.3);a.lineTo(-5.9,-14.3);a.moveTo(-5.9,-12.3);a.lineTo(-12.4,-5.9);a.lineTo(-6.3,0);a.lineTo(-12.4,6);a.lineTo(-5.9,12.5);a.lineTo(0,6.4);a.lineTo(6,12.4);a.lineTo(12.4,6);a.lineTo(6.4,0);a.lineTo(12.4,-5.9);a.lineTo(6,-12.3);a.lineTo(0,-6.3);a.lineTo(-5.9,-12.3);a.closePath();a.fill()};
AnnotationShape.Shapes.anX.fill=function(a){this.shapeName="anX";this.methodName="fill";this.initialize(a);a.transform(1,0,0,1,-12,-12);a.transform(1,0,0,1,12.5,12.5);a.beginPath();a.fillStyle=this.getCurrentFillStyle();a.moveTo(0,-6.3);a.lineTo(-5.9,-12.4);a.lineTo(-12.4,-5.9);a.lineTo(-6.3,0);a.lineTo(-12.4,6);a.lineTo(-5.9,12.5);a.lineTo(0,6.4);a.lineTo(6,12.4);a.lineTo(12.5,6);a.lineTo(6.4,0);a.lineTo(12.5,-5.9);a.lineTo(6,-12.4);a.lineTo(0,-6.3);a.closePath();a.fill()};
AnnotationShape.Shapes.anX.shine=function(a){this.shapeName="anX";this.methodName="shine";this.initialize(a);a.transform(1,0,0,1,-0.10000000000000142,0);a.transform(1,0,0,1,0,0);a.beginPath();a.fillStyle="rgba(0,255,0,0)";a.moveTo(-19.9,-19.9);a.lineTo(20,-19.9);a.lineTo(20,20);a.lineTo(-19.9,20);a.lineTo(-19.9,-19.9);a.closePath();a.fill();a.transform(1,0,0,1,0,-6.2);a.beginPath();var b=a.createLinearGradient(0,-12.1,0,12.3);b.addColorStop(0,"rgba(255,255,255,0.702)");b.addColorStop(1,"rgba(255,255,255,0.102)");
a.fillStyle=b;a.moveTo(-19.9,-11.1);a.lineTo(20,-11.1);a.lineTo(20,11.2);a.quadraticCurveTo(9.5,-5,-19.9,10.9);a.lineTo(-19.9,-11.1);a.closePath();a.fill()};
AnnotationShape.Shapes.anX.mask=function(a){this.shapeName="anX";this.methodName="mask";this.initialize(a);a.transform(1,0,0,1,0.5,0.5);a.beginPath();a.moveTo(0,-6.3);a.lineTo(-5.9,-12.4);a.lineTo(-12.4,-5.9);a.lineTo(-6.3,0);a.lineTo(-12.4,6);a.lineTo(-5.9,12.5);a.lineTo(0,6.4);a.lineTo(6,12.4);a.lineTo(12.5,6);a.lineTo(6.4,0);a.lineTo(12.5,-5.9);a.lineTo(6,-12.4);a.lineTo(0,-6.3);a.closePath()};AnnotationShape.ShapeNames="anArrowRnd,anArrowSqr,anCheck,anTriangleLg,anTriangleSm,anV,anX".split(",");var bwAnnotationArrow={STYLE_CHECK:"check",STYLE_CROSS:"cross",STYLE_ROUND:"arrowround",STYLE_SQUARE:"arrowsquare",STYLE_TRIANGLE:"arrowtriangle",STYLE_V:"arrowv",SYMBOL_CHECK:"anCheck",SYMBOL_CROSS:"anX",SYMBOL_ROUND:"anArrowRnd",SYMBOL_SQUARE:"anArrowSqr",SYMBOL_TRIANGLE:"anTriangleSm",SYMBOL_V:"anV",PROPERTY_FILL:"mcFill",PROPERTY_BORDER:"mcBorder",PROPERTY_MASK_LEG:"mcMaskLeg",SYMBOL_CHECK_MASK:"anCheckMask",SYMBOL_CROSS_MASK:"anXMask",SYMBOL_CROSS_MASK_LEG:"maskLeg",DURATION_FADE:333,DURATION_BOUNCE:300,
DURATION_DRAW:780,BOUNCE_DISTANCE:15,TOTAL_MASK_FRAMES:26,MASK_LEG_FRAMES:18,HTML5_SCALE_FACTOR:0.017};
Annotation.prototype.convertToArrow=function(){this.m_nFrame=1;this.m_nShadowY=this.m_nShadowX=0;this.drawMaskLegs={};this.adjustSize=function(){this.width=2*this.xscale;this.height=2*this.yscale;this.originalWidth=this.width;this.originalHeight=this.height;this.cx=this.width/2;this.cy=this.height/2;this.x-=this.cx;this.y-=this.cy;this.originalX=this.x;this.originalY=this.y;this.shapeRotation=this.rotation*Math.PI/180;this.rotation=0;this.m_nInitAlpha=100};this.getShapeObject=function(){var a=AnnotationShape.Shapes[AnnotationShape.ShapeMap[this.arrowstyle]];
a.x=this.cx;a.y=this.cy;a.rotation=this.shapeRotation;a.scale=this.xscale*bwAnnotationArrow.HTML5_SCALE_FACTOR;a.fillStyle=this.colors.fillcolor.stops[0].color;a.borderStyle=this.colors.bordercolor.stops[0].color;return a};this.renderArrow=function(){this.getShapeObject().draw(this.context)};this.GetSegmentDuration=function(a){switch(a){case bwAnnotationAnimation.TRANS_FADE:a=bwAnnotationArrow.DURATION_FADE;break;case bwAnnotationAnimation.TRANS_BOUNCE:a=bwAnnotationArrow.DURATION_BOUNCE;break;case bwAnnotationAnimation.TRANS_DRAW:a=
bwAnnotationArrow.DURATION_DRAW;break;default:a=0}return a};this.UpdateFade=function(a){this.alpha=this.m_nInitAlpha*(1-a);this.ref.css("opacity",this.alpha/100)};this.UpdateDraw=function(a){this.EnsureOffCanvasExists();if(this.canvas){var b=this,c=this.getShapeObject();c.drawmask=function(c){this.initialize(c);this.initialize(b.offContext);var c=b.drawMaskLegs[b.arrowstyle],e=c.length,f=Math.floor(a*e),g=(a-f/e)*e;f>=e&&(f=e-1,g=1);c[f].call(b,g)};c.draw(this.context);c.drawmask=null;if(this.m_mcMask)this.m_mcMask.gotoAndStop(this.m_nFrame),
this.m_mcMask.visible=1<=a?!1:!0;if(this.m_mcMaskLeg)this.m_mcMaskLeg.gotoAndStop(this.m_nFrame),this.m_mcMaskLeg.visible=a>=bwAnnotationArrow.MASK_LEG_FRAMES/bwAnnotationArrow.TOTAL_MASK_FRAMES?!1:!0}};this.UpdateBounce=function(a){if(void 0===this.m_nBounceX)this.m_nBounceX=this.x,this.m_nBounceY=this.y;var b=0,c=0,c=this.shapeRotation,a=1-a;0.25>a?(b=Math.cos(c)*bwAnnotationArrow.BOUNCE_DISTANCE/2*a,c=Math.sin(c)*bwAnnotationArrow.BOUNCE_DISTANCE/2*a):(b=Math.cos(c)*(bwAnnotationArrow.BOUNCE_DISTANCE/
2+bwAnnotationArrow.BOUNCE_DISTANCE/2*a),c=Math.sin(c)*(bwAnnotationArrow.BOUNCE_DISTANCE/2+bwAnnotationArrow.BOUNCE_DISTANCE/2*a));this.x=this.m_nBounceX-b;this.y=this.m_nBounceY-c;this.ref.css("left",this.x);this.ref.css("top",this.y)};this.CROSS_MASK_WIDTH=9;this.DrawCrossMaskLeg1=function(a){var b=this.offContext;b.beginPath();b.rotate(-Math.PI/4);b.translate(0.5*-this.CROSS_MASK_WIDTH,-15);var c=this.CROSS_MASK_WIDTH,a=parseInt(33*a);b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,a);b.lineTo(0,a);b.closePath();
b.rotate(Math.PI/4);b.restore();b.save();b.clip();this.offContext.drawImage(this.canvas,0,0);this.context.restore();this.context.clearRect(0,0,1E3,1E3);this.context.drawImage(this.offCanvas,0,0);this.offContext.restore();this.offContext.clearRect(0,0,1E3,1E3);b.restore()};this.DrawCrossMaskLeg2=function(a){var b=this.offContext;b.beginPath();b.rotate(-Math.PI/4);b.translate(-17,-15);var c=this.CROSS_MASK_WIDTH,d=parseInt(33*a),d=33;b.moveTo(17-0.5*this.CROSS_MASK_WIDTH,0);b.lineTo(c+17-0.5*this.CROSS_MASK_WIDTH,
0);b.lineTo(c+17-0.5*this.CROSS_MASK_WIDTH,d);b.lineTo(17-0.5*this.CROSS_MASK_WIDTH,d);c=33*a;b.moveTo(0,0);b.lineTo(c+0,0);b.lineTo(c+0,d);b.lineTo(0,d);b.closePath();b.rotate(Math.PI/4);b.restore();b.save();b.clip();this.offContext.drawImage(this.canvas,0,0);this.context.restore();this.context.clearRect(0,0,1E3,1E3);this.context.drawImage(this.offCanvas,0,0);this.offContext.restore();this.offContext.clearRect(0,0,1E3,1E3);b.restore()};this.DrawCheckMaskLeg1=function(a){var b=this.offContext;b.beginPath();
b.rotate(-Math.PI/4);b.translate(-12.3,-12.3);a=parseInt(21.5*a);b.moveTo(0,0);b.lineTo(13,0);b.lineTo(13,a);b.lineTo(0,a);b.closePath();b.rotate(Math.PI/4);b.restore();b.save();b.clip();this.offContext.drawImage(this.canvas,0,0);this.context.restore();this.context.clearRect(0,0,1E3,1E3);this.context.drawImage(this.offCanvas,0,0);this.offContext.restore();this.offContext.clearRect(0,0,1E3,1E3);b.restore()};this.DrawCheckMaskLeg2=function(a){var b=this.offContext;b.beginPath();b.rotate(-Math.PI/4);
b.translate(-12.3,-12.3);a=13+14*a;b.moveTo(0,0);b.lineTo(a,0);b.lineTo(a,22);b.lineTo(0,22);b.closePath();b.rotate(Math.PI/4);b.restore();b.save();b.clip();this.offContext.drawImage(this.canvas,0,0);this.context.restore();this.context.clearRect(0,0,1E3,1E3);this.context.drawImage(this.offCanvas,0,0);this.offContext.restore();this.offContext.clearRect(0,0,1E3,1E3);b.restore()};this.drawMaskLegs[bwAnnotationArrow.STYLE_CROSS]=[this.DrawCrossMaskLeg1,this.DrawCrossMaskLeg2];this.drawMaskLegs[bwAnnotationArrow.STYLE_CHECK]=
[this.DrawCheckMaskLeg1,this.DrawCheckMaskLeg2];this.EnsureOffCanvasExists=function(){if(!this.offCanvas){var a=$('<canvas class="content offcanvas" width="'+this.width+'" height="'+this.height+'"></canvas>');this.offCanvas=a.get(0);this.offContext=this.offCanvas.getContext("2d");$(document.body).append(a)}}};var bwAnnotationRectangle={DURATION_FADE:333,DURATION_STRETCH:333};
Annotation.prototype.convertToRectangle=function(){this.m_nInitAlpha=100;this.renderArrow=function(){this.getShapeObject().draw(this.context)};this.GetSegmentDuration=function(a){switch(a){case bwAnnotationAnimation.TRANS_FADE:a=bwAnnotationRectangle.DURATION_FADE;break;case bwAnnotationAnimation.TRANS_STRETCH:a=bwAnnotationRectangle.DURATION_STRETCH;break;default:a=0}return a};this.UpdateFade=function(a){this.alpha=this.m_nInitAlpha*(1-a);this.ref.css("opacity",this.alpha/100)};this.UpdateStretch=
function(a){var b=0.6+0.4*(1-a);this.context.clearRect(0,0,this.width,this.height);a=0.5*this.height*(1-b);b=0.5*this.width*(1-b);this.drawStrokedRoundRect(a,b,this.width-2*a,this.height-2*b)}};var bwAnnotationSpotlight={DURATION_DRAW_BORDER:1E3,DURATION_DRAW_SHADE:500};bwAnnotationSpotlight.DURATION_DRAW=bwAnnotationSpotlight.DURATION_DRAW_BORDER+bwAnnotationSpotlight.DURATION_DRAW_SHADE;bwAnnotationSpotlight.POSITION_TOP_RIGHT=1;bwAnnotationSpotlight.POSITION_BOTTOM_RIGHT=3;bwAnnotationSpotlight.POSITION_BOTTOM_LEFT=5;bwAnnotationSpotlight.POSITION_TOP_LEFT=7;bwAnnotationSpotlight.POSITION_TOP=0;bwAnnotationSpotlight.POSITION_RIGHT=2;bwAnnotationSpotlight.POSITION_BOTTOM=4;
bwAnnotationSpotlight.POSITION_LEFT=6;bwAnnotationSpotlight.CANVAS_PAD=4;
Annotation.prototype.convertToSpotlight=function(){this.m_nBoxRadius=this.boxradius;this.m_nWidth=this.originalWidth;this.m_nHeight=this.originalHeight;this.m_nHorizontalLength=this.originalWidth-2*this.boxradius;this.m_nVerticalLength=this.originalHeight-2*this.boxradius;this.m_nCornerLength=0.25*2*Math.PI*this.boxradius;this.m_nPerimeterLength=2*this.m_nHorizontalLength+2*this.m_nVerticalLength+4*this.m_nCornerLength;this.m_arrPositions=[bwAnnotationSpotlight.POSITION_TOP,bwAnnotationSpotlight.POSITION_TOP_RIGHT,
bwAnnotationSpotlight.POSITION_RIGHT,bwAnnotationSpotlight.POSITION_BOTTOM_RIGHT,bwAnnotationSpotlight.POSITION_BOTTOM,bwAnnotationSpotlight.POSITION_BOTTOM_LEFT,bwAnnotationSpotlight.POSITION_LEFT,bwAnnotationSpotlight.POSITION_TOP_LEFT];this.m_nCurrentFillAlpha=0;this.adjustSize=function(){this.originalX=this.x;this.originalY=this.y;this.originalWidth=this.width;this.originalHeight=this.height;this.x-=bwAnnotationSpotlight.CANVAS_PAD;this.y-=bwAnnotationSpotlight.CANVAS_PAD;this.width+=2*bwAnnotationSpotlight.CANVAS_PAD;
this.height+=2*bwAnnotationSpotlight.CANVAS_PAD};this.GetSegmentDuration=function(a){switch(a){case bwAnnotationAnimation.TRANS_DRAW:a=bwAnnotationSpotlight.DURATION_DRAW;break;default:a=0}return a};this.UpdateDraw=function(a){this.context.restore();this.context.save();this.context.clearRect(0,0,this.width,this.height);this.context.lineCap="round";this.context.translate(bwAnnotationSpotlight.CANVAS_PAD,bwAnnotationSpotlight.CANVAS_PAD);this.context.beginPath();this.context.lineWidth=this.borderwidth;
this.context.strokeStyle=this.colors.bordercolor.toColorString();this.context.moveTo(this.m_nBoxRadius,0);var b=a/0.67;1<b&&(b=1);this.m_nCurrentPerimeterLength=this.m_nLengthToDraw=b*this.m_nPerimeterLength;var c=1;1<=b?(a=(a-0.67)/0.33,1<a&&(a=1),this.DrawSpotlightMask(a),c=1-a):this.spotContext.clearRect(0,0,this.slide.width,this.slide.height);this.context.shadowOffsetX=2;this.context.shadowOffsetY=2;this.context.shadowBlur=4;this.context.shadowColor="rgba(0,0,0,"+0.5*c+")";this.DrawRoundedRect(b)};
this.DrawSpotlightMask=function(a){this.spotContext.save();this.spotContext.clearRect(0,0,this.slide.width,this.slide.height);this.spotContext.fillStyle=this.colors.fillcolor.toColorString();this.spotContext.globalAlpha=1*a;this.spotContext.fillRect(0,0,this.slide.width,this.slide.height);this.spotContext.globalAlpha=1;this.spotContext.fillStyle="rgba(0,0,0,1)";this.spotContext.globalCompositeOperation="destination-out";this.drawRoundRect(this.slideX()+bwAnnotationSpotlight.CANVAS_PAD,this.slideY()+
bwAnnotationSpotlight.CANVAS_PAD,this.originalWidth,this.originalHeight,this.spotContext);this.spotContext.fill();this.spotContext.restore()};this.DrawRoundedRect=function(){for(var a=bwAnnotationSpotlight.POSITION_TOP;0<this.m_nLengthToDraw;)0==a%2?this.DrawSide(this.m_arrPositions[a]):0<this.m_nBoxRadius?this.DrawCorner(this.m_arrPositions[a]):(a++,this.DrawSide(this.m_arrPositions[a])),a++;this.context.stroke();this.m_nCurrentPerimeterLength=this.m_nLengthToDraw=this.m_nPerimeterLength};this.DrawSide=
function(a){var b=Math.min(this.m_nLengthToDraw,a==bwAnnotationSpotlight.POSITION_TOP||a==bwAnnotationSpotlight.POSITION_BOTTOM?this.m_nHorizontalLength:this.m_nVerticalLength),c=0,d=0;switch(a){case bwAnnotationSpotlight.POSITION_TOP:c=this.m_nBoxRadius+b;d=0;break;case bwAnnotationSpotlight.POSITION_RIGHT:c=this.m_nWidth;d=this.m_nBoxRadius+b;break;case bwAnnotationSpotlight.POSITION_BOTTOM:c=this.m_nHorizontalLength-b+this.m_nBoxRadius;d=this.m_nHeight;break;case bwAnnotationSpotlight.POSITION_LEFT:c=
0,d=this.m_nVerticalLength-b+this.m_nBoxRadius}this.context.lineTo(c,d);this.m_nLengthToDraw-=b};this.DrawCorner=function(a){var b=Math.min(this.m_nLengthToDraw,this.m_nCornerLength),c=0,d=0,e=0;switch(a){case bwAnnotationSpotlight.POSITION_TOP_RIGHT:c=this.m_nWidth-this.m_nBoxRadius;d=this.m_nBoxRadius;e=Math.PI+Math.PI/2;break;case bwAnnotationSpotlight.POSITION_BOTTOM_RIGHT:c=this.m_nWidth-this.m_nBoxRadius;d=this.m_nHeight-this.m_nBoxRadius;e=0;break;case bwAnnotationSpotlight.POSITION_BOTTOM_LEFT:c=
this.m_nBoxRadius;d=this.m_nHeight-this.m_nBoxRadius;e=Math.PI/2;break;case bwAnnotationSpotlight.POSITION_TOP_LEFT:d=c=this.m_nBoxRadius,e=Math.PI}this.context.arc(c,d,this.m_nBoxRadius,e,e+b/this.m_nCornerLength*Math.PI/2);this.m_nLengthToDraw-=b}};var Resource=function(a,b,c){this.item=a;this.src=b;this.loading=this.loaded=this.prepared=!1;this.callback=c;this.poolImage=null};Resource.ImagePool=[];Resource.LoadedImagesLog={};Resource.TotalPixels=0;Resource.LoadedImageCount=0;Resource.PreloadThreshold=2E6;
Resource.prototype.load=function(a,b){if(!a&&0!=a)throw"undefined index "+a;var c=this;if(this.loaded||this.deferLoading)c.execCallback(b);else if(!this.loading)switch(this.item.type){case "audio":case "video":c.execCallback(b);break;default:var d=Resource.LoadedImagesLog[c.src];if(d){c.item.imageWidth=d.width;c.item.imageHeight=d.height;c.poolImage=d;c.item.imagelib&&$.each(c.item.imagelib.m_listImages,function(a,b){if(c.imgLibID==b.Id)b.width=c.item.imageWidth,b.height=c.item.imageHeight,b.imgNode=
d});c.loaded=!0;c.execCallback(b);c.unbind();break}if(!c.poolImage)c.poolImage=document.createElement("img"),c.poolImage.className="loader";c.loadHandler=function(){if(c.poolImage){c.item.imageWidth=c.poolImage.width||c.poolImage.naturalWidth;c.item.imageHeight=c.poolImage.height||c.poolImage.naturalHeight;Resource.LoadedImagesLog[c.src]=c.poolImage;Resource.TotalPixels+=c.item.imageWidth*c.item.imageHeight;Resource.LoadedImageCount++;c.loading=!1;if(!c.loaded)c.loaded=!0,c.execCallback(b);c.unbind()}};
c.errorHandler=function(){c.item.ref&&c.item.ref.addClass("missing");c.loaded=!0;c.execCallback(b);c.unbind();return!1};c.poolImage.addEventListener("load",c.loadHandler,!1);c.poolImage.addEventListener("error",c.errorHandler,!1);c.timeout=setTimeout(function(){if(!c.loaded)c.item.ref&&c.item.ref.addClass("missing"),c.loaded=!0,c.execCallback(b);c.unbind()},1E4);c.poolImage.src=c.src;this.loading=!0}};
Resource.prototype.unload=function(a){if(this.src)switch(this.item.type){case "audio":case "video":this.execCallback(a);break;default:this.unbind(),delete Resource.LoadedImagesLog[this.src],delete this.poolImage,this.loaded=!1}};Resource.prototype.unbind=function(){this.poolImage&&(this.poolImage.removeEventListener("load",this.loadHandler,!1),this.poolImage.removeEventListener("error",this.errorHandler,!1),clearTimeout(this.timeout))};
Resource.prototype.prep=function(){if(this.item.prep)this.item.prep(),this.prepared=!0};Resource.prototype.execCallback=function(a){a&&a(this);this.callback&&this.callback(this)};var TimelineEvent=function(a){this.actions=[];this.time=0;this.type="TimelineEvent";this.parentElement=a};TimelineEvent.prototype.loadFromXML=function(a){var b=this;b.time=parseInt($(a).attr("time"));$(a).children("actions").children().each(function(a,d){var e=new TimelineAction(b.parentElement);e.loadFromXML(d,b);b.actions.push(e)})};
TimelineEvent.prototype.act=function(a,b){this.isUserInitiated=!1;EventLogger.logBeginEvent(this,null);var c=this,d=!0;player.currentTimelineEvent=this;StoryEvent.currentEvent=this;$.each(this.actions,function(e,f){a&&("media_play"==f.type||"media_seek"==f.type||"media_toggle"==f.type||"open_url"==f.type||"open_video"==f.type)||b&&("open_url"==f.type||"open_video"==f.type)||d&&(d=f.act(c,null,a,b,!1))});player.currentTimelineEvent=null;StoryEvent.currentEvent=null;EventLogger.logEndEvent(null)};
TimelineEvent.prototype.getMediaDuration=function(){var a=0;$.each(this.actions,function(b,c){if("media_play"==c.type||"media_seek"==c.type||"media_toggle"==c.type){var d=c.getItem();if(d.content.duration)a=d.content.duration}});return a};TimelineEvent.prototype.revert=function(){$.each(this.actions,function(a,b){b.revert()})};var TimelineAction=function(a){this.type="show";this.transition=null;this.itemID="";this.item=null;this.xml="";this.variables={};this.parentElement=a};TimelineAction.actparams={};
TimelineAction.prototype.loadFromXML=function(a,b){this.type=a.tagName;this.originalItemID=this.itemID=$(a).children("objref").attr("value");if("setfocus"==this.type)this.itemID=$(a).find("value").attr("value");if(this.itemID&&-1<this.itemID.indexOf(".")){var c=this.itemID.split(".");this.itemID=c[c.length-1]}c=this.getItem();this.transition=new Transition;this.transition.loadFromXML(a,c);this.xml=a;if(c)if("StoryEvent"==b.type)c.canSimplify=!1;else if(0!=b.time)c.canSimplify=!1;else if(this.transition&&
0!=this.transition.duration)c.canSimplify=!1};TimelineAction.prototype.getItemPack=function(){return this.parentElement.parseObjref(this.originalItemID)};TimelineAction.prototype.getItem=function(){return this.parentElement.parseObjref(this.originalItemID).target};
TimelineAction.prototype.act=function(a,b,c,d){var e=!0;b&&this.getItem()&&this.getItem();b=b||this.getItem()||this.parentElement||story;EventLogger.logBeginAction(this,b);if("exe_actiongroup"==this.type)e=this.exe_actiongroup(a,b,c,d);else if("function"===typeof this[this.type])this[this.type](a,b,c,d);else b?e=b.runAction(this.xml):"TimelineEvent"==a.type&&(e=player.currentSlide().runAction(this.xml));EventLogger.logEndAction(b);return e};
TimelineAction.prototype.revert=function(){var a=this.getItem();switch(this.type){case "show":a&&"audio"!=a.type&&a.hide()}};TimelineAction.prototype.show=function(a,b,c,d){var e=!0,b=this.getItemPack(),f=b.target;if(b.isVariableRef)return!0;if(f){b=f;f=this.transition;d&&(f=null);if("Slide"==b.innerType)return!0;"SlideFrame"==b.innerType&&(e=!1);b.show(a,f,c,d)}return e};
TimelineAction.prototype.hide=function(a,b,c,d){c=this.getItemPack();b=c.target;if(!c.isVariableRef)b?(c=this.transition,d&&(c=null),b.hide(a,c)):trace.logMulti("should hide",this.itemID,b)};TimelineAction.prototype.hideallslidelayers=function(){$(".layer").hide();$.each(player.currentSlide().layers,function(a,b){b.hide()})};TimelineAction.prototype.hide_slidelayer=function(a,b){var c=b.parseObjrefFromXML(this.xml),d=c.target;c.isVariableRef||(d.hide(this.transition),d.transitioning&&d.ref.hide())};
TimelineAction.prototype.show_slidelayer=function(a,b){var c=b.parseObjrefFromXML(this.xml),d=c.target;if(!c.isVariableRef){var e=$(this.xml).attr("hideothers"),c=!d.visible,f=null;if("false"!=e&&"never"!=e){var g=function(){d.visible&&$.each(player.currentSlide().layers,function(a,b){b!=d&&b.hide()})};switch(e){case "true":case "onstart":g();break;case "oncomplete":f=g}}e=new Transition(d);e.loadFromXML(this.xml);d.show(e,f,a&&"TimelineEvent"==a.type?player.activeTimeline:player);c&&d.update(0)}};
TimelineAction.prototype.media_seek=function(a,b,c){if(c)return!0;if((b=this.getItem())&&b.setCurrentTime)if(b.syncToTimeline="TimelineEvent"==a.type,a=parseInt($(this.xml).attr("position")),b.shouldSetPosition=!1,parseInt(1E3*b.currentTime)!=a){b.correctedPosition=a;b.shouldSetPosition=!0;try{b.setCurrentTime(a/1E3),b.shouldSetPosition=!1}catch(d){setTimeout(function(){b.shouldSetPosition=!1},100)}}return!0};
TimelineAction.prototype.set_volume=function(a,b){var c=this.getItem();c&&(b=c);c=parseInt($(this.xml).attr("volume"));player.clipVolume=c/100;c=util.min(c,100);c=util.max(c,0);b.setVolume&&b.setVolume(c/100*player.volumeSlider.volume/100);return!0};TimelineAction.prototype.media_toggle=function(a,b,c){if(c)return!0;if(b=this.getItem())b.getIsPlaying()?(b.media_toggled=!1,this.media_pause(a)):(b.media_toggled=!0,this.media_play(a));return!0};
TimelineAction.prototype.media_play=function(a,b,c){if(b=this.getItem()){b.syncToTimeline="TimelineEvent"==a.type;b.setMediaSyncInfo&&b.setMediaSyncInfo(a);if(c)return b.timelineSetup(),!0;b.playClip&&b.playClip()}return!0};TimelineAction.prototype.media_pause=function(a){var b=this.getItem();if(b&&b.pauseClip)b.syncToTimeline="TimelineEvent"==a.type,b.pauseClip();return!0};
TimelineAction.prototype.move=function(a,b,c){if(!c&&b){if(!this.path){this.path=new BezierPath;this.path.loadFromXML(this.xml,b);this.animationName="animation_"+b.id;var c="@-webkit-keyframes "+this.animationName,d=this.path.toKeyFrames(10);document.styleSheets[0].insertRule(c+d,0)}var e=this.path,f=this.animationName;if(a&&"StoryEvent"==a.type&&a.isUserInitiated)b.actionMoved=!0;b.ref.unbind("webkitAnimationEnd");b.ref.bind("webkitAnimationEnd",function(){var a=e.points[e.points.length-1];b.ref.css("-webkit-transform",
"translateX("+a.x+"px) translateY("+a.y+"px)");b.ref.css("-webkit-animation-name","");b.ref.css("-webkit-animation-duration","0s");b.handleEvent("onmovecomplete")});b.ref.css("-webkit-animation-name","");b.ref.css("-webkit-animation-duration","0s");setTimeout(function(){b.ref.css("-webkit-animation-name",f);b.ref.css("-webkit-animation-duration",e.duration+"ms");b.ref.css("-webkit-animation-iteration-count","1")},0)}};
TimelineAction.prototype.zoompan=function(a,b,c,d){if(!d){if(!this.zoomPanObj)this.zoomPanObj=new ZoomPan,this.zoomPanObj.loadFromXML(this.xml);c||this.zoomPanObj.apply(player.currentSlide().ref)}};TimelineAction.prototype.object_action=function(a,b){var c=$(this.xml).attr("command");this.getItem();b=this.getItem().parseObjrefFromXML(this.xml).target;if("function"==typeof b[c])b[c](this.xml);else switch(c){case "togglecontent":b.visible?b.hide():b.show();break;case "hidecomplete":b.hide()}};
TimelineAction.prototype.adjustvar=function(a,b,c,d){var e=this,d=d||$(this.xml).attr("variable"),f=$(this.xml).attr("operator"),g=$(this.xml).children("value").attr("type"),h=$(this.xml).children("value").attr("value");switch(f){case "toggle":h="true"==b.extractVariable(d)?"false":"true";break;case "add":f=b.extractVariable(h,g);h=b.extractVariable(d);"number"==g?(h=parseFloat(h),f=parseFloat(f),isNaN(h)&&(h=0),isNaN(f)&&(f=0)):"var"==g&&!isNaN(parseFloat(f))&&(h=parseFloat(h),f=parseFloat(f),isNaN(h)&&
(h=0));h+=f;break;case "sub":f=b.extractVariable(h,g);h=parseFloat(b.extractVariable(d));isNaN(h)&&(h=0);h-=parseFloat(f);break;case "mult":f=b.extractVariable(h,g);h=parseFloat(b.extractVariable(d));isNaN(h)&&(h=0);h*=parseFloat(f);break;case "div":f=b.extractVariable(h,g);h=parseFloat(b.extractVariable(d));isNaN(h)&&(h=0);h/=parseFloat(f);isNaN(h)&&(h=0);break;case "set":h=$(this.xml).children("value").attr("value");if("property"==g||"variable"==g||"var"==g)h=b.extractVariable(h,g);"number"==g&&
(h=parseFloat(h))}b||(b=story);b.setVariable(d,h);0==d.indexOf("_children")&&$.each(b.children,function(b,f){var g=d.replace("_children.","");e.adjustvar(a,f,c,g)});b.group&&this.adjustvar(a,b.group,c)};TimelineAction.prototype.exe_actiongroup=function(a,b){var c=$(this.xml).attr("id");c.indexOf("State");var d=b.runActionGroup(c);d&&b.group&&(d=d&&b.group.runActionGroup(c));return d};TimelineAction.prototype.render_item=function(){this.item.render(null,!0,null,"TimelineAction.prototype.render_item")};var StoryEvent=function(a){this.trigger="";this.time=0;this.actions=[];this.type="StoryEvent";this.parentElement=a};
StoryEvent.prototype.loadFromXML=function(a){var b=this;this.trigger=a.tagName;this.xml=a;$(a).children("actions").children().each(function(a,c){var f=new TimelineAction(b.parentElement);f.loadFromXML(c,b);b.actions.push(f)});switch(b.trigger){case "onvarchanged":case "onpropchanged":b.varname=$(a).attr("varname");if(!b.varname)b.varname=$(a).attr("propname");b.priority=parseInt($(a).attr("priority"));if(isNaN(b.priority))b.priority=0;var c=this.parentElement.parseObjref(b.varname).target;b.filter=
function(a){return void 0===a?void 0:a==b.varname||c.getFullVariableRef(a)==c.getFullVariableRef(b.varname)};c.registerVariableEventSubscriber(this.parentElement,b.varname,b.priority);break;case "onobjectevent":b.eventname=$(a).attr("eventname");b.filter=function(a){return a==b.eventname};break;case "onkeypress":b.keyCode=$(a).attr("keycode");b.shiftKey="true"==$(a).attr("shift");b.ctrlKey="true"==$(a).attr("ctrl");b.altKey="true"==$(a).attr("alt");b.filter=function(a){var c=a.keyCode==b.keyCode&&
a.shiftKey==b.shiftKey&&a.ctrlKey==b.ctrlKey&&a.altKey==b.altKey;c&&13==a.keyCode&&a.target.blur();return c};break;case "onlinkrelease":b.triggerid=$(a).attr("triggerid");b.filter=function(a){return a==b.triggerid};break;default:b.filter=function(){return!0}}};
StoryEvent.prototype.act=function(a,b){this.isUserInitiated=b;StoryEvent.currentEvent=this;EventLogger.logBeginEvent(this,a);for(var c=!0,d=0;d<this.actions.length;d++)c&&(c=this.actions[d].act(this,a,!1,!1));StoryEvent.currentEvent=null;EventLogger.logEndEvent(a);return c};var Background=function(a){this.container=a||$(document.body);this.backgroundType="fill";this.fillType="linear";this.stops=[]};
Background.prototype.loadFromXML=function(a,b){var c=this;c.backgroundType=b||$(a).attr("type");switch(this.backgroundType){case "fill":c.rotation=$(a).children("fill").attr("rotation");c.fillType=$(a).children("fill").attr("type");c.stops=[];var d=$(a).attr("url");if(d){c.src=player.basepath+"mobile/"+d;break}$(a).children("fill").children("colors").children("color").each(function(a,b){var d=c.parseStop(b);c.stops.push(d)});break;case "swf":c.src=player.basepath+""+$(a).children("imagedata").attr("url").replace(globals.strContentFolder,
"mobile").replace(".swf",".jpg");break;case "vector":d=$(a).children("vectordata"),c.state={left:d.attr("left"),top:d.attr("top"),right:d.attr("right"),bottom:d.attr("bottom"),path:PathLib.getPathFromXML(d.children("pr"))},c.rectShape=new ppRect(c.state.left,c.state.top,c.state.right,c.state.bottom)}};
Background.prototype.parseStop=function(a){return{rawcolor:$(a).attr("rgb").replace("0x","#"),color:Background.parseRGBA($(a).attr("rgb"),$(a).attr("alpha")),stop:parseInt($(a).attr("stop"))/255,alpha:parseInt($(a).attr("alpha"))/100}};Background.parseRGBA=function(a,b){var c=Frame.parseRGB(a.replace("0x","#"));c.push(parseInt(b)/100);return"rgba("+c.join(",")+")"};Background.prototype.colorStops=function(){var a="";$.each(this.stops,function(b,c){""!=a&&(a+=",");a+=c.color+" "+100*c.stop+"%"});return a};
Background.prototype.toColorString=function(){return this.stops[0].color};Background.prototype.toCssString=function(){switch(this.backgroundType){case "fill":return this.src?"transparent url("+this.src+") no-repeat":1==this.stops.length?this.stops[0].color:"-webkit-linear-gradient(top, "+this.colorStops()+")";case "swf":return"transparent url("+this.src+") no-repeat"}};
Background.prototype.toCss=function(){if(player.noImg)return{};var a={};switch(this.backgroundType){case "fill":a.background=this.src?"transparent url("+escape(this.src)+") no-repeat":1==this.stops.length?this.stops[0].color:"-webkit-linear-gradient(top, "+this.colorStops()+")";break;case "swf":a.background="transparent url("+escape(this.src)+") no-repeat";break;case "vector":if(this.generateVectorSrc(),a.background="transparent url("+this.src+") no-repeat",this.m_nXOffset||this.m_nYOffset)a["background-position"]=
this.m_nXOffset+"px "+this.m_nYOffset+"px"}return a};Background.prototype.generateVectorSrc=function(){if(!this.src)this.canvas=document.createElement("canvas"),this.canvas.width=this.state.right,this.canvas.height=this.state.bottom,this.rotation=this.m_nYOffset=this.m_nXOffset=0,this.height=this.width=1E3,ppArt.DrawVector(this,this.state.path,null,player.fontlib,this.imagelib,null),this.src=this.canvas.toDataURL("image/png"),this.canvas=null};
Background.prototype.apply=function(a){this.container=a||this.container;var b=this;$.each(this.toCss(),function(a,d){$(b.container).css(a,d)})};Background.prototype.toCanvasGradient=function(a,b){var c=a.createLinearGradient(0,0,0,b);$.each(this.stops,function(a,b){c.addColorStop(b.stop,b.color)});return c};
Background.prototype.applyCanvas=function(a,b,c,d){var e=a.createLinearGradient(0,0,0,b.height);$.each(this.stops,function(a,b){e.addColorStop(b.stop,b.color)});if(c)a.fillStyle=e;if(d)a.strokeStyle=e};var SlideBank=function(){this.constructElement();this.id="_slidebank_"+SlideBank.index;SlideBank.index++;this.bankSlideIndex=0};SlideBank.prototype=new Element;SlideBank.prototype.objectType="SlideBank";SlideBank.prototype.innerType="SlideBank";SlideBank.index=0;
SlideBank.prototype.loadFromXML=function(a){var b=this;this.children={};$(a).children("slides").children("slide").each(function(a,d){var e=new Slide(story.container);e.loadFromXML($(d));e.parent=b;story.allSlides.push(e);story.slideLookup[e.id]=e;b.children[e.id]=e;e.slideIndex=story.allSlides.length-1;e.bankSlideIndex=b.bankSlideIndex++})};var SlideDraw=function(){this.constructElement();this.interactions={};this.exitActions=[];this.draw=[];this.orderedChildren=[];this.navLinks=[];this.sceneDrawIndex=this.drawIndex=0;this.quiz=null;this.populated=this.created=!1};SlideDraw.NextSlideIndex=0;SlideDraw.prototype=new Element;SlideDraw.prototype.objectType="SlideDraw";SlideDraw.prototype.innerType="SlideDraw";SlideDraw.prototype.getRandomMember=ShuffleGroup.prototype.getRandomMember;SlideDraw.prototype.getRandomIndex=ShuffleGroup.prototype.getRandomIndex;
SlideDraw.populateDraws=function(){$.each(story.children,function(a,b){"Scene"==b.innerType&&b.populateDraws()});player.calculateTotalViewSlides()};
SlideDraw.prototype.restoreFromResumeData=function(a){this.compactResumeData=bwChunk.CreateChunk(a);var b=new bwChunk(a);for(this.draw=[];!b.EOF();)this.draw.push(this.refs[b.NextUBase10(2)]);this.populateDraw();a=0;for(b=b.NextChunk();!b.isNothing;){var c=this.orderedChildren[a];c.compactResumeData=b.ChunkData();c.restoreFromResumeData(b.ChunkData(),!0);a++;b=b.NextChunk()}};
SlideDraw.prototype.getResumeData=function(){var a="",b="";$.each(this.orderedChildren,function(c,e){a+=bwChunk.UBase10toN(e.drawListIndex,2);b=e.compactResumeData?b+e.compactResumeData:b+bwChunk.EMPTY_CHUNK});var c=bwChunk.CreateChunk(bwChunk.CreateChunk(a)+b);this.compactResumeData=c;this.parent.compactResumeData=this.parent.getResumeData();return c};SlideDraw.prototype.toBaseData=Element.prototype.toData;SlideDraw.prototype.toData=function(a){a=this.toBaseData(a);a.draw=this.draw;return a};
SlideDraw.prototype.updateBaseFromData=Element.prototype.updateFromData;SlideDraw.prototype.updateFromData=function(a){this.updateBaseFromData(a);if(a.draw)this.draw=a.draw,this.populateDraw()};
SlideDraw.prototype.loadFromXML=function(a){var b=this;this.id=$(a).attr("id");this.lmsid=$(a).attr("lmsid");this.shuffle="true"==$(a).attr("shuffle");this.shufflecount=parseInt($(a).attr("shufflecount"));this.navindex=parseInt($(a).attr("navindex"));b.variables.Id=$(a).attr("id");b.variableDefaults.Id=$(a).attr("id");b.variables.WindowId="_frame";b.variableDefaults.WindowId="_frame";$(a).children("exitaction").children().each(function(a,d){var e=new TimelineAction(b);e.loadFromXML(d,b);b.exitActions.push(e)});
this.refs=[];$(a).children("sliderefs").children("slideref").each(function(a,d){var e={id:$(d).attr("id"),index:a,shuffleinclude:"true"==$(d).attr("shuffleinclude"),linknext:"true"==$(d).attr("linknext"),linkprev:"true"==$(d).attr("linkprev"),skipreview:"true"==$(d).attr("skipreview"),showinmenu:"true"==$(d).attr("showinmenu")};b.refs.push(e)})};
SlideDraw.prototype.createDraw=function(){if(this.shuffle){var a=this;this.draw=[];for(var b=[],c=[],d=[];0<this.refs.length&&this.refs[0].linkprev;){var e=this.refs.shift();a.draw.push(e)}for(;0<this.refs.length&&this.refs[this.refs.length-1].linknext;)d.unshift(this.refs.pop());$.each(this.refs,function(a,d){c.push(d);d.linknext||(b.push(c),c=[])});for(e=0;a.draw.length+d.length<this.shufflecount&&0<b.length&&100>e++;){var f=this.shufflecount-a.draw.length-d.length,g=a.getRandomIndex(b),h=b[g];
h.length<=f&&($.each(h,function(b,c){a.draw.push(c)}),b.splice(g,1))}if(100<=e&&0<b.length){var j=1E3,j=null;$.each(b,function(a,b){if(!j||j.length>b.length)j=b});$.each(j,function(b,c){a.draw.push(c)})}for(;0<d.length;)a.draw.push(d.shift());$.each(this.draw,function(){});this.created=!0}else this.createDrawUnshuffled()};SlideDraw.prototype.createDrawUnshuffled=function(){for(this.draw=[];this.refs.length;)this.draw.push(this.refs.shift())};SlideDraw.prototype.getQuiz=function(){return this.quiz};
SlideDraw.prototype.populateDraw=function(){var a=this;this.children={};$.each(this.draw,function(b,c){var d=c.id,e=story.slideLookup[d],f=new Slide(story.container);f.loadFromXML($(e.xml));f.parent=a;f.slideBank=a;story.allSlides.push(f);player.slideLoadQueue.push(story.allSlides.length-1);f.originalSlideIndex=f.slideIndex;f.drawSlideIndex=b;f.slideIndex=story.allSlides.length-1;f.slideIndexForResume=SlideDraw.NextSlideIndex++;f.sceneIndex=a.parent.sceneIndex;f.drawIndex=a.sceneDrawIndex;f.navindex=
a.navindex;f.skipreview=c.skipreview;f.showinmenu=c.showinmenu;f.bankSlideIndex=e.bankSlideIndex;f.drawListIndex=c.index;a.children[d]=f;a.orderedChildren.push(f)});player.slideLoadQueue.restart();player.slideList.contentRef.empty();$("#slide_list_portrait").empty();player.slideList.tree=new SlideListNode;player.slideList.build(Frame.navLinks,null,null,null,player.slideList.tree);player.slideList.build(Frame.navLinks,$("#slide_list_portrait"));player.slideList.collapseAll();this.populated=!0};
SlideDraw.prototype.showFirst=function(){player.currentDraw=this;var a=this.getFirstSlide();this.parent.compactResumeData=this.parent.getResumeData();player.showSlideIndex(a.slideIndex,null,!0)};SlideDraw.prototype.getFirstSlide=function(){this.drawIndex=0;player.currentDraw=this;0==this.draw.length&&SlideDraw.populateDraws();return this.children[this.draw[this.drawIndex].id]};SlideDraw.prototype.getFirstSpecifiedSlide=function(){return story.slideLookup[this.refs[0].id]};
SlideDraw.prototype.playnextdrawslide=function(){function a(){10<c++||b.fullyLoaded?player.currentWindow?player.currentWindow.showSlide(b,!1):player.showSlideIndex(b.slideIndex,null,!0):setTimeout(a,200)}player.currentDraw=this;0==this.draw.length&&SlideDraw.populateDraws();if(player.currentSlide().parent==this)this.drawIndex=player.currentSlide().drawSlideIndex;this.drawIndex++;if(this.drawIndex>=this.draw.length)player.currentSlide().saveIfNecessary(),this.fireExitActions();else{var b=this.children[this.draw[this.drawIndex].id];
b.loadContentFromXML();var c=0;a()}};SlideDraw.prototype.fireExitActions=function(){var a=this;$.each(this.exitActions,function(b,c){c.act(a,null,!1,!1)})};SlideDraw.prototype.sniffDrawIndex=function(a){var b=this;$.each(this.draw,function(c,d){if(d==a.id)b.drawIndex=c})};SlideDraw.prototype.resetSlide=function(a,b){$.each(this.children,function(c,d){d.resetSlide(a,b)});this.compactResumeData=""};var SlideListNode=function(a,b){if(!b)b={listitems:[]},this.isRoot=!0;this.parent=a;this.link=b;this.children=[];this.expanded=!0;if(!b.nodes)b.nodes=[];b.nodes.push(this)};SlideListNode.prototype.push=function(a){this.children.push(a)};SlideListNode.prototype.hasChildren=function(){return 0<this.children.length};SlideListNode.prototype.toggleExpand=function(){this.hasChildren()&&(this.expanded?this.collapse():this.expand(),this.updateDescendants())};
SlideListNode.prototype.expand=function(){this.expanded=!0};SlideListNode.prototype.collapse=function(a){a&&$.each(this.children,function(a,c){c.collapse(!0,!0)});this.expanded=!1};SlideListNode.prototype.show=function(){$.each(this.link.listitems,function(a,b){b.show()})};SlideListNode.prototype.hide=function(){$.each(this.link.listitems,function(a,b){b.hide()})};
SlideListNode.prototype.updateDescendants=function(a){var b=a||!this.expanded;$.each(this.children,function(a,d){b?d.hide():d.show();0<d.children.length&&!b&&d.expanded&&d.expand();d.updateDescendants(b)});this.expanded?$.each(this.link.listitems,function(a,b){b.addClass("open")}):$.each(this.link.listitems,function(a,b){b.removeClass("open")})};var SlideList=function(a){this.container=a||$(document.body);this.ref=null;this.ref=$("#menu_container");this.landscapeContainer=$("#landscape_menu");this.portraitContainer=$("#portrait_menu");this.contentRef=$("#slide_list");this.closed=!1;this.tree=new SlideListNode;player.simplenav&&(this.contentRef.removeClass("menu_list"),this.contentRef.addClass("slidelist"))};SlideList.maxDepth=0;
SlideList.SetDepth=function(a,b){if(b>SlideList.maxDepth){if(!SlideList.styleSheet)SlideList.styleSheet=new CustomStyleSheet;player.frame.rtl?(SlideList.styleSheet.add("ul.slidelist li.depth"+b,"padding-right",6+12*b+"px"),SlideList.styleSheet.add("ul.slidelist li.depth"+b+".has_children","padding-right",-10+12*b+"px"),SlideList.styleSheet.add("ul.slidelist li.depth"+b+".correct:before","right",213-12*b+"px"),SlideList.styleSheet.add("ul.slidelist li.depth"+b+".incorrect:before","right",213-12*b+
"px"),SlideList.styleSheet.add(".toptab ul.slidelist li.depth"+b+".correct:before","right",270-12*b+"px"),SlideList.styleSheet.add(".toptab ul.slidelist li.depth"+b+".incorrect:before","right",270-12*b+"px")):(SlideList.styleSheet.add("ul.slidelist li.depth"+b,"padding-left",6+12*b+"px"),SlideList.styleSheet.add("ul.slidelist li.depth"+b+".has_children","padding-left",-10+12*b+"px"),SlideList.styleSheet.add("ul.slidelist li.depth"+b+".correct:before","left",213-12*b+"px"),SlideList.styleSheet.add("ul.slidelist li.depth"+
b+".incorrect:before","left",213-12*b+"px"),SlideList.styleSheet.add(".toptab ul.slidelist li.depth"+b+".correct:before","left",270-12*b+"px"),SlideList.styleSheet.add(".toptab ul.slidelist li.depth"+b+".incorrect:before","left",270-12*b+"px"));SlideList.styleSheet.build();SlideList.maxDepth=b}a.addClass("depth"+b)};
SlideList.prototype.build=function(a,b,c,d,e){var f=this,b=b||f.contentRef,c=c||"",d=d||1,e=e||new SlideListNode;f.hasBuilt=!0;var g=function(a,c){var g=$("<li>"+c+" "+a.displaytext+"</li>");a.slideid?g.attr("id",a.slideid):a.drawid&&g.attr("id",a.drawid);SlideList.SetDepth(g,d);var h=new SlideListNode(e,a);e.push(h);g.toggleExpand=function(){h.toggleExpand();return!1};g.click(function(b){if(f.scroll.moved||player.currentWindow&&"MessageWnd"==player.currentWindow.id)return!1;if(g.hasClass("has_children")&&
1==g.children("span").length){var c=g.children("span").position().left;if(b.offsetX<c+10&&!g.hasClass("neither"))return g.toggleExpand()}if($(this).hasClass("selected")||$(this).hasClass("locked")||player.frame.options.flow==Frame.FLOW_LOCKED)return!1;$(".window").hide();player.slideList.hide();$(".toptab.active").removeClass("active");TimelineAction.actparams._ActTargetWindow="_frame";if(a.actionlinkid){if(player.frame.options.flow==Frame.FLOW_RESTRICTED&&void 0===story.m_listViewedActionLinks[a.actionlinkid])return!1;
b=story.parseObjref(a.actionlinkid).target;story.children[a.actionlinkid]&&(b=story.children[a.actionlinkid]);b&&b.navLinks&&b.runActions();story.m_listViewedActionLinks[a.actionlinkid]=story.actionLinkIndices[a.actionlinkid];return!1}b=story.parseObjref(a.slideid).target;if(!b||player.frame.options.flow==Frame.FLOW_RESTRICTED&&!b.variables.Visited)return!1;player.showSlideID(a.slideid,!0);return!1});g.bind("mouseover mouseout",function(){});b.append(g);if(a.links){var j=$("<span/>");g.prepend(j);
g.addClass("has_children open");player.frame.options.levelrestriction!=Frame.LEVEL_RESTRICTION_UNRESTRICTED&&g.addClass("neither");f.build(a.links,b,c,d+1,h)}else(j=story.parseObjref(a.slideid).target)&&"SlideDraw"==j.innerType?f.addSlideDraw(j,a):!j&&a.expand&&(j=$("<span/>"),g.prepend(j),g.addClass("has_children neither"));if(!a.listitems)a.listitems=[];a.listitems.push(g);a.expand||g.toggleExpand()},h=player.frame.options.autonumber,j=0;$.each(a,function(a,b){if(b.drawid){var d=story.parseObjref(b.drawid).target;
$.each(d.children,function(a,b){if("Slide"==b.innerType&&b.showinmenu){var d=h?c+(j+1)+".":"",f={slideid:b.getFullObjref(),displaytext:b.title,expand:!0,parent:e};b&&b.navLinks&&b.navLinks.push(f);g(f,d);j++}})}else g(b,h?c+(a+1)+".":"")})};SlideList.prototype.addSlideDraw=function(a,b){a.navLinks=[b];$.each(a.children,function(a,d){"Slide"==d.innerType&&d.showinmenu&&d.navLinks.push(b)})};
SlideList.prototype.addSlideDrawExpanded=function(a,b,c,d){var e=this,d=d||"",f=0;$.each(a.children,function(a,h){if("Slide"==h.innerType){var j=$('<li><span></span><a href="javascript:void(null);" title="">'+(player.frame.options.autonumber?d+(f+1)+".":"")+" "+h.title+"</a></li>");j.attr("id",h.getFullObjref());j.click(function(){if(!e.scroll.moved)return player.showSlideID(b+"."+h.id,!0),$(".window").hide(),player.slideList.hide(),!1});c.append(j);f++;h.navLinks.push({listitems:[j]})}})};
SlideList.prototype.toggle=function(){this.visible?this.hide():this.show()};SlideList.prototype.show=function(){if(!this.visible)this.visible=!0,Transition.applyCss({"-webkit-transition-property":"none","-webkit-transition-duration":"0ms",opacity:1,display:"block"},this.portraitContainer),$("#control-menu").addClass("active"),this.refresh(),this.scrollSelectedIntoView(1)};SlideList.prototype.hide=function(){if(this.visible)this.visible=!1,this.portraitContainer.hide(),$("#control-menu").removeClass("active")};
SlideList.prototype.refresh=function(){this.scroll={moved:!1}};SlideList.prototype.scrollSelectedIntoView=function(a){a=isNaN(a)?500:a;$(".slidelist .selected").each(function(a,c){var d=$(c).closest(".slidelist"),e=$(c).position().top,f=$(c).height(),g=d.position().top,h=d.parent().height(),j=d.parent().get(0).scrollTop,k=e-g-f,e=e-g-h+2*f;if(j<e)d.parent().get(0).scrollTop=e;if(j>k)d.parent().get(0).scrollTop=k})};
SlideList.prototype.markVisited=function(a){var b=function(a){$.each(a.navLinks,function(a,b){if(b.parent){var d=b.parent;if(d.link)d=d.link;c(d)}c(b)})},c=function(a){a.listitems&&$.each(a.listitems,function(a,b){b.addClass("visited")})};b(a);$.each(story.children,function(c,e){"ActionLink"==e.innerType&&e.id==a.id&&b(e)})};
SlideList.parseDepth=function(a){var b=-1;if(a.get(0).classList)for(var c in a.get(0).classList){var d=a.get(0).classList[c];d&&d.indexOf&&0==d.indexOf("depth")&&(b=parseInt(d.replace("depth","")))}return b};Element.findCommonAncestor=function(a,b){for(var c=a;c;){for(var d=b;d;){if(d==c)return c;d=d.parent}c=c.parent}};
SlideList.prototype.collapseSections=function(a){if(Frame.navLinks&&player.slideList){player.frame.options.autocollapse&&0<a.navLinks.length&&$.each(player.slideList.tree.children,function(a,c){c.collapse()});if(player.frame.options.levelrestriction==Frame.LEVEL_BEHAVIOR_INSIDE&&player.frame.options.levelbehavior==Frame.LEVEL_BEHAVIOR_REACHED)player.frame.options.levelbehavior=Frame.LEVEL_BEHAVIOR_INSIDE;$.each(a.navLinks,function(a,c){$.each(c.nodes,function(a,b){for(var c=player.frame.options.levelbehavior==
Frame.LEVEL_BEHAVIOR_INSIDE?b:null,g=player.frame.options.levelrestriction==Frame.LEVEL_BEHAVIOR_INSIDE?b:null;b&&!b.isRoot;)player.frame.options.levelbehavior!=Frame.LEVEL_BEHAVIOR_MANUAL&&b!=c&&b.expand(),b!=g&&$.each(b.link.listitems,function(a,b){b.removeClass("neither")}),b=b.parent})});player.slideList.tree.updateDescendants()}};SlideList.prototype.collapseAll=function(){this.tree.collapse(!0);this.tree.expand();this.tree.updateDescendants()};
SlideList.shorten=function(a,b){if(a.length>b){for(var c=a.substr(0,b-3),d=c.length-1;0<d;d--)if(" "==c.substr(d,1))return c.substr(0,d)+"&hellip;";return"&hellip;"}return a};var FileList=function(a){this.container=a||$(document.body);this.ref=null;this.loaded=this.visible=!1;this.ref=$('<div id="filelist"><div id="filelistscroll"></div></div>');this.contentRef=this.ref.children("#filelistscroll");this.container.append(this.ref)};
FileList.prototype.load=function(){var a=this;$.ajax({url:"/ListFiles.aspx",dataType:"xml",success:function(b){a.contentRef.empty();var c=$('<ul class="navlist"><li tabindex="0" class="divider">Open<span class="icon icon-x"></span></li></ul>');c.find(".divider").click(function(){a.hide()});$(b).find("file").each(function(b,e){var f=$(e).attr("name"),g=$('<li tabindex="-1">'+f+'<span class="icon icon-r"></span></li>');g.click(function(){if(!a.scroll.moved)player.basepath=f,player.load(function(){$("#slideframe").css("opacity",
"1.0");player.setSlideIndex(0);player.restart();$(".slide").show()}),a.hide()});c.append(g)});a.contentRef.append(c);a.contentRef.append($('<br style="clear:both;">'))},error:function(){}})};
FileList.prototype.addScene=function(a,b){var c=$('<ul class="navlist"><li tabindex="0" class="divider">'+b+"</li></ul>");$.each(a,function(a,b){var f=$('<li tabindex="-1">'+b.title+'<span class="icon-r"></span></li>');f.click(function(){player.showSlideIndex(a,"pan"==player.animations?2:null,!0);player.slideList.hide()});c.append(f)});this.contentRef.append(c)};
FileList.prototype.show=function(){if(!this.visible){this.visible=!0;this.load();var a=this,b={"-webkit-transition-property":"-webkit-transform, opacity","-webkit-transition-duration":"400ms","-webkit-transform-origin":"center center","-webkit-transition-timing-function":"ease-out","-webkit-transform":"translate3d(0px,0px,0px) scale(1) rotate(0)"};this.ref.show();Transition.applyCss({"-webkit-transition-property":"-webkit-transform, opacity","-webkit-transition-duration":"0ms","-webkit-transform-origin":"center center",
"-webkit-transition-timing-function":"ease-in","-webkit-transform":"translate3d(0px,-100%,0px) scale(1) rotate(0)"},this.ref);setTimeout(function(){a.ref.unbind("webkitTransitionEnd");a.ref.bind("webkitTransitionEnd",function(){a.ref.unbind("webkitTransitionEnd");a.refresh()});Transition.applyCss(b,a.ref);a.refresh()},0)}};
FileList.prototype.hide=function(){var a=this;if(this.visible)this.visible=!1,this.ref.unbind("webkitTransitionEnd"),this.ref.bind("webkitTransitionEnd",function(){a.ref.unbind("webkitTransitionEnd")}),Transition.applyCss({"-webkit-transition-property":"-webkit-transform, opacity","-webkit-transition-duration":"200ms","-webkit-transform-origin":"center center","-webkit-transition-timing-function":"ease-in","-webkit-transform":"translate3d(0px,-100%,0px) scale(1) rotate(0)"},this.ref)};
FileList.prototype.refresh=function(){if(!this.scroll)this.scroll=new iScroll("filelistscroll",{desktopCompatibility:!0});this.scroll.refresh()};var Transition=function(a){this.target=null;this.transition=Transition.TransType.appear;this.duration=750;this.direction=1;this.reverse=this.pan=this.wipe=!1;this.runCount=0;this.hasContext=!1;a&&this.setTarget(a)};Transition.TransType={appear:"appear",fly:"fly",fade:"fade",grow:"grow",spin:"spin",custom:"custom",tween:"tween"};
Transition.Direction={1:{getLeft:function(a){return-a.targetWidth},getTop:function(a,b){return b}},2:{getLeft:function(a){return a.containerWidth},getTop:function(a,b){return b}},4:{getLeft:function(a,b){return b},getTop:function(a){return-a.targetHeight}},8:{getLeft:function(a,b){return b},getTop:function(a){return a.containerHeight}}};Transition.prototype.toString=function(){return"[duration:"+this.duration+", direction:"+this.direction+", type:"+this.transition+"]"};
Transition.prototype.setTarget=function(a){this.target=a;this.hasContext||this.sniffContext()};
Transition.prototype.sniffContext=function(){if(player.width&&1!=player.width){switch(this.target.objectType){case "Item":this.targetLeft=this.target.x;this.targetTop=this.target.y;this.targetWidth=this.target.width;this.targetHeight=this.target.height;this.containerWidth=player.width;this.containerHeight=player.height;break;case "Layer":this.targetTop=this.targetLeft=0;this.targetWidth=player.width;this.targetHeight=player.height;this.containerWidth=player.width;this.containerHeight=player.height;
break;case "Slide":this.targetTop=this.targetLeft=0;this.targetWidth=player.width;this.targetHeight=player.height;this.containerWidth=player.width;this.containerHeight=player.height;break;case "Bounce":this.targetTop=this.targetLeft=0,this.targetWidth=player.width/10,this.targetHeight=player.height/10,this.containerWidth=player.width/10,this.containerHeight=player.height/10}this.hasContext=!0}};
Transition.prototype.loadFromXML=function(a,b){b&&this.setTarget(b);this.transition=$(a).attr("transition");this.animationid=$(a).attr("animationid");$(a).attr("transduration")?(this.duration=parseInt($(a).attr("transduration")),this.direction=$(a).attr("transdir"),this.wipe="true"==$(a).attr("wipetrans")):(this.duration=parseInt($(a).attr("duration")),this.direction=$(a).attr("direction"));this.reverse="true"==$(a).attr("reverse");if(this.transition==Transition.TransType.tween){var c=$(a).children("slidetransition");
if(0!=c.length){if(this.duration=parseInt(c.attr("duration")),this.wipe="true"==c.attr("wipetrans"),this.convertedAnimation=new Animation,this.convertedAnimation.loadFromXML(c,this.target),this.duration=this.convertedAnimation.duration,this.target.animations)this.target.animations[this.convertedAnimation.id]=this.convertedAnimation}else if(this.target.showanimationid){this.animationid=this.target.showanimationid;c=a.children("animations").children("animation#"+this.animationid);this.transition=Transition.TransType.custom;
var d=this.target.animations[this.animationid];d.xml=c;this.duration=d.duration;this.wipe=d.wipetrans;this.convertedAnimation=d}}else if(this.transition==Transition.TransType.appear&&this.duration)this.duration=0};Transition.prototype.getOffscreenPosition=function(){var a=this,b={x:this.targetLeft,y:this.targetTop};$.each(Transition.Direction,function(c,d){if(a.direction&parseInt(c))b.x=d.getLeft(a,b.x),b.y=d.getTop(a,b.y)});return b};
Transition.prototype.getOffscreenCss=function(a){var b=0,c=0;-1<this.transition.indexOf(Transition.TransType.fly)&&(c=this.getOffscreenPosition(),b=c.x-this.targetLeft,c=c.y-this.targetTop);a&&(b=-b,c=-c);a=0;-1<this.transition.indexOf(Transition.TransType.spin)&&(a=360);this.target&&"Item"==this.target.objectType&&(a+=this.target.rotation);var d=1;if(this.target&&void 0!=this.target.scale)d=this.target.scale;-1<this.transition.indexOf(Transition.TransType.grow)&&(d=0.01);var e=1;-1<this.transition.indexOf(Transition.TransType.fade)&&
(e=0.02);player.isChrome&&this.target&&this.target.hasDescendantByType&&this.target.hasDescendantByType("video")&&(a=0==a?0.02:a);return{"-webkit-transform":"translate3d("+b+"px,"+c+"px,0px) scale("+d+") rotate("+a+"deg)","-moz-transform":"translate3d("+b+"px,"+c+"px,0px) scale("+d+") rotate("+a+"deg)","-o-transform":"translate3d("+b+"px,"+c+"px,0px) scale("+d+") rotate("+a+"deg)","-ms-transform":"translate("+b+"px,"+c+"px) scale("+d+") rotate("+a+"deg)",opacity:e}};
Transition.prototype.getZeroCss=function(){var a=0;if(this.target&&"Item"==this.target.objectType)a=this.target.rotation;var b=1;if(this.target&&void 0!=this.target.scale)b=this.target.scale;player.isChrome&&this.target&&this.target.hasDescendantByType&&this.target.hasDescendantByType("video")&&(a=0==a?0.02:a);return{"-webkit-transform":"translate3d(0px,0px,0px) scale("+b+") rotate("+a+"deg)","-moz-transform":"translate3d(0px,0px,0px) scale("+b+") rotate("+a+"deg)","-o-transform":"translate3d(0px,0px,0px) scale("+
b+") rotate("+a+"deg)","-ms-transform":"translate(0px,0px) scale("+b+") rotate("+a+"deg)",opacity:1}};Transition.prototype.getImmediateCss=function(){return{"-webkit-transition-property":"-webkit-transform, opacity","-webkit-transition-duration":"0s","-moz-transition-property":"-moz-transform, opacity","-moz-transition-duration":"0s","-o-transition-property":"-o-transform, opacity","-o-transition-duration":"0s","-ms-transition-property":"-ms-transform, opacity","-ms-transition-duration":"0s"}};
Transition.prototype.getTransitionCss=function(a){a=a||"ease-out";return{"-webkit-transition-property":"-webkit-transform, opacity","-webkit-transition-duration":this.duration+"ms","-webkit-transition-timing-function":a,"-moz-transition-property":"-moz-transform, opacity","-moz-transition-duration":this.duration+"ms","-moz-transition-timing-function":a,"-o-transition-property":"-o-transform, opacity","-o-transition-duration":this.duration+"ms","-o-transition-timing-function":a,"-ms-transition-property":"-ms-transform, opacity",
"-ms-transition-duration":this.duration+"ms","-ms-transition-timing-function":a}};Transition.applyCss=function(a,b){$.each(a,function(a,d){$(b).css(a,d)})};Transition.prototype.applyCss=function(a,b){Transition.applyCss(a,b)};
Transition.prototype.apply=function(a,b,c,d,e){var f=this,g={},h={};if(this.transition==Transition.TransType.custom)this.applyCustom(a,b,c,d,e);else{b=b||f.target.ref;d=d||"ease-out";this.hasContext||this.sniffContext();!this.reverse&&!this.wipe?(g=f.getOffscreenCss(!1),h=f.getZeroCss()):(g=f.getZeroCss(),h=f.getOffscreenCss(!1));var j=f.getOffscreenCss(!0);b.unbind("webkitTransitionEnd transitionend oTransitionEnd");f.applyCss(f.getImmediateCss(),b);f.applyCss(g,b);f.target.runningTransition=f;setTimeout(function(){var e=
!1;b.bind("webkitTransitionEnd transitionend oTransitionEnd",function(){f.target.runningTransition=null;b.unbind("webkitTransitionEnd transitionend oTransitionEnd");a&&!e&&(e=!0,a())});0<f.duration&&0<b.length&&setTimeout(function(){if(a&&!e&&f.target.runningTransition==f)b.unbind("webkitTransitionEnd transitionend oTransitionEnd"),f.target.runningTransition=null,e=!0,a()},2*f.duration);f.applyCss(f.getTransitionCss(d),b);f.applyCss(h,b);f.pan&&c&&(f.applyCss(f.getTransitionCss(d),c),f.applyCss(j,
c));if((!player.canAnimate||0==f.duration||0==b.length)&&a)b.unbind("webkitTransitionEnd transitionend oTransitionEnd"),a&&a()},0)}};Transition.prototype.applyCustom=function(a,b,c,d,e){e=e||player.activeTimeline;this.target.animations[this.animationid].start(this.target.ref,!1,e,a)};
Transition.bounce=function(a,b){if(player.canAnimate){var c=new Transition({objectType:"Bounce"});c.duration=100;c.direction=b;c.transition=Transition.TransType.fly;$.each(a,function(a,b){c.applyCss(c.getImmediateCss(),b);c.applyCss(c.getZeroCss(),b)});setTimeout(function(){$.each(a,function(a,b){c.applyCss(c.getTransitionCss(),b);c.applyCss(c.getOffscreenCss(),b);b.unbind("webkitTransitionEnd transitionend oTransitionEnd");b.bind("webkitTransitionEnd transitionend oTransitionEnd",function(){c.duration=
400;b.unbind("webkitTransitionEnd transitionend oTransitionEnd");c.applyCss(c.getTransitionCss(),b);c.applyCss(c.getZeroCss(),b)})})},0)}};
Transition.prototype.convertToAnimation=function(a,b){if(this.transition==Transition.TransType.custom&&a.animations[this.animationid])return a.animations[this.animationid];if(this.convertedAnimation)return this.convertedAnimation;this.runCount++;var c=new Animation,d=new bwAnimation;d.setDuration(this.duration);d.SetEffects(this.transition);d.setTransitionIn(b);d.setStartXPos(a.originalX);d.setStartYPos(a.originalY);d.setStartAlpha(100);d.setStartXScale(1);d.setStartYScale(1);d.setEndXPos(a.originalX);
d.setEndYPos(a.originalY);d.setEndAlpha(100);d.setEndRotation(0);d.setEndXScale(1);d.setEndYScale(1);a.animations[c.id]=c;if(d.getFlyEnabled()){var e=this.direction;e&bwAnimation.TRANS_DIR_LEFT?d.setStartXPos(-a.width+a.xoffset):e&bwAnimation.TRANS_DIR_RIGHT&&d.setStartXPos(a.container.width()-a.xoffset);e&bwAnimation.TRANS_DIR_TOP?d.setStartYPos(-a.height+a.yoffset):e&bwAnimation.TRANS_DIR_BOTTOM&&d.setStartYPos(a.container.height()-a.yoffset)}d.getFadeEnabled()&&d.setStartAlpha(0);d.getGrowEnabled()&&
(d.setStartXScale(0),d.setStartYScale(0));d.m_bReverse=this.reverse||this.wipe;c.bwa=d;c.item=a;c.target=a.ref;c.isTransition=!0;c.uniqueID="trans_"+a.getFullObjref()+"_"+Animation.sequence++;c.duration=this.duration;return this.convertedAnimation=c};var Animation=function(){this.running=!1;this.startTime=0;this.ms=-1};Animation.sequence=0;
Animation.prototype.loadFromXML=function(a,b){this.item=b;this.xml=a;this.id=$(a).attr("id");this.wipetrans="true"==$(a).attr("wipetrans");this.imageBounds={width:50,height:50};this.uniqueID=$(a).parent().parent().attr("id")+"_"+this.id;b&&(this.uniqueID+="_"+b.getFullObjref());this.uniqueID+="_"+Animation.sequence++;this.duration=parseInt($(a).attr("duration"));if(0==this.duration)this.isZeroLength=!0,this.duration=1;this.tweens=[];this.endCallback=null;this.bwa=new bwObjectAnimation(a,!1,null,this.item)};
Animation.prototype.getAnimationName=function(){return this.uniqueID};Animation.transformToCSS=function(a){var b="-webkit-transform:translate3d("+a.x+"px, "+a.y+"px, 0px) rotate("+a.rotation+"deg) scale("+a.scalex/100+","+a.scaley/100+");";return b+="opacity: "+a.alpha/100+";"};Animation.prototype.getCoordsFromPointXML=function(a){return{x:this.getCombinedPosition(a,"x","dx"),y:this.getCombinedPosition(a,"y","dy")}};
Animation.prototype.getCombinedPosition=function(a,b,c){var d=this,e=function(b){b=$(a).attr(b);switch(b.substr(0,1)){case "$":return d.item.extractVariable(b.substr(1));case "#":return d.item.extractVariable(b.substr(1));default:return b}},b=e(b),c=e(c);return parseInt(b)+parseInt(c)};
Animation.prototype.drawPath=function(a){var b=this;a.lineWidth=1;a.strokeStyle="black";a.fillStyle="blue";a.clearRect(0,0,1E3,1E3);a.beginPath();$.each(this.tweens,function(c,d){$.each(d.children,function(c,d){"position"==d.tweenType&&$(d.componentXML).children("path").children("segment").each(function(c,d){var e=b.getCoordsFromPointXML($(d).children("anchora")),f=b.getCoordsFromPointXML($(d).children("anchorb"));a.moveTo(e.x,e.y);switch($(d).attr("type")){case "line":a.lineTo(f.x,f.y);break;case "cubic":var e=
b.getCoordsFromPointXML($(d).children("controla")),l=b.getCoordsFromPointXML($(d).children("controlb"));a.bezierCurveTo(e.x,e.y,l.x,l.y,f.x,f.y)}})})});a.stroke()};Animation.prototype.isTimeWithinAnimation=function(a){return a>=this.startTime&&a<=this.startTime+this.duration};Animation.prototype.isTimeAfterAnimation=function(a){return a>this.startTime+this.duration};
Animation.prototype.step=function(a){if(this.running&&this.target&&this.timeline.visible&&(a-=this.startTime,!(a>this.duration&&this.ended&&!this.persistent))){this.ended=!1;this.seek(this.target,this.reverse,a,!0);if(this.showOnFirstStep||this.item.showOnFirstStep)player.addToShowQueue(this.item,!0),this.showOnFirstStep=!1,this.item.showOnFirstStep=!1;a>=this.duration&&this.end()}};
Animation.prototype.seek=function(a,b,c,d){if(!(!a||!this.item.ref||a!=this.item.ref&&a.attr("id")!=this.item.ref.attr("id"))&&!(this.ms==c&&0!=this.ms)){if(c>this.bwa.m_nDuration)c=this.bwa.m_nDuration;b&&(c=this.bwa.m_nDuration-c);if(this.item.ref){this.ms=c;var b=this.bwa.GetTransformAtTime(c),e=new MatrixTransform,f="",g="",h=this.item.rotatexpos,j=this.item.rotateypos,k,l;this.item.maskTranslate&&(f+=this.item.maskTranslate,g+=this.item.maskTranslateIE);if(b.scale&&!isNaN(b.scale.x)){var m=1;
if(void 0!==this.item.scale&&1!=this.item.scale)m=this.item.scale;"SlideFrame"==this.item.innerType&&!this.item.scalecontents?(this.item.ref.css("width",this.item.width*b.scale.x/100*m),this.item.ref.css("height",this.item.height*b.scale.y/100*m)):(e.scale(b.scale.x/100*m,b.scale.y/100*m),f+="scale("+b.scale.x/100*m+","+b.scale.y/100*m+") ",g+="scale("+b.scale.x/100*m+","+b.scale.y/100*m+") ")}else void 0!==this.item.scale&&1!=this.item.scale&&(e.scale(this.item.scale,this.item.scale),f+="scale("+
this.item.scale+") ",g+="scale("+this.item.scale+") ");if(b.position&&!isNaN(b.position.x))if(b.position.x=parseInt(b.position.x),b.position.y=parseInt(b.position.y),d){if(this.item)this.item.x=parseInt(b.position.x),this.item.y=parseInt(b.position.y),this.item.ref.css("left",this.item.x+this.item.xoffset),this.item.ref.css("top",this.item.y+this.item.yoffset)}else if(e.translate(parseInt(b.position.x),parseInt(b.position.y)),f+="translate3d("+parseInt(b.position.x)+"px,"+parseInt(b.position.y)+"px,0px) ",
g+="translate("+parseInt(b.position.x)+"px,"+parseInt(b.position.y)+"px) ",this.item)this.item.x=parseInt(b.position.x),this.item.y=parseInt(b.position.y),this.item.ref.css("left",0),this.item.ref.css("top",0);this.item.realRotation=this.item.rotation;isNaN(b.rotation)?0!=this.item.rotation&&(f+="rotate("+this.item.rotation+"deg) ",g+="rotate("+this.item.rotation+"deg) "):(e.rotateDegrees(parseInt(b.rotation)),b.rotation=parseInt(b.rotation),d=parseInt(b.rotation)%360,f+="rotate("+d+"deg) ",g+="rotate("+
d+"deg) ",this.item.rotation=d);isNaN(b.alpha)||$(a).css("opacity",b.alpha/100);if(b.skew&&!isNaN(b.skew.x))b.skew.x*=-1,b.skew.y*=-1,f+="skew("+b.skew.x+"deg,"+b.skew.y+"deg) ",g+="skew("+b.skew.x+"deg,"+b.skew.y+"deg) ",h=b.skew.regpoint.x,j=b.skew.regpoint.y,k=0,l=0;b.matrix&&(f+=b.matrix.toCSSTransform(),g+=b.matrix.toCSSTransform());if(b.mask)if(e=b.mask,d=b.mask.m_oMaskTween,c=(c-e.m_nStartTime)/e.m_nDuration,player.useMaskImage||!d.m_shMask.isClipPath())(e=this.getMaskSteps(d))||(e=this.getMaskSteps(bwTweenMask.TweenType.FULL)),
m=parseInt(1*c/bwMaskBase.PRECOMPUTED_STEP_SIZE),m=Math.min(e.length-1,m),m=Math.max(0,m),e=e[m],$(a).css("-webkit-mask-image","url("+e+")"),$(a).css("-webkit-mask-size","cover"),$(a).css("-webkit-mask-position","center"),1<=c&&!d.m_shMask.getExitAnimation()&&$(a).css("-webkit-mask-image","");else{if(!this.item.animationMasked||"none"==$(a).css("-webkit-mask-image"))$(a).css("-webkit-mask-image","url("+Element.BlackPixelSrc+")"),this.item.animationMasked=!0;d.m_strType==bwTweenMask.TweenType.FULL&&
(e=this.item.x-this.item.originalX,m=this.item.y-this.item.originalY,$(a).css("-webkit-mask-size",this.item.width+"px "+this.item.height+"px"),$(a).css("-webkit-mask-position",-e+"px "+-m+"px"),$(a).css("-webkit-mask-repeat","no-repeat"));d=d.m_shMask.GetClipPath(c);$(a).css("-webkit-clip-path","polygon("+d+")")}$(a).css("-webkit-transform-origin",h+k+"px "+(j+l)+"px");$(a).css("-webkit-transform",f);$(a).css("-moz-transform-origin",h+k+"px "+(j+l)+"px");$(a).css("-moz-transform",f);$(a).css("-ms-transform-origin",
h+k+"px "+(j+l)+"px");$(a).css("-ms-transform",g);a.hasTransformed=!0;this.item.updateMatrix();this.item.currentTransform=b;this.item.rotation=this.item.realRotation;this.item.handleVarChanged("animationstep","animationstep")}}};
Animation.prototype.setupMaskAnimation=function(){this.maskCanvas=document.createElement("CANVAS");this.maskCanvas.width=this.imageBounds.width;this.maskCanvas.height=this.imageBounds.height;this.maskContext=this.maskCanvas.getContext("2d");this.item.AnimationMask={};this.item.BoundsForAnimationMask=new ppRect(0,0,this.imageBounds.width,this.imageBounds.height);this.item.AnimationMask.graphics=new MaskGraphics(this.maskContext,this.item.BoundsForAnimationMask)};
Animation.prototype.getMaskSteps=function(a){var b=a.m_shMask.GetUniqueConfigurationKey(a.m_strType);this.maskCanvas||this.setupMaskAnimation();if(player.computedMasks[b])return player.computedMasks[b];for(var c=this.imageBounds.width,d=this.imageBounds.height,e=[],f=0;f<1+bwMaskBase.PRECOMPUTED_STEP_SIZE;f+=bwMaskBase.PRECOMPUTED_STEP_SIZE){this.maskContext.clearRect(0,0,c,d);this.maskContext.beginPath();a.m_shMask.Draw(f);this.maskContext.closePath();this.maskContext.fillStyle="#000";this.maskContext.fill();
var g=this.maskCanvas.toDataURL();e.push(g)}return player.computedMasks[b]=e};
Animation.prototype.start=function(a,b,c,d,e){this.timeline=c;var f=c.getAnimationTime();if(void 0!=e)f=e;else if(player.currentTimelineEvent)f=player.currentTimelineEvent.time;if(f+this.duration>c.duration)c.duration=f+this.duration;if(!(this.item.transitioning&&this.item.slide==player.currentFramedSlide)){if(this.xml)this.bwa=new bwObjectAnimation(this.xml,b,null,this.item);this.running&&a==this.target&&b!=this.reverse&&(c=f-this.startTime,c<this.duration&&(f=f-this.duration+c));this.endOtherAnimationsForItem(this.item);
this.target=a;this.reverse=b;this.startTime=f;this.running=!0;this.ended=!1;this.item.currentTransform=null;this.item.animating=!0;this.item.animationEnded=!1;if(this.isZeroLength)this.bwa.m_bReverse=this.reverse,this.seek(this.target,this.reverse,0,!0),this.end();else{if(this.item.justShowed)player.removeFromShowQueue(this.item),this.item.ref&&this.item.ref.hide(),this.showOnFirstStep=!0;this.hasRun=!0;player.currentAnimations[this.uniqueID]=this;if(player.paused)player.playing=!0,player.paused=
!1;this.endCallback=d;player.ensureTicking()}}};Animation.prototype.finish=function(a){!this.ended&&this.running&&(this.seek(this.target,this.reverse,this.duration,!0),this.end(a))};
Animation.prototype.end=function(a){var b=this;if(!this.ended)this.ended=!0,this.item.animationEnded=!0,b.item.updateMatrixComplete(!0),a||(this.item&&this.item.handleEvent&&this.item.handleEvent("onanimationcomplete",this.reverse,function(a,d,e){a=$(e.xml).attr("id");e="true"==$(e.xml).attr("reverse");return b.id==a&&b.reverse==e},!1,!0,!1),this.endCallback&&this.endCallback())};
Animation.prototype.endOtherAnimationsForItem=function(a){var b=this;$.each(player.currentAnimations,function(c,d){d.item==a&&d!=b&&d.finish(!0)})};Animation.prototype.isInitiallyHidden=function(){var a=this.bwa.GetTransformAtTime(0);return a.scale&&!isNaN(a.scale.x)&&(0==a.scale.x||0==a.scale.y)||!isNaN(a.alpha)&&0==a.alpha?!0:!1};
Animation.getBezierPoint=function(a,b,c,d,e){var a=1-a,f=new function(a,b){a||(a=0);b||(b=0);return{x:a,y:b}};f.x=b.x*a*a*a+d.x*3*a*a*(1-a)+e.x*3*a*(1-a)*(1-a)+c.x*(1-a)*(1-a)*(1-a);f.y=b.y*a*a*a+d.y*3*a*a*(1-a)+e.y*3*a*(1-a)*(1-a)+c.y*(1-a)*(1-a)*(1-a);return f};Animation.EasingLookups={};
Animation.getEasingLookup=function(a){function b(a,b,c,d){for(var e=-1,l={},m=0;1>=m;m+=0.01)for(var n=Animation.getBezierPoint(m,new Point(0,0),new Point(1,1),new Point(a,b),new Point(c,d)),p=Math.round(100*n.x),o=e+1;o<=p;o++)l[o]=n.y,e=o;l[0]=0;l[100]=1;return l}function c(){for(var a={},b=0;100>=b;b++){var c=b/100,d=void 0;c<1/2.75?d=7.5625*Math.pow(c,2):c<2/2.75?(c-=1.5/2.75,d=7.5625*Math.pow(c,2)+0.75):c<2.5/2.75?(c-=2.25/2.75,d=7.5625*Math.pow(c,2)+0.9375):(c-=2.625/2.75,d=7.5625*Math.pow(c,
2)+0.984375);a[b]=d}return a}if(a in Animation.EasingLookups)return Animation.EasingLookups[a];switch(a){case bwTween.EASE_IN:Animation.EasingLookups[a]=b(0.42,0,1,1);break;case bwTween.EASE_OUT:Animation.EasingLookups[a]=b(0,0,0.58,1);break;case bwTween.EASE_INOUT:Animation.EasingLookups[a]=b(0.42,0,0.58,1);break;case bwTween.EASE_BOUNCE:Animation.EasingLookups[a]=c();break;default:for(var d=[],e=0;100>=e;e++)d[e]=e/100;Animation.EasingLookups[a]=d}return Animation.EasingLookups[a]};
Animation.endForItem=function(a){$.each(player.currentAnimations,function(b,c){c.item==a&&c.end(!0)})};Animation.finishForTimeline=function(a,b){var c=b;$.each(player.currentAnimations,function(d,e){e.timeline==a&&b>=e.startTime&&b<=e.startTime+e.duration&&(c=Math.max(c,e.startTime+e.duration))});a.currentTime=c};Animation.getEasedPercent=function(a,b){var c=Animation.getEasingLookup(b),d=Math.round(100*a);return c[d]};var BlendMode={NORMAL:1,LAYER:2};function Point(a,b){this.x=a;this.y=b}function ForceInt(a){a=parseInt(a);isNaN(a)&&(a=0);return a}function BezierSegment(a,b,c,d){this.start=a;this.end=d;this.c1=b;this.c2=c}
BezierSegment.prototype.getValue=function(a){var a=1-a,b=new function(a,b){a||(a=0);b||(b=0);return{x:a,y:b}};b.x=this.start.x*a*a*a+this.c1.x*3*a*a*(1-a)+this.c2.x*3*a*(1-a)*(1-a)+this.end.x*(1-a)*(1-a)*(1-a);b.y=this.start.y*a*a*a+this.c1.y*3*a*a*(1-a)+this.c2.y*3*a*(1-a)*(1-a)+this.end.y*(1-a)*(1-a)*(1-a);return b};function getTimer(){return 0};function bwAnimation(a){this.m_strEasing=bwAnimation.EASE_CUBIC;this.m_nAnimationType=this.m_nCurrentTime=this.m_nDuration=this.m_nStartTime=this.m_nTriggerTime=0;this.m_bTransitionIn=!0;this.m_nStartY=this.m_nStartX=0;this.m_nSpinCount=1;this.m_nCurRotation=this.m_nCurYPos=this.m_nCurXPos=0;this.m_nCurYScale=this.m_nCurXScale=1;this.m_nEndY=this.m_nEndX=3735928495;this.m_nStartScaleY=this.m_nStartScaleX=this.m_nEndRotation=0;this.m_nEndScaleY=this.m_nEndScaleX=1;this.m_nStartAlpha=0;this.m_nEndAlpha=
1;this.m_aoTarget=null;this.m_bAdjustRotation=!0;this.m_bTimelineAnimating=this.m_bAnimating=!1;this.m_aoTarget=a}bwAnimation.TRANS_APPEAR="appear";bwAnimation.TRANS_FADE="fade";bwAnimation.TRANS_FLY="fly";bwAnimation.TRANS_GROW="grow";bwAnimation.TRANS_SPIN="spin";bwAnimation.TRANS_MASK="mask";bwAnimation.TRANS_INT_FADE=1;bwAnimation.TRANS_INT_FLY=2;bwAnimation.TRANS_INT_GROW=4;bwAnimation.TRANS_INT_SPIN=8;bwAnimation.TRANS_INT_MASK=16;bwAnimation.TRANS_DIR_LEFT=1;bwAnimation.TRANS_DIR_RIGHT=2;
bwAnimation.TRANS_DIR_TOP=4;bwAnimation.TRANS_DIR_BOTTOM=8;bwAnimation.EASE_BOUNCE="bounce";bwAnimation.EASE_CIRCULAR="circular";bwAnimation.EASE_CUBIC="cubic";bwAnimation.EASE_EXPONENTIAL="exponetial";bwAnimation.EASE_LINEAR="linear";bwAnimation.EASE_QUADRATIC="quadradic";bwAnimation.EASE_QUARTIC="quartic";bwAnimation.EASE_QUINTIC="quintic";bwAnimation.EASE_SINE="sine";bwAnimation.prototype.getAppear=function(){return 0==this.m_nAnimationType};
bwAnimation.prototype.getFlyEnabled=function(){return 0<(this.m_nAnimationType&bwAnimation.TRANS_INT_FLY)};bwAnimation.prototype.getFadeEnabled=function(){return 0<(this.m_nAnimationType&bwAnimation.TRANS_INT_FADE)};bwAnimation.prototype.getGrowEnabled=function(){return 0<(this.m_nAnimationType&bwAnimation.TRANS_INT_GROW)};bwAnimation.prototype.getSpinEnabled=function(){return 0<(this.m_nAnimationType&bwAnimation.TRANS_INT_SPIN)};
bwAnimation.prototype.getMaskEnabled=function(){return 0<(this.m_nAnimationType&bwAnimation.TRANS_INT_MASK)};
bwAnimation.prototype.SetEffects=function(a){this.m_nAnimationType=0;0<=a.indexOf(bwAnimation.TRANS_FADE)&&(this.m_nAnimationType+=bwAnimation.TRANS_INT_FADE);0<=a.indexOf(bwAnimation.TRANS_FLY)&&(this.m_nAnimationType+=bwAnimation.TRANS_INT_FLY);0<=a.indexOf(bwAnimation.TRANS_GROW)&&(this.m_nAnimationType+=bwAnimation.TRANS_INT_GROW);0<=a.indexOf(bwAnimation.TRANS_SPIN)&&(this.m_nAnimationType+=bwAnimation.TRANS_INT_SPIN);0<=a.indexOf(bwAnimation.TRANS_MASK)&&(this.m_nAnimationType+=bwAnimation.TRANS_INT_MASK);
if(a==bwAnimation.TRANS_APPEAR)this.m_nDuration=this.m_nAnimationType=0};bwAnimation.prototype.AddEffect=function(a){var b=0;switch(a){case bwAnimation.TRANS_FADE:b=bwAnimation.TRANS_INT_FADE;break;case bwAnimation.TRANS_FLY:b=bwAnimation.TRANS_INT_FLY;break;case bwAnimation.TRANS_GROW:b=bwAnimation.TRANS_INT_GROW;break;case bwAnimation.TRANS_SPIN:b=bwAnimation.TRANS_INT_SPIN;break;case bwAnimation.TRANS_MASK:b=bwAnimation.TRANS_INT_MASK}this.m_nAnimationType&b||(this.m_nAnimationType+=b)};
bwAnimation.prototype.getTimelineAnimating=function(){return this.m_bTimelineAnimating};bwAnimation.prototype.setTimelineAnimating=function(a){this.m_bTimelineAnimating=a&&0<this.m_nAnimationType&&0<this.m_nDuration};bwAnimation.prototype.getAnimating=function(){return this.m_bAnimating};bwAnimation.prototype.setTarget=function(a){this.m_aoTarget=a};bwAnimation.prototype.getTarget=function(){return this.m_aoTarget};bwAnimation.prototype.getTriggerTime=function(){return this.m_nTriggerTime};
bwAnimation.prototype.setTriggerTime=function(a){this.m_nTriggerTime=a};bwAnimation.prototype.getStartTime=function(){return this.m_nStartTime};bwAnimation.prototype.setStartTime=function(a){this.m_nStartTime=a};bwAnimation.prototype.getDuration=function(){return this.m_nDuration};bwAnimation.prototype.setDuration=function(a){this.m_nDuration=a};bwAnimation.prototype.getTime=function(){return this.m_nCurrentTime};bwAnimation.prototype.setTime=function(a){this.m_nCurrentTime=a;this.UpdateTarget()};
bwAnimation.prototype.getStartXPos=function(){return this.m_nStartX};bwAnimation.prototype.setStartXPos=function(a){this.m_nStartX=a};bwAnimation.prototype.getStartYPos=function(){return this.m_nStartY};bwAnimation.prototype.setStartYPos=function(a){this.m_nStartY=a};bwAnimation.prototype.getEndXPos=function(){return this.m_nEndX};bwAnimation.prototype.setEndXPos=function(a){this.m_nEndX=a};bwAnimation.prototype.getEndYPos=function(){return this.m_nEndY};
bwAnimation.prototype.setEndYPos=function(a){this.m_nEndY=a};bwAnimation.prototype.getEndRotation=function(){return this.m_nEndRotation};bwAnimation.prototype.setEndRotation=function(a){this.m_nEndRotation=a};bwAnimation.prototype.getStartXScale=function(){return this.m_nStartScaleX};bwAnimation.prototype.setStartXScale=function(a){this.m_nStartScaleX=a};bwAnimation.prototype.getStartYScale=function(){return this.m_nStartScaleY};
bwAnimation.prototype.setStartYScale=function(a){this.m_nStartScaleY=a};bwAnimation.prototype.getEndXScale=function(){return this.m_nEndScaleX};bwAnimation.prototype.setEndXScale=function(a){this.m_nEndScaleX=a};bwAnimation.prototype.getEndYScale=function(){return this.m_nEndScaleY};bwAnimation.prototype.setEndYScale=function(a){this.m_nEndScaleY=a};bwAnimation.prototype.getEndAlpha=function(){return this.m_nEndAlpha};bwAnimation.prototype.setEndAlpha=function(a){this.m_nEndAlpha=a};
bwAnimation.prototype.getStartAlpha=function(){return this.m_nStartAlpha};bwAnimation.prototype.setStartAlpha=function(a){this.m_nStartAlpha=a};bwAnimation.prototype.setEasing=function(a){this.m_strEasing=a};bwAnimation.prototype.getEasing=function(){return this.m_strEasing};bwAnimation.prototype.getTransitionIn=function(){return this.m_bTransitionIn};bwAnimation.prototype.setTransitionIn=function(a){this.m_bTransitionIn=a};
bwAnimation.prototype.GetTransformAtTime=function(a){var b=null,c=null,d=NaN,e=NaN,a=a/this.m_nDuration;this.m_bReverse&&(a=1-a);0>a&&(a=0);if(1<a||0==this.m_nDuration)a=1;this.m_nCurrentTime>=this.m_nDuration&&(a=1);this.m_bTransitionIn||(a=1-a);a=Animation.getEasedPercent(a,bwTween.EASE_INOUT);this.m_nCurXPos=this.m_nEndX;this.m_nCurYPos=this.m_nEndY;this.m_nAnimationType&bwAnimation.TRANS_INT_FADE&&(e=this.m_nStartAlpha+(this.m_nEndAlpha-this.m_nStartAlpha)*a);if(this.m_nAnimationType&bwAnimation.TRANS_INT_FLY)this.m_nCurXPos=
this.m_nStartX+(this.m_nEndX-this.m_nStartX)*a,this.m_nCurYPos=this.m_nStartY+(this.m_nEndY-this.m_nStartY)*a,b=new Point(this.m_nCurXPos,this.m_nCurYPos);if(this.m_nAnimationType&bwAnimation.TRANS_INT_GROW)this.m_nCurXScale=(this.m_nEndScaleX-this.m_nStartScaleX)*a+this.m_nStartScaleX,this.m_nCurYScale=(this.m_nEndScaleY-this.m_nStartScaleY)*a+this.m_nStartScaleY,c=new Point(100*this.m_nCurXScale,100*this.m_nCurYScale);this.m_nAnimationType&bwAnimation.TRANS_INT_SPIN&&(d=(360*this.m_nSpinCount+this.m_nEndRotation)*
a);return{position:b,scale:c,rotation:d,alpha:e}};bwAnimation.prototype.getAdjustRotation=function(){return this.m_bAdjustRotation};bwAnimation.prototype.setAdjustRotation=function(a){this.m_bAdjustRotation=a};bwAnimation.prototype.StopAnimation=function(){if(this.m_bAnimating)this.m_bAnimating=!1};
bwAnimation.prototype.PlayAnimation=function(){if(null!=this.m_aoTarget){if(3735928495==this.m_nEndX)this.m_nEndX=this.m_aoTarget.x;if(3735928495==this.m_nEndY)this.m_nEndY=this.m_aoTarget.y;this.m_nStartTime=this.getTimer();(this.m_bAnimating=!0)&&this.StepAnimation(null)}};bwAnimation.prototype.CompleteAnimation=function(){this.m_nCurrentTime=this.m_nDuration;this.m_bAnimating=!1;this.UpdateTarget()};
bwAnimation.prototype.StepAnimation=function(){var a=!1;this.m_nCurrentTime=this.getTimer()-this.m_nStartTime;if(this.m_nCurrentTime>=this.m_nDuration)a=!0,this.m_nCurrentTime=this.m_nDuration,this.m_bAnimating=!1;this.UpdateTarget();return a};bwAnimation.prototype.Destroy=function(){this.StopAnimation();this.m_aoTarget=null};function bwObjectAnimation(a,b,c,d){this.m_nCurrentTime=this.m_nDuration=this.m_nStartTime=this.m_nTriggerTime=0;this.m_bReverse=!1;this.m_xmlData=null;this.m_strId="";this.m_bHideOnComplete=this.m_bShowOnStart=this.m_bAnimating=!1;this.m_ptStartPos=this.m_arrTweens=this.m_oTarget=this.m_oActionHandler=null;this.m_bTimelineAnimating=!1;this.m_oActionHandler=c;this.m_oTarget=d;this.m_xmlData=a;this.m_ptStartPos=new Point(this.m_oTarget.x,this.m_oTarget.y);this.ParseXMLData()}
bwObjectAnimation.prototype.ParseXMLData=function(){this.m_strId=$(this.m_xmlData).attr("id");this.m_bShowOnStart="true"==$(this.m_xmlData).attr("showonstart");this.m_bHideOnComplete="true"==$(this.m_xmlData).attr("hideoncomplete");this.m_nDuration=parseInt($(this.m_xmlData).attr("duration"));if(0==this.m_nDuration)this.isZeroLength=!0,this.m_nDuration=1;var a=$(this.m_xmlData).children("tweens").children("tween"),b=a.length,c=0,d=null;this.m_arrTweens=[];for(c=0;c<b;c++)d=new bwTweenEvent(this.m_oTarget,
a[c],this.m_oTarget.rotation,this.m_oTarget.matrix.getRotation()),this.m_arrTweens.push(d)};bwObjectAnimation.prototype.getTimelineAnimating=function(){return this.m_bTimelineAnimating};bwObjectAnimation.prototype.setTimelineAnimating=function(a){this.m_bTimelineAnimating=a};bwObjectAnimation.prototype.getReverse=function(){return this.m_bReverse};
bwObjectAnimation.prototype.ReverseAnimation=function(a){alert("reversing "+this.m_bReverse);if(this.m_bAnimating)this.m_nStartTime=a-(this.m_nDuration-(a-this.m_nStartTime)),SyncAnimation(a)};bwObjectAnimation.prototype.getId=function(){return this.m_strId};bwObjectAnimation.prototype.getAnimating=function(){return this.m_bAnimating};bwObjectAnimation.prototype.getTriggerTime=function(){return this.m_nTriggerTime};bwObjectAnimation.prototype.setTriggerTime=function(a){this.m_nTriggerTime=a};
bwObjectAnimation.prototype.getStartTime=function(){return this.m_nStartTime};bwObjectAnimation.prototype.setStartTime=function(a){this.m_nStartTime=a};bwObjectAnimation.prototype.getDuration=function(){return this.m_nDuration};
bwObjectAnimation.prototype.UpdateTarget=function(){var a=null,b=null,c=null,d=null,e=null,f=NaN,g=NaN,h=a=NaN,j=this.m_nCurrentTime,k=0;if(this.m_bReverse){j=this.m_nDuration-this.m_nCurrentTime;for(k=this.m_arrTweens.length-1;0<=k;k--)a=this.m_arrTweens[k],b=a.GetPointAtTime(j,this.m_bReverse),d=a.GetScaleAtTime(j,this.m_bReverse),f=a.GetRotationAtTime(j,this.m_bReverse),a=a.GetAlphaAtTime(j,this.m_bReverse),null!=b&&(c=b),null!=d&&(e=d),isNaN(f)||(g=f),isNaN(a)||(h=a)}else for(k=0;k<this.m_arrTweens.length;k++)a=
this.m_arrTweens[k],b=a.GetPointAtTime(j,this.m_bReverse),d=a.GetScaleAtTime(j,this.m_bReverse),f=a.GetRotationAtTime(j,this.m_bReverse),a=a.GetAlphaAtTime(j,this.m_bReverse),null!=b&&(c=b),null!=d&&(e=d),isNaN(f)||(g=f),isNaN(a)||(h=a);b=new Matrix;isNaN(g)?b.rotate(this.m_oTarget.rotation*DEGREE_MULTIPLIER):(this.m_oTarget.rotation=g,b.rotate(g*DEGREE_MULTIPLIER));if(!isNaN(h))this.m_oTarget.alpha=h/100;null!=e?(bwUtils.debug_trace("Scale: "+e.x+", "+e.y),this.m_oTarget.scaleX=e.x/100,this.m_oTarget.scaleY=
e.y/100,b.scale(e.x/100,e.y/100)):b.scale(this.m_oTarget.scaleX,this.m_oTarget.scaleY);e=null;null!=c?(e=b.transformPoint(new Point(this.m_oTarget.RotateXPos,this.m_oTarget.RotateYPos)),this.m_oTarget.x=c.x+(this.m_oTarget.RotateXPos-e.x),this.m_oTarget.y=c.y+(this.m_oTarget.RotateYPos-e.y)):(e=b.transformPoint(new Point(this.m_oTarget.RotateXPos,this.m_oTarget.RotateYPos)),this.m_oTarget.x=this.m_ptStartPos.x+(this.m_oTarget.RotateXPos-e.x),this.m_oTarget.y=this.m_ptStartPos.y+(this.m_oTarget.RotateYPos-
e.y),c=this.m_ptStartPos);this.m_oTarget.RawXPos=c.x;this.m_oTarget.RawYPos=c.y};
bwObjectAnimation.prototype.GetTransformAtTime=function(a){for(var b=this,c=null,d=null,e=null,f=null,g=null,h=NaN,j=NaN,k=NaN,l=NaN,m=null,n=null,p=null,o=null,r=null,s=null,t=null,z=null,C=0,B=function(c){d=c.GetPointAtTime(a,b.m_bReverse);f=c.GetScaleAtTime(a,b.m_bReverse);h=c.GetRotationAtTime(a,b.m_bReverse);k=c.GetAlphaAtTime(a,b.m_bReverse);m=c.GetMaskAtTime(a,b.m_bReverse);p=c.GetSkewAtTime(a,b.m_bReverse);r=c.GetColorAtTime(a,b.m_bReverse);t=c.GetMatrixAtTime(a,b.m_bReverse);null==e&&null!=
d&&(e=d);null==g&&null!=f&&(g=f);isNaN(j)&&!isNaN(h)&&(j=h);isNaN(l)&&!isNaN(k)&&(l=k);null==n&&null!=m&&(n=m);null==o&&null!=p&&(o=p);null==s&&null!=r&&(s=r);null==z&&null!=t&&(z=t)},C=0;C<this.m_arrTweens.length;C++)c=this.m_arrTweens[C],a>=c.getStartTime()&&a<=c.getStartTime()+c.getDuration()&&B(c);for(C=0;C<this.m_arrTweens.length;C++)c=this.m_arrTweens[C],(a<c.getStartTime()||a>c.getStartTime()+c.getDuration())&&B(c);return{position:e,scale:g,rotation:j,alpha:l,mask:n,skew:o,color:s,matrix:z}};
bwObjectAnimation.prototype.SyncAnimation=function(a){var b=!1;this.m_nCurrentTime=a-this.m_nStartTime;if(this.m_nCurrentTime>=this.m_nDuration)b=!0,this.m_nCurrentTime=this.m_nDuration,this.m_bAnimating=!1,this.m_oActionHandler.RemoveAnimationTimer(SyncAnimation);UpdateTarget();if(b&&this.m_oTarget.blendMode!=BlendMode.NORMAL)this.m_oTarget.blendMode=BlendMode.NORMAL;return b};
bwObjectAnimation.prototype.StepAnimation=function(){var a=!1;this.m_nCurrentTime=getTimer()-this.m_nStartTime;if(this.m_nCurrentTime>=this.m_nDuration)a=!0,this.m_nCurrentTime=this.m_nDuration,this.m_bAnimating=!1,this.m_oActionHandler.RemoveAnimationTimer(StepAnimation);UpdateTarget();if(a){if(this.m_oTarget.blendMode!=BlendMode.NORMAL)this.m_oTarget.blendMode=BlendMode.NORMAL;var b=new bwAnimationEvent(bwAnimationEvent.ANIMATION_COMPLETE);b.AnimationId=this.m_strId;b.Reverse=this.m_bReverse;dispatchEvent(b)}return a};
bwObjectAnimation.prototype.StopAnimation=function(){if(this.m_bAnimating)this.m_bAnimating=!1,this.m_oActionHandler.RemoveAnimationTimer(SyncAnimation)};bwObjectAnimation.prototype.PlayAnimation=function(){if(null!=this.m_oTarget)this.m_nStartTime=this.m_oActionHandler.EventTime,this.m_bAnimating=!0,this.m_oActionHandler.AddAnimationTimer(SyncAnimation),StepAnimation()};
bwObjectAnimation.prototype.CompleteAnimation=function(){this.m_nCurrentTime=this.m_nDuration;this.m_bAnimating=!1;this.m_oActionHandler.RemoveAnimationTimer(SyncAnimation);UpdateTarget();var a=this.m_oTarget;if(a&&a.blendMode!=BlendMode.NORMAL)a.blendMode=BlendMode.NORMAL};bwObjectAnimation.prototype.Destroy=function(){StopAnimation();this.m_oTarget.SlideOwner.RemoveAnimation(this);this.m_oTarget=null};function bwAnnotationAnimation(a){this.m_aoTarget=a;this.m_nSegmentDuration=this.m_nDuration=this.m_nStartTime=this.m_nTriggerTime=0;this.m_nSegments=-1;this.m_nAnimationType=this.m_nTotalElapsedTime=this.m_nCurrentSegment=0;this.m_bSegmentPhaseIn=this.m_bTransitionIn=!0;this.m_nStartY=this.m_nStartX=0;this.m_nEndY=this.m_nEndX=NaN;this.m_bTimelineAnimating=this.m_bAnimating=!1}bwAnnotationAnimation.DURATION_WAIT=120;bwAnnotationAnimation.TRANS_APPEAR="appear";bwAnnotationAnimation.TRANS_FADE="fade";
bwAnnotationAnimation.TRANS_BOUNCE="bounce";bwAnnotationAnimation.TRANS_DRAW="draw";bwAnnotationAnimation.TRANS_STRETCH="stretch";bwAnnotationAnimation.TRANS_INT_APPEAR=0;bwAnnotationAnimation.TRANS_INT_FADE=1;bwAnnotationAnimation.TRANS_INT_BOUNCE=2;bwAnnotationAnimation.TRANS_INT_DRAW=4;bwAnnotationAnimation.TRANS_INT_STRETCH=8;bwAnnotationAnimation.DURATION_INFINITE=999999999;
bwAnnotationAnimation.prototype.GetTime=function(){var a=player.currentSlide();return this.m_nDuration==bwAnnotationAnimation.DURATION_INFINITE&&a.ended&&a.endedAnimationTime?a.duration+player.animationTime-a.endedAnimationTime:a.getAnimationTime()};bwAnnotationAnimation.prototype.bwAnnotationAnimation=function(a){this.m_aoTarget=a};bwAnnotationAnimation.prototype.GetTransformAtTime=function(a){this.StepAnimation(a);return{}};
bwAnnotationAnimation.prototype.StepAnimation=function(){var a=!1;this.m_nTotalElapsedTime=this.GetTime()-this.m_nStartTime;this.m_nCurrentSegment=1;var b=this.m_nTotalElapsedTime,c=2*this.m_nSegmentDuration+bwAnnotationAnimation.DURATION_WAIT,d=2*Math.floor(b/c);this.m_nCurrentSegment+=d;b-c*d/2>this.m_nSegmentDuration+bwAnnotationAnimation.DURATION_WAIT&&this.m_nCurrentSegment++;-1==this.m_nSegments&&(this.m_nCurrentSegment%=2);if(this.m_nCurrentSegment>this.m_nSegments&&-1!=this.m_nSegments)this.m_nCurrentSegment=
this.m_nSegments;this.m_bSegmentPhaseIn=this.m_nAnimationType==bwAnnotationAnimation.TRANS_INT_DRAW?!1:this.m_nAnimationType==bwAnnotationAnimation.TRANS_INT_BOUNCE?0==this.m_nCurrentSegment%2?!0:!1:0==this.m_nCurrentSegment%2?!1:!0;if(this.m_nTotalElapsedTime>=this.m_nDuration&&-1!=this.m_nSegments)a=!0,this.m_nTotalElapsedTime=this.m_nDuration,this.m_bAnimating=!1;this.UpdateTarget();return a};
bwAnnotationAnimation.prototype.UpdateTarget=function(){var a=0==this.m_nCurrentSegment%2,b=this.m_nCurrentSegment-1,c=b*this.m_nSegmentDuration+Math.floor(b/2)*bwAnnotationAnimation.DURATION_WAIT;-1!=this.m_nSegments?c=this.m_nTotalElapsedTime-c:(c=this.m_nTotalElapsedTime,a&&(c-=this.m_nSegmentDuration),c%=2*this.m_nSegmentDuration+bwAnnotationAnimation.DURATION_WAIT);a&&(c=Math.max(c-bwAnnotationAnimation.DURATION_WAIT,0));a=this.GetEasePercent(c/this.m_nSegmentDuration,2,this.m_bSegmentPhaseIn);
0>a&&(a=0);if(1<a||0==this.m_nDuration)a=1;0>b&&(a=0);this.m_nTotalElapsedTime>=this.m_nDuration&&-1!=this.m_nSegments&&(a=this.m_bSegmentPhaseIn?0:1);this.m_aoTarget&&this.m_aoTarget.UpdateTarget(a,this.m_nAnimationType)};bwAnnotationAnimation.prototype.StopAnimation=function(){if(this.m_bAnimating)this.m_bAnimating=!1};
bwAnnotationAnimation.prototype.PlayAnimation=function(){if(null!=this.m_aoTarget){if(isNaN(this.m_nEndX))this.m_nEndX=this.m_aoTarget.x;if(isNaN(this.m_nEndY))this.m_nEndY=this.m_aoTarget.y;(this.m_bAnimating=!0)&&this.StepAnimation(null)}};bwAnnotationAnimation.prototype.CompleteAnimation=function(){this.m_nTotalElapsedTime=this.m_nDuration;this.m_bAnimating=!1;UpdateTarget();var a=this.m_aoTarget;if(a&&a.blendMode!=BlendMode.NORMAL)a.blendMode=BlendMode.NORMAL};
bwAnnotationAnimation.prototype.Destroy=function(){StopAnimation();this.m_aoTarget=null};
bwAnnotationAnimation.prototype.SetEffects=function(a,b){this.m_nDuration=this.m_nSegmentDuration*b+bwAnnotationAnimation.DURATION_WAIT*Math.floor(b/2);if(a==bwAnnotationAnimation.TRANS_APPEAR)this.m_nAnimationType=bwAnnotationAnimation.TRANS_INT_APPEAR;else if(a==bwAnnotationAnimation.TRANS_FADE)this.m_nAnimationType=0==b?bwAnnotationAnimation.TRANS_INT_APPEAR:bwAnnotationAnimation.TRANS_INT_FADE;else if(a==bwAnnotationAnimation.TRANS_STRETCH)this.m_nAnimationType=0==b?bwAnnotationAnimation.TRANS_INT_APPEAR:
bwAnnotationAnimation.TRANS_INT_STRETCH;else if(a==bwAnnotationAnimation.TRANS_BOUNCE)this.m_nAnimationType=bwAnnotationAnimation.TRANS_INT_BOUNCE;else if(a==bwAnnotationAnimation.TRANS_DRAW)this.m_nAnimationType=bwAnnotationAnimation.TRANS_INT_DRAW;if(0<=b)this.m_nSegments=b;if(-1==b)this.m_nDuration=bwAnnotationAnimation.DURATION_INFINITE};bwAnnotationAnimation.prototype.GetEasePercent=function(a,b,c){c&&(a=1-a);return 1-(Math.pow(2,b-b*a)-1)/(Math.pow(2,b)-1)};
bwAnnotationAnimation.prototype.getAnimating=function(){return this.m_bAnimating};bwAnnotationAnimation.prototype.setTarget=function(a){this.m_aoTarget=a};bwAnnotationAnimation.prototype.getTarget=function(){return this.m_aoTarget};bwAnnotationAnimation.prototype.getDuration=function(){return this.m_nDuration};bwAnnotationAnimation.prototype.setDuration=function(a){this.m_nDuration=a};bwAnnotationAnimation.prototype.getTime=function(){return this.m_nTotalElapsedTime};
bwAnnotationAnimation.prototype.setTime=function(a){this.m_nTotalElapsedTime=a;UpdateTarget()};bwAnnotationAnimation.prototype.getStartXPos=function(){return this.m_nStartX};bwAnnotationAnimation.prototype.setStartXPos=function(a){this.m_nStartX=a};bwAnnotationAnimation.prototype.getStartYPos=function(){return this.m_nStartY};bwAnnotationAnimation.prototype.setStartYPos=function(a){this.m_nStartY=a};bwAnnotationAnimation.prototype.getEndXPos=function(){return this.m_nEndX};
bwAnnotationAnimation.prototype.setEndXPos=function(a){this.m_nEndX=a};bwAnnotationAnimation.prototype.getEndYPos=function(){return this.m_nEndY};bwAnnotationAnimation.prototype.setEndYPos=function(a){this.m_nEndY=a};bwAnnotationAnimation.prototype.getTransitionIn=function(){return this.m_bTransitionIn};bwAnnotationAnimation.prototype.setTransitionIn=function(a){this.m_bTransitionIn=a};bwAnnotationAnimation.prototype.getSegmentPhaseIn=function(){return this.m_bSegmentPhaseIn};
bwAnnotationAnimation.prototype.setSegmentPhaseIn=function(a){this.m_bSegmentPhaseIn=a};bwAnnotationAnimation.prototype.getSegmentDuration=function(){return this.m_nSegmentDuration};bwAnnotationAnimation.prototype.setSegmentDuration=function(a){this.m_nSegmentDuration=a};bwAnnotationAnimation.prototype.getCurrentSegment=function(){return this.m_nCurrentSegment};bwAnnotationAnimation.prototype.getSegments=function(){return this.m_nSegments};
bwAnnotationAnimation.prototype.setSegments=function(a){this.m_nSegments=a};bwAnnotationAnimation.prototype.getTriggerTime=function(){return this.m_nTriggerTime};bwAnnotationAnimation.prototype.setTriggerTime=function(a){this.m_nTriggerTime=a};bwAnnotationAnimation.prototype.getStartTime=function(){return this.m_nStartTime};bwAnnotationAnimation.prototype.setStartTime=function(a){this.m_nStartTime=a};bwAnnotationAnimation.prototype.getTimelineAnimating=function(){return this.m_bTimelineAnimating};
bwAnnotationAnimation.prototype.setTimelineAnimating=function(a){this.m_bTimelineAnimating=a&&0<this.m_nAnimationType&&0<this.m_nDuration};function bwCubicBezierSegment(a,b,c,d){this.m_nPrecision=10;this.m_nAccuracy=0.5;this.m_arrDistances=this.m_oCurve=this.m_grDebug=this.m_ptControlB=this.m_ptControlA=this.m_ptAnchorB=this.m_ptAnchorA=null;this.m_nLast=0;this.m_oTarget=this.m_xmlData=null;this.m_oTarget=a;this.m_nPrecision=c;this.m_grDebug=d;if(b)this.m_xmlData=b,this.ParseXML()}
bwCubicBezierSegment.prototype.ParseXML=function(){var a=$(this.m_xmlData).children("anchora")[0],b=$(this.m_xmlData).children("anchorb")[0],c=$(this.m_xmlData).children("controla")[0],d=$(this.m_xmlData).children("controlb")[0];this.m_ptAnchorA=bwTweenPosition.GetPoint(this.m_oTarget,a);this.m_ptAnchorB=bwTweenPosition.GetPoint(this.m_oTarget,b);this.m_ptControlA=bwTweenPosition.GetPoint(this.m_oTarget,c);this.m_ptControlB=bwTweenPosition.GetPoint(this.m_oTarget,d);this.m_oCurve=new BezierSegment(this.m_ptAnchorA,
this.m_ptControlA,this.m_ptControlB,this.m_ptAnchorB);this.BuildDistances()};bwCubicBezierSegment.prototype.GetLength=function(){return this.m_arrDistances[this.m_arrDistances.length-1].Distance};
bwCubicBezierSegment.prototype.GetPointAtPosition=function(a){for(var b=null,c=0;c<this.m_arrDistances.length;c++)if(this.m_arrDistances[c].Distance>=a){b=this.m_arrDistances[c].Distance>a?this.FindPointByDistance(a,this.m_arrDistances[c-1].Time,this.m_arrDistances[c].Time,this.m_arrDistances[c-1].Distance,this.m_arrDistances[c-1].CurvePoint):this.m_arrDistances[c].CurvePoint;break}if(!b)b=this.m_arrDistances[c-1].CurvePoint;return b};
bwCubicBezierSegment.prototype.FindPointByDistance=function(a,b,c,d,e){for(var f=(b+c)/2,g=this.m_oCurve.getValue(f),h=g.x-e.x,j=g.y-e.y,h=d+Math.sqrt(h*h+j*j),k=0;Math.abs(h-a)>this.m_nAccuracy&&100>k;)h<a?(b=f,e=g,d=h):h>a&&(c=f),f=(b+c)/2,g=this.m_oCurve.getValue(f),h=g.x-e.x,j=g.y-e.y,h=d+Math.sqrt(h*h+j*j),k++;return g};
bwCubicBezierSegment.prototype.BuildDistances=function(){var a=0,b=this.m_oCurve.getValue(0),c=null,d=0,e=0,f=0,d=null;this.m_arrDistances=[];d={};d.CurvePoint=b;d.Distance=f;d.Time=0;this.m_arrDistances.push(d);for(var g=1;g<=this.m_nPrecision;g++)a=g/this.m_nPrecision,c=this.m_oCurve.getValue(a),d=c.x-b.x,e=c.y-b.y,f+=Math.sqrt(d*d+e*e),d={},d.CurvePoint=c,d.Distance=f,d.Time=a,this.m_arrDistances.push(d),b=c};function bwQuadraticBezierSegment(a,b,c,d){this.m_nPrecision=10;this.m_nAccuracy=0.5;this.m_oTarget=this.m_xmlData=this.m_grDebug=this.m_arrDistances=this.m_ptControl=this.m_ptAnchorB=this.m_ptAnchorA=null;this.m_oTarget=a;this.m_nPrecision=c;this.m_grDebug=d;if(b)this.m_xmlData=b,this.ParseXML()}
bwQuadraticBezierSegment.prototype.ParseXML=function(){this.m_ptAnchorA=bwTweenPosition.GetPoint(this.m_oTarget,this.m_xmlData.anchora[0]);this.m_ptAnchorB=bwTweenPosition.GetPoint(this.m_oTarget,this.m_xmlData.anchorb[0]);this.m_ptControl=bwTweenPosition.GetPoint(this.m_oTarget,this.m_xmlData.controla[0]);this.BuildDistances()};bwQuadraticBezierSegment.prototype.GetLength=function(){return this.m_arrDistances[this.m_arrDistances.length-1].Distance};
bwQuadraticBezierSegment.prototype.GetPointAtPosition=function(a){for(var b=null,c=0;c<this.m_arrDistances.length;c++)if(this.m_arrDistances[c].Distance>=a){b=this.m_arrDistances[c].Distance>a?FindPointByDistance(a,this.m_arrDistances[c-1].Time,this.m_arrDistances[c].Time,this.m_arrDistances[c-1].Distance,this.m_arrDistances[c-1].CurvePoint):this.m_arrDistances[c].CurvePoint;break}if(!b)b=this.m_arrDistances[c-1].CurvePoint;return b};
bwQuadraticBezierSegment.prototype.FindPointByDistance=function(a,b,c,d,e){for(var f=(b+c)/2,g=GetPointAtTime(f),h=g.x-e.x,j=g.y-e.y,h=d+Math.sqrt(h*h+j*j),k=0;Math.abs(h-a)>this.m_nAccuracy&&100>k;)h<a?(b=f,e=g,d=h):h>a&&(c=f),f=(b+c)/2,g=GetPointAtTime(f),h=g.x-e.x,j=g.y-e.y,h=d+Math.sqrt(h*h+j*j),k++;return g};
bwQuadraticBezierSegment.prototype.BuildDistances=function(){var a=0,b=GetPointAtTime(0),c=null,d=0,e=0,f=0,d=null;this.m_arrDistances=[];d={};d.CurvePoint=b;d.Distance=f;d.Time=0;this.m_arrDistances.push(d);for(var g=1;g<=this.m_nPrecision;g++)a=g/this.m_nPrecision,c=GetPointAtTime(a),d=c.x-b.x,e=c.y-b.y,f+=Math.sqrt(d*d+e*e),d={},d.CurvePoint=c,d.Distance=f,d.Time=a,this.m_arrDistances.push(d),b=c,this.m_grDebug&&(this.m_grDebug.beginFill(16711680),this.m_grDebug.drawCircle(c.x,c.y,0.5),this.m_grDebug.endFill())};
bwQuadraticBezierSegment.prototype.GetPointAtTime=function(a){return new Point((1-a)*(1-a)*this.m_ptAnchorA.x+2*a*(1-a)*this.m_ptControl.x+a*a*this.m_ptAnchorB.x,(1-a)*(1-a)*this.m_ptAnchorA.y+2*a*(1-a)*this.m_ptControl.y+a*a*this.m_ptAnchorB.y)};function bwTweenEvent(a,b,c){this.m_oTarget=this.m_xmlData=null;this.m_nDuration=this.m_nStartTime=0;this.m_oColorTween=this.m_oSkewTween=this.m_oMaskTween=this.m_oAlphaTween=this.m_oScaleTween=this.m_oRotationTween=this.m_oPositionTween=null;this.m_nInitRotation=c||0;this.m_xmlData=b;this.m_oTarget=a;this.ParseXMLData()}bwTweenEvent.prototype.getStartTime=function(){return this.m_nStartTime};bwTweenEvent.prototype.getDuration=function(){return this.m_nDuration};
bwTweenEvent.prototype.ParseXMLData=function(){this.m_nStartTime=parseInt($(this.m_xmlData).attr("time"));this.m_nDuration=parseInt($(this.m_xmlData).attr("duration"));if(0==this.m_nDuration)this.isZeroLength=!0,this.m_nDuration=1;if(0!=$(this.m_xmlData).children("position").length)this.m_oPositionTween=new bwTweenPosition(this.m_oTarget,$(this.m_xmlData).children("position")[0]);if(0!=$(this.m_xmlData).children("scale").length)"true"==$(this.m_xmlData).children("scale").attr("useglobalaxes")?this.AddOrUpdateMatrixTween($(this.m_xmlData).children("scale")[0],
bwTweenMatrix.FROM_SCALE,this.m_nInitRotation):this.m_oScaleTween=new bwTweenScale(this.m_oTarget,$(this.m_xmlData).children("scale")[0]);if(0!=$(this.m_xmlData).children("rotation").length)this.m_oRotationTween=new bwTweenRotation(this.m_oTarget,$(this.m_xmlData).children("rotation")[0]);if(0!=$(this.m_xmlData).children("alpha").length)this.m_oAlphaTween=new bwTweenAlpha(this.m_oTarget,$(this.m_xmlData).children("alpha")[0]);if(0!=$(this.m_xmlData).children("mask").length)this.m_oMaskTween=new bwTweenMask(this.m_oTarget,
$(this.m_xmlData).children("mask")[0]);if(0!=$(this.m_xmlData).children("skew").length)"true"==$(this.m_xmlData).children("skew").attr("useglobalaxes")?this.AddOrUpdateMatrixTween($(this.m_xmlData).children("skew")[0],bwTweenMatrix.FROM_SKEW,this.m_nInitRotation):this.m_oSkewTween=new bwTweenSkew(this.m_oTarget,$(this.m_xmlData).children("skew")[0])};
bwTweenEvent.prototype.AddOrUpdateMatrixTween=function(a,b,c){null==this.m_oMatrixTween?this.m_oMatrixTween=new bwTweenMatrix(this.m_oTarget,a,b,c):this.m_oMatrixTween.ModifyExistingMatrix(a,b,c)};bwTweenEvent.prototype.GetPointAtTime=function(a,b){var c=null;if(this.m_oPositionTween){a-=this.m_nStartTime;0>a&&(a=0);if(a>this.m_nDuration)a=this.m_nDuration;c=this.m_oPositionTween.GetPointAtTime(a,b)}return c};
bwTweenEvent.prototype.GetRotationAtTime=function(a,b){var c=NaN;if(this.m_oRotationTween){a-=this.m_nStartTime;0>a&&(a=0);if(a>this.m_nDuration)a=this.m_nDuration;c=this.m_oRotationTween.GetRotationAtTime(a,b)}return c};bwTweenEvent.prototype.GetScaleAtTime=function(a,b){var c=null;if(this.m_oScaleTween){a-=this.m_nStartTime;0>a&&(a=0);if(a>this.m_nDuration)a=this.m_nDuration;c=this.m_oScaleTween.GetScaleAtTime(a,b)}return c};
bwTweenEvent.prototype.GetAlphaAtTime=function(a,b){var c=NaN;if(this.m_oAlphaTween){a-=this.m_nStartTime;0>a&&(a=0);if(a>this.m_nDuration)a=this.m_nDuration;c=this.m_oAlphaTween.GetAlphaAtTime(a,b)}return c};bwTweenEvent.prototype.GetSkewAtTime=function(a,b){var c=null;if(this.m_oSkewTween){a-=this.m_nStartTime;0>a&&(a=0);if(a>this.m_nDuration)a=this.m_nDuration;c=this.m_oSkewTween.GetSkewAtTime(a,b)}return c};
bwTweenEvent.prototype.GetMatrixAtTime=function(a,b){var c=null;if(this.m_oMatrixTween){a-=this.m_nStartTime;0>a&&(a=0);if(a>this.m_nDuration)a=this.m_nDuration;c=this.m_oMatrixTween.GetMatrixAtTime(a,b)}return c};bwTweenEvent.prototype.GetSkewRegPoint=function(){return this.m_oSkewTween?this.m_oSkewTween.GetSkewRegPoint():null};bwTweenEvent.prototype.GetMaskAtTime=function(){return this.m_oMaskTween?this:null};
bwTweenEvent.prototype.GetColorAtTime=function(a,b){var c=null;if(this.m_oColorTween){a-=this.m_nStartTime;0>a&&(a=0);if(a>this.m_nDuration)a=this.m_nDuration;c=this.m_oColorTween.GetColorTransformAtTime(a,b)}return c};function bwTween(a,b){this.SEGMENT_QUADRATIC="quadratic";this.SEGMENT_CUBIC="cubic";this.SEGMENT_LINE="line";this.PRECISION=10;this.m_oTarget=this.m_xmlData=null;this.m_nDuration=0;this.m_nEasingType=this.EASE_LINEAR;this.m_nEasingDirection=this.EASE_INOUT;this.m_xmlData=b;this.m_oTarget=a}bwTween.EASE_BOUNCE="bounce";bwTween.EASE_CIRCULAR="circular";bwTween.EASE_CUBIC="cubic";bwTween.EASE_EXPONENTIAL="exponetial";bwTween.EASE_LINEAR="linear";bwTween.EASE_QUADRATIC="quadradic";
bwTween.EASE_QUARTIC="quartic";bwTween.EASE_QUINTIC="quintic";bwTween.EASE_SINE="sine";bwTween.EASE_IN="easein";bwTween.EASE_OUT="easeout";bwTween.EASE_INOUT="easeinout";bwTween.prototype.ParseXMLData=function(){this.m_nDuration=$(this.m_xmlData).attr("duration");this.m_nEasingType=$(this.m_xmlData).attr("easing");this.m_nEasingDirection=$(this.m_xmlData).attr("easingdir");if(0==this.m_nDuration)this.isZeroLength=!0,this.m_nDuration=1};
bwTween.GetValue=function(a,b){var c=0,c=b.charAt(0),d=b.charAt(1),e=1,f=!1;"$"==c||"$"==d?("$"==d&&(e=2,f=!0),c=a.GetProperty(b.substr(e)),f&&(c=-c)):"#"==c||"#"==d?("#"==d&&(e=2,f=!0),c=a.GetVariable(b.substr(e)),f&&(c=-c)):c=parseFloat(b);isNaN(c)&&(c=0);return parseFloat(c)};bwTween.prototype.GetValue=function(a){return bwTween.GetValue(this.m_oTarget,a)};
bwTween.prototype.GetDistanceAtTime=function(a,b,c){b=Math.max(0,Math.min(this.m_nDuration,b));b=Animation.getEasedPercent(b/this.m_nDuration,this.m_nEasingDirection);c&&(b=1/b);return b*a};function bwTweenAlpha(a,b){this.m_arrSegments=null;this.m_nLength=0;this.m_arrSegments=[];bwTween.call(this,a,b);this.ParseXMLData()}bwTweenAlpha.prototype=new bwTween;bwTweenAlpha.prototype.ParseXMLData=function(){bwTween.prototype.ParseXMLData.call(this);for(var a=$(this.m_xmlData).children("path").children("segment"),b=a.length,c=null,d=0,d=0;d<b;d++)c=this.GetAlphaSegment(a[d]),this.m_arrSegments.push(c),this.m_nLength+=c.Length};
bwTweenAlpha.prototype.GetAlphaSegment=function(a){var b=null,b=bwTween.GetValue(this.m_oTarget,$(a).attr("start"))+bwTween.GetValue(this.m_oTarget,$(a).attr("dstart")),a=bwTween.GetValue(this.m_oTarget,$(a).attr("end"))+bwTween.GetValue(this.m_oTarget,$(a).attr("dend"));return b=new bwAlphaSegment(b,a)};
bwTweenAlpha.prototype.GetAlphaAtTime=function(a,b){if(this.isZeroLength)return b?this.m_arrSegments[0].Start:this.m_arrSegments[this.m_arrSegments.length-1].End;var c=0,c=a==this.m_nDuration?1:Animation.getEasedPercent(a/this.m_nDuration,this.m_nEasingDirection);0>c&&(c=0);1<c&&(c=1);for(var d=0,e=0,c=this.m_nLength*c;d<this.m_arrSegments.length&&c>e+this.m_arrSegments[d].getLength();)e+=this.m_arrSegments[d].getLength(),d++;var f=0;return f=this.m_arrSegments[d].Reverse?this.m_arrSegments[d].Start-
(c-e):this.m_arrSegments[d].Start+(c-e)};function bwAlphaSegment(a,b){this.Length=this.End=this.Start=this.nLength=0;this.Reverse=!1;this.Start=a;this.End=b;this.CalcLength()}bwAlphaSegment.prototype.CalcLength=function(){this.End<this.Start?(this.Reverse=!0,this.Length=this.Start-this.End):this.Length=this.End-this.Start};bwAlphaSegment.prototype.getLength=function(){return this.Length};function bwTweenPosition(a,b){this.m_nLength=0;this.m_arrSegments=null;this.m_arrSegments=[];bwTween.call(this,a,b);this.ParseXMLData()}bwTweenPosition.prototype=new bwTween;
bwTweenPosition.prototype.ParseXMLData=function(){bwTween.prototype.ParseXMLData.call(this);for(var a=null,b=$(this.m_xmlData).children("path").children("segment"),c=b.length,d=0,e="",d=0;d<c;d++){e=$(b[d]).attr("type");switch(e){case this.SEGMENT_CUBIC:a=new bwCubicBezierSegment(this.m_oTarget,b[d],this.PRECISION);break;case this.SEGMENT_QUADRATIC:a=new bwQuadraticBezierSegment(this.m_oTarget,b[d],this.PRECISION);break;case this.SEGMENT_LINE:a=new bwLineSegment(this.m_oTarget,b[d])}this.m_arrSegments.push(a);
this.m_nLength+=a.GetLength()}};
bwTweenPosition.prototype.GetPointAtTime=function(a,b){if(this.isZeroLength){var c=this.m_arrSegments[0].GetPointAtPosition(0);b||(c=this.m_arrSegments[this.m_arrSegments.length-1].GetPointAtPosition(this.m_nLength));c.x=Math.round(c.x);c.y=Math.round(c.y);return c}var d=0,d=a==this.m_nDuration?1:Animation.getEasedPercent(a/this.m_nDuration,this.m_nEasingDirection);0>d&&(d=0);1<d&&(d=1);for(var e=c=0,d=this.m_nLength*d;c<this.m_arrSegments.length&&d>e+this.m_arrSegments[c].GetLength();)e+=this.m_arrSegments[c].GetLength(),
c++;c=this.m_arrSegments[c].GetPointAtPosition(d-e);c.x=Math.round(c.x);c.y=Math.round(c.y);return c};bwTweenPosition.GetPoint=function(a,b){var c=$(b).attr("x"),d=$(b).attr("y"),e=$(b).attr("dx"),f=$(b).attr("dy"),g=0,h=0,j=0,k=0;null!=a?(g=bwTween.GetValue(a,c),h=bwTween.GetValue(a,d),j=bwTween.GetValue(a,e),k=bwTween.GetValue(a,f)):(g=ForceInt(c),h=ForceInt(d),j=ForceInt(e),k=ForceInt(f));return new Point(g+j,h+k)};
bwTweenPosition.prototype.GetPoint=function(a,b){return bwTweenPosition.GetPoint(a,b)};function bwTweenRotation(a,b){this.m_arrSegments=null;this.m_nLength=0;this.m_arrSegments=[];bwTween.call(this,a,b);this.ParseXMLData()}bwTweenRotation.prototype=new bwTween;bwTweenRotation.prototype.ParseXMLData=function(){bwTween.prototype.ParseXMLData.call(this);for(var a=$(this.m_xmlData).children("path").children("segment"),b=a.length,c=null,d=0,d=0;d<b;d++)c=this.GetRotationSegment(a[d]),this.m_arrSegments.push(c),this.m_nLength+=c.Length};
bwTweenRotation.prototype.GetRotationSegment=function(a){var b=null,b=bwTween.GetValue(this.m_oTarget,$(a).attr("start"))+bwTween.GetValue(this.m_oTarget,$(a).attr("dstart")),a=bwTween.GetValue(this.m_oTarget,$(a).attr("end"))+bwTween.GetValue(this.m_oTarget,$(a).attr("dend"));return b=new bwRotationSegment(b,a)};
bwTweenRotation.prototype.GetRotationAtTime=function(a,b){if(this.isZeroLength)return b?this.m_arrSegments[0].Start:this.m_arrSegments[this.m_arrSegments.length-1].End;var c=0,c=a==this.m_nDuration?1:Animation.getEasedPercent(a/this.m_nDuration,this.m_nEasingDirection);0>c&&(c=0);1<c&&(c=1);for(var d=0,e=0,c=this.m_nLength*c;d<this.m_arrSegments.length&&c>e+this.m_arrSegments[d].getLength();)e+=this.m_arrSegments[d].getLength(),d++;var f=0;return f=this.m_arrSegments[d].Reverse?this.m_arrSegments[d].Start-
(c-e):this.m_arrSegments[d].Start+(c-e)};function bwRotationSegment(a,b){this.Length=this.End=this.Start=0;this.Reverse=!1;this.Start=a;this.End=b;this.CalcLength()}bwRotationSegment.prototype.CalcLength=function(){this.End<this.Start?(this.Reverse=!0,this.Length=this.Start-this.End):this.Length=this.End-this.Start};bwRotationSegment.prototype.getLength=function(){return this.Length};function bwTweenScale(a,b){this.m_arrSegments=null;this.m_nLength=0;this.m_arrSegments=[];bwTween.call(this,a,b);this.ParseXMLData()}bwTweenScale.prototype=new bwTween;
bwTweenScale.prototype.ParseXMLData=function(){bwTween.prototype.ParseXMLData.call(this);for(var a=$(this.m_xmlData).children("path").children("segment"),b=a.length,c=null,d=0,d=0;d<b;d++){var e=a[d],f=bwTween.GetValue(this.m_oTarget,$(e).attr("startx")),g=bwTween.GetValue(this.m_oTarget,$(e).attr("starty")),h=bwTween.GetValue(this.m_oTarget,$(e).attr("dsx")),j=bwTween.GetValue(this.m_oTarget,$(e).attr("dsy")),c=bwTween.GetValue(this.m_oTarget,$(e).attr("endx")),k=bwTween.GetValue(this.m_oTarget,
$(e).attr("endy")),l=bwTween.GetValue(this.m_oTarget,$(e).attr("dex")),e=bwTween.GetValue(this.m_oTarget,$(e).attr("dey")),f=new Point(f+h,g+j),c=new Point(c+l,k+e),c=new bwScaleSegment(f,c);this.m_arrSegments.push(c);this.m_nLength+=c.getLength()}};
bwTweenScale.prototype.GetScaleAtTime=function(a,b){if(this.isZeroLength)return b?this.m_arrSegments[0].GetPointAtPosition(0):this.m_arrSegments[this.m_arrSegments.length-1].GetPointAtPosition(this.m_nLength);var c=0,c=a==this.m_nDuration?1:Animation.getEasedPercent(a/this.m_nDuration,this.m_nEasingDirection);0>c&&(c=0);1<c&&(c=1);for(var d=0,e=0,c=this.m_nLength*c;d<this.m_arrSegments.length&&c>e+this.m_arrSegments[d].getLength();)e+=this.m_arrSegments[d].getLength(),d++;return this.m_arrSegments[d].GetPointAtPosition(c-
e)};function bwScaleSegment(a,b){this.m_nAngle=this.m_nLength=0;this.m_ptAnchorB=this.m_ptAnchorA=null;this.m_nDY=this.m_nDX=0;this.m_ptAnchorA=a;this.m_ptAnchorB=b;this.m_nDX=this.m_ptAnchorB.x-this.m_ptAnchorA.x;this.m_nDY=this.m_ptAnchorB.y-this.m_ptAnchorA.y;this.CalcLength()}
bwScaleSegment.prototype.CalcLength=function(){var a=0,b=0,a=this.m_ptAnchorB.x-this.m_ptAnchorA.x,b=this.m_ptAnchorB.y-this.m_ptAnchorA.y;this.m_nLength=Math.sqrt(a*a+b*b);this.m_nAngle=Math.atan((this.m_ptAnchorB.y-this.m_ptAnchorA.y)/(this.m_ptAnchorB.x-this.m_ptAnchorA.x));if(this.m_ptAnchorB.x==this.m_ptAnchorA.x&&this.m_ptAnchorB.y==this.m_ptAnchorA.y)this.m_nAngle=0;this.m_ptAnchorB.x<this.m_ptAnchorA.x&&(this.m_nAngle+=Math.PI)};
bwScaleSegment.prototype.GetPointAtPosition=function(a){a/=this.m_nLength;0==this.m_nLength&&(a=0);return new Point(this.m_ptAnchorA.x+this.m_nDX*a,this.m_ptAnchorA.y+this.m_nDY*a)};bwScaleSegment.prototype.getLength=function(){return this.m_nLength};function bwTweenSkew(a,b){this.m_arrSegments=[];this.m_nLength=0;this.m_ptSkewReg=null;bwTween.call(this,a,b);this.ParseXMLData()}bwTweenSkew.prototype=new bwTween;bwTweenSkew.prototype.GetSkewAtTime=function(a,b){var c=this.GetDistanceAtTime(this.m_nLength,a,b),d,e;for(e in this.m_arrSegments){d=this.m_arrSegments[e];var f=d.Length;if(f<c)c-=f;else break}c=d.GetPointAtPosition(c);c.regpoint=this.m_ptSkewReg;return c};bwTweenSkew.prototype.GetSkewRegPoint=function(){return this.m_ptSkewReg};
bwTweenSkew.prototype.ParseXMLData=function(){bwTween.prototype.ParseXMLData.call(this);var a=$(this.m_xmlData).children("regpoint");this.m_ptSkewReg=new Point(parseFloat(a.attr("x")),parseFloat(a.attr("y")));for(var a=$(this.m_xmlData).children("path").children("segment"),b=a.length,c=null,d=0,d=0;d<b;d++){var e=a[d],f=bwTween.GetValue(this.m_oTarget,$(e).attr("startx")),g=bwTween.GetValue(this.m_oTarget,$(e).attr("starty")),h=bwTween.GetValue(this.m_oTarget,$(e).attr("dstartx")),j=bwTween.GetValue(this.m_oTarget,
$(e).attr("dstarty")),c=bwTween.GetValue(this.m_oTarget,$(e).attr("endx")),k=bwTween.GetValue(this.m_oTarget,$(e).attr("endy")),l=bwTween.GetValue(this.m_oTarget,$(e).attr("dendx")),e=bwTween.GetValue(this.m_oTarget,$(e).attr("dendy")),f=new Point(f+h,g+j),c=new Point(c+l,k+e),c=new bwSkewSegment(f,c);this.m_arrSegments.push(c);this.m_nLength+=c.getLength()}};
function bwSkewSegment(a,b){this.m_ptStart=a;this.m_ptEnd=b;this.m_nDeltaX=this.m_ptEnd.x-this.m_ptStart.x;this.m_nDeltaY=this.m_ptEnd.y-this.m_ptStart.y;this.Length=Math.sqrt(this.m_nDeltaX*this.m_nDeltaX+this.m_nDeltaY*this.m_nDeltaY)}bwSkewSegment.prototype.GetPointAtPosition=function(a){a=0==this.Length?0:a/this.Length;return new Point(this.m_ptStart.x+this.m_nDeltaX*a,this.m_ptStart.y+this.m_nDeltaY*a)};bwSkewSegment.prototype.getLength=function(){return this.Length};var bwTweenMatrix=function(a,b,c,d){this.m_arrMatrices=[];this.m_nLength=0;this.m_strFrom=c||bwTweenMatrix.FROM_NONE;this.m_nInitRotation=d||0;this.m_bZeroScaleAtEnd=!1;bwTween.call(this,a,b);this.ParseXMLData()};bwTweenMatrix.prototype=new bwTween;bwTweenMatrix.FROM_NONE="fromNone";bwTweenMatrix.FROM_SCALE="fromScale";bwTweenMatrix.FROM_SKEW="fromSkew";bwTweenMatrix.TOP_LEFT="topleft";bwTweenMatrix.TOP_RIGHT="topright";bwTweenMatrix.BOTTOM_LEFT="bottomleft";bwTweenMatrix.BOTTOM_RIGHT="bottomright";
bwTweenMatrix.DEGREE_MULTIPLIER=2*Math.PI/360;bwTweenMatrix.prototype.GetMatrixAtTime=function(a,b){var c=this.GetDistanceAtTime(this.m_nLength,a,b),d=parseInt(c),e=c-d,f=null;this.m_bZeroScaleAtEnd&&d==c?f=new MatrixTransform:(0==e&&0<d&&(d--,e=1),d<this.m_arrMatrices.length&&(f=this.m_arrMatrices[d].GetMatrixAtPosition(e)));return f};bwTweenMatrix.prototype.ModifyExistingMatrix=function(a,b,c){this.m_xmlData=a;this.m_bFromScale=b||!1;this.m_nInitRotation=c||0;this.CreateAndAddSegments($(this.m_xmlData).children("path").children("segment"))};
bwTweenMatrix.prototype.ParseXMLData=function(){bwTween.prototype.ParseXMLData.call(this);this.CreateAndAddSegments($(this.m_xmlData).children("path").children("segment"))};bwTweenMatrix.prototype.CreateAndAddSegments=function(a){for(var b=a.length,c=null,d=c=null,e=0;e<b;e++)d=e<this.m_arrMatrices.length?this.m_arrMatrices[e]:null,c=a[e],c=this.CreateMatrixSegment(c,d),this.m_arrMatrices[e]=c;this.m_nLength=Math.max(this.m_nLength,b)};
bwTweenMatrix.prototype.CreateMatrixSegment=function(a,b){var c=null;this.m_strFrom==bwTweenMatrix.FROM_SCALE?c=this.BuildSegmentFromScaleXML(a,b):this.m_strFrom==bwTweenMatrix.FROM_SKEW&&(c=this.BuildSegmentFromSkewXML(a,b));return c};
bwTweenMatrix.prototype.BuildSegmentFromScaleXML=function(a,b){var c=this.m_nInitRotation*bwTweenMatrix.DEGREE_MULTIPLIER,d="true"==a.startrelative?this.m_oTarget.scaleX:1,e="true"==a.startrelative?this.m_oTarget.scaleY:1,f=null!=b?b.MatrixStart:new MatrixTransform,g=d*(this.GetValue($(a).attr("startx"))+this.GetValue($(a).attr("dsx")))/100,h=e*(this.GetValue($(a).attr("starty"))+this.GetValue($(a).attr("dsy")))/100;if(1!=g||1!=h)f.rotate(-c),f.scale(g,h),f.rotate(c);g=null!=b?b.MatrixEnd:new MatrixTransform;
d=d*(this.GetValue($(a).attr("endx"))+this.GetValue($(a).attr("dex")))/100;e=e*(this.GetValue($(a).attr("endy"))+this.GetValue($(a).attr("dey")))/100;this.m_bZeroScaleAtEnd=0==d||0==e;if(1!=d||1!=e)g.rotate(-c),g.scale(d,e),g.rotate(c);return new bwMatrixSegment(f,g)};
bwTweenMatrix.prototype.GetSkewRotation=function(){var a=this.m_nInitRotation,b=$(this.m_xmlData).attr("corner");b==bwTweenMatrix.TOP_RIGHT&&(a+=90);b==bwTweenMatrix.TOP_LEFT?a+=180:b==bwTweenMatrix.BOTTOM_LEFT&&(a+=270);return(a+360)%360};
bwTweenMatrix.prototype.GetSkewRegPoint=function(){var a=this.GetSkewRotation(),b=this.m_oTarget.GetBoundingRect();null==b&&(b=new ppRect(0,0,this.m_oTarget.width,this.m_oTarget.height));var c=b.GetWidth(),b=b.GetHeight(),c=0.5*c,b=0.5*b,d=NaN,e=NaN;45>=a?(d=0.5*-c,e=-b):90>=a?(d=-c,e=-b):135>=a?(d=-c,e=0):180>=a?(d=0,e=b):225>=a?(d=c,e=b):270>=a?(d=c,e=0):(d=315>=a?c:0,e=-b);return{x:d,y:e}};
bwTweenMatrix.prototype.BuildSegmentFromSkewXML=function(a,b){var c=this.GetSkewRegPoint(),d=c.x,c=c.y,e=this.GetSkewRotation(),e=this.ToRadians(e),f=null!=b?b.MatrixStart:new MatrixTransform,g=this.ToRadians(this.GetValue($(a).attr("startx"))+this.GetValue($(a).attr("dstartx"))),h=this.ToRadians(this.GetValue($(a).attr("starty"))+this.GetValue($(a).attr("dstarty")));if(0!=g||0!=h){var j=this.GetValue($(a).attr("startstretchx"))/100,k=this.GetValue($(a).attr("startstretchy"))/100;f.translate(-d,-c);
f.rotate(-e);f.scale(j,k);this.SkewMatrix(f,g,h);f.rotate(e);f.translate(d,c)}g=null!=b?b.MatrixEnd:new MatrixTransform;h=this.ToRadians(this.GetValue($(a).attr("endx"))+this.GetValue($(a).attr("dendx")));j=this.ToRadians(this.GetValue($(a).attr("endy"))+this.GetValue($(a).attr("dendy")));if(0!=h||0!=j){var k=this.GetValue($(a).attr("endstretchx"))/100,l=this.GetValue($(a).attr("endstretchy"))/100;g.translate(-d,-c);g.rotate(-e);g.scale(k,l);this.SkewMatrix(g,h,j);g.rotate(e);g.translate(d,c)}return new bwMatrixSegment(f,
g)};bwTweenMatrix.prototype.ToRadians=function(a){return a*bwTweenMatrix.DEGREE_MULTIPLIER};bwTweenMatrix.prototype.SkewMatrix=function(a,b,c){var d=new MatrixTransform;d.m[1]=Math.tan(-c);d.m[2]=Math.tan(-b);a.concat(d)};
var bwMatrixSegment=function(a,b){this.MatrixStart=a;this.MatrixEnd=b;this.m_matrixDelta=MatrixTransform.fromValues(this.MatrixEnd.m[0]-this.MatrixStart.m[0],this.MatrixEnd.m[1]-this.MatrixStart.m[1],this.MatrixEnd.m[2]-this.MatrixStart.m[2],this.MatrixEnd.m[3]-this.MatrixStart.m[3],this.MatrixEnd.m[4]-this.MatrixStart.m[4],this.MatrixEnd.m[5]-this.MatrixStart.m[5])};
bwMatrixSegment.prototype.GetMatrixAtPosition=function(a){1<a&&(a=1);0>a&&(a=0);return MatrixTransform.fromValues(this.MatrixStart.m[0]+this.m_matrixDelta.m[0]*a,this.MatrixStart.m[1]+this.m_matrixDelta.m[1]*a,this.MatrixStart.m[2]+this.m_matrixDelta.m[2]*a,this.MatrixStart.m[3]+this.m_matrixDelta.m[3]*a,this.MatrixStart.m[4]+this.m_matrixDelta.m[4]*a,this.MatrixStart.m[5]+this.m_matrixDelta.m[5]*a)};function bwLineSegment(a,b,c){this.m_nAngle=this.m_nLength=0;this.m_oTarget=this.m_xmlData=this.m_ptAnchorB=this.m_ptAnchorA=this.m_grDebug=null;this.m_oTarget=a;this.m_grDebug=c;if(b)this.m_xmlData=b,this.ParseXML()}
bwLineSegment.prototype.ParseXML=function(){var a=$(this.m_xmlData).children("anchora")[0],b=$(this.m_xmlData).children("anchorb")[0];this.m_ptAnchorA=bwTweenPosition.GetPoint(this.m_oTarget,a);this.m_ptAnchorB=bwTweenPosition.GetPoint(this.m_oTarget,b);a=this.m_ptAnchorB.x-this.m_ptAnchorA.x;b=this.m_ptAnchorB.y-this.m_ptAnchorA.y;this.m_nLength=Math.sqrt(a*a+b*b);isNaN(this.m_nLength);this.m_nAngle=Math.atan((this.m_ptAnchorB.y-this.m_ptAnchorA.y)/(this.m_ptAnchorB.x-this.m_ptAnchorA.x));if(this.m_ptAnchorB.x==
this.m_ptAnchorA.x&&this.m_ptAnchorB.y==this.m_ptAnchorA.y)this.m_nAngle=0;this.m_ptAnchorB.x<this.m_ptAnchorA.x&&(this.m_nAngle+=Math.PI);this.m_grDebug&&(this.m_grDebug.lineStyle(1,16711680),this.m_grDebug.moveTo(this.m_ptAnchorA.x,this.m_ptAnchorA.y),this.m_grDebug.lineTo(this.m_ptAnchorB.x,this.m_ptAnchorB.y))};bwLineSegment.prototype.GetPointAtPosition=function(a){return new Point(this.m_ptAnchorA.x+a*Math.cos(this.m_nAngle),this.m_ptAnchorA.y+a*Math.sin(this.m_nAngle))};
bwLineSegment.prototype.GetLength=function(){return this.m_nLength};function MaskGraphics(a,b){this.context=a;this.rect=b;this.m_nYOffset=this.m_nXOffset=this.m_nCurYPos=this.m_nCurXPos=0}MaskGraphics.prototype.clear=function(){this.context.clearRect(0,0,this.rect.GetWidth(),this.rect.GetHeight())};MaskGraphics.prototype.beginFill=function(){};MaskGraphics.prototype.endFill=function(){};MaskGraphics.prototype.moveTo=function(a,b){this.context.moveTo(a+this.m_nXOffset,b+this.m_nYOffset);this.m_nCurXPos=a+this.m_nXOffset;this.m_nCurYPos=b+this.m_nYOffset};
MaskGraphics.prototype.lineTo=function(a,b){this.context.lineTo(a+this.m_nXOffset,b+this.m_nYOffset);this.m_nCurXPos=a+this.m_nXOffset;this.m_nCurYPos=b+this.m_nYOffset};MaskGraphics.prototype.curveTo=function(a,b,c,d,e){this.context.arcTo(a,b,c,d,e)};MaskGraphics.prototype.arc=function(a,b,c,d,e,f){this.context.arc(a,b,c,d,e,f)};
MaskGraphics.prototype.bezierCurveTo=function(a,b,c,d,e,f){this.context.bezierCurveTo(a+this.m_nXOffset,b+this.m_nYOffset,c+this.m_nXOffset,d+this.m_nYOffset,e+this.m_nXOffset,f+this.m_nYOffset);this.m_nCurXPos=e+this.m_nXOffset;this.m_nCurYPos=f+this.m_nYOffset};MaskGraphics.prototype.drawRect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.lineTo(a,b)};
MaskGraphics.prototype.drawEllipse=function(a,b,c,d){var e=0.5522848*(c/2),f=0.5522848*(d/2),g=a+c,h=b+d,c=a+c/2,d=b+d/2;this.moveTo(a,d);this.bezierCurveTo(a,d-f,c-e,b,c,b);this.bezierCurveTo(c+e,b,g,d-f,g,d);this.bezierCurveTo(g,d+f,c+e,h,c,h);this.bezierCurveTo(c-e,h,a,d+f,a,d)};function bwMaskBase(a,b){this.IN="in";this.OUT="out";this.VERTICAL="vertical";this.HORIZONTAL="horizontal";this.ACROSS="across";this.DOWN="down";this.VERTICAL_IN="verticalin";this.VERTICAL_OUT="verticalout";this.HORIZONTAL_IN="horizontalin";this.HORIZONTAL_OUT="horizontalout";this.FROM_BOTTOM="frombottom";this.FROM_TOP="fromtop";this.FROM_LEFT="fromleft";this.FROM_RIGHT="fromright";this.LEFT_DOWN="leftdown";this.LEFT_UP="leftup";this.RIGHT_DOWN="rightdown";this.RIGHT_UP="rightup";this.CLOCKWISE="clockwise";
this.COUNTER_CLOCKWISE="counterclockwise";this.ENTRANCE="entrance";this.EXIT="exit";this.MASK_COLOR=16711680;this.m_oTarget=a;this.m_xmlData=b;this.m_oSettings={};this.m_bExitAnimation=!1;this.ParseXMLData();this.m_clipPoints=[]}bwMaskBase.PRECOMPUTED_STEP_SIZE=0.05;bwMaskBase.prototype.Draw=function(){};
bwMaskBase.prototype.ParseXMLData=function(){var a=this;this.m_bExitAnimation=$(this.m_xmlData).attr("effecttype")==this.EXIT;this.m_oSettings={};$(this.m_xmlData).children("settings").children("setting").each(function(b,c){a.m_oSettings[$(c).attr("name")]=$(c).attr("value")})};bwMaskBase.prototype.getInverse=function(){return!1};bwMaskBase.prototype.isClipPath=function(){return!0};bwMaskBase.prototype.getExitAnimation=function(){return this.m_bExitAnimation};
bwMaskBase.prototype.getTargetRect=function(){var a=this.m_oTarget.BoundsForAnimationMask.clone();a.inflate(5,5);return a};bwMaskBase.prototype.getScaledMaskRect=function(a,b,c){isNaN(c)&&(c=b);var d=a.clone();d.inflate(0.5*-a.GetWidth()*(1-b),0.5*-a.GetHeight()*(1-c));return d};bwMaskBase.prototype.StartClipPath=function(){this.m_clipPoints=[]};bwMaskBase.prototype.AddClipPathPoint=function(a,b){this.m_clipPoints.push(a+"% "+b+"%")};
bwMaskBase.prototype.AddClipPathRect=function(a){this.AddClipPathPoint(a.left,a.top);this.AddClipPathPoint(a.right,a.top);this.AddClipPathPoint(a.right,a.bottom);this.AddClipPathPoint(a.left,a.bottom);this.AddClipPathPoint(a.left,a.top)};bwMaskBase.prototype.AddClipPathRectBounds=function(a,b,c,d){c=a+c;d=b+d;this.AddClipPathPoint(a,b);this.AddClipPathPoint(c,b);this.AddClipPathPoint(c,d);this.AddClipPathPoint(a,d);this.AddClipPathPoint(a,b)};
bwMaskBase.prototype.AddClipPathExtentsCCW=function(){this.AddClipPathPoint(0,0);this.AddClipPathPoint(0,100);this.AddClipPathPoint(100,100);this.AddClipPathPoint(100,0);this.AddClipPathPoint(0,0)};bwMaskBase.prototype.FinishClipPath=function(){return this.m_clipPoints.join(",")};bwMaskBase.prototype.GetUniqueConfigurationKey=function(a){var a=a||"",b;for(b in this.m_oSettings)a+=this.m_oSettings[b];a+=this.getExitAnimation()?"_exit":"";return a+=this.getInverse()?"_inverse":""};function bwMaskWipe(a,b){bwMaskBase.call(this,a,b)}bwMaskWipe.prototype=new bwMaskBase;
bwMaskWipe.prototype.Draw=function(a){this.getExitAnimation()&&(a=1-a);var b=this.getTargetRect(),c=b.clone();if(this.getDirection()==this.FROM_BOTTOM||this.getDirection()==this.FROM_TOP){var d=c.GetHeight(),d=d*a;this.getDirection()==this.FROM_BOTTOM&&!this.getExitAnimation()||this.getDirection()==this.FROM_TOP&&this.getExitAnimation()?(c.bottom=b.bottom,c.top=c.bottom-d):c.bottom=c.top+d}else d=c.GetWidth(),d*=a,this.getDirection()==this.FROM_RIGHT&&!this.getExitAnimation()||this.getDirection()==
this.FROM_LEFT&&this.getExitAnimation()?(c.right=b.right,c.left=c.right-d):c.right=c.left+d;a=this.m_oTarget.AnimationMask.graphics;a.clear();a.beginFill(this.MASK_COLOR,1);a.drawRect(c.left,c.top,c.GetWidth(),c.GetHeight());a.endFill()};
bwMaskWipe.prototype.GetClipPath=function(a){this.getExitAnimation()&&(a=1-a);var b=new ppRect(0,0,100,100);this.getDirection()==this.FROM_BOTTOM||this.getDirection()==this.FROM_TOP?(a*=100,this.getDirection()==this.FROM_BOTTOM&&!this.getExitAnimation()||this.getDirection()==this.FROM_TOP&&this.getExitAnimation()?b.top=100-a:b.bottom=a):(a*=100,this.getDirection()==this.FROM_RIGHT&&!this.getExitAnimation()||this.getDirection()==this.FROM_LEFT&&this.getExitAnimation()?b.left=100-a:b.right=a);this.StartClipPath();
this.AddClipPathRect(b);return this.FinishClipPath()};bwMaskWipe.prototype.getDirection=function(){return this.m_oSettings.direction};function bwMaskBlinds(a,b){bwMaskBase.call(this,a,b);this.NUM_OF_BLINDS=6}bwMaskBlinds.prototype=new bwMaskBase;
bwMaskBlinds.prototype.Draw=function(a){this.getExitAnimation()&&(a=1-a);var b=this.getTargetRect(),c=b.GetWidth()/(!this.getVertical()?1:this.NUM_OF_BLINDS),d=b.GetHeight()/(this.getVertical()?1:this.NUM_OF_BLINDS),e=this.m_oTarget.AnimationMask.graphics;e.clear();e.beginFill(this.MASK_COLOR,1);for(var f=0;f<this.NUM_OF_BLINDS;f++){var g=!this.getVertical()?b.left:b.left+c*f,h=this.getVertical()?b.top:b.top+d*f,j=!this.getVertical()?b.GetWidth():c*a,k=this.getVertical()?b.GetHeight():d*a;e.drawRect(g,
h,j,k)}e.endFill()};bwMaskBlinds.prototype.GetClipPath=function(a){this.getExitAnimation()&&(a=1-a);var b=new ppRect(0,0,100,100),c=100/(!this.getVertical()?1:this.NUM_OF_BLINDS),d=100/(this.getVertical()?1:this.NUM_OF_BLINDS);this.StartClipPath();for(var e=0;e<this.NUM_OF_BLINDS;e++){var f=!this.getVertical()?b.left:b.left+c*e,g=this.getVertical()?b.top:b.top+d*e,h=!this.getVertical()?b.GetWidth():c*a,j=this.getVertical()?b.GetHeight():d*a;this.AddClipPathRect(new ppRect(f,g,f+h,g+j))}return this.FinishClipPath()};
bwMaskBlinds.prototype.getVertical=function(){return this.m_oSettings.direction==this.VERTICAL};function bwMaskBox(a,b){bwMaskBase.call(this,a,b)}bwMaskBox.prototype=new bwMaskBase;
bwMaskBox.prototype.Draw=function(a){var b=this.getInverse();b&&(a=1-a);this.getExitAnimation()&&(b=!b);var c=this.getTargetRect(),a=this.getScaledMaskRect(c,a),d=this.m_oTarget.AnimationMask.graphics;d.clear();d.beginFill(this.MASK_COLOR,1);b?(d.drawRect(c.left,c.top,a.right-c.left,a.top-c.top),d.drawRect(a.right,c.top,c.right-a.right,a.bottom-c.top),d.drawRect(a.left,a.bottom,c.right-a.left,c.bottom-a.bottom),d.drawRect(c.left,a.top,a.left-c.left,c.bottom-a.top)):d.drawRect(a.left,a.top,a.GetWidth(),
a.GetHeight());d.endFill()};bwMaskBox.prototype.GetClipPath=function(a){var b=this.getInverse();b&&(a=1-a);this.getExitAnimation()&&(b=!b);a=this.getScaledMaskRect(new ppRect(0,0,100,100),a);this.StartClipPath();b&&this.AddClipPathExtentsCCW();this.AddClipPathRect(a);return this.FinishClipPath()};bwMaskBox.prototype.getInverse=function(){return this.m_oSettings.direction==this.IN};function bwMaskCheckerboard(a,b){this.NUM_OF_ROWS=this.NUM_OF_COLS=6;this.NUM_OF_ROWS=this.NUM_OF_COLS=16;this.m_maskMethod=this.MASK_IMAGE;bwMaskBase.call(this,a,b)}bwMaskCheckerboard.prototype=new bwMaskBase;bwMaskCheckerboard.prototype.isClipPath=function(){return!1};
bwMaskCheckerboard.prototype.GetClipPath=function(a){this.getExitAnimation()&&(a=1-a);var b=new ppRect(0,0,100,100),c=b.GetWidth()/this.NUM_OF_COLS,d=b.GetHeight()/this.NUM_OF_ROWS;this.StartClipPath();if(this.getAcross())for(var e=0;e<this.NUM_OF_COLS;e+=2)for(var f=0;f<this.NUM_OF_ROWS;f++){var g=1==f%2?e+1:e,g=b.left+c*g,h=b.top+d*f;this.AddClipPathRectBounds(g,h,Math.min(c,2*c*a),d);0.5<a&&(g=0==f%2?e+1:e,g=b.left+c*g,this.AddClipPathRectBounds(g,h,c*(2*a-1),d))}else for(f=0;f<this.NUM_OF_ROWS;f+=
2)for(e=0;e<this.NUM_OF_COLS;e++)g=b.left+c*e,h=1==e%2?f+1:f,h=b.top+d*h,this.AddClipPathRectBounds(g,h,c,Math.min(d,2*d*a)),0.5<a&&(h=0==e%2?f+1:f,h=b.top+d*h,this.AddClipPathRectBounds(g,h,c,d*(2*a-1)));return this.FinishClipPath()};
bwMaskCheckerboard.prototype.Draw=function(a){if(this.getExitAnimation()&&0.9<a){var b=this.m_oTarget.AnimationMask.graphics;b.clear()}else{this.getExitAnimation()&&(a=1-a);var c=this.getTargetRect(),d=c.GetWidth()/this.NUM_OF_COLS,e=c.GetHeight()/this.NUM_OF_ROWS,b=this.m_oTarget.AnimationMask.graphics;b.clear();b.beginFill(this.MASK_COLOR,1);if(this.getAcross())for(var f=0;f<this.NUM_OF_COLS;f+=2)for(var g=0;g<this.NUM_OF_ROWS;g++){var h=1==g%2?f+1:f,h=c.left+d*h,j=c.top+e*g;b.drawRect(h,j,Math.min(d,
2*d*a),e);0.5<a&&(h=0==g%2?f+1:f,h=c.left+d*h,b.drawRect(h,j,d*(2*a-1),e))}else for(g=0;g<this.NUM_OF_ROWS;g+=2)for(f=0;f<this.NUM_OF_COLS;f++)h=c.left+d*f,j=1==f%2?g+1:g,j=c.top+e*j,b.drawRect(h,j,d,Math.min(e,2*e*a)),0.5<a&&(j=0==f%2?g+1:g,j=c.top+e*j,b.drawRect(h,j,d,e*(2*a-1)));b.endFill()}};bwMaskCheckerboard.prototype.getAcross=function(){return this.m_oSettings.direction==this.ACROSS};function bwMaskCircle(a,b){bwMaskBase.call(this,a,b)}bwMaskCircle.prototype=new bwMaskBase;
bwMaskCircle.prototype.Draw=function(a){var b=this.getInverse();b&&(a=1-a);this.getExitAnimation()&&(b=!b);var c=this.getTargetRect(),d=c.GetWidth()*a,e=c.GetHeight()*a,d=d/2,f=e/2,e=Math.sqrt(f*f+d*d),g=this.getScaledMaskRect(c,a),a=this.m_oTarget.AnimationMask.graphics;a.clear();a.beginFill(this.MASK_COLOR,1);b?(b=g.left+d,d=g.top+f,f=Math.PI/2,a.moveTo(c.left,c.top),a.lineTo(c.left,d),a.arc(b,d,e,2*f,3*f,!1),a.lineTo(b,c.top),a.lineTo(c.left,c.top),a.moveTo(c.right,c.top),a.lineTo(b,c.top),a.arc(b,
d,e,3*f,4*f,!1),a.lineTo(c.right,d),a.lineTo(c.right,c.top),a.moveTo(c.right,c.bottom),a.lineTo(c.right,d),a.arc(b,d,e,0*f,1*f,!1),a.lineTo(b,c.bottom),a.lineTo(c.right,c.bottom),a.moveTo(c.left,c.bottom),a.lineTo(b,c.bottom),a.arc(b,d,e,1*f,2*f,!1),a.lineTo(c.left,d),a.lineTo(c.left,c.bottom)):a.context.arc(g.left+d,g.top+f,e,0,2*Math.PI,!1);a.endFill()};
bwMaskCircle.prototype.GetClipPath=function(a){function b(a){var b=e+Math.cos(a)*f,a=nCenterY-Math.sin(a)*f;g.AddClipPathPoint(b,a)}if(1==a)return"";var c=this.getInverse();c&&(a=1-a);this.getExitAnimation()&&(c=!c);var d=this.getScaledMaskRect(new ppRect(0,0,100,100),a),e=nCenterY=50,a=d.GetWidth()/2,d=d.GetHeight()/2,f=Math.sqrt(a*a+d*d);this.StartClipPath();c&&this.AddClipPathExtentsCCW();for(var c=0,a=2*Math.PI/30,g=this,d=0;30>d;d++)b(c),c-=a;b(0);return this.FinishClipPath()};
bwMaskCircle.prototype.drawEllipse=function(a,b,c,d){var e=Math.PI/4,f=Math.PI/8,g=2-Math.cos(f),h=c*g,g=d*g,j=this.getTargetRect(),k=this.m_oTarget.AnimationMask.graphics;k.moveTo(j.left,b+0.1);k.lineTo(j.left,j.bottom);k.lineTo(j.right,j.bottom);k.lineTo(j.right,b+0.1);k.lineTo(a+c,b+0.1);for(var l=1;4>=l;l++){var m=l*e,n=c*Math.cos(m),p=d*Math.sin(m),m=m-f,o=h*Math.cos(m),m=g*Math.sin(m);k.curveTo(a+o,b+m+0.1,a+n,b+p+0.1,c)}k.lineTo(j.left,b+0.1);k.moveTo(j.right,b);k.lineTo(j.right,j.top);k.lineTo(j.left,
j.top);k.lineTo(j.left,b);k.lineTo(a-c,b);for(l=5;8>=l;l++)m=l*e,n=c*Math.cos(m),p=d*Math.sin(m),m-=f,o=h*Math.cos(m),m=g*Math.sin(m),k.curveTo(a+o,b+m,a+n,b+p,c);k.lineTo(j.right,b)};bwMaskCircle.prototype.getInverse=function(){return this.m_oSettings.direction==this.IN};function bwMaskDiamond(a,b){bwMaskBase.call(this,a,b)}bwMaskDiamond.prototype=new bwMaskBase;
bwMaskDiamond.prototype.Draw=function(a){var b=this.getInverse();b&&(a=1-a);this.getExitAnimation()&&(b=!b);var c=this.getTargetRect(),d=c.GetWidth()*a,e=c.GetHeight()*a,a=c.left+c.GetWidth()/2,f=c.top+c.GetHeight()/2,d=new ppRect(a-d,f-e,a+d,f+e),e=this.m_oTarget.AnimationMask.graphics;e.clear();e.beginFill(this.MASK_COLOR,1);b?(e.moveTo(c.left,c.top),e.lineTo(a,c.top),e.lineTo(a,d.top),e.lineTo(d.left,f),e.lineTo(c.left,f),e.lineTo(c.left,c.top),e.moveTo(a,c.top),e.lineTo(c.right,c.top),e.lineTo(c.right,
f),e.lineTo(d.right,f),e.lineTo(a,d.top),e.lineTo(a,c.top),e.moveTo(c.right,f),e.lineTo(c.right,c.bottom),e.lineTo(a,c.bottom),e.lineTo(a,d.bottom),e.lineTo(d.right,f),e.lineTo(c.right,f),e.moveTo(c.left,f),e.lineTo(d.left,f),e.lineTo(a,d.bottom),e.lineTo(a,c.bottom),e.lineTo(c.left,c.bottom),e.lineTo(c.left,f)):(e.moveTo(a,d.top),e.lineTo(d.right,f),e.lineTo(a,d.bottom),e.lineTo(d.left,f),e.lineTo(a,d.top));e.endFill()};
bwMaskDiamond.prototype.GetClipPath=function(a){var b=this.getInverse();b&&(a=1-a);this.getExitAnimation()&&(b=!b);var a=Math.min(a,1),a=Math.max(a,0),c=new ppRect(0,0,100,100),d=c.GetWidth()*a,a=c.GetHeight()*a,d=new ppRect(50-d,50-a,50+d,50+a);this.StartClipPath();b&&this.AddClipPathExtentsCCW();this.AddClipPathPoint(50,d.top);this.AddClipPathPoint(d.right,50);this.AddClipPathPoint(50,d.bottom);this.AddClipPathPoint(d.left,50);this.AddClipPathPoint(50,d.top);return this.FinishClipPath()};
bwMaskDiamond.prototype.getInverse=function(){return this.m_oSettings.direction==this.IN};function bwMaskDissolve(a,b){this.MIN_BLOCK_SIZE=3;this.MAX_BYTE=255;this.MAX_COLS=this.MAX_ROWS=this.MAX_BYTE=20;this.DISSOLVE_LEVELS=this.InitDissolveLevels();this.m_nPreviousPercent=0;bwMaskBase.call(this,a,b)}bwMaskDissolve.prototype=new bwMaskBase;bwMaskDissolve.prototype.InitDissolveLevels=function(){for(var a=[],b=[],c=0;c<=this.MAX_COLS;++c)b.push(c);for(c=0;c<=this.MAX_ROWS;++c)for(var d=b.slice();0<d.length;){var e=Math.floor(Math.random()*d.length),e=d.splice(e,1);a.push(e[0])}return a};
bwMaskDissolve.prototype.isClipPath=function(){return!1};
bwMaskDissolve.prototype.Draw=function(a){var b=this.m_oTarget.AnimationMask.graphics,c;if(this.getExitAnimation()){if(a=1-a,b.clear(),0>=a)return}else{if(1<=a){b.clear();b.beginFill(this.MASK_COLOR,1);b.drawRect(0,0,100,100);b.endFill();return}if(0>=a){b.clear();return}c=0<a&&a>=this.m_nPreviousPercent?Math.ceil(this.MAX_LEVEL*this.m_nPreviousPercent):-1;0>=c&&b.clear()}c=Math.round(this.MAX_BYTE*a);var d=this.getTargetRect(),e=Math.min(this.MAX_BYTE,Math.floor(d.GetWidth()/this.MIN_BLOCK_SIZE)),
f=Math.min(this.MAX_BYTE,Math.floor(d.GetHeight()/this.MIN_BLOCK_SIZE)),g=d.GetWidth()/e,h=d.GetHeight()/f;b.beginFill(this.MASK_COLOR,1);for(var j=0;j<f;j++)for(var k=d.top+h*j,l=j*this.MAX_BYTE,m=0;m<e;m++)this.DISSOLVE_LEVELS[l+m]<=c&&b.drawRect(d.left+g*m,k,g,h);b.endFill();this.m_nPreviousPercent=a};
bwMaskDissolve.prototype.GetClipPath=function(a){var b=a>=this.m_nPreviousPercent?Math.round(this.MAX_BYTE*this.m_nPreviousPercent):0,c=Math.round(this.MAX_BYTE*a),d=this.getTargetRect(),e=Math.min(this.MAX_BYTE,Math.floor(d.GetWidth()/this.MIN_BLOCK_SIZE)),f=Math.min(this.MAX_BYTE,Math.floor(d.GetHeight()/this.MIN_BLOCK_SIZE)),g=d.GetWidth()/e,h=d.GetHeight()/f;this.StartClipPath();this.m_clipPoints.push("evenodd");for(var j=0;j<f;j++)for(var k=d.top+h*j,l=j*this.MAX_BYTE,m=0;m<e;m++){var n=this.DISSOLVE_LEVELS[l+
m];n>b&&n<=c&&this.AddClipPathRectBounds(d.left+g*m,k,g,h)}this.m_nPreviousPercent=a;return this.FinishClipPath()};function bwMaskFull(a,b){bwMaskBase.call(this,a,b)}bwMaskFull.prototype=new bwMaskBase;bwMaskFull.prototype.Draw=function(a){if(this.getExitAnimation()&&0.99<a)a=this.m_oTarget.AnimationMask.graphics,a.clear();else{var b=this.m_oTarget.BoundsForAnimationMask.clone(),a=this.m_oTarget.AnimationMask.graphics;a.clear();a.beginFill(this.MASK_COLOR,1);a.drawRect(b.left,b.top,b.GetWidth(),b.GetHeight());a.endFill()}};
bwMaskFull.prototype.GetClipPath=function(a){this.StartClipPath();this.getExitAnimation()&&1==a?this.AddClipPathRectBounds(0,0,0,0):this.AddClipPathRectBounds(0,0,100,100);return this.FinishClipPath()};function bwMaskPlus(a,b){bwMaskBase.call(this,a,b)}bwMaskPlus.prototype=new bwMaskBase;
bwMaskPlus.prototype.Draw=function(a){var b=this.getInverse();b&&(a=1-a);this.getExitAnimation()&&(b=!b);var c=this.getTargetRect(),a=this.getScaledMaskRect(c,a),d=this.m_oTarget.AnimationMask.graphics;d.clear();d.beginFill(this.MASK_COLOR,1);b?(d.drawRect(c.left,c.top,a.left-c.left,a.top-c.top),d.drawRect(a.right,c.top,c.right-a.right,a.top-c.top),d.drawRect(a.right,a.bottom,c.right-a.right,c.bottom-a.bottom),d.drawRect(c.left,a.bottom,a.left-c.left,c.bottom-a.bottom)):(d.moveTo(a.left,c.top),d.lineTo(a.right,
c.top),d.lineTo(a.right,a.top),d.lineTo(c.right,a.top),d.lineTo(c.right,a.bottom),d.lineTo(a.right,a.bottom),d.lineTo(a.right,c.bottom),d.lineTo(a.left,c.bottom),d.lineTo(a.left,a.bottom),d.lineTo(c.left,a.bottom),d.lineTo(c.left,a.top),d.lineTo(a.left,a.top),d.lineTo(a.left,c.top));d.endFill()};
bwMaskPlus.prototype.GetClipPath=function(a){var b=this.getInverse();b&&(a=1-a);this.getExitAnimation()&&(b=!b);var c=new ppRect(0,0,100,100),a=this.getScaledMaskRect(c,a);this.StartClipPath();b&&this.AddClipPathExtentsCCW();this.AddClipPathPoint(a.left,c.top);this.AddClipPathPoint(a.right,c.top);this.AddClipPathPoint(a.right,a.top);this.AddClipPathPoint(c.right,a.top);this.AddClipPathPoint(c.right,a.bottom);this.AddClipPathPoint(a.right,a.bottom);this.AddClipPathPoint(a.right,c.bottom);this.AddClipPathPoint(a.left,
c.bottom);this.AddClipPathPoint(a.left,a.bottom);this.AddClipPathPoint(c.left,a.bottom);this.AddClipPathPoint(c.left,a.top);this.AddClipPathPoint(a.left,a.top);this.AddClipPathPoint(a.left,c.top);return this.FinishClipPath()};bwMaskPlus.prototype.getInverse=function(){return this.m_oSettings.direction==this.IN};function bwMaskRandomBars(a,b){bwMaskBase.call(this,a,b);this.MAX_BARS=1E3;this.BAR_MIN=1;this.Init()}bwMaskRandomBars.prototype=new bwMaskBase;bwMaskRandomBars.prototype.Draw=bwMaskFull.prototype.Draw;
bwMaskRandomBars.prototype.GetClipPath=function(a){this.getExitAnimation()&&(a=1-a);var b=new ppRect(0,0,100,100);this.StartClipPath();if(0==a)return this.AddClipPathRectBounds(0,0,0,0),this.FinishClipPath();if(1==a)return this.AddClipPathRect(b),this.FinishClipPath();for(var a=Math.floor(this.m_nBars*a),c=0;c<a;++c){var d=this.m_arrShuffledIndices[c];this.m_oSettings.direction==this.HORIZONTAL?this.AddClipPathRectBounds(b.left,b.top+d*this.m_nBarSize,b.GetWidth(),this.m_nBarSize):this.AddClipPathRectBounds(b.left+
d*this.m_nBarSize,b.top,this.m_nBarSize,b.GetHeight())}return this.FinishClipPath()};
bwMaskRandomBars.prototype.Init=function(){var a=new ppRect(0,0,100,100);switch(this.m_oSettings.direction){case this.HORIZONTAL:this.m_nBarSize=Math.max(this.BAR_MIN,Math.ceil(a.GetHeight()/this.MAX_BARS));this.m_nBars=Math.ceil(a.GetHeight()/this.m_nBarSize);break;default:this.m_nBarSize=Math.max(this.BAR_MIN,Math.ceil(a.GetWidth()/this.MAX_BARS)),this.m_nBars=Math.ceil(a.GetWidth()/this.m_nBarSize)}for(var a=Array(this.m_nBars),b=0;b<this.m_nBars;b++)a[b]=b;for(var c=Array(this.m_nBars),d=0,b=
0;b<this.m_nBars;b++)d=parseInt(Math.random()*a.length),c[b]=a.splice(d,1)[0];this.m_arrShuffledIndices=c};function bwMaskSplit(a,b){bwMaskBase.call(this,a,b)}bwMaskSplit.prototype=new bwMaskBase;bwMaskSplit.prototype.GetClipPath=function(a){var b=this.getInverse();b&&(a=1-a);this.getExitAnimation()&&(b=!b);var c=new ppRect(0,0,100,100),d=!this.getVertical()?1:a,a=this.getVertical()?1:a,c=this.getScaledMaskRect(c,d,a);this.StartClipPath();b&&this.AddClipPathExtentsCCW();this.AddClipPathRect(c);return this.FinishClipPath()};
bwMaskSplit.prototype.Draw=function(a){var b=this.getInverse();b&&(a=1-a);this.getExitAnimation()&&(b=!b);var c=this.getTargetRect(),d=!this.getVertical()?1:a,e=this.getVertical()?1:a,f=this.getScaledMaskRect(c,d,e),a=this.m_oTarget.AnimationMask.graphics;a.clear();a.beginFill(this.MASK_COLOR,1);b?(b=1==d?c.GetWidth():f.left-c.left,d=1==e?c.GetHeight():f.top-c.top,a.drawRect(c.left,c.top,b,d),a.drawRect(c.right-b,c.bottom-d,b,d)):a.drawRect(f.left,f.top,f.GetWidth(),f.GetHeight());a.endFill()};
bwMaskSplit.prototype.getInverse=function(){return this.getDirection()==this.VERTICAL_IN||this.getDirection()==this.HORIZONTAL_IN};bwMaskSplit.prototype.getVertical=function(){return this.getDirection()==this.VERTICAL_IN||this.getDirection()==this.VERTICAL_OUT};bwMaskSplit.prototype.getDirection=function(){return this.m_oSettings.direction};function bwMaskStrips(a,b){bwMaskBase.call(this,a,b);this.NUM_OF_ROWS=20;this.MIN_ROW_HEIGHT=10;this.MAX_ROW_HEIGHT=30}bwMaskStrips.prototype=new bwMaskBase;bwMaskStrips.prototype.Draw=bwMaskFull.prototype.Draw;
bwMaskStrips.prototype.GetClipPath=function(a){this.getExitAnimation()&&(a=1-a);var b=new ppRect(0,0,100,100),c=Math.max(this.MIN_ROW_HEIGHT,Math.min(this.MAX_ROW_HEIGHT,b.GetHeight(),Math.ceil(b.GetHeight()/this.NUM_OF_ROWS))),d=Math.ceil(b.GetHeight()/c),e=b.GetWidth()+d*c,f=this.m_oSettings.direction==this.LEFT_DOWN||this.m_oSettings.direction==this.LEFT_UP,g=this.m_oSettings.direction==this.LEFT_DOWN||this.m_oSettings.direction==this.RIGHT_DOWN,h=f?b.right:b.left,j=g?b.top:b.bottom;this.StartClipPath();
this.AddClipPathPoint(h,j);for(var k=0;k<d;k++){var l=k*c,m=e*a-l,m=f?Math.max(b.left,b.right-m):Math.min(b.right,b.left+m);if(!f&&m<h||f&&m>h)break;var l=g?b.top+l:b.bottom-l,n=g?Math.min(b.bottom,l+c):Math.min(b.bottom,l-c);this.AddClipPathPoint(m,l);this.AddClipPathPoint(m,n)}this.AddClipPathPoint(h,n);this.AddClipPathPoint(h,j);return this.FinishClipPath()};function bwMaskWedge(a,b){bwMaskBase.call(this,a,b)}bwMaskWedge.prototype=new bwMaskBase;
bwMaskWedge.prototype.Draw=function(a){this.getExitAnimation()&&(a=1-a);var b=this.getTargetRect(),c=b.GetWidth()/2,d=b.GetHeight()/2,e=b.left+c,b=b.top+d,c=Math.sqrt(c*c+d*d),d=this.m_oTarget.AnimationMask.graphics;d.clear();d.beginFill(this.MASK_COLOR,1);d.moveTo(e,b);var f=2*Math.PI*a,a=Math.PI/2-Math.PI*a,g=e+Math.cos(a)*c,h=b-Math.sin(a)*c;d.lineTo(g,h);g=Math.ceil(Math.abs(f)/(Math.PI/4));f/=g;for(h=0;h<g;h++){var a=a+f,j=e+Math.cos(a)*c,k=b-Math.sin(a)*c,l=a-f/2,m=e+Math.cos(l)*(c/Math.cos(f/
2)),l=b-Math.sin(l)*(c/Math.cos(f/2));d.curveTo(m,l,j,k,c)}d.lineTo(e,b);d.endFill()};
bwMaskWedge.prototype.GetClipPath=function(a){this.getExitAnimation()&&(a=1-a);var b=new ppRect(0,0,100,100),c=b.GetWidth()/2,d=b.GetHeight()/2,e=b.left+c,b=b.top+d,c=Math.sqrt(c*c+d*d),c=1.5*c;this.StartClipPath();this.AddClipPathPoint(e,b);var f=2*Math.PI*a,d=Math.PI/2,d=d+(this.getExitAnimation()?Math.PI*(1-a):-Math.PI*a),a=e+Math.cos(d)*c,g=b-Math.sin(d)*c;this.AddClipPathPoint(a,g);a=Math.ceil(Math.abs(f)/(Math.PI/4));f/=a;for(g=0;g<a;g++){var d=d+f,h=e+Math.cos(d)*c,j=b-Math.sin(d)*c,k=d-f/
2;Math.cos(k);Math.cos(f/2);Math.sin(k);Math.cos(f/2);this.AddClipPathPoint(h,j)}this.AddClipPathPoint(e,b);return this.FinishClipPath()};function bwMaskWheel(a,b){bwMaskBase.call(this,a,b)}bwMaskWheel.prototype=new bwMaskBase;bwMaskWheel.prototype.Draw=function(a){var b=this.getTargetRect(),c=b.GetWidth()/2,d=b.GetHeight()/2,e=b.left+c,b=b.top+d,c=Math.sqrt(c*c+d*d),d=parseInt(this.m_oSettings.spokes),d=2*Math.PI/d,f=this.m_oTarget.AnimationMask.graphics;f.clear();for(var g=0;g<this.nSpokes;g++)this.drawWedge(f,e,b,c,Math.PI/2-d*(g+a),d*a)};
bwMaskWheel.prototype.drawWedge=function(a,b,c,d,e,f){a.beginFill(this.MASK_COLOR,1);a.moveTo(b,c);var g=b+Math.cos(e)*d,h=c-Math.sin(e)*d;a.lineTo(g,h);g=Math.ceil(Math.abs(f)/(Math.PI/4));f/=g;for(h=0;h<g;h++){var e=e+f,j=b+Math.cos(e)*d,k=c-Math.sin(e)*d,l=e-f/2,m=b+Math.cos(l)*(d/Math.cos(f/2)),l=c-Math.sin(l)*(d/Math.cos(f/2));a.curveTo(m,l,j,k,d)}a.lineTo(b,c);a.endFill()};
bwMaskWheel.prototype.GetClipPath=function(a){var b=new ppRect(0,0,100,100),c=b.GetWidth()/2,d=b.GetHeight()/2,e=b.left+c,b=b.top+d,c=Math.sqrt(c*c+d*d),d=parseInt(this.m_oSettings.spokes),f=2*Math.PI/d,c=1.5*c;this.StartClipPath();for(var g=0;g<d;g++)nStartAngle=Math.PI/2-f*(this.getCounterClockwise()?g:g+a),this.getExitAnimation()?this.AddWedgeClipPath(e,b,c,Math.PI-nStartAngle,f*(1-a)):this.AddWedgeClipPath(e,b,c,nStartAngle,f*a);return this.FinishClipPath()};
bwMaskWheel.prototype.AddWedgeClipPath=function(a,b,c,d,e){this.AddClipPathPoint(a,b);var f=a+Math.cos(d)*c,g=b-Math.sin(d)*c;this.AddClipPathPoint(f,g);f=Math.ceil(Math.abs(e)/(Math.PI/4));e/=f;for(g=0;g<f;g++){var d=d+e,h=a+Math.cos(d)*c,j=b-Math.sin(d)*c,k=d-e/2;Math.cos(k);Math.cos(e/2);Math.sin(k);Math.cos(e/2);this.AddClipPathPoint(h,j)}this.AddClipPathPoint(a,b)};
bwMaskWheel.prototype.getCounterClockwise=function(){var a=this.m_oSettings.direction!=this.CLOCKWISE;return this.getExitAnimation()?!a:a};function bwTweenMask(a,b){this.m_strType="";this.m_shMask=null;this.m_bTextOnly=this.m_bShowAnimationMask=!1;this.m_nStartTime=0;bwTween.call(this,a,b);this.ParseXMLData()}bwTweenMask.prototype=new bwTween;bwTweenMask.TweenType={};bwTweenMask.TweenType.BLINDS="blinds";bwTweenMask.TweenType.BOX="box";bwTweenMask.TweenType.CHECKERBOARD="checkerboard";bwTweenMask.TweenType.CIRCLE="circle";bwTweenMask.TweenType.CLOCK="clock";bwTweenMask.TweenType.COMB="comb";bwTweenMask.TweenType.DIAMOND="diamond";
bwTweenMask.TweenType.DISSOLVE="dissolve";bwTweenMask.TweenType.FULL="full";bwTweenMask.TweenType.PLUS="plus";bwTweenMask.TweenType.RANDOM_BARS="randombars";bwTweenMask.TweenType.SPLIT="split";bwTweenMask.TweenType.STRIPS="strips";bwTweenMask.TweenType.WEDGE="wedge";bwTweenMask.TweenType.WHEEL="wheel";bwTweenMask.TweenType.WIPE="wipe";bwTweenMask.CLASSES={};bwTweenMask.CLASSES[bwTweenMask.TweenType.BLINDS]=bwMaskBlinds;bwTweenMask.CLASSES[bwTweenMask.TweenType.BOX]=bwMaskBox;
bwTweenMask.CLASSES[bwTweenMask.TweenType.CHECKERBOARD]=bwMaskCheckerboard;bwTweenMask.CLASSES[bwTweenMask.TweenType.CIRCLE]=bwMaskCircle;bwTweenMask.CLASSES[bwTweenMask.TweenType.DIAMOND]=bwMaskDiamond;bwTweenMask.CLASSES[bwTweenMask.TweenType.DISSOLVE]=bwMaskDissolve;bwTweenMask.CLASSES[bwTweenMask.TweenType.FULL]=bwMaskFull;bwTweenMask.CLASSES[bwTweenMask.TweenType.PLUS]=bwMaskPlus;bwTweenMask.CLASSES[bwTweenMask.TweenType.RANDOM_BARS]=bwMaskRandomBars;
bwTweenMask.CLASSES[bwTweenMask.TweenType.SPLIT]=bwMaskSplit;bwTweenMask.CLASSES[bwTweenMask.TweenType.STRIPS]=bwMaskStrips;bwTweenMask.CLASSES[bwTweenMask.TweenType.WEDGE]=bwMaskWedge;bwTweenMask.CLASSES[bwTweenMask.TweenType.WHEEL]=bwMaskWheel;bwTweenMask.CLASSES[bwTweenMask.TweenType.WIPE]=bwMaskWipe;
-1<location.href.indexOf("forcemasks=1")&&(bwTweenMask.CLASSES[bwTweenMask.TweenType.BLINDS]=bwMaskBlinds,bwTweenMask.CLASSES[bwTweenMask.TweenType.BOX]=bwMaskBox,bwTweenMask.CLASSES[bwTweenMask.TweenType.CHECKERBOARD]=bwMaskCheckerboard,bwTweenMask.CLASSES[bwTweenMask.TweenType.CIRCLE]=bwMaskCircle,bwTweenMask.CLASSES[bwTweenMask.TweenType.DIAMOND]=bwMaskDiamond,bwTweenMask.CLASSES[bwTweenMask.TweenType.DISSOLVE]=bwMaskDissolve,bwTweenMask.CLASSES[bwTweenMask.TweenType.FULL]=bwMaskFull,bwTweenMask.CLASSES[bwTweenMask.TweenType.PLUS]=
bwMaskPlus,bwTweenMask.CLASSES[bwTweenMask.TweenType.SPLIT]=bwMaskSplit,bwTweenMask.CLASSES[bwTweenMask.TweenType.WEDGE]=bwMaskWedge,bwTweenMask.CLASSES[bwTweenMask.TweenType.WHEEL]=bwMaskWheel,bwTweenMask.CLASSES[bwTweenMask.TweenType.WIPE]=bwMaskWipe);bwTweenMask.prototype.get_StartTime=function(){return this.m_nStartTime};bwTweenMask.prototype.set_StartTime=function(a){this.m_nStartTime=a};bwTweenMask.prototype.get_TextOnly=function(){return this.m_bTextOnly};
bwTweenMask.prototype.set_TextOnly=function(a){this.m_bTextOnly=a};bwTweenMask.prototype.toString=function(){return"bwTweenMask:: Type: "+this.m_strType};bwTweenMask.prototype.get_Type=function(){return this.m_strType};bwTweenMask.prototype.get_ShowAnimationMask=function(){return this.m_bShowAnimationMask};bwTweenMask.prototype.DrawMaskAtTime=function(a,b){this.m_shMask.Draw(this.GetDistanceAtTime(1,a,b));this.m_oTarget.ApplyAnimationMask(this.m_bShowAnimationMask)};
bwTweenMask.prototype.ParseXMLData=function(){bwTween.prototype.ParseXMLData.call(this);this.m_strType=$(this.m_xmlData).attr("type");this.m_bShowAnimationMask="true"==this.m_xmlData.showanimationmask;this.m_strType&&bwTweenMask.CLASSES.hasOwnProperty(this.m_strType)?this.m_shMask=new bwTweenMask.CLASSES[this.m_strType](this.m_oTarget,this.m_xmlData):(this.m_strType=bwTweenMask.TweenType.FULL,this.m_shMask=new bwTweenMask.CLASSES[bwTweenMask.TweenType.FULL](this.m_oTarget,this.m_xmlData))};var Quiz=function(){this.xml="";this.sliderefs=[];this.quizrefs=[];this.constructElement();this.variables.Score=0;this.attemptCount=this.variables.PercentScore=0;this.m_bCompleted=this.m_bEvaluated=!1};Quiz.prototype=new Element;Quiz.prototype.objectType="Quiz";Quiz.prototype.innerType="Quiz";Quiz.prototype.toBaseData=Element.prototype.toData;Quiz.prototype.toData=function(){var a=this.toBaseData();if(0<this.attemptCount)a.attemptCount=this.attemptCount;return a};
Quiz.prototype.updateBaseFromData=Element.prototype.updateFromData;Quiz.prototype.updateFromData=function(a){this.updateBaseFromData(a);if(a.attemptCount)this.attemptCount=a.attemptCount};Quiz.prototype.SetResumeData=function(a){this.m_bEvaluated="1"==a.substr(0,1);this.m_bCompleted="1"==a.substr(1,1)};Quiz.prototype.GetResumeData=function(){var a;a=""+(this.m_bEvaluated?"1":"0");return a+=this.m_bCompleted?"1":"0"};
Quiz.prototype.loadFromXML=function(a,b){var c=this;this.parent=b;this.children={};this.id=$(a).attr("id");this.lmstext=$(a).attr("lmstext");this.issurvey="true"==$(a).attr("issurvey");this.passpercent=$(a).attr("passpercent");this.submitall=$(a).attr("submitall");this.submitunanswered=$(a).attr("submitunanswered");this.scoretype=$(a).attr("scoretype");this.variables.PassPercent=this.passpercent;this.variables.PassScore=0;this.loadElementInfoFromXML(a);$(a).children("sliderefs").children("slideref").each(function(a,
b){var d=$(b).attr("id");c.sliderefs.push(d);c.parseObjref(d).target.quiz=c});$(a).children("quizrefs").children("quizref").each(function(a,b){var d={id:$(b).attr("id"),weight:parseInt($(b).attr("weight")),mustpass:"true"==$(b).attr("id")};c.quizrefs.push(d)});if(b.g_listQuizzes){var d=new QuizData(this.id,this.lmstext);d.nPassingScore=this.passpercent;b.g_listQuizzes[this.id]=d}};
Quiz.prototype.AllQuestionsSubmitted=function(a){if(this.m_bCompleted)return"true";var b=!0;$.each(this.sliderefs,function(c,d){var e=story.parseObjref(d).target;if(e){var f=function(c){b=b&&c.isAnswered();a||(b=b&&c.isSubmitted())};"SlideDraw"==e.innerType?$.each(e.children,function(a,b){f(b)}):f(e)}});return b?"true":"false"};Quiz.prototype.AllQuestionsAnswered=function(){return this.AllQuestionsSubmitted(!0)};Quiz.prototype.QuizComplete=function(){return this.m_bCompleted?"true":"false"};
Quiz.SEARCH_UNANSWERED="SEARCH_UNANSWERED";Quiz.SEARCH_UNSUBMITTED="SEARCH_UNSUBMITTED";Quiz.SEARCH_VIEWED="SEARCH_VIEWED";
Quiz.prototype.findNextSlide=function(a,b){var c=[];$.each(this.sliderefs,function(a,b){var d=story.parseObjref(b).target;d&&("SlideDraw"==d.innerType?$.each(d.children,function(a,b){c.push(b)}):c.push(d))});b&&c.push(b);for(var d=player.currentWindowSlide||player.currentFramedSlide||player.currentSlide(),e=!1,f=0;f<2*c.length;f++){var g=c[f%c.length];if(e)switch(a){case Quiz.SEARCH_UNANSWERED:if(!g.isAnswered())return g;break;case Quiz.SEARCH_UNSUBMITTED:if(!g.isSubmitted())return g;break;case Quiz.SEARCH_VIEWED:if(g.variables.Visited)return g}else if(g===
d||f>=c.length-1)e=!0}return null};Quiz.prototype.setquizcomplete=function(a){a=this.parseObjrefFromXML(a).target;a.m_bCompleted=!0;player.lmsManager.handleQuizComplete(a)};Quiz.prototype.reset=function(a,b){Element.prototype.reset.call(this,a,b);this.m_bCompleted=this.m_bEvaluated=!1};Quiz.prototype.Passed=function(){var a=this.variables.Score>=this.variables.PassScore;return(a=(a=a&&this.m_bCompleted)&&this.m_bEvaluated)?"true":"false"};
Quiz.dump=function(){$.each(story.quizzes,function(a,b){$.each(b.sliderefs,function(a,d){var e=story.parseObjref(d).target;if(e){var f=function(a,b){var c=0;if(0<b.attempts.length)c=b.attempts[0].answers.length;console.log(["d:interaction",b.id,b.concatChoices(b.lmsResponses),b.GetResumeData(),b.attempts.length,c,b])};"SlideDraw"==e.innerType&&$.each(e.children,function(a,c){("partial"!=b.scoretype||c.variables.Visited)&&$.each(c.interactions,f)});("partial"!=b.scoretype||e.variables.Visited)&&$.each(e.interactions,
f)}})})};var Answer=function(){this.xml="";this.constructElement()};Answer.prototype=new Element;Answer.prototype.objectType="Answer";Answer.prototype.innerType="Answer";Answer.prototype.loadFromXML=function(a,b){this.parent=b;this.children={};this.id=$(a).attr("id");this.points=$(a).attr("points");this.status=$(a).attr("status");this.actions=$(a).children("actions").children();this.evaluate=$(a).children("evaluate").children()};var Choice=function(){this.xml="";this.constructElement();this.selected=!1;this.pairs=[]};Choice.prototype=new Element;Choice.prototype.objectType="Choice";Choice.prototype.innerType="Choice";Choice.prototype.loadFromXML=function(a,b){this.parent=b;this.children={};this.id=$(a).attr("id");this.lmstext=$(a).attr("lmstext")};Choice.FromParameters=function(a,b,c){var d=new Choice;d.id=a;d.lmstext=b;d.parent=c};
Choice.prototype.hasPair=function(a){for(var b=0;b<this.pairs.length;b++)if(this.pairs[b]==a)return!0;return!1};Choice.prototype.findPair=function(a){for(var b=0;b<this.pairs.length;b++)if(this.pairs[b]==a)return a;return null};Choice.prototype.addPair=function(a){this.hasPair(a)||this.pairs.push(a)};var ResponseData=function(a,b,c,d,e,f){this.m_bValid=!0;this.m_bPairResponse=a;this.m_strChoice=b;this.m_strStatement=c||"";if(!b||0==this.m_strChoice.length)this.m_bValid=!1;else if(this.m_bPairResponse&&(!c||0==this.m_strStatement.length))this.m_bValid=!1;this.lmstext=d;this.statementLMSText=e;this.interaction=f};ResponseData.TYPE_STATEMENTS="statements";ResponseData.TYPE_CHOICES="choices";ResponseData.prototype.IsPair=function(){return this.m_bPairResponse};ResponseData.prototype.ChoiceID=function(){return this.m_strChoice};
ResponseData.prototype.StatementID=function(){return this.m_strStatement};ResponseData.prototype.IsValid=function(){return this.m_bValid};ResponseData.prototype.GetResumeData=function(a,b){var c;c=0+(this.m_bPairResponse?1:0);c+=this.m_bValid?2:0;c=""+bwChunk.UBase10toN(c,1);this.m_bValid&&(c+=this.GetResumeResponseIndex(ResponseData.TYPE_CHOICES,this.m_strChoice,a),this.m_bPairResponse&&(c+=this.GetResumeResponseIndex(ResponseData.TYPE_STATEMENTS,this.m_strStatement,b)));return c};
ResponseData.prototype.SetResumeData=function(a,b,c){var d=bwChunk.UBaseNto10(a.substr(0,1));this.m_bPairResponse=0<(d&1);this.m_bValid=0<(d&2);a=a.substr(1);this.m_bValid&&(a=this.SetResumeResponse(ResponseData.TYPE_CHOICES,a,b),this.m_bPairResponse&&this.SetResumeResponse(ResponseData.TYPE_STATEMENTS,a,c))};
ResponseData.prototype.GetResumeResponseIndex=function(a,b,c){var d=b.split("."),e=-1,f="";if(2==d.length&&d[0]==a){var a=0,g;for(g in c){if(c[g].id==d[1]){e=a;break}a++}}return f=0<=e?"0"+bwChunk.UBase10toN(e,2):"1"+bwChunk.CreateChunk(b)};ResponseData.prototype.GetResponseByIndex=function(a,b){var c=0,d;for(d in a){if(c==b)return a[d];c++}return null};
ResponseData.prototype.SetResumeResponse=function(a,b,c){var d="0"==b.substr(0,1),e=-1,b=b.substr(1);d?(e=bwChunk.UBaseNto10(b.substr(0,2)),b=b.substr(2),c=this.GetResponseByIndex(c,e).id,a==ResponseData.TYPE_CHOICES?(this.m_strChoice=a+"."+c,this.lmstext=this.GetLMSText(c)):(this.m_strStatement=a+"."+c,this.statementLMSText=this.GetLMSText(c))):(b=new bwChunk(b),a==ResponseData.TYPE_CHOICES?(this.m_strChoice=b.Data(),this.lmstext=this.GetLMSText(this.m_strChoice)):(this.m_strStatement=b.Data(),this.statementLMSText=
this.GetLMSText(this.m_strStatement)),b=b.Remainder());return b};ResponseData.prototype.GetLMSText=function(a){return!this.interaction?"":(a=this.interaction.children[a])?a.lmstext:""};var Interaction=function(){this.xml="";this.choices={};this.answers={};this.statements={};this.responseActions=[];this.responses={};this.correctResponses={};this.attempts=[];this.variables={};this.lmsResponses=[];this.lmsCorrectResponses=[];this.skipEnabled=!1;this.constructElement();this.m_bUnanswered=this.m_bAnswered=this.scoreAO=!1;this.m_nUserAnswerIndex=-1};Interaction.prototype=new Element;Interaction.prototype.objectType="Interaction";Interaction.prototype.innerType="Interaction";
Interaction.prototype.toBaseData=Element.prototype.toData;Interaction.prototype.toData=function(){var a=this.toBaseData();$.each(this.responses,function(b,c){if(!a.responses)a.responses={};a.responses[b]=c.toData()});if(0<this.attempts.length)a.attempts=this.attempts;return a};
Interaction.prototype.restoreFromResumeChunk=function(a){var b=a.NextUBase10(2);this.m_bAnswered="1"==a.NextString(1);this.m_bUnanswered="1"==a.NextString(1);if(0<b){var c=a.NextString(1),d=a.NextChunkedBase10(),e=a.NextChunkedBase10();a.NextChunkedBase10();a="";switch(c){case "0":a="correct";break;case "1":a="incomplete";break;case "2":a="incorrect";break;case "3":a="neutral"}this.variables.AttemptCount=b;this.variables.Points=d;this.variables.Status=a;if("incomplete"!=this.variables.Status)for(;this.attempts.length<
b;)this.attempts.push({time:player.elapsedTime(),isfinal:!0,sent:!1,pointsAwarded:e,result:a,answers:[]})}else{b=a.NextUBase10(2);this.lmsResponses=[];c=a.NextString();for(a=0;a<b;a++){c=new bwChunk(c);e=new ResponseData(!1,"","","","",this);e.SetResumeData(c.Data(),this.choices,this.statements);this.lmsResponses.push(e);d=this.choices[e.ChoiceID()];e=this.statements[e.StatementID()];if(d)d.selected=!0,this.responses[d.longID]=d,this.m_bUnanswered=!1,e&&(d.addPair(e),e.addPair(d));c=c.Remainder()}this.evaluate(!0,
!0,!0,!0)}this.updateSlideList()};
Interaction.prototype.GetResumeData=function(){var a="",b=this.attempts.length,c=parseInt(this.variables.Points)||0,d=this.variables.Status,a=a+bwChunk.UBase10toN(b,2),a=a+(this.m_bAnswered?"1":"0"),a=a+(this.m_bUnanswered?"1":"0");if(0<b){switch(d){case "correct":a+="0";break;case "incomplete":a+="1";break;case "incorrect":a+="2";break;case "neutral":a+="3"}a+=bwChunk.CreateChunk(bwChunk.Base10toN(c));1<b&&(c=(b=this.attempts[this.attempts-1])?parseInt(b.pointsAwarded)||0:0);a+=bwChunk.CreateChunk(bwChunk.Base10toN(c));
a+=bwChunk.CreateChunk(bwChunk.Base10toN(this.m_nUserAnswerIndex))}else{a+=bwChunk.UBase10toN(this.lmsResponses.length,2);for(b=0;b<this.lmsResponses.length;b++)a+=bwChunk.CreateChunk(this.lmsResponses[b].GetResumeData(this.choices,this.statements))}return a};Interaction.prototype.updateBaseFromData=Element.prototype.updateFromData;
Interaction.prototype.updateFromData=function(a){this.updateBaseFromData(a);if(a.responses)this.responses={},$.each(a.responses,function(){});if(a.attempts)this.attempts=a.attempts};Interaction.prototype.resetBase=Element.prototype.reset;
Interaction.prototype.reset=function(){this.resetBase();this.choices={};this.answers={};this.statements={};this.responseActions=[];this.responses={};this.correctResponses={};this.lmsResponses=[];this.lmsCorrectResponses=[];this.attempts=[];this.variables={};this.loadFromXML(this.xml,this.parent);this.m_nUserAnswerIndex=-1};
Interaction.prototype.loadFromXML=function(a,b){var c=this;this.slide=this.parent=b;this.children={};this.xml=a;this.id=$(a).attr("id");this.lmsid=$(a).attr("lmsid");this.lmstext=$(a).attr("lmstext");this.interactionType=$(a).attr("type");this.maxpoints=$(a).attr("maxpoints");this.aoinclude=$(a).attr("aoinclude");this.istracked=$(a).attr("istracked");this.issurvey="true"==$(a).attr("issurvey");this.skipEnabled="true"==$(a).attr("skipenabled");$(a).children("choices").children("choice").each(function(a,
b){var f=new Choice;f.loadFromXML(b,this);f.longID="choices."+f.id;c.choices[f.id]=f;c.children[f.id]=f});$(a).children("statements").children("statement").each(function(a,b){var f=new Choice;f.loadFromXML(b,this);f.innerType="Statement";f.longID="statements."+f.id;c.statements[f.id]=f;c.children[f.id]=f});$(a).children("answers").children("answer").each(function(a,b){var f=new Answer;f.loadFromXML(b,this);c.answers[f.id]=f;c.children[f.id]=f});this.responseActions=$(a).children("response_definition").children("actions").children();
this.variables.AttemptCount=0;this.variableDefaults.AttemptCount=0};
Interaction.prototype.evaluate=function(a,b,c,d){var e=this,f=this.slide;this.scoreAO=!b;if(!d)f.responses={},this.responses={},this.lmsResponses=[];this.lmsCorrectResponses=[];this.variables.AttemptCount++;this.partialEvaluate&&(this.variables.AttemptCount=1);d||($.each(e.choices,function(a,b){b.selected=!1;b.pairs=[]}),$.each(e.statements,function(a,b){b.pairs=[]}),$.each(this.responseActions,function(a,b){f.runAction(b)}));var g=!1,h=!0,j=0;$.each(this.answers,function(a,b){$.each(b.evaluate,function(){j++})});
var k=0,l;for(l in e.responses)k++;this.m_bUnanswered=!0;var m=0;$.each(this.answers,function(b,d){var l=!0,r=!1,s=0;$.each(d.evaluate,function(){s++});var t=0<parseInt(d.points);$.each(d.evaluate,function(a,b){switch(b.tagName){case "other":l=!h&&!g?!0:1==j?!0:!1;break;case "equals":var c=$(b).attr("choiceid"),c=e.parseObjref(c).target;l=l&&c.selected;r=r||c.selected;switch(e.interactionType){case "fillin":case "numeric":l=r;break;case "multipleresponse":k!=s&&(l=!1)}t&&e.lmsCorrectResponses.push(new ResponseData(!1,
c.id,"",c.lmstext,""));break;case "condition":l=l&&f.evaluateCondition(b,e);break;case "pair":var c=$(b).attr("choiceid"),m=$(b).attr("statementid"),c=e.parseObjref(c).target,m=e.parseObjref(m).target,n=c.hasPair(m);if(n){var L=c.findPair(m),w=0;$.each(d.evaluate,function(a,b){-1<$(b).attr("statementid").indexOf(L.id)&&w++});n=n&&w==L.pairs.length}l=l&&n;r=r||n;t&&e.lmsCorrectResponses.push(new ResponseData(!0,c.id,m.id,c.lmstext,m.lmstext))}});l&&(r=!0);if(r)e.m_bUnanswered=!1,e.m_bAnswered=!0;if(c){if(!e.partialEvaluate)e.partialEvaluate=
{};e.partialEvaluate.attemptCount=e.variables.AttemptCount;if(l)e.partialEvaluate.status=d.status,e.partialEvaluate.points=d.points,e.m_nUserAnswerIndex=m,g=!0}else if(l)e.variables.Status=d.status,e.variables.Points=d.points,e.m_nUserAnswerIndex=m,a||$.each(d.actions,function(a,b){f.runAction(b)}),g=!0;h=!1;m++});Interaction.updateScore("from interaction evaluate: "+e.id);this.updateSlideList();if(c){if(0<k)this.m_bAnswered=!0;this.variables.AttemptCount--}else g||this.variables.AttemptCount--,this.partialEvaluate=
null,this.noteAttempt(),"view"!=story.scoring.type&&player.lmsManager.handleInteractionEvaluated(this)};Interaction.prototype.noteAttempt=function(){var a={time:player.elapsedTime(),isfinal:!0,sent:!1,pointsAwarded:this.variables.Points,result:this.variables.Status,answers:[]};$.each(this.lmsResponses,function(b,c){a.answers.push(c.m_bPairResponse?{statementid:c.statementLMSText,choiceid:c.lmstext}:{choiceid:c.lmstext})});this.attempts.push(a)};
Interaction.prototype.updateSlideList=function(){if(player.frame.options.enableresultsicons||this.slide.showmenuresulticon){var a="";switch(this.variables.Status){case "correct":a="correct";break;case "incorrect":a="incorrect";break;case "neutral":case "unanswered":case void 0:a="";break;default:a=""}for(var b in this.slide.navLinks)for(var c=this.slide.navLinks[b],d=0;d<c.listitems.length;d++){var e=c.listitems[d];e.removeClass("correct");e.removeClass("incorrect");e.addClass(a)}}};
Interaction.prototype.Answered=function(){return this.m_bAnswered?"true":"false"};Interaction.getCurrentQuiz=function(){var a=null,b=player.currentSlide().getFullObjref(!0);$.each(story.quizzes,function(c,d){$.each(d.sliderefs,function(c,f){-1<b.indexOf(f)&&(a=d)})});return a};
Interaction.updateScore=function(){$.each(story.quizzes,function(a,b){var c=0,d=0,e=0;$.each(b.sliderefs,function(a,g){var h=story.parseObjref(g).target;if(h){var j=function(a,b){e++;d+=parseInt(b.maxpoints);var f=parseInt(b.variables.Points)||0;c+=f};"SlideDraw"==h.innerType&&$.each(h.children,function(a,c){("partial"!=b.scoretype||c.variables.Visited)&&$.each(c.interactions,j)});("partial"!=b.scoretype||h.variables.Visited)&&$.each(h.interactions,j)}});b.variables.Score=c;b.maxscore=d;b.variables.PercentScore=
parseFloat(parseInt(1E4*c/d)/100);isNaN(b.variables.PercentScore)&&(b.variables.PercentScore=0);b.variables.PassScore=Math.ceil(parseFloat(b.variables.PassPercent*d/100));if(window&&window.g_oContentResults)window.g_oContentResults.nScore=b.variables.PercentScore;b.handleVarChanged(b.getFullVariableRef("Score"),"onvarchanged")});$.each(story.quizzes,function(a,b){if(0!=b.quizrefs.length){var c=0,d=0;$.each(b.quizrefs,function(a,b){var g=story.parseObjref(b.id).target;g&&!isNaN(g.variables.Score)&&
(c+=g.variables.Score,d+=g.maxscore)});b.variables.Score=c;b.maxscore=d;b.variables.PercentScore=parseFloat(parseInt(1E4*c/d)/100);isNaN(b.variables.PercentScore)&&(b.variables.PercentScore=0);b.variables.PassScore=Math.ceil(parseFloat(b.variables.PassPercent*d/100));if(window&&window.g_oContentResults)window.g_oContentResults.nScore=b.variables.PercentScore;b.handleVarChanged(b.getFullVariableRef("Score"),"onvarchanged")}})};
Interaction.partialEvaluateSlide=function(a){$.each(a.interactions,function(a,c){(!c.variables.Status||"unanswered"==c.variables.Status)&&c.evaluate(!0,!0,!0)})};
Interaction.eval_all_unanswered=function(a){var b={},c=function(a){var c=!1;$.each(a.interactions,function(a,b){if(!b.variables.Status||"unanswered"==b.variables.Status){(!b.partialEvaluate||!b.partialEvaluate.status||"unanswered"!=b.partialEvaluate.status)&&b.evaluate(!0,!0,!0);if(b.partialEvaluate)b.variables.Status=b.partialEvaluate.status,b.variables.Points=b.partialEvaluate.points,b.variables.AttemptCount=b.partialEvaluate.attemptCount,b.updateSlideList();b.variables.Status||(b.variables.Status=
"unanswered");for(c=!0;b.attempts.length<b.variables.AttemptCount;){var d={time:player.elapsedTime(),isfinal:!0,sent:!1,pointsAwarded:b.variables.Points,result:b.variables.Status,answers:[]};b.attempts.push(d)}}b.m_bAnswered=!0});if(c)a.rebuildInteractionData(),b[a.parent.id]=a.parent};if(a&&"Quiz"==a.innerType)a.m_bEvaluated=!0,$.each(a.sliderefs,function(a,b){var f=story.parseObjref(b).target;f&&("SlideDraw"==f.innerType?$.each(f.children,function(a,b){c(b)}):c(f))}),$.each(b,function(a,b){b.compactResumeData=
b.getResumeData()}),Interaction.updateScore("from eval_all_unanswered")};Interaction.setquizcomplete=function(a){a=story.parseObjrefFromXML(a).target;a.m_bCompleted=!0;player.lmsManager.handleQuizComplete(a)};function Scoring(){this.scorerefs={}}
Scoring.prototype.loadFromXML=function(a,b){var c=this;this.parent=b;this.scorerefs={};this.id=$(a).attr("id");this.type=$(a).attr("type");this.passpercent=$(a).attr("passpercent");this.viewthreshold=parseInt($(a).attr("viewthreshold"));this.passstatus=$(a).attr("passstatus");this.failstatus=$(a).attr("failstatus");if(isNaN(this.viewthreshold))this.viewthreshold=0;$(a).children("scorerefs").children("scoreref").each(function(a,b){var f={};f.type=$(b).attr("type");f.ref=$(b).attr("ref");f.weight=$(b).attr("weight");
f.maxvalue=$(b).attr("maxvalue");f.mustpass=$(b).attr("mustpass");c.scorerefs[f.ref]=f})};function AOClient(){this.endpoint="http://"+window.location.host+"/services/content/api.asmx";if(-1<location.href.indexOf("aomock=1"))this.endpoint="/AOMock/AO.asmx";this.apiVersion="0.0";this.sendcount=0}
AOClient.prototype.call=function(a,b,c,d){var e="http://articulate.com/KnowledgeFlash/Services/Content/Api/"+a,f=$.parseXML(b),g=this,h=this.endpoint+"?rand="+Math.random();$.ajax({url:h,type:"POST",dataType:"xml",data:f,headers:{SOAPAction:e},processData:!1,contentType:'text/xml; charset="utf-8"',cache:!1,success:function(a,b,d){c&&c(a,b,d)},error:function(){d&&!window.manuallyClosing&&confirm("Unable to connect to the server.  Please verify you can connect to the internet. Retry?")&&g.call(a,b,
c,d);return!1}})};AOClient.prototype.wrapWithEnvelope=function(a){return'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body>'+a+"</soap:Body></soap:Envelope>"};AOClient.prototype.getVanillaXML=function(a){return this.wrapWithEnvelope("<"+a+' xmlns="http://articulate.com/KnowledgeFlash/Services/Content/Api"><contentUrl>'+escape(location.href)+"</contentUrl></"+a+">")};
AOClient.prototype.GetApiVersion=function(){var a=this;this.call("GetApiVersion",this.getVanillaXML("GetApiVersion"),function(b){this.apiVersion=$(b).find("GetApiVersionResult").text();a.apiVersionReturned=!0})};AOClient.prototype.GetSessionId=function(){var a=this;this.call("GetSessionId",this.getVanillaXML("GetSessionId"),function(b){player.aoSessionID=$(b).find("GetSessionIdResult").text();a.getSessionIdReturned=!0})};
AOClient.prototype.GetResumeInfo=function(){var a=this;this.call("GetResumeInfo",this.getVanillaXML("GetResumeInfo"),function(b){b=$(b).find("GetResumeInfoResult").text();player.aoResumeData=b;a.getResumeInfoReturned=!0})};AOClient.prototype.RefreshSession=function(){this.call("RefreshSession",this.getVanillaXML("RefreshSession"),function(a){$(a).find("RefreshSessionResult").text()})};AOClient.prototype.SetViewBasedComplete=function(){};
AOClient.prototype.SavePlayerData=function(){this.call("SavePlayerData",this.wrapWithEnvelope(story.toAOData()),function(){var a=story.getDescendantsByType("Interaction");$.each(a,function(a,c){$.each(c.attempts,function(a,b){b.sent=!0})})},!0);this.sendcount++};
AOClient.prototype.SaveResume=function(){var a="",a=player.useCompactResume?story.toResumeData():JSON.stringify(story.toData(!0));this.call("SaveResume",this.wrapWithEnvelope('<SaveResume xmlns="http://articulate.com/KnowledgeFlash/Services/Content/Api"><contentUrl>'+escape(location.href)+'</contentUrl><playerdata sessionid="string"><resumeData>'+a+"</resumeData></playerdata></SaveResume>"),function(){})};
AOClient.prototype.reCapitalize=function(a,b){$.each(b,function(b,d){a=a.replace(RegExp("<"+d,"ig"),"<"+d);a=a.replace(RegExp("</"+d,"ig"),"</"+d);a=a.replace(RegExp(d+'="',"ig"),d+'="')});return a};AOClient.prototype.handleInteractionEvaluated=function(){(player.isMobile||-1<location.search.indexOf("aoforce=1"))&&player.aoClient.SavePlayerData(!0)};
AOClient.prototype.init=function(){var a=this;this.GetApiVersion();this.GetSessionId();this.GetResumeInfo();this.refreshInterval=setInterval(function(){a.RefreshSession()},6E4);var b=!1;$(window).bind("unload beforeunload",function(){b||(a.SavePlayerData(!1),b=!0)})};AOClient.prototype.isReady=function(){return!0==this.apiVersionReturned&&!0==this.getSessionIdReturned&&!0==this.getResumeInfoReturned?!0:!1};
Interaction.prototype.toAOData=function(){var a=this,b=$("<interaction/>");b.attr("idRef",this.getFullObjref());b.attr("type",this.interactionType);$.each(this.attempts,function(c,d){var e=$("<attempt/>");e.attr("time",d.time);e.attr("final",d.isfinal);e.attr("sent",d.sent);e.attr("pointsAwarded",d.pointsAwarded);e.attr("result",d.result);switch(a.interactionType){case "fillin":case "numeric":$.each(d.answers,function(a,b){var c=$("<answer/>");c.get(0).innerHTML=b.choiceid;e.append(c)});break;case "likert":case "matching":case "sequence":$.each(d.answers,
function(a,b){var c=$("<answer/>");c.attr("statementid",b.statementid);c.attr("choiceid",b.choiceid);e.append(c)});break;default:$.each(d.answers,function(a,b){var c=$("<answer/>");c.attr("choiceid",b.choiceid);e.append(c)})}b.append(e)});return b};
Quiz.prototype.toAOData=function(){var a=$("<quiz/>");a.attr("idRef",this.getFullObjref());a.attr("duration",player.elapsedTime());this.issurvey?this.status=this.m_bCompleted?"complete":"incomplete":(a.attr("score",this.variables.Score),a.attr("possibleScore",this.maxscore),this.status=parseInt(this.variables.Score)>=parseInt(this.variables.PassScore)?story.scoring.passstatus:story.scoring.failstatus);a.attr("status",this.status);var b=$("<interactions/>");$.each(this.sliderefs,function(a,d){function e(a){$.each(a.interactions,
function(a,c){(c.scoreAO||player.forceAO)&&b.append($(c.toAOData()))})}var f=story.parseObjref(d).target;"SlideDraw"==f.innerType?$.each(f.children,function(a,b){e(b)}):e(f)});a.append(b);return a.get(0).outerHTML};
Storyline.prototype.toAOData=function(){var a=$('<SavePlayerData xmlns="http://articulate.com/KnowledgeFlash/Services/Content/Api"/>');a.append($("<contentUrl>"+location.href+"</contentUrl>"));var b=$("<playerdata/>");b.attr("sessionid",player.aoSessionID);b.attr("sendcount",player.aoClient.sendcount);var c=story.toResumeData();b.append($("<resumeData>"+c+"</resumeData>"));var c=$("<results/>"),d=$("<summary/>"),e=$("<quizzes/>"),f=$("<viewdata/>"),g=0,h=0,j=story.scoring.failstatus;$.each(this.quizzes,
function(a,b){if(story.scoring.scorerefs[b.id])g+=parseInt(b.variables.Score),h+=b.maxscore,e.append($(b.toAOData())),j=b.status});for(var k in player.listSlidesViewed){var l=story.parseObjref(k).target;if(l.trackviews){var m=$("<slide/>");m.attr("id",l.getFullObjref());m.attr("viewgroupid",l.viewgroupid);f.append(m)}}f.attr("total",player.totalViewSlides);f.attr("viewed",player.currentSlidesViewed);f.attr("viewedcomplete",player.completeSlidesViewed);b.append(f);k=parseFloat(parseInt(1E4*g/h)/100);
isNaN(k)&&(k=0);if("view"==story.scoring.type){if(0<story.scoring.viewthreshold&&player.completeSlidesViewed>=story.scoring.viewthreshold)j=story.scoring.passstatus;d.attr("slidesviewed",player.completeSlidesViewed);d.attr("slidestotal",player.totalViewSlides);d.attr("duration",player.elapsedTime());d.attr("status",j)}else d.attr("duration",player.elapsedTime()),d.attr("status",j),c.append(e),"quiz"==story.scoring.type&&(d.attr("score",k),d.attr("possibleScore",100));c.append(d);b.append(c);a.append(b);
return player.aoClient.reCapitalize(a.get(0).outerHTML,"SavePlayerData,resumeData,contentUrl,idRef,pointsAwarded,possibleScore".split(","))};function LMSClient(){}
LMSClient.prototype.initResume=function(){var a="";if(window&&window.lms_DoFSCommand){window.hasLMS=!0;window.lmsAPI=parent;if(!parent.GetDataChunk&&window.GetDataChunk)window.lmsAPI=window;if(!window.lmsAPI.GetDataChunk)window.g_bAPIPresent=!1,window.g_bLMSPresent=window.lmsAPI.IsLmsPresent&&window.lmsAPI.IsLmsPresent();window.g_bAPIPresent=!0;if(!window.lmsAPI.GetDataChunk)window.g_bAPIPresent=!1,window.hasLMS=!1,player.hasLMS=!1,player.lmsManager.hasLMS=!1;window.g_bLMSPresent=window.lmsAPI.IsLmsPresent&&
window.lmsAPI.IsLmsPresent();if(window.g_bAPIPresent)a=window.lmsAPI.GetDataChunk("cmi.suspend_data"),window.lmsAPI.g_strResumeData=a,window.g_strResumeData=a,window.LMSCommit(),window.lms_DoFSCommand("BW_InitResume")}return a};LMSClient.prototype.handleInteractionEvaluated=function(a){if("view"!=story.scoring.type){a=a.toLMSData();try{window.lms_DoFSCommand("BW_StoreQuestionResult",a)}catch(b){}window.lms_DoFSCommand("BW_UpdateStatus")}};LMSClient.prototype.handleClosePlayer=function(){try{window.lms_DoFSCommand("BW_ClosePlayer")}catch(a){}return!1};
LMSClient.prototype.sendResumeData=function(){if(player.useCompactResume){var a=story.toResumeData();lms_DoFSCommand("BW_SetResumeData",a)}};LMSClient.prototype.reportViewBasedComplete=function(){window.g_oContentResults.nScore=100;window.g_oContentResults.strStatus=story.scoring.passstatus;window.g_oContentResults.strType="view";window.lms_DoFSCommand("BW_UpdateViewStatus",story.scoring.passstatus+"|~|view")};
Interaction.prototype.toLMSData=function(){var a=[],b=this.parent,c=null;$.each(story.quizzes,function(a,d){$.each(d.sliderefs,function(a,e){var f=story.parseObjref(e).target;f==b?c=d:"SlideDraw"==f.innerType&&$.each(f.children,function(a,e){e==b&&(c=d)})})});if(!b||!c)return"";for(var d=c.attemptCount,e=parseInt(this.variables.AttemptCount-1),f=0,g=0;g<c.sliderefs.length;g++)-1<c.sliderefs[g].indexOf(b.id)&&(f=g+1);d=b.parent.lmsid+"_"+b.lmsid+"_"+this.lmsid+"_"+d+"_"+e;b.parent.parent&&b.parent.parent.lmsid&&
(d=b.parent.parent.lmsid+"_"+d);a.push(c.id);a.push(d);a.push(this.lmsid);a.push(this.interactionType);a.push(this.concatChoices(this.lmsCorrectResponses));a.push(this.concatChoices(this.lmsResponses));a.push("0");a.push(this.variables.Status);a.push(this.variables.Points);a.push(GetTime(new Date));a.push("1");a.push(f);a.push(this.lmstext);a.push(c.lmstext);a.push(this.istracked);return a.join(window.g_strLDelim||"|~|")};
Interaction.prototype.concatChoices=function(a){var b=[],c=window.g_strLInteractionDelim||"|#|";$.each(a,function(a,c){c.m_bPairResponse&&b.push(c.statementLMSText);b.push(c.lmstext)});return b.join(c)};
Quiz.prototype.reportLMSStatus=function(){if("view"!=story.scoring.type&&story.scoring.scorerefs[this.id]){var a=[],b="",b=parseInt(this.variables.Score)>=parseInt(this.variables.PassScore)?story.scoring.passstatus:story.scoring.failstatus,c=100*this.variables.Score/this.maxscore,d=100*this.variables.PassScore/this.maxscore;a.push(b);a.push(c);a.push(0);a.push(100);a.push(d);a.push("quiz");a=a.join(window.g_strLDelim||"|~|");window.g_oContentResults.nScore=c;window.g_oContentResults.strStatus=b;window.lms_DoFSCommand("BW_UpdateStatus",
a)}};function LMSManager(){this.hasTinCan=this.hasLMS=this.hasAO=!1}LMSManager.prototype.initResume=function(){if(this.hasLMS)return player.lmsClient.initResume()};LMSManager.prototype.handleInteractionEvaluated=function(a){this.hasAO?player.aoClient.handleInteractionEvaluated(a):this.hasLMS?player.lmsClient.handleInteractionEvaluated(a):this.hasTinCan&&player.tinCanClient.handleInteractionEvaluated(a)};
LMSManager.prototype.handleSlideViewed=function(a){this.hasTinCan&&player.tinCanClient.handleSlideViewed(a);0<story.scoring.viewthreshold&&"view"==story.scoring.type&&player.completeSlidesViewed>=story.scoring.viewthreshold?this.hasAO?(player.aoClient.SetViewBasedComplete(),player.aoClient.SavePlayerData(!0)):this.hasLMS?(player.lmsClient.reportViewBasedComplete(),player.lmsClient.sendResumeData()):this.hasTinCan&&player.tinCanClient.reportViewBasedComplete(player.completeSlidesViewed):player.isMobile&&
0<story.scoring.viewthreshold&&"view"==story.scoring.type&&this.hasAO&&player.aoClient.SavePlayerData(!0);this.hasLMS?player.lmsClient.sendResumeData():this.hasAO?player.aoClient.SaveResume():this.hasTinCan&&player.tinCanClient.sendResumeData()};LMSManager.prototype.handleQuizComplete=function(a){this.hasAO&&player.aoClient.SavePlayerData(!0);this.hasLMS&&a.reportLMSStatus();this.hasTinCan&&player.tinCanClient.reportQuizComplete(a)};
LMSManager.prototype.handleClosePlayer=function(){var a=!1;this.hasLMS&&(a=player.lmsClient.handleClosePlayer());this.hasTinCan&&(a=player.tinCanClient.handleClosePlayer());return a};
LMSManager.prototype.init=function(){if(globals.bAOSupport||window.g_bAOSupport||player.useAO)player.aoClient=new AOClient,player.aoClient.init(),this.hasAO=!0;else if(globals.bTinCan||window.g_bTinCan||player.useTinCan)player.tinCanClient=new TinCanClient,player.tinCanClient.init(),this.hasTinCan=!0;else if(window&&window.lms_DoFSCommand){player.lmsClient=new LMSClient;player.hasLMS=!0;window.lmsAPI=parent;if(!parent.GetDataChunk&&window.GetDataChunk)window.lmsAPI=window;window.g_bAPIPresent=!0;
window.g_bLMSPresent=window.lmsAPI.IsLmsPresent&&window.lmsAPI.IsLmsPresent();this.hasLMS=!0}};LMSManager.prototype.isReady=function(){return this.hasAO?player.aoClient.isReady():this.hasTinCan?player.tinCanClient.isReady():!0};function QuizData(a,b){this.strQuizId=a;this.strQuizName=b;this.arrQuestions=[];this.dtmFinished=new Date;this.strStatus="";this.nScore=0;this.nPassingScore=80;this.nMinScore=0;this.nMaxScore=100;this.nPtScore=0;this.nPtMax=100;this.AddQuestionResult=function(a){for(var b=!1,e=0;e<this.arrQuestions.length;e++)this.arrQuestions[e].nQuestionNumber==a.nQuestionNumber&&(this.arrQuestions[e]=a,b=!0);b||this.arrQuestions.push(a)}}
function ContentResults(){this.dtmFinished=new Date;this.nPassingScore=80;this.nScore=0;this.strStatus="incomplete";this.strType="quiz"}function QuestionResults(a,b,c,d,e,f,g,h,j,k,l,m,n){this.strId=a;this.strLMSId=b;this.strType=c;this.strCorrectResponse=d;this.strUserResponse=e;this.nLatency=f;this.strStatus=g;this.nPoints=h;this.strCompletedTime=j;this.nWeight=k;this.nQuestionNumber=l;this.strDescription=m;this.bTracked=n}
function GetTime(a){var b="",b=a.getHours(),c=a.getMinutes(),d=""+c,a=a.getSeconds(),e=""+a;10>c&&(d="0"+c);10>a&&(e="0"+a);return b+":"+d+":"+e}function GetDate(a){var b="";return b=a.getMonth()+1+"/"+a.getDate()+"/"+a.getFullYear()}if(window){window.g_oContentResults=new ContentResults;window.g_listQuizzes={};var unloadFired=!1;$(window).bind("unload beforeunload",function(){!unloadFired&&parent.LMSUnload&&(parent.LMSUnload(),unloadFired=!0)})};var TC_PARAM_AUTH="auth",TC_PARAM_REG="registration",TC_PARAM_ACTIVITY_ID="activity_id",TC_PARAM_ACTOR="actor",TC_PARAM_ENDPOINT="endpoint",TC_PARAM_GROUPING="grouping",TC_PARAM_CONTENT_ENDPOINT="content_endpoint",TC_PARAM_CONTENT_TOKEN="content_token",REQ_TYPE_RESUME_SAVE=1,REQ_TYPE_RESUME_RESTORE=2,REQ_TYPE_TRACKING=3,URI_PREFIX="http://",URI_DELIM="/";function AlertError(a){console.error("Fatal Comm Error: "+a);alert("ERROR: "+a)}
function ppTinCanRequest(a,b,c,d,e){this.MessageType=a;this.Method=b;this.Data=c;this.Url=d;this.Callback=e}function ppTinCanComm(a,b){this.m_nVersion=b;this.m_listParams={};this.m_listCustomParams={};this.m_jsActor={};this.m_strQueryString=a;this.ParseQueryString(this.m_strQueryString);this.m_bClosePlayer=this.m_bStopPosting=this.m_bWaitingTinCanResponse=!1;this.m_arrTinCanMsgQueue=[];this.m_pfnFatalError=AlertError;this.m_bIE=document.all&&-1!=navigator.appVersion.indexOf("MSIE")?!0:!1}
ppTinCanComm.prototype.PostOnClose=function(){for(this.m_bStopPosting=!0;0<this.m_arrTinCanMsgQueue.length;)this.PostSyncRequest(this.m_arrTinCanMsgQueue.shift())};ppTinCanComm.prototype.GetAuth=function(){return this.m_listParams[TC_PARAM_AUTH]};ppTinCanComm.prototype.GetRegistration=function(){return this.m_listParams[TC_PARAM_REG]};ppTinCanComm.prototype.GetActivityId=function(){return this.m_listParams[TC_PARAM_ACTIVITY_ID]};
ppTinCanComm.prototype.FormatUri=function(){var a=this.GetActivityId(),b=Array.prototype.slice.call(arguments);if(1>this.m_nVersion)a=0<b.length?b.join("."):this.GetActivityId();else if(null!=b&&0<b.length)for(var c=0;c<b.length;c++)a=a+URI_DELIM+b[c];return a};ppTinCanComm.prototype.GetActor=function(){return this.m_listParams[TC_PARAM_ACTOR]};ppTinCanComm.prototype.GetActorObj=function(){return this.m_jsActor};ppTinCanComm.prototype.GetEndPoint=function(){return this.m_listParams[TC_PARAM_ENDPOINT]};
ppTinCanComm.prototype.GetGrouping=function(){return this.m_listParams[TC_PARAM_GROUPING]};
ppTinCanComm.prototype.ParseQueryString=function(a){for(var a=a.split("&"),b="",c="",b="",d=0,e=0;e<a.length;e++)switch(b=a[e],d=b.indexOf("="),c=decodeURIComponent(b.substr(0,d)),b=decodeURIComponent(b.substr(d+1)),this.m_listParams[c]=b,c){case TC_PARAM_ACTOR:this.CreateActor(b);break;case TC_PARAM_AUTH:case TC_PARAM_GROUPING:case TC_PARAM_ACTIVITY_ID:case TC_PARAM_REG:case TC_PARAM_ENDPOINT:case TC_PARAM_CONTENT_ENDPOINT:case TC_PARAM_CONTENT_TOKEN:break;default:this.m_listCustomParams[c]=b}};
ppTinCanComm.prototype.CreateActor=function(a){a=JSON.parse(a);if(1>this.m_nVersion)this.m_jsActor=a;else{this.m_jsActor={};var b=null,c;for(c in a)b=a[c],Array.isArray(b)&&(b=b[0]),this.m_jsActor[c]=b;c={homePage:"-",name:"-"};if(null!=this.m_jsActor.account){if(null!=this.m_jsActor.account.homePage)c.homePage=this.m_jsActor.account.homePage;else if(null!=this.m_jsActor.account.accountServiceHomePage)c.homePage=this.m_jsActor.account.accountServiceHomePage;if(null!=this.m_jsActor.account.name)c.name=
this.m_jsActor.account.name;else if(null!=this.m_jsActor.account.accountName)c.name=this.m_jsActor.account.accountName}this.m_jsActor.account=c}};ppTinCanComm.prototype.ConvertToPost=function(a,b,c,d,e,f){var g="",h;for(h in e)g+=h+"="+encodeURIComponent(e[h])+"&";0<d.length&&(g+="content="+encodeURIComponent(d));this.SendRequest(new ppTinCanRequest(a,"POST",g,b+"?method="+c,f))};
ppTinCanComm.prototype.GetHeaders=function(){var a={};a.Authorization=this.m_listParams[TC_PARAM_AUTH];a.registration=this.m_listParams[TC_PARAM_REG];a["Content-Type"]="application/json";1<=this.m_nVersion&&(a["X-Experience-API-Version"]="1.0.0");for(var b in this.m_listCustomParams)a[b]=this.m_listCustomParams[b];return a};ppTinCanComm.prototype.SendRequest=function(a){this.m_bWaitingTinCanResponse||this.m_bStopPosting?this.m_arrTinCanMsgQueue.push(a):this.PostAsyncRequest(a)};
ppTinCanComm.prototype.PostAsyncRequest=function(a){try{this.UseXDomainRequest(a.Url)?this.PostXDomainRequest(a,!1):this.PostXmlHttp(a)}catch(b){confirm("Unable to connect to server.  Please verify that you are connected to the internet. Retry?")?(this.m_bWaitingTinCanResponse=!1,this.SendRequest(a)):(this.m_bFatalError=this.m_bStopPosting=!0,this.m_pfnFatalError(0),this.m_bClosePlayer&&this.DoClosePlayer())}};
ppTinCanComm.prototype.PostXDomainRequest=function(a,b){var c=new XDomainRequest;c.open(a.Method,a.Url);c.TCRequest=a;c.TCComm=this;c.status=0;c.onload=function(){c.status=200;b||this.TCComm.OnSendComplete(c)};c.onerror=function(){c.status=-1;b||this.TCComm.OnSendError(c)};c.send(strData);if(b)for(var d=(new Date).getTime();5E3>(new Date).getTime()-d&&0==c.status;){var e=new XMLHttpRequest;e.open("GET",window.location+"?"+(new Date).getTime(),!1);e.send(null)}return c.status};
ppTinCanComm.prototype.PostXmlHttp=function(a){var b=this.CreateXmlHttp();if(null!=b)this.m_bWaitingTinCanResponse=!0,b.TCRequest=a,b.TCComm=this,b.onreadystatechange=function(){4==b.readyState&&(400<=b.status&&!(this.m_bIE&&1223==b.status)?this.TCComm.OnSendError(b):this.TCComm.OnSendComplete(b))},b.open(a.Method,a.Url,!0),b.send(a.Data)};
ppTinCanComm.prototype.OnSendComplete=function(a){null!=a.TCRequest.Callback&&void 0!=a.TCRequest.Callback&&a.TCRequest.Callback(a.responseText);this.m_bWaitingTinCanResponse=!1;0<this.m_arrTinCanMsgQueue.length&&!this.m_bStopPosting?this.SendRequest(this.m_arrTinCanMsgQueue.shift()):this.m_bClosePlayer&&this.DoClosePlayer()};
ppTinCanComm.prototype.OnSendError=function(a){a.TCRequest.MessageType==REQ_TYPE_RESUME_RESTORE?(a.TCRequest.Callback(""),this.m_bWaitingTinCanResponse=!1,0<this.m_arrTinCanMsgQueue.length&&!this.m_bStopPosting&&this.SendRequest(this.m_arrTinCanMsgQueue.shift())):confirm("Unable to connect to server.  Please verify that you are connected to the internet. Retry? ")?(this.m_bWaitingTinCanResponse=!1,this.SendRequest(a.TCRequest)):(this.m_bFatalError=this.m_bStopPosting=!0,a.status&&this.m_pfnFatalError(a.status))};
ppTinCanComm.prototype.ClosePlayer=function(){this.m_bStopPosting||this.m_bFatalError?this.DoClosePlayer():0==this.m_arrTinCanMsgQueue.length&&this.DoClosePlayer();this.m_bClosePlayer=!0};ppTinCanComm.prototype.DoClosePlayer=function(){setTimeout(function(){top.window.open("","_self");top.window.close()},10)};
ppTinCanComm.prototype.CreateXmlHttp=function(){var a=null,b=["MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp","Microsoft.XMLHttp"],c=0;if(window.XMLHttpRequest)try{a=new XMLHttpRequest}catch(d){a=null}if(null==a&&window.ActiveXObject)for(;null==a&&c<b.length;){try{a=new ActiveXObject(b[c])}catch(e){a=null}c++}return a};
ppTinCanComm.prototype.PostSyncRequest=function(a){try{var b=0,b=this.UseXDomainRequest(a.Url)?this.PostXDomainRequest(a,!0):this.PostSyncXmlHttp(a);if(200!=b)confirm("Could not save the result data. You may need to login again. Retry?")?this.PostSyncRequest(a):this.m_bFatalError=!0}catch(c){confirm("Unable to connect to server.  Please verify that you are connected to the internet. Retry?")?this.PostSyncRequest(a):this.m_bFatalError=!0}};
ppTinCanComm.prototype.PostSyncXmlHttp=function(a){var b=this.CreateXmlHttp(),c=200;null!=b&&(b.open(a.Method,a.Url,!1),b.send(a.Data),400<=b.status&&!(this.m_bIE&&1223==b.status)&&(c=-1));return c};ppTinCanComm.prototype.UseXDomainRequest=function(a){var b=!1;if(this.m_bIE){this.CreateXmlHttp();var b=document.createElement("a"),c=document.createElement("a");b.href=a;c.href=window.location;b=b.hostname!=c.hostname||b.protocol!=c.protocol||b.port!=c.port}return b};var TC_DELIM_CHOICE="[,]",TC_DELIM_STATEMENT="[.]",VERB_COMPLETED="completed",VERB_PASSED="passed",VERB_FAILED="failed",VERB_ATTEMPTED="attempted",VERB_EXPERIENCED="experienced",VERB_ANSWERED="answered",VERB_ID_COMPLETED="http://adlnet.gov/expapi/verbs/completed",VERB_ID_PASSED="http://adlnet.gov/expapi/verbs/passed",VERB_ID_FAILED="http://adlnet.gov/expapi/verbs/failed",VERB_ID_ATTEMPTED="http://adlnet.gov/expapi/verbs/attempted",VERB_ID_EXPERIENCED="http://adlnet.gov/expapi/verbs/experienced",VERB_ID_ANSWERED=
"http://adlnet.gov/expapi/verbs/answered";function ppResponsePair(a,b){this.Choice=a;this.Statement=b}function ppTinCanApi(a,b){this.m_nVersion=parseFloat(b);this.m_tcComm=new ppTinCanComm(a,this.m_nVersion)}ppTinCanApi.prototype.PostOnClose=function(){this.m_tcComm.PostOnClose()};
ppTinCanApi.prototype.UpdateResumeData=function(a){var b=this.m_tcComm.GetHeaders(),c="agent";1>this.m_nVersion&&(c="actor");b.activityId=this.m_tcComm.FormatUri();b[c]=JSON.stringify(this.m_tcComm.GetActorObj());b.stateId="resume";this.m_tcComm.ConvertToPost(REQ_TYPE_RESUME_SAVE,this.m_tcComm.GetEndPoint()+"activities/state","PUT",a,b,null)};
ppTinCanApi.prototype.NotifyCourseComplete=function(a,b,c,d){var e={id:this.m_tcComm.FormatUri()},f=this.GetVerb(VERB_COMPLETED);c||(f=b?this.GetVerb(VERB_PASSED):this.GetVerb(VERB_FAILED));e={verb:f,object:e,context:this.GetContext(this.m_tcComm.FormatUri())};e.result=c?{duration:this.ConvertMSToISO(d),completion:!0}:{score:{scaled:a/100},success:b?!0:!1,duration:this.ConvertMSToISO(d),completion:!0};this.PutStatement(e,REQ_TYPE_TRACKING)};
ppTinCanApi.prototype.NotifyQuizComplete=function(a,b,c,d,e,f){var g={id:this.m_tcComm.FormatUri(d)},h=this.GetVerb(VERB_COMPLETED);f||(h=e?this.GetVerb(VERB_PASSED):this.GetVerb(VERB_FAILED));d={verb:h,object:g,context:this.GetContext(this.m_tcComm.FormatUri(d))};f||(d.result={score:{scaled:a/100,raw:b,min:0,max:c},success:e?!0:!1});this.PutStatement(d,REQ_TYPE_TRACKING)};
ppTinCanApi.prototype.NotifyCourseStarted=function(){var a={id:this.m_tcComm.FormatUri()};this.PutStatement({verb:this.GetVerb(VERB_ATTEMPTED),object:a,context:this.GetContext(this.m_tcComm.FormatUri()),result:{completion:!1}},REQ_TYPE_TRACKING)};
ppTinCanApi.prototype.NotifyViewedComplete=function(a,b){var c={id:this.m_tcComm.FormatUri()},d={};d[this.m_tcComm.FormatUri("viewcount")]=a;d={completion:!0,duration:this.ConvertMSToISO(b),extensions:d};this.PutStatement({verb:this.GetVerb(VERB_COMPLETED),object:c,result:d,context:this.GetContext(this.m_tcComm.FormatUri())},REQ_TYPE_TRACKING)};
ppTinCanApi.prototype.NotifySlideViewed=function(a){a={id:this.m_tcComm.FormatUri(a)};this.PutStatement({verb:this.GetVerb(VERB_EXPERIENCED),object:a,context:this.GetContext(this.m_tcComm.FormatUri())},REQ_TYPE_TRACKING)};ppTinCanApi.prototype.LogQuestion=function(a,b,c,d,e,f,g,h){"likert"==e?this.LogLikertQuestion(a,b,c,d):this.LogNormalQuestion(a,b,c,d,e,f,g,h)};
ppTinCanApi.prototype.LogLikertQuestion=function(a,b,c,d){if(null!=d&&0<d.length)for(var e=null,f=0,f=0;f<d.length;f++){var e=d[f],g={id:this.m_tcComm.FormatUri(b,c,this.GetSimpleId(e.Statement))},e={response:this.GetSimpleId(e.Choice)};this.PutStatement({verb:this.GetVerb(VERB_ANSWERED),object:g,result:e,context:this.GetContext(this.m_tcComm.FormatUri(a))},REQ_TYPE_TRACKING)}};
ppTinCanApi.prototype.LogNormalQuestion=function(a,b,c,d,e,f,g,h){var j="",e=this.NormalizeType(e),k=0,l=null;if(null!=d&&0<d.length)switch(e){case "fill-in":case "numeric":for(k=0;k<d.length;k++)l=d[k],0<k&&(j+=TC_DELIM_CHOICE),j+=l.Choice;break;case "sequencing":case "true-false":case "choice":for(k=0;k<d.length;k++)l=d[k],0<k&&(j+=TC_DELIM_CHOICE),j+=this.GetSimpleId(l.Choice);break;case "matching":for(k=0;k<d.length;k++)l=d[k],0<k&&(j+=TC_DELIM_CHOICE),j+=this.GetSimpleId(l.Statement)+TC_DELIM_STATEMENT+
this.GetSimpleId(l.Choice)}b={id:this.m_tcComm.FormatUri(b,c)};j={response:j};if(!f)j.success=g,j.score={raw:Number(h)};this.PutStatement({verb:this.GetVerb(VERB_ANSWERED),object:b,result:j,context:this.GetContext(this.m_tcComm.FormatUri(a))},REQ_TYPE_TRACKING)};ppTinCanApi.prototype.ClosePlayer=function(){return this.m_tcComm.ClosePlayer()};
ppTinCanApi.prototype.PutStatement=function(a){if(1<=this.m_nVersion)a.version="1.0.0";a.actor=this.m_tcComm.GetActorObj();var b=this.m_tcComm.GetHeaders();b.statementId=this.GetUUID();this.m_tcComm.ConvertToPost(REQ_TYPE_TRACKING,this.m_tcComm.GetEndPoint()+"statements/","PUT",JSON.stringify(a),b,null)};ppTinCanApi.prototype.GetContext=function(a){return{contextActivities:{grouping:{id:this.m_tcComm.FormatUri()},parent:{id:a}},registration:this.m_tcComm.GetRegistration()}};
ppTinCanApi.prototype.GetSimpleId=function(a){var b=a.lastIndexOf(".");0<=b&&(a=a.substr(b+1));return a};ppTinCanApi.prototype.NormalizeType=function(a){var b="";switch(a){case "truefalse":b="true-false";break;case "wordbank":case "hotspot":case "multiplechoice":case "multipleresponse":b="choice";break;case "essay":case "fillin":case "numeric":b="fill-in";break;case "matching":b="matching";break;case "sequence":b="sequencing";break;case "likert":b="likert"}return b};
ppTinCanApi.prototype.RequestResumeData=function(a){var b=this.m_tcComm.GetHeaders(),c="agent";1>this.m_nVersion&&(c="actor");b.activityId=this.m_tcComm.FormatUri();b[c]=JSON.stringify(this.m_tcComm.GetActorObj());b.stateId="resume";this.m_tcComm.ConvertToPost(REQ_TYPE_RESUME_RESTORE,this.m_tcComm.GetEndPoint()+"activities/state","GET","",b,a)};
ppTinCanApi.prototype.GetUUID=function(){var a;a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/x/g,function(){return Math.floor(16*Math.random()).toString(16)});return a=a.replace(/y/g,(Math.floor(4*Math.random())+8).toString(16))};ppTinCanApi.prototype.ConvertMSToISO=function(a){var b="P",a=Math.floor(a/10),c=0,d=0,e=0,e=Math.floor(a/864E4),a=a-864E4*e,d=Math.floor(a/36E4),a=a-36E4*d,c=Math.floor(a/6E3);0<e&&(b+=e+"D");return b+"T"+(d+"H")+(c+"M")+((a-6E3*c)/100+"S")};
ppTinCanApi.prototype.GetVerb=function(a){if(1>this.m_nVersion)return a;var b={};switch(a){case VERB_ANSWERED:b.id=VERB_ID_ANSWERED;break;case VERB_ATTEMPTED:b.id=VERB_ID_ATTEMPTED;break;case VERB_COMPLETED:b.id=VERB_ID_COMPLETED;break;case VERB_EXPERIENCED:b.id=VERB_ID_EXPERIENCED;break;case VERB_FAILED:b.id=VERB_ID_FAILED;break;case VERB_PASSED:b.id=VERB_ID_PASSED}return b};function TinCanClient(){}TinCanClient.prototype.GetResumeData=function(){var a=this;this.api.RequestResumeData(function(b){player.tinCanResumeData=b;a.getResumeDataReturned=!0})};TinCanClient.prototype.SetViewBasedComplete=function(){};TinCanClient.prototype.SavePlayerData=function(){};TinCanClient.prototype.handleClosePlayer=function(){this.api.ClosePlayer();return!0};TinCanClient.prototype.handleSlideViewed=function(a){a.trackviews&&this.api.NotifySlideViewed(a.id)};
TinCanClient.prototype.handleInteractionEvaluated=function(a){var b=a.parent,c=b.getQuiz(),d=$.map(a.lmsResponses,function(a){return a.IsPair()?new ppResponsePair(a.ChoiceID(),a.StatementID()):new ppResponsePair(a.ChoiceID(),"")}),e="correct"==a.variables.Status;switch(a.interactionType){case "likert":this.api.LogLikertQuestion(c.id,b.id,a.id,d);return;case "essay":case "fillin":case "numeric":d=[new ppResponsePair(a.lmsResponses[0].lmstext)]}this.api.LogNormalQuestion(c.id,b.id,a.id,d,a.interactionType,
a.issurvey,e,a.variables.Points)};TinCanClient.prototype.reportViewBasedComplete=function(a){this.api.NotifyViewedComplete(a,new Date-this.startTime)};
TinCanClient.prototype.reportQuizComplete=function(a){var b=this,c=a.variables.Score>=a.variables.PassScore;this.api.NotifyQuizComplete(a.variables.PercentScore,a.variables.Score,a.maxscore,a.id,c,a.issurvey);var d=new Date-this.startTime;"view"!=story.scoring.type&&$.each(story.scoring.scorerefs,function(e,f){var g=story.parseObjref(f.ref);g&&g.target&&g.target.id==a.id&&b.api.NotifyCourseComplete(a.variables.PercentScore,c,a.issurvey,d)})};
TinCanClient.prototype.sendResumeData=function(){if(player.useCompactResume){var a=story.toResumeData();""!=a&&this.api.UpdateResumeData(a)}};TinCanClient.prototype.init=function(){var a=this,b=document.location.search.substr(1);a.startTime=new Date;this.api=new ppTinCanApi(b,"1.0");this.GetResumeData();this.api.NotifyCourseStarted();var c=!1;$(window).bind("unload beforeunload",function(){c||(a.api.PostOnClose(),c=!0)})};TinCanClient.prototype.isReady=function(){return this.getResumeDataReturned};bwUtils={DEFAULT_STATE:"_default",GetTime:function(){return player.getAnimationTime()}};
function bwChunk(a){this.m_strRemainder="";this.m_nLength=-1;this.m_strChunkData=this.m_strData="";this.m_nOffset=0;this.isNothing=""==a;var b="",c=0,b=0,d=a,b=a.charAt(0);"~"==b?(c=parseInt(a.charAt(1)),b=a.substr(2,c),b=bwChunk.UBaseNto10(b),a=a.substr(2+c),this.m_nLength=2+c+b):(a=a.substr(1),b=bwChunk.UBaseNto10(b),this.m_nLength=1+b);if(0<b)this.m_strData=a.substr(0,b),a=a.substr(b);this.m_strChunkData=d.substr(0,d.length-a.length);this.m_strRemainder=a}bwChunk.EMPTY_CHUNK="0";
bwChunk.BASE_NUMBER=64;bwChunk.BASE_POW=6;bwChunk.m_arr10to64="0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$".split(",");
bwChunk.m_o64to10={v0:0,v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8,v9:9,va:10,vb:11,vc:12,vd:13,ve:14,vf:15,vg:16,vh:17,vi:18,vj:19,vk:20,vl:21,vm:22,vn:23,vo:24,vp:25,vq:26,vr:27,vs:28,vt:29,vu:30,vv:31,vw:32,vx:33,vy:34,vz:35,vA:36,vB:37,vC:38,vD:39,vE:40,vF:41,vG:42,vH:43,vI:44,vJ:45,vK:46,vL:47,vM:48,vN:49,vO:50,vP:51,vQ:52,vR:53,vS:54,vT:55,vU:56,vV:57,vW:58,vX:59,vY:60,vZ:61,v_:62,v$:63};bwChunk.prototype.ChunkData=function(){return this.m_strChunkData};bwChunk.prototype.Remainder=function(){return this.m_strRemainder};
bwChunk.prototype.Length=function(){return this.m_nLength};bwChunk.prototype.Data=function(){return this.m_strData};bwChunk.prototype.NextChunk=function(){return new bwChunk(this.Remainder())};bwChunk.prototype.Skip=function(a){this.m_nOffset+=a};bwChunk.prototype.NextString=function(a){if(!a)a=this.m_nLength;var b=this.m_strData.substr(this.m_nOffset,a);this.m_nOffset+=a;return b};
bwChunk.prototype.NextBase10=function(a){var b=bwChunk.BaseNto10(this.m_strData.substr(this.m_nOffset,a));this.m_nOffset+=a;return b};bwChunk.prototype.NextUBase10=function(a){var b=bwChunk.UBaseNto10(this.m_strData.substr(this.m_nOffset,a));this.m_nOffset+=a;return b};bwChunk.prototype.NextChunkedBase10=function(){var a=new bwChunk(this.m_strData.substr(this.m_nOffset)),b=a.Length(),a=bwChunk.BaseNto10(a.Data(),a.Length());this.m_nOffset+=b;return a};
bwChunk.prototype.NextChunkedUBase10=function(){var a=new bwChunk(this.m_strData.substr(this.m_nOffset)),b=a.Length(),a=bwChunk.UBaseNto10(a.Data(),a.Length());this.m_nOffset+=b;return a};bwChunk.prototype.IsEmpty=function(){return""==this.Data()};bwChunk.prototype.EOF=function(){return this.m_nOffset>=this.m_strData.length};bwChunk.CreateChunk=function(a){var b=a.length,c=bwChunk.UBase10toN(b),d="";return d=63<b?"~"+c.length+c+a:c+a};
bwChunk.UBase10toN=function(a,b){void 0==b&&(b=-1);for(var c=parseInt(a),d=0,e="",f=!0;0<c||f;)f=!1,d=c&bwChunk.BASE_NUMBER-1,e+=bwChunk.m_arr10to64[d],c>>=bwChunk.BASE_POW;for(;e.length<b;)e+="0";return e};bwChunk.UBaseNto10=function(a){for(var b=0,c="",d=0;d<a.length;d++)c="v"+a.charAt(d),b+=parseInt(bwChunk.m_o64to10[c])<<bwChunk.BASE_POW*d;return b};
bwChunk.Base10toN=function(a,b){void 0==b&&(b=-1);for(var c=parseInt(a),d=0,e="",f=!0,g=0>c,d=1;Math.pow(bwChunk.BASE_NUMBER,d)/2<=Math.abs(a);)d++;b<d&&(b=d);if(g){for(d=0;-c>=Math.pow(bwChunk.BASE_NUMBER,d)/2;)d++;c=Math.pow(bwChunk.BASE_NUMBER,d)+c}for(;0<c||f;)f=!1,d=c&bwChunk.BASE_NUMBER-1,e+=bwChunk.m_arr10to64[d],c>>=bwChunk.BASE_POW;for(;e.length<b;)e+=g?"$":"0";return e};
bwChunk.BaseNto10=function(a){for(var b=0,c="",d=0;d<a.length;d++)c="v"+a.charAt(d),b+=parseInt(bwChunk.m_o64to10[c])<<bwChunk.BASE_POW*d;a=Math.pow(bwChunk.BASE_NUMBER,a.length)/2;b>=a&&(b-=2*a);return b};bwChunk.GlobalReplace=function(a,b,c){b=b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");return a.replace(RegExp(b,"g"),c)};bwChunk.GlobalUnReplace=function(a,b,c){return bwChunk.GlobalReplace(a,c,b)};
bwChunk.StringEncodings=[["^","^0"],["&","^1"],["'","^2"],["+","^3"],[String.fromCharCode(10),"^4"],[String.fromCharCode(13),"^5"],["?","^6"],[",","^7"],["%","^8"],["\\","^9"],['"',"^A"],["\u2018","^B"],["\u2019","^C"],["\u201c","^D"],["\u201d","^E"]];bwChunk.EncodeString=function(a){$.each(bwChunk.StringEncodings,function(b,c){a=bwChunk.GlobalReplace(a,c[0],c[1])});return a};bwChunk.DecodeString=function(a){$.each(bwChunk.StringEncodings,function(b,c){a=bwChunk.GlobalReplace(a,c[1],c[0])});return a};function PathLib(){}PathLib.prototype.loadFromXML=function(a){var b=this;this.xml=a;this.id=$(a).attr("id");this.paths={};$(a).children("path").each(function(a,d){b.paths[$(d).attr("i")]=$(d).attr("p")})};PathLib.getPath=function(a,b){return story.pathlibs[a]&&story.pathlibs[a].paths[b]?story.pathlibs[a].paths[b]:""};PathLib.getPathFromXML=function(a){return PathLib.getPath($(a).attr("l"),$(a).attr("i"))};function BezierPath(a){a?this.setPoints(a):this.points=[]}BezierPath.nCr=function(a,b){for(var c=1,d=1;d<=b;d++)c*=(a+1-d)/d;return c};BezierPath.prototype.setPoints=function(a){a[0].time=0;a[a.length-1].time=100;this.points=a};
BezierPath.prototype.loadFromXML=function(a,b){var c=[];$(a).find("segment").children().each(function(a,e){var f=parseInt($(e).attr("x"))-b.x,g=parseInt($(e).attr("y"))-b.y;c.push({x:f,y:g})});this.setPoints(c);this.duration=$(a).attr("duration");this.easing=$(a).attr("easing");this.easingdir=$(a).attr("easingdir")};
BezierPath.prototype.getXYAtTime=function(a){var b=this.points;if(a<b[0].time)return b[0];if(a>b[b.length-1].time)return b[b.length-1];for(var c=0,d=b.length-1,e=1;e<b.length;e++){var f=b[e];if(a<f.time){d=e;break}void 0!=f.time&&(c=e)}for(var g=d-c,e=b[c].time,a=(a-e)/(b[d].time-e),h=d=0,e=0;e<=g;e++)var f=b[c+e],j=BezierPath.nCr(g,e)*Math.pow(1-a,g-e)*Math.pow(a,e),d=d+j*f.x,h=h+j*f.y;return{x:parseInt(d),y:parseInt(h)}};BezierPath.EasingSteps=[0,15,23.75,32.5,41.25,50,58.75,67.5,76.25,85,100];
BezierPath.DirectSteps=[0,10,20,30,40,50,60,70,80,90,100];
BezierPath.prototype.toKeyFrames=function(){var a="linear"!=this.easing,b="",c=BezierPath.DirectSteps;if(a)c=BezierPath.DirectSteps;for(var d=0;d<BezierPath.DirectSteps.length;d++){var e=c[d],f=this.getXYAtTime(BezierPath.DirectSteps[d]),g="linear";0==d&&a?g="ease-in":d==BezierPath.DirectSteps.length-2&&a&&(g="ease-out");block=e+"% {-webkit-transform: translateX("+f.x+"px) translateY("+f.y+"px);-webkit-animation-timing-function:"+g+";}";b+=block+"\r\n"}return"{"+b+"}"};var ZoomPan=function(){this.target=null;this.duration=750};ZoomPan.prototype.loadFromXML=function(a){this.lastx=parseInt($(a).attr("lastx"));this.lasty=parseInt($(a).attr("lasty"));this.lastwidth=parseInt($(a).attr("lastwidth"));this.lastheight=parseInt($(a).attr("lastheight"));this.xpos=parseInt($(a).attr("xpos"));this.ypos=parseInt($(a).attr("ypos"));this.width=parseInt($(a).attr("width"));this.height=parseInt($(a).attr("height"));this.duration=parseInt($(a).attr("duration"));this.staticimage=$(a).attr("staticimage")};
ZoomPan.prototype.getZoomModifier=function(){return player.currentWindow?player.currentWindow.zoomModifier:1};
ZoomPan.prototype.getStartCss=function(){var a=player.width/this.lastwidth,a=a*this.getZoomModifier(),b=this.lastx*a,c=this.lasty*a,d="translate3d("+-b+"px,"+-c+"px,0px) scale("+a+") rotate(0deg)";0==b&&0==c&&1==a&&(d="");return{"-webkit-transition-property":"","-webkit-transition-duration":"0s","-webkit-transform-origin":"top left","-webkit-transition-timing-function":"ease-in","-webkit-transform":d,"-moz-transition-property":"","-moz-transition-duration":"0s","-moz-transform-origin":"top left",
"-moz-transition-timing-function":"ease-in","-moz-transform":d,"-ms-transition-property":"","-ms-transition-duration":"0s","-ms-transform-origin":"top left","-ms-transition-timing-function":"ease-in","-ms-transform":"translate("+-b+"px,"+-c+"px) scale("+a+") rotate(0deg)"}};
ZoomPan.prototype.getFinishCss=function(){var a=player.width/this.width,a=a*this.getZoomModifier(),b=this.xpos*a,c=this.ypos*a;this.zoomParams={scale:a,scaledx:b,scaledy:c};var d="translate3d("+-b+"px,"+-c+"px,0px) scale("+a+") rotate(0deg)";0==b&&0==c&&1==a&&(d="");player.currentWindow&&(this.zoomParams.scale/=player.currentWindow.zoomModifier);return{"-webkit-transition-property":"-webkit-transform, opacity","-webkit-transition-duration":this.duration+"ms","-webkit-transform-origin":"top left",
"-webkit-transition-timing-function":"ease-in","-webkit-transform":d,"-moz-transition-property":"-moz-transform, opacity","-moz-transition-duration":this.duration+"ms","-moz-transform-origin":"top left","-moz-transition-timing-function":"ease-in","-moz-transform":d,"-ms-transition-property":"-ms-transform, opacity","-ms-transition-duration":this.duration+"ms","-ms-transform-origin":"top left","-ms-transition-timing-function":"ease-in","-ms-transform":"translate("+-b+"px,"+-c+"px) scale("+a+") rotate(0deg)"}};
ZoomPan.prototype.applyCss=function(a,b){$.each(a,function(a,d){$(b).css(a,d)})};ZoomPan.prototype.apply=function(a){var b=this;b.applyCss(b.getStartCss(),a);setTimeout(function(){b.applyCss(b.getFinishCss(),a);player.zoomParams=b.zoomParams},0)};var swipe={swiping:!1,animating:!1,moved:!1,x:0,y:0,vx:0,vy:0,downX:0,downY:0,lastX:0,lastY:0,startTime:0,lastTime:0,quick:200,normal:300,modes:{follow:"follow",none:"none"}};
swipe.parseEventCoords=function(a){a.originalEvent.touches?0<a.originalEvent.touches.length?(swipe.x=a.originalEvent.touches[0].pageX,swipe.y=a.originalEvent.touches[0].pageY):(swipe.x=a.originalEvent.changedTouches[0].pageX,swipe.y=a.originalEvent.changedTouches[0].pageY):(swipe.x=a.pageX,swipe.y=a.pageY);if(!a.frameScaled){swipe.rawX=swipe.x;swipe.rawY=swipe.y;var b=$(".framewrap").offset(),c=swipe.x-b.left,d=swipe.y-b.top;player.scaleWithTransform?(swipe.x=parseInt(c/player.frameScale+b.left),
swipe.y=parseInt(d/player.frameScale+b.top)):(swipe.x=parseInt(c/player.frameScale+b.left/player.frameScale),swipe.y=parseInt(d/player.frameScale+b.top/player.frameScale))}a.frameScaled=!0};
swipe.sniff=function(a,b){if(!a.originalEvent)a.originalEvent=a;swipe.lastX=swipe.x;swipe.lastY=swipe.y;swipe.parseEventCoords(a);swipe.deltaX=swipe.x-swipe.downX;swipe.deltaY=swipe.y-swipe.downY;swipe.deltaX*=1/player.currentZoom();swipe.deltay*=1/player.currentZoom();if(b){var c=new Date-swipe.lastTime;swipe.vx=(swipe.x-swipe.lastX)/c/player.currentZoom();swipe.vy=(swipe.y-swipe.lastY)/c/player.currentZoom()}swipe.lastTime=new Date;if(10<Math.abs(swipe.deltaX)||10<Math.abs(swipe.deltaY))swipe.moved=
!0};
swipe.getSlideCoords=function(a){a=a||player.currentSlide();if(!a.ref)return{x:0,y:0};var b=a.ref.offset(),c=$(".framewrap").offset();if(player.scaleWithTransform)b.left=(b.left-c.left)/player.frameScale+c.left,b.top=(b.top-c.top)/player.frameScale+c.top;b.left-=a.x;b.top-=a.y;a=(swipe.x-b.left)/player.currentZoom();b=(swipe.y-b.top)/player.currentZoom();player.zoomParams&&(a/=player.zoomParams.scale,b/=player.zoomParams.scale);1!=player.windowZoomModifier&&(a*=player.frameScale,b*=player.frameScale);return{x:parseInt(a),
y:parseInt(b)}};swipe.noteDownCoords=function(){swipe.downX=swipe.x;swipe.downY=swipe.y;swipe.moved=!1;swipe.startTime=new Date};swipe.hasMoved=function(a){if(a)return swipe.x!=swipe.downX||swipe.y!=swipe.downY;var a=Math.abs(swipe.x-swipe.downX),b=Math.abs(swipe.y-swipe.downY);return 3<a||3<b};function BitMask(a,b,c,d,e){this.isOpaque=a;this.width=b||0;this.height=c||0;this.sourceWidth=d||this.width;this.sourceHeight=e||this.height}BitMask.showDebug=!1;BitMask.debugOnly=!1;BitMask.max=function(a,b){return a>b?a:b};BitMask.min=function(a,b){return a<b?a:b};BitMask.prototype.loadFromImageUrl=function(a,b){var c=this,d=new Image;d.onload=function(){c.loadFromImage(d);b&&b(d)};d.src=a};
BitMask.prototype.loadFromImage=function(a){var b=document.createElement("canvas");b.width=a.width;b.height=a.height;this.width=a.width;this.height=a.height;b=b.getContext("2d");b.drawImage(a,0,0);this.loadFromContext(b,a.width,a.height)};BitMask.prototype.loadFromContext=function(a){this.pixels=[];for(var a=a.getImageData(0,0,this.width,this.height).data,b=0,c=0;c<this.height;c++){for(var d=[],e=0;e<this.width;e++)d.push(0!=a[b]||0!=a[b+1]||0!=a[b+2]||0!=a[b+3]),b+=4;this.pixels.push(d)}};
BitMask.prototype.loadFromRLE=function(a){this.pixels=[];var b=a.indexOf("X")>a.indexOf("O");-1==a.indexOf("O")&&(b=!1);for(var a=a.replace(/O/ig,"X").split("X"),c=[],d=0;d<a.length;d++){var e=parseInt(a[d],16);isNaN(e)&&(e=0);for(b=!b;0<=e;)c.length>this.sourceWidth-1&&(this.pixels.push(c),c=[]),c.push(b),e--}this.pixels.push(c);(this.sourceWidth!=this.width||this.sourceHeight!=this.height)&&this.fixScale()};
BitMask.prototype.fixScale=function(){for(var a=[],b=0;b<this.height;b++){for(var c=this.pixels[parseInt(b*this.sourceHeight/this.height)],d=[],e=0;e<this.width;e++){var f=parseInt(e*this.sourceWidth/this.width);d[e]=c[f]}a[b]=d}this.pixels=a};BitMask.prototype.resize=function(a,b,c,d){this.width=a;this.height=b;this.xoffset=c;this.yoffset=d};
BitMask.prototype.testOverlap=function(a,b,c,d){var e=this.width>b&&a.width>-b&&this.height>c&&a.height>-c;return!e||this.isOpaque&&a.isOpaque?e:this.testPixelOverlap(a,b,c,d)};
BitMask.prototype.testPixelOverlap=function(a,b,c,d){var b=parseInt(b),c=parseInt(c),e=0,f=BitMask.min(a.width+b,this.width);0<b&&(e=b,f=BitMask.min(this.width,this.width+b));var g=BitMask.min(f-e,a.width),h=0,j=BitMask.min(a.height+c,this.height);0<c&&(h=c,f=BitMask.min(this.height,this.height+c));f=BitMask.min(j-h,a.height);if(BitMask.showDebug){if(!BitMask.testCanvas)BitMask.testCanvas=$("<canvas id='test' width='1000' height='1000' style='position:absolute;z-index:200;left:0px;top:0px;'></canvas>"),
$(document.body).append(BitMask.testCanvas),BitMask.testContext=BitMask.testCanvas.get(0).getContext("2d"),BitMask.testContext.fillStyle="rgba(255,255,0,0.5)";BitMask.testCanvas.show();clearTimeout(BitMask.testCanvasClear);BitMask.testCanvasClear=setTimeout(function(){BitMask.testCanvas.hide()},1E3)}if(BitMask.showDebug)BitMask.testContext.fillStyle="rgba(255,255,0,0.5)",BitMask.testContext.clearRect(0,0,1E3,1E3),BitMask.testContext.fillRect(e,h,g,f);j=parseInt(10*Math.random())+30;BitMask.debugOnly&&
(j=1);for(var k=0,l=h;l<h+f;l++){for(k=e+k;k<e+g;k+=j){var m=this.isPointActive(k,l),n=a.isPointActive(k-b,l-c);if(m&&n){m=d&&d(k,l);if(BitMask.showDebug)m?(BitMask.testContext.fillStyle="rgba(255,0,0,0.9)",BitMask.testContext.fillRect(k-1,l-1,2,2)):(BitMask.testContext.fillStyle="rgba(0,255,0,0.9)",BitMask.testContext.fillRect(k-2,l-2,4,4));if(!m&&!BitMask.debugOnly)return!0}}k=k%g%j}return!1};
BitMask.prototype.isPointActive=function(a,b){if(this.isOpaque)return!0;a=parseInt(a);b=parseInt(b);return a<this.xoffset||a>=this.xoffset+this.width||b<this.yoffset||b>=this.yoffset+this.height||0>b||0>a||b>=this.pixels.length||a>=this.pixels[b].length?!1:this.pixels[b][a]};
BitMask.prototype.drawDebug=function(a){if(!this.isOpaque)if(a=a.getContext("2d"),this.isOpaque)a.fillStyle="#f00",a.fillRect(0,0,this.width,this.height);else for(var b=0;b<this.height&&b<this.pixels.length;b++)for(var c=0;c<this.width&&c<this.pixels[b].length;c++)a.fillStyle=this.pixels[b][c]?"#00f":"#000",a.fillRect(c,b,1,1)};var ResumeParser=function(){};ResumeParser.dump=function(a,b){for(var b=b||0,c=new bwChunk(a),d=0;d<b;d++);c.Data()&&ResumeParser.dump(c.Data(),b+1);c.Remainder()&&ResumeParser.dump(c.Remainder(),b)};var ProgressBar=function(a,b,c){this.container=a||$(document.body);this.ref=b;this.draggable=c;this.dragging=!1;this.index=0;this.zoomModifier=this.count=1;this.onDragUpdate=null;this.ref||this.createRef();c&&this.bindDragEvents()};ProgressBar.prototype.createRef=function(){this.ref=$('<div class="progress-container"><div class="progress-bar"></div></div>');this.container.append(this.ref)};ProgressBar.prototype.show=function(){this.ref.show()};ProgressBar.prototype.hide=function(){this.ref.hide()};
ProgressBar.prototype.update=function(){if(player.currentWindow&&player.currentWindow.progressBar&&this==player.progressBar)player.currentWindow.progressBar.update();else{var a=parseFloat(100*(this.index/this.count));100<a&&(a=100);var b=a+"%";this.ref.children(".progress-bar").css("width",b);this.ref.children(".seek_bar_fill").css("width",b);this.ref.children(".seek_bar_progress").css("left",b);this.index==this.count||100==a?this.ref.children().addClass("full"):this.ref.children().removeClass("full")}};
ProgressBar.prototype.setPercent=function(a){this.index=a*this.count};ProgressBar.prototype.getPercent=function(){return parseFloat(this.index)/parseFloat(this.count)};
ProgressBar.prototype.bindDragEvents=function(){var a=this;a.dragging=!1;var b=function(b){if(player.activeTimeline.enableseek&&!player.frame.readOnlySeekbar&&!$(this).hasClass("locked"))a.dragging=!0,a.wasPlaying=!player.activeTimeline.paused,c(b),a.wasPlaying&&player.activeTimeline.pause()},c=function(b){if(a.dragging){var c=a.ref.offset().left,d=a.ref.width()*a.zoomModifier;swipe.parseEventCoords(b);b=(swipe.x-c)/d;0>b&&(b=0);1<b&&(b=1);if(a.onDragUpdate)a.onDragUpdate(b)}},d=function(b){if(player.activeTimeline.enableseek&&
!player.frame.readOnlySeekbar&&a.dragging)c(b),a.dragging=!1,a.wasPlaying&&parseInt(a.index)!=parseInt(a.count)&&player.activeTimeline.play()};player.isMobile?($(this.ref).bind("touchstart",b),$(window).bind("touchmove",c),$(this.ref).bind("touchend",d),$(document.body).bind("touchend",d),$(window).bind("touchend",d)):($(this.ref).bind("mousedown",b),$(window).bind("mousemove",c),$(this.ref).bind("mouseup",d),$(document.body).bind("mouseup",d),$(window).bind("mouseup",d))};
ProgressBar.getCurrentProgressBar=function(){return player.currentWindow&&player.currentWindow.progressBar?player.currentWindow.progressBar:player.progressBar};var VolumeSlider=function(a){this.button=a;this.visible=this.dragging=!1;this.volume=80;this.onDragUpdate=null;this.createRef();this.bindDragEvents();VolumeSlider.sliderList.push(this)};VolumeSlider.sliderList=[];
VolumeSlider.prototype.createRef=function(){this.button.find(".volume-slider").remove();this.ref=$('<div class="volume-touchpad"><div class="volume-slider"><div class="volume-handle"></div></div></div>');this.handle=this.ref.children().children().first();this.icon=this.button.children().first();this.button.prepend(this.ref)};VolumeSlider.prototype.toggle=function(){this.visible?this.hide():this.show()};VolumeSlider.prototype.show=function(){this.button.addClass("volume-open");this.visible=!0};
VolumeSlider.prototype.hide=function(){this.button.removeClass("volume-open");this.visible=this.dragging=!1};VolumeSlider.prototype.setVolume=function(a){this.volume=a;this.update()};VolumeSlider.prototype.update=function(){this.handle.css("top",parseInt(100-this.volume)+"%")};
VolumeSlider.prototype.bindDragEvents=function(){var a=this;a.dragging=!1;var b=function(b){a.dragging=!0;c(b);return!1},c=function(b){if(a.dragging){var c=a.ref.offset().top,d=a.ref.height();swipe.parseEventCoords(b);b=1-(swipe.y-c)/d;player.scaleWithTransform&&(b=1-(swipe.rawY-c)/d);0>b&&(b=0);1<b&&(b=1);a.volume=parseInt(100*b);a.update();if(a.onDragUpdate)a.onDragUpdate(b);$.each(VolumeSlider.sliderList,function(b,c){if(c!=a)c.volume=a.volume,c.update()});return!1}},d=function(b){c(b);b=a.dragging;
a.dragging=!1;if(b)return a.hide(),!1};player.isMobile?($(this.ref).bind("touchstart",b),$(window).bind("touchmove",c),$(this.ref).bind("touchmove",c),$(this.ref).bind("touchend",d),$(document.body).bind("touchend",d),$(window).bind("touchend",d),this.button.bind("touchend",function(b){a.toggle();MouseEvents.processHideables(b);return!1})):($(this.ref).bind("mousedown touchstart",b),$(window).bind("mousemove touchmove",c),$(this.ref).bind("mouseup touchend",d),$(document.body).bind("mouseup touchend",
d),$(window).bind("mouseup touchend",d),this.button.bind("click",function(b){a.toggle();MouseEvents.processHideables(b);return!1}));MouseEvents.addHideable(".volume-slider",".volume-slider,.icon.volume",function(){a.hide()})};VolumeSlider.updateVolumeIcon=function(a){$(".icon.volume").removeClass("full half low off");0.9<a?$(".icon.volume").addClass("full"):0.5<a?$(".icon.volume").addClass("half"):0<a?$(".icon.volume").addClass("low"):$(".icon.volume").addClass("off")};function ppRect(a,b,c,d){this.left=parseFloat(a);this.top=parseFloat(b);this.right=parseFloat(c);this.bottom=parseFloat(d)}ppRect.prototype.GetWidth=function(){return this.right-this.left};ppRect.prototype.GetHeight=function(){return this.bottom-this.top};ppRect.prototype.Clone=function(){return new ppRect(this.left,this.top,this.right,this.bottom)};ppRect.prototype.Translate=function(a,b){this.left+=a;this.right+=a;this.top+=b;this.bottom+=b};
ppRect.prototype.Widen=function(a,b){this.left-=a;this.right+=a;this.top-=b;this.bottom+=b};ppRect.prototype.AddRect=function(a){if(this.left>a.left)this.left=a.left;if(this.right<a.right)this.right=a.right;if(this.top>a.top)this.top=a.top;if(this.bottom<a.bottom)this.bottom=a.bottom};
ppRect.prototype.RotateRect=function(a){var a=a*Math.PI/180,b=this.GetWidth(),c=this.GetHeight(),d=Math.cos(a),e=Math.sin(a),a=0*d+0*e,f=-0.0*e+0*d,g=b*d+0*e,h=b*e+0*d,j=b*d-c*e,k=b*e+c*d,b=0*d-c*e,e=-0.0*e+c*d,c=Math.min(f,h,k,e),d=Math.min(a,g,j,b),f=Math.max(f,h,k,e),a=Math.max(a,g,j,b);console.warn(d+", "+a+" : "+c+", "+f);return new ppRect(d,c,a,f)};ppRect.prototype.clone=ppRect.prototype.Clone;ppRect.prototype.inflate=ppRect.prototype.Widen;window.ppFudge=0.5;
function ppGraphics(a){ppArt.currentFudge=0;this.m_nXOffset=-a.left;this.m_nYOffset=-a.top;this.m_nWidth=a.right-a.left+1;this.m_nHeight=a.bottom-a.top+1;this.m_bVectorHot=this.m_bForMask=!1;this.m_nFillYPos=this.m_nFillXPos=this.m_nFillRotation=0;this.m_nFillScaleY=this.m_nFillScaleX=1;this.m_bRotatedFill=!1;if(0>=this.m_nWidth)this.m_nWidth=1;if(0>=this.m_nHeight)this.m_nHeight=1;this.m_ptOffset={x:0,y:0};this.m_bLineDrawn=this.m_bStrokeStarted=this.m_bFillStarted=!1;this.m_nCurYPos=this.m_nCurXPos=
0;this.m_arrShadows=[];this.m_bHasInnerShadow=this.m_bHasShadow=!1;this.m_arrStrokeCanvases=[];this.m_oFillCanvas=document.createElement("canvas");this.m_oStrokeCanvas=document.createElement("canvas");this.m_oFillCanvas.width=this.m_nWidth;this.m_oFillCanvas.height=this.m_nHeight;this.m_oStrokeCanvas.width=this.m_nWidth;this.m_oStrokeCanvas.height=this.m_nHeight;this.m_oFillContext=this.m_oFillCanvas.getContext("2d");this.m_oStrokeContext=this.m_oStrokeCanvas.getContext("2d");if(player.canvasDebug&&
(player.monitoringItem&&ppArt.itemID==player.monitoringItem.id||player.originalMonitoringItemID==ppArt.itemID))ppGraphics.setupTraceContext(this.m_oFillContext),ppGraphics.setupTraceContext(this.m_oStrokeContext);this.m_arrStrokeCanvases.push(this.m_oStrokeCanvas);this.lineJoin=this.lineWidth=this.strokeStyle=this.fillStyle=null}ppGraphics.prototype.Destroy=function(){};ppGraphics.prototype.GetOffset=function(){return this.m_ptOffset};
ppGraphics.prototype.GetFinalCanvas=function(a){null==a&&(a=!1);var b=new ppRect(0,0,this.m_nWidth,this.m_nHeight);if(!a)for(var c=null,c=null,d=0,e=0,f=0;f<this.m_arrShadows.length;f++)c=this.m_arrShadows[f],c.bInner?this.DrawInnerShadow(c):(this.DrawShadow(c),d=(this.m_nWidth-c.canvas.width)/2,e=(this.m_nHeight-c.canvas.height)/2,c.nXPos=d+c.nXOffset,c.nYPos=e+c.nYOffset,c=new ppRect(c.nXPos,c.nYPos,c.nXPos+c.canvas.width,c.nYPos+c.canvas.height),b.AddRect(c));this.finalCanvas=document.createElement("canvas");
d=this.finalCanvas.getContext("2d");if(!a&&this.m_bHasShadow){this.m_nWidth=b.GetWidth();this.m_nHeight=b.GetHeight();this.m_ptOffset.x=-b.left;this.m_ptOffset.y=-b.top;this.finalCanvas.width=this.m_nWidth;this.finalCanvas.height=this.m_nHeight;for(f=0;f<this.m_arrShadows.length;f++)if(c=this.m_arrShadows[f],!c.bInner)d.drawImage(c.canvas,c.nXPos-b.left,c.nYPos-b.top),c.canvas.width=1,c.canvas.height=1}else this.finalCanvas.width=this.m_nWidth,this.finalCanvas.height=this.m_nHeight;d.drawImage(this.m_oFillCanvas,
-b.left,-b.top);if(!a)this.m_oFillCanvas.width=1,this.m_oFillCanvas.height=1,this.m_oFillCanvas=null;for(f=0;f<this.m_arrStrokeCanvases.length;f++)if(d.drawImage(this.m_arrStrokeCanvases[f],-b.left,-b.top),!a)this.m_arrStrokeCanvases[f].width=1,this.m_arrStrokeCanvases[f].height=1,this.m_arrStrokeCanvases[f]=null;if(!a&&this.m_bHasInnerShadow){d.save();for(f=0;f<this.m_arrShadows.length;f++)if(c=this.m_arrShadows[f],c.bInner)d.shadowOffsetX=c.nXOffset,d.shadowOffsetY=c.nYOffset,d.shadowBlur=c.nBlur,
d.shadowColor=ppArt.GetColor(c.nColor,c.nAlpha),d.globalCompositeOperation="source-atop",d.drawImage(c.canvas,-10,-10),c.canvas.width=1,c.canvas.height=1;d.restore()}if(player.canvasDebug&&(player.monitoringItem&&ppArt.itemID==player.monitoringItem.id||player.originalMonitoringItemID==ppArt.itemID))this.m_oStrokeContext.dump(),this.m_oFillContext.dump();return this.finalCanvas};
ppGraphics.prototype.AddImage=function(a,b,c,d,e,f){this.m_bFillStarted&&this.FillContext(this.m_oFillContext);if(0==this.m_oFillCanvas.width||0==this.m_oFillCanvas.height)this.m_oFillCanvas.width=a.width*d,this.m_oFillCanvas.height=a.height*e,this.m_oStrokeCanvas.width=this.m_oFillCanvas.width,this.m_oStrokeCanvas.height=this.m_oFillCanvas.height,this.m_nWidth=this.m_oFillCanvas.width,this.m_nHeight=this.m_oFillCanvas.height;var g=a.naturalWidth||a.width,h=a.naturalHeight||a.height;if(this.m_oFillCanvas.width<
Math.ceil(g*d)+b+(this.m_nXOffset+ppArt.currentFudge))this.m_oFillCanvas.width=Math.ceil(g*d)+b+(this.m_nXOffset+ppArt.currentFudge),this.m_nWidth=this.m_oStrokeCanvas.width=this.m_oFillCanvas.width;if(this.m_oFillCanvas.height<Math.ceil(h*e)+c+(this.m_nYOffset+ppArt.currentFudge))this.m_oFillCanvas.height=Math.ceil(h*e)+c+(this.m_nYOffset+ppArt.currentFudge),this.m_nHeight=this.m_oStrokeCanvas.height=this.m_oFillCanvas.height;this.m_bFillStarted=!1;this.m_oFillContext.beginPath();this.m_oFillContext.globalAlpha=
f;b-=ppArt.currentFudge;c-=ppArt.currentFudge;this.m_oFillContext.drawImage(a,0,0,g,h,b+(this.m_nXOffset+ppArt.currentFudge),c+(this.m_nYOffset+ppArt.currentFudge),Math.ceil(g*d),Math.ceil(h*e));this.m_oFillContext.globalAlpha=1};ppGraphics.prototype.StartSolidFill=function(a,b){this.m_bFillStarted&&this.FillContext(this.m_oFillContext);this.m_oFillContext.beginPath();this.m_oFillContext.fillStyle=ppArt.GetColor(a,b);this.m_bFillStarted=!0};
ppGraphics.prototype.StartGradientFill=function(a){this.m_bFillStarted&&this.FillContext(this.m_oFillContext);this.m_oFillContext.beginPath();this.m_oFillContext.fillStyle=a;this.m_bFillStarted=!0};ppGraphics.prototype.EndFill=function(){this.m_bFillStarted&&this.FillContext(this.m_oFillContext);this.m_bFillStarted=!1};
ppGraphics.prototype.StartImageFill=function(a){this.m_bFillStarted&&this.FillContext(this.m_oFillContext);this.m_oFillContext.beginPath();this.m_oFillContext.fillStyle=a;this.m_bFillStarted=!0};
ppGraphics.prototype.StartRotatedImageFill=function(a,b,c,d,e,f){this.m_bFillStarted&&this.FillContext(this.m_oFillContext);this.m_nFillRotation=b;this.m_nFillXPos=c;this.m_nFillYPos=d;this.m_nFillScaleX=e;this.m_nFillScaleY=f;this.m_bRotatedFill=!0;this.m_oFillContext.beginPath();this.m_oFillContext.fillStyle=a;this.m_bFillStarted=!0};
ppGraphics.prototype.SetLineStyle=function(a,b,c,d,e){this.CreateNewStrokeCanvas();this.m_bStrokeStarted=!0;this.strokeStyle=ppArt.GetColor(b,c);this.lineWidth=a;this.lineJoin=d;this.lineCap=e;if(0<a%2)ppArt.currentFudge=window.ppFudge;this.m_oStrokeContext.strokeStyle=this.strokeStyle;this.m_oStrokeContext.lineWidth=this.lineWidth;this.m_oStrokeContext.lineJoin=this.lineJoin};
ppGraphics.prototype.SetGradientLineStyle=function(a,b,c,d){this.CreateNewStrokeCanvas();this.m_bStrokeStarted=!0;this.strokeStyle=b;this.lineWidth=a;this.lineJoin=c;this.lineCap=d;if(0<a%2)ppArt.currentFudge=window.ppFudge;this.m_oStrokeContext.strokeStyle=b;this.m_oStrokeContext.lineWidth=this.lineWidth;this.m_oStrokeContext.lineJoin=this.lineJoin;this.m_bStrokeStarted=!0};ppGraphics.prototype.ClearLineStyle=function(){this.CreateNewStrokeCanvas();this.m_bStrokeStarted=!1};
ppGraphics.prototype.CreateNewStrokeCanvas=function(){ppArt.currentFudge=0;if(!0==this.m_bLineDrawn)this.m_bStrokeStarted&&this.m_oStrokeContext.stroke(),this.m_oStrokeContext.beginPath(),this.m_bLineDrawn=!1};ppGraphics.prototype.AddShadow=function(a,b,c,d,e,f,g,h,j){var k={};k.nXOffset=a;k.nYOffset=b;k.nBlur=c;k.nColor=d;k.nAlpha=e;k.nScale=f;k.nStrength=g;k.nQuality=h;k.bInner=j;this.m_arrShadows.push(k)};
ppGraphics.prototype.DrawShadow=function(a){var b=a.nBlur,c=a.nScale,d=this.GetFinalCanvas(!0),e=document.createElement("canvas"),f=e.getContext("2d");e.height=2*d.height*c+4*b;e.width=d.width*c+2*b;f.shadowOffsetX=0;f.shadowOffsetY=d.height*c+2*b;f.shadowBlur=b;f.shadowColor=ppArt.GetColor(a.nColor,a.nAlpha);f.drawImage(d,0,0,d.width,d.height,b,b,d.width*c,d.height*c);a.canvas=document.createElement("canvas");a.context=a.canvas.getContext("2d");this.m_bHasShadow=!0;a.canvas.height=d.height*c+2*b;
a.canvas.width=d.width*c+2*b;a.context.drawImage(e,0,d.height*c+2*b,e.width,e.height-(d.height*c+2*b),0,0,e.width,e.height-(d.height*c+2*b));for(f=1;f<a.nStrength;f++)a.context.drawImage(e,0,d.height*c+2*b,e.width,e.height-(d.height*c+2*b),0,0,e.width,e.height-(d.height*c+2*b));e.width=1;e.height=1;d.width=1;d.height=1};
ppGraphics.prototype.DrawInnerShadow=function(a){var b=this.GetFinalCanvas(!0);this.m_bHasInnerShadow=!0;a.canvas=document.createElement("canvas");a.canvas.width=b.width+20;a.canvas.height=b.height+20;a.context=a.canvas.getContext("2d");a.context.fillStyle=ppArt.GetColor(a.nColor,a.nAlpha);a.context.moveTo(0,0);a.context.lineTo(a.canvas.width,0);a.context.lineTo(a.canvas.width,a.canvas.height);a.context.lineTo(0,a.canvas.height);a.context.lineTo(0,0);a.context.fill();a.context.globalCompositeOperation=
"destination-out";a.context.drawImage(b,10,10);a.context.globalCompositeOperation="source-over";b.width=1;b.height=1};ppGraphics.prototype.fill=function(){this.m_bFillStarted&&this.FillContext(this.m_oFillContext);this.m_oFillContext.beginPath()};
ppGraphics.prototype.FillContext=function(a){a.save();a.translate(this.m_nXOffset+ppArt.currentFudge,this.m_nYOffset+ppArt.currentFudge);this.m_bRotatedFill&&(a.scale(this.m_nFillScaleX,this.m_nFillScaleY),a.translate(this.m_nFillXPos,this.m_nFillYPos),a.rotate(this.m_nFillRotation));a.fill();this.m_bRotatedFill=!1;a.restore()};ppGraphics.prototype.stroke=function(){this.m_bStrokeStarted&&this.m_oStrokeContext.stroke()};
ppGraphics.prototype.beginPath=function(){this.m_oFillContext.beginPath();this.m_oStrokeContext.beginPath();this.m_bLineDrawn=this.m_bFillStarted=this.m_bStrokeStarted=!1};ppGraphics.prototype.closePath=function(){this.m_oFillContext.closePath();this.m_oStrokeContext.closePath();this.m_oFillContext.drawImage(this.m_oStrokeCanvas,0,0);this.m_oStrokeContext.clearRect(0,0,this.m_oStrokeCanvas.width,this.m_oStrokeCanvas.height)};
ppGraphics.prototype.lineTo=function(a,b){this.m_bForMask&&(a=Math.round(a),b=Math.round(b));this.m_bFillStarted&&this.m_oFillContext.lineTo(a+(this.m_nXOffset+ppArt.currentFudge),b+(this.m_nYOffset+ppArt.currentFudge));if(this.m_bStrokeStarted)this.m_bLineDrawn=!0,this.m_oStrokeContext.lineTo(a+(this.m_nXOffset+ppArt.currentFudge),b+(this.m_nYOffset+ppArt.currentFudge));this.m_nCurXPos=a+(this.m_nXOffset+ppArt.currentFudge);this.m_nCurYPos=b+(this.m_nYOffset+ppArt.currentFudge)};
ppGraphics.prototype.moveTo=function(a,b){this.m_bForMask&&(a=Math.round(a),b=Math.round(b));this.m_oFillContext.moveTo(a+(this.m_nXOffset+ppArt.currentFudge),b+(this.m_nYOffset+ppArt.currentFudge));this.m_oStrokeContext.moveTo(a+(this.m_nXOffset+ppArt.currentFudge),b+(this.m_nYOffset+ppArt.currentFudge));this.m_nCurXPos=a+(this.m_nXOffset+ppArt.currentFudge);this.m_nCurYPos=b+(this.m_nYOffset+ppArt.currentFudge)};
ppGraphics.prototype.bezierCurveTo=function(a,b,c,d,e,f){this.m_bForMask&&(a=Math.round(a),b=Math.round(b),c=Math.round(c),d=Math.round(d),e=Math.round(e),f=Math.round(f));this.m_bFillStarted&&this.m_oFillContext.bezierCurveTo(a+(this.m_nXOffset+ppArt.currentFudge),b+(this.m_nYOffset+ppArt.currentFudge),c+(this.m_nXOffset+ppArt.currentFudge),d+(this.m_nYOffset+ppArt.currentFudge),e+(this.m_nXOffset+ppArt.currentFudge),f+(this.m_nYOffset+ppArt.currentFudge));if(this.m_bStrokeStarted)this.m_bLineDrawn=
!0,this.m_oStrokeContext.bezierCurveTo(a+(this.m_nXOffset+ppArt.currentFudge),b+(this.m_nYOffset+ppArt.currentFudge),c+(this.m_nXOffset+ppArt.currentFudge),d+(this.m_nYOffset+ppArt.currentFudge),e+(this.m_nXOffset+ppArt.currentFudge),f+(this.m_nYOffset+ppArt.currentFudge));this.m_nCurXPos=e+(this.m_nXOffset+ppArt.currentFudge);this.m_nCurYPos=f+(this.m_nYOffset+ppArt.currentFudge)};
ppGraphics.prototype.createLinearGradient=function(a,b,c,d){return this.m_oFillContext.createLinearGradient(a+(this.m_nXOffset+ppArt.currentFudge),b+(this.m_nYOffset+ppArt.currentFudge),c+(this.m_nXOffset+ppArt.currentFudge),d+(this.m_nYOffset+ppArt.currentFudge))};
ppGraphics.prototype.createRadialGradient=function(a,b,c,d,e,f){return this.m_oFillContext.createRadialGradient(a+(this.m_nXOffset+ppArt.currentFudge),b+(this.m_nYOffset+ppArt.currentFudge),c,d+(this.m_nXOffset+ppArt.currentFudge),e+(this.m_nYOffset+ppArt.currentFudge),f)};ppGraphics.prototype.createPattern=function(a,b){return this.m_oFillContext.createPattern(a,b)};
ppGraphics.setupTraceContext=function(a){if(!a.dump){var b={},b=a;b.commands=[];var c=function(c){b["original_"+c]=a[c];b[c]=function(){for(var a="",f=0;f<b[c].arguments.length;f++)switch(""!=a&&(a+=","),typeof b[c].arguments[f]){case "string":a+="'"+b[c].arguments[f]+"'";break;default:a+=b[c].arguments[f]}a="context."+c+"("+a+");";b.commands.push(a);try{eval(a.replace(c,"original_"+c))}catch(g){}}};for(key in a)"function"==typeof a[key]&&c(key);b.dump=function(){console.log(ppArt.item.renderOnUpdateValues.state+
": "+this.commands.join("\r\n"))}}};var ppArt={CMD_CREATE_SHAPE:"0",CMD_CREATE_MASK:"1",CMD_END_PATH:"2",CMD_CLOSE_PATH:"3",CMD_ADD_TEXT:"4",CMD_ADD_IMAGE:"5",CMD_ROTATION_DATA:"6",CMD_ADD_REFLECTION_TEXT:"7",CMD_START_SOLID_FILL:"A",CMD_START_GRADIENT_FILL:"B",CMD_START_BITMAP_FILL:"C",CMD_START_SLIDEBG_FILL:"D",CMD_END_FILL:"E",CMD_START_BITMAP_TILE_FILL:"F",CMD_REPEAT_FILL:"G",CMD_LINE_STYLE:"N",CMD_GRADIENT_LINE_STYLE:"O",CMD_CLEAR_LINE_STYLE:"P",CMD_REPEAT_LINE_STYLE:"Q",CMD_DEFAULT_HOT:"Z",CMD_DRAW_ARC:"a",CMD_DRAW_ELLIPSE:"b",
CMD_DRAW_RECTANGLE:"c",CMD_DRAW_LINE:"d",CMD_DRAW_LINES:"e",CMD_DRAW_POLYGON:"f",CMD_DRAW_CURVE:"g",CMD_DRAW_CLOSED_CURVE:"h",CMD_DRAW_TEXT:"i",CMD_DRAW_SHADOW:"t",CMD_DRAW_SHAPE_SHADOW:"u",CMD_DRAW_REFLECTION:"v",CMD_SOFTEN_EDGES:"w",CMD_DRAW_PERSPECTIVE_SHADOW:"x",LINE_CAP_SQUARE:1,LINE_CAP_FLAT:2,LINE_CAP_ROUND:4,LINE_JOIN_ROUND:8,LINE_JOIN_BEVEL:16,LINE_JOIN_MITER:32,DEGREE_MULTIPLIER:2*Math.PI/360,BASE_NUMBER:64,BASE_POW:6,m_strPath:"",m_nPos:0,m_bPathStarted:!1,m_bShapeStarted:!1,m_nStartX:0,
m_nStartY:0,m_nCurX:0,m_nCurY:0,m_arrGraphics:null,m_listTextOffsets:null,m_arrShadows:null,m_oGraphics:null,m_bDebug:!1,m_nReflectionIndex:-1,m_nLastLineStyle:-1,m_nLastFill:-1,m_bRenderOnSlideBg:!1,m_nSpriteX:-1,m_nSpriteY:-1,currentSlideBackground:null,m_nLineWidth:0,rectRotated:null,polyRotated:null,m_nRotationDistance:0,m_nStartOffset:0,m_o64to10:{"0":0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15,g:16,h:17,i:18,j:19,k:20,l:21,m:22,n:23,o:24,p:25,q:26,r:27,s:28,t:29,u:30,
v:31,w:32,x:33,y:34,z:35,A:36,B:37,C:38,D:39,E:40,F:41,G:42,H:43,I:44,J:45,K:46,L:47,M:48,N:49,O:50,P:51,Q:52,R:53,S:54,T:55,U:56,V:57,W:58,X:59,Y:60,Z:61,_:62,$:63},UBaseNto10:function(a){var b=this.m_nStartOffset,c=0,d=0,e=0;"%"==this.m_strPath.charAt(this.m_nPos+b)&&(a=this.m_o64to10[this.m_strPath.charAt(this.m_nPos+b+1)],b+=2,e=2);for(var f=b;f<b+a;f++)c+=this.m_o64to10[this.m_strPath.charAt(this.m_nPos+f)]<<this.BASE_POW*d,d++;this.m_nStartOffset+=a+e;return c},BaseNto10:function(a){var b=this.m_nStartOffset,
c=0,d=0,e=0;"%"==this.m_strPath.charAt(this.m_nPos+b)&&(a=this.m_o64to10[this.m_strPath.charAt(this.m_nPos+b+1)],b+=2,e=2);for(var f=b;f<b+a;f++)c+=this.m_o64to10[this.m_strPath.charAt(this.m_nPos+f)]<<this.BASE_POW*d,d++;this.m_nStartOffset+=a+e;a=Math.pow(64,a)/2-1;return c-a},FBaseNto10:function(a){var b=this.m_nStartOffset,c=0,c=this.BaseNto10(2),a=this.UBaseNto10(a-2),c="00"==this.m_strPath.substr(b+this.m_nPos,2)?-a/4095:c+a/4095;return Math.round(1E3*c)/1E3},GetColor:function(a,b){void 0==
b&&(b=100);var c;c=b/100;0==c&&(c=0.005);return"rgba("+(a>>16)+","+(a>>8&255)+","+(a&255)+", "+c+")"},GetCommandDescription:function(a){for(var b in ppArt)if(ppArt[b]==a)return b},m_arrColors:[16711680,16776960,16777215,65280,65535,255,16711935,0],m_nCurColor:0,DrawVector:function(a,b,c,d,e,f,g){if(null!=this.m_arrGraphics)for(var h=0;h<this.m_arrGraphics.length;h++)this.m_arrGraphics[h].Destroy();if(null!=a&&null!=a.slide&&a.slide.resource)this.m_nSpriteX=a.x,this.m_nSpriteY=a.y,this.currentSlideBackground=
a.slide.resource;this.m_bRenderOnSlideBg=!1;this.m_arrGraphics=[];this.m_listTextOffsets={};this.m_arrTextPaths=[];if(!a.rectShape)a.rectShape=new ppRect(-1,-1,a.m_nWidth+1,a.m_nHeight+1);this.rectShape=a.rectShape;this.m_nRotation=a.rotation;if(a.matrix)this.m_nRotation=a.matrix.getRotation()/this.DEGREE_MULTIPLIER;this.m_oGraphics=new ppGraphics(a.rectShape);this.m_arrGraphics.push(this.m_oGraphics);this.m_nPos=0;this.m_bShapeStarted=this.m_bPathStarted=!1;this.m_nReflectionIndex=-1;this.m_arrShadows=
null;if(ppArt.item)ppArt.item.charIndex=0,ppArt.item.overStepped=!1;this.DrawPath(b,0,0,c,d,e,f);for(h=0;h<this.m_arrTextPaths.length;h++)b=this.m_nPos,c=this.m_strPath,d=this.m_oGraphics.m_bVectorHot,this.m_nPos=0,this.m_oGraphics.m_bVectorHot=!1,e=this.m_arrTextPaths[h],0!=e.nRotation&&(this.m_oGraphics.m_oFillContext.save(),this.m_oGraphics.m_oFillContext.translate(e.nXPos,e.nYPos),this.m_oGraphics.m_oFillContext.rotate(e.nRotation*Math.PI/180),this.m_oGraphics.m_oFillContext.translate(-e.nXPos,
-e.nYPos),this.m_oGraphics.m_oStrokeContext.save(),this.m_oGraphics.m_oStrokeContext.translate(e.nXPos,e.nYPos),this.m_oGraphics.m_oStrokeContext.rotate(e.nRotation*Math.PI/180),this.m_oGraphics.m_oStrokeContext.translate(-e.nXPos,-e.nYPos)),f=this.m_nStartOffset,this.DrawPath(e.strPath,e.nXPos,e.nYPos,e.textLib,e.fontLib,e.strLinkId),this.m_oGraphics.m_bVectorHot=d,this.m_nStartOffset=f,0!=e.nRotation&&(this.m_oGraphics.m_oFillContext.restore(),this.m_oGraphics.m_oStrokeContext.restore()),this.m_nPos=
b,this.m_strPath=c;if(ppArt.item)ppArt.item.maxCharIndex=Math.max(ppArt.item.charIndex,ppArt.item.maxCharIndex),ppArt.item.hotContexts=[];b=a.canvas.getContext?a.canvas.getContext("2d"):this.item.context;b.save();for(var f=[],j=null,e=d=0,c={x:0,y:0},h=0;h<this.m_arrGraphics.length;h++){if(1==this.m_arrGraphics.length&&null!=this.m_arrShadows){for(var k=this.m_arrGraphics[0],j=null,l=0;l<this.m_arrShadows.length;l++)j=this.m_arrShadows[l],k.AddShadow(j.nXOffset,j.nYOffset,j.nBlurX,j.nColor,j.nAlpha,
j.nScale,j.nStrength,j.nQuality,j.bInner);this.m_arrShadows=null}k=this.m_arrGraphics[h];j={};j.canvas=k.GetFinalCanvas();j.offset=k.GetOffset();j.width=this.m_oGraphics.m_nWidth;j.height=this.m_oGraphics.m_nHeight;if(d<j.canvas.height)d=j.canvas.height;if(e<j.canvas.width)e=j.canvas.width;f.push(j);if(c.x<f[h].offset.x)c.x=f[h].offset.x;if(c.y<f[h].offset.y)c.y=f[h].offset.y;if(ppArt.item&&k.m_bVectorHot&&(ppArt.item.hotContexts.push(j.canvas.getContext("2d")),player.showDebugOverlap))j.canvas.style.border=
"solid 1px #000",document.body.appendChild(j.canvas)}j=null;if(1==f.length)j=f[0].canvas,c=f[0].offset;else{j=document.createElement("canvas");j.width=e;j.height=d;k=j.getContext("2d");for(h=0;h<f.length;h++)k.drawImage(f[h].canvas,c.x-f[h].offset.x,c.y-f[h].offset.y)}if(null!=this.m_arrShadows){k=new ppGraphics(new ppRect(0,0,e,d));k.AddImage(j,0,0,1,1,100);for(h=0;h<this.m_arrShadows.length;h++)j=this.m_arrShadows[h],k.AddShadow(j.nXOffset,j.nYOffset,j.nBlurX,j.nColor,j.nAlpha,j.nScale,j.nStrength,
j.nQuality,j.bInner);j=k.GetFinalCanvas();e=j.width;d=j.height;h=k.GetOffset();0<h.x&&(c.x+=h.x);0<h.y&&(c.y+=h.y)}h=new ppRect(0,0,e,d);d=new ppRect(0,0,e,d);e={x:0,y:0};if(0<=this.m_nReflectionIndex)this.m_nPos=this.m_nReflectionIndex,this.AdjustReflectionBounds(h,e,a.rectShape,this.rectRotated,a.rotation,a.rotatexpos,a.rotateypos,this.m_nRotationDistance);a.canvas.width=h.GetWidth();a.canvas.height=h.GetHeight();g&&g({offX:a.rectShape.left-(e.x+c.x),offY:a.rectShape.top-(e.y+c.y)});b.drawImage(j,
0,0,d.right,d.bottom,e.x,e.y,d.right,d.bottom);b.restore();a.m_nXOffset=a.rectShape.left-(e.x+c.x);a.m_nYOffset=a.rectShape.top-(e.y+c.y);if(0<=this.m_nReflectionIndex)this.m_nPos=this.m_nReflectionIndex,this.DrawReflection(b,a.canvas,a.rectShape,e,this.rectRotated,this.polyRotated,a.rotation,a.rotatexpos,a.rotateypos,this.m_nRotationDistance);for(var m in this.m_listTextOffsets)this.m_listTextOffsets[m].x+=e.x+c.x,this.m_listTextOffsets[m].y+=e.y+c.y;this.currentSlideBackground=null;-1<location.search.indexOf("info=1")&&
b.fillRect(a.rectShape.left,a.rectShape.top,a.rectShape.left+10,a.rectShape.top+10)},DrawPath:function(a,b,c,d,e,f,g){this.m_strPath=a;this.m_oGraphics.beginPath();for(player.lastArt=this;this.m_nPos<this.m_strPath.length;)a=this.m_strPath.charAt(this.m_nPos),this.m_nPos++,this.ExecuteCmd(a,b,c,d,e,f,g);this.m_oGraphics.fill();this.m_oGraphics.stroke()},ExecuteCmd:function(a,b,c,d,e,f,g){switch(a){case this.CMD_ROTATION_DATA:this.m_nPos+=this.StoreRotationData();break;case this.CMD_CREATE_SHAPE:b=
this.m_nPos;c="1"==this.m_strPath.substr(this.m_nPos,1);this.m_oGraphics.fill();this.m_oGraphics.stroke();this.m_oGraphics=new ppGraphics(this.rectShape);this.m_arrGraphics.push(this.m_oGraphics);if(c)this.m_oGraphics.m_bVectorHot=!0;this.m_nPos=b+1;break;case this.CMD_END_PATH:this.m_oGraphics.fill();this.m_oGraphics.stroke();this.m_bPathStarted=this.m_bShapeStarted=!1;this.m_nCurY=this.m_nCurX=0;break;case this.CMD_CLOSE_PATH:this.m_oGraphics.lineTo(this.m_nStartX,this.m_nStartY);this.m_oGraphics.closePath();
this.m_bShapeStarted=!0;this.m_bPathStarted=!1;this.m_nCurY=this.m_nCurX=0;break;case this.CMD_ADD_IMAGE:this.m_nPos+=this.AddImage(b,c,f);break;case this.CMD_START_SOLID_FILL:this.m_nLastFill=this.m_nPos-1;this.m_nPos+=this.StartSolidFill();break;case this.CMD_START_GRADIENT_FILL:this.m_nLastFill=this.m_nPos-1;this.m_oGraphics.fill();this.m_nPos+=this.StartGradientFill(b,c);break;case this.CMD_START_BITMAP_FILL:this.m_nLastFill=this.m_nPos-1;this.m_oGraphics.fill();this.m_nPos+=this.StartBitmapFill(b,
c,f);break;case this.CMD_START_SLIDEBG_FILL:this.m_nLastFill=this.m_nPos-1;this.StartSlideBgFill();break;case this.CMD_END_FILL:this.m_oGraphics.EndFill();break;case this.CMD_START_BITMAP_TILE_FILL:this.m_nLastFill=this.m_nPos-1;this.m_nPos+=this.StartBitmapTileFill(b,c,f);break;case this.CMD_REPEAT_FILL:a=this.m_nPos;this.m_nPos=this.m_nLastFill;g=this.m_strPath.charAt(this.m_nPos);this.m_nPos++;this.ExecuteCmd(g,b,c,d,e,f);this.m_nPos=a;break;case this.CMD_LINE_STYLE:this.m_nLastLineStyle=this.m_nPos-
1;this.m_nPos+=this.SetLineStyle();break;case this.CMD_GRADIENT_LINE_STYLE:this.m_nLastLineStyle=this.m_nPos-1;this.m_nPos+=this.SetGradientLineStyle();break;case this.CMD_CLEAR_LINE_STYLE:this.m_nLineWidth=0;this.m_oGraphics.ClearLineStyle();break;case this.CMD_REPEAT_LINE_STYLE:a=this.m_nPos;this.m_nPos=this.m_nLastLineStyle;g=this.m_strPath.charAt(this.m_nPos);this.m_nPos++;this.ExecuteCmd(g,b,c,d,e,f);this.m_nPos=a;break;case this.CMD_DEFAULT_HOT:if(this.item)this.item.vectorHot=!0;break;case this.CMD_DRAW_ELLIPSE:this.m_nPos+=
this.DrawEllipse(b,c);this.m_oGraphics.closePath();this.m_bPathStarted=!1;break;case this.CMD_DRAW_RECTANGLE:this.m_nPos+=this.DrawRectangle(b,c);this.m_oGraphics.closePath();this.m_bPathStarted=!1;break;case this.CMD_DRAW_LINE:this.m_nPos+=this.DrawLine(b,c);break;case this.CMD_DRAW_LINES:this.m_nPos+=this.DrawLines(b,c);break;case this.CMD_DRAW_POLYGON:this.m_nPos+=this.DrawPolygon(b,c);this.m_oGraphics.closePath();this.m_bPathStarted=!1;break;case this.CMD_DRAW_CURVE:this.m_nPos+=this.DrawCurve(b,
c);break;case this.CMD_DRAW_CLOSED_CURVE:this.m_nPos+=this.DrawCurve(b,c);this.m_oGraphics.closePath();this.m_bPathStarted=!1;break;case this.CMD_DRAW_SHADOW:this.m_nPos+=this.DrawGlobalShadow();break;case this.CMD_DRAW_SHAPE_SHADOW:this.m_nPos+=this.DrawShadow();break;case this.CMD_DRAW_REFLECTION:this.m_nReflectionIndex=this.m_nPos;this.m_nPos+=this.GetReflectionOffset();break;case this.CMD_DRAW_PERSPECTIVE_SHADOW:this.m_nPos+=this.GetPerspectiveShadowOffset();break;case this.CMD_DRAW_TEXT:this.m_nPos+=
this.DrawVectorText(b,c,e);break;case this.CMD_ADD_TEXT:this.m_nPos+=this.AddText(b,c,d,e,g,!1);break;case this.CMD_ADD_REFLECTION_TEXT:this.m_nPos+=this.AddText(b,c,d,e,g,!0)}},GetGradientLine:function(a,b,c,d,e){for(var f=!1;180<=e;)e-=180,f=!f;var e=e*Math.PI/180,g=0,h=0,c=c/2,d=d/2;e<=Math.atan2(d,c)?(g=c,h=Math.tan(e)*c):e<=Math.PI/2?(g=Math.tan(Math.PI/2-e)*d,h=d):e<=Math.PI/2+Math.atan2(c,d)?(g=Math.tan(Math.PI/2-e)*d,h=d):e<=Math.PI&&(g=-c,h=Math.tan(e)*-c);f&&(g=-g,h=-h);return{x1:a+c-g,
y1:b+d-h,x2:a+c+g,y2:b+d+h}},StartGradientFill:function(){this.m_nStartOffset=0;var a=this.UBaseNto10(1),b=this.BaseNto10(2),c=this.BaseNto10(2),d=this.BaseNto10(2),e=this.BaseNto10(2),f=Math.round(360*this.UBaseNto10(2)/4095),g=this.UBaseNto10(1);2==a?(a=d,e<d&&(a=e),b=this.m_oGraphics.createRadialGradient(b+d/2,c+e/2,0,b+d/2,c+e/2,a/2)):(b=this.GetGradientLine(b,c,d,e,f),b=this.m_oGraphics.createLinearGradient(b.x1,b.y1,b.x2,b.y2));a=-1;for(f=0;f<g;f++)c=this.UBaseNto10(4),d=this.UBaseNto10(2),
e=this.UBaseNto10(2),e!=a&&null!=b&&b.addColorStop(e/255,this.GetColor(c,d)),a=e;null!=b&&this.m_oGraphics.StartGradientFill(b);return this.m_nStartOffset},SetGradientLineStyle:function(){this.m_nStartOffset=0;var a=this.UBaseNto10(2),b=this.UBaseNto10(1),c=this.UBaseNto10(1);this.UBaseNto10(1);var d=this.BaseNto10(2),e=this.BaseNto10(2),f=this.BaseNto10(2),g=this.BaseNto10(2),h=360*this.UBaseNto10(2)/4095,j=this.UBaseNto10(1),k="round",l="round";b&this.LINE_CAP_FLAT?k="butt":b&this.LINE_CAP_ROUND?
k="round":b&this.LINE_CAP_SQUARE&&(k="square");b&this.LINE_JOIN_BEVEL?l="bevel":b&this.LINE_JOIN_MITER?l="miter":b&this.LINE_JOIN_ROUND&&(l="round");2==c?(b=f,g<f&&(b=g),d=this.m_oGraphics.createRadialGradient(d+f/2,e+g/2,0,d+f/2,e+g/2,b/2)):(d=this.GetGradientLine(d,e,f,g,h),d=this.m_oGraphics.createLinearGradient(d.x1,d.y1,d.x2,d.y2));for(b=0;b<j;b++)e=this.UBaseNto10(4),f=this.UBaseNto10(2),g=this.UBaseNto10(2),null!=d&&d.addColorStop(g/255,this.GetColor(e,f));null!=d&&this.m_oGraphics.SetGradientLineStyle(a,
d,l,k);return this.m_nStartOffset},SetLineStyle:function(){this.m_nStartOffset=0;var a=this.UBaseNto10(2),b=this.UBaseNto10(4),c=this.UBaseNto10(2),d=this.UBaseNto10(1);this.UBaseNto10(1);var e="round",f="round";0==a&&(a=1.0E-4);this.m_nLineWidth=a;d&this.LINE_CAP_FLAT?e="butt":d&this.LINE_CAP_ROUND?e="round":d&this.LINE_CAP_SQUARE&&(e="square");d&this.LINE_JOIN_BEVEL?f="bevel":d&this.LINE_JOIN_MITER?f="miter":d&this.LINE_JOIN_ROUND&&(f="round");this.m_oGraphics.SetLineStyle(a,b,c,f,e);return this.m_nStartOffset},
AdjustShadowBounds:function(a){this.m_nStartOffset=0;var b=this.FBaseNto10(4),c=this.FBaseNto10(4)-this.m_nRotation,d=this.UBaseNto10(2);this.UBaseNto10(2);var e=this.FBaseNto10(4),f=this.rectShape.GetWidth(),d=d+(f*e-f)/2,e={x:0,y:0},f=b*Math.cos(c*this.DEGREE_MULTIPLIER),c=b*Math.sin(c*this.DEGREE_MULTIPLIER),b=Math.floor(a.left+f-d),f=Math.ceil(a.right+f+d),g=Math.floor(a.top+c-d),d=Math.ceil(a.bottom+c+d);if(b<a.left)a.left=b,e.x=-b;if(g<a.top)a.top=g,e.y=-g;if(f>a.right)a.right=f;if(d>a.bottom)a.bottom=
d;return e},DrawGlobalShadow:function(){if(null==this.m_arrShadows)this.m_arrShadows=[];this.m_nStartOffset=0;var a=this.FBaseNto10(4),b=this.FBaseNto10(4)-this.m_nRotation,c=this.UBaseNto10(4),d=this.UBaseNto10(2),e=this.UBaseNto10(2),f=this.UBaseNto10(2),g=this.UBaseNto10(2),g=this.UBaseNto10(1),h="1"==this.m_strPath.substr(this.m_nPos+21,1);this.m_nStartOffset+=1;var j=this.FBaseNto10(4),k=a*Math.cos(b*this.DEGREE_MULTIPLIER),a=a*Math.sin(b*this.DEGREE_MULTIPLIER),b={};b.nXOffset=k;b.nYOffset=
a;b.nBlurX=e;b.nBlurY=f;b.nColor=c;b.nAlpha=d;b.nScale=j;b.nStrength=1;b.nQuality=g;b.bInner=h;this.m_arrShadows.push(b);return this.m_nStartOffset},DrawShadow:function(){this.m_nStartOffset=0;var a=this.FBaseNto10(4),b=this.FBaseNto10(4)-this.m_nRotation,c=this.UBaseNto10(4),d=this.UBaseNto10(2),e=this.UBaseNto10(2);this.UBaseNto10(2);var f=this.UBaseNto10(2),f=this.UBaseNto10(1),g="1"==this.m_strPath.substr(this.m_nPos+21,1);this.m_nStartOffset+=1;var h=this.FBaseNto10(4),j=a*Math.cos(b*this.DEGREE_MULTIPLIER),
a=a*Math.sin(b*this.DEGREE_MULTIPLIER);this.m_oGraphics.AddShadow(j,a,e,c,d,h,1,f,g);return this.m_nStartOffset},GetPerspectiveShadowOffset:function(){this.m_nStartOffset=0;this.FBaseNto10(4);this.FBaseNto10(4);this.UBaseNto10(4);this.UBaseNto10(2);this.UBaseNto10(2);this.UBaseNto10(2);this.UBaseNto10(2);this.UBaseNto10(1);this.FBaseNto10(4);this.FBaseNto10(4);this.FBaseNto10(4);this.FBaseNto10(4);return this.m_nStartOffset},GetReflectionOffset:function(){this.m_nStartOffset=0;this.UBaseNto10(2);
this.UBaseNto10(2);this.UBaseNto10(2);this.UBaseNto10(2);this.UBaseNto10(2);this.UBaseNto10(2);return this.m_nStartOffset},StoreRotationData:function(){this.m_nStartOffset=0;this.m_nRotationDistance=this.BaseNto10(2);this.rectRotated=new ppRect(this.BaseNto10(2),this.BaseNto10(2),this.BaseNto10(2),this.BaseNto10(2));this.polyRotated=[{x:this.BaseNto10(2),y:this.BaseNto10(2)},{x:this.BaseNto10(2),y:this.BaseNto10(2)},{x:this.BaseNto10(2),y:this.BaseNto10(2)},{x:this.BaseNto10(2),y:this.BaseNto10(2)}];
if(0==this.rectRotated.left&&0==this.rectRotated.right&&0==this.rectRotated.top&&0==this.rectRotated.bottom)this.rectRotated=this.rectShape.Clone(),this.polyRotated=[{x:this.rectShape.left-10,y:this.rectShape.top-10},{x:this.rectShape.right+10,y:this.rectShape.top-10},{x:this.rectShape.right+10,y:this.rectShape.bottom+10},{x:this.rectShape.left-10,y:this.rectShape.bottom+10}];return this.m_nStartOffset},PadBounds:function(a){a.left-=1;a.top-=1;a.right+=1;a.bottom+=1},AdjustReflectionBounds:function(a,
b,c,d,e,f,g,h){this.m_nStartOffset=0;var j=this.UBaseNto10(2);this.UBaseNto10(2);this.UBaseNto10(2);this.UBaseNto10(2);this.UBaseNto10(2);if(0<this.UBaseNto10(2)/100){var k=0,l=0,m=c.bottom;0!=e&&(k=(h+j/2)/Math.sin(e*this.DEGREE_MULTIPLIER),l=k*Math.cos(2*e*this.DEGREE_MULTIPLIER),m=k*Math.sin(2*e*this.DEGREE_MULTIPLIER));h=c.left+Math.sin(2*e*this.DEGREE_MULTIPLIER)*c.left;c=c.top+Math.cos(2*e*this.DEGREE_MULTIPLIER)*c.left;f=f+k-l-(f-d.left)-h;g=g+m-(g-d.top)-c;m=d.GetWidth()-h;l=d.GetHeight()-
c;d=Math.floor(f);k=Math.floor(g);m=Math.ceil(f+m);g=Math.ceil(g+l);if(a.left>d)b.x=-d,a.left=d;if(a.top>k)b.y=-k,a.top=k;if(a.bottom<g)a.bottom=g;if(a.right<m)a.right=m}},DrawReflection:function(a,b,c,d,e,f,g,h,j,k){this.m_nStartOffset=0;var l=this.UBaseNto10(2),m=[this.UBaseNto10(2),this.UBaseNto10(2)],n=[this.UBaseNto10(2)/100,this.UBaseNto10(2)/100],p=this.UBaseNto10(2)/100;if(0<p){var o=document.createElement("canvas");o.style.border="red 1px dashed";o.width=e.GetWidth();o.height=e.GetHeight();
var r=o.getContext("2d");r.save();r.translate(h-e.left,c.GetHeight()-(j-c.top)-(c.bottom-e.bottom));r.scale(1,-1);r.rotate(2*g*this.DEGREE_MULTIPLIER);r.translate(-(h-c.left),-(j-c.top));var s=this.item.m_nXOffset+1,t=this.item.m_nYOffset+1;r.drawImage(b,d.x,d.y,b.width-d.x,b.height-d.y,s,t,b.width-d.x,b.height-d.y);r.restore();Math.sqrt((f[3].x-f[0].x)*(f[3].x-f[0].x)+(f[3].y-f[0].y)*(f[3].y-f[0].y));var z=r.createLinearGradient(f[0].x,f[0].y,f[3].x,f[3].y);r.save();try{z.addColorStop(m[0]/255,"rgba(255, 255, 255, "+
(1-n[0])+")");z.addColorStop(m[1]/255*p,"rgba(255, 255, 255, "+(1-n[1])+")");z.addColorStop(m[1]/255*p+1.0E-4,"rgba(255, 255, 255, 100)");r.fillStyle=z;r.globalCompositeOperation="destination-out";r.moveTo(f[0].x,f[0].y);r.lineTo(f[1].x,f[1].y);r.lineTo(f[2].x,f[2].y);r.lineTo(f[3].x,f[3].y);r.lineTo(f[0].x,f[0].y);r.fill();var m=f=0,C=this.rectShape.bottom+l;0!=g&&(f=(k+l/2)/Math.sin(g*this.DEGREE_MULTIPLIER),m=f*Math.cos(2*g*this.DEGREE_MULTIPLIER),C=f*Math.sin(2*g*this.DEGREE_MULTIPLIER));var B=
f+d.x+h-c.left-m-(h+c.left-e.left)+c.left,D=d.y+j-c.top+C-(c.GetHeight()-j-(c.bottom-e.bottom)),B=B-s,D=D-t;if(this.item.vectorHot){var K=document.createElement("canvas");K.style.border="red 1px dashed";K.width=b.width;K.height=b.height;var L=K.getContext("2d");L.drawImage(b,0,0,b.width,b.height);this.item.vectorHot=!1;ppArt.item.hotContexts.push(L)}a.drawImage(o,0,0,o.width,o.height,B,D,o.width,o.height)}catch(w){}o.width=1;o.height=1}return this.m_nStartOffset},StartSlideBgFill:function(){this.m_nStartOffset=
0;if(null!=this.currentSlideBackground.poolImage){var a=this.currentSlideBackground.poolImage,b=document.createElement("canvas");b.width=a.width;b.height=a.height;b.getContext("2d").drawImage(a,-this.m_nSpriteX,-this.m_nSpriteY);this.m_oGraphics.StartImageFill(this.m_oGraphics.createPattern(b,"no-repeat"));b.width=1;b.height=1}else this.m_bRenderOnSlideBg=!0;return this.m_nStartOffset},StartBitmapFill:function(a,b,c){this.m_nStartOffset=0;var d=this.m_strPath.substr(this.m_nPos,2);this.m_nStartOffset+=
2;this.BaseNto10(2);this.BaseNto10(2);var e=this.BaseNto10(2),f=this.BaseNto10(2),a=this.BaseNto10(2),b=this.BaseNto10(2),g=this.FBaseNto10(4),h=this.FBaseNto10(4),j=360*this.UBaseNto10(2)/4095;this.UBaseNto10(2);var k=c.GetImage(d),c=k.imgNode,d=document.createElement("canvas");d.width=e;d.height=f;e=d.getContext("2d");g=k.nWidth*g/c.naturalWidth;h=k.nHeight*h/c.naturalHeight;f=c.naturalWidth*g/2;k=c.naturalHeight*h/2;e.translate(f+a,k+b);e.rotate(j*this.DEGREE_MULTIPLIER);e.translate(-f,-k);e.scale(g,
h);e.drawImage(c,0,0);this.m_oGraphics.StartImageFill(this.m_oGraphics.createPattern(d,"no-repeat"));d.width=1;d.height=1;return this.m_nStartOffset},StartBitmapTileFill:function(a,b,c){this.m_nStartOffset=0;var d=this.m_strPath.substr(this.m_nPos,2);this.m_nStartOffset+=2;var a=this.BaseNto10(2)+a,b=this.BaseNto10(2)+b,e=this.FBaseNto10(4),f=this.FBaseNto10(4),g=360*this.UBaseNto10(2)/4095;this.UBaseNto10(2);var h=this.UBaseNto10(1),j=c.GetImage(d),c=j.imgNode,k,d=j.nWidth*e/c.naturalWidth,f=j.nHeight*
f/c.naturalHeight;switch(h){case 0:k=document.createElement("canvas");k.width=c.naturalWidth;k.height=c.naturalHeight;h=k.getContext("2d");h.drawImage(c,0,0);break;case 1:k=document.createElement("canvas");k.width=2*c.naturalWidth;k.height=c.naturalHeight;h=k.getContext("2d");h.drawImage(c,0,0);h.save();h.translate(c.naturalWidth,0);h.scale(-1,1);h.drawImage(c,-c.naturalWidth,0);h.restore();break;case 2:k=document.createElement("canvas");k.width=c.naturalWidth;k.height=2*c.naturalHeight;h=k.getContext("2d");
h.drawImage(c,0,0);h.save();h.translate(0,c.naturalHeight);h.scale(1,-1);h.drawImage(c,0,-c.naturalHeight);h.restore();break;case 4:k=document.createElement("canvas"),k.width=2*c.naturalWidth,k.height=2*c.naturalHeight,h=k.getContext("2d"),h.drawImage(c,0,0),h.save(),h.translate(0,c.naturalHeight),h.scale(1,-1),h.drawImage(c,0,-c.naturalHeight),h.restore(),h.save(),h.translate(c.naturalWidth,0),h.scale(-1,1),h.drawImage(c,-c.naturalWidth,0),h.restore(),h.save(),h.translate(c.naturalWidth,c.naturalHeight),
h.scale(-1,-1),h.drawImage(c,-c.naturalWidth,-c.naturalHeight),h.restore()}this.m_oGraphics.StartRotatedImageFill(this.m_oGraphics.createPattern(k,"repeat"),g*this.DEGREE_MULTIPLIER,a,b,d,f);k.width=1;k.height=1;return this.m_nStartOffset},CreateNewShape:function(){this.m_oGraphics.fill();this.m_oGraphics.stroke();this.m_oGraphics=new ppGraphics(this.rectShape);this.m_arrGraphics.push(this.m_oGraphics);this.m_oGraphics.m_bVectorHot=!0},AddImage:function(a,b,c){this.CreateNewShape();this.m_nStartOffset=
0;var d=this.m_strPath.substr(this.m_nPos,2);this.m_nStartOffset+=2;var a=this.FBaseNto10(4)+a,b=this.FBaseNto10(4)+b,e=this.FBaseNto10(4),f=this.FBaseNto10(4),g=this.UBaseNto10(2)/100,c=c.GetImage(d),d=c.imgNode,e=c.nWidth*e/d.naturalWidth,f=c.nHeight*f/d.naturalHeight;0.01>Math.abs(e-1)&&(e=1);0.01>Math.abs(f-1)&&(f=1);this.m_oGraphics.AddImage(d,a+c.nDX,b+c.nDY,e,f,g);this.CreateNewShape();return this.m_nStartOffset},StartSolidFill:function(){this.m_nStartOffset=0;var a=this.UBaseNto10(4),b=this.UBaseNto10(2);
this.m_oGraphics.StartSolidFill(a,b);return this.m_nStartOffset},AddText:function(a,b,c,d,e,f){this.m_nStartOffset=0;var g=this.m_strPath.substr(this.m_nPos,2);this.m_nStartOffset+=2;var h=this.FBaseNto10(4),j=this.FBaseNto10(4),k=this.FBaseNto10(4);this.m_strPath.substr(this.m_nPos+14,1);this.m_nStartOffset+=1;if(!f){var f=c.GetPathById(g,e),l=this.m_nPos,m=this.m_strPath;this.m_nPos=0;this.m_strPath=f;this.m_oGraphics.stroke();this.m_oGraphics.fill();this.m_listTextOffsets[g]={id:g,x:h+a,y:j+b};
this.m_arrTextPaths.push({nStartOffset:void 0,strPath:f,nXPos:h+a,nYPos:j+b,textLib:c,fontLib:d,strLinkId:e,nRotation:k});this.m_nPos=l;this.m_strPath=m}return this.m_nStartOffset},DrawPolygon:function(a,b){this.m_nStartOffset=0;var c=this.UBaseNto10(2),d=this.FBaseNto10(4)+a,e=this.FBaseNto10(4)+b,f=d,g=e;this.m_oGraphics.moveTo(f,g);for(var h=1;h<c;h++)d=this.FBaseNto10(4)+a,e=this.FBaseNto10(4)+b,this.m_oGraphics.lineTo(d,e);this.m_oGraphics.lineTo(f,g);return this.m_nStartOffset},DrawLine:function(a,
b){this.m_nStartOffset=0;var c=this.FBaseNto10(4)+a,d=this.FBaseNto10(4)+b,e=this.FBaseNto10(4)+a,f=this.FBaseNto10(4)+b;this.m_bPathStarted?this.m_oGraphics.lineTo(c,d):(this.m_bPathStarted=!0,this.m_oGraphics.moveTo(c,d),this.m_nStartX=c,this.m_nStartY=d);this.m_oGraphics.lineTo(e,f);this.m_nCurX=e;this.m_nCurY=f;return this.m_nStartOffset},DrawLines:function(a,b){this.m_nStartOffset=0;var c=this.UBaseNto10(2),d=this.FBaseNto10(4)+a,e=this.FBaseNto10(4)+b;this.m_bPathStarted?(trace.noteCanvasCommand("lineTo",
d,e),this.m_oGraphics.lineTo(d,e)):(this.m_bPathStarted=!0,trace.noteCanvasCommand("moveTo",d,e),this.m_oGraphics.moveTo(d,e),this.m_nStartX=d,this.m_nStartY=e);for(var f=1;f<c;f++)d=this.FBaseNto10(4)+a,e=this.FBaseNto10(4)+b,trace.noteCanvasCommand("lineTo",d,e),this.m_oGraphics.lineTo(d,e);this.m_nCurX=d;this.m_nCurY=e;return this.m_nStartOffset},DrawCurve:function(a,b){this.m_nStartOffset=0;var c=(this.UBaseNto10(2)-1)/3,d=this.FBaseNto10(4)+a,e=this.FBaseNto10(4)+b,f,g,h,j,k=0;this.m_bPathStarted?
(trace.noteCanvasCommand("lineTo",d,e),this.m_oGraphics.lineTo(d,e)):(this.m_bPathStarted=!0,trace.noteCanvasCommand("moveTo",d,e),this.m_oGraphics.moveTo(d,e),this.m_nStartX=d,this.m_nStartY=e);this.m_nCurX=d;this.m_nCurY=e;for(k=0;k<c;k++)d=this.FBaseNto10(4)+a,e=this.FBaseNto10(4)+b,f=this.FBaseNto10(4)+a,g=this.FBaseNto10(4)+b,h=this.FBaseNto10(4)+a,j=this.FBaseNto10(4)+b,trace.noteCanvasCommand("bezierCurveTo",d,e,f,g,h,j),this.m_oGraphics.bezierCurveTo(d,e,f,g,h,j),this.m_nCurX=h,this.m_nCurY=
j;return this.m_nStartOffset},DrawRectangle:function(a,b){this.m_nStartOffset=0;var c=this.FBaseNto10(4)+a,d=this.FBaseNto10(4)+b,e=this.FBaseNto10(4),f=this.FBaseNto10(4);this.m_oGraphics.moveTo(c,d);this.m_oGraphics.lineTo(c+e,d);this.m_oGraphics.lineTo(c+e,d+f);this.m_oGraphics.lineTo(c,d+f);this.m_oGraphics.lineTo(c,d);return this.m_nStartOffset},DrawVectorText:function(a,b){this.m_nStartOffset=0;if(this.m_bPathStarted||this.m_bShapeStarted)this.m_oGraphics.fill(),this.m_oGraphics.stroke(),this.m_bShapeStarted=
this.m_bPathStarted=!1;var c=this.m_strPath.substr(this.m_nPos,2);this.m_nStartOffset+=2;for(var d=this.FBaseNto10(4),e=this.UBaseNto10(4),f=this.UBaseNto10(2),g=this.UBaseNto10(1),h=this.UBaseNto10(2),j=[],k=null,l=0;l<h;l++)k={},k.CharCount=this.UBaseNto10(2),k.XPos=this.FBaseNto10(4),k.YPos=this.FBaseNto10(4),j.push(k);if(-1==location.search.indexOf("prewordcount=1")&&(k=this.UBaseNto10(3),h=[],0<k))for(var m=this.UBaseNto10(1),l=0;l<k;l++)h.push(this.UBaseNto10(m));var n=0,p=0,o=0,r=0,s=0,t=ppArt.item;
if(t&&t.animateByCharacter&&!t.characterCanvases)t.characterCanvases=[];var z=0;if(1<j.length)z=j[1].YPos;else if(1==j.length)z=this.m_oGraphics.m_nHeight;for(l=0;l<j.length;l++){for(var k=j[l],h=k.XPos+a+this.m_oGraphics.m_nXOffset,m=k.YPos+b+this.m_oGraphics.m_nYOffset,C=0;C<k.CharCount;C++){n=this.FBaseNto10(4);p=this.UBaseNto10(g);this.m_oGraphics.beginPath();this.m_oGraphics.SetLineStyle(1,16711680,100,"round");if(""!=c){var B=g_listFonts[c];if(B){var D=this.m_oGraphics.m_oFillContext;if(t&&
t.animateByCharacter){var K=j[0].XPos,L=j[0].YPos;if(!(t.characterCanvases.length>t.charIndex&&t.characterCanvases[t.charIndex])){var w=document.createElement("canvas");w.width=n+h;w.height=z;w.className="glyph";D=w.getContext("2d");t.characterCanvases[t.charIndex]={canvas:w,context:D,x:h,y:m,scale:d};t.charIndex++;t.ref.get(0).appendChild(w);$(w).css("left",h-K);$(w).css("top",m-L);D.beginPath();D.fillStyle=ppArt.GetColor(e,255);B.DrawGlyph(p,D,j[0].XPos-0.5,j[0].YPos-0.5,d);D.fill()}}else this.m_oGraphics.StartSolidFill(e,
f),p=B.DrawGlyph(p,D,h,m,d),this.m_oGraphics.fill(),s=Math.max(s,p)}}else ppDebug.debug_trace("Could not find the font with id: "+c);h+=n}h>o&&(o=h);m>r&&(r=m)}this.m_oGraphics.beginPath();s=Math.ceil(s);if(s>this.m_oGraphics.m_nHeight&&ppArt.item)ppArt.item.overStepped=!0,ppArt.item.requiredRenderHeight=s;return this.m_nStartOffset},DrawEllipse:function(a,b){this.m_nStartOffset=0;var c=this.FBaseNto10(4)+a,d=this.FBaseNto10(4)+b,e=this.FBaseNto10(4),f=this.FBaseNto10(4),g=0.5522848*(e/2),h=0.5522848*
(f/2),j=c+e,k=d+f,e=c+e/2,f=d+f/2;this.m_oGraphics.moveTo(c,f);this.m_oGraphics.bezierCurveTo(c,f-h,e-g,d,e,d);this.m_oGraphics.bezierCurveTo(e+g,d,j,f-h,j,f);this.m_oGraphics.bezierCurveTo(j,f+h,e+g,k,e,k);this.m_oGraphics.bezierCurveTo(e-g,k,c,f+h,c,f);return this.m_nStartOffset}};var g_listFonts={};function AddFont(a,b){var c=document.getElementsByTagName("head")[0],d=document.createElement("script");d.type="text/javascript";$(d).load(function(){b(a)});d.src=a;c.appendChild(d)}
function RegisterFonts(a){"string"==typeof a&&(a=a.replace(/[\u000a\u000b\u000c\u000d\u0085\u2028\u2029]/g,""),a=a.replace(/&#x[0-8bcef];/ig,""));var b=null;window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml");for(var a=b.getElementsByTagName("font"),b=null,c=0;c<a.length;c++)b=new ppFont(a[c]),g_listFonts[b.Id]=b}
function ppFont(a){this.m_xmlData=null;this.m_listGlyphs={};this.m_bFontReady=!1;this.CMD_LINE="%";this.CMD_MOVE="^";this.CMD_CURVE="#";this.CMD_LINE_E="!";this.CMD_MOVE_E="(";this.CMD_CURVE_E=")";this.BASE_NUMBER=64;this.BASE_POW=6;this.m_o64to10={v0:0,v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8,v9:9,va:10,vb:11,vc:12,vd:13,ve:14,vf:15,vg:16,vh:17,vi:18,vj:19,vk:20,vl:21,vm:22,vn:23,vo:24,vp:25,vq:26,vr:27,vs:28,vt:29,vu:30,vv:31,vw:32,vx:33,vy:34,vz:35,vA:36,vB:37,vC:38,vD:39,vE:40,vF:41,vG:42,vH:43,
vI:44,vJ:45,vK:46,vL:47,vM:48,vN:49,vO:50,vP:51,vQ:52,vR:53,vS:54,vT:55,vU:56,vV:57,vW:58,vX:59,vY:60,vZ:61,v_:62,v$:63};this.Name=this.GetAttrStr(a,"name");this.Id=this.GetAttrStr(a,"id");this.m_xmlFontData=a;this.m_xmlData=a.getElementsByTagName("g");this.m_bFontReady=!0}
ppFont.prototype.LoadFontXML=function(){var a;window.XMLHttpRequest?a=new XMLHttpRequest:window.ActiveXObject&&(a=new ActiveXObject("MSXML2.XMLHTTP"));a.oOwner=this;this.m_xmlRequest=a;a.onreadystatechange=function(){4==a.readyState&&this.oOwner.OnReady(a.responseXML)};a.open("GET",this.m_strFileName,!0);a.send(null)};ppFont.prototype.GetGlyphData=function(a){var b="";null!=this.m_xmlData[a]?b=this.GetAttrStr(this.m_xmlData[a],"p"):ppDebug.debug_error("Glyph index out of range");return b};
ppFont.prototype.GetAttrStr=function(a,b){return a.attributes.getNamedItem(b).value};ppFont.prototype.DrawGlyph=function(a,b,c,d,e){var f=this.m_listGlyphs[a];null==f&&(this.CreateGlyphData(a),f=this.m_listGlyphs[a]);for(var g=f.length,h=0,j=0;j<g;j++){a=f[j];switch(a.cmd){case 0:b.quadraticCurveTo(e*a.x1+c,e*a.y1+d,e*a.x2+c,e*a.y2+d);h=Math.max(h,e*a.y2+d);break;case 1:b.lineTo(e*a.x1+c,e*a.y1+d);break;case 2:b.moveTo(e*a.x1+c,e*a.y1+d)}h=Math.max(h,e*a.y1+d)}return h};
ppFont.prototype.CreateGlyphData=function(a){this.m_strPath=this.GetGlyphData(a);this.m_nPos=0;var b=this.m_strPath.charAt(this.m_nPos);this.m_nPos++;var c="",d=[];for(this.m_listGlyphs[a]=d;this.m_nPos<this.m_strPath.length;)switch(c=this.m_strPath.charAt(this.m_nPos),this.m_nPos++,c){case this.CMD_CURVE:d.push(new ppGlyphCmd(0,this.BaseNto10(0,2),this.BaseNto10(2,2),this.BaseNto10(4,2),this.BaseNto10(6,2)));this.m_nPos+=8;break;case this.CMD_LINE:d.push(new ppGlyphCmd(1,this.BaseNto10(0,2),this.BaseNto10(2,
2)));this.m_nPos+=4;break;case this.CMD_MOVE:d.push(new ppGlyphCmd(2,this.BaseNto10(0,2),this.BaseNto10(2,2)));this.m_nPos+=4;break;case this.CMD_CURVE_E:d.push(new ppGlyphCmd(0,this.BaseNto10(0,3),this.BaseNto10(3,3),this.BaseNto10(6,3),this.BaseNto10(9,3)));this.m_nPos+=12;break;case this.CMD_LINE_E:d.push(new ppGlyphCmd(1,this.BaseNto10(0,3),this.BaseNto10(3,3),0,0));this.m_nPos+=6;break;case this.CMD_MOVE_E:d.push(new ppGlyphCmd(2,this.BaseNto10(0,3),this.BaseNto10(3,3),0,0));this.m_nPos+=6;break;
default:this.m_nPos--,b==this.CMD_CURVE?(d.push(new ppGlyphCmd(0,this.BaseNto10(0,2),this.BaseNto10(2,2),this.BaseNto10(4,2),this.BaseNto10(6,2))),this.m_nPos+=8):(d.push(new ppGlyphCmd(1,this.BaseNto10(0,2),this.BaseNto10(2,2))),this.m_nPos+=4)}};ppFont.prototype.UBaseNto10=function(a,b){for(var c=0,d="",e=0,f=a;f<a+b;f++)d="v"+this.m_strPath.charAt(this.m_nPos+f),c+=parseInt(this.m_o64to10[d])<<this.BASE_POW*e,e++;return c};
ppFont.prototype.BaseNto10=function(a,b){var c=2047;3==b&&(c=131071);return this.UBaseNto10(a,b)-c};function ppFontLib(a,b){this.m_strFontUrl=b;null==a&&(a="");this.m_strBasePath=a}ppFontLib.prototype.CreateFonts=function(a){null!=this.m_strFontUrl&&0<this.m_strFontUrl.length?AddFont(this.m_strBasePath+this.m_strFontUrl,a):a()};function ppGlyphCmd(a,b,c,d,e){this.cmd=a;this.x1=b;this.y1=c;this.x2=d;this.y2=e}
function ppTextLib(a){this.m_bHasXML=!1;if(null!=a)try{this.m_xmlData=a.getElementsByTagName("textdata"),this.m_bHasXML=!0}catch(b){this.m_bHasXML=!1}else ppDebug.debug_trace("Text data is null")}
ppTextLib.prototype.GetPathById=function(a,b){var c="",d="";if(this.m_bHasXML)try{for(var e=0;e<this.m_xmlData.length;e++)if(c=this.m_xmlData[e].attributes.getNamedItem("id").value,c==a){c=!1;if(null!=b)for(var f=this.m_xmlData[e].getElementsByTagName("link"),g=0;g<f.length;g++)if(strCurLinkId=f[g].attributes.getNamedItem("id").value,strCurLinkId==b){try{var h=f[g].getElementsByTagName("pr");f[g].getElementsByTagName("path");d=0<h.length?PathLib.getPathFromXML(h[0]):f[g].getElementsByTagName("path")[0].firstChild.nodeValue;
c=!0}catch(j){}break}c||(ppDebug.debug_trace("GetPathById matched ids "+a),h=this.m_xmlData[e].getElementsByTagName("pr"),this.m_xmlData[e].getElementsByTagName("path"),d=0<h.length?PathLib.getPathFromXML(h[0]):this.m_xmlData[e].getElementsByTagName("path")[0].firstChild.nodeValue);break}}catch(k){ppDebug.debug_trace("Text data is null");try{d=this.m_xmlData[0].getElementsByTagName("path")[0].firstChild.nodeValue,ppDebug.debug_trace("  fell back on path: "+d)}catch(l){d=""}}return d};function ppImageLib(){this.m_listImages={};this.m_nCount=0}ppImageLib.prototype.AddImage=function(a,b,c,d,e,f,g){var h={};h.Id=a;h.strType=b;h.imgNode=c;h.nWidth=Number(d);h.nHeight=Number(e);h.nDX=Number(f);h.nDY=Number(g);this.m_listImages[a]=h;this.m_nCount++;return h};ppImageLib.prototype.GetImage=function(a){return this.m_listImages[a]};
ppImageLib.prototype.Destroy=function(){for(var a in this.m_listImages)ppDebug.debug_trace("Destroy: "+this.m_listImages[a].Id),this.m_listImages[a].imgNode=null,this.m_listImages[a]=null;this.m_listImages=null};var ppMask={context:null,BASE_NUMBER:ppArt.BASE_NUMBER,BASE_POW:ppArt.BASE_POW,m_o64to10:ppArt.m_o64to10,UBaseNto10:ppArt.UBaseNto10,BaseNto10:ppArt.BaseNto10,FBaseNto10:ppArt.FBaseNto10,DrawPath:function(a,b,c,d,e){this.context=a;this.m_strPath=c;this.rectShape=b;this.context.beginPath();this.m_oGraphics=new ppGraphics(b);this.m_oGraphics.m_oStrokeContext=a;this.m_oGraphics.m_bStrokeStarted=!0;this.m_oGraphics.m_bForMask=!0;this.m_nPos=0;for("6$v$v$v$v$v$v$v$v$v$v$v$v$vZA$$$$00g70uAzWuAzWszH8xBtILxjTxBtIJwr5uAAWnw0T9AaI8w7CLz8g0wVQizxge400wVQizxg0wVQizwgCy00Cy00uAzWuAzW3E"==
c&&trace.noteCanvasCommand("startMaskPath");this.m_nPos<this.m_strPath.length;){a=this.m_strPath.charAt(this.m_nPos);this.m_nPos++;if(this.m_bResetReverse)this.m_bReverseCurve=!1;this.m_bResetReverse=!0;this.ExecuteCmd(a,d,e)}this.context.closePath();"6$v$v$v$v$v$v$v$v$v$v$v$v$vZA$$$$00g70uAzWuAzWszH8xBtILxjTxBtIJwr5uAAWnw0T9AaI8w7CLz8g0wVQizxge400wVQizxg0wVQizwgCy00Cy00uAzWuAzW3E"==c&&trace.noteCanvasCommand("endMaskPath")},ExecuteCmd:function(a,b,c){switch(a){case ppArt.CMD_ROTATION_DATA:this.m_nPos+=
this.StoreRotationData();break;case ppArt.CMD_CREATE_SHAPE:this.m_nPos+=1;break;case ppArt.CMD_START_SOLID_FILL:this.m_nLastFill=this.m_nPos-1;this.m_nPos+=this.StartSolidFill();break;case ppArt.CMD_END_FILL:this.m_oGraphics.EndFill();break;case ppArt.CMD_DRAW_ELLIPSE:this.m_nPos+=this.DrawEllipse(b,c);break;case ppArt.CMD_DRAW_RECTANGLE:this.m_nPos+=this.DrawRectangle(b,c);break;case ppArt.CMD_DRAW_LINE:this.m_nPos+=this.DrawLine(b,c);break;case ppArt.CMD_DRAW_LINES:this.m_nPos+=this.DrawLines(b,
c);break;case ppArt.CMD_DRAW_POLYGON:this.m_nPos+=this.DrawPolygon(b,c);break;case ppArt.CMD_DRAW_CURVE:this.m_bResetReverse=!1;this.m_nPos+=this.DrawCurve(b,c);break;case ppArt.CMD_DRAW_CLOSED_CURVE:this.m_bResetReverse=!1,this.m_nPos+=this.DrawCurve(b,c)}},StoreRotationData:ppArt.StoreRotationData,StartSolidFill:ppArt.StartSolidFill,DrawPolygon:ppArt.DrawPolygon,DrawLine:ppArt.DrawLine,DrawLines:ppArt.DrawLines,DrawCurve:ppArt.DrawCurve,DrawRectangle:ppArt.DrawRectangle,DrawEllipse:ppArt.DrawEllipse};var Frame=function(){this.control_layouts={};this.ready=!1;this.options={};this.colorGroups={};this.sidebarItems={};this.visibleSidebarItems={};this.hasLinksRight=this.hasLinksLeft=!1;this.defaultControlLayout=null;this.hasBottomBar=!1;this.controlOptions={};this.customTabCount=this.tabCount=0;this.options.enableresultsicons=!0};Frame.controlMap={};Frame.presenterVisible=!1;Frame.logoVisible=!1;Frame.LEVEL_BEHAVIOR_MANUAL="manual";Frame.LEVEL_BEHAVIOR_REACHED="reached";
Frame.LEVEL_BEHAVIOR_INSIDE="inside";Frame.LEVEL_RESTRICTION_UNRESTRICTED="unrestricted";Frame.LEVEL_RESTRICTION_REACHED="reached";Frame.LEVEL_RESTRICTION_INSIDE="inside";Frame.FLOW_FREE="free";Frame.FLOW_RESTRICTED="restricted";Frame.FLOW_LOCKED="locked";Frame.NAV_WIDTH=220;Frame.iconSrc="data:image/png;base64, ";
Frame.isPortrait=function(){var a;player.isIOS?(a=player.isCrossDomainFrame?window.orientation:top.window.orientation,a=a/180==parseInt(a/180)):a=(player.isCrossDomainFrame?window.innerWidth:top.window.innerWidth)<(player.isCrossDomainFrame?window.innerHeight:top.window.innerHeight);return a};
Frame.prototype.loadFromXML=function(a){var b=this;b.xml=a;this.defaultLayoutName=$(a).find("bwFrame").attr("default_layout");this.textdirection=$(a).find("bwFrame").attr("textdirection");this.rtl="rtl"==this.textdirection;this.outputtype=$(a).find("bwFrame").attr("outputtype");player.presenters={};$(a).children("bwFrame").children("presenters").children("presenter").each(function(a,b){var e=new Presenter;e.loadFromXML(b);player.presenters[e.id]=e});this.parseOptionGroups(a);this.parseColorSchemes(a);
this.applyColorSchemes();this.applyRTL();$(a).find("control_layouts").children("control_layout").each(function(a,d){var e={controls:{}},f=$(d).attr("name");$(d).children("control").each(function(a,b){e.controls[$(b).attr("name")]="true"==$(b).attr("enabled")});b.control_layouts[f]=e;if(!b.defaultControlLayout)b.defaultControlLayout=e});Frame.initControlMaps();player.slideList=new SlideList;Frame.navLinks=this.parseNavLinks($(a).children().children("nav_data").children("outline"));player.slideList.tree=
new SlideListNode;player.slideList.build(Frame.navLinks,null,null,null,player.slideList.tree);player.slideList.build(Frame.navLinks,$("#slide_list_portrait"));player.slideList.collapseAll();this.ready=!0};
Frame.initControlMaps=function(){Frame.controlMap={previous:$("#control-previous"),next:$("#control-next"),finish:$("#control-finish"),submit:$("#control-submit"),submitall:$("#control-submitall"),volume:$("#control-volume"),seekbar:$("#control-progress,#progressbar"),replay:$(".icon.restart"),pauseplay:$("#control-pauseplay"),resources:$(".tab.resources"),glossary:$(".tab.glossary"),transcript:$(".tab.transcript"),outline:$(".tab.outline"),close_btn:$("#NOT_IMPLEMENTED-close_btn"),search:$("#TODO-resources")};
Frame.windowControlMap={previous:$(".window #control-previous"),next:$(".window #control-next"),finish:$(".window #control-finish"),submit:$(".window #control-submit"),submitall:$(".window #control-submitall"),close_btn:$(".window .closeicon")}};
Frame.prototype.parseNavLinks=function(a,b){var c=this,d=[];$(a).children("links").children().each(function(a,f){var g=f.tagName,h=$(f).attr("type");switch(g){case "slidelink":"action"==h?d.push(c.parseActionLink(f,b)):d.push(c.parseSlideLink(f,b));break;case "slidedrawref":d.push(c.parseSlideDraw(f))}});return d};
Frame.prototype.parseSlideLink=function(a,b){var c={slideid:$(a).attr("slideid"),displaytext:$(a).attr("displaytext"),expand:"true"==$(a).attr("expand"),parent:b};if(0<$(a).children("links").length)c.links=this.parseNavLinks(a,c);var d=story.parseObjref(c.slideid).target;d&&d.navLinks&&d.navLinks.push(c);return c};
Frame.prototype.parseActionLink=function(a,b){var c={actionlinkid:$(a).attr("slideid"),displaytext:$(a).attr("displaytext"),expand:!1,parent:b};if(0<$(a).children("links").length)c.links=this.parseNavLinks(a,c);var d=story.parseObjref(c.actionlinkid).target;story.children[c.actionlinkid]&&(d=story.children[c.actionlinkid]);d&&d.navLinks&&d.navLinks.push(c);return c};Frame.prototype.parseSlideDraw=function(a){return{drawid:$(a).attr("drawid")}};Frame.prototype.setVisibility=function(a,b){b||a.hide()};
Frame.prototype.parseOptionGroups=function(a){var b=this;$(a).children().children("control_options").children("optiongroups").children("optiongroup").each(function(a,d){var e=$(d).attr("name");b.parseOptions(d,e)});if(!b.options.title_enabled&&!b.options.sidebar_enabled&&!b.cant_hide_topbar)b.top_bar_hidden=!0;b.top_bar_hidden&&$(".top_bar").hide();$("#menu_tabs li:first-child span").addClass("active");$("#menu_container>ul:first-child, #menu_container>div:first-child").addClass("active")};
Frame.prototype.parseOptions=function(a,b){var c=this;$(a).children("options").children().each(function(a,e){$(e).get(0);var f=$(e).attr("name"),g=$(e).attr("value"),h="true"==g;c.options[f]=g;if("true"==g||"false"==g)c.options[f]=h;switch(f){case "title_enabled":c.setVisibility($("#storytitle"),h);break;case "title_text":story.title=g;$("#storytitle_section").text(g);document.title=g;break;case "video_enabled":c.options.video_width=parseInt($(e).find("option[name='width']").attr("value"));c.options.video_height=
parseInt($(e).find("option[name='height']").attr("value"));break;case "logo_enabled":h&&($(".landscape_menu").removeClass("no_logo"),$(".logo_background").show());Frame.logoVisible=h;break;case "logo_url":c.logoRef=$("<img/>");0<$(e).find("property[name='width']").length?(c.options.logo_width=parseInt($(e).find("property[name='width']").attr("value"))-20,c.options.logo_height=parseInt($(e).find("property[name='height']").attr("value"))-18,c.logoRef.css("width",c.options.logo_width)):c.logoRef.bind("load",
function(){c.options.logo_width=c.logoRef.height();c.options.logo_height=c.logoRef.height();c.updateLayout()});$(e).attr("value")&&($(".logo_background>.logo_section").append(c.logoRef),$(".logo_background>.logo_section").append("<div class='menu_divider'/>"));c.logoSrc&&c.logoRef.attr("src",c.logoSrc);break;case "html5_logo_url":c.logoSrc=player.basepath+g;c.logoRef&&c.logoRef.attr("src",c.logoSrc);break;case "sidebar_enabled":player.forceMenu||(c.setVisibility($("#control-menu"),h),c.setVisibility($("#portrait_menu"),
h),c.setVisibility($(".landscape_menu"),h));break;case "sidebarpos":$(".landscape_menu").addClass(g);break;case "tabs":c.tabCount=0;c.customTabCount=0;$(e).children("listitems").children("listitem").each(function(a,b){var d=$(b).attr("name"),e="true"==$(b).attr("value"),f=$(b).attr("group");if(e){c.tabCount++;e=function(a,b,d,e){c.addTopTab(a,b,d,e,r)};"sidebar"==f&&(e=function(a,b,d,e){c.addSideTab(a,b,d,e,r)},c.sidebarItems[d]=!0);var g=c.getTextLabel(d);switch(d){case "outline":"qm"==c.outputtype&&
(d="question_list",g=c.getTextLabel(d),""==g&&(d="outline",g=c.getTextLabel(d)));e(f,g,$("#slide_list"),d);break;case "glossary":c.glossaryPanel=new GlossaryPanel;c.glossaryPanel.loadFromXML($(c.xml).find("glossary_data").first());e(f,g,c.glossaryPanel.ref,d);break;case "resources":c.resourcesPanel=new ResourcesPanel;c.resourcesPanel.loadFromXML($(c.xml).find("resource_data").first());e(f,g,c.resourcesPanel.ref,d);break;case "transcript":c.transcriptPanel=new TranscriptPanel;c.transcriptPanel.loadFromXML($(c.xml).find("transcript_data").first());
e(f,g,c.transcriptPanel.ref,d);break;case "customlink":var g=$(b).find("property[name='title']").attr("value"),h=$(b).find("property[name='data']").attr("value"),r="true"==$(b).find("property[name='ignoreSlideLock']").attr("value");c.customTabCount++;e(f,g,h,d,r)}}});break;case "info_enabled":$(e).children("options").children('option[name="default"]').each(function(a,b){var d=$(b).attr("value");c.options.info_enabled_default=d});h&&($(".landscape_menu").removeClass("no_logo"),$(".logo_background").show(),
c.updatePresenter(c.options.info_enabled_default));break;case "wraplistitems":h&&$(".framewrap").addClass("wraplistitems");break;case "seekbar":h?$(e).children("options").children('option[name="readonly"]').each(function(a,b){var d="true"==$(b).attr("value");c.readOnlySeekbar=d}):($(".player_controls").css("display","none!important"),$("#control-progress").css("display","none"));break;case "bottombar_enabled":if(c.setVisibility($(".bottom_bar"),h),c.setVisibility($("#controls"),h),h)c.shouldHaveBottomBar=
!0,c.hasBottomBar=!0}c.parseOptions(e,b)})};
Frame.prototype.addTopTab=function(a,b,c,d,e){var f=this;if("customlink"==d)return f.addTopLink(a,b,c,d,e);f.top_bar_hidden=!1;f.cant_hide_topbar=!0;var g=$('<div class="toptab tab '+d+'"><span class="label '+d+'">'+b+'</span><div class="menu_container"></div></div>');g.children(".menu_container").append(c);"linkright"==a?($("#toplinks_right").prepend(g),f.hasLinksRight=!0):($("#toplinks_left").append(g),f.hasLinksLeft=!0);g.children("span").first().bind("click",function(a){if(g.hasClass("active"))g.removeClass("active");
else if(MouseEvents.processHideables(a),$("#topbar .active").removeClass("active"),g.addClass("active"),!f.registeredTopBar)MouseEvents.addHideable(".toptab.active",".toptab .menu_container, #frameswitch",function(){$(".toptab.active").removeClass("active")}),f.registeredTopBar=!0;return!1})};
Frame.prototype.addSideTab=function(a,b,c,d){a=$('<li class="tab '+d+'"><span class="left label '+d+'">'+b+"</span></li>");$("#menu_tabs").append(a);$("#menu_container").append(c);var e=a.children("span").first();a.bind("click",function(){$("#topbar .active").removeClass("active");$("#menu_tabs .active").removeClass("active");$("#menu_container .active").removeClass("active");e.addClass("active");c.addClass("active");return!1})};
Frame.prototype.addTopLink=function(a,b,c,d,e){var f=$('<div class="toptab customlink"><span class="label '+d+'">'+b+"</span></div>");"linkright"==a?($("#toplinks_right").prepend(f),this.hasLinksRight=!0):($("#toplinks_left").append(f),this.hasLinksLeft=!0);e&&f.addClass("ignorelocked");f.children("span").first().bind("click",function(){(!f.hasClass("locked")||e)&&story.handleEvent("onobjectevent",c,null,!1,!1,!0);return!1})};
Frame.prototype.parseColorSchemes=function(a){var b=this;$(a).children().children("colorschemes").children("colorscheme").children("color_group").each(function(a,d){var e=$(d).attr("name");b.parseColorGroup(d,e)})};Frame.prototype.parseColorGroup=function(a,b){var c={};$(a).children("group_colors").children("color").each(function(a,b){var f=$(b).attr("name"),g=new Background;g.loadFromXML($(b),"fill");c[f]=g});this.colorGroups[b]=c};
Frame.prototype.applyRTL=function(){if(this.rtl){$(document.body).addClass("rtl");var a=$('<div id="control-previous" class="controlbar-button right"><div class="label prev">PREV</div><a class="icon next-slide"></a></div>'),b=$('<div id="control-next" class="controlbar-button right"><a class="icon previous-slide"></a><div class="label next">NEXT</div></div>');$("#control-previous").remove();$("#control-next").remove();a.insertBefore($("#control-submitall"));b.insertBefore($("#control-submitall"));
Frame.initControlMaps()}};
Frame.prototype.applyColorSchemes=function(){if(!player.noframe&&!player.noframecolor&&($.each(story.children,function(a,b){if("Window"==b.innerType&&-1==b.linkid.indexOf("StoryPopup")&&b.ref&&player.frame.colorGroups.window&&player.frame.colorGroups.window.bg)try{b.ref.css("background-color",player.frame.colorGroups.window.bg.toCssString()),b.ref.css("color",player.frame.colorGroups.window.text.toCssString()),b.ref.find("h1").css("color",player.frame.colorGroups.window.text.toCssString()),b.ref.css("border-color",
player.frame.colorGroups.window.divb.toCssString()),b.ref.find("hr").css("border-color",player.frame.colorGroups.window.divb.toCssString())}catch(c){}}),player.isHTML5)){var a=new CustomStyleSheet,b=function(b,c,d){if(player.frame.colorGroups[b]&&player.frame.colorGroups[b][c]){var h=player.frame.colorGroups[b][c].toCssString(),b=player.frame.colorGroups[b][c].toColorString();a.add(d,"background-color",b);a.add(d,"background",h);a.add(d,"background",h.replace("-webkit","-moz"));a.add(d,"background",
h.replace("-webkit","-ms"));(player.isIE8||player.isIE9)&&h.indexOf("progid")}},c=function(b,c,d){if(player.frame.colorGroups[b]&&player.frame.colorGroups[b][c]){var h=player.frame.colorGroups[b][c];switch(h.backgroundType){case "fill":a.add(d,"border-color",h.stops[0].color),1<h.stops.length&&player.frame.colorGroups[b][c].toCssString()}}},d=function(b,c,d,h,j,k){if(player.frame.colorGroups[b]&&player.frame.colorGroups[b][c])switch(b=player.frame.colorGroups[b][c],b.backgroundType){case "fill":b=
b.toColorString(),k&&(b=k+b),j&&(b+=j),a.add(d,h,b)}};b("base","bg","#slidebg");b("base","slide_bg",".framewrap,.bg");b("base","slide_bg",".window.LightboxControlsWnd");b("base","menu_shade",".landscape_menu");c("base","border",".framewrap");c("base","border",".landscape_menu");d("base","text","a,body","color");b("button","btn_bg",".controlbar-button");c("button","btn_border",".controlbar-button");d("button","btn_glow",".controlbar-button","box-shadow"," 0px 0px 1px 1px");player.isMobile||(b("button",
"btn_hover",".controlbar-button:hover"),b("button","btn_bg",".controlbar-button.volume-open:hover"));b("button","btn_down",".controlbar-button.right.pressed");b("seekcontrol","seek_bg","#progressbar");b("seekcontrol","seek_position",".progress-bar");c("seekcontrol","seek_border","#progressbar,.progress-bar");b("seekcontrol","bg","#control-progress");c("seekcontrol","border","#control-progress");b("volume","thumb_bg",".volume-handle");b("volume","slider_bg",".volume-slider");c("volume","thumb_border",
".volume-handle");c("volume","slider_border",".volume-slider");d("volume","thumb_inner",".volume-handle","-webkit-box-shadow"," 0px 0px 1px 1px","inset ");d("volume","thumb_inner",".volume-handle","-moz-box-shadow"," 0px 0px 1px 1px","inset ");d("volume","thumb_inner",".volume-handle","-ms-box-shadow"," 0px 0px 1px 1px","inset ");d("volume","thumb_inner",".volume-handle","box-shadow"," 0px 0px 1px 1px","inset ");b("menu","bg",".menu_container");d("listitem","text","ul.menu_list a","color");d("listitem",
"text","ul.slidelist li","color");player.isMobile||(b("listitem","hover","li.has_children.open li>a:hover"),b("listitem","hover","ul.slidelist li:hover"));b("listitem","selected","ul.menu_list li.selected, ul.menu_list li.selected > a, ul.menu_list li.selected > a:hover");b("listitem","selected","ul.slidelist li.selected, ul.slidelist li.selected > a:hover");d("listitem","lines","ul.menu_list>li","border-top-color");d("listitem","lines","ul.slidelist li.divider","border-bottom-color");d("listitem",
"viewed","ul.menu_list li.visited > a","color");d("listitem","viewed","ul.slidelist li.visited","color");d("listitem","text","ul.menu_list li.visited > a:hover","color");d("listitem","text","ul.slidelist li.visited:hover","color");d("listitem","selected_text","ul.menu_list li.selected > a","color");d("listitem","selected_text","ul.slidelist li.selected","color");d("listitem","text","ul.menu_list li.has_children > span","border-left-color");d("listitem","text","ul.menu_list li.has_children.open > span",
"border-top-color");d("listitem","text","ul.slidelist li>span","border-left-color");d("listitem","text","ul.slidelist li.open>span","border-top-color");b("tabs","bg","ul.menu_nav li span.active, .toptab.active>span");d("tabs","text","ul.menu_nav li span","color");d("tabs","selected","ul.menu_nav li span.active, .toptab.active>span","color");c("window","divb",".toptab.active>span,.toptab .menu_container");c("window","divb",".resources_container hr");d("window","divb",".logo_background .menu_divider",
"border-bottom-color");d("menu","shadow",".toptab .menu_container","-webkit-box-shadow"," 0px 0px 20px");d("menu","shadow",".toptab .menu_container","-moz-box-shadow"," 0px 0px 20px");d("menu","shadow",".toptab .menu_container","-ms-box-shadow"," 0px 0px 20px");d("menu","shadow",".toptab .menu_container","box-shadow"," 0px 0px 20px");b("glossary","bg",".glossary_section");b("tabs","bg",".glossary_section_header");player.isMobile||b("glossary","hover",".glossary_section li:hover");b("glossary","selected",
".glossary_section li.active");d("glossary","selected",".glossary_section li.active","color");d("glossary","diva",".glossary_section_header, .glossary_section:first-child","border-bottom-color");d("glossary","divc",".glossary_section_header","border-top-color");d("glossary","text",".glossary_section a","color");d("glossary","selected_text",".glossary_section li.active a","color");b("glossary","selected",".glossary_section li.active");b("logo","bg",".logo_background>.logo_section");b("infopanel","bg",
".logo_background>.presenter_section");b("infopanel","bg",".logo_background>.presenter_video_section");d("infopanel","shadow",".logo_background","box-shadow"," 0px 1px 0px 0px","");d("infopanel","name_text",".presenter_info .presenter_name","color");d("infopanel","title_text",".presenter_info .presenter_title","color");d("infopanel","link_text",".presenter_info a","color");d("infopanel","link_hover",".presenter_info a:hover","color");b("infopanelpopup","bg",".presenter_detail");d("infopanelpopup",
"name_text",".presenter_detail .presenter_name","color");d("infopanelpopup","title_text",".presenter_detail .presenter_title","color");d("infopanelpopup","link_text",".presenter_detail a","color");d("infopanelpopup","link_hover",".presenter_detail a:hover","color");player.frame.colorGroups.button&&player.frame.colorGroups.button.btn_icon_color&&(b=player.frame.colorGroups.button.btn_text_shadow.stops[0],c=player.frame.colorGroups.seekcontrol.btn_icon_hover.stops[0],this.prepIconSprite(".controlbar-button .icon",
player.frame.colorGroups.button.btn_icon_color.stops[0],b,a),player.isMobile||this.prepIconSprite("#control-progress .icon:hover",c,b,a),d("button","btn_icon_color",".controlbar-button .label","color"),d("button","btn_text_shadow",".controlbar-button .label","text-shadow","","0px 1px 1px "));a.add(".zoombuttoninner","background-image","url("+Frame.iconSrc+")");a.add("ul.slidelist li.correct:before","background-image","url("+Frame.iconSrc+")");a.add("ul.slidelist li.incorrect:before","background-image",
"url("+Frame.iconSrc+")");a.build()}};Frame.prototype.applyBackgroundDirect=function(a,b,c){if(player.frame.colorGroups&&player.frame.colorGroups[a]&&player.frame.colorGroups[a][b]){var d=player.frame.colorGroups[a][b].toCssString(),a=player.frame.colorGroups[a][b].toColorString();$(c).css("background-color",a);$(c).css("background",d)}};Frame.parseRGB=function(a){a=a.replace("#","");return[parseInt(a.substr(0,2),16),parseInt(a.substr(2,2),16),parseInt(a.substr(4,2),16)]};
Frame.prototype.prepIconSprite=function(a,b,c,d){var e=Frame.parseRGB(b.rawcolor),f=Frame.parseRGB(c.rawcolor);e.push(b.alpha);f.push(c.alpha);var g=new Image;$(g).bind("load",function(){var b=document.createElement("canvas");b.width=246;b.height=16;var c=b.getContext("2d");c.drawImage(g,0,0);if(c.getImageData){for(var k=c.getImageData(0,0,b.width,b.height),l=0;l<k.data.length-4;l+=4){var m=k.data[l];0!=k.data[l+3]&&(k.data[l]=e[0],k.data[l+1]=e[1],k.data[l+2]=e[2],k.data[l+3]=255-m)}c.clearRect(k,
0,0,b.width,b.height);c.putImageData(k,0,0);c.shadowColor="rgba("+f[0]+","+f[1]+","+f[2]+","+f[3]+")";c.shadowOffsetX=0;c.shadowOffsetY=1;c.shadowBlur=1;c.clearRect(k,0,0,b.width,b.height);c.drawImage(b,0,0);b=b.toDataURL("image/png");d&&d.add(a,"background-image","url("+b+")");d.build()}else d&&d.add(a,"background-image","url("+Frame.iconSrc+")")});g.src=Frame.iconSrc};
Frame.prototype.set_window_control_layout=function(a){Frame.initControlMaps();player.currentWindow?this.set_frame_layout(a,Frame.windowControlMap):this.set_frame_layout(a)};
Frame.prototype.set_frame_layout=function(a,b){var c=void 0!=b,b=b||Frame.controlMap,d=ProgressBar.getCurrentProgressBar().ref.parent().parent(),e=this,f=$(a).attr("name");e.currentLayoutName=f;var g=e.control_layouts[f];if(!g)g=e.control_layouts[e.defaultLayoutName],e.currentLayoutName=e.defaultLayoutName;if(!g)g=e.defaultControlLayout;if(g){e.updateTextLabels();var h=0,j=!1,k=!1,l=!1,f=this.shouldHaveBottomBar;if(this.options.forceseekbar)g.controls.seekbar=!0,g.controls.pauseplay=!0,g.controls.replay=
!0;if(!c)e.visibleSidebarItems={};$.each(g.controls,function(a,d){var f=b[a];if(f)d?(f.show(),("previous"==a||"next"==a||"submit"==a||"submitall"==a||"finish"==a)&&h++,"volume"==a&&(j=!0),"seekbar"==a&&(k=!0),"pauseplay"==a&&(l=!0)):f.hide();else if("logo"==a)Frame.logoVisible=player.frame.options.logo_enabled&&d;d&&e.sidebarItems[a]&&!c&&(e.visibleSidebarItems[a]=!0)});1!=player.width&&(this.updateLayout(!0),player.isMobile&&this.reorient(!0));var m=35+7*h;$.each(["#control-previous","#control-next",
"#control-submit","#control-submitall","#control-finish"],function(a,b){var c=$(b);"block"==c.css("display")&&(m+=c.get(0).offsetWidth)});j&&(m+=40);g=this.availableWidth-m;d.find("#control-progress").css("width",g);d.find("#control-progress .progress-container").css("width",g-51);!k&&l?(d.find("#progressbar,.icon.restart").hide(),d.find("#control-progress,#control-pauseplay").show(),d.find("#control-progress").css("width",16),d.find("#control-progress").addClass("compact")):d.find("#control-progress").removeClass("compact");
d=$(".landscape_menu #menu_tabs>li>span");3==d.length?(d.css("width","59px"),d.last().css("width","60px")):3<d.length&&$("ul.menu_nav li span").css("padding","0px 4px");!j&&!k&&0==h&&(f=!1);this.hasBottomBar=f;this.updateLayout();0==$("#menu_tabs>.tab:visible>.active").length&&$("#menu_tabs>.tab:visible").first().click()}};Frame.prototype.isSidebarVisible=function(){for(key in this.visibleSidebarItems)return!0;return!1};Frame.prototype.initOrientation=function(){this.updateLayout()};
Frame.prototype.reorient=function(a){1!=player.width&&this.updateLayout(a)};Frame.prototype.updateLayout=function(){this.updateFrameLayout();this.updatePlayerLayout()};
Frame.prototype.updatePlayerLayout=function(){$("#loadingSpinner").css("left",Math.floor(window.innerWidth/2)-50);$("#loadingSpinner").css("top",Math.floor(window.innerHeight/2)-50);$(".blocked").css("left",Math.floor(window.innerWidth/2)-50);$(".blocked").css("top",Math.floor(window.innerHeight/2)-50);if(!player.noframe){var a=this.availableSlideWidth;player.frame.top_bar_hidden?$("#topbar").addClass("empty"):this.options.title_enabled?($("#storytitle").removeClass("alone"),$(".toptab").removeClass("alone"),
$(".toptab").removeClass("notitle"),$("#topbar").removeClass("empty"),!this.hasLinksLeft&&this.hasLinksRight&&($("#storytitle").addClass("alone"),$(".toptab").addClass("alone"))):($("#storytitle").removeClass("alone"),$(".toptab").removeClass("alone"),$("#topbar").removeClass("empty"),$(".toptab").addClass("notitle"),!this.hasLinksLeft&&!this.hasLinksRight&&$("#topbar").addClass("empty"));var b=this.options.logo_enabled&&Frame.logoVisible||Frame.presenterVisible,c=player.frame.options.sidebar_enabled&&
this.isSidebarVisible(),d=$("#topbar").height(),e=player.frame.bottom_bar_hidden||!player.frame.hasBottomBar?-9:41,f=c||b?240:0,g="left"==player.frame.options.sidebarpos?f:0,h=this.containerWidth,j=this.containerHeight;this.bottomBarOffset=e;h=h-f-20+2;e=j-d-e-20+1;this.availableWidth=h;this.availableHeight=e;this.availableSlideWidth=h;this.availableSlideHeight=e;var k="left"==player.frame.options.sidebarpos?0:h+20,f="left"==player.frame.options.sidebarpos?f+10:10,f=f-1;$(".landscape_menu").css("left",
k);$("#controls").css("left",f);$("#controls").css("width",h);$("#topbar").css("left",f);$("#topbar").css("width",h);$(".toptab .menu_container").css("height",parseInt(0.8*e));var f=10,k=g+10-1,j=j-20+2,l=0;this.updateInfoPanel(this.updatePresenter());var m=j-l-25;this.navListHeight=j-l-25;var l=-1,n=null,p=function(){var a=$(".logo_background").height(),a=$(".logo_background").is(":visible")?a+8:0;return a!=l?(m=m+l-a,$(".landscape_menu .menu_container").css("height",m+"px"),l=a,!0):!1},o=200,n=
setInterval(function(){p()?clearInterval(n):0>=o--&&clearInterval(n)},20);p();var r=(e-player.height)/2;if(0<r)f=Math.floor(r+10-5),this.availableSlideHeight=e-2*r;e=(h-player.width)/2;if(0<e)k=e+g+10,this.availableSlideWidth=h-2*e;if(player.isIE&&!player.hasCompensatedIESize)player.width-=2,player.hasCompensatedIESize=!0;d="#slideframe{margin-left:"+k+"px!important;margin-top:"+f+"px!important;top:"+d+"px!important;}#slideframe, .slide{width:"+player.width+"px;height:"+player.height+"px;}.landscape_menu{height: "+
j+"px;}.landscape_menu{display: "+(c||b?"block":"none")+";}.landscape_menu>#menu_tabs,.landscape_menu>#menu_container{display: "+(c?"block":"none")+";}.interstitial{height:"+window.innerHeight+"px;}";player.frame.options.seekbar||(d+=".player_controls{display:none!important;}");if(!player.rotateLandscapeStyleSheet)player.rotateLandscapeStyleSheet=document.createElement("style"),document.body.appendChild(player.rotateLandscapeStyleSheet);player.rotateLandscapeStyleSheet.innerHTML=d;player.landscapeScale=
1;player.zoom=1;(c||b)&&$(".landscape_menu").css("display","");a!=this.availableSlideWidth&&player.currentSlide()&&player.currentSlide().ref&&player.currentSlide().fitToContainer()}};
Frame.prototype.updateFrameLayout=function(){if(!player.isMobile||player.hasNavOutsideFrame){var a=window.innerWidth,b=window.innerHeight,c=story.frameWidth-2,d=story.frameHeight-2,e=1;player.scaleToFit&&(e=story.frameWidth/story.frameHeight>a/b?a/story.frameWidth:b/story.frameHeight,$("document.body").css("overflow","hidden"));var f=parseInt((b-d*e)/2-1),g=parseInt((a-c*e)/2-1);player.scaleWithTransform||(f=parseInt((b-d*e)/2/e-1),g=parseInt((a-c*e)/2/e-1));player.isIE&&(g-=0,f+=1,c-=1,d-=1);0>f&&
(f=0);0>g&&(g=0);this.containerWidth=c;this.containerHeight=d;this.containerLeft=g;this.containerTop=f;this.aspectRatio=c/d;$(".framewrap").css("width",c);$(".framewrap").css("height",d);$(".framewrap").css("top",f);$(".framewrap").css("left",g);a="";a=player.scaleWithTransform?".framewrap{-webkit-transform-origin:top left;-webkit-transform:translate3d(0px,0px,0px) scale("+e+");-moz-transform-origin:top left;-moz-transform:translate3d(0px,0px,0px) scale("+e+");-ms-transform-origin:top left;-ms-transform:translate(0px,0px) scale("+
e+");}":".framewrap{zoom:"+e+";-webkit-transform-origin:top left;-webkit-transform:translate3d(0px,0px,0px);-moz-transform-origin:top left;-moz-transform:translate3d(0px,0px,0px)-ms-transform-origin:top left;-ms-transform:translate(0px,0px)}";if(!player.frameLandscapeStyleSheet)player.frameLandscapeStyleSheet=document.createElement("style"),document.body.appendChild(player.frameLandscapeStyleSheet);player.frameLandscapeStyleSheet.innerHTML=a;player.frameScale=e;var h=0;$(".toptab").each(function(a,
b){$(b).hasClass("customlink")||(h+=$(b).width())});e=Math.floor((this.availableSlideWidth-h)/this.customTabCount);$(".toptab.customlink").css("max-width",e+"px")}};Frame.prototype.getTextLabel=function(a){return $(this.xml).find("string_table").first().children("string[id='"+a+"']").text()};
Frame.prototype.updateTextLabels=function(){$(this.xml).find("string_table").first().children("string").each(function(a,b){var c=$(b).attr("id"),d=$(b).text(),b=$(".label."+c);0<b.length&&(b.text(d),b.parent().hasClass("controlbar-button")&&(c=player.isMobile?0.88:0.82,player.isFF&&(c=1),c=b.get(0).offsetWidth*(1-c),0!=c&&!b.get(0).previousSibling&&"relative"!=b.css("position")&&(b.css("position","relative"),b.css("left",c))))})};
Frame.prototype.updatePresenter=function(a){var b=Frame.presenterVisible;Presenter.clearPresenters();if(!a)a=player.currentSlide().presenterref;player.frame.applyBackgroundDirect("logo","bg",".logo_background>.logo_section");player.frame.applyBackgroundDirect("infopanel","bg",".logo_background>.presenter_section");player.frame.applyBackgroundDirect("infopanel","bg",".logo_background>.presenter_video_section");Frame.presenterTextVisible=!1;Frame.presenterVideoVisible=!1;if(player.currentSlide().presenterVideoData)return-1<
player.currentSlide().presenterVideoData.url.indexOf(".swf")?(Frame.presenterVideoVisible=!1,null):this.updatePresenterVideo(player.currentSlide().presenterVideoData);var c=null;if(a){$(".landscape_menu").removeClass("no_logo");$(".logo_background").show();if(c=player.presenters[a])c.show(),player.currentSlide().presenter=c,Frame.presenterVisible=!0,Frame.presenterTextVisible=!0;else if(!this.options.logo_enabled||!Frame.logoVisible)$(".landscape_menu").addClass("no_logo"),$(".logo_background").hide();
(!this.options.logo_enabled||!Frame.logoVisible)&&player.frame.applyBackgroundDirect("infopanel","bg",".logo_background>.logo_section")}else!this.options.logo_enabled||!Frame.logoVisible?($(".landscape_menu").addClass("no_logo"),$(".logo_background").hide()):($(".landscape_menu").removeClass("no_logo"),$(".logo_background").show(),player.frame.applyBackgroundDirect&&(player.frame.applyBackgroundDirect("logo","bg",".logo_background>.logo_section"),player.frame.applyBackgroundDirect("logo","bg",".logo_background>.presenter_section"),
player.frame.applyBackgroundDirect("logo","bg",".logo_background>.presenter_video_section"))),Frame.presenterVisible=!1;b!=Frame.presenterVisible&&setTimeout(function(){player.frame.updatePlayerLayout()},0);return c};
Frame.prototype.updatePresenterVideo=function(a){$(".landscape_menu").removeClass("no_logo");$(".logo_background").show();var b=player.presenters[a.url];if(!b)a.id&&"none"!=a.id?(b=player.presenters[a.id].copy(),b.hasText=!0):(b=new Presenter,b.hasText=!1),b.createVideoRef(a,player.currentSlide()),player.presenters[a.url]=b;Frame.presenterTextVisible=b.hasText;b.show();player.currentSlide().presenter=b;Frame.presenterVisible=!0;Frame.presenterVideoVisible=!0;(!this.options.logo_enabled||!Frame.logoVisible)&&
player.frame.applyBackgroundDirect("infopanel","bg",".logo_background>.logo_section");return b};
Frame.prototype.updateInfoPanel=function(a){var b=Frame.logoVisible&&this.options.logo_enabled;$(".logo_section").show();$(".presenter_section").show();Frame.presenterVideoVisible&&a&&($(".presenter_video_section").removeClass("roundbottom, roundtop"),b||($(".logo_section").hide(),$(".presenter_video_section").addClass("roundtop")),Frame.presenterTextVisible||($(".presenter_section").hide(),$(".presenter_video_section").addClass("roundbottom")),a.setMask(!b&&!a.narrowVideo,!Frame.presenterTextVisible&&
!a.narrowVideo))};
Frame.prototype.tickPresentationTimer=function(){var a=player.currentSlide();if("Slide"==player.activeTimeline.innerType)a=player.activeTimeline;if(!(!this.options.time_enabled&&!this.options.elapsedandtotaltime||-1==a.starttime)){var b=this.options.time_format;this.options.elapsedandtotaltime&&"none"==this.options.time_format&&(b="totalelapsed");if(!this.presentationTimer)this.presentationTimer=$('<span class="presentation_timer"></span>'),$("#timer_section").append(this.presentationTimer);$("#storytitle").show();
var c=a.starttime+a.currentTime;if("pause"==a.elapsedtimemode)c=a.starttime;(a=Timer.Format(c,story.lessonduration,b,this.rtl))&&(a="("+a+")");this.presentationTimer.text(a)}};
Frame.prototype.debugTopNav=function(){var a=this;this.topNavSelector=$("<div class='topnavselector'></div>");$(document.body).append(this.topNavSelector);var b=function(b){var d=$("<input id='box_"+b+"' type='checkbox'><label for='box_"+b+"'>"+b+"</label>");d.first()[0].checked=player.frame[b];d.click(function(){var a=d.first()[0].checked;player.frame[b]=a;player.frame.updateLayout()});a.topNavSelector.append(d)};b("top_bar_hidden");b("hasLinksLeft");b("hasLinksRight");$("#topbar").css("background-color",
"aqua");$("#toplinks_right").css("background-color","yellow");$("#toplinks_left").css("background-color","orange");$("#topbar > #storytitle").css("background-color","lime")};Frame.prototype.setControlEnabled=function(a,b){b?Frame.controlMap[a].removeClass("disabled"):Frame.controlMap[a].addClass("disabled")};Frame.prototype.setWindowControlEnabled=function(a,b){b?Frame.windowControlMap[a].removeClass("disabled"):Frame.windowControlMap[a].addClass("disabled")};
Frame.findCurrentFrame=function(){var a=null;if(self!=top&&!player.isCrossDomainFrame)try{$.each(top.document.getElementsByTagName("iframe"),function(b,d){d.contentWindow==self&&(a=d)}),$.each(top.document.getElementsByTagName("frame"),function(b,d){d.contentWindow==self&&(a=d)})}catch(b){}return a};function ResourcesPanel(){}ResourcesPanel.prototype.loadFromXML=function(a){var b=this;this.xml=a;this.description=$(a).attr("description");this.resources=[];$(a).children("resources").children("resource").each(function(a,d){var e={};e.url=$(d).attr("url");e.image=player.basepath+$(d).attr("image");e.title=$(d).attr("title");b.resources.push(e)});this.createRef()};
ResourcesPanel.prototype.createRef=function(){var a=$("<div class='resources_container'></div>");a.append($("<div class='resources_description'>"+this.description+"</div>"));a.append($("<hr/>"));var b=$("<ul></ul>");$.each(this.resources,function(a,d){var e=$("<li><a href='"+d.url+"' target='_blank'><img src='"+d.image+"' class='resources_icon'/>"+d.title+"</a></li>");b.append(e)});a.append(b);this.ref=a};function GlossaryPanel(){}GlossaryPanel.prototype.loadFromXML=function(a){var b=this;this.xml=a;this.terms=[];$(a).children("terms").children("term").each(function(a,d){var e={};e.title=$(d).attr("title");e.definition=$(d).text();b.terms.push(e)});this.createRef()};
GlossaryPanel.prototype.createRef=function(){var a=$("<div class='glossary_container'></div>"),b=$("<div id='glossaryscroll' class='glossary_section scrollarea'></div>");b.append($("<div class='glossary_section_header label terms'>Terms</div>"));var c=$("<ul></ul>");$.each(this.terms,function(a,b){var f=$("<li><a href='javascript:void(null);' >"+b.title+"</a></li>");f.click(function(){$(".definitiontext").hide();$(".glossary_container .active").removeClass("active");b.defref&&(f.addClass("active"),
b.defref.show())});c.append(f)});b.append(c);a.append(b);b=$("<div class='glossary_section'></div>");b.append($("<div class='glossary_section_header label definition'>Definition</div>"));$.each(this.terms,function(a,c){var f=$("<div class='definitiontext'>"+c.definition+"</div>");c.defref=f;b.append(f)});a.append(b);this.ref=a};function TranscriptPanel(){}
TranscriptPanel.prototype.loadFromXML=function(a){var b=this;this.xml=a;this.transcripts=[];$(a).children("slidetranscripts").children("slidetranscript").each(function(a,d){var e={};e.slideid=$(d).attr("slideid");e.notespng=$(d).attr("notespng");e.slidebank="true"==$(d).attr("slidebank");e.content=$(d).text();b.transcripts.push(e);var f=story.parseObjref(e.slideid).target;f.transcript=e;e.show=function(){b.titleref.html(f.title);$(".transcript_content").hide();e.contentref&&e.contentref.show()}});
this.createRef()};TranscriptPanel.prototype.createRef=function(){var a=$("<div class='transcript_container'></div>");this.titleref=$("<div class='transcript_title'></div>");a.append(this.titleref);$.each(this.transcripts,function(b,c){var d=c.content;c.notespng&&(d="<img src='"+(player.basepath+c.notespng)+"'>");d=$("<div class='transcript_content'><hr/>"+d+"</div>");c.contentref=d;a.append(d)});this.ref=a};
TranscriptPanel.prototype.showTitleOnly=function(a){this.titleref.html(a);$(".transcript_content").hide();if(!this.emptyContentRef)this.emptyContentRef=$("<div class='transcript_content'><hr/></div>"),this.ref.append(this.emptyContentRef);this.emptyContentRef.show()};function Presenter(){this.isVideo=!1;if(!this.videoContainer)this.videoContainer=new Video}Presenter.prototype.loadFromXML=function(a){this.xml=a;this.id=$(a).attr("id");this.photoSwf=$(a).attr("photo");this.mobilephoto=$(a).attr("mobilephoto");this.name=$(a).attr("name");this.title=$(a).attr("title");this.email=$(a).attr("email");this.bioHtml=$(a).children("bioHtml").text();this.photoImageSrc=this.mobilephoto;this.createRef()};Presenter.HEIGHT_RATIO=0.76;
Presenter.prototype.copy=function(){var a=new Presenter;a.loadFromXML(this.xml);return a};Presenter.prototype.createRef=function(){var a=$("<div class='presenter_info'><div class='imgwrap'><img></div><span class='presenter_name'/><span class='presenter_title'/><a class='presenter_link'/></div>");this.ref=a;a=a.find("img");this.photoImageSrc?a.attr("src",player.basepath+this.photoImageSrc):a.remove();this.setPresenterInfo()};
Presenter.getVideoMaskUrl=function(a,b,c,d){var e=document.createElement("canvas");e.width=a;e.height=b;var f=e.getContext("2d");f.fillRect(4,0,a-8,b);f.fillRect(0,4,a,b-8);d?(f.arc(4,b-4,4,0,7),f.arc(a-4,b-4,4,0,7)):f.fillRect(0,b-8,a,b);c?(f.arc(4,4,4,0,7),f.arc(a-4,4,4,0,7)):f.fillRect(0,0,a,8);f.fill();return"url("+e.toDataURL()+")"};
Presenter.prototype.setPresenterInfo=function(){var a=this.ref;a.children(".presenter_name").text(this.name);a.children(".presenter_title").text(this.title);a=a.children(".presenter_link");this.bioHtml?(a.text(player.frame.getTextLabel(this.email?"more_info":"bio")),a.attr("href","javascript:void(null)")):this.email?(a.text(player.frame.getTextLabel("send_an_email")),a.attr("href","mailto:"+this.email),a.attr("target","_blank")):a.hide()};
Presenter.prototype.showDetail=function(){var a=this,b=$(".presenterInterstitial");0==b.length&&(b=$("<div class='presenterInterstitial'></div>"),$("#slidecontainer").prepend(b));if(!this.constructedCard){a.card=$("<div class='presenter_detail'><span class='presenter_bio'/><a class='presenter_mail'/><a class='presenter_close'/><canvas class='presenter_closebutton' width=26 height=26/></div>");a.card.children(".presenter_bio").html(this.bioHtml);a.card.children(".presenter_mail").text(player.frame.getTextLabel("send_an_email"));
a.card.children(".presenter_mail").attr("href","mailto:"+a.email);a.card.children(".presenter_mail").attr("target","_blank");a.card.children(".presenter_close").text(player.frame.getTextLabel("close"));a.card.children(".presenter_close").attr("href","javascript:void(null)");$("#slidecontainer").prepend(a.card);a.email||a.card.children(".presenter_mail").hide();var c=a.card.children(".presenter_closebutton").get(0).getContext("2d");c.lineCap="round";var d=c.createLinearGradient(0,0,0,26);d.addColorStop(0,
"#f99");d.addColorStop(1,"#933");c.fillStyle="#f00";c.strokeStyle=d;c.lineWidth=1;c.arc(13,13,12,0,2*Math.PI);c.fill();c.stroke();c.beginPath();c.strokeStyle="#fff";c.lineWidth=2;c.moveTo(9,9);c.lineTo(17,17);c.moveTo(17,9);c.lineTo(9,17);c.stroke();a.card.children(".presenter_close,.presenter_closebutton").bind("click",function(){MouseEvents.processHideables()});MouseEvents.addHideable(".presenter_detail",".presenter_link,.presenter_detail",function(){a.card.hide();b.hide()});a.constructedCard=!0}this.card.show();
b.unbind();b.show()};Presenter.clearPresenters=function(){$(".logo_background .presenter_info").remove();$("div.presentervideo").remove()};
Presenter.prototype.createVideoRef=function(a,b){var c=a.width,d=a.height;this.videoUrl=player.basepath+a.url;var e=$("<div class='presenter_info video'><span class='presenter_name'/><span class='presenter_title'/><a class='presenter_link'/></div>"),f=Frame.NAV_WIDTH,g=Math.round(d*Frame.NAV_WIDTH/c),h=Math.round(Frame.NAV_WIDTH*Presenter.HEIGHT_RATIO);g>h&&(g=h,f=Math.round(c*h/d));if(f>Frame.NAV_WIDTH)f=Frame.NAV_WIDTH,g=Math.round(d*f/c);this.narrowVideo=f<Frame.NAV_WIDTH;this.width=f;this.height=
g;this.videoContainer.setPresenterVideo(b,$(".logo_background>.presenter_video_section"),this.videoUrl,a.type,a.poster,a.duration,f,g);this.ref=e;this.setPresenterInfo();this.isVideo=!0};Presenter.prototype.setMask=function(a,b){var c=Presenter.getVideoMaskUrl(this.width,this.height,a,b);this.videoContainer&&(this.videoContainer.ref.css("-webkit-mask-image",c),this.videoContainer.ref.css("mask-image",c))};
Presenter.prototype.show=function(){var a=this;Presenter.clearPresenters();$(".logo_background>.presenter_section").append(this.ref);this.videoContainer&&this.videoContainer.ref&&$(".logo_background>.presenter_video_section").append(this.videoContainer.ref);this.ref.children(".presenter_link").unbind("click");this.bioHtml&&this.ref.children(".presenter_link").bind("click",function(){a.showDetail()});this.videoContainer&&this.isVideo&&(this.videoContainer.getIsPlaying()?this.videoContainer.resumePlaySimple():
this.videoContainer.playClip())};Presenter.prototype.tick=function(a){this.isVideo&&this.ref&&(a.paused?this.videoContainer.pauseClip():this.videoContainer.playState==Media.playState.PAUSED?this.videoContainer.playClip():!player.blocked&&this.videoContainer.playState==Media.playState.PLAYING&&500<Math.abs(a.currentTime-1E3*this.videoContainer.getCurrentTime())&&this.videoContainer.playClip())};var ActionLink=function(){this.actions=[];this.navLinks=[]};ActionLink.prototype=new Element;ActionLink.prototype.innerType="ActionLink";ActionLink.prototype.objectType="ActionLink";ActionLink.prototype.loadFromXML=function(a,b){this.parentElement=b;var c=this;this.id=$(a).attr("id");$(a).children("actions").children().each(function(a,b){var f=new TimelineAction(c.parentElement);f.loadFromXML(b,c);c.actions.push(f)})};
ActionLink.prototype.runActions=function(){var a=this,b=!0;$.each(this.actions,function(c,d){b&&(b=d.act(a,null,!1,!1,!1))})};ActionLink.prototype.notifySelected=function(){$("ul.menu_list li").removeClass("selected");$("ul.slidelist li").removeClass("selected");var a=function(a,c){a.listitems&&$.each(a.listitems,function(a,b){b.addClass(c)})};$.each(this.navLinks,function(b,c){a(c,"selected");a(c,"visited");c.parent&&a(c.parent,"visited")});player.slideList.scrollSelectedIntoView()};function CustomStyleSheet(){this.rules=[];this.ruleLookup={};this.sheet=null}CustomStyleSheet.prototype.add=function(a,b,c){if(this.ruleLookup[a])this.ruleLookup[a].add(b,c);else{var d=new StyleRule(a);d.add(b,c);this.ruleLookup[a]=d;this.rules.push(d)}};CustomStyleSheet.prototype.build=function(){if(!this.sheet)this.sheet=document.createElement("style"),document.body.appendChild(this.sheet);var a="";$.each(this.rules,function(b,c){a+=c.toString()+"\r\n\r\n"});this.sheet.innerHTML=a};function StyleRule(a){this.selector=a;this.attributes=[]}StyleRule.prototype.add=function(a,b){this.attributes.push({name:a,value:b})};StyleRule.prototype.toString=function(){var a=this.selector+"\r\n{\r\n";$.each(this.attributes,function(b,c){a+="\t"+c.name+": "+c.value+";\r\n"});return a+="}\r\n\r\n"};var MouseEvents={hideables:[],canHide:!0};MouseEvents.addHideable=function(a,b,c){MouseEvents.hideables.push({selector:a,exclude:b,callback:c})};MouseEvents.suppressPendingHide=function(){MouseEvents.canHide=!1;setTimeout(function(){MouseEvents.canHide=!0},200)};MouseEvents.processHideables=function(a){MouseEvents.canHide&&$.each(MouseEvents.hideables,function(b,c){(!a||!(c.exclude&&0<$(a.target).closest(c.exclude).length))&&$.each($(c.selector),function(a,b){c.callback($(b))})})};
MouseEvents.init=function(){var a=function(a){return null!=a.dropArea};player.allowRightClick||$(window).bind("contextmenu",function(){return!1});var b=player.isMobile?"touchstart":"mousedown",c=player.isMobile?"touchend":"mouseup",d=player.isMobile?"touchmove":"mousemove";$(window).bind(b,function(a){player.lastEvent=a;player.lastMouseDownTime=new Date;if(player.currentSlide()){swipe.parseEventCoords(a);var b=swipe.getSlideCoords(player.currentSlide());player.currentSlide().deepEach(function(a,c){var d=
!1;c.button&&(d=c.button.testOver(b.x,b.y));!MouseEvents.isObstructedByModalLayer(c)&&!player.modalInterstitial&&!d&&!c.isDisabled&&null!=c.isPointActive&&c.hasEvent("onclickoutside")&&(!c.testOver(b.x,b.y)||!c.isPointActive(b.x,b.y)||c.isPointObscured(b.x,b.y))&&c.handleEvent("onclickoutside",null,null,!1,!1,!0)},function(a){return a.visible||"ShuffleGroup"==a.innerType});return!0}});player.isMobile&&!player.isAndroid?$(window).bind("touchend",function(a){setTimeout(function(){MouseEvents.processHideables(a)},
200)}):$(window).bind("click",function(a){MouseEvents.processHideables(a)});$(document.body).bind(b,function(a){player.lastEvent=a;player.lastMouseDownTime=new Date;if(!(!player.currentSlide()||!player.currentSlide().ref||0!=$(a.target).closest(".toptab").length)){swipe.parseEventCoords(a);var b=swipe.getSlideCoords(player.currentSlide());swipe.noteDownCoords();var c=!1;player.currentSlide().deepEach(function(d,j){if(!c&&!MouseEvents.isObstructedByModalLayer(j)&&!player.modalInterstitial&&!j.isDisabled&&
j.visible&&(j.hasEvent("onpress")||j.hasEvent("onrelease")||j.hasEvent("onlink")||j.isDragItem||player.canChangeMonitoringItem)&&j.isPointActive(b.x,b.y)&&!j.isPointObscured(b.x,b.y))j.isDragItem?(j.mousedown(a),c=!0):j.hasEvent("onpress")&&(j.handleEvent("onpress",null,null,!1,!1,!0),c=!0),j.hasEvent("onrelease")&&j.ref&&j.ref.addClass("hasmousedown"),$.each(j.children,function(a,b){b.hasEvent("onrelease")&&b.ref&&b.ref.addClass("hasmousedown")}),player.canChangeMonitoringItem&&player.updateItemInfo(j);
j.clickFocus&&j.testOver(b.x,b.y)&&!j.isPointObscured(b.x,b.y)&&(c=!0,setTimeout(function(){j.input&&j.input.get&&j.input.get(0)?j.input.get(0).focus():j.select&&j.select.get&&j.select.get(0)&&j.select.get(0).focus()},0))},function(a){return a.visible||"ShuffleGroup"==a.innerType})}});$(document.body).bind(c,function(b){player.lastEvent=b;player.lastMouseUpTime=new Date;var c=swipe.hasMoved();if(player.currentSlide()&&player.currentSlide().ref){swipe.parseEventCoords(b);var d=swipe.getSlideCoords(player.currentSlide()),
h=!1;player.currentSlide().deepEach(function(b,e){if(!h&&!MouseEvents.isObstructedByModalLayer(e)&&!player.modalInterstitial&&!e.isDisabled&&e.visible&&(e.hasEvent("onrelease")||e.hasEvent("onlinkrelease"))&&(!c||e.ref&&e.ref.hasClass("hasmousedown"))&&e.isPointActive(d.x,d.y)&&!e.isPointObscured(d.x,d.y,null,a))h=!0,e.handleEvent("onrelease",null,null,!1,!1,!0),e.hasEvent("onlinkrelease")&&$.each(e.links,function(a,b){b.handleIfOver("onlinkrelease",d,!1)}),e.ref&&e.ref.removeClass("hasmousedown"),
h=!0;if(player.isMobile&&e.isMouseOver&&e.hasEvent("onrollout"))e.isMouseOver=!1,e.handleEvent("onrollout",null,null,!1,!1,!1)},function(a){return a.visible||"ShuffleGroup"==a.innerType});!h&&player.currentSlide().testOver(d.x,d.y)&&(!player.currentFramedSlide||!player.currentFramedSlide.testOver(d.x,d.y))&&player.currentSlide().handleEventDeep("onclickoutsideobjects",null,null,!0);$(".hasmousedown").removeClass("hasmousedown")}});$(window).bind(c,function(a){player.lastEvent=a;player.lastMouseUpTime=
new Date;if(player.currentSlide()){swipe.parseEventCoords(a);var b=swipe.getSlideCoords(player.currentSlide());player.currentSlide().deepEach(function(a,c){var d=!1;c.button&&(d=c.button.testOver(b.x,b.y));!MouseEvents.isObstructedByModalLayer(c)&&!player.modalInterstitial&&!d&&!c.isDisabled&&null!=c.isPointActive&&c.hasEvent("onreleaseoutside")&&(!c.testOver(b.x,b.y)||!c.isPointActive(b.x,b.y)||c.isPointObscured(b.x,b.y))&&c.handleEvent("onreleaseoutside",null,null,!1,!1,!0)},function(a){return a.visible||
"ShuffleGroup"==a.innerType});return!0}});$(".menu_container").bind("mouseup",function(){return!1});$(document.body).bind(d,function(b){player.lastEvent=b;if(!(!player.currentSlide()||!player.currentSlide().ref||0!=$(b.target).closest(".toptab").length)){swipe.parseEventCoords(b);var c=swipe.getSlideCoords(player.currentSlide());if(player.followMouseCursor){if(!player.mouseFollowDiv)player.mouseFollowDiv=$("<div class='mousecursorfollow'></div>");player.currentSlide().ref.append(player.mouseFollowDiv);
player.mouseFollowDiv.css("left",c.x);player.mouseFollowDiv.css("top",c.y-5)}var d=!1,h=!1,j=function(a){a.isMouseOver=!1;if(a.hasEvent("onrollout"))player.currentSlide().currentOver=null,a.handleEvent("onrollout",null,null,!1,!1,!1);d=!0;a.hasEvent("onlinkrelease")&&$.each(a.links,function(a,b){b.render("onrollout")})};player.currentSlide().deepEach(function(b,d){d.isMouseOver&&!MouseEvents.isObstructedByModalLayer(d)&&!player.modalInterstitial&&!d.isDisabled&&d.isPointActive&&0==d.dragX&&0==d.dragY&&
(d.hasEvent("onrollout")||d.hasEvent("onpress")||d.hasEvent("onrelease")||d.hasEvent("ondoubleclick",!0)||d.hasEvent("onlinkrelease",!0)||d.isDragItem)&&(!d.isPointActive(c.x,c.y)||d.isPointObscured(c.x,c.y,null,a))&&j(d);if((!d.isMouseOver||d.hasEvent("onlinkrelease",!0)||d.usehandcursor)&&!MouseEvents.isObstructedByModalLayer(d)&&!player.modalInterstitial&&(d.hasEvent("onrollover",!0)||d.hasEvent("onpress",!0)||d.hasEvent("onrelease",!0)||d.hasEvent("ondoubleclick",!0)||d.hasEvent("onlinkrelease",
!0)||d.isDragItem)&&!d.isDisabled&&d.isPointActive&&d.isPointActive(c.x,c.y)&&!d.isPointObscured(c.x,c.y,null,a)){if(d.hasEvent("onrollover")&&!d.isMouseOver)player.currentSlide().currentOver&&j(player.currentSlide().currentOver),player.currentSlide().currentOver=d,d.handleEvent("onrollover",null,null,!1,!1,!1);d.isMouseOver=!0;if(d.hasEvent("onlinkrelease")){var e=!1;$.each(d.links,function(a,b){b.handleIfOver("onrollover",c,!0)&&(e=!0);b.handleIfOut("onrollout",c)});e&&(h=!0)}else d.usehandcursor&&
(h=!0)}},function(a){return a.visible||"ShuffleGroup"==a.innerType});h?$(document.body).addClass("pointercursor"):d&&$(document.body).removeClass("pointercursor")}})};MouseEvents.isObstructedByModalLayer=function(a){return!player.modalLayer||player.modalLayer==a.layer||player.currentWindowSlide&&player.modalLayer.slide!=player.currentWindowSlide?!1:!0};
MouseEvents.getItemAtCursor=function(a){var b=null;player.currentSlide().deepEach(function(c,d){!b&&!MouseEvents.isObstructedByModalLayer(d)&&!d.isDisabled&&d.visible&&d.isPointActive(a.x,a.y)&&!d.isPointObscured(a.x,a.y)&&(b=d)});return b};var playerDiagnostics={};
playerDiagnostics.init=function(){$.each(location.search.split("&"),function(a,b){var c=unescape(b.replace("?","")).split("=");switch(c[0].toLowerCase()){case "controls":player.showControls=!0;player.swipeMode="none";player.animations="all";break;case "seek":setTimeout(function(){player.frame.options.forceseekbar=!0;player.frame.options.seekbar=!0;player.frame.set_frame_layout()},400);break;case "anim":player.animations=c[1];break;case "page":player.paging=c[1];break;case "zoom":player.tapZoomEnabled=!0;
break;case "lockzoom":player.lockzoom=!player.lockzoom;break;case "scale":player.scaleToFit=!player.scaleToFit;break;case "swipe":player.swipeMode=c[1];break;case "rightclick":player.allowRightClick=!player.allowRightClick;break;case "menu":player.forceMenu=!0;break;case "jiggle":player.useSwipeJiggle=!0;break;case "simplezoom":player.useSimpleZoom=!0;break;case "framecount":player.showFrameCount=!0;break;case "heartbeat":setInterval(function(){$(".framewrap").hide();player.uselessOffsetHeight=$(".framewrap").get(0).offsetHeight;
$(".framewrap").show()},c[1]||1E3);break;case "noimg":player.noImg=!0;break;case "bak":player.backOnly=!0;break;case "simplify":player.simplifySlides=!1;break;case "preload":player.preload=!0;break;case "nopreload":player.neverPreload=!0;break;case "canvasdebug":player.canvasDebug=!0;break;case "ppfudge":window.ppFudge=parseFloat(c[1]);break;case "nocanvas":player.useCanvas=!1;player.renderVectorShapes=!1;player.renderVectorsAsSVG=!1;break;case "safecanvas":player.useSafeCanvas=!0;break;case "basiccanvas":ppArt=
ppArtBasic;break;case "oldnav":player.simplenav=!1;break;case "compact":player.useCompactResume=!player.useCompactResume;break;case "svg":player.useCanvas=!0;player.renderVectorShapes=!0;player.renderVectorsAsSVG=!0;break;case "logging":window.EventLogger.logging=!window.EventLogger.logging;break;case "console":console.suppress=!console.suppress;break;case "trace":trace.suppress=!trace.suppress;break;case "noconsole":console.suppress=!0;break;case "datestamp":var d="Build "+window.buildNumber+": "+
window.buildDate,e=$("<div class='datestamp'>"+d+"<div>");e.click(function(){alert(d)});$(document.body).append(e);break;case "decode":Audio.decodeOnLoad=!Audio.decodeOnLoad;break;case "mobileaudio":player.simulateMobileAudio=!0;break;case "silent":Audio.setSilentMode();break;case "media":player.showMediaMonitor=!0;setInterval(playerDiagnostics.updateMediaMonitor,500);break;case "refstore":player.showRefStoreMonitor=!0;setInterval(playerDiagnostics.updateRefStoreMonitor,500);break;case "medialist":var f=
$("<div class='medialist'></div>");$(document.body).append(f);setTimeout(function(){story.xml.find("video").find("videodata").each(function(a,b){f.append("<a href='"+player.basepath+$(b).attr("url")+"' target='_blank'>"+$(b).attr("url")+"</a><br>")})},2E3);break;case "timelines":playerDiagnostics.setupTimelineMonitor();break;case "resources":playerDiagnostics.setupResourceList();break;case "monitor":player.showInstrumentation=!0;break;case "follow":player.followMouseCursor=!0;break;case "transform":player.scaleWithTransform=
!player.scaleWithTransform;break;case "info":player.showItemInfo=!0;player.canChangeMonitoringItem=!0;player.originalMonitoringItemID=c[1];setInterval(player.updateItemInfo,1E3);setTimeout(function(){var a=story.findDescendantById(c[1]);a&&player.updateItemInfo(a)},1E3);$(".framewrap").addClass("info");break;case "placeholder":player.usePlaceholderVideo=!0;break;case "novideo":player.noVideo=!0;break;case "noaudiocache":player.noAudioCache=!0;break;case "purgevideo":player.purgeVideo=!0;break;case "filter":console.filter=
c[1];break;case "scrolldebug":player.scrollDebug=c[1];break;case "overlap":player.showDebugOverlap=!0;BitMask.showDebug=!0;break;case "persist":player.showDebugOverlapPersistent=!0;break;case "overlapdebug":player.showDebugOverlap=!0;BitMask.showDebug=!0;BitMask.debugOnly=!0;break;case "matrixdebug":player.showMatrixDebug=!0;break;case "maskdebug":player.drawMaskDebugShapes=!0;break;case "maskimage":player.useMaskImage=!0;break;case "maskcanvas":player.useMaskCanvas=!0;break;case "backcanvas":player.useBackgroundCanvasWorkaround=
!0;break;case "dumpcanvas":player.dumpCanvas=!0;player.canvasCommandLog=[];break;case "linkareas":player.showLinkAreas=!0;break;case "maximize":player.canMaximize=!0;player.maximized=!0;break;case "stresstest":playerDiagnostics.setupStressTest();break;case "navtest":setTimeout(function(){player.frame.debugTopNav()},1E3);break;case "nointervals":player.nointervals=!0;break;case "noframe":player.noframe=!0;break;case "noframecolor":player.noframecolor=!0;case "novectorimage":player.suppressVectorImage=
!0;break;case "bgcolor":globals.strBgColor="#"+c[1];$(document.body).css("background","#"+c[1]);break;case "slidescale":player.forceSlideScale=parseFloat(c[1]);break;case "resumedata":player.overrideResumeData=c[1];break;case "suppresscapture":player.suppressCaptureAnimations=!player.suppressCaptureAnimations;break;case "active":player.useActiveTimeline=!player.useActiveTimeline;break;case "iosplayer":player.simulateIOSPlayer=!player.simulateIOSPlayer;break;case "logactivity":player.logActivity=!player.logActivity}})};
playerDiagnostics.setupStressTest=function(){var a=$("<a style='position:absolute;left:0px;top:10px;z-index:10000;background-color:#fff'>stress single</a>");a.click(function(){var b=0,d=player.currentSlide(),e=d.container,f=function(){setTimeout(function(){d.destroyRef();setTimeout(function(){d.createRef(e);f()},50)},50);b++;a.html(b)};f()});$(document.body).append(a);var b=$("<a style='position:absolute;left:0px;top:50px;z-index:10000;background-color:#fff'>stress cycle</a>");b.click(function(){var a=
0,d=function(){setTimeout(function(){player.showSlideIndex((player.slideIndex+1)%story.allSlides.length,null,!0,function(){d()})},1E3);a++;b.html(a)};d()});$(document.body).append(b)};
playerDiagnostics.updateMediaMonitor=function(){if(player.showMediaMonitor){if(!player.mediaMonitor)player.mediaMonitor=$("<div class='monitor'>hey</div>"),$(document.body).append(player.mediaMonitor);player.mediaMonitor.empty();$.each(story.allSlides,function(a,b){player.mediaMonitor.append("<h2>"+b.title+"</h2>");var c=$("<ul></ul>");$.each(b.resources,function(a,b){if(("audio"==b.item.type||"video"==b.item.type)&&b.item.ref){var f=$("<li>"+b.prepared+", "+b.item.ref.get(0).networkState+", "+b.item.ref.get(0).readyState+
", "+b.item.ref.get(0).paused+", "+b.item.ref.get(0).ended+", "+b.item.ref.get(0).error+", "+b.item.getCurrentTime()+", "+b.src+"</li>");!b.item.ref.get(0).paused&&!b.item.ref.get(0).ended&&f.css("background-color","yellow");b.item.getFullObjref()==player.nextPreparedClipID&&f.css("color","green");player.currentClip&&b.item.ref&&player.currentClip==b.item.ref.get(0)&&f.css("text-decoration","underline");c.append(f)}});player.mediaMonitor.append(c)})}};
playerDiagnostics.updateRefStoreMonitor=function(){if(player.showRefStoreMonitor){if(!player.refStoreMonitor)player.refStoreMonitor=$("<div class='monitor left'>hey</div>"),$(document.body).append(player.refStoreMonitor);player.refStoreMonitor.empty();player.refStoreMonitor.append("<h2>RefStore</h2>");var a=$("<ul></ul>");$.each(Video.refStore,function(b,c){var d=$("<li>"+b+", "+c.get(0).networkState+", "+c.get(0).readyState+", "+c.get(0).paused+", "+c.get(0).ended+", "+c.get(0).error+", "+c.get(0).currentTime+
"</li>");!c.get(0).paused&&!c.get(0).ended&&d.css("background-color","yellow");b==player.nextPreparedClipID&&d.css("color","green");a.append(d)});player.refStoreMonitor.append(a)}};
playerDiagnostics.setupTimelineMonitor=function(){var a=$("<ul class='timerlist'></ul>"),b=function(b,d,e){b=$("<li class='t"+b+"'>"+b+": <b>"+d+"</b> ("+e+")</li>");a.append(b)};$(document.body).append(a);setInterval(function(){a.empty();b("active",player.activeTimeline.currentTime,player.activeTimeline.id);b("player",player.currentTime,"");b("slide",player.currentSlide().currentTime,player.currentSlide().id);player.currentFramedSlide&&b("slideFrame",player.currentFramedSlide.currentTime,player.currentFramedSlide.id);
player.currentWindowSlide&&b("window",player.currentWindowSlide.currentTime,player.currentWindowSlide.id);b("animation",player.getAnimationTime(),"");var c=function(a){a&&a.deepEach(function(a,c){"Layer"==c.innerType&&b("layer",c.currentTime,c.id)})};c(player.currentSlide());c(player.currentWindowSlide);c(player.currentFramedSlide)},100)};
playerDiagnostics.setupResourceList=function(){var a=$("<ul class='resourcelist'></ul>");$(document.body).append(a);setInterval(function(){a.empty();var b=$("<li class='ttotal'>total: <b>"+Resource.TotalPixels+"</b> ("+Resource.LoadedImageCount+")</li>");a.append(b)},100)};var player={slideIndex:0,currentTime:0,animationTime:0,interval:null,showingInterstitial:!0,ready:!1,fontready:!1,playing:!1,paused:!0,blockQueue:[],blockableMediaList:{},blocked:!1,playall:!1,autoplay:!0,autoplaySlides:!0,loopable:!1,simplenav:!0,visible:!0,mediaCount:0,loadedMediaCount:0,deferredLoadingIndex:0,width:1,height:1,frameScale:1,aspectRatio:720/540,windowZoomModifier:1,transitionSeconds:0.4,maxTransitionSeconds:1.2,clipVolume:1,progressBar:null,zoomed:!1,basepath:"",currentClip:null,
currentClipStartTime:0,currentAnimations:{},computedMasks:{},bitmasks:{},framedSlides:{},webAudioClips:{},animations:"pan",showControls:!1,slideList:null,fileList:null,swipeMode:"follow",useCanvas:!0,useCompactResume:!0,simplifySlides:!0,suppressCaptureAnimations:!1,hasUserScript:!1,startTime:new Date,useActiveTimeline:!0,simulateIOSPlayer:!1,logActivity:!1,frameCount:0,renderedFrameCount:0,loadFromScript:!0,fontlib:null,textlib:null,history:[],windowStack:[],renderQueue:[],showQueue:[],actionQueue:[],
actionQueuePaused:!1,listSlidesViewed:{},listSlidesViewedComplete:{},completeSlidesViewed:0,currentSlidesViewed:0,totalViewSlides:0,allowTouchMove:!1,scaleWithTransform:!1,purgeVideo:!1},g_oFontLib;player.TICK_DURATION=30;player.isIOS=-1<navigator.userAgent.indexOf("AppleWebKit/")&&-1<navigator.userAgent.indexOf("Mobile/");player.isIPhone=/iP(hone|od)/.test(navigator.platform);player.isMobileFrame=!1;player.isWebKit=-1<navigator.userAgent.indexOf("AppleWebKit/");player.canAnimate=-1<navigator.userAgent.indexOf("AppleWebKit/");
player.isIE=-1<navigator.userAgent.indexOf("MSIE ");player.isIE8=player.isIE&&-1<navigator.appVersion.indexOf("MSIE 8");player.isIE9=player.isIE&&-1<navigator.appVersion.indexOf("MSIE 9");player.isFF=-1<navigator.userAgent.indexOf("Firefox/");player.isChrome=-1<navigator.userAgent.indexOf("Chrome/");player.isMac=-1<navigator.userAgent.indexOf("Macintosh;");player.isMacSafari=-1<navigator.userAgent.indexOf("Safari")&&-1<navigator.userAgent.indexOf("Mac")&&-1==navigator.userAgent.indexOf("Chrome");
player.isAndroid=-1<navigator.userAgent.indexOf("Android");player.isMobile=player.isIOS||player.isAndroid;if(player.isIOS)player.isIOS6=-1<navigator.appVersion.indexOf("OS 6"),player.isIOS7=-1<navigator.appVersion.indexOf("OS 7"),player.isIOS8=-1<navigator.appVersion.indexOf("OS 8"),player.isIOS9=-1<navigator.appVersion.indexOf("OS 9"),player.isIOSlt8=player.isIOS6||player.isIOS7,player.isIOSlt9=player.isIOSlt8||player.isIOS8;if(!player.isChrome)player.scaleWithTransform=!0;
player.isCrossDomainFrame=!1;try{player.isCrossDomainFrame=void 0==top.location.href}catch(e$$58){player.isCrossDomainFrame=!0}if(self!=top&&!player.isCrossDomainFrame){var meta=$('<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1.0"/>');try{top.document.getElementsByTagName("head")[0].appendChild(meta.get(0))}catch(e$$59){player.isCrossDomainFrame=!0}}
if(-1<navigator.userAgent.indexOf("Mac")||player.isMobile){var sheet=document.createElement("style");document.head.appendChild(sheet);sheet.innerHTML="::-webkit-scrollbar-thumb {border-radius: 4px;background-color: rgba(0,0,0,.5);-webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);}\r\n::-webkit-scrollbar {-webkit-appearance: none;width: 7px;}\r\n"}player.activeTimeline=player;
player.flushActionQueue=function(){for(var a=!0;0<player.actionQueue.length&&a&&!player.actionQueuePaused;)a=player.actionQueue.shift(),a=a.target.runAction(a.actionXML)};window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();player.getAnimationTime=function(){return player.animationTime};
player.getIOSversion=function(){if(/iP(hone|od|ad)/.test(navigator.platform)){var a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(a[1]||7,10),parseInt(a[2]||0,10),parseInt(a[3]||0,10)]}return[7,0,0]};Element.prototype.getAnimationTime=function(){return this.currentTime};
player.tick=function(){this.bTicked=!0;player.frameCount++;var a=new Date,b=a-player.lastRenderTime;window.requestAnimFrame(player.tick);if(!(b<0.75*player.TICK_DURATION)){player.renderedFrameCount++;player.lastRenderTime=new Date;player.currentTickDuration=player.TICK_DURATION;if(b>0.5*player.TICK_DURATION&&b<4*player.TICK_DURATION)player.currentTickDuration=b;player.tickAnimations();player.frame.tickPresentationTimer();if(ProgressBar.getCurrentProgressBar().dragging&&player.currentClip)player.currentClip.currentTime=
(player.activeTimeline.currentTime-player.currentClipStartTime)/1E3;else if(player.blocked||(player.currentSlide()&&player.currentSlide().tickLayers(),player.currentFramedSlide&&player.activeTimeline!=player.currentFramedSlide&&player.currentFramedSlide.tick()),player.updateControls(),player.playing){player.currentTime+=player.currentTickDuration;player.activeTimeline!=player&&"Slide"==player.activeTimeline.innerType&&player.activeTimeline.tick();var c=a-player.frameRateZeroTime,a=0;if(player.showFrameCount&&
!isNaN(c)){if(!player.frameCounter)player.frameCounter=$("<div class='framecounter'></div>"),$(document.body).append(player.frameCounter);a=parseInt(1E3*(player.renderedFrameCount/c));player.frameCounter.text(a+" "+b);player.frameCounter.css("color",player.currentTickDuration==b?"green":"red");player.currentTickDuration!=b&&console.log("long tick",player.currentTickDuration,b)}player.correctMedia();if(player.currentClip&&!player.currentClip.paused&&(a=parseInt(1E3*player.currentClip.currentTime),
b=parseInt(1E3*player.currentClip.duration),isNaN(b)&&player.isMobile&&(b=5E3),!player.layerPlaying&&player.currentClipSyncToTimeline&&a!=player.activeTimeline.currentTime-player.currentClipStartTime&&player.activeTimeline.currentTime<b&&(b=Math.abs(a-(player.activeTimeline.currentTime-player.currentClipStartTime)),!ProgressBar.getCurrentProgressBar().dragging&&20<b)))player.activeTimeline.currentTime=a+player.currentClipStartTime+1;player.update();if(player.currentSlide()!=player.activeTimeline)player.currentSlide().currentTime=
player.currentTime}else player.currentSlide()&&player.currentSlide().updateLayers()}};
player.tickAnimations=function(){function a(a){if(!a.steppedThisTick){var c=!0,d=null,e=null;$.each(a.animations,function(f,g){if(g.running){var h=g.timeline.getAnimationTime()-g.startTime;if(0<=h&&h<=g.duration)g.step(g.timeline.getAnimationTime()),a.steppedThisTick=!0;c=c&&0>h;if(!d||g.startTime<d.startTime)d=g;if(!e||g.startTime+g.duration>e.startTime+e.duration)e=g}});!a.steppedThisTick&&d&&e&&(c?d.step(d.timeline.getAnimationTime()):e.step(e.timeline.getAnimationTime()));a.steppedThisTick=!0}}
player.animationTime+=player.currentTickDuration;$.each(player.currentAnimations,function(b,c){c.item.destroyed&&delete player.currentAnimations[b];c.item.steppedThisTick=!1;!c.item.steppedThisTick&&c.isTimeWithinAnimation(c.timeline.getAnimationTime())?(c.step(c.timeline.getAnimationTime()),c.item.steppedThisTick=!0):!c.ended&&!c.item.steppedThisTick&&c.isTimeAfterAnimation(c.timeline.getAnimationTime())?(c.step(c.timeline.getAnimationTime()),c.item.steppedThisTick=!0):a(c.item)})};
player.updateControls=function(){var a=$(".controlbar-button").find(".pause"),b=$(".controlbar-button").find(".play");player.activeTimeline.paused&&(a=$(".controlbar-button").find(".play"),b=$(".controlbar-button").find(".pause"));b.hide();a.show()};player.correctMedia=function(){};
player.update=function(a){function b(a){var b=(Math.floor(a/1E3)%60+100+"").substr(1,2),c=Math.floor(a/1E3/60),g="";0>a&&(b=(Math.floor(a/1E3)%60-100+"").substr(2,2),c=Math.ceil(a/1E3/60),g="-");return g+Math.abs(c)+":"+b}if(player.activeTimeline==player||"Slide"==player.activeTimeline.innerType){var c=player.currentSlide().duration;if(player.activeTimeline!=player)c=player.activeTimeline.duration;ProgressBar.getCurrentProgressBar().index=player.activeTimeline.currentTime;ProgressBar.getCurrentProgressBar().count=
c;ProgressBar.getCurrentProgressBar().update()}player.currentSlide().update(player.currentSlide().currentTime,!1,a);$(".time_elapsed").text(b(player.currentTime));$(".time_remaining").text(b(player.currentTime-player.currentSlide().duration))};
player.showSlideID=function(a,b,c){a=story.parseObjref(a).target;if(a==player.currentSlide())return!1;if("Scene"==a.innerType)a=story.parseObjref(a.startingslide).target;if("SlideDraw"==a.innerType)a.showFirst();else{if(isNaN(a.slideIndex))return!1;player.showSlideIndex(a.slideIndex,null,b,c)}return!0};
player.showLoadingSpinner=function(){player.loadingSpinnerVisible=!0;player.loadingSpinner.show();$("#loadingSpinner").css("left",Math.floor(window.innerWidth/2)-50);$("#loadingSpinner").css("top",Math.floor(window.innerHeight/2)-50)};player.hideLoadingSpinner=function(){player.loadingSpinnerVisible=!1;player.loadingSpinner.hide()};
player.showSlideIndex=function(a,b,c,d){var e=story.allSlides[a],f=TimelineAction.actparams.cancelled;TimelineAction.actparams._ActTargetSlideId=e.getFullObjref(!0);TimelineAction.actparams._ActTargetWindow=e.variables.WindowId;TimelineAction.actparams._ActTargetSlideNavIndex=e.navindex;TimelineAction.actparams.cancelled=!1;player.currentSlide().handleEvent("onbeforeslidejump",null,null,!1,!0);TimelineAction.actparams.cancelled?TimelineAction.actparams.cancelled=f:(TimelineAction.actparams.cancelled=
f,e.loadContentFromXML(),player.prepAudio(a),e.blockAndLoad(function(){DragItem.cancelDrag();$(document.body).removeClass("pointercursor");player.currentSlide().restorePlayerControls();player.hideLoadingSpinner();player.currentWindow=null;DragItem.cancelDrag();var e=player.currentSlide().slideIndex;if(!(a==e&&player.hasShownFirstSlide)){player.currentSlide().saveIfNecessary();if(c&&-1==player.currentSlide().parent.id.indexOf("MsgScene"))player.currentWindow?player.currentWindow.history.push(e):(player.hasAdvanced=
!0,player.history.push(e));player.setSlideIndex(a,b);if(player.onSelectSlide)player.onSelectSlide(story.allSlides[a]);player.isMobileFrame&&($("#slideframe").css("-webkit-box-shadow","0 0 30px rgba(0,0,0,0.35)"),$("#slideframe").css("-moz-box-shadow","0 0 30px rgba(0,0,0,0.35)"),$("#slideframe").css("-ms-box-shadow","0 0 30px rgba(0,0,0,0.35)"),$("#slideframe").css("box-shadow","0 0 30px rgba(0,0,0,0.35)"));setTimeout(function(){player.hasShownFirstSlide=!0},1E3);story.saveToLocalStorage()}d&&d()}))};
player.showPreviousSlide=function(a){for(var b=player.currentWindow?player.currentWindow.history:player.history,c=null;0<b.length&&!c;){var d=b.pop(),d=story.allSlides[d];if(!a||a(d))c=d}if(!c)return!0;player.currentWindow?player.currentWindow.showSlide(c,!0):player.showSlideIndex(c.slideIndex,null,!1);return!1};
player.setSlideIndex=function(a,b){player.zoomed&&player.tapZoom();MouseEvents.processHideables();player.unblock();player.pause(!1,!0);if(!isNaN(a)){var c=player.currentSlide();player.slideIndex=a;player.currentTime=0;player.activeTimeline=player.currentSlide();if(player.currentSlide())player.currentSlide().resetInteractions(),player.updateViewCount(player.currentSlide()),player.slideList.markVisited(player.currentSlide()),player.currentSlide().show(player.autoplaySlides,b,function(){c.slideIndex!=
player.currentSlide().slideIndex&&c.reduce();c.resetSlide(!1,!0);player.hideInactiveSlides();c.unloadContent();player.currentTime=player.currentSlide().currentTime}),c.handleEvent("ontransitionout",null,null,!1,!0),c.deepEach(function(a,b){b.handleEvent&&b.handleEvent("ontransitionout",null,null,!1,!0)}),c.variables.WindowId="_frame",player.currentSlide().variables.WindowId="_frame";$(".item").css("-webkit-animation-name","");$(".item").css("-webkit-animation-duration","0s");$("ul.menu_list li").removeClass("selected locked");
$("ul.slidelist li").removeClass("selected locked");$(".controlbar-button.right,#control-submitall").removeClass("locked");$(".toptab.customlink").removeClass("locked");$(".progress-container").removeClass("locked");var d=player.currentSlide();if(d.slideBank&&0==d.navLinks.length)d=d.slideBank;$.each(d.navLinks,function(a,b){$.each(b.listitems,function(a,b){b.addClass("selected")})});player.slideList.collapseSections(player.currentSlide());d.slidelock&&($("ul.menu_list li").addClass("locked"),$("ul.slidelist li").addClass("locked"),
$(".controlbar-button.right,#control-submitall").addClass("locked"),$(".toptab.customlink").addClass("locked"),$(".progress-container").addClass("locked"));player.slideList.scrollSelectedIntoView()}};
player.updateViewCount=function(a){a.variables.Visited=!0;a.viewedCurrent=!0;this.listSlidesViewed[a.getFullObjref()]=!0;this.listSlidesViewedComplete[a.slideIndex]=!0;if(a.trackviews){var b={},c=0,d;for(d in this.listSlidesViewed){var e=story.parseObjref(d).target;e.trackviews&&null==b[e.viewgroupid]&&(b[e.viewgroupid]=!0,c++)}this.currentSlidesViewed=c;var c=0,b={},f;for(f in this.listSlidesViewedComplete)e=story.allSlides[f],null!=e&&e.trackviews&&null==b[e.viewgroupid]&&(b[e.viewgroupid]=!0,c++);
this.completeSlidesViewed=c;player.lmsManager.handleSlideViewed(a)}};player.restoreViewedState=function(a){a.variables.Visited=!0;this.listSlidesViewed[a.getFullObjref()]=!0;this.listSlidesViewedComplete[a.slideIndex]=!0};player.calculateTotalViewSlides=function(){for(var a={},b=this.totalViewSlides=0;b<story.allSlides.length;b++){var c=story.allSlides[b];c.trackviews&&(""!=c.viewgroupid?null==a[c.viewgroupid]&&(a[c.viewgroupid]=!0,this.totalViewSlides++):this.totalViewSlides++)}};
player.hideInactiveSlides=function(a){var b=player.currentSlide();$.each(story.allSlides,function(a,d){var e=d.offsetParent&&d.offsetParent.slide==b;d.slideIndex!=b.slideIndex&&!e&&(d.hide(),d.unloadContent())});a&&a()};player.currentSlide=function(){return 0==story.allSlides.length?null:player.currentWindow?player.currentWindowSlide:story.allSlides[player.slideIndex]};player.currentZoom=function(){return player.zoom};player.elapsedTime=function(){return new Date-player.startTime};
player.addToRenderQueue=function(a){0>this.renderQueue.indexOf(a)&&(this.renderQueue.push(a),player.scheduleShowQueueFlush())};player.addToShowQueue=function(a,b){a.animating&&!a.animationEnded&&!b?a.showOnFirstStep=!0:0>this.showQueue.indexOf(a)&&(this.showQueue.push(a),player.scheduleShowQueueFlush())};player.removeFromShowQueue=function(a){a=this.showQueue.indexOf(a);0<=a&&this.showQueue.splice(a,1)};
player.scheduleShowQueueFlush=function(){this.renderTimer?this.renderTimer.style.opacity="1"==this.renderTimer.style.opacity?".9":"1":player.flushShowQueues()};
player.flushShowQueues=function(){Math.random();if(0<player.renderQueue.length||0<player.showQueue.length){var a=[];player.bTicked=!1;for(var b=0;b<player.showQueue.length;b++){var c=player.showQueue[b];0>player.renderQueue.indexOf(c)?c.ref&&c.ref.show():a.push(c)}for(b=0;b<player.renderQueue.length;b++)player.renderQueue[b].renderOnUpdate();player.renderQueue=[];player.showQueue=a;0<a.length&&player.scheduleShowQueueFlush()}};
player.ensureTicking=function(){if(!player.nointervals&&!player.interval)player.interval=!0,player.frameRateZeroTime=new Date,player.tick(),player.zeroTime=new Date};
player.play=function(a,b,c){var d=player.currentSlide();if(d){if(!player.interval||!player.playing||player.paused)player.activeTimeline.currentTime>=player.activeTimeline.duration&&!b&&player.restart(),player.ensureTicking(),player.showControls&&$("#controls").show(),c||d.resumeMedia(),a||$.each(player.currentAnimations,function(a,b){b.timeline.paused=!1});player.paused=!1;player.playing=!0;player.updateControls();$(document.body).removeClass("paused");if(player.onPlay)player.onPlay()}};
player.pause=function(a,b,c){player.playing=!1;player.paused=!0;$.each(player.currentSlide().clips,function(d,e){if(b||!a||!e.layered)if(b||e.syncToTimeline){if(e.syncToTimeline&&e.getIsPlaying())e.m_bResumeOnSeek=!0;e.pauseClip(c);if(player.scheduledMediaSrc==e.content.src)clearTimeout(player.mediaTimeout),player.scheduledMediaSrc=null}});$.each(player.webAudioClips,function(c,e){if(e.slide==player.currentSlide()&&(b||!a||!e.layered))(b||player.currentClipSyncToTimeline)&&e.pauseClip()});player.useActiveTimeline&&
$.each(player.currentSlide().children,function(c,e){"Layer"==e.innerType&&(b||!a)&&e.pause()});player.updateControls()};
player.pauseClips=function(){clearTimeout(player.mediaTimeout);player.scheduledMediaSrc=null;$.each(player.currentSlide().clips,function(a,b){if(b.getIsPlaying()&&b.syncToTimeline)b.m_bResumeOnSeek=!0;b.pauseClip();if(player.scheduledMediaSrc==b.content.src)clearTimeout(player.mediaTimeout),player.scheduledMediaSrc=null});$("audio,video").each(function(a,b){b.get&&b.get(0)&&b.get(0).pause&&b.get(0).pause()});$.each(player.webAudioClips,function(a,b){b.pauseClip()})};
player.addToBlockableMedia=function(a){player.blockableMediaList[a.getFullObjref()]=a};player.removeFromBlockableMedia=function(a){delete player.blockableMediaList[a.getFullObjref()]};
player.block=function(a){0>player.blockQueue.indexOf(a)&&player.blockQueue.push(a);if(!player.blocked){player.blocked=!0;for(key in player.blockableMediaList)player.blockableMediaList[key].pauseOnBlock();if(!player.blocknotice)player.blocknotice=$('<div class="blocked"></div>'),$(".blocked").css("left",Math.floor(window.innerWidth/2)-50),$(".blocked").css("top",Math.floor(window.innerHeight/2)-50),$(document.body).append(player.blocknotice);player.blockNoticeTimeout=setTimeout(function(){player.blocked&&
(player.blocknotice.show(),$(".blocked").css("left",Math.floor(window.innerWidth/2)-50),$(".blocked").css("top",Math.floor(window.innerHeight/2)-50))},500)}};player.unblock=function(){if(player.blocked){for(var a=!1,b=0;b<player.blockQueue.length&&!(a=player.blockQueue[b].blocking);b++);if(!a)$(".blocked").hide(),clearTimeout(player.blockNoticeTimeout),player.blockNoticeTimeout=null,clearTimeout(player.blockedTimeout),player.blocked=!1,player.blockQueue=[],player.restartMediaOnUnblock()}};
player.restartMediaOnUnblock=function(){if(!player.blocked)for(key in player.blockableMediaList)player.blockableMediaList[key].actionOnUnblocked()};
player.restart=function(){if(player.activeTimeline.enablereplay&&!(player.activeTimeline==player.currentSlide()&&player.currentSlide().resume))"Slide"==player.activeTimeline.innerType?player.activeTimeline.resetSlide():player.currentSlide().resetSlide(),player.activeTimeline.currentTime=0,player.update(player.activeTimeline.currentTime),player.activeTimeline.pause(),player.activeTimeline.play()};
player.initLoadQueue=function(){player.slideLoadQueue=[];player.slideLoadQueue.processing=!0;player.slideLoadQueueExhausted=!1;for(var a=0;a<story.allSlides.length;a++)player.slideLoadQueue.push(a);player.slideLoadQueue.promote=function(a){a=player.slideLoadQueue.indexOf(a);if(0<a)for(a=player.slideLoadQueue.splice(a,player.slideLoadQueue.length-a);a.length;)player.slideLoadQueue.unshift(a.pop());player.slideLoadQueue.restart()};player.slideLoadQueue.restart=function(){if(player.slideLoadQueueExhausted||
!player.slideLoadQueue.processing)player.slideLoadQueue.processing=!0,player.slideLoadQueueExhausted=!1,player.loadResourcesForNextSlide()};player.slideLoadQueue.promote(story.startingSlideIndex)};player.loadResourcesForNextSlide=function(){slideIndex=player.slideLoadQueue.shift();void 0!=slideIndex?player.loadResources(slideIndex):player.slideLoadQueueExhausted=!0};player.loadResources=function(a){0>a||a>story.allSlides.length||player.loadResourcesForSlide(story.allSlides[a])};
player.loadResourcesForSlide=function(a){player.slideLoadQueue.processing=!0;var b=0,c=function(){var c=a.resources.length,e=0;$.each(a.resources,function(f,g){e=player.simplifySlides&&g.item.canSimplify||g.item.deferLoading?e+10:e+100;setTimeout(function(){g.load(f,function(){if(++b>=c&&(a.ready=!0,slideIndex==story.startingSlideIndex))player.ready=!0},!0)},e)})};player.simplifySlides?a.simplify(c):c();if(0==a.resources.length){a.ready=!0;if(slideIndex==story.startingSlideIndex||!story.startingSlideIndex)player.ready=
!0;player.loadResourcesForNextSlide()}};player.unloadResources=function(){$.each(story.allSlides,function(a,b){(a<player.slideIndex-1||a>player.slideIndex+1)&&$.each(b.resources,function(a,b){b.unload()})})};player.prepAudio=function(a){if(!Resource.justPrepped){Resource.justPrepped=!0;setTimeout(function(){Resource.justPrepped=!1},100);var b=!1;$.each(story.allSlides[a].resources,function(a,d){if(("audio"==d.item.type||"video"==d.item.type)&&!b&&!d.prepared)d.prep(function(){}),b=!0})}};
player.onLoadedData=function(){player.loadedMediaCount++;player.loadedMediaCount==player.mediaCount&&(player.pause(),$("#slideframe").css("opacity","1.0"),player.showSlideID(story.startingslide))};player.reorient=function(a){player.frame.reorient(a)};player.maximize=function(a){a&&!player.maximized?(player.width/=2,player.height/=2,player.reorient(!0)):!a&&player.maximized&&(player.width*=2,player.height*=2,player.reorient(!0));player.maximized=a};
player.setInitialActiveTimeline=function(){var a=story.getStartingSlide();player.activeTimeline="Slide"==a.innerType?a:"SlideDraw"==a.innerType?a.getFirstSlide():player};
player.revealPreInterstitial=function(){SlideDraw.populateDraws();$("#slideframe").css("opacity","1.0");player.showSlideID(story.startingslide,!1,function(){player.pause();player.activeTimeline.currentTime=0;player.update(player.activeTimeline.currentTime,!0);player.unblock();player.pause()});player.setInitialActiveTimeline();player.reorient(!0);player.showControls&&$("#controls").show();player.revealedFirstSlide=!0};
player.revealPostInterstitial=function(){Video.iOSPrepare&&Video.iOSPrepare();Audio.iOSPrepare&&Audio.iOSPrepare();if(player.reorientLaunchInterval)clearInterval(player.reorientLaunchInterval),player.reorientLaunchInterval=null;$("#slideframe").css("opacity","1.0");$(".launch_interstitial").remove();player.revealedFirstSlide?player.play():(SlideDraw.populateDraws(),player.showSlideID(story.startingslide,!1,player.play),player.setInitialActiveTimeline());player.reorient(!0);player.showControls&&$("#controls").show();
setTimeout(function(){player.showingInterstitial=!1},500);$(".interstitial").hide();$(".frameInterstitial").hide();player.playButton.hide();!player.isMobile&&player.isChrome&&player.forceRepaint();clearInterval(player.win7kick)};player.showInterstitial=function(){player.showIOSLaunch()};player.addDiagnosticButton=function(a,b){var c=$('<div class="diagnosticbutton">'+a+"</div>");c.click(b);$("#topbar").append(c)};
player.sniffParameters=function(){$.each(location.search.split("&"),function(a,b){var c=unescape(b.replace("?","")).split("=");switch(c[0].toLowerCase()){case "name":player.storyName=c[1];player.basepath="/UserData/Upload/"+c[1]+"/";break;case "usexml":player.loadFromScript=!1;globals.strContentFolder="presentation_content";break;case "contentfolder":globals.strContentFolder=c[1];break;case "lms":player.useLMS=!0;break;case "ao":globals.bAOSupport=!0;window.g_bAOSupport=!0;player.useAO=!0;player.forceAO=
!0;break;case "tincan":globals.bTinCan=!0,window.g_bTinCan=!0,player.useTinCan=!0}})};player.loadFonts=function(a){player.fontlib=new ppFontLib(player.basepath,$(a).find("bwContent").attr("iosfonts"));g_oFontLib=player.fontlib;player.fontlib.CreateFonts(function(){player.fontready=!0})};player.parseFrameData=function(a){player.frame.loadFromXML($(a));player.slideList.refresh();player.frame.initOrientation()};
player.loadFrame=function(){if(player.frameData)player.parseFrameData(player.frameData);else if(player.loadFromScript){player.parseDataOnLoad=!0;var a=$("<script><\/script>");a.attr("src",player.basepath+globals.strContentFolder+"/frame.js");$(document.body).append(a);setTimeout(function(){if(!player.createdFrameData)player.loadFromScript=!1,player.loadFrame(),$(document.body).append($("<div class='framefailed'></div>"))},5E3)}else a="?random="+Math.random(),$.ajax({url:player.basepath+globals.strContentFolder+
"/frame.xml"+a,dataType:"xml",success:function(a){player.parseFrameData(a)},error:function(){frame.ready=!0}})};player.loadUserScript=function(){$.ajax({url:player.basepath+globals.strContentFolder+"/user.js",dataType:"script",success:function(){},error:function(){return!1}})};player.loadMasks=function(){if(player.maskData)player.parseMaskData(player.maskData);else if(player.loadFromScript)player.parseDataOnLoad=!0};
player.parseMaskData=function(a){player.bitmasks={};$(a).find("maskdata").each(function(a,c){var d=$(c).attr("i"),e=$(c).attr("m");player.bitmasks[d]=e})};
player.load=function(a){if(player.isMobileFrame&&(480>=window.innerWidth||480>=window.innerHeight)){$(".interstitial").show();$(".wrap").hide();$(".loading").hide();$(".interstitial_play").hide();$(".wrap").remove();$(".loading").remove();$(".interstitial_play").remove();var b=$("<div class='incompatible'><h1>Not yet</h1>Small device support is coming soon.</div>");$(document.body).append(b)}else player.parseStoryData=function(b){if("string"==typeof b){var b=b.replace(/[\u000a\u000b\u000c\u000d\u0085\u2028\u2029]/g,
""),b=b.replace(/&#x[0-8bcef];/ig,""),d;-1<location.search.indexOf("dumpxml=1")&&console.log(b);window.ActiveXObject?(d=new ActiveXObject("Microsoft.XMLDOM"),d.loadXML(b)):d=(new DOMParser).parseFromString(b,"text/xml");b=d}if($(b).find("fontlib")&&0>location.search.indexOf("nocanvas"))player.useCanvas=!0,player.renderVectorShapes=!0,player.renderVectorsAsSVG=!1;story.loadFromXML($(b));if(!globals.strContentFolder||"__CONTENTFOLDER__"==globals.strContentFolder)if(d=$(b).children("bwContent").children("display").attr("framedata"))globals.strContentFolder=
d.replace("/frame.xml","");player.loadFrame();player.loadMasks();player.initLoadQueue();player.loadResourcesForNextSlide();player.loadFonts($(b));if(!window.ExecuteScript)window.ExecuteScript=function(){},player.hasUserScript=0<$(story.xml).find("exe_javascript").length,player.hasUserScript&&player.loadUserScript();var e=player.lmsManager.initResume(),f=setInterval(function(){if(player.ready&&player.frame.ready&&player.fontready&&0==story.pendingSceneCount&&player.lmsManager.isReady()){player.hideLoadingSpinner();
player.pause();window.clearInterval(f);player.showControls&&$("#controls").show();if(!player.frame.defaultLayoutName){var d=$(b).find("set_frame_layout").first().attr("name");if(d)player.frame.defaultLayoutName=d}player.frame.set_frame_layout();player.frame.updateLayout();player.frame.set_frame_layout();var d=player.hasLMS&&story.resumeLMS||player.lmsManager.hasAO&&player.aoResumeData&&story.resumeLMS||player.lmsManager.hasTinCan&&player.tinCanResumeData&&story.resumeLMS||!player.hasLMS&&!player.lmsManager.hasAO&&
!player.lmsManager.hasTinCan&&story.resumeFlash,h="";player.overrideResumeData?h=player.overrideResumeData:story.resumeLMS&&(player.lmsManager.hasAO||player.lmsManager.hasTinCan||player.lmsManager.hasLMS)?h=player.lmsManager.hasAO&&player.aoResumeData?player.aoResumeData:player.lmsManager.hasTinCan&&player.tinCanResumeData?player.tinCanResumeData:e:story.resumeFlash&&(h=localStorageAlias[story.resumeID]);if((player.resumeData=h)&&d&&!story.resumePrompt){if(player.overrideResumeData)h=player.overrideResumeData;
if(player.useCompactResume)try{resumeSuccess=story.updateFromCompactData(h)}catch(j){}else try{story.updateFromData(JSON.parse(h))}catch(k){}player.isMobile&&player.showInterstitial()}if(player.automate)setTimeout(function(){player.revealPostInterstitial();player.automate()},1);else if(h&&story.resumePrompt){d=story.parseObjref(story.resumeWindow).target;h=story.parseObjref(story.resumeSlideID).target;if(player.isMobileFrame){var l=new ResumePrompt;l.loadFromXML(d.xml);l.createRef();story.children[d.id]=
l;l.showSlide(h)}else d.showSlide(h);$(".interstitial").hide();$(".frameInterstitial").hide();$("#slideframe").css("opacity","1.0");$("#control-progress").hide();player.reorient(!0)}else player.isMobile?player.showInterstitial():setTimeout(function(){player.simulateIOSPlayer?player.showInterstitial():player.revealPostInterstitial()},1);a&&a()}},100)},player.storyData?player.parseStoryData(player.storyData):player.loadFromScript?(player.parseDataOnLoad=!0,b=$("<script><\/script>"),b.attr("src",player.basepath+
"mobile/data.js"),$(document.body).append(b),setTimeout(function(){if(!player.createdStoryData)$(document.body).append($("<div class='datafailed'></div>")),player.loadFromScript=!1,player.load()},5E3)):$.ajax({url:player.basepath+globals.strContentFolder+"/data.xml",dataType:"xml",success:function(a){player.parseStoryData(a)},error:function(a,b){alert("Error loading "+player.basepath+globals.strContentFolder+"/data.xml: "+b)}})};
player.tapZoom=function(a){var b=player.currentSlide().ref;if(player.zoomed)b.css("-webkit-transition-property","none"),b.css("-webkit-transition-duration","0s"),b.css("zoom",1),b.css("-webkit-transform",player.lastSlideTransform),b.css("width","720px"),b.css("height","540px"),setTimeout(function(){b.css("-webkit-transition-property","-webkit-transform");b.css("-webkit-transition-duration","0.4s");b.css("-webkit-transform-origin","top left");b.css("-webkit-transform","translate3d(0px,0px,0px) scale(1.0)")},
0);else{if(!a)return;var c=b.offset(),d=$("#slideframe").css("zoom"),e=(a.originalEvent.changedTouches[0].pageY-c.top)/d,f=parseInt((a.originalEvent.changedTouches[0].pageX-c.left)/d/2),g=parseInt(e/2),a="scale(2.0) translate3d(-"+f+"px,-"+g+"px,0px) ";b.css("-webkit-transition-property","-webkit-transform");b.css("-webkit-transition-duration","0.4s");b.css("-webkit-transform-origin","top left");b.css("-webkit-transform",a);b.css("width","1440px");b.css("height","1080px");player.lastSlideTransform=
a;setTimeout(function(){player.zoomed&&(b.css("-webkit-transition-property","none"),b.css("-webkit-transition-duration","0s"),b.css("zoom",2),b.css("-webkit-transform","translate3d(-"+f+"px,-"+g+"px,0px)"))},400)}player.zoomed=!player.zoomed};
player.updateItemInfo=function(a){if(player.showItemInfo){if(!player.itemInfoMonitor)player.itemInfoMonitor=$("<div class='monitor'></div>"),$(document.body).append(player.itemInfoMonitor);if(player.canChangeMonitoringItem&&a)player.monitoringItem=a||player.monitoringItem,player.canChangeMonitoringItem=!1;a=player.monitoringItem;player.itemInfoMonitor.empty();player.itemInfoMonitor.append($("<p>currentTime:"+player.activeTimeline.currentTime+", currentLayerTime: "+player.currentLayerTime+"<br>playing: "+
player.activeTimeline.playing+", paused: "+player.activeTimeline.paused+"</p>"));if(a){$(".item").removeClass("monitoring");a.ref&&a.ref.addClass("monitoring");var b=$("<h2>"+a.id+"</h2>");b.bind("click",function(){alert(a.id)});player.itemInfoMonitor.append(b);player.itemInfoMonitor.append($("<h3>"+a.innerType+" (visible:"+a.visible+")</h3>"));player.itemInfoMonitor.append($("<p>x: "+a.x+" y: "+a.y+" w: "+a.width+" h: "+a.height+" z: "+a.depth+" xoff: "+a.xoffset+" yoff: "+a.yoffset+" dragX: "+a.dragX+
" dragY: "+a.dragY+" ox: "+a.originalX+" oy: "+a.originalY+" sx: "+a.shuffleX+" sy: "+a.shuffleY+" vis: "+a.visible+" r: "+a.rotation+" </p>"));b=$("<a>toggle&nbsp;</a>");b.click(function(){a.visible?a.hide():a.show()});player.itemInfoMonitor.append(b);b=$("<a>&nbsp;render</a>");b.click(function(){var a=$('<canvas class="content" width="600" height="600"></canvas>');a.css("position","absolute");a.css("left","0");a.css("top","0");$(document.body).append(a);a=a.get(0).getContext("2d");a.fillStyle="blue";
a.fillRect(0,0,200,200)});player.itemInfoMonitor.append(b);a.content&&player.itemInfoMonitor.append($("<span>"+a.content.src+"</span>"));b=function(a,b){if(a){var c=$("<table></table>");$.each(a,function(a,d){var e=d;b&&(e="function"==typeof b?b(a,d):d[b]);e=$("<tr><td>"+a+":</td><td>"+e+"</td></tr>");c.append(e)});player.itemInfoMonitor.append(c)}};player.itemInfoMonitor.append("<p/><a href='javascript:void(null);' onclick='player.monitoringItem=null;player.canChangeMonitoringItem=true;player.updateItemInfo();'>change</a>");
player.monitoringItem.parent&&player.itemInfoMonitor.append("(<a href='javascript:void(null);' onclick='player.monitoringItem=player.monitoringItem.parent;player.updateItemInfo();'>parent</a>)");player.itemInfoMonitor.append("<p/><a href='javascript:void(null);' onclick='player.monitoringItem=null;player.canChangeMonitoringItem=true;player.updateItemInfo(player.currentSlide());'>slide</a>");player.itemInfoMonitor.append("<p/><a href='javascript:void(null);' onclick='player.monitoringItem=story.findDescendantById(player.originalMonitoringItemID);player.updateItemInfo();'>sniff</a>");
var c=$("<a href='javascript:void(null);'>log</a>");c.click(function(){console.log(a)});player.itemInfoMonitor.append("<p/>");player.itemInfoMonitor.append(c);c=$("<a href='javascript:void(null);'>resumeData</a>");c.click(function(){console.log(a.GetResumeData())});player.itemInfoMonitor.append("<p/>");player.itemInfoMonitor.append(c);b(a.variables);b(a.children,function(a,b){return"<a href='javascript:void(null);' onclick='player.monitoringItem=player.monitoringItem.children[\""+b.id+"\"];player.updateItemInfo();'>_"+
b.innerType+"_</a>"});b(a.events,"trigger");b(a.states);b(a.actionGroups);player.logActivity?b(a.log):a.content?(player.itemInfoMonitor.append($("<span onclick='alert(this.innerHTML)'>"+a.content.path+"</span><br/>")),a.content.src&&a.content.src!=Element.PixelSrc?player.itemInfoMonitor.append($("<img src='"+a.content.src+"' style='opacity:0.8;border:solid 1px green'>")):player.itemInfoMonitor.append($("<span>NO IMAGE</span>")),a.canvas&&a.canvas.toDataURL&&0==location.href.indexOf("http")&&(b=a.canvas.toDataURL("image/png"),
player.itemInfoMonitor.append($("<img src='"+b+"' style='opacity:0.8;border:solid 1px yellow'>")))):player.itemInfoMonitor.append($("NO CONTENT"));if(a.bitMask&&player.showDebugOverlap){var d=function(a){var b=$("<canvas></canvas>");b.attr("width",a.width);b.attr("height",a.height);b.css("position","relative");player.itemInfoMonitor.append(b);a.drawDebug(b.get(0))};d(a.bitMask);a.stateMasks&&$.each(a.stateMasks,function(a,b){d(b)})}else player.itemInfoMonitor.append($("NO BITMASK"))}else player.itemInfoMonitor.append($("<h2>select an item to monitor</h2>"))}};
var story,tq;$("#loadingSpinner").css("left",Math.floor(window.innerWidth/2)-50);$("#loadingSpinner").css("top",Math.floor(window.innerHeight/2)-50);$(".blocked").css("left",Math.floor(window.innerWidth/2)-50);$(".blocked").css("top",Math.floor(window.innerHeight/2)-50);
$(document).ready(function(){player.g_nStartTime=(new Date).getTime();if(window.WebKitMutationObserver)player.renderTimer=document.createElement("DIV"),player.renderTimer.id="renderer",player.renderTimer.style.position="absolute",player.renderTimer.style.visibility="hidden",document.body.appendChild(player.renderTimer),player.renderTimer.observer=new WebKitMutationObserver(function(a){a.forEach(player.flushShowQueues)}),player.renderTimer.observer.observe(player.renderTimer,{attributes:!0,subtree:!1}),
player.renderTimer.style.opacity="1";player.iosVersion=player.getIOSversion();player.iPhoneiOS7Greater=7<=player.iosVersion[0]&&player.isIPhone;player.loadingSpinner=$("#loadingSpinner");player.playButton=$("#playButton");player.container=$("#slidecontainer");story=new Storyline(player.container);player.frame=new Frame;player.showControls=!0;player.swipeMode="none";player.animations="all";player.simplifySlides=!1;player.lockzoom=!1;player.startTime=new Date;player.sniffParameters();playerDiagnostics.init();
player.lmsManager=new LMSManager;player.lmsManager.init();player.initIOS&&player.initIOS();player.load();if("follow"!=player.swipeMode){var a=function(){!$(this).hasClass("disabled")&&!$(this).hasClass("locked")&&(player.currentSlide(),player.currentWindow||0<$(".modalfence:visible").length||story.handleEvent("onobjectevent","submit_pressed",null,!1,!1,!0))},b=function(){!$(this).hasClass("disabled")&&!$(this).hasClass("locked")&&story.handleEvent("onobjectevent","next_pressed",null,!1,!1,!0)},c=
function(){!$(this).hasClass("disabled")&&!$(this).hasClass("locked")&&story.handleEvent("onobjectevent","prev_pressed",null,!1,!1,!0)},d=function(){!$(this).hasClass("disabled")&&!$(this).hasClass("locked")&&story.handleEvent("onobjectevent","submitall_pressed",null,!1,!1,!0)},e=function(){!$(this).hasClass("disabled")&&!$(this).hasClass("locked")&&story.handleEvent("onobjectevent","finish_pressed",null,!1,!1,!0)};if(player.isMobile){var f=function(){$(this).hasClass("disabled")||$(this).hasClass("locked")};
$(".submit-slide").parent().bind("touchstart",f);$(".label.next").parent().bind("touchstart",f);$(".label.prev").parent().bind("touchstart",f);$(".submitall").parent().bind("touchstart",f);$(".finish-slide").parent().bind("touchstart",f);$(".submit-slide").parent().bind("touchend",a);$(".submitall").parent().bind("touchend",d);$(".finish-slide").parent().bind("touchend",e);$(".label.next").parent().bind("touchend",function(a){!$(this).hasClass("disabled")&&!$(this).hasClass("locked")&&(player.currentSlide().hasSimpleNavigation&&
player.pause(),b(a))});$(".label.prev").parent().bind("touchend",function(a){!$(this).hasClass("disabled")&&!$(this).hasClass("locked")&&(player.currentSlide().hasSimpleNavigation&&player.pause(),c(a))})}else $(".submit-slide").parent().bind("click",a),$(".label.next").parent().bind("click",b),$(".label.prev").parent().bind("click",c),$(".submitall").parent().bind("click",d),$(".finish-slide").parent().bind("click",e);a="click";player.isMobile&&(a="touchend");$("#control-menu").bind(a,function(){player.slideList.toggle()});
$(".button,.controlbar-button").bind("mousedown touchstart",function(){$(this).addClass("pressed")});$(".button,.controlbar-button").bind("mouseup mouseout touchend",function(){$(this).removeClass("pressed")})}$("#control-pauseplay .play").bind(a,function(){player.activeTimeline.play(!1,!1,!1)});$("#control-pauseplay .pause").bind(a,function(){player.activeTimeline.pause(!1,!0,!1)});player.volumeSlider=new VolumeSlider($("#control-volume"));player.volumeSlider.onDragUpdate=function(a){$("audio,video").each(function(b,
c){c.volume=Math.min(a*player.clipVolume,1)});Audio.setMasterVolume&&Audio.setMasterVolume(a);VolumeSlider.updateVolumeIcon(a)};$(document.body).bind("touchstart",function(a){if(player.scrollDebug){var b=a.originalEvent.touches;if(!player.touchDivs)player.touchDivs=[];for(var c=0;c<b.length;c++){var d;player.touchDivs[c]?d=player.touchDivs[c]:(d=$("<div class='touchdiv'></div>"),d.css("left",50*c),$(document.body).append(d),player.touchDivs[c]=d);window!=top?d.css("background-color","red"):d.css("background-color",
"green");setTimeout(function(){d.hide()},1E3);d.show()}}if(a&&a.originalEvent&&a.originalEvent.touches&&1<=a.originalEvent.touches.length)player.touchStart={left:a.originalEvent.touches[0].pageX,top:a.originalEvent.touches[0].pageY},player.touchFlickDirection=null});$(document.body).bind("touchmove",function(a){var b=a.originalEvent.touches;if(player.scrollDebug){if(!player.touchDivs)player.touchDivs=[];for(var c=0;c<b.length;c++){var d=player.touchDivs[c];d.css("background-color","orange");setTimeout(function(){d.hide()},
1E3);d.show()}}if(2<b.length)return!1;if(0!=$(a.target).closest(".slidelist").length)return player.scrollDebug&&$(".touchdiv").css("background-color","mediumorchid"),!0;for(var e=c=!1,b=a.target;!c&&b;){c=$(b).hasClass("scrollarea");if(e=$(b).hasClass("dragitem"))return player.scrollDebug&&$(".touchdiv").css("background-color","blue"),!0;if(c&&player.touchStart){c=parseInt(a.originalEvent.touches[0].pageX-player.touchStart.left);a=parseInt(a.originalEvent.touches[0].pageY-player.touchStart.top);if(!player.touchFlickDirection)player.touchFlickDirection=
Math.abs(c)>Math.abs(a)?"horizontal":"vertical";return"horizontal"==player.touchFlickDirection||0>=b.scrollTop&&0<a||b.scrollTop>=b.scrollHeight-b.offsetHeight&&0>a?!1:!0}b=b.parentNode}return player.isFramedOffset||player.hasNavOutsideFrame});$(window).bind("scroll",function(){return player.isFramedOffset||player.hasNavOutsideFrame});$(window).unbind("keydown");$(window).bind("keydown",function(a){var b=player.currentSlide();if(b){var c=a.keyCode,d=String.fromCharCode(a.keyCode);if(90<a.keyCode||
!/\w/.test(d))c=-1;story.properties.LastKeyCode=c;story.properties.LastKeyCodeString=d;setTimeout(function(){if(player.modalLayer&&player.modalLayer.visible)b=player.modalLayer;b.handleEvent("onkeypress",a,null,!1,!0,!0);b.handleEvent("onanykeypress",a,null,!1,!0,!0);b.deepEach(function(b,c){c.handleEvent&&(c.handleEvent("onkeypress",a,null,!1,!0,!0),c.handleEvent("onanykeypress",a,null,!1,!0,!0))})},0)}if(13==a.keyCode)return!1;if(a.ctrlKey&&a.shiftKey)switch(a.keyCode){case 49:player.forceRepaint();
break;case 50:player.currentSlide().forceRepaint();break;case 51:player.hasAdvanced=!0,story.saveToLocalStorage(),console.log(localStorageAlias[story.resumeID])}});MouseEvents.init();player.progressBar=new ProgressBar(null,$("#progressbar"),!0);player.progressBar.onDragUpdate=function(a){if(player.activeTimeline.enableseek){var b=player.activeTimeline==player?player.currentSlide().duration:player.activeTimeline.duration;player.activeTimeline.currentTime=parseInt(b*a);if(player.activeTimeline==player){if(player.currentClip&&
player.currentTime>player.currentClipStartTime&&player.currentTime<1E3*player.currentClip.duration+player.currentClipStartTime)player.currentClip.currentTime=(player.currentTime-player.currentClipStartTime)/1E3}else if(player.currentClip&&player.activeTimeline.currentTime>player.currentClipStartTime&&player.activeTimeline.currentTime<1E3*player.currentClip.duration+player.currentClipStartTime)player.currentClip.currentTime=(player.activeTimeline.currentTime-player.currentClipStartTime)/1E3;player.update(!0)}};
player.lastOrientation=-1;!player.nointervals&&player.isMobile&&setInterval(function(){player.frame.reorient()},100);player.frame.reorient(!0);player.isMobile||($(window).bind("resize",function(){player.reorient(!0)}),$(document.body).bind("dragstart",function(a){a.preventDefault()}));$(window).bind("selectstart",function(){return!1});player.win7kick=null;if(player.isChrome){var g=0;player.win7kick=setInterval(function(){player.forceRepaint();5<g++&&clearInterval(player.win7kick)},1E3)}});
player.forceRepaint=function(){$(".framewrap").hide();player.uselessOffsetHeight=$(".framewrap").get(0).offsetHeight;$(".framewrap").show()};player.initGlobals=function(){$(document.body).css("background-color",globals.strBgColor);player.scaleToFit="noscale"!=globals.strScale};player.restrictUnsupportedBrowsers=function(){};
window.CreateData=function(a,b){b=b||"storyData";if("string"==typeof a){a=a.replace(/[\u000a\u000b\u000c\u000d\u0085\u2028\u2029]/g,"");a=a.replace(/&#x[0-8bcef];/ig,"");-1<location.search.indexOf("dumpxml=1")&&console.log(a);var c;window.ActiveXObject?(c=new ActiveXObject("Microsoft.XMLDOM"),c.loadXML(a)):c=(new DOMParser).parseFromString(a,"text/xml");a=c}player[b]=a;if(player.parseDataOnLoad&&"storyData"==b)player.createdStoryData=!0,player.parseStoryData(player.storyData)};
window.CreateFrameData=function(a){player.createdFrameData=!0;CreateData(a,"frameData");player.parseDataOnLoad&&player.parseFrameData(player.frameData)};window.CreateMaskData=function(a){player.createdMaskData=!0;CreateData(a,"maskData");player.parseDataOnLoad&&player.parseMaskData(player.maskData)};window.GetPlayer=function(){return player};player.GetVar=function(a){return story.extractVariable(a)};player.SetVar=function(a,b){story.setVariable(a,b)};window.player=player;window.$=$;window.story=story;
var IE6=!1;window.IE6=!1;window.IE6=!1;if(!window.g_bWarnOnCommitFail){var g_bWarnOnCommitFail=!1;window.g_bWarnOnCommitFail=!1;window.g_bWarnOnCommitFail=!1}window.localStorageAlias=window.localStorage;try{window.localStorageTest=window.localStorage.test}catch(e$$62){window.localStorageAlias={},window.localStorageAlias.removeItem=function(){}};player.meta={title:"",description:"",thumburl:"",totalaudio:0,totalvideo:0};player.initIOS=function(){};player.loadMetaData=function(){$.ajax({url:player.basepath+"meta.xml",dataType:"xml",success:function(a){player.parseMetaData(a)},error:function(){}})};
player.parseMetaData=function(a){a=$(a).children("meta").children("project");player.meta.title=a.attr("title");player.meta.thumburl=a.attr("thumburl");player.meta.description=a.children("description").text();player.meta.totalaudio=parseInt(a.attr("totalaudio"));player.meta.totalvideo=parseInt(a.attr("totalvideo"));player.populateIOSLaunch&&player.populateIOSLaunch()};
if(player.isMobile||-1<location.search.indexOf("iosplayer=1")){var isDesktop=-1<location.search.indexOf("iosplayer=1");player.initIOS=function(){player.loadMetaData()};player.prepLaunchButton=function(){var a=document.createElement("canvas");a.width=400;a.height=400;var b=a.getContext("2d");b.translate(200,200);b.beginPath();b.arc(0,0,198,0,2*Math.PI);b.fillStyle="#ddd";b.fill();var c=b.createLinearGradient(0,-200,0,200);c.addColorStop(0,"#444");c.addColorStop(1,"#000");b.beginPath();b.arc(0,0,193,
0,2*Math.PI);b.fillStyle=c;b.fill();b.save();b.beginPath();b.moveTo(140,0);b.rotate(2*Math.PI/3);b.lineTo(140,0);b.rotate(2*Math.PI/3);b.lineTo(140,0);b.closePath();b.fillStyle="#bbb";b.fill();b.restore();a=a.toDataURL();$(".launch_interstitial>a").css("background-image","url("+a+")")};player.showIOSLaunch=function(){if(!player.launch){player.launch=$('<div class="launch_interstitial"><a></a></div>');$(document.body).prepend(player.launch);player.prepLaunchButton();player.launch.show();var a=isDesktop?
"mousedown":"touchstart";player.isIOS&&!player.isIOSlt9&&(a="touchend");player.launch.bind(a,function(a){Video.iOSPrepare&&Video.iOSPrepare();Audio.iOSPrepare&&Audio.iOSPrepare();story.getStartingSlide(!0);setTimeout(function(){player.revealPostInterstitial()},0);Frame.requestFullScreen&&Frame.requestFullScreen()&&setTimeout(function(){player.frame.initOrientation()},100);a.stopPropagation()});player.populateIOSLaunch();if(500>window.innerWidth||player.isIPhone){var b=player.launch.find(".screenshot"),
c=player.launch.find("h1"),d=player.launch.find(".container"),e=function(){var a=player.isCrossDomainFrame?window.orientation:top.window.orientation,e=a/180==parseInt(a/180);e?b.insertAfter(c):d.append(b);if(a!=player.lastLaunchOrientation||window.innerWidth!=player.lastLaunchWidth||window.innerHeight!=player.lastLaunchHeight)player.lastLaunchOrientation=a,player.lastLaunchWidth=window.innerWidth,player.lastLaunchHeight=window.innerHeight,a=1/player.launch.css("zoom"),e?(d.css("width",(window.innerWidth-
100)*a+"px"),d.css("height",(window.innerHeight-100)*a+"px"),b.insertAfter(c)):(d.css("width",(window.innerWidth-80)*a+"px"),d.css("height",(window.innerHeight-80)*a+"px"),d.css("margin","40px"),d.append(b))};player.reorientLaunchInterval=setInterval(function(){e()},100);window.addEventListener("orientationchange",e);e()}}};player.populateIOSLaunch=function(){player.launch&&(player.launch.find("h1").text(player.meta.title),player.launch.find("p").first().text(player.meta.description),player.launch.find("img").first().attr("src",
player.basepath+player.meta.thumburl))}};player.isFramed=top!=self;player.isFramedOffset=!1;player.hasNavOutsideFrame=!1;if(player.isFramed){var myFrame=Frame.findCurrentFrame();if(myFrame)player.isFramedOffset=0<myFrame.offsetWidth||0<myFrame.offsetHeight}
if(player.isMobile||-1<location.search.indexOf("iosorient=1"))player.scaleWithTransform=!0,Frame.requestFullScreen=function(){return!1},player.iosFrameTop=0,player.iosFrameLeft=0,Frame.prototype.initOrientation=function(a,b){var c=Frame.isPortrait();window.scrollTo(player.iosFrameTop,player.iosFrameLeft);if(self!=top&&!player.isCrossDomainFrame)if(c&&$(document.body).addClass("portrait"),player.hasNavOutsideFrame=window.innerHeight!=top.window.innerHeight||window.innerWidth!=top.window.innerWidth,
player.hasNavOutsideFrame){player.scaleToFit=!0;var d=document.createElement("meta");d.setAttribute("id","viewport");d.setAttribute("name","viewport");d.setAttribute("content","width=device-width, user-scalable=yes");document.getElementsByTagName("head")[0].appendChild(d);player.getMyFrame=function(){var a=top.document.getElementsByTagName("iframe"),b=window.frameElement;if(!b){for(var c=0;c<a.length;c++)-1<a[c].src.indexOf("index_lms_html5")&&(b=a[c]);!b&&0<a.length&&(b=a[0])}return b};player.walkToTop=
function(a,b){var c=a,d=self;do{do b(c);while(c=c.offsetParent||c.parentNode||c.frameElement);c=d=d.parent}while(d!=top);return a};player.updateFrameOffset=function(){var a=player.getMyFrame();if(a){var b=parseInt(a.style.left),c=parseInt(a.style.top);if(isNaN(b)||isNaN(c))c=b=0;player.walkToTop(a,function(a){b+=a.offsetLeft||0;c+=a.offsetTop||0});player.iosFrameTop=c;player.iosFrameLeft=b}return a};player.popMyFrame=function(){var a=player.updateFrameOffset();if(!player.hasPoppedOut)player.hasPoppedOut=
!0,a.style.position="absolute",a.style.left=player.iosFrameLeft+"px",a.style.top=player.iosFrameTop+"px",setTimeout(function(){console.log("scrolling",player.iosFrameLeft,player.iosFrameTop,a.style.left,a.style.top);player.updateFrameOffset();top.window.scrollTo(player.iosFrameLeft,player.iosFrameTop);console.log("scrolled",player.iosFrameLeft,player.iosFrameTop,a.style.left,a.style.top)},1E3),console.log("popping",player.iosFrameLeft,player.iosFrameTop,a.style.left,a.style.top),setTimeout(function(){top.document.body.appendChild(a);
console.log("popped",player.iosFrameLeft,player.iosFrameTop,a.style.left,a.style.top)},0),top.window.scrollTo(player.iosFrameLeft,player.iosFrameTop);return a};player.fitToFrameContainer=function(){var a=function(a){return a.innerWidth||a.clientWidth||a.style&&!isNaN(parseInt(a.style.width))&&parseInt(a.style.width)||a.width||0},b=function(a){return a.innerHeight||a.clientHeight||a.style&&!isNaN(parseInt(a.style.height))&&parseInt(a.style.height)||a.height||0},c=player.getMyFrame(),d=a(c),e=b(c);
player.walkToTop(c,function(c){var f=a(c),c=b(c);f&&c&&(d=Math.min(d,f),e=Math.min(e,c))});window.innerWidth=d;window.innerHeight=e;player.frame.updateFrameLayout()};player.fitToFrameContainer()}else top.window.scrollTo(player.iosFrameLeft,player.iosFrameTop);window.scrollTo(0,0);if(!player.hasNavOutsideFrame){player.iPhoneiOS7Greater&&($(document.body).bind("touchstart",function(){player.frame.touchStarted=!0}),$(document.body).bind("touchend",function(){player.frame.touchStarted=!1}));var e=window.innerWidth,
f=window.innerHeight,g=c?f:e,h=c?e:f,d=c?e:f,e=c?f:e;player.isCrossDomainFrame||(e=Math.min(window.innerWidth,top.window.innerWidth),f=Math.min(window.innerHeight,top.window.innerHeight),g=c?f:e,h=c?e:f,d=c?e:f,e=c?f:e);var j=story.frameWidth-2,k=story.frameHeight-2;this.containerWidth=j;this.containerHeight=k;$(".framewrap").css("width",j);$(".framewrap").css("height",k);var l=window.screen.width,m=window.screen.height;if(!player.isAndroid&&!c)l=window.screen.height,m=window.screen.width;f=m-f;c?
(e=m-f,d=l,h=l-f,g=m):(h=m-f,g=l,e=l-f,d=m);f=g/h;l=j/k;c=1;if(!a){this.landscapeWidth=g;this.landscapeHeight=h;c=l>f?g/j:h/k;this.aspectRatio=j/k;f=parseInt((h-k*c)/2-1);0>f&&(f=0);l=parseInt((g-j*c)/2-1);0>l&&(l=0);this.containerLeftLandscape=l;this.containerTopLandscape=f;l="top:"+f+"px!important; left:"+l+"px!important;";if(player.iPhoneiOS7Greater||player.isFramed)l="";f=0.5*Math.min(h,g);g=".framewrap{-webkit-transform-origin:top left;-webkit-transform:translate3d(0px,0px,0px) scale("+c+");width:"+
j+"px;height:"+k+"px;"+l+".interstitial{height:"+h+"px;width:"+g+"px;}}"+("div.launch_interstitial>a{width:"+f+"px;height:"+f+"px;margin-left:"+-f/2+"px;margin-top:"+-f/2+"px;");player.landscapeFrameScale=c;player.frameLandscapeStyleSheet=document.createElement("style");player.frameLandscapeStyleSheet.media=player.isIOS?"only screen and (max-device-width: 1024px) and (orientation:landscape)":"only screen and (orientation:landscape)";player.frameLandscapeStyleSheet.innerHTML=g;document.body.appendChild(player.frameLandscapeStyleSheet)}if(!b&&
(this.portraitWidth=d,this.portraitHeight=e,c=1,c=j/k>d/e?d/j:e/k,f=parseInt((e-k*c)/2-1),0>f&&(f=0),l=parseInt((d-j*c)/2-1),0>l&&(l=0),this.containerLeftPortrait=l,this.containerTopPortrait=f,g="top:"+f+"px!important; left:"+l+"px!important;",player.iPhoneiOS7Greater&&(g=""),f=0.5*Math.min(e,d),d=".framewrap{-webkit-transform-origin:top left;-moz-transform-origin:top left;-ms-transform-origin:top left;-webkit-transform:translate3d(0px,0px,0px) scale("+c+");-moz-transform:translate3d(0px,0px,0px) scale("+
c+");-ms-transform:translate(0px,0px) scale("+c+");width:"+j+"px;height:"+k+"px;"+g+".interstitial{height:"+e+"px;width:"+d+"px;}}"+("div.launch_interstitial>a{width:"+f+"px;height:"+f+"px;margin-left:"+-f/2+"px;margin-top:"+-f/2+"px;"),player.rotatePortraitStyleSheet=document.createElement("style"),player.rotatePortraitStyleSheet.media=player.isIOS?"only screen and (max-device-width: 1024px) and (orientation:portrait)":"only screen and (orientation:portrait)",player.rotatePortraitStyleSheet.innerHTML=
d,document.body.appendChild(player.rotatePortraitStyleSheet),player.portraitFrameScale=c,self!=top))d=d.replace("framewrap","portrait .framewrap").replace("interstitial","portrait .interstitial"),player.rotatePortraitFramedStyleSheet=document.createElement("style"),player.rotatePortraitFramedStyleSheet.innerHTML=d,document.body.appendChild(player.rotatePortraitFramedStyleSheet)}},Frame.prototype.reInitIfNecessary=function(){if(!player.hasNavOutsideFrame){var a=Frame.isPortrait(),b=window.innerHeight,
c,d,e;player.isCrossDomainFrame||(b=Math.min(window.innerHeight,top.window.innerHeight));var f=window.screen.width,g=window.screen.height;if(!player.isAndroid&&!a)f=window.screen.height,g=window.screen.width;var h=g-b;a?(e=g-h,d=f,c=f-h,b=g):(c=g-h,b=f,e=f-h,d=g);a&&(this.portraitWidth!=d||this.portraitHeight!=e)&&player.frame.initOrientation(!0,!1);!a&&(this.landscapeWidth!=b||this.landscapeHeight!=c)&&player.frame.initOrientation(!1,!0)}},Frame.prototype.reorient=function(a){player.hasNavOutsideFrame&&
player.fitToFrameContainer&&player.fitToFrameContainer();if(player.iPhoneiOS7Greater)this.reorientiOS7();else if(player.loadingSpinnerVisible&&($("#loadingSpinner").css("left",Math.floor(window.innerWidth/2)-50),$("#loadingSpinner").css("top",Math.floor(window.innerHeight/2)-50)),player.blocked&&($(".blocked").css("left",Math.floor(window.innerWidth/2)-50),$(".blocked").css("top",Math.floor(window.innerHeight/2)-50)),1!=player.width){var b=player.isCrossDomainFrame?window.orientation:top.window.orientation;
if(a||b!=player.lastOrientation){a=Frame.isPortrait();setTimeout(function(){player.frame.reInitIfNecessary()},300);window.scrollTo(0,0);if(!player.isCrossDomainFrame&&(player.hasPoppedOut||!player.hasNavOutsideFrame))player.updateFrameOffset&&player.updateFrameOffset(),top.window.scrollTo(player.iosFrameLeft,player.iosFrameTop);!player.hasNavOutsideFrame&&player.portraitFrameScale&&!isNaN(player.portraitFrameScale)&&player.landscapeFrameScale&&!isNaN(player.landscapeFrameScale)?a?(player.frameScale=
player.portraitFrameScale,player.frame.containerLeft=player.frame.containerLeftPortrait,player.frame.containerTop=player.frame.containerTopPortrait,$(document.body).addClass("portrait")):(player.frameScale=player.landscapeFrameScale,player.frame.containerLeft=player.frame.containerLeftLandscape,player.frame.containerTop=player.frame.containerTopLandscape,$(document.body).removeClass("portrait")):$(document.body).removeClass("portrait");player.currentZoomImage&&(player.currentZoomImage.zoomedImage.css("-webkit-transition-property",
""),player.currentZoomImage.zoomedImage.css("-webkit-transition-duration","0"),player.currentZoomImage.zoomedImage.css("-moz-transition-property",""),player.currentZoomImage.zoomedImage.css("-moz-transition-duration","0"),player.currentZoomImage.zoomedImage.css("-ms-transition-property",""),player.currentZoomImage.zoomedImage.css("-ms-transition-duration","0"),player.currentZoomImage.setZoomedCSS(player.currentZoomImage.zoomedImage));player.lastOrientation=b}}},Frame.prototype.reorientiOS7=function(){if(!player.frame.touchStarted){var a=
player.isCrossDomainFrame?window.orientation:top.window.orientation;if(player.lastHeight!=window.innerHeight||a!=player.lastOrientation){player.lastHeight=window.innerHeight;player.lastOrientation=a;var b=0,c=0,a=1;if((a=!Frame.isPortrait())&&window.innerHeight!=screen.width){if(!player.allowTouchMove){player.allowTouchMove=!0;if(!player.scrollDiv)player.scrollDiv=document.createElement("div"),player.scrollDiv.style.position="absolute",player.scrollDiv.style.visibility="visible",player.scrollDiv.style.width=
"1px",player.scrollDiv.style.height=screen.width+40+"px";document.body.appendChild(player.scrollDiv)}a=window.innerHeight/story.frameHeight;b=(screen.height-story.frameWidth*a)/2;c=0}else{if(player.allowTouchMove)player.allowTouchMove=!1,player.scrollDiv&&player.scrollDiv.parentNode&&document.body.removeChild(player.scrollDiv);a?(a=screen.height/story.frameWidth,b=window.innerHeight/story.frameHeight,b<a&&(a=b),b=(screen.height-story.frameWidth*a)/2,c=0):(a=window.innerWidth/story.frameWidth,b=0,
c=(window.innerHeight-story.frameHeight*a)/2)}$(".framewrap").css("-webkit-transform","translate3d("+b+"px, "+c+"px, 0px) scale("+a+")");player.frameScale=a;player.frame.containerLeft=b;player.frame.containerTop=c;window.scrollTo(0,0);if(!player.isCrossDomainFrame&&(player.hasPoppedOut||!player.hasNavOutsideFrame))player.updateFrameOffset&&player.updateFrameOffset(),top.window.scrollTo(player.iosFrameLeft,player.iosFrameTop)}}};if(-1<location.search.indexOf("iosmarker=1"))player.isMobileMarkers=!0;
if(player.isMobile||player.isMobileMarkers)ExpandingLabel.prototype.togglecontent=function(){this.visible=!this.visible;this.variables.Expanded=this.visible.toString();this.visible?($(".above").removeClass("above"),$(".showing").removeClass("showing"),this.hideOthers(),this.showContent=!0,this.render(null,!0,this.width,this.expandedHeight),this.show(),this.ref.addClass("above showing"),this.button.ref.addClass("above showing"),this.bringtofront(),this.button.bringtofront(),this.handleEvent("onobjectevent",
"contentin",null,!1,!1,!0)):(this.hide(),$(".above").removeClass("above"),this.handleEvent("onobjectevent","contentout",null,!1,!1,!0))},ExpandingLabel.prototype.hidecomplete=function(){this.variables.Expanded="false";this.hide();$(".above").removeClass("above")},ExpandingLabel.prototype.showtitle=function(){},ExpandingLabel.prototype.hidetitle=function(){};player.forceBitMaskTesting=-1<location.search.indexOf("&pixel=");player.isLocalFileSystem="file:"==window.location.protocol;player.usePixelTesting=(player.isMobile||!player.isLocalFileSystem)&&!player.forceBitMaskTesting;
if(player.usePixelTesting)VectorShape.prototype.isPointActive=function(a,b){if(!this.visible)return!1;if(!this.vectorHot)return this.isHotContextPointActive(a,b);var c=this.getCanvasPoint(a,b);return!this.testOver(a,b)||0>=c.x||0>=c.y||c.x>=this.canvas.width||c.y>=this.canvas.height||this.nearestScrollAreaAncestor&&this.nearestScrollAreaAncestor.hasScrollBars()&&this.nearestScrollAreaAncestor.matrix.unTransformPoint(a,b).x+18>this.nearestScrollAreaAncestor.width||!this.isPointWithinMaskShape(a,b)?
!1:0!=this.context.getImageData(c.x,c.y,1,1).data[3]},StageItem.prototype.testOverlap=function(a){if(0<$(".modalfence:visible").length)return!1;var b=this;if("ItemGroup"==a.innerType||"StateGroup"==a.innerType){var c=!1;$.each(a.children,function(a,d){c=c||b.testOverlap(d)});return c}if("ItemGroup"==b.innerType||"StateGroup"==b.innerType)return c=!1,$.each(b.children,function(d,e){e.testOverlap&&(e.setElementProperty("dragX",b.dragX,!0),e.setElementProperty("dragY",b.dragY,!0),c=c||e.testOverlap(a))}),
c;var d=this.getAABB(),e=a.getAABB(),c=!0;if(d.right<e.left||d.left>e.right||d.bottom<e.top||d.top>e.bottom)c=!1;return this.isRotated||1!=this.slide.scale?c&&this.testRotatedOverlap(a):c&&this.testPixelOverlap&&a.testPixelOverlap?this.testPixelOverlap(a):c},VectorShape.prototype.testPixelOverlap=function(a){if(player.showDebugOverlap){if(!player.testCanvas)player.testCanvas=$("<canvas id='test' width='1000' height='1000' style='position:absolute;z-index:200;left:0px;top:0px;'></canvas>"),$("#slideframe").append(player.testCanvas),
player.testContext=player.testCanvas.get(0).getContext("2d"),player.testContext.fillStyle="rgba(255,255,0,0.5)";player.testCanvas.show();clearTimeout(player.testCanvasClear);player.testCanvasClear=setTimeout(function(){player.testCanvas.hide()},1E3)}var b=this.slideX()+this.dragX,c=this.slideY()+this.dragY,d=0,e=0,f=0,g=0;a.slideX()>b?(d=a.slideX(),e=b+this.width):(d=b,e=a.slideX()+a.width);a.slideY()>c?(f=a.slideY(),g=c+this.height):(f=c,g=a.slideY()+a.height);b=e-d;c=g-f;if(!(0>=b||0>=c)){if(player.showDebugOverlap&&
(!console.filter||this.id==console.filter||a.id==console.filter))player.testContext.fillStyle="rgba(255,255,0,0.5)",player.testContext.clearRect(0,0,1E3,1E3),player.testContext.fillRect(d,f,b,c);for(var c=this.getCanvasPoint(d,f),c=this.context.getImageData(c.x,c.y,e-d,g-f).data,h=a.getCanvasPoint(d,f),e=a.context.getImageData(h.x,h.y,e-d,g-f).data,g=0;g<c.length-4;g+=256)if(0!=c[g+3]&&0!=e[g+3]){var h=d+g/4%b,j=f+Math.floor(g/4/b),k=a.isPointObscured(h,j,this,function(a){return a.dropArea});if(player.showDebugOverlap&&
(!console.filter||this.id==console.filter||a.id==console.filter))k?(player.testContext.fillStyle="rgba(255,0,0,0.9)",player.testContext.fillRect(h-1,j-1,2,2)):(player.testContext.fillStyle="rgba(0,255,0,0.9)",player.testContext.fillRect(h-2,j-2,4,4));if(!k)return!0}return!1}};if(-1<location.search.indexOf("iosscroll=1"))player.isMobileScroll=!0;if(!window.AudioContext&&window.webkitAudioContext)window.AudioContext=window.webkitAudioContext;if(window.AudioContext&&!player.isLocalFileSystem&&-1==location.search.indexOf("nowebaudio=1"))try{var createAlias=function(a,b,c){a[b]||(a[b]=a[c])};player.audioContext=new webkitAudioContext;player.hasWebAudio=!0;createAlias(player.audioContext,"createGain","createGainNode");createAlias(player.audioContext,"createDelay","createDelayNode");createAlias(player.audioContext,"createScriptProcessor","createJavaScriptNode")}catch(e$$64){}
if(player.audioContext)Audio.masterVolume=0.8,Audio.playbackStates={UNSCHEDULED:0,SCHEDULED:1,PLAYING:2,FINISHED:3},Audio.decodeOnLoad=!1,Audio.iOSPrepare=function(){var a=player.audioContext.createOscillator();a.type=0;var b=player.audioContext.createGain();a.connect(b);b.connect(player.audioContext.destination);b.gain.value=0;a.start?a.start(0):a.noteOn(0);try{a.stop?a.stop(0):a.noteOff(0)}catch(c){}},Audio.setMasterVolume=function(a){Audio.masterVolume=a;$.each(player.webAudioClips,function(a,
c){if(c.volume)c.volume.gain.value=Audio.masterVolume*player.clipVolume})},Audio.prototype.setVolume=function(a){if(this.volume)this.volume.gain.value=a},Audio.prototype.createRef=function(){if(this.loadStarted)return!1;this.loadClip();player.webAudioClips[this.getFullObjref()]=this;this.currentTime=0;return!0},Audio.prototype.destroyRef=function(){clearTimeout(this.decodeTimeout);delete player.webAudioClips[this.getFullObjref()];this.loadRequest=this.audioData=null;this.audioLoaded=this.decodeOnLoad=
this.loadStarted=!1;this.releaseBuffer();this.destroyBaseRef()},Audio.prototype.loadClip=function(){if(!this.destroyed){var a=this;if(!a.loadStarted){a.source=null;var b=a.content.src;player.noAudioCache&&(b+="?rand="+Math.random());var c=new XMLHttpRequest;c.open("GET",b,!0);c.responseType="arraybuffer";c.onload=function(){if(400>c.status||player.isIE&&1223==c.status)a.audioData=c.response,a.loadRequest=null,a.loadStarted=!1,a.audioLoaded=!0,(Audio.decodeOnLoad||a.decodeOnLoad)&&a.queueDecode()};
c.onerror=function(){a.setSilent()};c.onreadystatechange=function(){4==c.readyState&&400<=c.status&&!(player.isIE&&1223==c.status)&&a.setSilent()};c.onabort=function(){a.setSilent()};c.send();this.loadRequest=c;this.loadStarted=!0}}},Audio.prototype.queueDecode=function(){var a=this;this.audioLoaded?Audio.currentlyDecoding||Slide.currentlyIntegrating?this.decodeTimeout=setTimeout(function(){a.queueDecode()},100):a.decode():(this.decodeOnLoad=!0,this.loadClip())},Audio.prototype.decode=function(){if(!this.decoding&&
!this.decoded&&!this.destroyed){var a=this;this.decoding=Audio.currentlyDecoding=!0;player.audioContext.decodeAudioData(a.audioData,function(b){if(a.decoding&&!a.decoded)a.decoding=!1,Audio.currentlyDecoding=!1,a.releaseOnDecode?(a.releaseOnDecode=!1,a.releaseBuffer()):(a.decoded=!0,a.buffer=b),a.unblockIfBlocked()},function(){a.failedLoad=!0;a.unblockIfBlocked();Audio.currentlyDecoding=!1;a.decoding=!1;a.releaseBuffer()})}},Audio.prototype.releaseBuffer=function(){this.pauseClip();if(player.isMobile||
player.simulateMobileAudio)this.decoding?this.releaseOnDecode=!0:(this.completeInterval&&window.clearInterval(this.completeInterval),this.completeInterval=null,this.source&&this.source.disconnect&&this.source.disconnect(),this.volume&&this.volume.disconnect&&this.volume.disconnect(),this.buffer=null,this.bufferSet=!1,this.source=this.volume=null,this.decoded=!1)},Audio.prototype.reset=function(a){this.resetMedia(a);if(!a)this.pauseClip(),window.clearInterval(this.completeInterval),clearTimeout(this.decodeTimeout),
this.currentTime=0,this.decodeOnLoad=!1},Audio.prototype.readyOrLoad=function(){if(this.decoded)return!0;this.queueDecode();return!1},Audio.prototype.playClip=function(){if(this.syncToTimeline&&this.syncTargetTimeline&&0<=this.triggerTime)this.currentTime=(this.syncTargetTimeline.currentTime-this.triggerTime)/1E3;else if(this.playState==Media.playState.COMPLETE)this.currentTime=0;if(0>this.currentTime||1E3*this.currentTime>=this.content.duration||!this.decoded&&1E3*this.currentTime>=this.content.duration-
Math.min(200,0.1*this.content.duration))return this.pauseClip(),!1;if(!this.playClipBase())return!1;if(this.source){this.source.onended=null;try{this.source.stop?this.source.stop(0):this.source.noteOff(0)}catch(a){}this.source.disconnect();this.source=null}this.source=player.audioContext.createBufferSource();this.source.buffer=this.buffer;this.volume=player.audioContext.createGain();this.source.connect(this.volume);this.volume.connect(player.audioContext.destination);this.volume.gain.value=Audio.masterVolume*
player.clipVolume;this.contextStartTime=this.source.context.currentTime;this.currentTimeAtStart=this.currentTime;var b=this;this.source.onended=function(){b.audioComplete()};if(isNaN(this.currentTime)||1E3*this.currentTime<player.TICK_DURATION)this.currentTime=0;this.source.start?this.source.start(0,this.currentTime,this.content.duration/1E3-this.currentTime):0==this.currentTime?this.source.noteOn(0):this.source.noteGrainOn(0,this.currentTime,this.content.duration/1E3-this.currentTime);this.completeInterval&&
window.clearInterval(this.completeInterval);b=this;this.completeInterval=window.setInterval(function(){b.source.playbackState==Audio.playbackStates.FINISHED&&b.audioComplete()},player.TICK_DURATION);return!0},Audio.prototype.audioComplete=function(){if(this.playState==Media.playState.PLAYING)window.clearInterval(this.completeInterval),this.playState=Media.playState.COMPLETE,this.handleEvent("onmediacomplete"),this.releaseBuffer()},Audio.prototype.pauseClip=function(){this.pauseSimple();this.pauseClipBase()},
Audio.prototype.pauseSimple=function(){if(this.source){this.currentTime=this.getCurrentTime();this.source.onended=null;try{this.source.stop?this.source.stop(0):this.source.noteOff(0)}catch(a){}this.source.disconnect();this.source=null}window.clearInterval(this.completeInterval)},Audio.prototype.getCurrentTime=function(){if(this.source&&this.source.context&&!isNaN(this.source.context.currentTime)){var a=this.source.context.currentTime-this.contextStartTime+this.currentTimeAtStart;return isNaN(a)?0:
a}return 0},Audio.prototype.setCurrentTime=function(a){this.currentTime=a};
