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

 2011 - Intel
: 2011 Intel
 @description:  This script will replace all drop downs with friendly select controls.  Users can still interact
 with the old drop down box as normal with javascript, and this will be reflected
 2011 Intel
 @author Intel
 @version 2.0
*/
(function(c){var n=[],l=function(a,d){var f,e;f="string"==typeof a||a instanceof String?document.getElementById(a):c.is$(a)?a[0]:a;f.afCSS3AnimateId||(f.afCSS3AnimateId=c.uuid());e=f.afCSS3AnimateId;n[e]?(n[e].animate(d),f=n[e]):(f=r(f,d),n[e]=f);return f};c.fn.css3Animate=function(c){!c.complete&&c.callback&&(c.complete=c.callback);var d=l(this[0],c);c.complete=null;c.sucess=null;c.failure=null;for(var f=1;f<this.length;f++)d.link(this[f],c);return d};c.css3AnimateQueue=function(){return new r.queue};
var k=c.feat.cssTransformStart,g=c.feat.cssTransformEnd,q=c.feat.cssPrefix.replace(/-/g,"")+"TransitionEnd",q=c.os.fennec||""===c.feat.cssPrefix||c.os.ie?"transitionend":q,q=q.replace(q.charAt(0),q.charAt(0).toLowerCase()),r=function(){var a=function(d,f){if(!(this instanceof a))return new a(d,f);this.callbacksStack=[];this.activeEvent=null;this.countStack=0;this.isActive=!1;this.el=d;this.linkFinishedProxy_=c.proxy(this.linkFinished,this);if(this.el){this.animate(f);var e=this;af(this.el).bind("destroy",
function(){var b=e.el.afCSS3AnimateId;e.callbacksStack=[];n[b]&&delete n[b]})}};a.prototype={animate:function(a){this.isActive&&this.cancel();this.isActive=!0;if(a){var f=!!a.addClass,e,b,h=numOnly(a.time);if(f)a.removeClass?af(this.el).replaceClass(a.removeClass,a.addClass):af(this.el).addClass(a.addClass);else{0===h&&(a.time=0);a.y||(a.y=0);a.x||(a.x=0);a.previous&&(e=new c.getCssMatrix(this.el),a.y+=numOnly(e.f),a.x+=numOnly(e.e));a.origin||(a.origin="0% 0%");a.scale||(a.scale="1");a.rotateY||
(a.rotateY="0");a.rotateX||(a.rotateX="0");a.skewY||(a.skewY="0");a.skewX||(a.skewX="0");a.timingFunction||(a.timingFunction="linear");if("number"==typeof a.x||-1==a.x.indexOf("%")&&-1==a.x.toLowerCase().indexOf("px")&&-1==a.x.toLowerCase().indexOf("deg"))a.x=parseInt(a.x,10)+"px";if("number"==typeof a.y||-1==a.y.indexOf("%")&&-1==a.y.toLowerCase().indexOf("px")&&-1==a.y.toLowerCase().indexOf("deg"))a.y=parseInt(a.y,10)+"px";e="translate"+k+a.x+","+a.y+g+" scale("+parseFloat(a.scale)+") rotate("+
a.rotateX+")";c.os.opera||(e+=" rotateY("+a.rotateY+")");e+=" skew("+a.skewX+","+a.skewY+")";this.el.style[c.feat.cssPrefix+"Transform"]=e;this.el.style[c.feat.cssPrefix+"BackfaceVisibility"]="hidden";void 0!==a.opacity&&(this.el.style.opacity=a.opacity);a.width&&(this.el.style.width=a.width);a.height&&(this.el.style.height=a.height);this.el.style[c.feat.cssPrefix+"TransitionProperty"]="all";-1===(""+a.time).indexOf("s")?(e="ms",b=a.time+e):-1!==a.time.indexOf("ms")?(e="ms",b=a.time):(e="s",b=a.time+
e);a.delay&&(this.el.style[c.feat.cssPrefix+"TransitionDelay"]=a.delay);this.el.style[c.feat.cssPrefix+"TransitionDuration"]=b;this.el.style[c.feat.cssPrefix+"TransitionTimingFunction"]=a.timingFunction;this.el.style[c.feat.cssPrefix+"TransformOrigin"]=a.origin}this.callbacksStack.push({complete:a.complete,success:a.success,failure:a.failure});this.countStack++;var s=this;b=window.getComputedStyle(this.el);f&&(f=b[c.feat.cssPrefix+"TransitionDuration"],h=numOnly(f),a.time=h,-1!==f.indexOf("ms")?e=
"ms":(e="s",a.time*=1E3));0===h||"ms"==e&&5>h||"none"==b.display?c.asap(c.proxy(this.finishAnimation,this,[!1])):(this.activeEvent=function(b){clearTimeout(s.timeout);s.finishAnimation(b);s.el.removeEventListener(q,s.activeEvent,!1)},s.timeout=setTimeout(this.activeEvent,numOnly(a.time)+50),this.el.addEventListener(q,this.activeEvent,!1))}else alert("Please provide configuration options for animation of "+this.el.id)},addCallbackHook:function(c){c&&this.callbacksStack.push(c);this.countStack++;return this.linkFinishedProxy_},
linkFinished:function(c){c?this.cancel():this.finishAnimation()},finishAnimation:function(c){c&&c.preventDefault&&c.preventDefault();this.isActive&&(this.countStack--,0===this.countStack&&this.fireCallbacks(!1))},fireCallbacks:function(c){this.clearEvents();var a=this.callbacksStack;this.cleanup();for(var e=0;e<a.length;e++){var b=a[e].complete,h=a[e].success,s=a[e].failure;b&&"function"==typeof b&&b(c);c&&s&&"function"==typeof s?s():h&&"function"==typeof h&&h()}},cancel:function(){this.isActive&&
this.fireCallbacks(!0)},cleanup:function(){this.callbacksStack=[];this.isActive=!1;this.countStack=0},clearEvents:function(){this.activeEvent&&this.el.removeEventListener(q,this.activeEvent,!1);this.activeEvent=null},link:function(c,a){var e={complete:a.complete,success:a.success,failure:a.failure};a.complete=this.addCallbackHook(e);a.success=null;a.failure=null;l(c,a);a.complete=e.complete;a.success=e.success;a.failure=e.failure;return this}};return a}();r.queue=function(){return{elements:[],push:function(c){this.elements.push(c)},
pop:function(){return this.elements.pop()},run:function(){var c=this;if(0!==this.elements.length&&("function"==typeof this.elements[0]&&this.shift()(),0!==this.elements.length)){var d=this.shift();0<this.elements.length&&(d.complete=function(d){d||c.run()});r(document.getElementById(d.id),d)}},shift:function(){return this.elements.shift()}}}})(af);
(function(c){function n(){if(af.os.android&&!af.os.chrome&&af.os.webkit){var g=!1;c.bind(c.touchLayer,["cancel-enter-edit","exit-edit"],function(c){if(g){g=!1;for(var a in l)l[a].el?c=!0:(delete l[a],c=!1),c&&l[a].androidFormsMode&&l[a].stopFormsMode()}})}k=!0}var l=[];c.fn.scroller=function(q){for(var k,a,d=0;d<this.length;d++)k=this[d],k.afScrollerId||(k.afScrollerId=c.uuid()),a=k.afScrollerId,l[a]?k=l[a]:(q||(q={}),c.feat.nativeTouchScroll||(q.useJsScroll=!0),k=g(this[d],q),l[a]=k);return 1==this.length?
k:this};var k=!1,g=function(){function g(b,a){var d=document.createElement("div");d.style.position="absolute";d.style.width=b+"px";d.style.height=a+"px";d.style[c.feat.cssPrefix+"BorderRadius"]="2px";d.style.borderRadius="2px";d.style.display="none";d.className="scrollBar";d.style.background="black";return d}var r=c.feat.cssTransformStart,a=c.feat.cssTransformEnd,d,f,e=function(b,a){this.el=b;this.afEl=c(this.el);for(var d in a)this[d]=a[d]};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,_scrollTo:function(b,c){c=parseInt(c,
10);if(0===c||isNaN(c))this.el.scrollTop=Math.abs(b.y),this.el.scrollLeft=Math.abs(b.x);else{var a=(this.el.scrollTop-b.y)/Math.ceil(c/10),d=(this.el.scrollLeft-b.x)/Math.ceil(c/10),e=this,f=Math.ceil(this.el.scrollTop-b.y)/a,g=Math.ceil(this.el.scrollLeft-b.x)/a,q=0,k=0;e.scrollTopInterval=window.setInterval(function(){e.el.scrollTop-=a;k++;k>=f&&(e.el.scrollTop=b.y,clearInterval(e.scrollTopInterval))},10);e.scrollLeftInterval=window.setInterval(function(){e.el.scrollLeft-=d;q++;q>=g&&(e.el.scrollLeft=
b.x,clearInterval(e.scrollLeftInterval))},10)}},enable:function(){},disable:function(){},hideScrollbars:function(){},addPullToRefresh:function(){},_scrollToTop:function(b){this._scrollTo({x:0,y:0},b)},_scrollToBottom:function(b){this._scrollTo({x:0,y:this.el.scrollHeight-this.el.offsetHeight},b)},scrollToBottom:function(b){return this._scrollToBottom(b)},scrollToTop:function(b){return this._scrollToTop(b)},init:function(b,a){this.el=b;this.afEl=c(this.el);this.defaultProperties();for(var d in a)this[d]=
a[d];var e=this,f=function(){e.eventsActive&&!c.feat.nativeTouchScroll&&e.adjustScroll()};this.afEl.bind("destroy",function(){e.disable(!0);var b=e.el.afScrollerId;l[b]&&delete l[b];c.unbind(c.touchLayer,"orientationchange-reshape",f)});c.bind(c.touchLayer,"orientationchange-reshape",f);c(window).bind("resize",f)},needsFormsFix:function(b){return this.useJsScroll&&this.isEnabled()&&"none"!=this.el.style.display&&0<c(b).closest(this.afEl).size()},handleEvent:function(b){if(!this.scrollingLocked)switch(b.type){case "touchstart":clearInterval(this.scrollTopInterval);
this.preventHideRefresh=!this.refreshRunning;this.moved=!1;this.onTouchStart(b);this.bubbles||b.stopPropagation();break;case "touchmove":this.onTouchMove(b);this.bubbles||b.stopPropagation();break;case "touchend":this.onTouchEnd(b);this.bubbles||b.stopPropagation();break;case "scroll":this.onScroll(b)}},coreAddPullToRefresh:function(b){b&&(this.refreshElement=b);null===this.refreshElement?(b=document.getElementById(this.container.id+"_pulldown"),b=null!==b?af(b):af("<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>")):b=af(this.refreshElement);b=b.get(0);this.refreshContainer=af('<div style="overflow:hidden;height:0;width:100%;display:none;"></div>');c(this.el).prepend(this.refreshContainer.append(b,"top"));this.refreshContainer=this.refreshContainer[0]},fireRefreshRelease:function(b,a){if(this.refresh&&b){this.setRefreshContent("Refreshing...");var d=!1!==c.trigger(this,"refresh-release",[b]);this.preventHideRefresh=!1;this.refreshRunning=!0;if(d){var e=this;0<this.refreshHangTimeout&&
(this.refreshCancelCB=setTimeout(function(){e.hideRefresh()},this.refreshHangTimeout))}}},setRefreshContent:function(b){af(this.container).find(".afscroll_refresh").html(b)},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(b,a){c.is$(b)||(b=c(b));var d,e;"bottom"==a?(d=b.offset(),d=d.top-this.afEl.offset().bottom+
d.height,d+=4):(d=b.offset().top,d-=document.body.scrollTop,e=this.afEl.offset().top,document.body.scrollTop<e&&(d-=e),d-=4);this.scrollBy({y:d,x:0},0)},setPaddings:function(b,a){var d=c(this.el),e=numOnly(d.css("paddingTop"));d.css("paddingTop",b+"px").css("paddingBottom",a+"px");this.scrollBy({y:b-e,x:0})},divide:function(b,c){return 0!==c?b/c:0},isEnabled:function(){return this.eventsActive},addInfinite:function(){this.infinite=!0},clearInfinite:function(){this.infiniteTriggered=!1;this.scrollSkip=
!0},scrollTo:function(b,c){return this._scrollTo(b,c)}};d=function(b,a){this.init(b,a);this.container=this.el.parentNode;this.container.afScrollerId=b.afScrollerId;this.afEl=c(this.container);"hidden"!=this.container.style.overflow&&(this.container.style.overflow="hidden");this.addPullToRefresh(null,!0);this.autoEnable&&this.enable(!0);var d;this.verticalScroll&&(!0===this.verticalScroll&&!0===this.scrollBars)&&(d=g(5,20),d.style.top="0px",this.vScrollCSS&&(d.className=this.vScrollCSS),d.style.display=
"none",this.container.appendChild(d),this.vscrollBar=d);this.horizontalScroll&&(!0===this.horizontalScroll&&!0===this.scrollBars)&&(d=g(20,5),d.style.bottom="0px",this.hScrollCSS&&(d.className=this.hScrollCSS),d.style.display="none",this.container.appendChild(d),this.hscrollBar=d);this.horizontalScroll&&(this.el.style["float"]="left");this.el.hasScroller=!0};f=function(b,a){a.nativeParent&&(b=b.parentNode);this.init(b,a);var d=c(b);if(!0!==a.noParent){var e=d.parent();d.css("height",e.height()).css("width",
e.width());d.insertBefore(d.parent());e.remove()}this.container=this.el;d.css("-webkit-overflow-scrolling","touch");a.autoEnable&&this.enable()};f.prototype=new e;d.prototype=new e;f.prototype.defaultProperties=function(){this.refreshContainer=null;this.dX=this.cX=this.dY=this.cY=0;this.cancelPropagation=!1;this.loggedPcentX=this.loggedPcentY=0;var b=this;this.adjustScrollOverflowProxy_=function(){b.afEl.css("overflow","auto");b.afEl.parent().css("overflow","hidden")}};f.prototype.enable=function(b){this.eventsActive||
(this.eventsActive=!0,this.el.style.overflow="auto",this.el.parentNode.style.overflow="hidden",b||this.adjustScroll(),this.el.addEventListener("touchstart",this,!1),this.el.addEventListener("scroll",this,!1))};f.prototype.disable=function(b){this.eventsActive&&(this.logPos(this.el.scrollLeft,this.el.scrollTop),b||(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)};f.prototype.addPullToRefresh=function(b,c){this.el.removeEventListener("touchstart",this,!1);this.el.addEventListener("touchstart",this,!1);c||(this.refresh=!0);this.refresh&&!0===this.refresh&&(this.coreAddPullToRefresh(b),this.refreshContainer.style.position="absolute",this.refreshContainer.style.top="-60px",this.refreshContainer.style.height="60px",this.refreshContainer.style.display="block")};f.prototype.onTouchStart=function(b){0===this.el.scrollTop&&(this.el.scrollTop=
1);this.el.scrollTop===this.el.scrollHeight-this.el.clientHeight&&(this.el.scrollTop-=1);this.horizontalScroll&&(0===this.el.scrollLeft&&(this.el.scrollLeft=1),this.el.scrollLeft===this.el.scrollWidth-this.el.clientWidth&&(this.el.scrollLeft-=1));this.refreshCancelCB&&clearTimeout(this.refreshCancelCB);this.el.addEventListener("touchmove",this,!1);this.dY=b.touches[0].pageY;(this.refresh||this.infinite)&&this.refresh&&0>this.dY&&this.showRefresh()};f.prototype.onTouchMove=function(b){var a=b.touches[0].pageY-
this.dY,d=b.touches[0].pageX-this.dX;this.hasVertScroll&&this.el.clientHeight==this.el.scrollHeight&&b.preventDefault();this.hasHorScroll&&this.el.clientWidth==this.el.scrollWidth&&b.preventDefault();this.moved||(c.trigger(this,"scrollstart",[this.el]),c.trigger(c.touchLayer,"scrollstart",[this.el]),this.el.addEventListener("touchend",this,!1),this.moved=!0);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"),c.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"),c.trigger(this,"refresh-cancel"));
this.cY=a;this.cX=d};f.prototype.showRefresh=function(){this.refreshTriggered||(this.refreshTriggered=!0,this.setRefreshContent("Release to Refresh"),c.trigger(this,"refresh-trigger"))};f.prototype.onTouchEnd=function(b){b=this.el.scrollTop<=-this.refreshHeight;this.fireRefreshRelease(b,!0);b&&this.refresh&&(this.refreshContainer.style.position="relative",this.refreshContainer.style.top="0px");this.dY=this.cY=0;this.el.removeEventListener("touchmove",this,!1);this.el.removeEventListener("touchend",
this,!1);this.infiniteEndCheck=!0;this.infinite&&(!this.infiniteTriggered&&Math.abs(this.el.scrollTop)>=this.el.scrollHeight-this.el.clientHeight)&&(this.infiniteTriggered=!0,c.trigger(this,"infinite-scroll"),this.infiniteEndCheck=!0);this.touchEndFired=!0;var a=this,d=this.el.scrollTop,e=this.el.scrollLeft,f=0;a.nativePolling=setInterval(function(){f++;if(200<=f)clearInterval(a.nativePolling);else if(a.el.scrollTop!=d||a.el.scrollLeft!=e)clearInterval(a.nativePolling),c.trigger(c.touchLayer,"scrollend",
[a.el]),c.trigger(a,"scrollend",[a.el])},20)};f.prototype.hideRefresh=function(b){if(!this.preventHideRefresh){var a=this,d=function(b){a.refreshContainer.style.top="-60px";a.refreshContainer.style.position="absolute";a.dY=a.cY=0;b||(a.el.style[c.feat.cssPrefix+"Transform"]="none",a.el.style[c.feat.cssPrefix+"TransitionProperty"]="none",a.el.scrollTop=0,a.logPos(a.el.scrollLeft,0),a.refreshRunning=!1,a.setRefreshContent("Pull to Refresh"),c.trigger(a,"refresh-finish"))};!1===b||!a.afEl.css3Animate?
d():a.afEl.css3Animate({y:a.el.scrollTop-a.refreshHeight+"px",x:"0%",time:"325ms",complete:d});this.refreshTriggered=!1}};f.prototype.hideScrollbars=function(){};f.prototype.scrollTo=function(b,c){this.logPos(b.x,b.y);b.x*=-1;b.y*=-1;return this._scrollTo(b,c)};f.prototype.scrollBy=function(b,c){b.x+=this.el.scrollLeft;b.y+=this.el.scrollTop;this.logPos(this.el.scrollLeft,this.el.scrollTop);return this._scrollTo(b,c)};f.prototype.scrollToBottom=function(b){this._scrollToBottom(b);this.logPos(this.el.scrollLeft,
this.el.scrollTop)};f.prototype.onScroll=function(b){this.infinite&&this.touchEndFired?this.touchEndFired=!1:this.scrollSkip?this.scrollSkip=!1:(this.infinite&&(!this.infiniteTriggered&&Math.abs(this.el.scrollTop)>=this.el.scrollHeight-this.el.clientHeight)&&(this.infiniteTriggered=!0,c.trigger(this,"infinite-scroll"),this.infiniteEndCheck=!0),this.infinite&&(this.infiniteEndCheck&&this.infiniteTriggered)&&(this.infiniteEndCheck=!1,c.trigger(this,"infinite-scroll-end")))};f.prototype.logPos=function(b,
c){this.loggedPcentX=this.divide(b,this.el.scrollWidth);this.loggedPcentY=this.divide(c,this.el.scrollHeight);this.scrollLeft=b;this.scrollTop=c;isNaN(this.loggedPcentX)&&(this.loggedPcentX=0);isNaN(this.loggedPcentY)&&(this.loggedPcentY=0)};f.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)};d.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.loggedPcentX=this.loggedPcentY=0};d.prototype.enable=
function(b){this.eventsActive||(this.eventsActive=!0,b?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))};d.prototype.adjustScroll=function(){var b=this.getViewportSize();this.scrollerMoveCSS({x:Math.round(this.loggedPcentX*(this.el.clientWidth-b.w)),y:Math.round(this.loggedPcentY*(this.el.clientHeight-b.h))},0)};d.prototype.disable=function(){if(this.eventsActive){var b=
this.getCSSMatrix(this.el);this.logPos(numOnly(b.e)-numOnly(this.container.scrollLeft),numOnly(b.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}};d.prototype.addPullToRefresh=function(b,c){c||(this.refresh=!0);this.refresh&&!0===this.refresh&&(this.coreAddPullToRefresh(b),this.el.style.overflow="visible")};d.prototype.hideScrollbars=
function(){this.hscrollBar&&(this.hscrollBar.style.display="none",this.hscrollBar.style[c.feat.cssPrefix+"TransitionDuration"]="0ms");this.vscrollBar&&(this.vscrollBar.style.display="none",this.vscrollBar.style[c.feat.cssPrefix+"TransitionDuration"]="0ms")};d.prototype.getViewportSize=function(){var b=window.getComputedStyle(this.container);isNaN(numOnly(b.paddingTop))&&alert(typeof b.paddingTop+"::"+b.paddingTop+":");return{h:this.container.clientHeight>window.innerHeight?window.innerHeight:this.container.clientHeight-
numOnly(b.paddingTop)-numOnly(b.paddingBottom),w:this.container.clientWidth>window.innerWidth?window.innerWidth:this.container.clientWidth-numOnly(b.paddingLeft)-numOnly(b.paddingRight)}};d.prototype.onTouchStart=function(b){this.moved=!1;this.currentScrollingObject=null;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))){if(b.touches[0].target&&
void 0!==b.touches[0].target.type){var a=b.touches[0].target.tagName.toLowerCase();b.touches[0].target.type.toLowerCase();if("select"==a)return}a={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 d=this.getViewportSize();this.elementInfo.bottomMargin=d.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=d.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);a.top=numOnly(b.f)-numOnly(this.container.scrollTop);a.left=numOnly(b.e)-numOnly(this.container.scrollLeft);this.container.scrollTop=this.container.scrollLeft=0;this.currentScrollingObject=this.el;this.refresh&&0===a.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>a.top&&(this.preventPullToRefresh=!0,this.refresh&&(this.refreshContainer.style.overflow="hidden"));a.x=a.left;a.y=a.top;this.setVScrollBar(a,0,0)&&(this.vscrollBar.style.right="0px",this.vscrollBar.style[c.feat.cssPrefix+"Transition"]="");this.setHScrollBar(a,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[c.feat.cssPrefix+"Transition"]="");this.lastScrollInfo=a;this.hasMoved=!1;0==this.elementInfo.maxTop&&0==this.elementInfo.maxLeft?this.currentScrollingObject=null:this.scrollerMoveCSS(this.lastScrollInfo,0)}};d.prototype.getCSSMatrix=function(b){if(this.androidFormsMode){var a=parseInt(b.style.marginTop,10);b=parseInt(b.style.marginLeft,10);isNaN(a)&&(a=0);isNaN(b)&&(b=0);return{f:a,e:b}}return c.getCssMatrix(b)};d.prototype.saveEventInfo=
function(b){this.lastEventInfo={pageX:b.touches[0].pageX,pageY:b.touches[0].pageY,time:b.timeStamp}};d.prototype.saveFirstEventInfo=function(b){this.firstEventInfo={pageX:b.touches[0].pageX,pageY:b.touches[0].pageY,time:b.timeStamp}};d.prototype.setVScrollBar=function(b,a,c){if(!this.elementInfo.requiresVScrollBar)return!1;var d=parseFloat(this.elementInfo.bottomMargin/this.elementInfo.divHeight)*this.elementInfo.bottomMargin+"px";numOnly(d)>this.elementInfo.bottomMargin&&(d=this.elementInfo.bottomMargin+
"px");d!=this.vscrollBar.style.height&&(this.vscrollBar.style.height=d);b=this.elementInfo.bottomMargin-numOnly(this.vscrollBar.style.height)-(this.elementInfo.maxTop+b.y)/this.elementInfo.maxTop*(this.elementInfo.bottomMargin-numOnly(this.vscrollBar.style.height));b>this.elementInfo.bottomMargin&&(b=this.elementInfo.bottomMargin);0>b&&(b=0);this.scrollbarMoveCSS(this.vscrollBar,{x:0,y:b},a,c);return!0};d.prototype.setHScrollBar=function(b,a,c){if(!this.elementInfo.requiresHScrollBar)return!1;var d=
parseFloat(this.elementInfo.rightMargin/this.elementInfo.divWidth)*this.elementInfo.rightMargin+"px";d!=this.hscrollBar.style.width&&(this.hscrollBar.style.width=d);b=this.elementInfo.rightMargin-numOnly(this.hscrollBar.style.width)-(this.elementInfo.maxLeft+b.x)/this.elementInfo.maxLeft*(this.elementInfo.rightMargin-numOnly(this.hscrollBar.style.width));b>this.elementInfo.rightMargin&&(b=this.elementInfo.rightMargin);0>b&&(b=0);this.scrollbarMoveCSS(this.hscrollBar,{x:b,y:0},a,c);return!0};d.prototype.onTouchMove=
function(b){if(null!==this.currentScrollingObject){var a=this.calculateMovement(b);this.calculateTarget(a);this.lastScrollInfo=a;this.moved||(c.trigger(this,"scrollstart"),c.trigger(c.touchLayer,"scrollstart",[this.el]),this.elementInfo.requiresVScrollBar&&(this.vscrollBar.style.display="block"),this.elementInfo.requiresHScrollBar&&(this.hscrollBar.style.display="block"));this.moved=!0;this.refresh&&0===a.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>a.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 d=this.lastScrollInfo.y<-this.elementInfo.maxTop&&0>this.lastScrollInfo.deltaY;if(b||d){a=b?this.lastScrollInfo.y:-this.lastScrollInfo.y-this.elementInfo.maxTop;a=(this.container.clientHeight-a)/this.container.clientHeight;0.5>a&&(a=0.5);var e=0;b&&0<this.lastScrollInfo.top||d&&this.lastScrollInfo.top<
-this.elementInfo.maxTop?e=this.lastScrollInfo.top:d&&(e=-this.elementInfo.maxTop);d=this.lastScrollInfo.deltaY*a;1>Math.abs(this.lastScrollInfo.deltaY*a)&&(d=b?1:-1);this.lastScrollInfo.y=e+d}if(this.elementInfo.hasHorScroll&&(b=0<this.lastScrollInfo.x&&0<this.lastScrollInfo.deltaX,d=this.lastScrollInfo.x<-this.elementInfo.maxLeft&&0>this.lastScrollInfo.deltaX,b||d))a=b?this.lastScrollInfo.x:-this.lastScrollInfo.x-this.elementInfo.maxLeft,a=(this.container.clientWidth-a)/this.container.clientWidth,
0.5>a&&(a=0.5),e=0,b&&0<this.lastScrollInfo.left||d&&this.lastScrollInfo.left<-this.elementInfo.maxLeft?e=this.lastScrollInfo.left:d&&(e=-this.elementInfo.maxLeft),d=this.lastScrollInfo.deltaX*a,1>Math.abs(this.lastScrollInfo.deltaX*a)&&(d=b?1:-1),this.lastScrollInfo.x=e+d;this.lockBounce&&(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"),c.trigger(this,"refresh-trigger")):this.refreshTriggered&&this.lastScrollInfo.top<this.refreshHeight&&(this.refreshTriggered=
!1,this.setRefreshContent("Pull to Refresh"),c.trigger(this,"refresh-cancel")));this.infinite&&!this.infiniteTriggered&&Math.abs(this.lastScrollInfo.top)>this.el.clientHeight-this.container.clientHeight&&(this.infiniteTriggered=!0,c.trigger(this,"infinite-scroll"))}};d.prototype.calculateMovement=function(b,a){var c={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},d=a?this.firstEventInfo:this.lastEventInfo,e=a?b.pageX:b.touches[0].pageX,
f=a?b.pageY:b.touches[0].pageY,g=a?b.time:b.timeStamp;c.deltaY=this.elementInfo.hasVertScroll?f-d.pageY:0;c.deltaX=this.elementInfo.hasHorScroll?e-d.pageX:0;c.time=g;c.duration=g-d.time;return c};d.prototype.calculateTarget=function(b){b.y=this.lastScrollInfo.y+b.deltaY;b.x=this.lastScrollInfo.x+b.deltaX};d.prototype.checkYboundary=function(b){var a=this.container.clientHeight/2,c=this.elementInfo.maxTop+a;if(b.y>a)b.y=a;else if(-b.y>c)b.y=-c;else return;this.recalculateDeltaY(b)};d.prototype.checkXboundary=
function(b){var a=this.container.clientWidth/2,c=this.elementInfo.maxLeft+a;if(b.x>a)b.x=a;else if(-b.x>c)b.x=-c;else return;this.recalculateDeltaX(b)};d.prototype.recalculateDeltaY=function(b){var a=Math.abs(b.deltaY);b.deltaY=b.y-b.top;newAbsDeltaY=Math.abs(b.deltaY);b.duration=b.duration*newAbsDeltaY/a};d.prototype.recalculateDeltaX=function(b){var a=Math.abs(b.deltaX);b.deltaX=b.x-b.left;newAbsDeltaX=Math.abs(b.deltaX);b.duration=b.duration*newAbsDeltaX/a};d.prototype.hideRefresh=function(b){if(!this.preventHideRefresh){var a=
this,d=function(){a.setRefreshContent("Pull to Refresh");c.trigger(a,"refresh-finish")};this.scrollerMoveCSS({x:0,y:0},325);!1===b||!a.afEl.css3Animate?d():a.afEl.css3Animate({time:"325ms",complete:d});this.refreshTriggered=!1}};d.prototype.setMomentum=function(b){b.speedY=this.divide(b.deltaY,b.duration);b.speedX=this.divide(b.deltaX,b.duration);b.absSpeedY=Math.abs(b.speedY);b.absSpeedX=Math.abs(b.speedX);b.absDeltaY=Math.abs(b.deltaY);b.absDeltaX=Math.abs(b.deltaX);if(0<b.absDeltaY){if(b.deltaY=
(0>b.deltaY?-1:1)*b.absSpeedY*b.absSpeedY/0.0024,b.absDeltaY=Math.abs(b.deltaY),b.duration=b.absSpeedY/0.0012,b.speedY=b.deltaY/b.duration,b.absSpeedY=Math.abs(b.speedY),0.12>b.absSpeedY||5>b.absDeltaY)b.deltaY=b.absDeltaY=b.duration=b.speedY=b.absSpeedY=0}else if(b.absDeltaX){if(b.deltaX=(0>b.deltaX?-1:1)*b.absSpeedX*b.absSpeedX/0.0024,b.absDeltaX=Math.abs(b.deltaX),b.duration=b.absSpeedX/0.0012,b.speedX=b.deltaX/b.duration,b.absSpeedX=Math.abs(b.speedX),0.12>b.absSpeedX||5>b.absDeltaX)b.deltaX=
b.absDeltaX=b.duration=b.speedX=b.absSpeedX=0}else b.duration=0};d.prototype.onTouchEnd=function(b){if(null!==this.currentScrollingObject&&this.moved){this.finishScrollingObject=this.currentScrollingObject;this.currentScrollingObject=null;b=this.calculateMovement(this.lastEventInfo,!0);this.androidFormsMode||this.setMomentum(b);this.calculateTarget(b);var a=this.getCSSMatrix(this.el);b.top=numOnly(a.f);b.left=numOnly(a.e);this.checkYboundary(b);this.elementInfo.hasHorScroll&&this.checkXboundary(b);
a=!this.preventPullToRefresh&&(b.top>this.refreshHeight||b.y>this.refreshHeight);this.fireRefreshRelease(a,0<b.top);if(this.refresh&&a)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&&(b.duration=325);else if(-b.x>this.elementInfo.maxLeft||0===this.elementInfo.maxLeft)b.x=
-this.elementInfo.maxLeft,-b.left>this.elementInfo.maxLeft&&(b.duration=325);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);this.infinite&&!this.infiniteTriggered&&Math.abs(b.y)>=this.el.clientHeight-this.container.clientHeight&&(this.infiniteTriggered=!0,c.trigger(this,"infinite-scroll"))}};
d.prototype.setFinishCalback=function(b){var a=this;this.scrollingFinishCB=setTimeout(function(){a.hideScrollbars();c.trigger(c.touchLayer,"scrollend",[a.el]);c.trigger(a,"scrollend",[a.el]);a.isScrolling=!1;a.elementInfo=null;a.infinite&&c.trigger(a,"infinite-scroll-end")},b)};d.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[c.feat.cssPrefix+"Transform"]="none";this.el.style[c.feat.cssPrefix+
"Transition"]="none";this.el.style[c.feat.cssPrefix+"Perspective"]="none";this.scrollerMoveCSS({x:numOnly(b.e),y:numOnly(b.f)},0);this.container.style[c.feat.cssPrefix+"Perspective"]="none";this.container.style[c.feat.cssPrefix+"BackfaceVisibility"]="visible";this.vscrollBar&&(this.vscrollBar.style[c.feat.cssPrefix+"Transform"]="none",this.vscrollBar.style[c.feat.cssPrefix+"Transition"]="none",this.vscrollBar.style[c.feat.cssPrefix+"Perspective"]="none",this.vscrollBar.style[c.feat.cssPrefix+"BackfaceVisibility"]=
"visible");this.hscrollBar&&(this.hscrollBar.style[c.feat.cssPrefix+"Transform"]="none",this.hscrollBar.style[c.feat.cssPrefix+"Transition"]="none",this.hscrollBar.style[c.feat.cssPrefix+"Perspective"]="none",this.hscrollBar.style[c.feat.cssPrefix+"BackfaceVisibility"]="visible")}};d.prototype.stopFormsMode=function(){if(!this.blockFormsFix){var b=this.getCSSMatrix(this.el);this.refresh=this.refreshSafeKeep;this.androidFormsMode=!1;this.el.style[c.feat.cssPrefix+"Perspective"]=1E3;this.el.style.marginTop=
0;this.el.style.marginLeft=0;this.el.style[c.feat.cssPrefix+"Transition"]="0ms linear";this.scrollerMoveCSS({x:numOnly(b.e),y:numOnly(b.f)},0);this.container.style[c.feat.cssPrefix+"Perspective"]=1E3;this.container.style[c.feat.cssPrefix+"BackfaceVisibility"]="hidden";this.vscrollBar&&(this.vscrollBar.style[c.feat.cssPrefix+"Perspective"]=1E3,this.vscrollBar.style[c.feat.cssPrefix+"BackfaceVisibility"]="hidden");this.hscrollBar&&(this.hscrollBar.style[c.feat.cssPrefix+"Perspective"]=1E3,this.hscrollBar.style[c.feat.cssPrefix+
"BackfaceVisibility"]="hidden")}};d.prototype.scrollerMoveCSS=function(b,d,e){d||(d=0);e||(e="linear");d=numOnly(d);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"):(this.el.style[c.feat.cssPrefix+"Transform"]="translate"+r+b.x+"px,"+b.y+"px"+a,this.el.style[c.feat.cssPrefix+"TransitionDuration"]=d+"ms",this.el.style[c.feat.cssPrefix+"TransitionTimingFunction"]=e)),this.logPos(b.x,b.y))};
d.prototype.logPos=function(b,a){var c;c=this.elementInfo?{h:this.elementInfo.bottomMargin,w:this.elementInfo.rightMargin}:this.getViewportSize();this.loggedPcentX=this.divide(b,this.el.clientWidth-c.w);this.loggedPcentY=this.divide(a,this.el.clientHeight-c.h);this.scrollTop=a;this.scrollLeft=b};d.prototype.scrollbarMoveCSS=function(b,d,e,f){e||(e=0);f||(f="linear");b&&b.style&&(this.androidFormsMode?(b.style.marginTop=Math.round(d.y)+"px",b.style.marginLeft=Math.round(d.x)+"px"):(b.style[c.feat.cssPrefix+
"Transform"]="translate"+r+d.x+"px,"+d.y+"px"+a,b.style[c.feat.cssPrefix+"TransitionDuration"]=e+"ms",b.style[c.feat.cssPrefix+"TransitionTimingFunction"]=f))};d.prototype.scrollTo=function(b,a){a||(a=0);this.scrollerMoveCSS(b,a)};d.prototype.scrollBy=function(b,a){var c=this.getCSSMatrix(this.el),d=numOnly(c.f),c=numOnly(c.e);this.scrollTo({y:d-b.y,x:c-b.x},a)};d.prototype.scrollToBottom=function(b){this.scrollTo({y:-1*(this.el.clientHeight-this.container.clientHeight),x:0},b)};d.prototype.scrollToTop=
function(b){this.scrollTo({x:0,y:0},b)};return function(b,a){var g;if(!k&&c.touchLayer&&c.isObject(c.touchLayer))n();else if(!c.touchLayer||!c.isObject(c.touchLayer))c.touchLayer={};if(g="string"==typeof b||b instanceof String?document.getElementById(b):b)return af.os.desktop?new e(g,a):a.useJsScroll?new d(g,a):new f(g,a);alert("Could not find element for scroller "+b)}}()})(af);
(function(c){c.fn.popup=function(c){return new l(this[0],c)};var n=[],l=function(){var g=function(g,k){if(this.container="string"===typeof g||g instanceof String?document.getElementById(g):g)try{if("string"===typeof k||"number"===typeof k)k={message:k,cancelOnly:"true",cancelText:"OK"};this.id=id=k.id=k.id||c.uuid();this.addCssClass=k.addCssClass?k.addCssClass:"";this.title=k.suppressTitle?"":k.title||"Alert";this.message=k.message||"";this.cancelText=k.cancelText||"Cancel";this.cancelCallback=k.cancelCallback||
function(){};this.cancelClass=k.cancelClass||"button";this.doneText=k.doneText||"Done";this.doneCallback=k.doneCallback||function(a){};this.doneClass=k.doneClass||"button";this.cancelOnly=k.cancelOnly||!1;this.onShow=k.onShow||function(){};this.autoCloseDone=void 0!==k.autoCloseDone?k.autoCloseDone:!0;n.push(this);1==n.length&&this.show()}catch(a){console.log("error adding popup "+a)}else 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,supressTitle:!1,show:function(){var g=this,k='<div id="'+this.id+'" class="afPopup hidden '+this.addCssClass+'"><header>'+this.title+"</header><div>"+this.message+'</div><footer style="clear:both;"><a href="javascript:;" class="'+this.cancelClass+'" id="cancel">'+this.cancelText+'</a><a href="javascript:;" class="'+this.doneClass+'" id="action">'+this.doneText+
"</a> </footer></div></div>";c(this.container).append(c(k));var a=c.query("#"+this.id);a.bind("close",function(){g.hide()});this.cancelOnly&&(a.find("A#action").hide(),a.find("A#cancel").addClass("center"));a.find("A").each(function(){var a=c(this);a.bind("click",function(c){"cancel"==a.attr("id")?(g.cancelCallback.call(g.cancelCallback,g),g.hide()):(g.doneCallback.call(g.doneCallback,g),g.autoCloseDone&&g.hide());c.preventDefault()})});g.positionPopup();c.blockUI(0.5);a.bind("orientationchange",
function(){g.positionPopup()});a.find("header").show();a.find("footer").show();setTimeout(function(){a.removeClass("hidden");g.onShow(g)},50)},hide:function(){var g=this;c.query("#"+g.id).addClass("hidden");c.unblockUI();!c.os.ie&&!c.os.android?setTimeout(function(){g.remove()},250):g.remove()},remove:function(){var g=c.query("#"+this.id);g.unbind("close");g.find("BUTTON#action").unbind("click");g.find("BUTTON#cancel").unbind("click");g.unbind("orientationchange").remove();n.splice(0,1);0<n.length&&
n[0].show()},positionPopup:function(){var g=c.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}(),k=!1;c.blockUI=function(g){k||(g=g?" style='opacity:"+g+";'":"",c.query("BODY").prepend(c("<div id='mask'"+g+"></div>")),c.query("BODY DIV#mask").bind("touchstart",function(c){c.preventDefault()}),c.query("BODY DIV#mask").bind("touchmove",function(c){c.preventDefault()}),k=!0)};c.unblockUI=
function(){k=!1;c.query("BODY DIV#mask").unbind("touchstart");c.query("BODY DIV#mask").unbind("touchmove");c("BODY DIV#mask").remove()}})(af);
(function(c){c.fn.actionsheet=function(c){for(var k,g=0;g<this.length;g++)k=new n(this[g],c);return 1==this.length?k:this};var n=function(){var l=function(k,g){if(this.el="string"==typeof k||k instanceof String?document.getElementById(k):k){if(this instanceof l){if("object"==typeof g)for(var q in g)this[q]=g[q]}else return new l(k,g);var n=this,a;if("string"==typeof g)a=c('<div id="af_actionsheet"><div style="width:100%">'+g+"<a href='javascript:;' class='cancel'>Cancel</a></div></div>");else if("object"==
typeof g){a=c('<div id="af_actionsheet"><div style="width:100%"></div></div>');q=c(a.children().get(0));g.push({text:"Cancel",cssClasses:"cancel"});for(var d=0;d<g.length;d++){var f=c('<a href="javascript:;" >'+(g[d].text||"TEXT NOT ENTERED")+"</a>");f[0].onclick=g[d].handler||function(){};g[d].cssClasses&&0<g[d].cssClasses.length&&f.addClass(g[d].cssClasses);q.append(f)}}c(k).find("#af_actionsheet").remove();c(k).find("#af_action_mask").remove();actionsheetEl=c(k).append(a);a.vendorCss("Transition",
"all 0ms");a.cssTranslate("0,0");a.css("top",window.innerHeight+"px");this.el.style.overflow="hidden";a.on("click","a",function(){n.hideSheet();return!1});this.activeSheet=a;c(k).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(){a.vendorCss("Transition","all 300ms");a.cssTranslate("0,"+-a.height()+"px")},10)}else alert("Could not find element for actionsheet "+k)};l.prototype={activeSheet:null,
hideSheet:function(){var k=this;this.activeSheet.off("click","a",function(){k.hideSheet()});c(this.el).find("#af_action_mask").remove();this.activeSheet.vendorCss("Transition","all 0ms");var g=this.activeSheet,l=this.el;setTimeout(function(){g.vendorCss("Transition","all 300ms");g.cssTranslate("0,0px");setTimeout(function(){g.remove();g=null;l.style.overflow="none"},500)},10)}};return l}()})(af);
(function(c){c.passwordBox=function(){return new n};var n=function(){this.oldPasswords={}};n.prototype={showPasswordPlainText:!1,getOldPasswords:function(l){var k=l&&document.getElementById(l)?document.getElementById(l):document;if(k){l=k.getElementsByTagName("input");for(k=0;k<l.length;k++)"password"==l[k].type&&c.os.webkit&&(l[k].type="text",c(l[k]).vendorCss("TextSecurity","disc"))}else alert("Could not find container element for passwordBox "+l)},changePasswordVisiblity:function(l,k){l=parseInt(l,
10);var g=document.getElementById(k);1==l?c(g).vendorCss("TextSecurity","none"):c(g).vendorCss("TextSecurity","disc");c.os.webkit||(g.type=1==l?"text":"password")}}})(af);
(function(c){function n(g,k,l){!0===l&&(this.getAttribute("multiple")||c.selectBox.updateMaskValue(this.parentNode.id,this.text,this.value),this.parentNode.value=this.value);return l}function l(g,k,l){this.options[l]&&(this.getAttribute("multiple")||c.selectBox.updateMaskValue(this.linker,this.options[l].value,this.options[l].text),this.value=this.options[l].value);return l}function k(g){var k=g.target;c(k.linker).remove();delete k.linker;g.stopPropagation()}c.selectBox={scroller:null,currLinker:null,
getOldSelects:function(g){if(c.os.android&&!c.os.androidICS)if(c.fn.scroller){var q=g&&document.getElementById(g)?document.getElementById(g):document;if(q){g=q.getElementsByTagName("select");for(q=0;q<g.length;q++){var r=g[q];r.style.display="none";var a=c.create("div",{className:"afFakeSelect"});a.get(0).linker=g[q];r.linker=a.get(0);a.insertAfter(g[q]);r.watch("selectedIndex",l);for(var d=0;d<r.options.length;d++)r.options[d].watch("selected",n),r.options[d].selected&&a.html(r.options[d].text);
c(r).one("destroy",k)}this.createHtml()}else alert("Could not find container element for af.selectBox "+g)}else alert("This library requires af.scroller")},updateDropdown:function(c){if(c)for(var k=0;k<c.options.length;k++)c.options[k].selected&&(c.linker.innerHTML=c.options[k].text)},initDropDown:function(g){if(!g.disabled&&g&&g.options&&0!==g.options.length){var k=0,l=c("#afSelectBoxfix");l.html("<ul></ul>");for(var l=l.find("ul"),a=0;a<g.options.length;a++){g.options[a].watch("selected",n);var d=
g.options[a].selected?"selected":"";d&&(k=a+1);d=c.create("li",{html:g.options[a].text,className:d});d.data("ind",a);l.append(d)}c("#afModalMask").show();try{if(0<k&&"multiple"!=g.getAttribute("multiple")){g=0;var f=numOnly(l.find("li").computedStyle("height")),e=numOnly(c("#afSelectBoxContainer").computedStyle("height"));k*f>=e&&(g=(k-1)*-f);this.scroller.scrollTo({x:0,y:g})}}catch(b){console.log("error init dropdown"+b)}k="block"==c("#afSelectClose").css("display")?numOnly(c("#afSelectClose").height()):
0;c("#afSelectWrapper").height(numOnly(c("#afSelectBoxContainer").height())-k+"px")}},updateMaskValue:function(g,k,l){c(g).html(l)},setDropDownValue:function(g,k){if(g){var l=c(g);k=parseInt(k,10);g.getAttribute("multiple")?(l=c("#afSelectBoxfix li:nth-child("+(k+1)+")"),l.hasClass("selected")?l.removeClass("selected"):l.addClass("selected")):(g.selectedIndex=k,l.find("option").prop("selected",!1),l.find("option:nth-child("+(k+1)+")").prop("selected",!0),this.scroller.scrollTo({x:0,y:0}),this.hideDropDown());
c(g).trigger("change")}},hideDropDown:function(){c("#afModalMask").hide();c("#afSelectBoxfix").html("")},createHtml:function(){var g=this;document.getElementById("afSelectBoxfix")||c(document).ready(function(){c(document).on("click",".afFakeSelect",function(a){this.linker.disabled||(g.currLinker=this,"multiple"==this.linker.getAttribute("multiple")?c("#afSelectClose").show():c("#afSelectClose").hide(),g.initDropDown(this.linker))});var k=c.create("div",{id:"afSelectBoxContainer"}),l=c.create("div",
{id:"afSelectBoxfix"}),a=c.create("div",{id:"afSelectWrapper"});a.css("position","relative");a.append(l);var l=c.create("div",{id:"afSelectClose",html:"<a id='afSelectDone'>Done</a> <a id='afSelectCancel'>Cancel</a>"}),d=c.create("div",{id:"afModalMask"}),f=c("#afui");k.prepend(l).append(a);d.append(k);0<f.length?f.append(d):document.body.appendChild(d.get(0));g.scroller=c.query("#afSelectBoxfix").scroller({scroller:!1,verticalScroll:!0,vScrollCSS:"jqselectscrollBarV"});c("#afModalMask").on("click",
function(a){0===c(a.target).closest("#afSelectBoxContainer").length&&g.hideDropDown()});c("#afSelectBoxfix").on("click","li",function(a){a=c(a.target);g.setDropDownValue(g.currLinker.linker,a.data("ind"))});c("#afSelectBoxContainer").on("click","a",function(a){if("afSelectCancel"==a.target.id)return g.hideDropDown();var b=c(g.currLinker.linker);b.find("option").prop("selected",!1);c("#afSelectBoxfix li").each(function(a){a=c(this);if(a.hasClass("selected")){var d=parseInt(a.data("ind"),10);b.find("option:nth-child("+
(d+1)+")").prop("selected",!0);g.currLinker.innerHTML=a.html()}});g.hideDropDown();a.stopPropagation();a.preventDefault();return!1})})}};HTMLElement.prototype.watch||(HTMLElement.prototype.watch=function(c,k){var l=this[c],a=l,d=function(){return a},f=function(d){l=a;return a=k.call(this,c,l,d)};delete this[c]&&(HTMLElement.defineProperty?HTMLElement.defineProperty(this,c,{get:d,set:f,enumerable:!1,configurable:!0}):HTMLElement.prototype.__defineGetter__&&HTMLElement.prototype.__defineSetter__&&(HTMLElement.prototype.__defineGetter__.call(this,
c,d),HTMLElement.prototype.__defineSetter__.call(this,c,f)))});HTMLElement.prototype.unwatch||(HTMLElement.prototype.unwatch=function(c){var k=this[c];delete this[c];this[c]=k})})(af);
(function(c){function n(a,c,f,e){var b=Math.abs(a-c),h=Math.abs(f-e);return b>=h?0<a-c?"Left":"Right":0<f-e?"Up":"Down"}function l(){k.last&&Date.now()-k.last>=q&&(k.el.trigger("longTap"),k={})}var k={},g,q=750,r;c(document).ready(function(){var a;c(document.body).bind("touchstart",function(d){d.originalEvent&&(d=d.originalEvent);if(d.touches&&0!==d.touches.length){var f=Date.now(),e=f-(k.last||f);d.touches&&0!==d.touches.length&&(k.el=c("tagName"in d.touches[0].target?d.touches[0].target:d.touches[0].target.parentNode),
g&&clearTimeout(g),k.x1=d.touches[0].pageX,k.y1=d.touches[0].pageY,k.x2=k.y2=0,0<e&&250>=e&&(k.isDoubleTap=!0),k.last=f,r=setTimeout(l,q),c.ui.useAutoPressed&&!k.el.data("ignore-pressed")&&k.el.addClass("pressed"),a&&(c.ui.useAutoPressed&&!a.data("ignore-pressed")&&a[0]!=k.el[0])&&a.removeClass("pressed"),a=k.el)}}).bind("touchmove",function(a){a.originalEvent&&(a=a.originalEvent);k.x2=a.touches[0].pageX;k.y2=a.touches[0].pageY;clearTimeout(r)}).bind("touchend",function(a){a.originalEvent&&(a=a.originalEvent);
k.el&&(c.ui.useAutoPressed&&!k.el.data("ignore-pressed")&&k.el.removeClass("pressed"),k.isDoubleTap?(k.el.trigger("doubleTap"),k={}):0<k.x2||0<k.y2?((30<Math.abs(k.x1-k.x2)||30<Math.abs(k.y1-k.y2))&&k.el.trigger("swipe")&&k.el.trigger("swipe"+n(k.x1,k.x2,k.y1,k.y2)),k.x1=k.x2=k.y1=k.y2=k.last=0):"last"in k&&(k.el.trigger("tap"),g=setTimeout(function(){g=null;k.el&&k.el.trigger("singleTap");k={}},250)))}).bind("touchcancel",function(){k.el&&(c.ui.useAutoPressed&&!k.el.data("ignore-pressed"))&&k.el.removeClass("pressed");
k={};clearTimeout(r)})});"swipe swipeLeft swipeRight swipeUp swipeDown doubleTap tap singleTap longTap".split(" ").forEach(function(a){c.fn[a]=function(c){return this.bind(a,c)}})})(jq);
(function(c){c.touchLayer=function(a){c.touchLayer=new f(a);return c.touchLayer};var n=["input","select","textarea"],l=["button","radio","checkbox","range","date"],k=c.os.ios,g=c.os.blackberry,q=c.os.blackberry||c.os.fennec||c.os.android&&!c.os.chrome,r=c.os.ios&&!c.os.ios7,a=!1,d=!1,f=function(a){this.clearTouchVars();a.addEventListener("touchstart",this,!1);a.addEventListener("touchmove",this,!1);a.addEventListener("touchend",this,!1);a.addEventListener("click",this,!1);a.addEventListener("focusin",
this,!1);document.addEventListener("scroll",this,!1);window.addEventListener("resize",this,!1);window.addEventListener("orientationchange",this,!1);this.layer=a;this.scrollEndedProxy_=c.proxy(this.scrollEnded,this);this.exitEditProxy_=c.proxy(this.exitExit,this,[]);this.launchFixUIProxy_=c.proxy(this.launchFixUI,this);var b=this;this.scrollTimeoutExpireProxy_=function(){b.scrollTimeout_=null;b.scrollTimeoutEl_.addEventListener("scroll",b.scrollEndedProxy_,!1)};this.retestAndFixUIProxy_=function(){af.os.android&&
(b.layer.style.height="100%");c.asap(b.testAndFixUI,b,arguments)};document.addEventListener("click",function(a){if(d)return a.preventDefault(),a.stopPropagation(),!1;void 0!==a.clientX&&null!=b.lastTouchStartX&&(2>Math.abs(b.lastTouchStartX-a.clientX)&&2>Math.abs(b.lastTouchStartY-a.clientY))&&(a.preventDefault(),a.stopPropagation())},!0);c.bind(this,"scrollstart",function(a){b.isScrolling=!0;b.scrollingEl_=a;c.feat.nativeTouchScroll||(b.scrollerIsScrolling=!0);b.fireEvent("UIEvents","scrollstart",
a,!1,!1)});c.bind(this,"scrollend",function(a){b.isScrolling=!1;c.feat.nativeTouchScroll||(b.scrollerIsScrolling=!1);b.fireEvent("UIEvents","scrollend",a,!1,!1)});this.launchFixUI(5)};f.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(a,b){var c=this.getReferenceHeight(),d=this.getCurrentHeight();if(c!=d&&!(0.97*d<c&&0.97*c<d))return this.hideAddressBar(a,
b),!0;af.os.android&&this.resetFixUI();return!1},hideAddressBar:function(a,b){if(!af.ui||!af.ui.isIntel)if(a>=b)this.resetFixUI();else if(af.os.desktop||af.os.chrome)this.layer.style.height="100%";else if(af.os.android){window.scrollTo(1,1);this.layer.style.height=this.isFocused_||window.innerHeight>window.outerHeight?window.innerHeight+"px":window.outerHeight/window.devicePixelRatio+"px";that=this;var c=a+1;this.reHideAddressBarTimeout_=setTimeout(this.retestAndFixUIProxy_,250*c,[c,b])}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 af.os.android?Math.ceil(window.outerHeight/window.devicePixelRatio):window.innerHeight},getCurrentHeight:function(){return af.os.android?window.innerHeight:numOnly(document.documentElement.style.height)},onOrientationChange:function(a){!this.holdingReshapeType_&&this.reshapeTimeout_?
this.fireReshapeEvent("orientationchange"):this.previewReshapeEvent("orientationchange")},onResize:function(a){this.ignoreNextResize_?this.ignoreNextResize_=!1:this.launchFixUI()&&this.reshapeAction()},onClick:function(a){var b=a.target&&void 0!==a.target.tagName?a.target.tagName.toLowerCase():"";if(-1!==n.indexOf(b)&&(!this.isFocused_||a.target!==this.focusedElement)){b=a.target&&void 0!==a.target.type?a.target.type.toLowerCase():"";if(-1===l.indexOf(b)){this.isFocused_&&this.focusedElement.removeEventListener("blur",
this,!1);this.focusedElement=a.target;this.focusedElement.addEventListener("blur",this,!1);if(!this.isFocused_&&!this.justBlurred_)if(c.trigger(this,"enter-edit",[a.target]),c.os.ios){var d=this;setTimeout(function(){d.fireReshapeEvent("enter-edit")},300)}else this.previewReshapeEvent("enter-edit");this.isFocused_=!0}else this.isFocused_=!1;this.justBlurred_=!1;this.allowDocumentScroll_=!0;k&&a.target.focus()}else c.os.blackberry10&&this.isFocused_&&this.focusedElement.blur()},previewReshapeEvent:function(a){that=
this;this.reshapeTimeout_=setTimeout(function(){that.fireReshapeEvent(a);that.reshapeTimeout_=null;that.holdingReshapeType_=null},750);this.holdingReshapeType_=a},fireReshapeEvent:function(a){c.trigger(this,"reshape");c.trigger(this,a?a+"-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(a){af.os.android&&a.target==window||(this.isFocused_=!1,this.focusedElement&&this.focusedElement.removeEventListener("blur",this,!1),this.focusedElement=null,this.justBlurred_=!0,c.asap(this.exitEditProxy_,this,[a.target]))},exitExit:function(a){this.justBlurred_=!1;if(!this.isFocused_)if(c.trigger(this,"exit-edit",[a]),this.allowDocumentScroll_=!1,c.os.ios){var b=this;setTimeout(function(){b.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(e){this.dX=e.touches[0].pageX;this.dY=e.touches[0].pageY;this.lastTimestamp=e.timeStamp;this.lastTouchStartX=this.lastTouchStartY=null;if(c.os.ios){if(a===e.touches[0].identifier)return d=!0,e.preventDefault(),!1;a=e.touches[0].identifier;d=!1}if(this.scrollerIsScrolling)return this.moved=!0,this.scrollerIsScrolling=
!1,e.preventDefault(),!1;this.trackingClick=!0;(r||c.feat.nativeTouchScroll)&&this.checkDOMTree(e.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(af.os.android&&e&&e.target&&e.target.getAttribute&&"ignore"==e.target.getAttribute("data-touchlayer")||this.isFocused_&&
!c.os.blackberry10)this.allowDocumentScroll_=this.requiresNativeTap=!0;else if(q&&e.target&&void 0!==e.target.tagName){var b=e.target.tagName.toLowerCase();-1!==n.indexOf(b)&&(this.requiresNativeTap=!0)}else e.target&&(void 0!==e.target.tagName&&"input"==e.target.tagName.toLowerCase()&&"range"==e.target.type)&&(this.requiresNativeTap=!0);!this.isPanning_&&!this.requiresNativeTap?(this.isScrolling&&!c.feat.nativeTouchScroll||!this.isScrolling)&&e.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(a,b){if(r&&this.panElementId==a.id)this.isPanning_=!0;else{if(c.feat.nativeTouchScroll){if(this.ignoreScrolling(a))return;var d=window.getComputedStyle(a);if(this.allowsVerticalScroll(a,d)){this.isScrollingVertical_=!0;this.scrollingEl_=a;this.isScrolling=!0;return}this.allowsHorizontalScroll(a,d)&&(this.isScrollingVertical_=
!1,this.scrollingEl_=null,this.isScrolling=!0)}a!=b&&a.parentNode&&this.checkDOMTree(a.parentNode,b)}},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(a){var b=this.moved;this.moved=!0;g&&(this.cY=a.touches[0].pageY-this.dY,this.cX=a.touches[0].pageX-this.dX);this.isPanning_||(this.isScrolling&&
(b||this.fireEvent("UIEvents","scrollstart",this.scrollingEl_,!1,!1),this.speedY=(this.lastY-a.touches[0].pageY)/(a.timeStamp-this.lastTimestamp),this.lastY=a.touches[0].pageY,this.lastX=a.touches[0].pageX,this.lastTimestamp=a.timeStamp),c.os.blackberry10||(!this.isScrolling||!c.feat.nativeTouchScroll)&&a.preventDefault())},onTouchEnd:function(a){var b=this.moved;g&&(b=b&&!(10>Math.abs(this.cX)&&10>Math.abs(this.cY)));if(!af.os.ios||!this.requiresNativeTap)this.allowDocumentScroll_=!1;if(this.isPanning_&&
b)this.wasPanning_=!0;else if(!b&&!this.requiresNativeTap){this.scrollerIsScrolling=!1;if(!this.trackingClick)return;a.preventDefault();!this.blockClicks&&!this.blockPossibleClick_&&(b=a.target,3==b.nodeType&&(b=b.parentNode),this.fireEvent("Event","click",b,!0,a.mouseToTouch,a.changedTouches[0]),this.lastTouchStartX=this.dX,this.lastTouchStartY=this.dY)}else b&&(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_||c.trigger(this,"cancel-enter-edit",[a.target])));c.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(a,b,d,f,g,k){var l=document.createEvent(a);l.initEvent(b,f,!0);
l.target=d;k&&c.each(k,function(a,b){l[a]=b});g&&(l.mouseToTouch=!0);d.dispatchEvent(l)}}})(af);
(function(c){var n=window.location.pathname+window.location.search,l=window.location.hash,k=l,g=function(){function a(e){"afui"===e.target.id&&(d(),c(document).unbind("DOMNodeInserted",a))}function d(){f.useOSThemes&&(c.os.android?c("#afui").addClass("android"):c.os.ie?(c("#afui").addClass("win8"),c("head").append(c.create("script",{src:"plugins/af.8tiles.js"}))):c.os.blackberry||c.os.blackberry10||c.os.playbook?(c("#afui").addClass("bb"),f.backButtonText="Back"):c.os.ios7?c("#afui").addClass("ios7"):
c.os.ios&&c("#afui").addClass("ios"));c.os.ios&&(c("head").find("#iosBlurrHack").remove(),c("head").append("<style id='iosBlurrHack'>#afui .panel > * {-webkit-backface-visibility: hidden;-webkit-perspective: 1000;}</style>"))}var f=this;this.availableTransitions={};this.availableTransitions["default"]=this.availableTransitions.none=this.noTransition;1===c("#afui").length?d():c(document).bind("DOMNodeInserted",a);if("intel"in window)document.addEventListener("intel.xdk.device.ready",function(){f.autoBoot()},
!0);else if("complete"==document.readyState||"loaded"==document.readyState)if(f.init)f.autoBoot();else c(window).one("afui:init",function(){f.autoBoot()});else c(document).ready(function(){if(f.init)f.autoBoot();else c(window).one("afui:init",function(){f.autoBoot()})},!1);"intel"in window||(window.intel={xdk:{}},window.intel.xdk.webRoot="");c(document).ready(function(){var a=document.getElementById("afui");if(null===a){a=document.createElement("div");a.id="afui";for(var b=document.body;b&&b.firstChild;)a.appendChild(b.firstChild);
c(document.body).prepend(a)}c.os.supportsTouch&&c.touchLayer(a);d()});window.addEventListener("popstate",function(){if(f.useInteralRouting){var a=f.getPanelId(document.location.hash);"#"!=document.location.href.replace(document.location.origin+"/","")&&(""===a&&1===f.history.length&&(a="#"+f.firstDiv.id),""!==a&&0!==af(a).filter(".panel").length&&a!="#"+f.activeDiv.id&&f.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,defaultMenu:"",_readyFunc:null,doingTransition:!1,passwordBox:c.passwordBox?new c.passwordBox:!1,selectBox:c.selectBox?c.selectBox:!1,ajaxUrl:"",transitionType:"slide",scrollingDivs:{},firstDiv:"",hasLaunched:!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",useInteralRouting:!0,autoBoot:function(){this.hasLaunched=!0;this.autoLaunch&&this.launch()},css3animate:function(a,d){a=c(a);return a.css3Animate(d)},setSideMenuWidth:function(a){this.sideMenuWidth=a;a=(a+"").replace("px","")+"px";c("head").find("#styleWidth").remove();c("head").append("<style id='styleWidth'>#afui #menu {width:"+
a+"  !important}</style>")},disableNativeScrolling:function(){c.feat.nativeTouchScroll=!1},manageHistory:!0,loadDefaultHash:!0,useAjaxCacheBuster:!1,actionsheet:function(a){return c.query("#afui").actionsheet(a)},popup:function(a){return c.query("#afui").popup(a)},blockUI:function(a){c.blockUI(a)},unblockUI:function(){c.unblockUI()},removeFooterMenu:function(){c.query("#navbar").hide();c.query("#content").css("bottom","0px");this.showNavMenu=!1},showNavMenu:!0,autoLaunch:!0,showBackbutton:!0,showBackButton:!0,
backButtonText:"",resetScrollers:!0,ready:function(a){if(this.launchCompleted)a();else c(document).on("afui:ready",function(c){a()})},setBackButtonStyle:function(a){c.query("#backButton").replaceClass(null,a)},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(a,
d,f,e){this.history.push({target:a,transition:f});try{this.manageHistory&&(window.history.pushState(d,d,n+"#"+d+e),c(window).trigger("hashchange",null,{newUrl:n+"#"+d+e,oldURL:n+a}))}catch(b){}},updateHash:function(a){if(this.manageHistory){k=a=-1==a.indexOf("#")?"#"+a:a;var d=window.location.hash,f=this.getPanelId(a).substring(1);try{window.history.replaceState(f,f,n+a),c(window).trigger("hashchange",null,{newUrl:n+a,oldUrl:n+d})}catch(e){}}},getPanelId:function(a){var c=a.indexOf("/");return-1==
c?a:a.substring(0,c)},updateBadge:function(a,d,f,e){void 0===f&&(f="");a=c(a);var b=a.find("span.af-badge");0===b.length?("absolute"!=a.css("position")&&a.css("position","relative"),b=c.create("span",{className:"af-badge "+f,html:d}),a.append(b)):b.html(d);b.removeClass("tl bl br tr");b.addClass(f);void 0===e&&(e="red");c.isObject(e)?b.css(e):e&&b.css("background",e);b.data("ignore-pressed","true")},removeBadge:function(a){c(a).find("span.af-badge").remove()},toggleNavMenu:function(a){if(this.showNavMenu)if("none"!=
c.query("#navbar").css("display")&&(void 0!==a&&!0!==a||void 0===a))c.query("#content").css("bottom","0px"),c.query("#navbar").hide();else if(void 0===a||void 0!==a&&!0===a)c.query("#navbar").show(),c.query("#content").css("bottom",c.query("#navbar").css("height"))},toggleHeaderMenu:function(a){if("none"!=c.query("#header").css("display")&&(void 0!==a&&!0!==a||void 0===a))c.query("#content").css("top","0px"),c.query("#header").hide();else if(void 0===a||void 0!==a&&!0===a)c.query("#header").show(),
c.query("#content").css("top",c.query("#header").css("height"))},toggleSideMenu:function(a,d,f){if(this.isSideMenuEnabled()&&!this.togglingSideMenu){var e=this,b=c.query("#menu"),h=c.query("#content,  #header, #navbar"),g=c.query(".afui_panel_mask");f=f||this.transitionTime;var k=this.isSideMenuOn();0===g.length&&window.innerWidth<c.ui.handheldMinWidth&&(h.append('<div class="afui_panel_mask"></div>'),g=c.query(".afui_panel_mask"),c(".afui_panel_mask").bind("click",function(){c.ui.toggleSideMenu(!1)}));
if(2===a||!k&&(void 0!==a&&!1!==a||void 0===a))this.togglingSideMenu=!0,b.show(),e.css3animate(h,{x:e.sideMenuWidth,time:f,complete:function(a){e.togglingSideMenu=!1;h.vendorCss("Transition","");d&&d(a);0!==g.length&&window.innerWidth<c.ui.handheldMinWidth&&g.show()}});else if(void 0===a||void 0!==a&&!1===a)this.togglingSideMenu=!0,e.css3animate(h,{x:"0px",time:f,complete:function(a){h.vendorCss("Transition","");h.vendorCss("Transform","");e.togglingSideMenu=!1;d&&d(a);b.hide();0!==g.length&&window.innerWidth<
c.ui.handheldMinWidth&&g.hide()}})}},disableSideMenu:function(){var a=c.query("#content, #header, #navbar");this.isSideMenuOn()?this.toggleSideMenu(!1,function(c){c||a.removeClass("hasMenu")}):a.removeClass("hasMenu");c.query("#menu").removeClass("tabletMenu")},enableSideMenu:function(){c.query("#content, #header, #navbar").addClass("hasMenu");c.query("#menu").addClass("tabletMenu")},isSideMenuEnabled:function(){return c.query("#content").hasClass("hasMenu")},isSideMenuOn:function(){var a=1<parseInt(c.getCssMatrix(c("#content")).e)?
!0:!1;return this.isSideMenuEnabled()&&a},prevFooter:null,updateNavbarElements:function(a){this.prevFooter&&(this.prevFooter.data("parent")?this.prevFooter.appendTo("#"+this.prevFooter.data("parent")):this.prevFooter.appendTo("#afui"));c.is$(a)||(a=c.query("#"+a));c.query("#navbar").append(a);this.prevFooter=a;a=c.query("#navbar a");if(0<a.length){a.data("ignore-pressed","true").data("resetHistory","true");var d=parseFloat(100/a.length);a.css("width",d+"%")}a=c.query("#navbar footer");if(0!==a.length){a=
a.get(0).childNodes;for(d=0;d<a.length;d++)3===a[d].nodeType&&a[d].parentNode.removeChild(a[d])}},prevHeader:null,updateHeaderElements:function(a,d){var f=this;c.is$(a)||(a=c.query("#"+a));if(a!=this.prevHeader)if(this._currentHeaderID=a.prop("id"),this.prevHeader)if(c.query("#header").append(a),c.ui.animateHeaders){var e=d?"100px":"-100px",b=d?"-100px":"100px";f.prevHeader.addClass("ignore");f.css3animate(a,{x:b,opacity:0.3,time:"1ms"});f.css3animate(f.prevHeader,{x:e,y:0,opacity:0.3,time:f.transitionTime,
delay:numOnly(f.transitionTime)/5+"ms",complete:function(){f.prevHeader.data("parent")?f.prevHeader.appendTo("#"+f.prevHeader.data("parent")):f.prevHeader.appendTo("#afui");f.prevHeader.removeClass("ignore");f.css3animate(f.prevHeader,{x:b,opacity:1,time:"1ms"});f.prevHeader=a}});f.css3animate(a,{x:"0px",opacity:1,time:f.transitionTime})}else f.prevHeader.data("parent")?f.prevHeader.appendTo("#"+f.prevHeader.data("parent")):f.prevHeader.appendTo("#afui"),f.prevHeader=a;else c.query("#header").append(a),
this.prevHeader=a},updateSideMenu:function(a){return this.updateSideMenuElements(a)},updateSideMenuElements:function(a){if(!(void 0===a||null===a)){var d=c.query("#menu_scroller");this.prevMenu&&(this.prevMenu.insertBefore("#afui #menu"),this.prevMenu=null);c.is$(a)||(a=c.query("#"+a));d.html("");d.append(a);this.prevMenu=a;this.scrollingDivs.menu_scroller.hideScrollbars();this.scrollingDivs.menu_scroller.scrollToTop()}},setTitle:function(a){"defaultHeader"===this._currentHeaderID&&c.query("#header header:not(.ignore)  #pageTitle").html(a)},
setBackButtonText:function(a){"defaultHeader"===this._currentHeaderID&&(this.trimBackButtonText&&(a=a.substring(0,5)+"..."),0<this.backButtonText.length?c.query("#header header:not(.ignore) #backButton").html(this.backButtonText):c.query("#header header:not(.ignore)  #backButton").html(a))},setBackButtonVisibility:function(a){a?c.query("#header #backButton").css("visibility","visible"):c.query("#header #backButton").css("visibility","hidden")},showMask:function(a){a||(a=this.loadingText||"");c.query("#afui_mask>h1").html(a);
c.query("#afui_mask").show()},hideMask:function(){c.query("#afui_mask").hide()},modalReference_:null,showModal:function(a,d){this.modalTransition=d||"up";var f=c.query("#modalContainer");"string"===typeof a&&(a="#"+a.replace("#",""));var e=c.query(a);this.modalReference_=e;if(e.length){var b=this.scrollingDivs.hasOwnProperty(e.attr("id")),b=this.scrollingDivs.hasOwnProperty(e.attr("id"));f.empty();var h;h=c.feat.nativeTouchScroll||!b?e.contents():c(e.get(0).childNodes[0]).contents();f.append(h);f.append("<a onclick='$.ui.hideModal();' class='closebutton modalbutton'></a>");
this.modalWindow.style.display="block";this.runTransition(this.modalTransition,this.modalTransContainer,this.modalWindow,!1);b?this.scrollingDivs.modal_container.enable(this.resetScrollers):this.scrollingDivs.modal_container.disable();this.scrollToTop("modal");f.data("panel",a);f=e.get(0);b=f.getAttribute("data-load");if("string"==typeof b&&window[b])window[b](f);e.trigger("loadpanel")}},hideModal:function(){var a=this,d=c.query("#modalContainer");d.find(".closebutton.modalbutton").remove();var f=
this.scrollingDivs.hasOwnProperty(this.modalReference_.attr("id"));this.runTransition(a.modalTransition,a.modalWindow,a.modalTransContainer,!0);this.scrollingDivs.modal_container.disable();var e=c.query(d.data("panel")),b=e.data("unload");if("string"==typeof b&&window[b])window[b](e.get(0));e.trigger("unloadpanel");setTimeout(function(){c.feat.nativeTouchScroll||!f?a.modalReference_.append(d.contents()):c(a.modalReference_.get(0).childNodes[0]).append(d.contents());d.html("",!0)},this.transitionTime)},
updatePanel:function(a,d){a="#"+a.replace("#","");var f=c.query(a).get(0);if(f){var e=c.create("div",{html:d}),e=e.children(".panel")&&0<e.children(".panel").length?e.children(".panel").get(0):e.get(0);f.getAttribute("js-scrolling")&&("yes"==f.getAttribute("js-scrolling").toLowerCase()||"true"==f.getAttribute("js-scrolling").toLowerCase())?(c.cleanUpContent(f.childNodes[0],!1,!0),c(f.childNodes[0]).html(d)):(c.cleanUpContent(f,!1,!0),c(f).html(d));e.getAttribute("data-title")&&f.setAttribute("data-title",
e.getAttribute("data-title"))}},updateContentDiv:function(a,c){return this.updatePanel(a,c)},addContentDiv:function(a,d,f,e,b){a="string"!==typeof a?a:-1==a.indexOf("#")?"#"+a:a;var h=c.query(a).get(0);h?d=h:(d=c.create("div",{html:d}),d=d.children(".panel")&&0<d.children(".panel").length?d.children(".panel").get(0):d.get(0),!d.getAttribute("data-title")&&f&&d.setAttribute("data-title",f),f=d.id?d.id:a.replace("#",""),d.id=f,d.id!=a&&d.setAttribute("data-crc",a.replace("#","")));d.className="panel";
f=d.id;this.addDivAndScroll(d,e,b);return f},addDivAndScroll:function(a,d,f,e){var b=!1,h,g=a.style.overflow,g="hidden"!=g&&"visible"!=g;e=e||this.content;!c.feat.nativeTouchScroll&&g&&a.setAttribute("js-scrolling","true");if(a.getAttribute("js-scrolling")&&("yes"==a.getAttribute("js-scrolling").toLowerCase()||"true"==a.getAttribute("js-scrolling").toLowerCase()))g=b=!0;h=a.getAttribute("data-title")||a.title;a.title="";a.setAttribute("data-title",h);a.getAttribute("scrolling")&&"no"==a.getAttribute("scrolling")&&
(b=g=!1,a.removeAttribute("js-scrolling"));if(!b||c.os.desktop)e.appendChild(a),h=a,a.style["-webkit-overflow-scrolling"]="none";else{h=a.cloneNode(!1);a.title=null;a.id=null;var k=c(a);k.removeAttr("data-footer data-aside data-nav data-header selected data-load data-unload data-tab data-crc title data-title");k.replaceClass("panel","afScrollPanel");h.appendChild(a);e.appendChild(h);!1!==this.selectBox&&this.selectBox.getOldSelects(h.id);!1!==this.passwordBox&&this.passwordBox.getOldPasswords(h.id)}g&&
(this.scrollingDivs[h.id]=c(a).scroller({scrollBars:!0,verticalScroll:!0,horizontalScroll:this.horizontalScroll,vScrollCSS:"afScrollbar",refresh:d,useJsScroll:b,noParent:!b,lockBounce:this.lockPageBounce,autoEnable:!1}),f&&c.bind(this.scrollingDivs[h.id],"refresh-release",function(a){a&&f()}));h=a=null},scrollToTop:function(a,c){c=c||"300ms";a=a.replace("#","");this.scrollingDivs[a]&&this.scrollingDivs[a].scrollToTop(c)},scrollToBottom:function(a,c){a=a.replace("#","");this.scrollingDivs[a]&&this.scrollingDivs[a].scrollToBottom(c)},
parsePanelFunctions:function(a,d,f){var e=this,b=a.getAttribute("data-footer"),h=a.getAttribute("data-header");b&&"none"==b.toLowerCase()?(e.toggleNavMenu(!1),b=!1):e.toggleNavMenu(!0);b&&e.customFooter!=b?(e.customFooter=b,e.updateNavbarElements(b)):b!=e.customFooter&&(e.customFooter&&e.updateNavbarElements(e.defaultFooter),e.customFooter=!1);h&&"none"==h.toLowerCase()?(e.toggleHeaderMenu(!1),h=!1):e.toggleHeaderMenu(!0);h&&e.customHeader!=h?(e.customHeader=h,e.updateHeaderElements(h,f)):h!=e.customHeader&&
(e.customHeader&&e.updateHeaderElements(e.defaultHeader,f),e.customHeader=!1);b=c(a).find("footer");0<b.length&&(e.customFooter=a.id,b.data("parent",a.id),e.updateNavbarElements(b));b=c(a).find("header");0<b.length&&(e.customHeader=a.id,b.data("parent",a.id),e.updateHeaderElements(b,f));a.getAttribute("data-tab")&&(c.query("#navbar a").removeClass("pressed"),c.query("#navbar #"+a.getAttribute("data-tab")).addClass("pressed"));(f=a.getAttribute("data-nav"))&&this.customMenu!=f?(this.customMenu=f,this.updateSideMenuElements(f)):
f!=this.customMenu&&(this.customMenu&&this.updateSideMenuElements(this.defaultMenu),this.customMenu=!1);if(d){f=d.getAttribute("data-unload");if("string"==typeof f&&window[f])window[f](d);c(d).trigger("unloadpanel")}f=a.getAttribute("data-load");if("string"==typeof f&&window[f])window[f](a);c(a).trigger("loadpanel");this.isSideMenuOn()&&this.toggleSideMenu(!1)},parseScriptTags:function(a){a&&c.parseJS(a)},loadContent:function(a,d,f,e,b){if(this.doingTransition)this.loadContentQueue.push([a,d,f,e,
b]);else if(0!==a.length){var h=!0;b=b||document.createElement("a");if(-1==a.indexOf("#")){var g="url"+r(a),k=c.query("div.panel[data-crc='"+g+"']");0<c.query("#"+a).length?h=!1:0<k.length?(h=!1,"true"===b.getAttribute("data-refresh-ajax")||b.refresh&&!0===b.refresh||this.isAjaxApp?h=!0:a="#"+k.get(0).id):0<c.query("#"+g).length&&(h=!1,"true"===b.getAttribute("data-refresh-ajax")||b.refresh&&!0===b.refresh||this.isAjaxApp?h=!0:a="#"+g)}-1==a.indexOf("#")&&h?this.loadAjax(a,d,f,e,b):this.loadDiv(a,
d,f,e)}},loadDiv:function(a,d,f,e){var b=this,h=a.replace("#",""),g=h.indexOf("/"),l="";-1!=g&&(l=h.substr(g),h=h.substr(0,g));if(h=c.query("#"+h).get(0))if(h==this.activeDiv&&!f)this.isSideMenuOn()&&this.toggleSideMenu(!1);else{this.transitionType=e;var n=this.activeDiv;a=h;if("true"==h.getAttribute("data-modal")||"true"==h.getAttribute("modal"))return this.showModal(h.id);n!=a&&(d?(this.clearHistory(),this.pushHistory("#"+this.firstDiv.id,h.id,e,l)):f||this.pushHistory(k,h.id,e,l),k="#"+h.id+l,
this.doingTransition=!0,n.style.display="block",a.style.display="block",this.runTransition(e,n,a,f),this.parsePanelFunctions(h,n,f),this.loadContentData(h,d,f,e),setTimeout(function(){b.scrollingDivs[n.id]&&b.scrollingDivs[n.id].disable()},numOnly(b.transitionTime)+50))}else c(document).trigger("missingpanel",null,{missingTarget:a})},loadContentData:function(a,d,f,e){f?0<this.history.length&&(f=this.history[this.history.length-1],e=f.target.indexOf("/"),f=-1!=e?f.target.substr(0,e):f.target,(f=c.query(f).get(0))?
this.setBackButtonText(f.getAttribute("data-title")):this.setBackButtonText("Back")):this.activeDiv.getAttribute("data-title")?this.setBackButtonText(this.activeDiv.getAttribute("data-title")):this.setBackButtonText("Back");a.getAttribute("data-title")&&this.setTitle(a.getAttribute("data-title"));d&&(this.setBackButtonText(this.firstDiv.getAttribute("data-title")),a==this.firstDiv&&(this.history.length=0));c("#header #menubadge").css("float","right");0===this.history.length?(this.setBackButtonVisibility(!1),
this.history=[],c("#header #menubadge").css("float","left")):this.showBackButton&&this.showBackbutton&&this.setBackButtonVisibility(!0);this.activeDiv=a;this.scrollingDivs[this.activeDiv.id]&&this.scrollingDivs[this.activeDiv.id].enable(this.resetScrollers)},loadAjax:function(a,d,f,e,b){if(!("afui_ajax"==this.activeDiv.id&&a==this.ajaxUrl)){var h="url"+r(a),g=this;-1==a.indexOf("http")&&(a=intel.xdk.webRoot+a);var k=new XMLHttpRequest;b&&"object"!==typeof b&&(b=document.createElement("a"),b.setAttribute("data-persist-ajax",
!0));b=b||document.createElement("a");k.onreadystatechange=function(){if(4==k.readyState&&200==k.status){this.doingTransition=!1;var l,n=!1;l=c.query("#"+h);if(0<l.length)g.updatePanel(h,k.responseText),l.get(0).setAttribute("data-title",b.title?b.title:a);else if(b.getAttribute("data-persist-ajax")||g.isAjaxApp){var q="true"===b.getAttribute("data-pull-scroller")?!0:!1;l=q?function(){b.refresh=!0;g.loadContent(a,d,f,e,b);b.refresh=!1}:null;var p=c(k.responseText);p.hasClass("panel")?(h=p.attr("id"),
p=p.get(0).innerHTML):p=p.html();0<c("#"+h).length?g.updatePanel("#"+h,p):0<c("div.panel[data-crc='"+h+"']").length?(g.updatePanel(c("div.panel[data-crc='"+h+"']").get(0).id,p),h=c("div.panel[data-crc='"+h+"']").get(0).id):h=g.addContentDiv(h,k.responseText,b.title?b.title:a,q,l)}else g.updatePanel("afui_ajax",k.responseText),c.query("#afui_ajax").get(0).setAttribute("data-title",b.title?b.title:a),g.loadContent("#afui_ajax",d,f,e),n=!0;l=document.createElement("div");c(l).html(k.responseText);g.parseScriptTags(l);
if(n)g.showLoading&&g.hideMask();else return g.loadContent("#"+h,d,f,e),g.showLoading&&g.hideMask(),null}};this.ajaxUrl=a;var l=this.useAjaxCacheBuster?a+(a.split("?")[1]?"&":"?")+"cache="+1E16*Math.random():a;k.open("GET",l,!0);k.setRequestHeader("X-Requested-With","XMLHttpRequest");k.send();this.showLoading&&this.showMask()}},runTransition:function(a,c,f,e){this.availableTransitions[a]||(a="default");this.availableTransitions[a].call(this,c,f,e)},launch:function(){if(!1===this.hasLaunched||this.launchCompleted)this.hasLaunched=
!0;else{var a=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(b){a.useInteralRouting&&q(b,b.currentTarget)});var d=null;c.bind(c.touchLayer,"enter-edit",function(a){d=a});c.bind(c.touchLayer,"enter-edit-reshape",function(){var b=c(d),e=b.closest(a.activeDiv);if(e&&0<e.size())if(c.os.ios||c.os.chrome){var f;
f=document.body.scrollTop?document.body.scrollTop-e.offset().top:0;b=e.offset().bottom-b.offset().bottom;a.scrollingDivs[a.activeDiv.id].setPaddings(f,b)}else if(c.os.android||c.os.blackberry)f=b.offset(),e=e.offset(),f.bottom>e.bottom&&f.height<e.height&&a.scrollingDivs[a.activeDiv.id].scrollToItem(b,"bottom")});c.os.ios&&c.bind(c.touchLayer,"exit-edit-reshape",function(){a.activeDiv&&(a.activeDiv.id&&a.scrollingDivs.hasOwnProperty(a.activeDiv.id))&&a.scrollingDivs[a.activeDiv.id].setPaddings(0,
0)});this.navbar||(this.navbar=c.create("div",{id:"navbar"}).get(0),this.viewportContainer.append(this.navbar));this.header||(this.header=c.create("div",{id:"header"}).get(0),this.viewportContainer.prepend(this.header));this.menu||(this.menu=c.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=c.query("#menu_scroller").scroller({scrollBars:!0,verticalScroll:!0,vScrollCSS:"afScrollbar",
useJsScroll:!c.feat.nativeTouchScroll,noParent:c.feat.nativeTouchScroll,autoEnable:!0,lockBounce:this.lockPageBounce}),c.feat.nativeTouchScroll&&c.query("#menu_scroller").css("height","100%"));this.content||(this.content=c.create("div",{id:"content"}).get(0),this.viewportContainer.append(this.content));c(this.header).html('<a id="backButton" class="button"></a> <h1 id="pageTitle"></h1>'+this.header.innerHTML);this.backButton=c.query("#header #backButton").css("visibility","hidden");c(document).on("click",
"#header #backButton",function(b){b.preventDefault();a.goBack()});this.titleBar=c.query("#header #pageTitle").get(0);this.addContentDiv("afui_ajax","");var f=c.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(f.get(0));f=c.create("div",{id:"afui_modal"}).get(0);f.appendChild(c.create("div",{id:"modalContainer"}).get(0));this.modalTransContainer=c.create("div",
{id:"modalTransContainer"}).appendTo(f).get(0);this.viewportContainer.append(f);this.scrollingDivs.modal_container=c.query("#modalContainer").scroller({scrollBars:!0,vertical:!0,vScrollCSS:"afScrollbar",noParent:!0,lockBounce:this.lockPageBounce});this.modalWindow=f;for(var e={},f=this.viewportContainer.get(0).querySelectorAll(".panel"),b=0;b<f.length;b++){var h=f[b],g=h,n,r=h.previousSibling;h.parentNode&&"content"!=h.parentNode.id?(h.parentNode.removeChild(h),n=h.id,g.getAttribute("selected")&&
(this.firstDiv=c.query("#"+n).get(0)),this.addDivAndScroll(g),c.query("#"+n).insertAfter(r)):h.parsedContent||(h.parsedContent=1,h.parentNode.removeChild(h),n=h.id,g.getAttribute("selected")&&(this.firstDiv=c.query("#"+n).get(0)),this.addDivAndScroll(g),c.query("#"+n).insertAfter(r));h.getAttribute("data-defer")&&(e[n]=h.getAttribute("data-defer"));this.firstDiv||(this.firstDiv=c.query("#"+n).get(0));h=null}var f=null,D=!1,E=Object.keys(e).length;if(0<E){var D=!0,z=0,p;for(p in e)(function(b){c.ajax({url:intel.xdk.webRoot+
e[b],success:function(d){0<d.length&&(a.updatePanel(b,d),a.parseScriptTags(c.query("#"+b).get(0)));z++;z>=E&&(D=!1,c(document).trigger("defer:loaded"))},error:function(a){console.log("Error with deferred load "+intel.xdk.webRoot+e[b]);z++;z>=E&&(D=!1,c(document).trigger("defer:loaded"))}})})(p)}if(this.firstDiv)if(this.activeDiv=this.firstDiv,this.scrollingDivs[this.activeDiv.id]&&this.scrollingDivs[this.activeDiv.id].enable(),n=function(){c.query("#navbar").append(c.create("footer",{id:"defaultNav"}).append(c.query("#navbar").children()));
a.defaultFooter="defaultNav";a.prevFooter=c.query("#defaultNav");a.updateNavbarElements(a.prevFooter);var b=c.query("nav").get(0);b&&(a.defaultMenu=c(b),a.updateSideMenuElements(a.defaultMenu),a.prevMenu=a.defaultMenu);a.defaultHeader="defaultHeader";c.query("#header").append(c.create("header",{id:"defaultHeader"}).append(c.query("#header").children()));a.prevHeader=c.query("#defaultHeader");c.query("#navbar").on("click","a",function(a){c.query("#navbar a").not(a.currentTarget).removeClass("pressed");
c(a.currentTarget).addClass("pressed")});b=c.query("#navbar a");0<b.length&&b.css("width",100/b.length+"%");0<c.query("nav").length&&(c.query("#afui #header").addClass("hasMenu"),c.query("#afui #content").addClass("hasMenu"),c.query("#afui #navbar").addClass("hasMenu"),c.query("#afui #menu").addClass("tabletMenu"));var b=a.getPanelId(l),d=b=="#"+a.firstDiv.id;0<b.length&&a.loadDefaultHash&&!d?a.loadContent(l,!0,!1,"none"):(k="#"+a.firstDiv.id,a.firstDiv.style.display="block",a.parsePanelFunctions(a.firstDiv),
a.loadContentData(a.firstDiv),c.query("#header #backButton").css("visibility","hidden"),("true"==a.firstDiv.getAttribute("data-modal")||"true"==a.firstDiv.getAttribute("modal"))&&a.showModal(a.firstDiv.id));a.launchCompleted=!0;c.query("#afui #splashscreen").remove();setTimeout(function(){c(document).trigger("afui:ready")})},D)c(document).one("defer:loaded",n);else n();c.bind(a,"content-loaded",function(){if(0<a.loadContentQueue.length){var b=a.loadContentQueue.splice(0,1)[0];a.loadContent(b[0],b[1],
b[2],b[3],b[4])}});(window.navigator.standalone||this.isIntel)&&this.blockPageScroll();this.topClickScroll()}},topClickScroll:function(){var a=this;document.getElementById("header").addEventListener("click",function(c){15>=c.clientY&&"h1"==c.target.nodeName.toLowerCase()&&a.scrollingDivs[a.activeDiv.id].scrollToTop("100")})},blockPageScroll:function(){c.query("#afui #header").bind("touchmove",function(a){a.preventDefault()})},noTransition:function(a,c,f){c.style.display="block";a.style.display="block";
this.clearAnimations(c);this.css3animate(a,{x:"0%",y:0});this.finishTransition(a);c.style.zIndex=2;a.style.zIndex=1},finishTransition:function(a,d){a.style.display="none";this.doingTransition=!1;d&&this.clearAnimations(d);a&&this.clearAnimations(a);c.trigger(this,"content-loaded")},clearAnimations:function(a){a.style[c.feat.cssPrefix+"Transform"]="none";a.style[c.feat.cssPrefix+"Transition"]="none"}};var q=function(a,d){if(d!=afui){if("a"!=d.tagName.toLowerCase()&&d.parentNode)return q(a,d.parentNode);
if("undefined"!==d.tagName&&"a"==d.tagName.toLowerCase()){if(!1!==("function"==typeof c.ui.customClickHandler?c.ui.customClickHandler:!1)&&c.ui.customClickHandler(d,a))return a.preventDefault();if(!(-1!==d.href.toLowerCase().indexOf("javascript:")||d.getAttribute("data-ignore"))){if(0===d.href.indexOf("tel:"))return!1;if(-1===d.hash.indexOf("#")&&0<d.target.length)0!==d.href.toLowerCase().indexOf("javascript:")&&(c.ui.isIntel?(a.preventDefault(),intel.xdk.device.launchExternal(d.href)):c.os.desktop||
(a.target.target="_blank"));else{var f=d.href,e=location.protocol+"//"+location.hostname+":"+location.port+location.pathname;0===f.indexOf(e)&&(f=f.substring(e.length));if("#"==f||f.indexOf("#")===f.length-1||0===f.length&&0===d.hash.length)return a.preventDefault();a.preventDefault();var e=d.getAttribute("data-transition"),b=d.getAttribute("data-resetHistory"),b=b&&"true"==b.toLowerCase()?!0:!1,f=0<d.hash.length?d.hash:f;c.ui.loadContent(f,b,0,e,d)}}}}},r=function(a,c){void 0===c&&(c=0);var f=0,
f=0;c^=-1;for(var e=0,b=a.length;e<b;e++)f=(c^a.charCodeAt(e))&255,f="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*
f,8),c=c>>>8^f;return c^-1};c.ui=new g;c.ui.init=!0;c(window).trigger("afui:preinit");c(window).trigger("afui:init")})(af);
(function(c){c(document).one("intel.xdk.device.ready",function(){c.ui.isIntel=!0;setTimeout(function(){document.getElementById("afui").style.height="100%";document.body.style.height="100%";document.documentElement.style.minHeight=window.innerHeight},300);c.ui.ready(function(){c.ui.blockPageScroll()})});c.feat.nativeTouchScroll&&document.addEventListener("orientationchange",function(n){if(c.ui.scrollingDivs[c.ui.activeDiv.id]){var l=c.ui.scrollingDivs[c.ui.activeDiv.id];0===l.el.scrollTop&&(l.disable(),
setTimeout(function(){l.enable()},300))}})})(af);
(function(c){c.availableTransitions.fade=function(n,l,k){n.style.display="block";l.style.display="block";var g=this;k?(l.style.zIndex=1,n.style.zIndex=2,g.clearAnimations(l),g.css3animate(n,{x:"0%",time:c.transitionTime,opacity:0.1,complete:function(c){c?g.finishTransition(n,l):(g.css3animate(n,{x:"-100%",opacity:1,complete:function(){g.finishTransition(n)}}),l.style.zIndex=2,n.style.zIndex=1)}})):(n.style.zIndex=1,l.style.zIndex=2,l.style.opacity=0,g.css3animate(l,{x:"0%",opacity:0.1,complete:function(){g.css3animate(l,
{x:"0%",time:c.transitionTime,opacity:1,complete:function(c){c?g.finishTransition(n,l):(g.clearAnimations(l),g.css3animate(n,{x:"-100%",y:0,complete:function(){g.finishTransition(n)}}))}})}}))}})(af.ui);
(function(c){c.availableTransitions.flip=function(n,l,k){n.style.display="block";l.style.display="block";var g=this;k||(n.style.zIndex=1,l.style.zIndex=2);g.css3animate(l,{x:"100%",scale:0.8,rotateY:"180deg",complete:function(){g.css3animate(l,{x:"0%",scale:1,time:c.transitionTime,rotateY:"0deg",complete:function(){g.clearAnimations(l)}})}});g.css3animate(n,{x:"100%",time:c.transitionTime,scale:0.8,rotateY:"180deg",complete:function(){g.css3animate(n,{x:"-100%",opacity:1,scale:1,rotateY:"0deg",complete:function(){g.finishTransition(n)}});
l.style.zIndex=2;n.style.zIndex=1}})}})(af.ui);
(function(c){c.availableTransitions.pop=function(n,l,k){n.style.display="block";l.style.display="block";var g=this;k?(l.style.zIndex=1,n.style.zIndex=2,g.clearAnimations(l),g.css3animate(n,{x:"0%",time:c.transitionTime,opacity:0.1,scale:0.2,origin:"50% 50%",complete:function(c){c?g.finishTransition(n):(g.css3animate(n,{x:"-100%",complete:function(){g.finishTransition(n)}}),l.style.zIndex=2,n.style.zIndex=1)}})):(n.style.zIndex=1,l.style.zIndex=2,g.css3animate(l,{x:"0%",scale:0.2,origin:"50% 50%",
opacity:0.1,time:"0ms",complete:function(){g.css3animate(l,{x:"0%",time:c.transitionTime,scale:1,opacity:1,origin:"0% 0%",complete:function(c){c?g.finishTransition(n,l):(g.clearAnimations(l),g.css3animate(n,{x:"100%",y:0,complete:function(){g.finishTransition(n)}}))}})}}))}})(af.ui);
(function(c){function n(l,k,g){l.style.display="block";k.style.display="block";var n=this;g?n.css3animate(l,{x:"0%",y:"0%",complete:function(){n.css3animate(l,{x:"100%",time:c.transitionTime,complete:function(){n.finishTransition(l,k)}}).link(k,{x:"0%",time:c.transitionTime})}}).link(k,{x:"-100%",y:"0%"}):n.css3animate(l,{x:"0%",y:"0%",complete:function(){n.css3animate(l,{x:"-100%",time:c.transitionTime,complete:function(){n.finishTransition(l,k)}}).link(k,{x:"0%",time:c.transitionTime})}}).link(k,
{x:"100%",y:"0%"})}c.availableTransitions.slide=n;c.availableTransitions["default"]=n})(af.ui);
(function(c){c.availableTransitions.down=function(n,l,k){n.style.display="block";l.style.display="block";var g=this;k?(n.style.zIndex=2,l.style.zIndex=1,g.css3animate(n,{y:"0%",x:"0%",complete:function(){g.css3animate(n,{y:"-100%",time:c.transitionTime,complete:function(){g.finishTransition(n,l)}})}})):(n.style.zIndex=1,l.style.zIndex=2,g.css3animate(l,{y:"-100%",x:"0%",time:"10ms",complete:function(){g.css3animate(l,{y:"0%",time:c.transitionTime,complete:function(){g.finishTransition(n,l)}})}}))}})(af.ui);
(function(c){c.availableTransitions.up=function(n,l,k){n.style.display="block";l.style.display="block";var g=this;k?(n.style.zIndex=2,l.style.zIndex=1,g.css3animate(n,{y:"0%",x:"0%",complete:function(){g.css3animate(n,{y:"100%",time:c.transitionTime,complete:function(){g.finishTransition(n,l)}})}})):(n.style.zIndex=1,l.style.zIndex=2,g.css3animate(l,{y:"100%",x:"0%",time:"10ms",complete:function(){g.css3animate(l,{y:"0%",time:c.transitionTime,complete:function(){g.finishTransition(n,l)}})}}))}})(af.ui);
(function(c){function n(){c.ui.isWin8=!0;c.os.ie&&c.ui.ready(function(){c.ui.slideSideMenu&&(c.ui.slideSideMenu=!1);c.query("#afui #navbar footer").append("<a id='metroMenu' onclick='$.ui.toggleSideMenu()'>\u2022\u2022\u2022</a>");var l=c.query("#afui #navbar").find("a");if(0<l.length){l.data("ignore-pressed","true").data("resetHistory","true");var k=parseFloat(100/l.length);l.css("width",k+"%")}var g=c.ui.updateNavbarElements;c.ui.updateNavbarElements=function(){g.apply(c.ui,arguments);1!=c.query("#afui #navbar #metroMenu").length&&
c.query("#afui #navbar footer").append("<a id='metroMenu' onclick='$.ui.toggleSideMenu()'>\u2022\u2022\u2022</a>")};c.ui.isSideMenuOn=function(){var g=0>parseInt(c.getCssMatrix(c("#navbar")).f)?!0:!1;return this.isSideMenuEnabled()&&g};c.ui.toggleSideMenu=function(g,k){if(this.isSideMenuEnabled()&&!this.togglingSideMenu){this.togglingSideMenu=!0;var a=this,d=c.query("#menu"),f=c.query("#navbar"),e=this.isSideMenuOn();if(2===g||!e&&(void 0!==g&&!1!==g||void 0===g))d.show(),a.css3animate(f,{y:"-150px",
time:c.ui.transitionTime,complete:function(b){a.togglingSideMenu=!1;k&&k(!0)}}),a.css3animate(d,{y:"0px",time:c.ui.transitionTime});else if(void 0===g||void 0!==g&&!1===g)a.css3animate(f,{y:"0",time:c.ui.transitionTime,complete:function(b){a.togglingSideMenu=!1;k&&k(!0);d.hide()}}),a.css3animate(d,{y:"150px",time:c.ui.transitionTime})}}})}if(!c)throw"This plugin requires jqUi";c.ui?n():c(document).ready(function(){n()})})(af);
