/*! intel-appframework - v2.1.0 - 2014-04-14 */

/*
 Intel
 @api private
 */
if(!window.af||"function"!==typeof af){var af=function(a){function p(a,c,b){var d=r.createDocumentFragment();if(b){for(b=a.length-1;0<=b;b--)d.insertBefore(a[b],d.firstChild);c.insertBefore(d,c.firstChild)}else{for(b=0;b<a.length;b++)d.appendChild(a[b]);c.appendChild(d)}}function m(a){return a in G?G[a]:G[a]=RegExp("(^|\\s)"+a+"(\\s|$)")}function l(a){for(var c=0;c<a.length;c++)a.indexOf(a[c])!==c&&(a.splice(c,1),c--);return a}function g(a,c){var b=[];if(a==q)return b;for(;a;a=a.nextSibling)1===a.nodeType&&
    a!==c&&b.push(a);return b}function k(a,c){try{return c.querySelectorAll(a)}catch(b){return[]}}function h(a,c){if(a)if(a.nodeType)c[c.length++]=a;else for(var b=0,d=a.length;b<d;b++)c[c.length++]=a[b]}function b(){}function e(c,b){c.os={};c.os.webkit=b.match(/WebKit\/([\d.]+)/)?!0:!1;c.os.android=b.match(/(Android)\s+([\d.]+)/)||b.match(/Silk-Accelerated/)?!0:!1;c.os.androidICS=c.os.android&&b.match(/(Android)\s4/)?!0:!1;c.os.ipad=b.match(/(iPad).*OS\s([\d_]+)/)?!0:!1;c.os.iphone=!c.os.ipad&&b.match(/(iPhone\sOS)\s([\d_]+)/)?
    !0:!1;c.os.ios7=(c.os.ipad||c.os.iphone)&&b.match(/7_/)?!0:!1;c.os.webos=b.match(/(webOS|hpwOS)[\s\/]([\d.]+)/)?!0:!1;c.os.touchpad=c.os.webos&&b.match(/TouchPad/)?!0:!1;c.os.ios=c.os.ipad||c.os.iphone;c.os.playbook=b.match(/PlayBook/)?!0:!1;c.os.blackberry10=b.match(/BB10/)?!0:!1;c.os.blackberry=c.os.playbook||c.os.blackberry10||b.match(/BlackBerry/)?!0:!1;c.os.chrome=b.match(/Chrome/)?!0:!1;c.os.opera=b.match(/Opera/)?!0:!1;c.os.fennec=b.match(/fennec/i)?!0:b.match(/Firefox/)?!0:!1;c.os.ie=b.match(/MSIE 10.0/i)||
    b.match(/Trident\/7/i)?!0:!1;c.os.ieTouch=c.os.ie&&b.toLowerCase().match(/touch/i)?!0:!1;c.os.tizen=b.match(/Tizen/i)?!0:!1;c.os.supportsTouch=a.DocumentTouch&&r instanceof a.DocumentTouch||"ontouchstart"in a;c.os.kindle=b.match(/Silk-Accelerated/)?!0:!1;c.feat={};var d=r.documentElement.getElementsByTagName("head")[0];c.feat.nativeTouchScroll="undefined"!==typeof d.style["-webkit-overflow-scrolling"]&&(c.os.ios||c.os.blackberry10);c.feat.cssPrefix=c.os.webkit?"Webkit":c.os.fennec?"Moz":c.os.ie?"ms":
    c.os.opera?"O":"";c.feat.cssTransformStart=!c.os.opera?"3d(":"(";c.feat.cssTransformEnd=!c.os.opera?",0)":")";c.os.android&&!c.os.webkit&&(c.os.android=!1);for(var d=["Webkit","Moz","ms","O"],f=0;f<d.length;f++)""===r.documentElement.style[d[f]+"Transform"]&&(c.feat.cssPrefix=d[f])}function c(a){return a._afmid||(a._afmid=Q++)}function d(a,b,d,e){b=f(b);if(b.ns)var g=s(b.ns);return(y[c(a)]||[]).filter(function(a){return a&&(!b.e||a.e===b.e)&&(!b.ns||g.test(a.ns))&&(!d||a.fn===d||"function"===typeof a.fn&&
    "function"===typeof d&&a.fn===d)&&(!e||a.sel===e)})}function f(a){a=(""+a).split(".");return{e:a[0],ns:a.slice(1).sort().join(" ")}}function s(a){return RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)")}function J(a,c,b){n.isObject(a)?n.each(a,b):a.split(/\s/).forEach(function(a){b(a,c)})}function F(a,b,d,e,g){var k=c(a),h=y[k]||(y[k]=[]);J(b,d,function(c,b){var d=g&&g(b,c),D=d||b,I=function(c){if(!c.ns||s(c.ns).test(k.ns)){var b=D.apply(a,[c].concat(c.data));!1===b&&c.preventDefault();return b}},
    k=n.extend(f(c),{fn:b,proxy:I,sel:e,del:d,i:h.length});h.push(k);a.addEventListener(k.e,I,!1)})}function t(a,b,f,e){var g=c(a);J(b||"",f,function(c,b){d(a,c,b,e).forEach(function(c){delete y[g][c.i];a.removeEventListener(c.e,c.proxy,!1)})})}function E(a){var c=n.extend({originalEvent:a},a);n.each(R,function(b,d){c[b]=function(){this[d]=S;if("stopImmediatePropagation"===b||"stopPropagation"===b)if(a.cancelBubble=!0,!a[b])return;return a[b].apply(a,arguments)};c[d]=T});return c}function C(a,c,b,d,f){F(a,
    c,b,d,function(c){return function(b){var e,D=n(b.target).closest(d,a).get(0);if(D)return e=n.extend(E(b),{currentTarget:D,liveFired:a,delegateTarget:a,data:f}),c.apply(D,[e].concat([].slice.call(arguments,1)))}})}function u(a,b){if(b&&a.dispatchEvent){var d=n.Event("destroy",{bubbles:!1});a.dispatchEvent(d)}if((d=c(a))&&y[d]){for(var f in y[d])a.removeEventListener(y[d][f].e,y[d][f].proxy,!1);delete y[d]}}function v(a,c){if(a){var b=a.childNodes;if(b&&0<b.length)for(var d;d<b.length;d++)v(b[d],c);
    u(a,c)}}var q,r=a.document,z=[],K=z.slice,G={},U=1,V=/<(\w+)[^>]*>/,x={},A={},L={columncount:!0,fontweight:!0,lineheight:!0,"column-count":!0,"font-weight":!0,"line-height":!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,"z-index":!0,zoom:!0},B="object"===typeof MSApp,w=function(a,c){this.length=0;if(a){if(a instanceof w&&c==q)return a;if(af.isFunction(a))return af(r).ready(a);if(af.isArray(a)&&a.length!=q){for(var b=0;b<a.length;b++)this[this.length++]=a[b];return this}if(af.isObject(a)&&af.isObject(c)){if(a.length==
    q)a.parentNode==c&&(this[this.length++]=a);else for(b=0;b<a.length;b++)a[b].parentNode==c&&(this[this.length++]=a[b]);return this}if(af.isObject(a)&&c==q)return this[this.length++]=a,this;if(c!==q){if(c instanceof w)return c.find(a)}else c=r}else return this;return this.selector(a,c)},n=function(a,c){return new w(a,c)};n.is$=function(a){return a instanceof w};n.map=function(a,c){var b,d=[],f;if(n.isArray(a))for(f=0;f<a.length;f++)b=c.apply(a[f],[a[f],f]),b!==q&&d.push(b);else if(n.isObject(a))for(f in a)a.hasOwnProperty(f)&&
    "length"!==f&&(b=c(a[f],[a[f],f]),b!==q&&d.push(b));return d};n.each=function(a,c){var b;if(n.isArray(a))for(b=0;b<a.length&&!1!==c(b,a[b]);b++);else if(n.isObject(a))for(b in a)if(a.hasOwnProperty(b)&&"length"!==b&&!1===c(b,a[b]))break;return a};n.extend=function(a){a==q&&(a=this);if(1===arguments.length){for(var c in a)this[c]=a[c];return this}K.call(arguments,1).forEach(function(c){for(var b in c)a[b]=c[b]});return a};n.isArray=function(a){return a instanceof Array&&a.push!=q};n.isFunction=function(a){return"function"===
    typeof a&&!(a instanceof RegExp)};n.isObject=function(a){return"object"===typeof a&&null!==a};n.fn=w.prototype={namespace:"appframework",constructor:w,forEach:z.forEach,reduce:z.reduce,push:z.push,indexOf:z.indexOf,concat:z.concat,selector:function(a,c){a=a.trim();if("#"===a[0]&&-1===a.indexOf(".")&&-1===a.indexOf(",")&&-1===a.indexOf(" ")&&-1===a.indexOf(">"))c===r?h(c.getElementById(a.replace("#","")),this):h(k(a,c),this);else if("<"===a[0]&&">"===a[a.length-1]||-1!==a.indexOf("<")&&-1!==a.indexOf(">")){var b=
    r.createElement("div");B?MSApp.execUnsafeLocalFunction(function(){b.innerHTML=a.trim()}):b.innerHTML=a.trim();h(b.childNodes,this)}else h(k(a,c),this);return this},oldElement:void 0,sort:z.sort,slice:z.slice,length:0,setupOld:function(a){if(a==q)return n();a.oldElement=this;return a},map:function(a){var c,b=[],d;for(d=0;d<this.length;d++)c=a.apply(this[d],[d,this[d]]),c!==q&&b.push(c);return n(b)},each:function(a){this.forEach(function(c,b){a.call(c,b,c)});return this},ready:function(a){"complete"===
r.readyState||"loaded"===r.readyState||!n.os.ie&&"interactive"===r.readyState?a():r.addEventListener("DOMContentLoaded",a,!1);return this},find:function(a){if(0===this.length)return this;for(var c=[],b,d=0;d<this.length;d++){b=n(a,this[d]);for(var f=0;f<b.length;f++)c.push(b[f])}return n(l(c))},html:function(a,c){var b=function(){f.innerHTML=a};if(0===this.length)return this;if(a===q)return this[0].innerHTML;for(var d=0;d<this.length;d++)if(!1!==c&&n.cleanUpContent(this[d],!1,!0),B){var f=this[d];
    MSApp.execUnsafeLocalFunction(b)}else this[d].innerHTML=a;return this},text:function(a){if(0===this.length)return this;if(a===q)return this[0].textContent;for(var c=0;c<this.length;c++)this[c].textContent=a;return this},css:function(c,b,d){d=d!=q?d:this[0];if(0===this.length)return this;if(b==q&&"string"===typeof c)return d.style[c]?d.style[c]:a.getComputedStyle(d)[c];for(d=0;d<this.length;d++)if(n.isObject(c))for(var f in c)this[d].style[f]="number"===typeof c[f]&&!L[f.toLowerCase()]?c[f]+"px":c[f];
else this[d].style[c]="number"===typeof b&&!L[c.toLowerCase()]?b+"px":b;return this},vendorCss:function(a,c,b){return this.css(n.feat.cssPrefix+a,c,b)},cssTranslate:function(a){return this.vendorCss("Transform","translate"+n.feat.cssTransformStart+a+n.feat.cssTransformEnd)},computedStyle:function(c){if(!(0===this.length||c==q))return a.getComputedStyle(this[0],"")[c]},empty:function(){for(var a=0;a<this.length;a++)n.cleanUpContent(this[a],!1,!0),this[a].textContent="";return this},hide:function(){if(0===
    this.length)return this;for(var a=0;a<this.length;a++)"none"!==this.css("display",null,this[a])&&(this[a].setAttribute("afmOldStyle",this.css("display",null,this[a])),this[a].style.display="none");return this},show:function(){if(0===this.length)return this;for(var a=0;a<this.length;a++)"none"===this.css("display",null,this[a])&&(this[a].style.display=this[a].getAttribute("afmOldStyle")?this[a].getAttribute("afmOldStyle"):"block",this[a].removeAttribute("afmOldStyle"));return this},toggle:function(a){if(0===
    this.length)return this;for(var c=!0===a,b=0;b<this.length;b++)if("none"!==this.css("display",null,this[b])&&(a==q||!1===c))this[b].setAttribute("afmOldStyle",this.css("display",null,this[b])),this[b].style.display="none";else if("none"===this.css("display",null,this[b])&&(a==q||!0===c))this[b].style.display=this[b].getAttribute("afmOldStyle")?this[b].getAttribute("afmOldStyle"):"block",this[b].removeAttribute("afmOldStyle");return this},val:function(a){if(0===this.length)return a===q?void 0:this;
    if(a==q)return this[0].value;for(var c=0;c<this.length;c++)this[c].value=a;return this},attr:function(a,c){if(0===this.length)return c===q?void 0:this;if(c===q&&!n.isObject(a))return this[0].afmCacheId&&x[this[0].afmCacheId]&&x[this[0].afmCacheId][a]?x[this[0].afmCacheId][a]:this[0].getAttribute(a);for(var b=0;b<this.length;b++)if(n.isObject(a))for(var d in a)n(this[b]).attr(d,a[d]);else n.isArray(c)||n.isObject(c)||n.isFunction(c)?(this[b].afmCacheId||(this[b].afmCacheId=n.uuid()),x[this[b].afmCacheId]||
    (x[this[b].afmCacheId]={}),x[this[b].afmCacheId][a]=c):(null===c?this[b].removeAttribute(a):this[b].setAttribute(a,c),this[b].afmCacheId&&x[this[b].afmCacheId][a]&&delete x[this[b].afmCacheId][a]);return this},removeAttr:function(a){for(var c=function(c){b[d].removeAttribute(c);b[d].afmCacheId&&x[b[d].afmCacheId]&&delete x[b[d].afmCacheId][a]},b=this,d=0;d<this.length;d++)a.split(/\s+/g).forEach(c);return this},prop:function(a,c){if(0===this.length)return c===q?void 0:this;if(c===q&&!n.isObject(a)){var b;
    return this[0].afmCacheId&&A[this[0].afmCacheId]&&A[this[0].afmCacheId][a]?A[this[0].afmCacheId][a]:!(b=this[0][a])&&a in this[0]?this[0][a]:b}for(b=0;b<this.length;b++)if(n.isObject(a))for(var d in a)n(this[b]).prop(d,a[d]);else n.isArray(c)||n.isObject(c)||n.isFunction(c)?(this[b].afmCacheId||(this[b].afmCacheId=n.uuid()),A[this[b].afmCacheId]||(A[this[b].afmCacheId]={}),A[this[b].afmCacheId][a]=c):null===c&&void 0!==c?n(this[b]).removeProp(a):(n(this[b]).removeProp(a),this[b][a]=c);return this},
    removeProp:function(a){for(var c=function(c){b[d][c]&&(b[d][c]=void 0);b[d].afmCacheId&&A[b[d].afmCacheId]&&delete A[b[d].afmCacheId][a]},b=this,d=0;d<this.length;d++)a.split(/\s+/g).forEach(c);return this},remove:function(a){a=n(this).filter(a);if(a==q)return this;for(var c=0;c<a.length;c++)n.cleanUpContent(a[c],!0,!0),a[c]&&a[c].parentNode&&a[c].parentNode.removeChild(a[c]);return this},addClass:function(a){var c=function(a){e.hasClass(a,e[b])||f.push(a)};if(a==q)return this;for(var b=0;b<this.length;b++){var d=
        this[b].className,f=[],e=this;a.split(/\s+/g).forEach(c);this[b].className+=(d?" ":"")+f.join(" ");this[b].className=this[b].className.trim()}return this},removeClass:function(a){if(a==q)return this;for(var c=function(a){d=d.replace(m(a)," ")},b=0;b<this.length;b++){if(a==q){this[b].className="";break}var d=this[b].className;"object"===typeof this[b].className&&(d=" ");a.split(/\s+/g).forEach(c);this[b].className=0<d.length?d.trim():""}return this},toggleClass:function(a,c){if(a==q)return this;for(var b=
        0;b<this.length;b++)"boolean"!==typeof c&&(c=this.hasClass(a,this[b])),n(this[b])[c?"removeClass":"addClass"](a);return this},replaceClass:function(a,c){if(a==q||c==q)return this;for(var b=function(a){f=f.replace(m(a)," ")},d=0;d<this.length;d++)if(a==q)this[d].className=c;else{var f=this[d].className;a.split(/\s+/g).concat(c.split(/\s+/g)).forEach(b);f=f.trim();this[d].className=0<f.length?(f+" "+c).trim():c}return this},hasClass:function(a,c){if(0===this.length)return!1;c||(c=this[0]);return m(a).test(c.className)},
    append:function(c,b,d){if(c&&c.length!=q&&0===c.length)return this;if(n.isArray(c)||n.isObject(c))c=n(c);var f;b&&n(this).add(b);for(b=0;b<this.length;b++)if(c.length&&"string"!==typeof c)c=n(c),p(c,this[b],d);else{var e=V.test(c)?n(c):void 0;if(e==q||0===e.length)e=r.createTextNode(c);if(e instanceof w)for(var g=0,s=e.length;g<s;g++)f=e[g],f.nodeName!=q&&"script"===f.nodeName.toLowerCase()&&(!f.type||"text/javascript"===f.type.toLowerCase())?a.eval(f.innerHTML):p(n(f),this[b],d);else d!=q?this[b].insertBefore(e,
        this[b].firstChild):this[b].appendChild(e)}return this},appendTo:function(a){n(a).append(this);return this},prependTo:function(a){n(a).append(this,null,!0);return this},prepend:function(a){return this.append(a,null,1)},insertBefore:function(a,c){if(0===this.length)return this;a=n(a).get(0);if(!a)return this;for(var b=0;b<this.length;b++)c?a.parentNode.insertBefore(this[b],a.nextSibling):a.parentNode.insertBefore(this[b],a);return this},insertAfter:function(a){this.insertBefore(a,!0)},get:function(a){a=
            a==q?null:a;0>a&&(a+=this.length);if(null===a){a=[];for(var c=0;c<this.length;c++)a.push(this[c]);return a}return this[a]?this[a]:void 0},offset:function(){var c;if(0===this.length)return this;if(this[0]===a)return{left:0,top:0,right:0,bottom:0,width:a.innerWidth,height:a.innerHeight};c=this[0].getBoundingClientRect();return{left:c.left+a.pageXOffset,top:c.top+a.pageYOffset,right:c.right+a.pageXOffset,bottom:c.bottom+a.pageYOffset,width:c.right-c.left,height:c.bottom-c.top}},height:function(c){return 0===
        this.length?this:c!=q?this.css("height",c):this[0]===this[0].window?a.innerHeight:this[0].nodeType===this[0].DOCUMENT_NODE?this[0].documentElement.offsetHeight:(c=this.computedStyle("height").replace("px",""))?+c:this.offset().height},width:function(c){return 0===this.length?this:c!=q?this.css("width",c):this[0]===this[0].window?a.innerWidth:this[0].nodeType===this[0].DOCUMENT_NODE?this[0].documentElement.offsetWidth:(c=this.computedStyle("width").replace("px",""))?+c:this.offset().width},parent:function(a,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      c){if(0===this.length)return this;for(var b=[],d=0;d<this.length;d++)for(var f=this[d];f.parentNode&&f.parentNode!==r&&!(b.push(f.parentNode),f.parentNode&&(f=f.parentNode),!c););return this.setupOld(n(l(b)).filter(a))},parents:function(a){return this.parent(a,!0)},children:function(a){if(0===this.length)return this;for(var c=[],b=0;b<this.length;b++)c=c.concat(g(this[b].firstChild));return this.setupOld(n(c).filter(a))},siblings:function(a){if(0===this.length)return this;for(var c=[],b=0;b<this.length;b++)this[b].parentNode&&
    (c=c.concat(g(this[b].parentNode.firstChild,this[b])));return this.setupOld(n(c).filter(a))},contents:function(a){if(0===this.length)return this;for(var c=[],b=0;b<this.length;b++)this[b].parentNode&&h(this[b].childNodes,c);return this.setupOld(n(c).filter(a))},closest:function(a,c){if(0===this.length)return this;var b=this[0],d=n(a,c);if(0===d.length)return n();for(;b&&-1===d.indexOf(b);)b=b!==c&&b!==r&&b.parentNode;return n(b)},filter:function(a){if(0===this.length||a==q)return this;for(var c=[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      b=0;b<this.length;b++){var d=this[b];d.parentNode&&0<=n(a,d.parentNode).indexOf(d)&&c.push(d)}return this.setupOld(n(l(c)))},not:function(a){if(0===this.length)return this;for(var c=[],b=0;b<this.length;b++){var d=this[b];d.parentNode&&-1===n(a,d.parentNode).indexOf(d)&&c.push(d)}return this.setupOld(n(l(c)))},data:function(a,c){return this.attr("data-"+a,c)},end:function(){return this.oldElement!=q?this.oldElement:n()},clone:function(a){a=!1===a?!1:!0;if(0===this.length)return this;for(var c=[],
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      b=0;b<this.length;b++)c.push(this[b].cloneNode(a));return n(c)},size:function(){return this.length},serialize:function(){if(0===this.length)return"";for(var a=function(a){var b=a.getAttribute("type");if("fieldset"!==a.nodeName.toLowerCase()&&(!a.disabled&&"submit"!==b&&"reset"!==b&&"button"!==b&&("radio"!==b&&"checkbox"!==b||a.checked))&&a.getAttribute("name"))if("select-multiple"===a.type)for(b=0;b<a.options.length;b++)a.options[b].selected&&c.push(a.getAttribute("name")+"="+encodeURIComponent(a.options[b].value));
    else c.push(a.getAttribute("name")+"="+encodeURIComponent(a.value))},c=[],b=0;b<this.length;b++)this.slice.call(this[b].elements).forEach(a);return c.join("&")},eq:function(a){return n(this.get(a))},index:function(a){return a?this.indexOf(n(a)[0]):this.parent().children().indexOf(this[0])},is:function(a){return!!a&&0<this.filter(a).length},add:function(a){a=n(a);var c,b=a.length;for(c=0;c<b;c++)this[this.length++]=a[c];return this}};n.ajaxSettings={type:"GET",beforeSend:b,success:b,error:b,complete:b,
    context:void 0,timeout:0,crossDomain:null,processData:!0};n.jsonP=function(c){if(B)return c.type="get",c.dataType=null,n.get(c);var b="jsonp_callback"+ ++U,d="",f,e=r.createElement("script");a[b]=function(f){clearTimeout(d);n(e).remove();delete a[b];c.success.call(void 0,f)};if(-1!==c.url.indexOf("callback=?"))e.src=c.url.replace(/=\?/,"="+b);else{f=c.jsonp?c.jsonp:"callback";if(-1===c.url.indexOf("?"))c.url+="?"+f+"="+b;else if(-1!==c.url.indexOf("callback=")){f=c.url.indexOf("callback=")+9;var g=
    c.url.indexOf(f);-1===g&&(g=c.url.length);f=c.url.substr(f,g);c.url=c.url.replace("callback="+f,"callback="+b);f=f.replace("window.","");c.success=a[f]}else c.url+="&"+f+"="+b;e.src=c.url}c.error&&(e.onerror=function(){clearTimeout(d);c.error.call(void 0,"","error")});n("head").append(e);0<c.timeout&&(d=setTimeout(function(){c.error.call(void 0,"","timeout")},c.timeout));return{}};n.ajax=function(c){var d,f=n.Deferred();"string"===typeof c&&(c={url:c});var e=c||{},g;for(g in n.ajaxSettings)"undefined"===
typeof e[g]&&(e[g]=n.ajaxSettings[g]);try{e.url||(e.url=a.location);e.headers||(e.headers={});if(!("async"in e)||!1!==e.async)e.async=!0;e.processData&&n.isObject(e.data)&&(e.data=n.param(e.data));"get"===e.type.toLowerCase()&&e.data&&(-1===e.url.indexOf("?")?e.url+="?"+e.data:e.url+="&"+e.data);e.data&&(!e.contentType&&!1!==e.contentType)&&(e.contentType="application/x-www-form-urlencoded; charset=UTF-8");if(e.dataType)switch(e.dataType){case "script":e.dataType="text/javascript, application/javascript";
    break;case "json":e.dataType="application/json";break;case "xml":e.dataType="application/xml, text/xml";break;case "html":e.dataType="text/html";break;case "text":e.dataType="text/plain";break;case "jsonp":return n.jsonP(c);default:e.dataType="text/html"}else e.dataType="text/html";if(/=\?/.test(e.url))return n.jsonP(e);null===e.crossDomain&&(e.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(e.url)&&RegExp.$2!==a.location.host);e.crossDomain||(e.headers=n.extend({"X-Requested-With":"XMLHttpRequest"},e.headers));
    var s,k=e.context,h=/^([\w-]+:)\/\//.test(e.url)?RegExp.$1:a.location.protocol;d=new a.XMLHttpRequest;n.extend(d,f.promise);d.onreadystatechange=function(){var c=e.dataType;if(4===d.readyState){clearTimeout(s);var b,g=!1,l=d.getResponseHeader("content-type")||"";if(200<=d.status&&300>d.status||0===d.status&&"file:"===h){if("application/json"===l||"application/json"===c&&!/^\s*$/.test(d.responseText))try{b=JSON.parse(d.responseText)}catch(P){g=P}else if(-1!==l.indexOf("javascript"))try{b=d.responseText,
        a.eval(b)}catch(m){console.log(m)}else"application/xml, text/xml"===c?b=d.responseXML:"text/html"===c?(b=d.responseText,n.parseJS(b)):b=d.responseText;0===d.status&&0===b.length&&(g=!0);g?(e.error.call(k,d,"parsererror",g),f.reject.call(k,d,"parsererror",g)):(f.resolve.call(k,b,"success",d),e.success.call(k,b,"success",d))}else g=!0,f.reject.call(k,d,"error"),e.error.call(k,d,"error");e.complete.call(k,d,g?"error":"success")}};d.open(e.type,e.url,e.async);e.withCredentials&&(d.withCredentials=!0);
    e.contentType&&(e.headers["Content-Type"]=e.contentType);for(var l in e.headers)"string"===typeof e.headers[l]&&d.setRequestHeader(l,e.headers[l]);if(!1===e.beforeSend.call(k,d,e))return d.abort(),!1;0<e.timeout&&(s=setTimeout(function(){d.onreadystatechange=b;d.abort();e.error.call(k,d,"timeout")},e.timeout));d.send(e.data)}catch(m){f.resolve(k,d,"error",m),e.error.call(k,d,"error",m)}return d};n.get=function(a,c){return this.ajax({url:a,success:c})};n.post=function(a,c,b,d){"function"===typeof c&&
(b=c,c={});d===q&&(d="html");return this.ajax({url:a,type:"POST",data:c,dataType:d,success:b})};n.getJSON=function(a,c,b){"function"===typeof c&&(b=c,c={});return this.ajax({url:a,data:c,success:b,dataType:"json"})};n.getScript=function(a,c){if(/^([\w-]+:)?\/\/([^\/]+)/.test(a)){var b=n.Deferred(),d=n.create("script",{async:!0,src:a}).get(0);d.onload=function(){c&&c();b.resolve.call(this,"success");n(this).remove()};d.onerror=function(){n(this).remove();b.reject.call(this,"success")};r.head.appendChild(d);
    return b.promise}return this.ajax({url:a,success:c,dataType:"script"})};n.param=function(a,c){var b=[];if(a instanceof w)a.each(function(){b.push((c?c+"["+this.id+"]":this.id)+"="+encodeURIComponent(this.value))});else for(var d in a)if(!n.isFunction(a[d])){var e=c?c+"["+d+"]":d,f=a[d];b.push(n.isObject(f)?n.param(f,e):e+"="+encodeURIComponent(f))}return b.join("&")};n.parseJSON=function(a){return JSON.parse(a)};n.parseXML=function(a){if(B)MSApp.execUnsafeLocalFunction(function(){return(new DOMParser).parseFromString(a,
    "text/xml")});else return(new DOMParser).parseFromString(a,"text/xml")};e(n,navigator.userAgent);n.__detectUA=e;n.uuid=function(){var a=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()};n.getCssMatrix=function(c){n.is$(c)&&(c=c.get(0));var b=a.WebKitCSSMatrix||a.MSCSSMatrix;if(c===q)return b?new b:{a:0,b:0,c:0,d:0,e:0,f:0};c=a.getComputedStyle(c);c=c.webkitTransform||c.transform||c[n.feat.cssPrefix+"Transform"];return b?
    new b(c):c?(b=c.replace(/[^0-9\-.,]/g,"").split(","),{a:+b[0],b:+b[1],c:+b[2],d:+b[3],e:+b[4],f:+b[5]}):{a:0,b:0,c:0,d:0,e:0,f:0}};n.create=function(a,c){var b,d=new w;if(c||"<"!==a[0]){c.html&&(c.innerHTML=c.html,delete c.html);b=r.createElement(a);for(var e in c)b[e]=c[e];d[d.length++]=b}else b=r.createElement("div"),B?MSApp.execUnsafeLocalFunction(function(){b.innerHTML=a.trim()}):b.innerHTML=a,h(b.childNodes,d);return d};n.query=function(a,c){if(!a)return new w;c=c||r;return(new w).selector(a,
    c)};var y=[],Q=1;n.event={add:F,remove:t};n.fn.bind=function(a,c){for(var b=0,d=this.length;b<d;b++)F(this[b],a,c);return this};n.fn.unbind=function(a,c){for(var b=0,d=this.length;b<d;b++)t(this[b],a,c);return this};n.fn.one=function(a,c){return this.each(function(b,d){F(this,a,c,null,function(a,c){return function(){t(d,c,a);return a.apply(d,arguments)}})})};var S=function(){return!0},T=function(){return!1},R={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",
    stopPropagation:"isPropagationStopped"};n.fn.delegate=function(a,c,b,d){n.isFunction(b)&&(d=b,b=null);for(var e=0,f=this.length;e<f;e++)C(this[e],c,d,a,b);return this};n.fn.undelegate=function(a,c,b){for(var d=0,e=this.length;d<e;d++)t(this[d],c,b,a);return this};n.fn.on=function(a,c,b,d){n.isFunction(b)&&(d=b,b=null);return c===q||n.isFunction(c)?this.bind(a,c):this.delegate(c,a,b,d)};n.fn.off=function(a,c,b){return c===q||n.isFunction(c)?this.unbind(a,c):this.undelegate(c,a,b)};n.fn.trigger=function(a,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               c,b){"string"===typeof a&&(b=b||{},a=f(a),b.ns=a.ns,a=n.Event(a.e,b));a.data=c;c=0;for(b=this.length;c<b;c++)this[c].dispatchEvent(a);return this};n.Event=function(a,c){var b=r.createEvent("Events"),d=!0;if(c)for(var e in c)"bubbles"===e?d=!!c[e]:b[e]=c[e];b.initEvent(a,d,!0,null,null,null,null,null,null,null,null,null,null,null,null);return b};n.bind=function(a,c,b){if(a){a.__events||(a.__events={});n.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++)a.__events[c[d]]||(a.__events[c[d]]=[]),a.__events[c[d]].push(b)}};
    n.trigger=function(a,c,b){if(a){var d=!0;if(!a.__events)return d;n.isArray(c)||(c=[c]);n.isArray(b)||(b=[]);for(var e=0;e<c.length;e++)if(a.__events[c[e]])for(var f=a.__events[c[e]].slice(0),g=0;g<f.length;g++)n.isFunction(f[g])&&!1===f[g].apply(a,b)&&(d=!1);return d}};n.unbind=function(a,c,b){if(a.__events){n.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++)if(a.__events[c[d]])for(var e=a.__events[c[d]],f=0;f<e.length;f++)if(b==q&&delete e[f],e[f]===b){e.splice(f,1);break}}};n.proxy=function(a,c,b){return function(){return b?
        a.apply(c,b):a.apply(c,arguments)}};var W=function(a,c){for(var b=0;b<a.length;b++)v(a[b],c)};n.cleanUpContent=function(a,c,b){if(a){var d=a.childNodes;d&&0<d.length&&n.asap(W,{},[K.apply(d,[0]),b]);c&&u(a,b)}};var H=[],M=[],N=[];n.asap=function(c,b,d){if(!n.isFunction(c))throw"$.asap - argument is not a valid function";H.push(c);M.push(b?b:{});N.push(d?d:[]);a.postMessage("afm-asap","*")};a.addEventListener("message",function(c){c.source===a&&"afm-asap"===c.data&&(c.stopPropagation(),0<H.length&&
        H.shift().apply(M.shift(),N.shift()))},!0);var O={};n.parseJS=function(c){if(c){if("string"===typeof c){var b=r.createElement("div");B?MSApp.execUnsafeLocalFunction(function(){b.innerHTML=c}):b.innerHTML=c;c=b}var d=c.getElementsByTagName("script");c=null;for(var e=0;e<d.length;e++)if(0<d[e].src.length&&!O[d[e].src]&&!B){var f=r.createElement("script");f.type=d[e].type;f.src=d[e].src;r.getElementsByTagName("head")[0].appendChild(f);O[d[e].src]=1;f=null}else a.eval(d[e].innerHTML)}};"click keydown keyup keypress submit load resize change select error".split(" ").forEach(function(a){n.fn[a]=
        function(c){return c?this.bind(a,c):this.trigger(a)}});["focus","blur"].forEach(function(a){n.fn[a]=function(c){if(0!==this.length){if(c)this.bind(a,c);else for(c=0;c<this.length;c++)try{this[c][a]()}catch(b){}return this}}});n.Deferred=function(){return{reject:function(){},resolve:function(){},promise:{then:function(){},fail:function(){}}}};return n}(window);window.jq=af;"$"in window||(window.$=af);"function"===typeof define&&define.amd?define("appframework",[],function(){return af}):"undefined"!==
    typeof module&&module.exports&&(module.exports.af=af,module.exports.$=af);window.numOnly||(window.numOnly=function(a){if(void 0===a||""===a)return 0;if(isNaN(parseFloat(a)))if(a.replace)a=a.replace(/[^0-9.-]/g,"");else return 0;return parseFloat(a)})};/*
 BSD - https://github.com/cburgmer/ayepromise/commit/299eb65b5ce227873b2f1724c8f5b2bfa723680a
 https://github.com/cburgmer/ayepromise
 */
(function(a,p){a.ayepromise=p()})(this,function(){var a={},p=function(){var a=!1;return function(k){return function(){a||(a=!0,k.apply(null,arguments))}}},m=function(a){var k=a&&a.then;if(null!==a&&"object"===typeof a&&"function"===typeof k)return function(){return k.apply(a,arguments)}},l=function(g,k){var h=a.defer(),b=function(a,c){setTimeout(function(){var b;try{b=a(c)}catch(f){h.reject(f);return}b===h.promise?h.reject(new TypeError("Cannot resolve promise with itself")):h.resolve(b)},1)};return{promise:h.promise,
    callFulfilled:function(a){g&&g.call?b(g,a):h.resolve(a)},callRejected:function(a){k&&k.call?b(k,a):h.reject(a)}}};a.defer=function(){var a=0,k,h=[],b=function(c){a=1;k=c;h.forEach(function(a){a.callFulfilled(k)})},e=function(c){a=2;k=c;h.forEach(function(a){a.callRejected(k)})},c=function(c,b){var d=l(c,b);h.push(d);1===a?d.callFulfilled(k):2===a&&d.callRejected(k);return d.promise},d=function(a){var c;try{c=m(a)}catch(f){e(f);return}if(c){a=c;c=p();try{a(c(d),c(e))}catch(g){c(e)(g)}}else b(a)},f=
    p();return{resolve:f(d),reject:f(e),promise:{then:c,fail:function(a){return c(null,a)}}}};return a});(function(a){a.Deferred=ayepromise.defer})(af);/*
 MIT - https://github.com/darius/requestAnimationFrame/commit/4f27a5a21902a883330da4663bea953b2f96cb15#diff-9879d6db96fd29134fc802214163b95a

 http://paulirish.com/2011/requestanimationframe-for-smart-animating/
 http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
 requestAnimationFrame polyfill by Erik M?ller. fixes from Paul Irish and Tino Zijdel
 MIT license

 Adapted from https://gist.github.com/paulirish/1579671 which derived from
 http://paulirish.com/2011/requestanimationframe-for-smart-animating/
 http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating

 requestAnimationFrame polyfill by Erik M?ller.
 Fixes from Paul Irish, Tino Zijdel, Andrew Mao, Klemen Slavi?, Darius Bacon
 2011 - Intel
 Intel
 2011 Intel
 @author Intel
 @version 2.0
 */
(function(a){a.fn.actionsheet=function(a){for(var l,g=0;g<this.length;g++)l=new p(this[g],a);return 1===this.length?l:this};var p=function(){var m=function(l,g){if(this.el="string"===typeof l||l instanceof String?document.getElementById(l):l){if(this instanceof m){if("object"===typeof g)for(var k in g)this[k]=g[k]}else return new m(l,g);var h=this,b;k=function(){};if("string"===typeof g)b=a("<div id='af_actionsheet'><div style='width:100%'>"+g+"<a href='javascript:;' class='cancel'>Cancel</a></div></div>");
else if("object"===typeof g){b=a("<div id='af_actionsheet'><div style='width:100%'></div></div>");var e=a(b.children().get(0));g.push({text:"Cancel",cssClasses:"cancel"});for(var c=0;c<g.length;c++){var d=a("<a href='javascript:;'>"+(g[c].text||"TEXT NOT ENTERED")+"</a>");d[0].onclick=g[c].handler||k;g[c].cssClasses&&0<g[c].cssClasses.length&&d.addClass(g[c].cssClasses);e.append(d)}}a(l).find("#af_actionsheet").remove();a(l).find("#af_action_mask").remove();a(l).append(b);b.vendorCss("Transition",
    "all 0ms");b.cssTranslate("0,0");b.css("top",window.innerHeight+"px");this.el.style.overflow="hidden";b.on("click","a",function(){h.hideSheet();return!1});this.activeSheet=b;a(l).append("<div id='af_action_mask' style='position:absolute;top:0px;left:0px;right:0px;bottom:0px;z-index:9998;background:rgba(0,0,0,.4)'/>");setTimeout(function(){b.vendorCss("Transition","all 300ms");b.cssTranslate("0,"+-b.height()+"px")},10);a("#af_action_mask").bind("touchstart touchmove touchend click",function(a){a.preventDefault();
    a.stopPropagation()})}else window.alert("Could not find element for actionsheet "+l)};m.prototype={activeSheet:null,hideSheet:function(){var l=this;this.activeSheet.off("click","a",function(){l.hideSheet()});a(this.el).find("#af_action_mask").unbind("click").remove();this.activeSheet.vendorCss("Transition","all 0ms");var g=this.activeSheet,k=this.el;setTimeout(function(){g.vendorCss("Transition","all 300ms");g.cssTranslate("0,0px");setTimeout(function(){g.remove();g=null;k.style.overflow="none"},
    500)},10)}};return m}()})(af);
(function(a){var p=[],m=function(b,e){var c,d;c="string"===typeof b||b instanceof String?document.getElementById(b):a.is$(b)?b[0]:b;c.afCSS3AnimateId||(c.afCSS3AnimateId=a.uuid());d=c.afCSS3AnimateId;p[d]?(p[d].animate(e),c=p[d]):(c=h(c,e),p[d]=c);return c};a.fn.css3Animate=function(a){!a.complete&&a.callback&&(a.complete=a.callback);var e=m(this[0],a);a.complete=null;a.sucess=null;a.failure=null;for(var c=1;c<this.length;c++)e.link(this[c],a);return e};a.css3AnimateQueue=function(){return new h.queue};
    var l=a.feat.cssTransformStart,g=a.feat.cssTransformEnd,k=a.feat.cssPrefix.replace(/-/g,"")+"TransitionEnd",k=a.os.fennec||""===a.feat.cssPrefix||a.os.ie?"transitionend":k,k=k.replace(k.charAt(0),k.charAt(0).toLowerCase()),h=function(){var b=function(e,c){if(!(this instanceof b))return new b(e,c);this.callbacksStack=[];this.activeEvent=null;this.countStack=0;this.isActive=!1;this.el=e;this.linkFinishedProxy=a.proxy(this.linkFinished,this);if(this.el){this.animate(c);var d=this;af(this.el).bind("destroy",
        function(){var a=d.el.afCSS3AnimateId;d.callbacksStack=[];p[a]&&delete p[a]})}};b.prototype={animate:function(b){this.isActive&&this.cancel();this.isActive=!0;if(b){var c=!!b.addClass,d,f,s=numOnly(b.time);if(c)b.removeClass?af(this.el).replaceClass(b.removeClass,b.addClass):af(this.el).addClass(b.addClass);else{0===s&&(b.time=0);b.y||(b.y=0);b.x||(b.x=0);b.previous&&(d=new a.getCssMatrix(this.el),b.y+=numOnly(d.f),b.x+=numOnly(d.e));b.origin||(b.origin="0% 0%");b.scale||(b.scale="1");b.rotateY||
    (b.rotateY="0");b.rotateX||(b.rotateX="0");b.skewY||(b.skewY="0");b.skewX||(b.skewX="0");b.timingFunction||(b.timingFunction="linear");if("number"===typeof b.x||-1===b.x.indexOf("%")&&-1===b.x.toLowerCase().indexOf("px")&&-1===b.x.toLowerCase().indexOf("deg"))b.x=parseInt(b.x,10)+"px";if("number"===typeof b.y||-1===b.y.indexOf("%")&&-1===b.y.toLowerCase().indexOf("px")&&-1===b.y.toLowerCase().indexOf("deg"))b.y=parseInt(b.y,10)+"px";d="translate"+l+b.x+","+b.y+g+" scale("+parseFloat(b.scale)+") rotate("+
        b.rotateX+")";a.os.opera||(d+=" rotateY("+b.rotateY+")");d+=" skew("+b.skewX+","+b.skewY+")";this.el.style[a.feat.cssPrefix+"Transform"]=d;this.el.style[a.feat.cssPrefix+"BackfaceVisibility"]="hidden";void 0!==b.opacity&&(this.el.style.opacity=b.opacity);b.width&&(this.el.style.width=b.width);b.height&&(this.el.style.height=b.height);this.el.style[a.feat.cssPrefix+"TransitionProperty"]="all";-1===(""+b.time).indexOf("s")?(d="ms",f=b.time+d):-1!==b.time.indexOf("ms")?(d="ms",f=b.time):(d="s",f=b.time+
        d);b.delay&&(this.el.style[a.feat.cssPrefix+"TransitionDelay"]=b.delay);this.el.style[a.feat.cssPrefix+"TransitionDuration"]=f;this.el.style[a.feat.cssPrefix+"TransitionTimingFunction"]=b.timingFunction;this.el.style[a.feat.cssPrefix+"TransformOrigin"]=b.origin}this.callbacksStack.push({complete:b.complete,success:b.success,failure:b.failure});this.countStack++;var h=this;f=window.getComputedStyle(this.el);c&&(c=f[a.feat.cssPrefix+"TransitionDuration"],s=numOnly(c),b.time=s,-1!==c.indexOf("ms")?d=
        "ms":(d="s",b.time*=1E3));0===s||"ms"===d&&5>s||"none"===f.display?a.asap(a.proxy(this.finishAnimation,this,[!1])):(this.activeEvent=function(a){clearTimeout(h.timeout);h.finishAnimation(a);h.el.removeEventListener(k,h.activeEvent,!1)},h.timeout=setTimeout(this.activeEvent,numOnly(b.time)+50),this.el.addEventListener(k,this.activeEvent,!1))}else window.alert("Please provide configuration options for animation of "+this.el.id)},addCallbackHook:function(a){a&&this.callbacksStack.push(a);this.countStack++;
        return this.linkFinishedProxy},linkFinished:function(a){a?this.cancel():this.finishAnimation()},finishAnimation:function(a){a&&a.preventDefault&&a.preventDefault();this.isActive&&(this.countStack--,0===this.countStack&&this.fireCallbacks(!1))},fireCallbacks:function(a){this.clearEvents();var c=this.callbacksStack;this.cleanup();for(var b=0;b<c.length;b++){var f=c[b].complete,g=c[b].success,k=c[b].failure;"function"===typeof f&&f(a);a&&"function"===typeof k?k():"function"===typeof g&&g()}},cancel:function(){this.isActive&&
    this.fireCallbacks(!0)},cleanup:function(){this.callbacksStack=[];this.isActive=!1;this.countStack=0},clearEvents:function(){this.activeEvent&&this.el.removeEventListener(k,this.activeEvent,!1);this.activeEvent=null},link:function(a,c){var b={complete:c.complete,success:c.success,failure:c.failure};c.complete=this.addCallbackHook(b);c.success=null;c.failure=null;m(a,c);c.complete=b.complete;c.success=b.success;c.failure=b.failure;return this}};return b}();h.queue=function(){return{elements:[],push:function(a){this.elements.push(a)},
        pop:function(){return this.elements.pop()},run:function(){var a=this;if(0!==this.elements.length&&("function"===typeof this.elements[0]&&this.shift()(),0!==this.elements.length)){var e=this.shift();0<this.elements.length&&(e.complete=function(c){c||a.run()});h(document.getElementById(e.id),e)}},shift:function(){return this.elements.shift()}}}})(af);Date.now||(Date.now=function(){return(new Date).getTime()});
(function(){for(var a=["webkit","moz","ms"],p=0;p<a.length&&!window.requestAnimationFrame;++p){var m=a[p];window.requestAnimationFrame=window[m+"RequestAnimationFrame"];window.cancelAnimationFrame=window[m+"CancelAnimationFrame"]||window[m+"CancelRequestAnimationFrame"]}if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){var l=0;window.requestAnimationFrame=function(a){var k=Date.now(),h=Math.max(l+16,k);return setTimeout(function(){a(l=
    h)},h-k)};window.cancelAnimationFrame=clearTimeout}})();
(function(a){var p=[];a.fn.animateCss=function(g){var k,h="string"===typeof this[0]||this[0]instanceof String?document.getElementById(this[0]):a.is$(this[0])?this[0][0]:this[0];h.afAnimateId||(h.afAnimateId=a.uuid());k=h.afAnimateId;p[k]?(g&&p[k].animate(g),g=p[k]):(g=m(h,g),p[k]=g);return g};var m=function(a,k){if(!(this instanceof m))return new m(a,k);if(this.el=a){k&&this.animate(k);var h=this;af(this.el).bind("destroy",function(){var a=h.el.afAnimateId;p[a]&&delete p[a]})}};m.prototype={animationTimer:null,
    isAnimating:!1,startX:0,startY:0,runTime:0,endX:0,endY:0,currX:0,currY:0,animationStartTime:0,pauseTime:0,completeCB:null,easingFn:"linear",animateOpts:{},updateCb:null,animate:function(g){this.isAnimating||(this.isAnimating=!0,window.cancelAnimationFrame(this.animationTimer),g||(g={x:0,y:0,duration:0}),this.easingFn=g.easing||"linear",this.completeCB=g.complete||null,this.updateCB=g.update||null,this.runTime=numOnly(g.duration),g.complete&&delete g.complete,this.animateOpts=g,this.startTime=Date.now(),
        this.startMatrix=a.getCssMatrix(this.el),0===this.runTime&&this.doAnimate())},start:function(){this.doAnimate()},doAnimate:function(){var a=Date.now(),k,h=this;0===this.runTime||a>=this.startTime+this.runTime?(h.setPosition(this.animateOpts.x,this.animateOpts.y),h.isAnimating=!1,this.updateCB&&this.updateCB({x:this.animateOpts.x,y:this.animateOpts.y}),this.completeCB&&this.completeCB()):(a=(a-this.startTime)/this.runTime,k=l[this.easingFn](1<a?1:a),a=(this.animateOpts.x-this.startMatrix.e)*k+this.startMatrix.e,
        k=(this.animateOpts.y-this.startMatrix.f)*k+this.startMatrix.f,this.setPosition(a,k),this.updateCB&&this.updateCB({x:a,y:k}),this.isAnimating&&(this.animationTimer=window.requestAnimationFrame(function(){h.doAnimate()})))},setPosition:function(g,k){this.el.style[a.feat.cssPrefix+"Transform"]="matrix3d( 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, "+g+", "+k+", 0, 1 )";this.currX=g;this.currY=k},stop:function(){this.isAnimating=!1;window.cancelAnimationFrame(this.animationTimer);this.pauseTime=Date.now()-this.startTime},
    resume:function(){this.isAnimating=!0;this.startTime=Date.now()-this.pauseTime;this.doAnimate()}};var l={linear:function(a){return a},easeOutSine:function(a){return Math.sin(a*Math.PI/2)}}})(af);
(function(a){a.passwordBox=function(){return new p};var p=function(){this.oldPasswords={}};p.prototype={showPasswordPlainText:!1,getOldPasswords:function(m){var l=m&&document.getElementById(m)?document.getElementById(m):document;if(l){m=l.getElementsByTagName("input");for(l=0;l<m.length;l++)"password"===m[l].type&&a.os.webkit&&(m[l].type="text",a(m[l]).vendorCss("TextSecurity","disc"))}else window.alert("Could not find container element for passwordBox "+m)},changePasswordVisiblity:function(m,l){m=
    parseInt(m,10);var g=document.getElementById(l);1===m?a(g).vendorCss("TextSecurity","none"):a(g).vendorCss("TextSecurity","disc");a.os.webkit||(g.type=1===m?"text":"password")}}})(af);
(function(a){function p(){if(a.os.android&&!a.os.chrome&&a.os.webkit){var g=!1;a.bind(a.touchLayer,["cancel-enter-edit","exit-edit"],function(){if(g){g=!1;for(var a in m){var b;m[a].el?b=!0:(delete m[a],b=!1);b&&m[a].androidFormsMode&&m[a].stopFormsMode()}}})}l=!0}var m=[];a.fn.scroller=function(k){for(var h,b,e=0;e<this.length;e++)h=this[e],h.afScrollerId||(h.afScrollerId=a.uuid()),b=h.afScrollerId,m[b]?h=m[b]:(k||(k={}),a.feat.nativeTouchScroll||(k.useJsScroll=!0),h=g(this[e],k),m[b]=h);return 1===
    this.length?h:this};var l=!1,g=function(){function g(c,b){var f=document.createElement("div");f.style.position="absolute";f.style.width=c+"px";f.style.height=b+"px";f.style[a.feat.cssPrefix+"BorderRadius"]="2px";f.style.borderRadius="2px";f.style.display="none";f.className="scrollBar";f.style.background="black";return f}var h,b,e=function(c,b){this.el=c;this.afEl=a(this.el);for(var f in b)this[f]=b[f]};e.prototype={refresh:!1,refreshContent:"Pull to Refresh",refreshHangTimeout:2E3,refreshHeight:60,
    refreshElement:null,refreshCancelCB:null,refreshRunning:!1,scrollTop:0,scrollLeft:0,preventHideRefresh:!0,verticalScroll:!0,horizontalScroll:!1,refreshTriggered:!1,moved:!1,eventsActive:!1,rememberEventsActive:!1,scrollingLocked:!1,autoEnable:!0,blockFormsFix:!1,loggedPcentY:0,loggedPcentX:0,infinite:!1,infiniteEndCheck:!1,infiniteTriggered:!1,scrollSkip:!1,scrollTopInterval:null,scrollLeftInterval:null,bubbles:!0,lockBounce:!1,initScrollProgress:!1,_scrollTo:function(a,b){b=parseInt(b,10);if(0===
        b||isNaN(b))this.el.scrollTop=Math.abs(a.y),this.el.scrollLeft=Math.abs(a.x);else{var f=(this.el.scrollTop-a.y)/Math.ceil(b/10),e=(this.el.scrollLeft-a.x)/Math.ceil(b/10),g=this,k=Math.ceil(this.el.scrollTop-a.y)/f,h=Math.ceil(this.el.scrollLeft-a.x)/f,l=0,m=0;g.scrollTopInterval=window.setInterval(function(){g.el.scrollTop-=f;m++;m>=k&&(g.el.scrollTop=a.y,clearInterval(g.scrollTopInterval))},10);g.scrollLeftInterval=window.setInterval(function(){g.el.scrollLeft-=e;l++;l>=h&&(g.el.scrollLeft=a.x,
        clearInterval(g.scrollLeftInterval))},10)}},enable:function(){},disable:function(){},hideScrollbars:function(){},addPullToRefresh:function(){},_scrollToTop:function(a){this._scrollTo({x:0,y:0},a)},_scrollToBottom:function(a){this._scrollTo({x:0,y:this.el.scrollHeight-this.el.offsetHeight},a)},scrollToBottom:function(a){return this._scrollToBottom(a)},scrollToTop:function(a){return this._scrollToTop(a)},init:function(c,b){this.el=c;this.afEl=a(this.el);this.defaultProperties();for(var f in b)this[f]=
        b[f];var e=this,g=function(){e.eventsActive&&(!a.feat.nativeTouchScroll&&(!a.ui||a.ui.activeDiv===e.container))&&e.adjustScroll()};this.afEl.bind("destroy",function(){e.disable(!0);var c=e.el.afScrollerId;m[c]&&delete m[c];a.unbind(a.touchLayer,"orientationchange-reshape",g)});a.bind(a.touchLayer,"orientationchange-reshape",g);a(window).bind("resize",g)},needsFormsFix:function(c){return this.useJsScroll&&this.isEnabled()&&"none"!==this.el.style.display&&0<a(c).closest(this.afEl).size()},handleEvent:function(a){if(!this.scrollingLocked)switch(a.type){case "touchstart":clearInterval(this.scrollTopInterval);
        this.preventHideRefresh=!this.refreshRunning;this.moved=!1;this.onTouchStart(a);this.bubbles||a.stopPropagation();break;case "touchmove":this.onTouchMove(a);this.bubbles||a.stopPropagation();break;case "touchend":this.onTouchEnd(a);this.bubbles||a.stopPropagation();break;case "scroll":this.onScroll(a)}},coreAddPullToRefresh:function(c){c&&(this.refreshElement=c);null===this.refreshElement?(c=document.getElementById(this.container.id+"_pulldown"),c=null!==c?a(c):a("<div id='"+this.container.id+"_pulldown' class='afscroll_refresh' style='position:relative;height:60px;text-align:center;line-height:60px;font-weight:bold;'>"+
        this.refreshContent+"</div>")):c=a(this.refreshElement);c=c.get(0);this.refreshContainer=a("<div style='overflow:hidden;height:0;width:100%;display:none;background:inherit;-webkit-backface-visibility: hidden !important;'></div>");a(this.el).prepend(this.refreshContainer.prepend(c));this.refreshContainer=this.refreshContainer[0]},fireRefreshRelease:function(c){if(this.refresh&&c&&(this.setRefreshContent("Refreshing..."),c=!1!==a.trigger(this,"refresh-release",[c]),this.preventHideRefresh=!1,this.refreshRunning=
        !0,c)){var b=this;0<this.refreshHangTimeout&&(this.refreshCancelCB=setTimeout(function(){b.hideRefresh()},this.refreshHangTimeout))}},setRefreshContent:function(c){a(this.container).find(".afscroll_refresh").html(c)},lock:function(){this.scrollingLocked||(this.scrollingLocked=!0,(this.rememberEventsActive=this.eventsActive)&&this.disable())},unlock:function(){this.scrollingLocked&&(this.scrollingLocked=!1,this.rememberEventsActive&&this.enable())},scrollToItem:function(c,b){a.is$(c)||(c=a(c));var f,
        e;"bottom"===b?(f=c.offset(),f=f.top-this.afEl.offset().bottom+f.height,f+=4):(f=c.offset().top,f-=document.body.scrollTop,e=this.afEl.offset().top,document.body.scrollTop<e&&(f-=e),f-=4);this.scrollBy({y:f,x:0},0)},setPaddings:function(c,b){var f=a(this.el),e=numOnly(f.css("paddingTop"));f.css("paddingTop",c+"px").css("paddingBottom",b+"px");this.scrollBy({y:c-e,x:0})},divide:function(a,b){return 0!==b?a/b:0},isEnabled:function(){return this.eventsActive},addInfinite:function(){this.infinite=!0},
    clearInfinite:function(){this.infiniteTriggered=!1;this.scrollSkip=!0},scrollTo:function(a,b){return this._scrollTo(a,b)},updateP2rHackPosition:function(){}};h=function(c,b){this.init(c,b);if(b.hasParent)this.container=this.el.parentNode;else{var f=a.create("div",{});f.append(a(this.el).contents());a(this.el).append(f);this.container=this.el;this.el=f.get(0)}this.container.afScrollerId=c.afScrollerId;this.afEl=a(this.container);"hidden"!==this.container.style.overflow&&(this.container.style.overflow=
    "hidden");this.addPullToRefresh(null,!0);b.autoEnable&&(this.autoEnable=b.autoEnable);this.autoEnable&&this.enable(!0);this.verticalScroll&&(!0===this.verticalScroll&&!0===this.scrollBars)&&(f=g(5,20),f.style.top="0px",this.vScrollCSS&&(f.className=this.vScrollCSS),f.style.display="none",this.container.appendChild(f),this.vscrollBar=f);this.horizontalScroll&&(!0===this.horizontalScroll&&!0===this.scrollBars)&&(f=g(20,5),f.style.bottom="0px",this.hScrollCSS&&(f.className=this.hScrollCSS),f.style.display=
    "none",this.container.appendChild(f),this.hscrollBar=f);this.horizontalScroll&&(this.el.style.cssFloat="left");this.el.hasScroller=!0};b=function(c,b){b.nativeParent&&(c=c.parentNode);this.init(c,b);var f=a(c);if(!0===b.replaceParent){var e=f.parent();f.css("height",e.height()).css("width",e.width());f.insertBefore(f.parent());e.remove()}this.container=this.el;f.css("-webkit-overflow-scrolling","touch");b.autoEnable&&(this.autoEnable=b.autoEnable);this.autoEnable&&this.enable()};b.prototype=new e;
    h.prototype=new e;b.prototype.defaultProperties=function(){this.refreshContainer=null;this.dX=this.cX=this.dY=this.cY=0;this.cancelPropagation=!1;this.yReset=this.xReset=this.loggedPcentX=this.loggedPcentY=0;var a=this;this.adjustScrollOverflowProxy=function(){a.afEl.css("overflow","auto");a.afEl.parent().css("overflow","hidden")}};b.prototype.enable=function(a){this.eventsActive||(this.eventsActive=!0,this.el.style.overflow="auto",a||this.adjustScroll(),this.el.addEventListener("touchstart",this,
        !1),this.el.addEventListener("scroll",this,!1),this.updateP2rHackPosition())};b.prototype.disable=function(c){this.eventsActive&&(this.logPos(this.el.scrollLeft,this.el.scrollTop),!c&&!a.ui&&(this.el.style.overflow="hidden"),this.el.removeEventListener("touchstart",this,!1),this.el.removeEventListener("touchmove",this,!1),this.el.removeEventListener("touchend",this,!1),this.el.removeEventListener("scroll",this,!1),this.eventsActive=!1)};b.prototype.addPullToRefresh=function(a,b){b||(this.refresh=
        !0);this.refresh&&!0===this.refresh&&(this.coreAddPullToRefresh(a),this.refreshContainer.style.position="absolute",this.refreshContainer.style.top="-60px",this.refreshContainer.style.height="60px",this.refreshContainer.style.display="block",this.updateP2rHackPosition())};b.prototype.updateP2rHackPosition=function(){if(!this.refresh)return a(this.el).find(".p2rhack").remove();var c=a(this.el).find(".p2rhack");0===c.length&&(a(this.el).append("<div class='p2rhack' style='position:absolute;width:1px;height:1px;opacity:0;background:transparent;z-index:-1;-webkit-transform:translate3d(-1px,0,0);'></div>"),
        c=a(this.el).find(".p2rhack"));c.css("top",this.el.scrollHeight+this.refreshHeight+1+"px")};b.prototype.onTouchStart=function(a){this.lastScrollInfo={top:0};this.xReset=this.yReset=0;this.verticalScroll&&(0===this.el.scrollTop&&this.refresh&&(this.el.scrollTop=1,this.yReset=-1),this.el.scrollTop===this.el.scrollHeight-this.el.clientHeight&&this.infinite&&(this.el.scrollTop-=1,this.yReset=1));this.horizontalScroll&&(0===this.el.scrollLeft&&(this.el.scrollLeft=1,this.xReset=-1),this.el.scrollLeft===
        this.el.scrollWidth-this.el.clientWidth&&(this.el.scrollLeft-=1,this.xReset=1));this.refreshCancelCB&&clearTimeout(this.refreshCancelCB);this.refresh&&this.el.addEventListener("touchend",this,!1);this.el.addEventListener("touchmove",this,!1);this.dY=a.touches[0].pageY;this.dX=a.touches[0].pageX;this.startTop=this.el.scrollTop;this.startLeft=this.el.scrollLeft;(this.refresh||this.infinite)&&this.refresh&&0>this.dY&&this.showRefresh()};b.prototype.onTouchMove=function(c){var b=c.touches[0].pageY-this.dY,
        f=c.touches[0].pageX-this.dX,e=this.el.scrollHeight-this.el.scrollTop===this.el.clientHeight&&0>b,g=this.el.scrollWidth-this.el.scrollLeft===this.el.clientWidth&&0>f,k="input"!==c.target.tagName.toLowerCase();this.verticalScroll&&0===this.startTop&&0===this.el.scrollTop&&0<b&&k&&c.preventDefault();this.horizontalScroll&&0===this.startTop&&0===this.el.scrollLeft&&0<f&&k&&c.preventDefault();this.verticalScroll&&e&&k&&c.preventDefault();this.horizontalScroll&&g&&k&&c.preventDefault();this.moved||(a.trigger(this,
        "scrollstart",[this.el,{x:f,y:b}]),a.trigger(a.touchLayer,"scrollstart",[this.el,{x:f,y:b}]),this.refresh||this.el.addEventListener("touchend",this,!1),this.moved=!0);this.horizontalScroll&&Math.abs(b)>Math.abs(f)&&c.preventDefault();this.refresh&&this.el.scrollTop<-this.refreshHeight?this.showRefresh():this.refresh&&this.refreshTriggered&&this.refreshRunning&&this.el.scrollTop>this.refreshHeight?(this.refreshRunning=this.refreshTriggered=!1,this.refreshCancelCB&&clearTimeout(this.refreshCancelCB),
        this.hideRefresh(!1),this.setRefreshContent("Pull to Refresh"),a.trigger(this,"refresh-cancel")):this.refresh&&(this.refreshTriggered&&!this.refreshRunning&&this.el.scrollTop>-this.refreshHeight)&&(this.refreshRunning=this.refreshTriggered=!1,this.refreshCancelCB&&clearTimeout(this.refreshCancelCB),this.hideRefresh(!1),this.setRefreshContent("Pull to Refresh"),a.trigger(this,"refresh-cancel"));this.cY=b;this.cX=f;this.lastScrollInfo.top=this.cY;this.initScrollProgress&&(a.trigger(this,"scroll",[{x:-this.el.scrollLeft,
        y:-this.el.scrollTop}]),a.trigger(a.touchLayer,"scroll",[{x:-this.el.scrollLeft,y:-this.el.scrollTop}]))};b.prototype.showRefresh=function(){this.refreshTriggered||(this.refreshTriggered=!0,this.setRefreshContent("Release to Refresh"),a.trigger(this,"refresh-trigger"))};b.prototype.onTouchEnd=function(){var c=this.el.scrollTop<=-this.refreshHeight;this.fireRefreshRelease(c,!0);this.moved||(this.el.scrollTop+=this.yReset,this.el.scrollLeft+=this.xReset);if(c&&this.refresh){var b=a.create("<div style='height:"+
        this.el.clientHeight+this.refreshHeight+"px;width:1px;-webkit-transform:translated3d(-1px,0,0)'></div>");a(this.el).append(b);this.refreshContainer.style.top="0px";this.refreshContainer.style.position="";setTimeout(function(){b.remove()})}this.el.removeEventListener("touchmove",this,!1);this.el.removeEventListener("touchend",this,!1);this.infiniteEndCheck=!0;this.infinite&&(!this.infiniteTriggered&&this.el.scrollTop>=this.el.scrollHeight-this.el.clientHeight)&&(this.infiniteTriggered=!0,a.trigger(this,
        "infinite-scroll"),this.infiniteEndCheck=!0);this.touchEndFired=!0;var f=this,e=this.el.scrollTop,g=this.el.scrollLeft,k=0;clearInterval(f.nativePolling);f.nativePolling=setInterval(function(){k++;25===k&&f.initScrollProgress&&(a.trigger(f,"scroll",[{x:-f.el.scrollLeft+f.cX,y:-f.el.scrollTop+f.cY}]),a.trigger(a.touchLayer,"scroll",[{x:-f.el.scrollLeft+f.cX,y:-f.el.scrollTop+f.cY}]));if(200<=k)clearInterval(f.nativePolling),f.initScrollProgress&&(a.trigger(f,"scroll",[{x:-f.el.scrollLeft,y:-f.el.scrollTop}]),
        a.trigger(a.touchLayer,"scroll",[{x:-f.el.scrollLeft,y:-f.el.scrollTop}]));else if(f.el.scrollTop!==e||f.el.scrollLeft!==g)clearInterval(f.nativePolling),a.trigger(a.touchLayer,"scrollend",[f.el]),a.trigger(f,"scrollend",[f.el]),f.initScrollProgress&&(a.trigger(f,"scroll",[{x:-f.el.scrollLeft,y:-f.el.scrollTop}]),a.trigger(a.touchLayer,"scroll",[{x:-f.el.scrollLeft,y:-f.el.scrollTop}]))},20)};b.prototype.hideRefresh=function(c){if(!this.preventHideRefresh){var b=this,f=function(c){b.refreshContainer.style.top=
        "-60px";b.refreshContainer.style.position="absolute";b.dY=b.cY=0;c||(b.el.style[a.feat.cssPrefix+"Transform"]="none",b.el.style[a.feat.cssPrefix+"TransitionProperty"]="none",b.el.scrollTop=0,b.logPos(b.el.scrollLeft,0),b.refreshRunning=!1,b.setRefreshContent("Pull to Refresh"),a.trigger(b,"refresh-finish"))};!1===c||!b.afEl.css3Animate?f():b.afEl.css3Animate({y:b.el.scrollTop-b.refreshHeight+"px",x:"0%",time:"325ms",complete:f});this.refreshTriggered=!1}};b.prototype.hideScrollbars=function(){};b.prototype.scrollTo=
        function(a,b){this.logPos(a.x,a.y);a.x*=-1;a.y*=-1;return this._scrollTo(a,b)};b.prototype.scrollBy=function(a,b){a.x+=this.el.scrollLeft;a.y+=this.el.scrollTop;this.logPos(this.el.scrollLeft,this.el.scrollTop);return this._scrollTo(a,b)};b.prototype.scrollToBottom=function(a){this._scrollToBottom(a);this.logPos(this.el.scrollLeft,this.el.scrollTop)};b.prototype.onScroll=function(){this.infinite&&this.touchEndFired?this.touchEndFired=!1:this.scrollSkip?this.scrollSkip=!1:(this.infinite&&(!this.infiniteTriggered&&
        this.el.scrollTop>=this.el.scrollHeight-this.el.clientHeight)&&(this.infiniteTriggered=!0,a.trigger(this,"infinite-scroll"),this.infiniteEndCheck=!0),this.infinite&&(this.infiniteEndCheck&&this.infiniteTriggered)&&(this.infiniteEndCheck=!1,a.trigger(this,"infinite-scroll-end")))};b.prototype.logPos=function(a,b){this.loggedPcentX=this.divide(a,this.el.scrollWidth);this.loggedPcentY=this.divide(b,this.el.scrollHeight);this.scrollLeft=a;this.scrollTop=b;isNaN(this.loggedPcentX)&&(this.loggedPcentX=
        0);isNaN(this.loggedPcentY)&&(this.loggedPcentY=0)};b.prototype.adjustScroll=function(){this.adjustScrollOverflowProxy();this.el.scrollLeft=this.loggedPcentX*this.el.scrollWidth;this.el.scrollTop=this.loggedPcentY*this.el.scrollHeight;this.logPos(this.el.scrollLeft,this.el.scrollTop)};h.prototype.defaultProperties=function(){this.boolScrollLock=!1;this.elementInfo=this.currentScrollingObject=null;this.verticalScroll=!0;this.horizontalScroll=!1;this.scrollBars=!0;this.hscrollBar=this.vscrollBar=null;
        this.vScrollCSS=this.hScrollCSS="scrollBar";this.firstEventInfo=null;this.moved=!1;this.preventPullToRefresh=!0;this.refreshSafeKeep=this.androidFormsMode=this.isScrolling=!1;this.lastScrollbar="";this.scrollingFinishCB=this.container=this.finishScrollingObject=null;this.androidPerfHack=this.loggedPcentX=this.loggedPcentY=0};h.prototype.enable=function(a){this.eventsActive||(this.eventsActive=!0,a?this.scrollerMoveCSS({x:0,y:0},0):this.adjustScroll(),this.container.addEventListener("touchstart",this,
        !1),this.container.addEventListener("touchmove",this,!1),this.container.addEventListener("touchend",this,!1))};h.prototype.adjustScroll=function(){var a=this.getViewportSize();this.scrollerMoveCSS({x:Math.round(this.loggedPcentX*(this.el.clientWidth-a.w)),y:Math.round(this.loggedPcentY*(this.el.clientHeight-a.h))},0)};h.prototype.disable=function(){if(this.eventsActive){var a=this.getCSSMatrix(this.el);this.logPos(numOnly(a.e)-numOnly(this.container.scrollLeft),numOnly(a.f)-numOnly(this.container.scrollTop));
        this.container.removeEventListener("touchstart",this,!1);this.container.removeEventListener("touchmove",this,!1);this.container.removeEventListener("touchend",this,!1);this.eventsActive=!1}};h.prototype.addPullToRefresh=function(a,b){b||(this.refresh=!0);this.refresh&&!0===this.refresh&&(this.coreAddPullToRefresh(a),this.el.style.overflow="visible")};h.prototype.hideScrollbars=function(){this.hscrollBar&&(this.hscrollBar.style.display="none",this.hscrollBar.style[a.feat.cssPrefix+"TransitionDuration"]=
        "0ms");this.vscrollBar&&(this.vscrollBar.style.display="none",this.vscrollBar.style[a.feat.cssPrefix+"TransitionDuration"]="0ms")};h.prototype.getViewportSize=function(){var a=window.getComputedStyle(this.container);isNaN(numOnly(a.paddingTop))&&window.alert(typeof a.paddingTop+"::"+a.paddingTop+":");return{h:this.container.clientHeight>window.innerHeight?window.innerHeight:this.container.clientHeight-numOnly(a.paddingTop)-numOnly(a.paddingBottom),w:this.container.clientWidth>window.innerWidth?window.innerWidth:
        this.container.clientWidth-numOnly(a.paddingLeft)-numOnly(a.paddingRight)}};h.prototype.onTouchStart=function(b){this.moved=!1;this.currentScrollingObject=null;a(this.el).animateCss().stop();if(this.container&&(this.refreshCancelCB&&(clearTimeout(this.refreshCancelCB),this.refreshCancelCB=null),this.scrollingFinishCB&&(clearTimeout(this.scrollingFinishCB),this.scrollingFinishCB=null),!(1!==b.touches.length||this.boolScrollLock)&&!(b.touches[0].target&&void 0!==b.touches[0].target.type&&"select"===
        b.touches[0].target.tagName.toLowerCase()))){var d={top:0,left:0,speedY:0,speedX:0,absSpeedY:0,absSpeedX:0,deltaY:0,deltaX:0,absDeltaY:0,absDeltaX:0,y:0,x:0,duration:0};this.elementInfo={};var f=this.getViewportSize();this.elementInfo.bottomMargin=f.h;this.elementInfo.maxTop=this.el.clientHeight-this.elementInfo.bottomMargin;0>this.elementInfo.maxTop&&(this.elementInfo.maxTop=0);this.elementInfo.divHeight=this.el.clientHeight;this.elementInfo.rightMargin=f.w;this.elementInfo.maxLeft=this.el.clientWidth-
        this.elementInfo.rightMargin;0>this.elementInfo.maxLeft&&(this.elementInfo.maxLeft=0);this.elementInfo.divWidth=this.el.clientWidth;this.elementInfo.hasVertScroll=this.verticalScroll||0<this.elementInfo.maxTop;this.elementInfo.hasHorScroll=0<this.elementInfo.maxLeft;this.elementInfo.requiresVScrollBar=this.vscrollBar&&this.elementInfo.hasVertScroll;this.elementInfo.requiresHScrollBar=this.hscrollBar&&this.elementInfo.hasHorScroll;this.saveEventInfo(b);this.saveFirstEventInfo(b);b=this.getCSSMatrix(this.el);
        d.top=numOnly(b.f)-numOnly(this.container.scrollTop);d.left=numOnly(b.e)-numOnly(this.container.scrollLeft);this.container.scrollTop=this.container.scrollLeft=0;this.currentScrollingObject=this.el;this.refresh&&0===d.top?(this.refreshContainer.style.display="block",this.refreshHeight=this.refreshContainer.firstChild.clientHeight,this.refreshContainer.firstChild.style.top=-this.refreshHeight+"px",this.refreshContainer.style.overflow="visible",this.preventPullToRefresh=!1):0>d.top&&(this.preventPullToRefresh=
            !0,this.refresh&&(this.refreshContainer.style.overflow="hidden"));d.x=d.left;d.y=d.top;this.setVScrollBar(d,0,0)&&(this.vscrollBar.style.right="0px",this.vscrollBar.style[a.feat.cssPrefix+"Transition"]="",a(this.vscrollBar).animateCss().stop());this.setHScrollBar(d,0,0)&&(this.container.clientHeight>window.innerHeight?this.hscrollBar.style.top=window.innerHeight-numOnly(this.hscrollBar.style.height)+"px":this.hscrollBar.style.bottom=numOnly(this.hscrollBar.style.height),this.hscrollBar.style[a.feat.cssPrefix+
            "Transition"]="",a(this.hscrollBar).animateCss().stop());this.lastScrollInfo=d;this.hasMoved=!1;0===this.elementInfo.maxTop&&0===this.elementInfo.maxLeft&&this.lockBounce?this.scrollToTop(0):this.scrollerMoveCSS(this.lastScrollInfo,0);this.scrollerMoveCSS(this.lastScrollInfo,0)}};h.prototype.getCSSMatrix=function(b){if(this.androidFormsMode){var d=parseInt(b.style.marginTop,10);b=parseInt(b.style.marginLeft,10);isNaN(d)&&(d=0);isNaN(b)&&(b=0);return{f:d,e:b}}return a.getCssMatrix(b)};h.prototype.saveEventInfo=
        function(a){this.lastEventInfo={pageX:a.touches[0].pageX,pageY:a.touches[0].pageY,time:a.timeStamp}};h.prototype.saveFirstEventInfo=function(a){this.firstEventInfo={pageX:a.touches[0].pageX,pageY:a.touches[0].pageY,time:a.timeStamp}};h.prototype.setVScrollBar=function(a,b,f){if(!this.elementInfo.requiresVScrollBar)return!1;var e=parseFloat(this.elementInfo.bottomMargin/this.elementInfo.divHeight)*this.elementInfo.bottomMargin+"px";numOnly(e)>this.elementInfo.bottomMargin&&(e=this.elementInfo.bottomMargin+
        "px");e!==this.vscrollBar.style.height&&(this.vscrollBar.style.height=e);a=this.elementInfo.bottomMargin-numOnly(this.vscrollBar.style.height)-(this.elementInfo.maxTop+a.y)/this.elementInfo.maxTop*(this.elementInfo.bottomMargin-numOnly(this.vscrollBar.style.height));a>this.elementInfo.bottomMargin&&(a=this.elementInfo.bottomMargin);0>a&&(a=0);this.scrollbarMoveCSS(this.vscrollBar,{x:0,y:a},b,f);return!0};h.prototype.setHScrollBar=function(a,b,f){if(!this.elementInfo.requiresHScrollBar)return!1;var e=
        parseFloat(this.elementInfo.rightMargin/this.elementInfo.divWidth)*this.elementInfo.rightMargin+"px";e!==this.hscrollBar.style.width&&(this.hscrollBar.style.width=e);a=this.elementInfo.rightMargin-numOnly(this.hscrollBar.style.width)-(this.elementInfo.maxLeft+a.x)/this.elementInfo.maxLeft*(this.elementInfo.rightMargin-numOnly(this.hscrollBar.style.width));a>this.elementInfo.rightMargin&&(a=this.elementInfo.rightMargin);0>a&&(a=0);this.scrollbarMoveCSS(this.hscrollBar,{x:a,y:0},b,f);return!0};h.prototype.onTouchMove=
        function(b){if(null!==this.currentScrollingObject){var d=this.calculateMovement(b);this.calculateTarget(d);this.lastScrollInfo=d;this.moved||(a.trigger(this,"scrollstart",[this.el,{x:this.lastScrollInfo.top,y:this.lastScrollInfo.left}]),a.trigger(a.touchLayer,"scrollstart",[this.el,{x:this.lastScrollInfo.top,y:this.lastScrollInfo.left}]),this.elementInfo.requiresVScrollBar&&(this.vscrollBar.style.display="block"),this.elementInfo.requiresHScrollBar&&(this.hscrollBar.style.display="block"));this.moved=
            !0;this.refresh&&0===d.top?(this.refreshContainer.style.display="block",this.refreshHeight=this.refreshContainer.firstChild.clientHeight,this.refreshContainer.firstChild.style.top=-this.refreshHeight+"px",this.refreshContainer.style.overflow="visible",this.preventPullToRefresh=!1):0>d.top&&(this.preventPullToRefresh=!0,this.refresh&&(this.refreshContainer.style.overflow="hidden"));this.saveEventInfo(b);if(!1===this.isScrolling&&(this.isScrolling=!0,this.onScrollStart))this.onScrollStart();b=this.getCSSMatrix(this.el);
            this.lastScrollInfo.top=numOnly(b.f);this.lastScrollInfo.left=numOnly(b.e);this.recalculateDeltaY(this.lastScrollInfo);this.recalculateDeltaX(this.lastScrollInfo);this.checkYboundary(this.lastScrollInfo);this.elementInfo.hasHorScroll&&this.checkXboundary(this.lastScrollInfo);b=0<this.lastScrollInfo.y&&0<this.lastScrollInfo.deltaY;var f=this.lastScrollInfo.y<-this.elementInfo.maxTop&&0>this.lastScrollInfo.deltaY,e;if(b||f)d=b?this.lastScrollInfo.y:-this.lastScrollInfo.y-this.elementInfo.maxTop,d=(this.container.clientHeight-
                d)/this.container.clientHeight,0.5>d&&(d=0.5),e=0,b&&0<this.lastScrollInfo.top||f&&this.lastScrollInfo.top<-this.elementInfo.maxTop?e=this.lastScrollInfo.top:f&&(e=-this.elementInfo.maxTop),f=this.lastScrollInfo.deltaY*d,1>Math.abs(this.lastScrollInfo.deltaY*d)&&(f=b?1:-1),this.lastScrollInfo.y=e+f;if(this.elementInfo.hasHorScroll&&(b=0<this.lastScrollInfo.x&&0<this.lastScrollInfo.deltaX,f=this.lastScrollInfo.x<-this.elementInfo.maxLeft&&0>this.lastScrollInfo.deltaX,b||f))d=b?this.lastScrollInfo.x:
                -this.lastScrollInfo.x-this.elementInfo.maxLeft,d=(this.container.clientWidth-d)/this.container.clientWidth,0.5>d&&(d=0.5),e=0,b&&0<this.lastScrollInfo.left||f&&this.lastScrollInfo.left<-this.elementInfo.maxLeft?e=this.lastScrollInfo.left:f&&(e=-this.elementInfo.maxLeft),f=this.lastScrollInfo.deltaX*d,1>Math.abs(this.lastScrollInfo.deltaX*d)&&(f=b?1:-1),this.lastScrollInfo.x=e+f;if(this.lockBounce||!this.refresh)0<this.lastScrollInfo.x?this.lastScrollInfo.x=0:-1*this.lastScrollInfo.x>this.elementInfo.maxLeft&&
                (this.lastScrollInfo.x=-1*this.elementInfo.maxLeft),0<this.lastScrollInfo.y?this.lastScrollInfo.y=0:-1*this.lastScrollInfo.y>this.elementInfo.maxTop&&(this.lastScrollInfo.y=-1*this.elementInfo.maxTop);this.scrollerMoveCSS(this.lastScrollInfo,0);this.setVScrollBar(this.lastScrollInfo,0,0);this.setHScrollBar(this.lastScrollInfo,0,0);this.refresh&&!this.preventPullToRefresh&&(!this.refreshTriggered&&this.lastScrollInfo.top>this.refreshHeight?(this.refreshTriggered=!0,this.setRefreshContent("Release to Refresh"),
                a.trigger(this,"refresh-trigger")):this.refreshTriggered&&this.lastScrollInfo.top<this.refreshHeight&&(this.refreshTriggered=!1,this.setRefreshContent("Pull to Refresh"),a.trigger(this,"refresh-cancel")));this.infinite&&!this.infiniteTriggered&&Math.abs(this.lastScrollInfo.top)>this.el.clientHeight-this.container.clientHeight&&(this.infiniteTriggered=!0,a.trigger(this,"infinite-scroll"))}};h.prototype.calculateMovement=function(a,b){var f={top:0,left:0,speedY:0,speedX:0,absSpeedY:0,absSpeedX:0,deltaY:0,
        deltaX:0,absDeltaY:0,absDeltaX:0,y:0,x:0,duration:0},e=b?this.firstEventInfo:this.lastEventInfo,g=b?a.pageX:a.touches[0].pageX,k=b?a.pageY:a.touches[0].pageY,h=b?a.time:a.timeStamp;f.deltaY=this.elementInfo.hasVertScroll?k-e.pageY:0;f.deltaX=this.elementInfo.hasHorScroll?g-e.pageX:0;f.time=h;f.duration=h-e.time;return f};h.prototype.calculateTarget=function(a){a.y=this.lastScrollInfo.y+a.deltaY;a.x=this.lastScrollInfo.x+a.deltaX;0<Math.abs(a.deltaY)&&(a.y+=(0<a.deltaY?1:-1)*this.elementInfo.divHeight*
        this.androidPerfHack);0<Math.abs(a.deltaX)&&(a.x+=(0<a.deltaX?1:-1)*this.elementInfo.divWidth*this.androidPerfHack)};h.prototype.checkYboundary=function(a){var b=this.container.clientHeight/2,f=this.elementInfo.maxTop+b;if(a.y>b)a.y=b;else if(-a.y>f)a.y=-f;else return;this.recalculateDeltaY(a)};h.prototype.checkXboundary=function(a){var b=this.container.clientWidth/2,f=this.elementInfo.maxLeft+b;if(a.x>b)a.x=b;else if(-a.x>f)a.x=-f;else return;this.recalculateDeltaX(a)};h.prototype.recalculateDeltaY=
        function(a){var b=Math.abs(a.deltaY);a.deltaY=a.y-a.top;var f=Math.abs(a.deltaY);a.duration=a.duration*f/b};h.prototype.recalculateDeltaX=function(a){var b=Math.abs(a.deltaX);a.deltaX=a.x-a.left;var f=Math.abs(a.deltaX);a.duration=a.duration*f/b};h.prototype.hideRefresh=function(b){var d=this;if(!this.preventHideRefresh){var f=function(){d.setRefreshContent("Pull to Refresh");a.trigger(d,"refresh-finish")};this.scrollerMoveCSS({x:0,y:0},325);!1===b||!d.afEl.css3Animate?f():d.afEl.css3Animate({time:"325ms",
        complete:f});this.refreshTriggered=!1}};h.prototype.setMomentum=function(a){a.speedY=this.divide(a.deltaY,a.duration);a.speedX=this.divide(a.deltaX,a.duration);a.absSpeedY=Math.abs(a.speedY);a.absSpeedX=Math.abs(a.speedX);a.absDeltaY=Math.abs(a.deltaY);a.absDeltaX=Math.abs(a.deltaX);if(0<a.absDeltaY){if(a.deltaY+=(0>a.deltaY?-1:1)*a.absSpeedY*a.absSpeedY/0.0016,a.absDeltaY=Math.abs(a.deltaY),a.duration=a.absSpeedY/8E-4,a.speedY=a.deltaY/a.duration,a.absSpeedY=Math.abs(a.speedY),0.08>a.absSpeedY||
        5>a.absDeltaY)a.deltaY=a.absDeltaY=a.duration=a.speedY=a.absSpeedY=0}else if(a.absDeltaX){if(a.deltaX+=(0>a.deltaX?-1:1)*a.absSpeedX*a.absSpeedX/0.0016,a.absDeltaX=Math.abs(a.deltaX),a.duration=a.absSpeedX/8E-4,a.speedX=a.deltaX/a.duration,a.absSpeedX=Math.abs(a.speedX),0.08>a.absSpeedX||5>a.absDeltaX)a.deltaX=a.absDeltaX=a.duration=a.speedX=a.absSpeedX=0}else a.duration=0};h.prototype.onTouchEnd=function(){if(null!==this.currentScrollingObject&&this.moved){this.finishScrollingObject=this.currentScrollingObject;
        this.currentScrollingObject=null;var b=this.calculateMovement(this.lastEventInfo,!0);this.androidFormsMode||this.setMomentum(b);this.calculateTarget(b);var d=this.getCSSMatrix(this.el);b.top=numOnly(d.f);b.left=numOnly(d.e);this.checkYboundary(b);this.elementInfo.hasHorScroll&&this.checkXboundary(b);d=!this.preventPullToRefresh&&(b.top>this.refreshHeight||b.y>this.refreshHeight);this.fireRefreshRelease(d,0<b.top);if(this.refresh&&d)b.y=this.refreshHeight,b.duration=325;else if(0<=b.y)b.y=0,0<=b.top&&
            (b.duration=325);else if(-b.y>this.elementInfo.maxTop||0===this.elementInfo.maxTop)b.y=-this.elementInfo.maxTop,-b.top>this.elementInfo.maxTop&&(b.duration=325);if(this.elementInfo.hasHorScroll)if(0<=b.x)b.x=0,0<=b.left&&this.refresh&&(b.duration=325);else if(-b.x>this.elementInfo.maxLeft||0===this.elementInfo.maxLeft)b.x=-this.elementInfo.maxLeft,-b.left>this.elementInfo.maxLeft&&this.refresh&&(b.duration=325);if(b.x===b.left&&b.y===b.top||this.androidFormsMode)b.duration=0;this.scrollerMoveCSS(b,
            b.duration,"cubic-bezier(0.33,0.66,0.66,1)");this.setVScrollBar(b,b.duration,"cubic-bezier(0.33,0.66,0.66,1)");this.setHScrollBar(b,b.duration,"cubic-bezier(0.33,0.66,0.66,1)");this.setFinishCalback(b.duration);if(this.infinite&&!this.infiniteTriggered&&Math.abs(b.y)>=this.el.clientHeight-this.container.clientHeight){var f=this;setTimeout(function(){f.infiniteTriggered=!0;a.trigger(f,"infinite-scroll")},b.duration-50)}}};h.prototype.setFinishCalback=function(b){var d=this;this.scrollingFinishCB=setTimeout(function(){d.hideScrollbars();
        a.trigger(a.touchLayer,"scrollend",[d.el]);a.trigger(d,"scrollend",[d.el]);d.isScrolling=!1;d.elementInfo=null;d.infinite&&d.infiniteTriggered&&a.trigger(d,"infinite-scroll-end")},b)};h.prototype.startFormsMode=function(){if(!this.blockFormsFix){var b=this.getCSSMatrix(this.el);this.refreshSafeKeep=this.refresh;this.refresh=!1;this.androidFormsMode=!0;this.el.style[a.feat.cssPrefix+"Transform"]="none";this.el.style[a.feat.cssPrefix+"Transition"]="none";this.el.style[a.feat.cssPrefix+"Perspective"]=
        "none";this.scrollerMoveCSS({x:numOnly(b.e),y:numOnly(b.f)},0);this.container.style[a.feat.cssPrefix+"Perspective"]="none";this.container.style[a.feat.cssPrefix+"BackfaceVisibility"]="visible";this.vscrollBar&&(this.vscrollBar.style[a.feat.cssPrefix+"Transform"]="none",this.vscrollBar.style[a.feat.cssPrefix+"Transition"]="none",this.vscrollBar.style[a.feat.cssPrefix+"Perspective"]="none",this.vscrollBar.style[a.feat.cssPrefix+"BackfaceVisibility"]="visible");this.hscrollBar&&(this.hscrollBar.style[a.feat.cssPrefix+
        "Transform"]="none",this.hscrollBar.style[a.feat.cssPrefix+"Transition"]="none",this.hscrollBar.style[a.feat.cssPrefix+"Perspective"]="none",this.hscrollBar.style[a.feat.cssPrefix+"BackfaceVisibility"]="visible")}};h.prototype.stopFormsMode=function(){if(!this.blockFormsFix){var b=this.getCSSMatrix(this.el);this.refresh=this.refreshSafeKeep;this.androidFormsMode=!1;this.el.style[a.feat.cssPrefix+"Perspective"]=1E3;this.el.style.marginTop=0;this.el.style.marginLeft=0;this.el.style[a.feat.cssPrefix+
        "Transition"]="0ms linear";this.scrollerMoveCSS({x:numOnly(b.e),y:numOnly(b.f)},0);this.container.style[a.feat.cssPrefix+"Perspective"]=1E3;this.container.style[a.feat.cssPrefix+"BackfaceVisibility"]="hidden";this.vscrollBar&&(this.vscrollBar.style[a.feat.cssPrefix+"Perspective"]=1E3,this.vscrollBar.style[a.feat.cssPrefix+"BackfaceVisibility"]="hidden");this.hscrollBar&&(this.hscrollBar.style[a.feat.cssPrefix+"Perspective"]=1E3,this.hscrollBar.style[a.feat.cssPrefix+"BackfaceVisibility"]="hidden")}};
    h.prototype.scrollerMoveCSS=function(b,d,f){d||(d=0);f||(f="linear");d=numOnly(d);var e=this;this.el&&this.el.style&&(this.eventsActive&&(this.androidFormsMode?(this.el.style.marginTop=Math.round(b.y)+"px",this.el.style.marginLeft=Math.round(b.x)+"px"):(d={x:b.x,y:b.y,duration:d,easing:"easeOutSine"},e.initScrollProgress&&(d.update=function(b){a.trigger(e,"scroll",[b]);a.trigger(a.touchLayer,"scroll",[b])}),a(this.el).animateCss(d).start())),this.logPos(b.x,b.y))};h.prototype.logPos=function(a,b){var f;
        f=this.elementInfo?{h:this.elementInfo.bottomMargin,w:this.elementInfo.rightMargin}:this.getViewportSize();this.loggedPcentX=this.divide(a,this.el.clientWidth-f.w);this.loggedPcentY=this.divide(b,this.el.clientHeight-f.h);this.scrollTop=b;this.scrollLeft=a};h.prototype.scrollbarMoveCSS=function(b,d,f,e){f||(f=0);b&&b.style&&(this.androidFormsMode?(b.style.marginTop=Math.round(d.y)+"px",b.style.marginLeft=Math.round(d.x)+"px"):a(b).animateCss({x:d.x,y:d.y,duration:f,easing:"easeOutSine"}).start())};
    h.prototype.scrollTo=function(a,b){b||(b=0);this.scrollerMoveCSS(a,b)};h.prototype.scrollBy=function(a,b){var f=this.getCSSMatrix(this.el),e=numOnly(f.f),f=numOnly(f.e);this.scrollTo({y:e-a.y,x:f-a.x},b)};h.prototype.scrollToBottom=function(a){this.scrollTo({y:-1*(this.el.clientHeight-this.container.clientHeight),x:0},a)};h.prototype.scrollToTop=function(a){this.scrollTo({x:0,y:0},a)};return function(c,d){var f;if(!l&&a.touchLayer&&a.isObject(a.touchLayer))p();else if(!a.touchLayer||!a.isObject(a.touchLayer))a.touchLayer=
    {};if(f="string"===typeof c||c instanceof String?document.getElementById(c):c){var g=a(f);d.hasParent&&(g=g.parent());g.hasClass("x-scroll")&&(d.horizontalScroll=!0);g.hasClass("y-scroll")&&(d.verticalScroll=!0);return a.os.desktop?new e(f,d):d.useJsScroll?new h(f,d):new b(f,d)}window.alert("Could not find element for scroller "+c)}}()})(af);
(function(a){function p(g,k,h){!0===h&&(this.getAttribute("multiple")||a.selectBox.updateMaskValue(this.parentNode.id,this.text,this.value),this.parentNode.value=this.value);return h}function m(g,k,h){this.options[h]&&(this.getAttribute("multiple")||a.selectBox.updateMaskValue(this.linker,this.options[h].value,this.options[h].text),this.value=this.options[h].value);return h}function l(g){var k=g.target;a(k.linker).remove();delete k.linker;g.stopPropagation()}a.selectBox={scroller:null,currLinker:null,
    getOldSelects:function(g){if(a.os.android&&!a.os.androidICS)if(a.fn.scroller){var k=g&&document.getElementById(g)?document.getElementById(g):document;if(k){g=k.getElementsByTagName("select");for(k=0;k<g.length;k++){var h=g[k];h.style.display="none";var b=a.create("div",{className:"afFakeSelect"});b.get(0).linker=g[k];h.linker=b.get(0);b.insertAfter(g[k]);h.watch("selectedIndex",m);for(var e=0;e<h.options.length;e++)h.options[e].watch("selected",p),h.options[e].selected&&b.html(h.options[e].text);
        a(h).one("destroy",l)}this.createHtml()}else window.alert("Could not find container element for af.selectBox "+g)}else window.alert("This library requires af.scroller")},updateDropdown:function(a){if(a)for(var k=0;k<a.options.length;k++)a.options[k].selected&&(a.linker.innerHTML=a.options[k].text)},initDropDown:function(g){if(!g.disabled&&g&&g.options&&0!==g.options.length){var k=0,h=a("#afSelectBoxfix");h.html("<ul></ul>");for(var h=h.find("ul"),b=0;b<g.options.length;b++){g.options[b].watch("selected",
        p);var e=g.options[b].selected?"selected":"";e&&(k=b+1);e=a.create("li",{html:g.options[b].text,className:e});e.data("ind",b);h.append(e)}a("#afModalMask").show();try{if(0<k&&"multiple"!==g.getAttribute("multiple")){g=0;var c=numOnly(h.find("li").computedStyle("height")),d=numOnly(a("#afSelectBoxContainer").computedStyle("height"));k*c>=d&&(g=(k-1)*-c);this.scroller.scrollTo({x:0,y:g})}}catch(f){console.log("error init dropdown"+f)}k="block"===a("#afSelectClose").css("display")?numOnly(a("#afSelectClose").height()):
        0;a("#afSelectWrapper").height(numOnly(a("#afSelectBoxContainer").height())-k+"px")}},updateMaskValue:function(g,k,h){a(g).html(h)},setDropDownValue:function(g,k){if(g){var h=a(g);k=parseInt(k,10);g.getAttribute("multiple")?(h=a("#afSelectBoxfix li:nth-child("+(k+1)+")"),h.hasClass("selected")?h.removeClass("selected"):h.addClass("selected")):(g.selectedIndex=k,h.find("option").prop("selected",!1),h.find("option:nth-child("+(k+1)+")").prop("selected",!0),this.scroller.scrollTo({x:0,y:0}),this.hideDropDown());
        a(g).trigger("change")}},hideDropDown:function(){a("#afModalMask").hide();a("#afSelectBoxfix").html("")},createHtml:function(){var g=this;document.getElementById("afSelectBoxfix")||a(document).ready(function(){a(document).on("click",".afFakeSelect",function(){this.linker.disabled||(g.currLinker=this,"multiple"===this.linker.getAttribute("multiple")?a("#afSelectClose").show():a("#afSelectClose").hide(),g.initDropDown(this.linker))});var k=a.create("div",{id:"afSelectBoxContainer"}),h=a.create("div",
        {id:"afSelectBoxfix"}),b=a.create("div",{id:"afSelectWrapper"});b.css("position","relative");b.append(h);var h=a.create("div",{id:"afSelectClose",html:"<a id='afSelectDone'>Done</a> <a id='afSelectCancel'>Cancel</a>"}),e=a.create("div",{id:"afModalMask"}),c=a("#afui");k.prepend(h).append(b);e.append(k);0<c.length?c.append(e):document.body.appendChild(e.get(0));g.scroller=a.query("#afSelectBoxfix").scroller({scroller:!1,verticalScroll:!0,vScrollCSS:"afselectscrollBarV",hasParent:!0});a("#afModalMask").on("click",
        function(b){0===a(b.target).closest("#afSelectBoxContainer").length&&g.hideDropDown()});a("#afSelectBoxfix").on("click","li",function(b){b=a(b.target);g.setDropDownValue(g.currLinker.linker,b.data("ind"))});a("#afSelectBoxContainer").on("click","a",function(b){if("afSelectCancel"===b.target.id)return g.hideDropDown();var c=a(g.currLinker.linker);c.find("option").prop("selected",!1);a("#afSelectBoxfix li").each(function(){var b=a(this);if(b.hasClass("selected")){var d=parseInt(b.data("ind"),10);c.find("option:nth-child("+
        (d+1)+")").prop("selected",!0);g.currLinker.innerHTML=b.html()}});g.hideDropDown();b.stopPropagation();b.preventDefault();return!1})})}};HTMLElement.prototype.watch||(HTMLElement.prototype.watch=function(a,k){var h=this[a],b=h,e=function(){return b},c=function(c){h=b;return b=k.call(this,a,h,c)};delete this[a]&&(HTMLElement.defineProperty?HTMLElement.defineProperty(this,a,{get:e,set:c,enumerable:!1,configurable:!0}):HTMLElement.prototype.__defineGetter__&&HTMLElement.prototype.__defineSetter__&&(HTMLElement.prototype.__defineGetter__.call(this,
    a,e),HTMLElement.prototype.__defineSetter__.call(this,a,c)))});HTMLElement.prototype.unwatch||(HTMLElement.prototype.unwatch=function(a){var k=this[a];delete this[a];this[a]=k})})(af);
(function(a){function p(a,e,c,d){var f=Math.abs(a-e),g=Math.abs(c-d);return f>=g?0<a-e?"Left":"Right":0<c-d?"Up":"Down"}function m(){l.last&&Date.now()-l.last>=k&&(l.el.trigger("longTap"),l={})}var l={},g,k=750,h;a(document).ready(function(){var b;a(document.body).bind("touchstart",function(e){e.originalEvent&&(e=e.originalEvent);if(e.touches&&0!==e.touches.length){var c=Date.now(),d=c-(l.last||c);e.touches&&0!==e.touches.length&&(l.el=a("tagName"in e.touches[0].target?e.touches[0].target:e.touches[0].target.parentNode),
    g&&clearTimeout(g),l.x1=e.touches[0].pageX,l.y1=e.touches[0].pageY,l.x2=l.y2=0,0<d&&250>=d&&(l.isDoubleTap=!0),l.last=c,h=setTimeout(m,k),a.ui.useAutoPressed&&!l.el.data("ignore-pressed")&&l.el.addClass("pressed"),b&&(a.ui.useAutoPressed&&!b.data("ignore-pressed")&&b[0]!==l.el[0])&&b.removeClass("pressed"),b=l.el)}}).bind("touchmove",function(a){a.originalEvent&&(a=a.originalEvent);l.x2=a.touches[0].pageX;l.y2=a.touches[0].pageY;clearTimeout(h)}).bind("touchend",function(b){b.originalEvent&&(b=b.originalEvent);
    l.el&&(a.ui.useAutoPressed&&!l.el.data("ignore-pressed")&&l.el.removeClass("pressed"),l.isDoubleTap?(l.el.trigger("doubleTap"),l={}):0<l.x2||0<l.y2?((30<Math.abs(l.x1-l.x2)||30<Math.abs(l.y1-l.y2))&&l.el.trigger("swipe")&&l.el.trigger("swipe"+p(l.x1,l.x2,l.y1,l.y2)),l.x1=l.x2=l.y1=l.y2=l.last=0):"last"in l&&(l.el.trigger("tap"),g=setTimeout(function(){g=null;l.el&&l.el.trigger("singleTap");l={}},250)))}).bind("touchcancel",function(){l.el&&(a.ui.useAutoPressed&&!l.el.data("ignore-pressed"))&&l.el.removeClass("pressed");
    l={};clearTimeout(h)})});"swipe swipeLeft swipeRight swipeUp swipeDown doubleTap tap singleTap longTap".split(" ").forEach(function(b){a.fn[b]=function(a){return this.bind(b,a)}})})(af);
(function(a){a.touchLayer=function(b){a.touchLayer=new c(b);return a.touchLayer};var p=["input","select","textarea"],m=["button","radio","checkbox","range","date"],l=a.os.ios,g=a.os.blackberry,k=a.os.blackberry||a.os.fennec||a.os.android&&!a.os.chrome,h=a.os.ios&&!a.os.ios7,b=!1,e=!1,c=function(b){this.clearTouchVars();b.addEventListener("touchstart",this,!1);b.addEventListener("touchmove",this,!1);b.addEventListener("touchend",this,!1);b.addEventListener("click",this,!1);b.addEventListener("focusin",
    this,!1);document.addEventListener("scroll",this,!1);window.addEventListener("resize",this,!1);window.addEventListener("orientationchange",this,!1);this.layer=b;this.scrollEndedProxy_=a.proxy(this.scrollEnded,this);this.exitEditProxy_=a.proxy(this.exitExit,this,[]);this.launchFixUIProxy_=a.proxy(this.launchFixUI,this);var c=this;this.scrollTimeoutExpireProxy_=function(){c.scrollTimeout_=null;c.scrollTimeoutEl_.addEventListener("scroll",c.scrollEndedProxy_,!1)};this.retestAndFixUIProxy_=function(){a.os.android&&
!a.os.chrome&&(c.layer.style.height="100%");a.asap(c.testAndFixUI,c,arguments)};document.addEventListener("click",function(a){if(e)return a.preventDefault(),a.stopPropagation(),!1;void 0!==a.clientX&&null!==c.lastTouchStartX&&(2>Math.abs(c.lastTouchStartX-a.clientX)&&2>Math.abs(c.lastTouchStartY-a.clientY))&&(a.preventDefault(),a.stopPropagation())},!0);a.bind(this,"scrollstart",function(b){c.isScrolling=!0;c.scrollingEl_=b;a.feat.nativeTouchScroll||(c.scrollerIsScrolling=!0);c.fireEvent("UIEvents",
    "scrollstart",b,!1,!1)});a.bind(this,"scrollend",function(b){c.isScrolling=!1;a.feat.nativeTouchScroll||(c.scrollerIsScrolling=!1);c.fireEvent("UIEvents","scrollend",b,!1,!1)});this.hideAddressBar(0,1);this.launchFixUI(5)};c.prototype={dX:0,dY:0,cX:0,cY:0,touchStartX:null,touchStartY:null,layer:null,scrollingEl_:null,scrollTimeoutEl_:null,scrollTimeout_:null,reshapeTimeout_:null,scrollEndedProxy_:null,exitEditProxy_:null,launchFixUIProxy_:null,reHideAddressBarTimeout_:null,retestAndFixUIProxy_:null,
    panElementId:"header",blockClicks:!1,allowDocumentScroll_:!1,ignoreNextResize_:!1,blockPossibleClick_:!1,isScrolling:!1,isScrollingVertical_:!1,wasPanning_:!1,isPanning_:!1,isFocused_:!1,justBlurred_:!1,requiresNativeTap:!1,holdingReshapeType_:null,trackingClick:!1,scrollerIsScrolling:!1,handleEvent:function(a){switch(a.type){case "touchstart":this.onTouchStart(a);break;case "touchmove":this.onTouchMove(a);break;case "touchend":this.onTouchEnd(a);break;case "click":this.onClick(a);break;case "blur":this.onBlur(a);
        break;case "scroll":this.onScroll(a);break;case "orientationchange":this.onOrientationChange(a);break;case "resize":this.onResize(a);break;case "focusin":this.onFocusIn(a)}},launchFixUI:function(a){a||(a=2);if(null===this.reHideAddressBarTimeout_)return this.testAndFixUI(0,a)},resetFixUI:function(){this.reHideAddressBarTimeout_&&clearTimeout(this.reHideAddressBarTimeout_);this.reHideAddressBarTimeout_=null},testAndFixUI:function(b,c){var e=this.getReferenceHeight(),g=this.getCurrentHeight();if(e!==
        g&&!(0.97*g<e&&0.97*e<g))return this.hideAddressBar(b,c),!0;a.os.android&&this.resetFixUI();return!1},hideAddressBar:function(b,c){if(!a.ui||!a.ui.isIntel)if(b>=c)this.resetFixUI();else if(a.os.desktop||a.os.kindle)this.layer.style.height="100%";else if(a.os.android){window.scrollTo(1,1);this.layer.style.height=this.isFocused_||window.innerHeight>=window.outerHeight?window.innerHeight+"px":window.outerHeight+"px";var e=b+1;this.reHideAddressBarTimeout_=setTimeout(this.retestAndFixUIProxy_,250*e,e,
        c)}else this.isFocused_||(document.documentElement.style.height="5000px",window.scrollTo(0,0),document.documentElement.style.height=window.innerHeight+"px",this.layer.style.height=window.innerHeight+"px")},getReferenceHeight:function(){return window.innerHeight},getCurrentHeight:function(){return a.os.android?window.innerHeight:numOnly(document.documentElement.style.height)},onOrientationChange:function(){var b=this,c=!1;this.focusedElement&&(c=!0,this.focusedElement.blur());!this.holdingReshapeType_&&
    this.reshapeTimeout_?this.fireReshapeEvent("orientationchange"):this.previewReshapeEvent("orientationchange");a.os.android&&a.os.chrome&&(this.layer.style.height="100%",setTimeout(function(){b.hideAddressBar(0,1)},c?600:0))},onResize:function(){this.ignoreNextResize_?this.ignoreNextResize_=!1:this.launchFixUI()&&this.reshapeAction()},onClick:function(b){var c=b.target&&void 0!==b.target.tagName?b.target.tagName.toLowerCase():"";if(-1!==p.indexOf(c)&&(!this.isFocused_||b.target!==this.focusedElement)){c=
            b.target&&void 0!==b.target.type?b.target.type.toLowerCase():"";if(-1===m.indexOf(c)){this.isFocused_&&this.focusedElement.removeEventListener("blur",this,!1);this.focusedElement=b.target;this.focusedElement.addEventListener("blur",this,!1);if(!this.isFocused_&&!this.justBlurred_)if(a.trigger(this,"enter-edit",[b.target]),a.os.ios){var e=this;setTimeout(function(){e.fireReshapeEvent("enter-edit")},300)}else this.previewReshapeEvent("enter-edit");this.isFocused_=!0}else this.isFocused_=!1;this.justBlurred_=
        !1;this.allowDocumentScroll_=!0;l&&b.target.focus()}else a.os.blackberry10&&this.isFocused_&&this.focusedElement.blur()},previewReshapeEvent:function(a){var b=this;this.reshapeTimeout_=setTimeout(function(){b.fireReshapeEvent(a);b.reshapeTimeout_=null;b.holdingReshapeType_=null},750);this.holdingReshapeType_=a},fireReshapeEvent:function(b){a.trigger(this,"reshape");a.trigger(this,b?b+"-reshape":"unknown-reshape")},reshapeAction:function(){this.reshapeTimeout_?(clearTimeout(this.reshapeTimeout_),this.fireReshapeEvent(this.holdingReshapeType_),
        this.reshapeTimeout_=this.holdingReshapeType_=null):this.previewReshapeEvent()},onFocusIn:function(a){if(!this.isFocused_)this.onClick(a)},onBlur:function(b){a.os.android&&b.target===window||(this.isFocused_=!1,this.focusedElement&&this.focusedElement.removeEventListener("blur",this,!1),this.focusedElement=null,this.justBlurred_=!0,a.asap(this.exitEditProxy_,this,[b.target]))},exitExit:function(b){this.justBlurred_=!1;if(!this.isFocused_)if(a.trigger(this,"exit-edit",[b]),this.allowDocumentScroll_=
        !1,a.os.ios){var c=this;setTimeout(function(){c.fireReshapeEvent("exit-edit")},300)}else this.previewReshapeEvent("exit-edit")},onScroll:function(a){!this.allowDocumentScroll_&&(!this.isPanning_&&a.target===document)&&(this.allowDocumentScroll_=!0,this.wasPanning_?(this.wasPanning_=!1,setTimeout(this.launchFixUIProxy_,2E3,[2])):this.launchFixUI())},onTouchStart:function(c){this.dX=c.touches[0].pageX;this.dY=c.touches[0].pageY;this.lastTimestamp=c.timeStamp;this.lastTouchStartX=this.lastTouchStartY=
        null;if(a.os.ios){if(b===c.touches[0].identifier)return e=!0,c.preventDefault(),b=!1;b=c.touches[0].identifier;e=!1}if(this.scrollerIsScrolling)return this.moved=!0,this.scrollerIsScrolling=!1,c.preventDefault(),!1;this.trackingClick=!0;(h||a.feat.nativeTouchScroll)&&this.checkDOMTree(c.target,this.layer);this.isScrolling&&(null!==this.scrollTimeout_?(clearTimeout(this.scrollTimeout_),this.scrollTimeout_=null,this.scrollTimeoutEl_!==this.scrollingEl_?this.scrollEnded(!1):this.blockPossibleClick_=
        !0):this.scrollTimeoutEl_&&(this.scrollEnded(!0),this.blockPossibleClick_=!0));if(a.os.android&&c&&c.target&&c.target.getAttribute&&"ignore"===c.target.getAttribute("data-touchlayer")||this.isFocused_&&!a.os.blackberry10)this.allowDocumentScroll_=this.requiresNativeTap=!0;else if(k&&c.target&&void 0!==c.target.tagName){var f=c.target.tagName.toLowerCase();-1!==p.indexOf(f)&&(this.requiresNativeTap=!0)}else c.target&&(void 0!==c.target.tagName&&"input"===c.target.tagName.toLowerCase()&&"range"===c.target.type)&&
    (this.requiresNativeTap=!0);!a.os.chrome&&!a.os.fennec&&(!this.isPanning_&&!this.requiresNativeTap?(this.isScrolling&&!a.feat.nativeTouchScroll||!this.isScrolling)&&c.preventDefault():this.isScrollingVertical_&&this.demandVerticalScroll())},demandVerticalScroll:function(){0>=this.scrollingEl_.scrollTop?this.scrollingEl_.scrollTop=1:this.scrollingEl_.scrollTop+this.scrollingEl_.clientHeight>=this.scrollingEl_.scrollHeight&&(this.scrollingEl_.scrollTop=this.scrollingEl_.scrollHeight-this.scrollingEl_.clientHeight-
        1)},ignoreScrolling:function(a){return void 0===a.scrollWidth||void 0===a.clientWidth||void 0===a.scrollHeight||void 0===a.clientHeight?!0:!1},allowsVerticalScroll:function(a,b){var c=b.overflowY;return"scroll"===c||"auto"===c&&a.scrollHeight>a.clientHeight?!0:!1},allowsHorizontalScroll:function(a,b){var c=b.overflowX;return"scroll"===c||"auto"===c&&a.scrollWidth>a.clientWidth?!0:!1},checkDOMTree:function(b,c){if(h&&this.panElementId===b.id)this.isPanning_=!0;else{if(a.feat.nativeTouchScroll){if(this.ignoreScrolling(b))return;
        var e=window.getComputedStyle(b);if(this.allowsVerticalScroll(b,e)){this.isScrollingVertical_=!0;this.scrollingEl_=b;this.isScrolling=!0;return}this.allowsHorizontalScroll(b,e)&&(this.isScrollingVertical_=!1,this.scrollingEl_=null,this.isScrolling=!0)}b!==c&&b.parentNode&&this.checkDOMTree(b.parentNode,c)}},scrollEnded:function(a){null!==this.scrollTimeoutEl_&&(a&&this.scrollTimeoutEl_.removeEventListener("scroll",this.scrollEndedProxy_,!1),this.fireEvent("UIEvents","scrollend",this.scrollTimeoutEl_,
        !1,!1),this.scrollTimeoutEl_=null)},onTouchMove:function(b){var c=this.moved;this.moved=!0;g&&(this.cY=b.touches[0].pageY-this.dY,this.cX=b.touches[0].pageX-this.dX);this.isPanning_||(this.isScrolling&&(c||this.fireEvent("UIEvents","scrollstart",this.scrollingEl_,!1,!1),this.speedY=(this.lastY-b.touches[0].pageY)/(b.timeStamp-this.lastTimestamp),this.lastY=b.touches[0].pageY,this.lastX=b.touches[0].pageX,this.lastTimestamp=b.timeStamp),a.os.blackberry10||(!this.isScrolling||!a.feat.nativeTouchScroll)&&
        b.preventDefault())},onTouchEnd:function(b){var c=this.moved;g&&(c=c&&!(10>Math.abs(this.cX)&&10>Math.abs(this.cY)));if(!a.os.ios||!this.requiresNativeTap)this.allowDocumentScroll_=!1;if(this.isPanning_&&c)this.wasPanning_=!0;else if(!c&&!this.requiresNativeTap){this.scrollerIsScrolling=!1;if(!this.trackingClick)return;b.preventDefault();if(!this.blockClicks&&!this.blockPossibleClick_){var c=b.target,e=b.changedTouches?b.changedTouches[0]:b.touches[0];3===c.nodeType&&(c=c.parentNode);this.fireEvent("Event",
        "click",c,!0,b.mouseToTouch,e[0]);this.lastTouchStartX=this.dX;this.lastTouchStartY=this.dY}}else c&&(this.isScrolling&&(this.scrollTimeoutEl_=this.scrollingEl_,0.01>Math.abs(this.speedY)?this.scrollEnded(!1):this.scrollTimeout_=setTimeout(this.scrollTimeoutExpireProxy_,30)),this.requiresNativeTap&&(this.isFocused_||a.trigger(this,"cancel-enter-edit",[b.target])));a.os.blackberry10&&(this.lastTouchStartX=this.dX,this.lastTouchStartY=this.dY);this.clearTouchVars()},clearTouchVars:function(){this.speedY=
        this.lastY=this.cY=this.cX=this.dX=this.dY=0;this.trackingClick=this.blockPossibleClick_=this.requiresNativeTap=this.isScrollingVertical_=this.isScrolling=this.isPanning_=this.moved=!1},fireEvent:function(b,c,e,g,k,h){var l=document.createEvent(b);l.initEvent(c,g,!0);h&&a.each(h,function(a,b){l.key=b});k&&(l.mouseToTouch=!0);e.dispatchEvent(l)}}})(af);
(function(a){a.fn.popup=function(a){return new m(this[0],a)};var p=[],m=function(){var g=function(g,h){if(this.container="string"===typeof g||g instanceof String?document.getElementById(g):g)try{if("string"===typeof h||"number"===typeof h)h={message:h,cancelOnly:"true",cancelText:"OK"};this.id=h.id=h.id||a.uuid();this.addCssClass=h.addCssClass?h.addCssClass:"";this.suppressTitle=h.suppressTitle||this.suppressTitle;this.title=h.suppressTitle?"":h.title||"Alert";this.message=h.message||"";this.cancelText=
    h.cancelText||"Cancel";this.cancelCallback=h.cancelCallback||function(){};this.cancelClass=h.cancelClass||"button";this.doneText=h.doneText||"Done";this.doneCallback=h.doneCallback||function(){};this.doneClass=h.doneClass||"button";this.cancelOnly=h.cancelOnly||!1;this.onShow=h.onShow||function(){};this.autoCloseDone=void 0!==h.autoCloseDone?h.autoCloseDone:!0;p.push(this);1===p.length&&this.show()}catch(b){console.log("error adding popup "+b)}else window.alert("Error finding container for popup "+
    g)};g.prototype={id:null,addCssClass:null,title:null,message:null,cancelText:null,cancelCallback:null,cancelClass:null,doneText:null,doneCallback:null,doneClass:null,cancelOnly:!1,onShow:null,autoCloseDone:!0,suppressTitle:!1,show:function(){var g=this,h="<div id='"+this.id+"' class='afPopup hidden "+this.addCssClass+"'><header>"+this.title+"</header><div>"+this.message+"</div><footer><a href='javascript:;' class='"+this.cancelClass+"' id='cancel'>"+this.cancelText+"</a><a href='javascript:;' class='"+
    this.doneClass+"' id='action'>"+this.doneText+"</a><div style='clear:both'></div></footer></div>";a(this.container).append(a(h));var b=a.query("#"+this.id);b.bind("close",function(){g.hide()});this.cancelOnly&&(b.find("A#action").hide(),b.find("A#cancel").addClass("center"));b.find("A").each(function(){var b=a(this);b.bind("click",function(a){"cancel"===b.attr("id")?(g.cancelCallback.call(g.cancelCallback,g),g.hide()):(g.doneCallback.call(g.doneCallback,g),g.autoCloseDone&&g.hide());a.preventDefault()})});
    g.positionPopup();a.blockUI(0.5);b.bind("orientationchange",function(){g.positionPopup()});b.find("header").show();b.find("footer").show();setTimeout(function(){b.removeClass("hidden");g.onShow(g)},50)},hide:function(){var g=this;a.query("#"+g.id).addClass("hidden");a.unblockUI();!a.os.ie&&!a.os.android?setTimeout(function(){g.remove()},250):g.remove()},remove:function(){var g=a.query("#"+this.id);g.unbind("close");g.find("BUTTON#action").unbind("click");g.find("BUTTON#cancel").unbind("click");g.unbind("orientationchange").remove();
    p.splice(0,1);0<p.length&&p[0].show()},positionPopup:function(){var g=a.query("#"+this.id);g.css("top",window.innerHeight/2.5+window.pageYOffset-g[0].clientHeight/2+"px");g.css("left",window.innerWidth/2-g[0].clientWidth/2+"px")}};return g}(),l=!1;a.blockUI=function(g){l||(g=g?" style='opacity:"+g+";'":"",a.query("BODY").prepend(a("<div id='mask'"+g+"></div>")),a.query("BODY DIV#mask").bind("touchstart",function(a){a.preventDefault()}),a.query("BODY DIV#mask").bind("touchmove",function(a){a.preventDefault()}),
    l=!0)};a.unblockUI=function(){l=!1;a.query("BODY DIV#mask").unbind("touchstart");a.query("BODY DIV#mask").unbind("touchmove");a("BODY DIV#mask").remove()}})(af);
(function(a){var p=window.location.pathname+window.location.search,m=window.location.hash,l=m,g=function(){function b(){e.useOSThemes&&(a("#afui").removeClass("ios ios7 win8 tizen bb android light dark"),a.os.android?a("#afui").addClass("android"):a.os.ie?a("#afui").addClass("win8"):a.os.blackberry||a.os.blackberry10||a.os.playbook?(a("#afui").addClass("bb"),e.backButtonText="Back"):a.os.ios7?a("#afui").addClass("ios7"):a.os.ios?a("#afui").addClass("ios"):a.os.tizen&&a("#afui").addClass("tizen"));
    if(a.os.ios){a("head").find("#iosBlurrHack").remove();var b;b="-webkit-backface-visibility: hidden;-webkit-perspective:1000;";a("head").append("<style id='iosBlurrHack'>#afui .y-scroll > *, #afui .x-scroll > * {"+b+"}</style>")}else a.os.android&&!a.os.androidICS?e.transitionTime="150ms":a.os.fennec&&e.ready(function(){window.addEventListener("deviceorientation",function(){var b=numOnly(a("#header").height())+numOnly(a("#navbar").height());a("#content").css("height",window.innerHeight-b)})})}var e=
    this;this.availableTransitions={};this.availableTransitions["default"]=this.availableTransitions.none=this.noTransition;if("function"===typeof define&&define.amd||"undefined"!==typeof module&&module.exports)e.autoLaunch=!1;1===a("#afui").length&&b();var c=function(){var c=document.getElementById("afui");if(null===c){c=document.createElement("div");c.id="afui";for(var f=document.body;f&&f.firstChild;)c.appendChild(f.firstChild);a(document.body).prepend(c)}e.isIntel="intel"in window&&window.intel&&
    window.intel.xdk&&"app"in window.intel.xdk;a.os.supportsTouch&&a.touchLayer(c);b()};if("complete"===document.readyState||"loaded"===document.readyState)if(c(),e.init)e.autoBoot();else a(window).one("afui:init",function(){e.autoBoot()});else a(document).ready(function(){c();if(e.init)e.autoBoot();else a(window).one("afui:init",function(){e.autoBoot()})},!1);"intel"in window||(window.intel={xdk:{}},window.intel.xdk.webRoot="");window.addEventListener("popstate",function(){if(e.useInternalRouting){var a=
    e.getPanelId(document.location.hash);"#"!==document.location.href.replace(document.location.origin+"/","")&&(""===a&&1===e.history.length&&(a="#"+e.firstDiv.id),""!==a&&0!==af(a).filter(".panel").length&&a!=="#"+e.activeDiv.id&&e.goBack())}},!1)};g.prototype={init:!1,transitionTime:"230ms",showLoading:!0,loadingText:"Loading Content",loadContentQueue:[],isIntel:!1,titlebar:"",navbar:"",header:"",viewportContainer:"",remotePages:{},history:[],homeDiv:"",screenWidth:"",content:"",modalWindow:"",customFooter:!1,
    defaultFooter:"",defaultHeader:null,customMenu:!1,customAside:!1,defaultAside:"",defaultMenu:"",_readyFunc:null,doingTransition:!1,passwordBox:a.passwordBox?new a.passwordBox:!1,selectBox:a.selectBox?a.selectBox:!1,ajaxUrl:"",transitionType:"slide",scrollingDivs:{},firstDiv:"",hasLaunched:!1,isLaunching:!1,launchCompleted:!1,activeDiv:"",customClickHandler:"",menuAnimation:null,togglingSideMenu:!1,sideMenuWidth:"200px",handheldMinWidth:"768",trimBackButtonText:!0,useOSThemes:!0,lockPageBounce:!1,
    animateHeaders:!0,useAutoPressed:!0,horizontalScroll:!1,_currentHeaderID:"defaultHeader",useInternalRouting:!0,autoBoot:function(){this.hasLaunched=!0;var a=this;if(this.autoLaunch)if(this.isIntel){var e=function(){a.launch();document.removeEventListener(e)};document.addEventListener("intel.xdk.device.ready",e)}else this.launch()},css3animate:function(b,e){b=a(b);return b.css3Animate(e)},dispatchPanelEvent:function(a,e){if("string"===typeof a&&window[a])return window[a](e);if(-1!==a.indexOf(".")){var c=
        window,d=a.split("."),f=d.length,g=0;for(g;g<f-1;g++)if(c=c[d[g]],void 0===c)return;return c[d[g]](e)}},enableTabBar:function(){a(document).on("click",".button-grouped.tabbed",function(b){var e=a(b.target);e.closest(".tabbed").find(".button").data("ignore-pressed","true").removeClass("pressed");e.closest(".button").addClass("pressed");setTimeout(function(){e.closest(".button").addClass("pressed")})})},disableTabBar:function(){a(document).off("click",".button-grouped.tabbed");a(".button-grouped.tabbed .button").removeAttr("data-ignore-pressed")},
    setLeftSideMenuWidth:function(b){this.sideMenuWidth=b;b=(b+"").replace("px","")+"px";var e=numOnly(window.innerWidth)-numOnly(b);a("head").find("style#afui_sideMenuWidth").remove();b="@media handheld, only screen and (min-width: 768px) {#afui > #navbar.hasMenu.splitview, #afui > #header.hasMenu.splitview, #afui > #content.hasMenu.splitview  {    margin-left:"+b+" !important;    width: "+e+"px !important;}}#afui #menu {width:"+b+"  !important}";a("head").append("<style id='afui_sideMenuWidth'>"+b+
        "</style>")},setSideMenuWidth:function(){this.setLeftSideMenuWidth.apply(this,arguments)},setRightSideMenuWidth:function(b){this.sideMenuWidth=b;b=(b+"").replace("px","")+"px";a("head").find("style#afui_asideMenuWidth").remove();a("head").append("<style id='afui_asideMenuWidth'>#afui #aside_menu {width:"+b+"  !important}</style>")},disableNativeScrolling:function(){a.feat.nativeTouchScroll=!1},manageHistory:!0,loadDefaultHash:!0,useAjaxCacheBuster:!1,actionsheet:function(b){return a.query("#afui").actionsheet(b)},
    popup:function(b){return a.query("#afui").popup(b)},blockUI:function(b){a.blockUI(b)},unblockUI:function(){a.unblockUI()},removeFooterMenu:function(){a.query("#navbar").hide();this.showNavMenu=!1},showNavMenu:!0,autoLaunch:!0,showBackbutton:!0,showBackButton:!0,backButtonText:"",resetScrollers:!0,ready:function(b){if(this.launchCompleted)b();else a(document).one("afui:ready",function(){b()})},setBackButtonStyle:function(b){a.query("#header .backButton").get(0).className=b},goBack:function(a){if(a=
        Math.min(Math.abs(~~a||1),this.history.length))a=this.history.splice(-a).shift(),this.loadContent(a.target+"",0,1,a.transition),this.transitionType=a.transition,this.updateHash(a.target)},clearHistory:function(){this.history=[];this.setBackButtonVisibility(!1)},pushHistory:function(b,e,c,d){this.history.push({target:b,transition:c});try{this.manageHistory&&(window.history.pushState(e,e,p+"#"+e+d),a(window).trigger("hashchange",null,{newUrl:p+"#"+e+d,oldUrl:p+b}))}catch(f){}},updateHash:function(b){if(this.manageHistory){l=
        b=-1===b.indexOf("#")?"#"+b:b;var e=window.location.hash,c=this.getPanelId(b).substring(1);try{window.history.replaceState(c,c,p+b),a(window).trigger("hashchange",null,{newUrl:p+b,oldUrl:p+e})}catch(d){}}},getPanelId:function(a){var e=a.indexOf("/");return-1===e?a:a.substring(0,e)},updateBadge:function(b,e,c,d){void 0===c&&(c="");b=a(b);var f=b.find("span.af-badge");0===f.length?("absolute"!==b.css("position")&&b.css("position","relative"),f=a.create("span",{className:"af-badge "+c,html:e}),b.append(f)):
        f.html(e);f.removeClass("tl bl br tr");f.addClass(c);void 0===d&&(d="red");a.isObject(d)?f.css(d):d&&f.css("background",d);f.data("ignore-pressed","true")},removeBadge:function(b){a(b).find("span.af-badge").remove()},toggleNavMenu:function(b){this.showNavMenu&&("none"!==a.query("#navbar").css("display")&&(void 0!==b&&!0!==b||void 0===b)?a.query("#navbar").hide():(void 0===b||void 0!==b&&!0===b)&&a.query("#navbar").show())},toggleHeaderMenu:function(b){"none"!==a.query("#header").css("display")&&(void 0!==
        b&&!0!==b||void 0===b)?a.query("#header").hide():(void 0===b||void 0!==b&&!0===b)&&a.query("#header").show()},toggleAsideMenu:function(){this.toggleRightSideMenu.apply(this,arguments)},toggleRightSideMenu:function(a,e,c){if(this.isAsideMenuEnabled())return this.toggleLeftSideMenu(a,e,c,!0)},toggleLeftSideMenu:function(b,e,c,d){if(!(!this.isSideMenuEnabled()&&!this.isAsideMenuEnabled()||this.togglingSideMenu))if(d||this.isSideMenuEnabled())if(d||!(a.ui.splitview&&window.innerWidth>=a.ui.handheldMinWidth)){var f=
        this,g=a.query("#menu"),h=a.query("#aside_menu"),k=a.query("#content,  #header, #navbar"),l=a.query(".afui_panel_mask");c=c||this.transitionTime;var m=this.isSideMenuOn(),p=d?"-"+h.width():g.width();0===l.length&&window.innerWidth<a.ui.handheldMinWidth&&(k.append("<div class='afui_panel_mask'></div>"),l=a.query(".afui_panel_mask"),a(".afui_panel_mask").bind("click",function(){a.ui.toggleSideMenu(!1,null,null,d)}));var u=this.getSideMenuPosition();m&&!d&&0>u?m=!1:m&&(d&&0<u)&&(m=!1);if(2===b||!m&&
        (void 0!==b&&!1!==b||void 0===b))this.togglingSideMenu=!0,d?h.show():g.show(),f.css3animate(k,{x:p,time:c,complete:function(b){f.togglingSideMenu=!1;k.vendorCss("Transition","");e&&e(b);0!==l.length&&window.innerWidth<a.ui.handheldMinWidth&&l.show()}});else if(void 0===b||void 0!==b&&!1===b)this.togglingSideMenu=!0,f.css3animate(k,{x:"0px",time:c,complete:function(b){k.vendorCss("Transition","");k.vendorCss("Transform","");f.togglingSideMenu=!1;e&&e(b);a.ui.splitview||g.hide();h.hide();0!==l.length&&
        window.innerWidth<a.ui.handheldMinWidth&&l.hide()}})}},toggleSideMenu:function(){this.toggleLeftSideMenu.apply(this,arguments)},disableSideMenu:function(){this.disableLeftSideMenu()},disableLeftSideMenu:function(){var b=a.query("#content, #header, #navbar");this.isSideMenuOn()?this.toggleSideMenu(!1,function(a){a||b.removeClass("hasMenu")}):b.removeClass("hasMenu")},enableLeftSideMenu:function(){a.query("#content, #header, #navbar").addClass("hasMenu")},enableSideMenu:function(){return this.enableLeftSideMenu()},
    disableRightSideMenu:function(){var b=a.query("#content, #header, #navbar");this.isSideMenuOn()?this.toggleSideMenu(!1,function(a){a||b.removeClass("hasAside")}):b.removeClass("hasAside")},enableRightSideMenu:function(){a.query("#content, #header, #navbar").addClass("hasAside")},isSideMenuEnabled:function(){return a.query("#content").hasClass("hasMenu")},isAsideMenuEnabled:function(){return a.query("#content").hasClass("hasAside")},isSideMenuOn:function(){var a=0!==this.getSideMenuPosition()?!0:!1;
        return(this.isSideMenuEnabled()||this.isAsideMenuEnabled)&&a},getSideMenuPosition:function(){return numOnly(parseFloat(a.getCssMatrix(a("#content")).e))},splitview:!0,disableSplitView:function(){a.query("#content, #header, #navbar, #menu").removeClass("splitview");this.splitview=!1},prevFooter:null,updateNavbarElements:function(b){this.prevFooter&&(this.prevFooter.data("parent")?this.prevFooter.appendTo("#"+this.prevFooter.data("parent")):this.prevFooter.appendTo("#afui"));a.is$(b)||(b=a.query("#"+
        b));a.query("#navbar").append(b);this.prevFooter=b;b=a.query("#navbar > footer > a:not(.button)");if(0<b.length){b.data("ignore-pressed","true").data("resetHistory","true");var e=parseFloat(100/b.length);b.css("width",e+"%")}b=a.query("#navbar footer");if(0!==b.length){b=b.get(0).childNodes;for(e=0;e<b.length;e++)3===b[e].nodeType&&b[e].parentNode.removeChild(b[e])}},prevHeader:null,updateHeaderElements:function(b,e){var c=this;a.is$(b)||(b=a.query("#"+b));if(b!==this.prevHeader)if(this._currentHeaderID=
        b.prop("id"),this.prevHeader)if(a.query("#header").append(b),a.ui.animateHeaders){var d=e?"100px":"-100px",f=e?"-100px":"100px";c.prevHeader.addClass("ignore");c.css3animate(b,{x:f,opacity:0.3,time:"1ms"});c.css3animate(c.prevHeader,{x:d,y:0,opacity:0.3,time:c.transitionTime,delay:numOnly(c.transitionTime)/5+"ms",complete:function(){c.prevHeader.data("parent")?c.prevHeader.appendTo("#"+c.prevHeader.data("parent")):c.prevHeader.appendTo("#afui");c.prevHeader.removeClass("ignore");c.css3animate(c.prevHeader,
        {x:f,opacity:1,time:"1ms"});c.prevHeader=b}});c.css3animate(b,{x:"0px",opacity:1,time:c.transitionTime})}else c.prevHeader.data("parent")?c.prevHeader.appendTo("#"+c.prevHeader.data("parent")):c.prevHeader.appendTo("#afui"),c.prevHeader=b;else a.query("#header").append(b),this.prevHeader=b},previAsideMenu:null,updateAsideElements:function(){return this.updateRightSideMenuElements.apply(this,arguments)},updateRightSideMenuElements:function(b){if(!(void 0===b||null===b)){var e=a.query("#aside_menu_scroller");
        this.prevAsideMenu&&(this.prevAsideMenu.insertBefore("#afui #aside_menu"),this.prevAsideMenu=null);a.is$(b)||(b=a.query("#"+b));a(b).attr("title")&&(a(b).prepend(a.create("header",{className:"header"}).append(a.create("h1",{html:a(b).attr("title")}).get(0))),a(b).removeAttr("title"));e.html("");e.append(b);this.prevAsideMenu=b;this.scrollingDivs.aside_menu_scroller.hideScrollbars();this.scrollingDivs.aside_menu_scroller.scrollToTop()}},updateSideMenu:function(a){return this.updateSideMenuElements(a)},
    updateSideMenuElements:function(){return this.updateLeftSideMenuElements.apply(this,arguments)},updateLeftSideMenuElements:function(b){if(!(void 0===b||null===b)){var e=a.query("#menu_scroller");this.prevMenu&&(this.prevMenu.insertBefore("#afui #menu"),this.prevMenu=null);a.is$(b)||(b=a.query("#"+b));a(b).attr("title")&&(a(b).prepend(a.create("header",{className:"header"}).append(a.create("h1",{html:a(b).attr("title")}).get(0))),a(b).removeAttr("title"));e.html("");e.append(b);this.prevMenu=b;this.scrollingDivs.menu_scroller.hideScrollbars();
        this.scrollingDivs.menu_scroller.scrollToTop()}},setTitle:function(b){"defaultHeader"===this._currentHeaderID&&a.query("#header header:not(.ignore)  #pageTitle").html(b)},setBackButtonText:function(b){"defaultHeader"===this._currentHeaderID&&(this.trimBackButtonText&&7<=b.length&&(b=b.substring(0,5)+"..."),0<this.backButtonText.length?a.query("#header header:not(.ignore) .backButton").html(this.backButtonText):a.query("#header header:not(.ignore)  .backButton").html(b))},setBackButtonVisibility:function(b){b?
        a.query("#header .backButton").css("visibility","visible"):a.query("#header .backButton").css("visibility","hidden")},showMask:function(b){b||(b=this.loadingText||"");a.query("#afui_mask>h1").html(b);a.query("#afui_mask").show()},hideMask:function(){a.query("#afui_mask").hide()},modalReference_:null,showModal:function(b,e){this.modalTransition=e||"up";var c=a.query("#modalContainer");"string"===typeof b&&(b="#"+b.replace("#",""));var d=a.query(b);this.modalReference_=d;var f=a.query("#afui_modal");
        if(d.length){var g=this.scrollingDivs.hasOwnProperty(d.attr("id")),h;a.feat.nativeTouchScroll||a.os.desktop||!g?(h=d.contents(),c.append(h)):(h=a(d.get(0).childNodes[0]).contents(),c.children().eq(0).append(h));this.runTransition(this.modalTransition,this.modalTransContainer,this.modalWindow,!1);a(this.modalWindow).css("display","");a(this.modalWindow).addClass("display","flexContainer");g?this.scrollingDivs.modal_container.enable(this.resetScrollers):this.scrollingDivs.modal_container.disable();
            c.addClass("panel").show();"none"===d.data("header")?f.find("#modalHeader").hide():0<h.filter("header").length?f.find("#modalHeader").append(h.filter("header")).show():f.find("#modalHeader").append(a.create("header",{className:"header"}).append(a.create("h1",{html:d.data("title")}).get(0)).append(a.create("a",{className:"button icon close"}).attr("onclick","$.ui.hideModal()").get(0))).show();if("none"===d.data("footer"))f.find("#modalFooter").hide();else if(0<h.filter("footer").length){f.find("#modalFooter").append(h.filter("footer")).show();
                f=a.query("#modalFooter > footer > a:not(.button)");0<f.length&&(g=parseFloat(100/f.length),f.css("width",g+"%"));f=a.query("#modalFooter footer");if(0===f.length)return;f=f.get(0).childNodes;for(g=0;g<f.length;g++)3===f[g].nodeType&&f[g].parentNode.removeChild(f[g])}else f.find("#modalFooter").hide();this.scrollToTop("modal");c.data("panel",b);c=d.get(0);(f=c.getAttribute("data-load"))&&this.dispatchPanelEvent(f,c);d.trigger("loadpanel")}},hideModal:function(){var b=this,e=a.query("#modalContainer"),
        c=this.scrollingDivs.hasOwnProperty(this.modalReference_.attr("id"));this.runTransition(b.modalTransition,b.modalWindow,b.modalTransContainer,!0);this.scrollingDivs.modal_container.disable();var d=a.query(e.data("panel")),f=d.data("unload");f&&this.dispatchPanelEvent(f,d.get(0));d.trigger("unloadpanel");setTimeout(function(){a.feat.nativeTouchScroll||a.os.desktop||!c?(b.modalReference_.append(a("#modalHeader header")),b.modalReference_.append(e.contents()),b.modalReference_.append(a("#modalFooter footer"))):
        (b.modalReference_.children().eq(0).append(a("#modalHeader header")),a(b.modalReference_.get(0).childNodes[0]).append(e.children().eq(0).contents()),b.modalReference_.children().eq(0).append(a("#modalFooter footer")))},this.transitionTime)},updatePanel:function(b,e){b="#"+b.replace("#","");var c=a.query(b).get(0);if(c){var d=a.create("div",{html:e}),d=d.children(".panel")&&0<d.children(".panel").length?d.children(".panel").get(0):d.get(0);if(c.getAttribute("js-scrolling")&&("yes"===c.getAttribute("js-scrolling").toLowerCase()||
        "true"===c.getAttribute("js-scrolling").toLowerCase()))a.cleanUpContent(c.childNodes[0],!1,!0),a(c.childNodes[0]).html(e);else{a.cleanUpContent(c,!1,!0);a(c).html(e);var f=this.scrollingDivs[c.id];f&&f.refresh&&f.addPullToRefresh()}d.getAttribute("data-title")&&c.setAttribute("data-title",d.getAttribute("data-title"))}},updateContentDiv:function(a,e){return this.updatePanel(a,e)},addContentDiv:function(b,e,c,d,f){b="string"!==typeof b?b:-1===b.indexOf("#")?"#"+b:b;var g=a.query(b).get(0);g?e=g:(e=
        a.create("div",{html:e}),e=e.children(".panel")&&0<e.children(".panel").length?e.children(".panel").get(0):e.get(0),!e.getAttribute("data-title")&&c&&e.setAttribute("data-title",c),c=e.id?e.id:b.replace("#",""),e.id=c,e.id!==b&&e.setAttribute("data-crc",b.replace("#","")));e.className="panel";c=e.id;this.addDivAndScroll(e,d,f);return c},addDivAndScroll:function(b,e,c,d){var f=!1,g,h=b.style.overflow,h="hidden"!==h&&"visible"!==h;d=d||this.content;!a.feat.nativeTouchScroll&&(h&&!a.os.desktop)&&b.setAttribute("js-scrolling",
        "true");if(b.getAttribute("js-scrolling")&&("yes"===b.getAttribute("js-scrolling").toLowerCase()||"true"===b.getAttribute("js-scrolling").toLowerCase()))h=f=!0;g=b.getAttribute("data-title")||b.title;b.title="";b.setAttribute("data-title",g);if(a(b).hasClass("no-scroll")||b.getAttribute("scrolling")&&"no"===b.getAttribute("scrolling"))f=h=!1,b.removeAttribute("js-scrolling");f?(g=b,d.appendChild(b),!1!==this.selectBox&&this.selectBox.getOldSelects(g.id),!1!==this.passwordBox&&this.passwordBox.getOldPasswords(g.id)):
        (d.appendChild(b),g=b,b.style["-webkit-overflow-scrolling"]="none");h&&(this.scrollingDivs[g.id]=a(b).scroller({scrollBars:!0,verticalScroll:!0,horizontalScroll:this.horizontalScroll,vScrollCSS:"afScrollbar",refresh:e,useJsScroll:f,lockBounce:this.lockPageBounce,autoEnable:!1}),a(b).addClass("y-scroll"),this.horizontalScroll&&a(b).addClass("x-scroll"),c&&a.bind(this.scrollingDivs[g.id],"refresh-release",function(a){a&&c()}),f&&a(b).children().eq(0).addClass("afScrollPanel"));return g.id},scrollToTop:function(a,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          e){e=e||"300ms";a=a.replace("#","");this.scrollingDivs[a]&&this.scrollingDivs[a].scrollToTop(e)},scrollToBottom:function(a,e){a=a.replace("#","");this.scrollingDivs[a]&&this.scrollingDivs[a].scrollToBottom(e)},parsePanelFunctions:function(b,e,c){var d=b.getAttribute("data-footer"),f=b.getAttribute("data-header");d&&"none"===d.toLowerCase()?(this.toggleNavMenu(!1),d=!1):this.toggleNavMenu(!0);d&&this.customFooter!==d?(this.customFooter=d,this.updateNavbarElements(d)):d!==this.customFooter&&(this.customFooter&&
        this.updateNavbarElements(this.defaultFooter),this.customFooter=!1);f&&"none"===f.toLowerCase()?(this.toggleHeaderMenu(!1),f=!1):this.toggleHeaderMenu(!0);f&&this.customHeader!==f?(this.customHeader=f,this.updateHeaderElements(f,c)):f!==this.customHeader&&(this.customHeader&&this.updateHeaderElements(this.defaultHeader,c),this.customHeader=!1);d=a(b).find("footer");0<d.length&&(this.customFooter=b.id,d.data("parent",b.id),this.updateNavbarElements(d));d=a(b).find("header");0<d.length&&(this.customHeader=
        b.id,d.data("parent",b.id),this.updateHeaderElements(d,c));b.getAttribute("data-tab")&&(a.query("#navbar>footer>a:not(.button)").removeClass("pressed"),a.query("#navbar #"+b.getAttribute("data-tab")).addClass("pressed"));(c=b.getAttribute("data-left-menu")||b.getAttribute("data-nav"))&&this.customMenu!==c?(this.customMenu=c,this.updateSideMenuElements(c)):c!==this.customMenu&&(this.customMenu&&this.updateSideMenuElements(this.defaultMenu),this.customMenu=!1);(c=b.getAttribute("data-right-menu")||
        b.getAttribute("data-aside"))&&this.customAside!==c?(this.customAside=c,this.updateAsideElements(c)):c!==this.customAside&&(this.customAside&&this.updateAsideElements(this.defaultAside),this.customAside=!1);e&&((c=e.getAttribute("data-unload"))&&this.dispatchPanelEvent(c,e),a(e).trigger("unloadpanel"));(c=b.getAttribute("data-load"))&&this.dispatchPanelEvent(c,b);a(b).trigger("loadpanel");this.isSideMenuOn()&&this.toggleSideMenu(!1)},parseScriptTags:function(b){b&&a.parseJS(b)},loadContent:function(b,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                e,c,d,f){if(this.doingTransition)this.loadContentQueue.push([b,e,c,d,f]);else if(0!==b.length){var g=!0;f=f||document.createElement("a");if(-1===b.indexOf("#")){var k="url"+h(b),l=a.query("div.panel[data-crc='"+k+"']");0<a.query("#"+b).length?g=!1:0<l.length?(g=!1,"true"===f.getAttribute("data-refresh-ajax")||f.refresh&&!0===f.refresh||this.isAjaxApp?g=!0:b="#"+l.get(0).id):0<a.query("#"+k).length&&(g=!1,"true"===f.getAttribute("data-refresh-ajax")||f.refresh&&!0===f.refresh||this.isAjaxApp?g=!0:
        b="#"+k)}-1===b.indexOf("#")&&g?this.loadAjax(b,e,c,d,f):this.loadDiv(b,e,c,d)}},loadDiv:function(b,e,c,d){var f=this,g=b.replace("#",""),h=g.indexOf("/"),k="";-1!==h&&(k=g.substr(h),g=g.substr(0,h));if(g=a.query("#"+g).get(0))if(g===this.activeDiv&&!c)this.isSideMenuOn()&&this.toggleSideMenu(!1);else{this.transitionType=d;var m=this.activeDiv;b=g;if("true"===g.getAttribute("data-modal")||"true"===g.getAttribute("modal"))return this.showModal(g.id);m!==b&&(e?(this.clearHistory(),this.pushHistory("#"+
        this.firstDiv.id,g.id,d,k)):c||this.pushHistory(l,g.id,d,k),l="#"+g.id+k,this.doingTransition=!0,m.style.display="block",b.style.display="block",this.runTransition(d,m,b,c),this.parsePanelFunctions(g,m,c),this.loadContentData(g,e,c,d),a.feat.nativeTouchScroll?setTimeout(function(){f.scrollingDivs[m.id]&&f.scrollingDivs[m.id].disable()},numOnly(f.transitionTime)+50):"undefined"!==typeof f.scrollingDivs[m.id]&&f.scrollingDivs[m.id].disable())}else a(document).trigger("missingpanel",null,{missingTarget:b})},
    loadContentData:function(b,e,c){var d;c?0<this.history.length&&(c=this.history[this.history.length-1],d=c.target.indexOf("/"),c=-1!==d?c.target.substr(0,d):c.target,(c=a.query(c).get(0))?this.setBackButtonText(c.getAttribute("data-title")):this.setBackButtonText("Back")):this.activeDiv.getAttribute("data-title")?this.setBackButtonText(this.activeDiv.getAttribute("data-title")):this.setBackButtonText("Back");b.getAttribute("data-title")&&this.setTitle(b.getAttribute("data-title"));e&&(this.setBackButtonText(this.firstDiv.getAttribute("data-title")),
        b===this.firstDiv&&(this.history.length=0));a("#header #menubadge").css("float","right");0===this.history.length?(this.setBackButtonVisibility(!1),this.history=[],a("#header #menubadge").css("float","left")):this.showBackButton&&this.showBackbutton&&this.setBackButtonVisibility(!0);this.activeDiv=b;this.scrollingDivs[this.activeDiv.id]&&this.scrollingDivs[this.activeDiv.id].enable(this.resetScrollers)},loadAjax:function(b,e,c,d,f){if(!("afui_ajax"===this.activeDiv.id&&b===this.ajaxUrl)){var g="url"+
        h(b),k=this;-1===b.indexOf("http")&&(b=intel.xdk.webRoot+b);var l=new XMLHttpRequest;f&&"object"!==typeof f&&(f=document.createElement("a"),f.setAttribute("data-persist-ajax",!0));f=f||document.createElement("a");l.onreadystatechange=function(){if(4===l.readyState&&200===l.status){this.doingTransition=!1;var h,m=!1;h=a.query("#"+g);if(0<h.length)k.updatePanel(g,l.responseText),h.get(0).setAttribute("data-title",f.title?f.title:b);else if(f.getAttribute("data-persist-ajax")||k.isAjaxApp){var p="true"===
        f.getAttribute("data-pull-scroller")?!0:!1;h=p?function(){f.refresh=!0;k.loadContent(b,e,c,d,f);f.refresh=!1}:null;var v=a(l.responseText);v.hasClass("panel")?(g=v.attr("id"),v=v.get(0).innerHTML):v=v.html();0<a("#"+g).length?k.updatePanel("#"+g,v):0<a("div.panel[data-crc='"+g+"']").length?(k.updatePanel(a("div.panel[data-crc='"+g+"']").get(0).id,v),g=a("div.panel[data-crc='"+g+"']").get(0).id):g=k.addContentDiv(g,l.responseText,f.title?f.title:b,p,h)}else k.updatePanel("afui_ajax",l.responseText),
        a.query("#afui_ajax").get(0).setAttribute("data-title",f.title?f.title:b),k.loadContent("#afui_ajax",e,c,d),m=!0;h=document.createElement("div");a(h).html(l.responseText);k.parseScriptTags(h);if(m)k.showLoading&&k.hideMask();else return k.loadContent("#"+g,e,c,d),k.showLoading&&k.hideMask(),null}else 4===l.readyState&&a.ui.hideMask()};this.ajaxUrl=b;var m=this.useAjaxCacheBuster?b+(b.split("?")[1]?"&":"?")+"cache="+1E16*Math.random():b;l.open("GET",m,!0);l.setRequestHeader("X-Requested-With","XMLHttpRequest");
        l.send();this.showLoading&&this.showMask()}},runTransition:function(a,e,c,d){this.availableTransitions[a]||(a="default");"none"===e.style.display&&(e.style.display="block");"none"===c.style.display&&(c.style.display="block");this.availableTransitions[a].call(this,e,c,d)},launch:function(){if(!1===this.hasLaunched||this.launchCompleted)this.hasLaunched=!0;else{if(this.isLaunching)return!0;this.isLaunching=!0;var b=this;this.viewportContainer=af.query("#afui");this.navbar=af.query("#navbar").get(0);
        this.content=af.query("#content").get(0);this.header=af.query("#header").get(0);this.menu=af.query("#menu").get(0);this.viewportContainer.on("click","a",function(a){b.useInternalRouting&&k(a,a.currentTarget)});var e=null;a.bind(a.touchLayer,"enter-edit",function(a){e=a});a.os.android&&!a.os.androidICS&&(a.bind(a.touchLayer,"enter-edit-reshape",function(){var c=a(e),d=c.closest(b.activeDiv);if(d&&0<d.size()){var f=c.offset(),d=d.offset();f.bottom>d.bottom&&f.height<d.height&&b.scrollingDivs[b.activeDiv.id].scrollToItem(c,
            "bottom")}}),a.bind(a.touchLayer,"exit-edit-reshape",function(){b.activeDiv&&(b.activeDiv.id&&b.scrollingDivs.hasOwnProperty(b.activeDiv.id))&&b.scrollingDivs[b.activeDiv.id].setPaddings(0,0)}));this.navbar||(this.navbar=a.create("div",{id:"navbar"}).get(0),this.viewportContainer.append(this.navbar));this.header||(this.header=a.create("div",{id:"header"}).get(0),this.viewportContainer.prepend(this.header));this.content||(this.content=a.create("div",{id:"content"}).get(0),a(this.content).insertAfter(this.header));
        this.menu||(this.menu=a.create("div",{id:"menu",html:"<div id='menu_scroller'></div>"}).get(0),this.viewportContainer.append(this.menu),this.menu.style.overflow="hidden",this.scrollingDivs.menu_scroller=a.query("#menu_scroller").scroller({scrollBars:!0,verticalScroll:!0,vScrollCSS:"afScrollbar",useJsScroll:!a.feat.nativeTouchScroll,autoEnable:!0,lockBounce:this.lockPageBounce,hasParent:!0}),a.feat.nativeTouchScroll&&a.query("#menu_scroller").css("height","100%"),this.asideMenu=a.create("div",{id:"aside_menu",
            html:"<div id='aside_menu_scroller'></div>"}).get(0),this.viewportContainer.append(this.asideMenu),this.asideMenu.style.overflow="hidden",this.scrollingDivs.aside_menu_scroller=a.query("#aside_menu_scroller").scroller({scrollBars:!0,verticalScroll:!0,vScrollCSS:"afScrollbar",useJsScroll:!a.feat.nativeTouchScroll,autoEnable:!0,lockBounce:this.lockPageBounce,hasParent:!0}),a.feat.nativeTouchScroll&&a.query("#aside_menu_scroller").css("height","100%"));a(this.header).html("<a class='backButton button'></a> <h1 id='pageTitle'></h1>"+
            this.header.innerHTML);this.backButton=a.query("#header .backButton").css("visibility","hidden");a(document).on("click","#header .backButton",function(a){a.preventDefault();b.goBack()});this.titlebar=a.query("#header #pageTitle").get(0);this.addContentDiv("afui_ajax","");var c=a.create("div",{id:"afui_mask",className:"ui-loader",html:"<span class='ui-icon ui-icon-loading spin'></span><h1>Loading Content</h1>"}).css({"z-index":2E4,display:"none"});document.body.appendChild(c.get(0));c=a.create("div",
            {id:"afui_modal"}).get(0);a(c).hide();c.appendChild(a.create("div",{id:"modalHeader",className:"header"}).get(0));c.appendChild(a.create("div",{id:"modalContainer"}).get(0));c.appendChild(a.create("div",{id:"modalFooter",className:"footer"}).get(0));this.modalTransContainer=a.create("div",{id:"modalTransContainer"}).appendTo(c).get(0);this.viewportContainer.append(c);this.scrollingDivs.modal_container=a.query("#modalContainer").scroller({scrollBars:!0,vertical:!0,vScrollCSS:"afScrollbar",lockBounce:this.lockPageBounce});
        this.modalWindow=c;for(var d={},c=this.viewportContainer.get(0).querySelectorAll(".panel"),f=0;f<c.length;f++){var g=c[f],h=g,p=g.previousSibling;g.parentNode&&"content"!==g.parentNode.id?(h.getAttribute("selected")&&(this.firstDiv=g),this.addDivAndScroll(h),a.query("#content").append(g)):g.parsedContent||(g.parsedContent=1,h.getAttribute("selected")&&(this.firstDiv=g),this.addDivAndScroll(g),a(g).insertAfter(p));g.getAttribute("data-defer")&&(d[g.id]=g.getAttribute("data-defer"));this.firstDiv||
        (this.firstDiv=g);g=null}var c=null,t=!1,E=Object.keys(d).length,c=function(c){a.ajax({url:intel.xdk.webRoot+d[c],success:function(d){0<d.length&&(b.updatePanel(c,d),b.parseScriptTags(a.query("#"+c).get(0)));C++;C>=E&&(t=!1,a(document).trigger("defer:loaded"))},error:function(){console.log("Error with deferred load "+intel.xdk.webRoot+d[c]);C++;C>=E&&(t=!1,a(document).trigger("defer:loaded"))}})};if(0<E){var t=!0,C=0,u;for(u in d)c(u)}if(this.firstDiv)if(this.activeDiv=this.firstDiv,this.scrollingDivs[this.activeDiv.id]&&
            this.scrollingDivs[this.activeDiv.id].enable(),u=function(){a.query("#navbar").append(a.create("footer",{id:"defaultNav"}).append(a.query("#navbar").children()));b.defaultFooter="defaultNav";b.prevFooter=a.query("#defaultNav");b.updateNavbarElements(b.prevFooter);var c=a.query("nav").get(0);c&&(b.defaultMenu=a(c),b.updateSideMenuElements(b.defaultMenu),b.prevMenu=b.defaultMenu);if(c=a.query("aside").get(0))b.defaultAside=a(c),b.updateAsideElements(b.defaultAside),b.prevAsideMenu=b.defaultAside;b.defaultHeader=
            "defaultHeader";a.query("#header").append(a.create("header",{id:"defaultHeader"}).append(a.query("#header").children()));b.prevHeader=a.query("#defaultHeader");a.query("#header").addClass("header");a.query("#navbar").addClass("footer");a.query("#navbar").on("click","footer>a:not(.button)",function(b){a.query("#navbar>footer>a").not(b.currentTarget).removeClass("pressed");a(b.currentTarget).addClass("pressed")});0<a.query("nav").length&&(c=b.splitview?" splitview":"",a.query("#afui #header").addClass("hasMenu"+
            c),a.query("#afui #content").addClass("hasMenu"+c),a.query("#afui #navbar").addClass("hasMenu"+c),a.query("#afui #menu").addClass("hasMenu"+c),a.query("#afui #aside_menu").addClass(c));0<a.query("aside").length&&a.query("#afui #header, #afui #content, #afui #navbar").addClass("hasAside");a.query("#afui #menu").addClass("tabletMenu");a.ui.splitview&&window.innerWidth>parseInt(a.ui.handheldMinWidth,10)&&(a.ui.sideMenuWidth=a("#menu").width()+"px");var c=b.getPanelId(m),d=null!==c&&c==="#"+b.firstDiv.id;
            0<c.length&&b.loadDefaultHash&&!d?b.loadContent(m,!0,!1,"none"):(l="#"+b.firstDiv.id,b.firstDiv.style.display="block",b.parsePanelFunctions(b.firstDiv),b.loadContentData(b.firstDiv),a.query("#header .backButton").css("visibility","hidden"),("true"===b.firstDiv.getAttribute("data-modal")||"true"===b.firstDiv.getAttribute("modal"))&&b.showModal(b.firstDiv.id));b.launchCompleted=!0;a.query("#afui #splashscreen").remove();setTimeout(function(){a(document).trigger("afui:ready")})},t)a(document).one("defer:loaded",
            u);else u();else setTimeout(function(){a(document).trigger("afui:ready")});a.bind(b,"content-loaded",function(){if(0<b.loadContentQueue.length){var a=b.loadContentQueue.splice(0,1)[0];b.loadContent(a[0],a[1],a[2],a[3],a[4])}});(window.navigator.standalone||this.isIntel)&&this.blockPageScroll();this.enableTabBar();this.topClickScroll()}},topClickScroll:function(){var a=this;document.getElementById("header").addEventListener("click",function(e){15>=e.clientY&&"h1"===e.target.nodeName.toLowerCase()&&
    a.scrollingDivs[a.activeDiv.id].scrollToTop("100")})},blockPageScroll:function(){a.query("#afui #header").bind("touchmove",function(a){a.preventDefault()})},noTransition:function(a,e){e.style.display="block";a.style.display="block";this.clearAnimations(e);this.css3animate(a,{x:"0%",y:0});this.finishTransition(a);e.style.zIndex=2;a.style.zIndex=1},finishTransition:function(b,e){b.style.display="none";this.doingTransition=!1;e&&this.clearAnimations(e);b&&this.clearAnimations(b);a.trigger(this,"content-loaded")},
    clearAnimations:function(b){b.style[a.feat.cssPrefix+"Transform"]="none";b.style[a.feat.cssPrefix+"Transition"]="none"}};var k=function(b,e){var c=document.getElementById("afui");if(e!==c){if("a"!==e.tagName.toLowerCase()&&e.parentNode)return k(b,e.parentNode);if("undefined"!==e.tagName&&"a"===e.tagName.toLowerCase()){if(!1!==("function"===typeof a.ui.customClickHandler?a.ui.customClickHandler:!1)&&a.ui.customClickHandler(e,b))return b.preventDefault();if(!(-1!==e.href.toLowerCase().indexOf("javascript:")||
    e.getAttribute("data-ignore")))if(-1===e.hash.indexOf("#")&&0<e.target.length)0!==e.href.toLowerCase().indexOf("javascript:")&&(a.ui.isIntel?(b.preventDefault(),intel.xdk.device.launchExternal(e.href)):a.os.desktop||(b.target.target="_blank"));else{var c=e.href,d=location.protocol+"//"+location.hostname+":"+location.port+location.pathname;0===c.indexOf(d)&&(c=c.substring(d.length));if("#"===c||c.indexOf("#")===c.length-1||0===c.length&&0===e.hash.length)return b.preventDefault();d=/^((http|https|file):\/\/)/;
    -1!==e.href.indexOf(":")&&d.test(e.href)&&b.preventDefault();var d=e.getAttribute("data-transition"),f=e.getAttribute("data-resetHistory"),f=f&&"true"===f.toLowerCase()?!0:!1,c=0<e.hash.length?e.hash:c;a.ui.loadContent(c,f,0,d,e)}}}},h=function(a,e){void 0===e&&(e=0);var c=0,c=0;e^=-1;for(var d=0,f=a.length;d<f;d++)c=(e^a.charCodeAt(d))&255,c="0x"+"00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D".substr(9*
    c,8),e=e>>>8^c;return(e^-1)>>>0};a.ui=new g;a.ui.init=!0;a(window).trigger("afui:preinit");a(window).trigger("afui:init")})(af);
(function(a){var p=function(){a.ui.isIntel=!0;setTimeout(function(){document.getElementById("afui").style.height="100%";document.body.style.height="100%";document.documentElement.style.minHeight=window.innerHeight},30);document.removeEventListener(p)};document.addEventListener("intel.xdk.device.ready",p);a.feat.nativeTouchScroll&&document.addEventListener("orientationchange",function(){if(a.ui.scrollingDivs[a.ui.activeDiv.id]){var m=a.ui.scrollingDivs[a.ui.activeDiv.id];m&&(0===m.el.scrollTop&&(m.disable(),
    setTimeout(function(){m.enable()},300)),m.refresh&&m.updateP2rHackPosition())}})})(af);
(function(a){a.availableTransitions.fade=function(p,m,l){var g=this;l?(m.style.zIndex=1,p.style.zIndex=2,g.clearAnimations(m),g.css3animate(p,{x:"0%",time:a.transitionTime,opacity:0.1,complete:function(a){a?g.finishTransition(p,m):(g.css3animate(p,{x:"-100%",opacity:1,complete:function(){g.finishTransition(p)}}),m.style.zIndex=2,p.style.zIndex=1)}})):(p.style.zIndex=1,m.style.zIndex=2,m.style.opacity=0,g.css3animate(m,{x:"0%",opacity:0.1,complete:function(){g.css3animate(m,{x:"0%",time:a.transitionTime,
    opacity:1,complete:function(a){a?g.finishTransition(p,m):(g.clearAnimations(m),g.css3animate(p,{x:"-100%",y:0,complete:function(){g.finishTransition(p)}}))}})}}))}})(af.ui);
(function(a){a.availableTransitions.flip=function(p,m,l){var g=this;l||(p.style.zIndex=1,m.style.zIndex=2);g.css3animate(m,{x:"100%",scale:0.8,rotateY:"180deg",complete:function(){g.css3animate(m,{x:"0%",scale:1,time:a.transitionTime,rotateY:"0deg",complete:function(){g.clearAnimations(m)}})}});g.css3animate(p,{x:"100%",time:a.transitionTime,scale:0.8,rotateY:"180deg",complete:function(){g.css3animate(p,{x:"-100%",opacity:1,scale:1,rotateY:"0deg",complete:function(){g.finishTransition(p)}});m.style.zIndex=
    2;p.style.zIndex=1}})}})(af.ui);
(function(a){a.availableTransitions.pop=function(p,m,l){var g=this;l?(m.style.zIndex=1,p.style.zIndex=2,g.clearAnimations(m),g.css3animate(p,{x:"0%",time:a.transitionTime,opacity:0.1,scale:0.2,origin:"50% 50%",complete:function(a){a?g.finishTransition(p):(g.css3animate(p,{x:"-100%",complete:function(){g.finishTransition(p)}}),m.style.zIndex=2,p.style.zIndex=1)}})):(p.style.zIndex=1,m.style.zIndex=2,g.css3animate(m,{x:"0%",scale:0.2,origin:"50% 50%",opacity:0.1,time:"0ms",complete:function(){g.css3animate(m,
    {x:"0%",time:a.transitionTime,scale:1,opacity:1,origin:"0% 0%",complete:function(a){a?g.finishTransition(p,m):(g.clearAnimations(m),g.css3animate(p,{x:"100%",y:0,complete:function(){g.finishTransition(p)}}))}})}}))}})(af.ui);
(function(a){function p(m,l,g){var k=this;g?k.css3animate(m,{x:"0%",y:"0%",complete:function(){k.css3animate(m,{x:"100%",time:a.transitionTime,complete:function(){k.finishTransition(m,l)}}).link(l,{x:"0%",time:a.transitionTime})}}).link(l,{x:"-100%",y:"0%"}):k.css3animate(m,{x:"0%",y:"0%",complete:function(){k.css3animate(m,{x:"-100%",time:a.transitionTime,complete:function(){k.finishTransition(m,l)}}).link(l,{x:"0%",time:a.transitionTime})}}).link(l,{x:"100%",y:"0%"})}a.availableTransitions.slide=
    p;a.availableTransitions["default"]=p})(af.ui);(function(a){a.availableTransitions.down=function(p,m,l){var g=this;l?(p.style.zIndex=2,m.style.zIndex=1,g.css3animate(p,{y:"0%",x:"0%",complete:function(){g.css3animate(p,{y:"-100%",time:a.transitionTime,complete:function(){g.finishTransition(p,m)}})}})):(p.style.zIndex=1,m.style.zIndex=2,g.css3animate(m,{y:"-100%",x:"0%",time:"10ms",complete:function(){g.css3animate(m,{y:"0%",time:a.transitionTime,complete:function(){g.finishTransition(p,m)}})}}))}})(af.ui);
(function(a){a.availableTransitions.up=function(p,m,l){var g=this;l?(p.style.zIndex=2,m.style.zIndex=1,g.css3animate(p,{y:"0%",x:"0%",complete:function(){g.css3animate(p,{y:"100%",time:a.transitionTime,complete:function(){g.finishTransition(p,m)}})}})):(p.style.zIndex=1,m.style.zIndex=2,g.css3animate(m,{y:"100%",x:"0%",time:"10ms",complete:function(){g.css3animate(m,{y:"0%",time:a.transitionTime,complete:function(){g.finishTransition(p,m)}})}}))}})(af.ui);
(function(a){function p(){a.ui.isWin8=!0;a.os.ie&&a.ui.isSideMenuEnabled()&&a.ui.ready(function(){if(!a.ui.tilesLoaded){a.ui.tilesLoaded=!0;if(window.innerWidth>a.ui.handheldMinWidth)return!0;a.ui.slideSideMenu&&(a.ui.slideSideMenu=!1);a.query("#afui #navbar footer").append("<a id='metroMenu' onclick='$.ui.toggleSideMenu()'>\u2022\u2022\u2022</a>");var m=a.query("#afui #navbar").find("a").not(".button");if(0<m.length){m.data("ignore-pressed","true").data("resetHistory","true");var l=parseFloat(100/
    m.length);m.css("width",l+"%")}var g=a.ui.updateNavbarElements;a.ui.updateNavbarElements=function(){g.apply(a.ui,arguments);1!==a.query("#afui #navbar #metroMenu").length&&a.query("#afui #navbar footer").append("<a id='metroMenu' onclick='$.ui.toggleSideMenu()'>\u2022\u2022\u2022</a>")};a.ui.isSideMenuOn=function(){var g=0>parseInt(a.getCssMatrix(a("#navbar")).f,10)?!0:!1;return this.isSideMenuEnabled()&&g};a.ui.toggleRightSideMenu=function(g,h,b){if(this.isAsideMenuEnabled()&&!this.togglingAsideMenu){var e=
    this,c=a("#menu"),d=a.query("#aside_menu"),f=a.query("#content,  #header, #navbar"),l=a.query(".afui_panel_mask");b=b||this.transitionTime;var m="block"===a("#aside_menu").css("display"),p="-"+e.sideMenuWidth;0===l.length&&window.innerWidth<a.ui.handheldMinWidth&&(f.append("<div class='afui_panel_mask'></div>"),l=a.query(".afui_panel_mask"),a(".afui_panel_mask").bind("click",function(){a.ui.toggleSideMenu(!1,null,null,!0)}));var t=this.getSideMenuPosition();m&&0<t&&(m=!1);if(2===g||!m&&(void 0!==
    g&&!1!==g||void 0===g))this.togglingSideMenu=!0,d.show(),e.css3animate(f,{x:p,time:b,complete:function(b){e.togglingSideMenu=!1;f.vendorCss("Transition","");h&&h(b);0!==l.length&&window.innerWidth<a.ui.handheldMinWidth&&l.show()}});else if(void 0===g||void 0!==g&&!1===g)this.togglingSideMenu=!0,e.css3animate(f,{x:"0px",time:b,complete:function(b){f.vendorCss("Transition","");f.vendorCss("Transform","");e.togglingSideMenu=!1;h&&h(b);a.ui.splitview||c.hide();d.hide();0!==l.length&&window.innerWidth<
    a.ui.handheldMinWidth&&l.hide()}})}};a.ui.toggleLeftSideMenu=function(g,h){if(this.isSideMenuEnabled()&&!this.togglingSideMenu){this.togglingSideMenu=!0;var b=this,e=a.query("#menu"),c=a.query("#navbar"),d=this.isSideMenuOn();if(2===g||!d&&(void 0!==g&&!1!==g||void 0===g))e.show(),b.css3animate(c,{y:"-150px",time:a.ui.transitionTime,complete:function(){b.togglingSideMenu=!1;h&&h(!0)}}),b.css3animate(e,{y:"0px",time:a.ui.transitionTime});else if(void 0===g||void 0!==g&&!1===g)b.css3animate(c,{y:"0",
    time:a.ui.transitionTime,complete:function(){b.togglingSideMenu=!1;h&&h(!0);e.hide()}}),b.css3animate(e,{y:"150px",time:a.ui.transitionTime})}}}})}if(!a)throw"This plugin requires AFUi";a.ui?a.ui.ready(function(){p()}):a(document).ready(function(){p()})})(af);