(function(m,k){function N(a){return c.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}function y(a){if(!Ba[a]){var b=r.body,d=c("<"+a+">").appendTo(b),e=d.css("display");d.remove();if("none"===e||""===e){I||(I=r.createElement("iframe"),I.frameBorder=I.width=I.height=0);b.appendChild(I);if(!U||!I.createElement)U=(I.contentWindow||I.contentDocument).document,U.write((c.support.boxModel?"":"")+""),U.close();d=U.createElement(a);U.body.appendChild(d);e=c.css(d, "display");b.removeChild(I)}Ba[a]=e}return Ba[a]}function l(a,b){var d={};c.each(ha.concat.apply([],ha.slice(0,b)),function(){d[this]=a});return d}function u(){ia=k}function v(){setTimeout(u,0);return ia=c.now()}function F(){try{return new m.XMLHttpRequest}catch(a){}}function A(a,b,d,e){if(c.isArray(b))c.each(b,function(b,c){d||Wb.test(a)?e(a,c):A(a+"["+("object"==typeof c?b:"")+"]",c,d,e)});else if(!d&&"object"===c.type(b))for(var f in b)A(a+"["+f+"]",b[f],d,e);else e(a,b)}function K(a,b){var d, e,f=c.ajaxSettings.flatOptions||{};for(d in b)b[d]!==k&&((f[d]?a:e||(e={}))[d]=b[d]);e&&c.extend(!0,a,e)}function M(a,b,d,e,c,g){c=c||b.dataTypes[0];g=g||{};g[c]=!0;c=a[c];for(var h=0,j=c?c.length:0,p=a===Ca,q;hf;f+=2)d||(e-=parseFloat(c.css(a,"padding"+P[f]))||0),"margin"===d?e+=parseFloat(c.css(a,d+P[f]))||0:e-=parseFloat(c.css(a,"border"+P[f]+"Width"))||0;return e+"px"}e=V(a,b);if(0>e||null==e)e=a.style[b];if(Da.test(e))return e;e=parseFloat(e)||0;if(d)for(;4>f;f+=2)e+=parseFloat(c.css(a, "padding"+P[f]))||0,"padding"!==d&&(e+=parseFloat(c.css(a,"border"+P[f]+"Width"))||0),"margin"===d&&(e+=parseFloat(c.css(a,d+P[f]))||0);return e+"px"}function $a(a){var b=(a.nodeName||"").toLowerCase();"input"===b?ab(a):"script"!==b&&"undefined"!=typeof a.getElementsByTagName&&c.grep(a.getElementsByTagName("input"),ab)}function ab(a){if("checkbox"===a.type||"radio"===a.type)a.defaultChecked=a.checked}function ja(a){return"undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName("*"):"undefined"!= typeof a.querySelectorAll?a.querySelectorAll("*"):[]}function bb(a,b){var d;1===b.nodeType&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),d=b.nodeName.toLowerCase(),"object"===d?b.outerHTML=a.outerHTML:"input"!==d||"checkbox"!==a.type&&"radio"!==a.type?"option"===d?b.selected=a.defaultSelected:"input"===d||"textarea"===d?b.defaultValue=a.defaultValue:"script"===d&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&& (b.value=a.value)),b.removeAttribute(c.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function cb(a,b){if(1===b.nodeType&&c.hasData(a)){var d,e,f;e=c._data(a);var g=c._data(b,e),h=e.events;if(h)for(d in delete g.handle,g.events={},h){e=0;for(f=h[d].length;e)[^>]*$|#([\w\-]*)$)/,kb=/\S/,lb=/^\s+/,mb=/\s+$/,dc=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,ec=/^[\],:{}\s]*$/,fc=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,gc=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,hc=/(?:^|:|,)(?:\s*\[)+/g,ic=/(webkit)[ \/]([\w.]+)/,jc=/(opera)(?:.*version)?[ \/]([\w.]+)/, kc=/(msie) ([\w.]+)/,lc=/(mozilla)(?:.*? rv:([\w.]+))?/,mc=/-([a-z]|[0-9])/ig,nc=/^-ms-/,oc=function(a,b){return(b+"").toUpperCase()},pc=m.navigator.userAgent,la,ma,X,qc=Object.prototype.toString,Fa=Object.prototype.hasOwnProperty,Ga=Array.prototype.push,ca=Array.prototype.slice,nb=String.prototype.trim,ob=Array.prototype.indexOf,pb={};n.fn=n.prototype={constructor:n,init:function(a,b,d){var e,c;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if("body"===a&&!b&&r.body)return this.context= r,this[0]=r.body,this.selector=a,this.length=1,this;if("string"==typeof a){"<"!==a.charAt(0)||">"!==a.charAt(a.length-1)||3>a.length?e=cc.exec(a):e=[null,a,null];if(e&&(e[1]||!b)){if(e[1])return c=(b=b instanceof n?b[0]:b)?b.ownerDocument||b:r,(d=dc.exec(a))?n.isPlainObject(b)?(a=[r.createElement(d[1])],n.fn.attr.call(a,b,!0)):a=[c.createElement(d[1])]:(d=n.buildFragment([e[1]],[c]),a=(d.cacheable?n.clone(d.fragment):d.fragment).childNodes),n.merge(this,a);if((b=r.getElementById(e[2]))&&b.parentNode){if(b.id!== e[2])return d.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}return!b||b.jquery?(b||d).find(a):this.constructor(b).find(a)}if(n.isFunction(a))return d.ready(a);a.selector!==k&&(this.selector=a.selector,this.context=a.context);return n.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return ca.call(this,0)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a,b,d){var e= this.constructor();n.isArray(a)?Ga.apply(e,a):n.merge(e,a);e.prevObject=this;e.context=this.context;"find"===b?e.selector=this.selector+(this.selector?" ":"")+d:b&&(e.selector=this.selector+"."+b+"("+d+")");return e},each:function(a,b){return n.each(this,a,b)},ready:function(a){n.bindReady();ma.add(a);return this},eq:function(a){a=+a;return-1===a?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(ca.apply(this, arguments),"slice",ca.call(arguments).join(","))},map:function(a){return this.pushStack(n.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:Ga,sort:[].sort,splice:[].splice};n.fn.init.prototype=n.fn;n.extend=n.fn.extend=function(){var a,b,d,e,c,g,h=arguments[0]||{},j=1,p=arguments.length,q=!1;"boolean"==typeof h&&(q=h,h=arguments[1]||{},j=2);"object"!=typeof h&&!n.isFunction(h)&&(h={});for(p===j&&(h=this,--j);jd?Math.max(0,e+d):d:0;da.indexOf("compatible")&&lc.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},sub:function(){function a(b,e){return new a.fn.init(b,e)}n.extend(!0,a,this);a.superclass=this; a.fn=a.prototype=this();a.fn.constructor=a;a.sub=this.sub;a.fn.init=function(d,e){e&&e instanceof n&&!(e instanceof a)&&(e=a(e));return n.fn.init.call(this,d,e,b)};a.fn.init.prototype=a.fn;var b=a(r);return a},browser:{}});n.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){pb["[object "+b+"]"]=b.toLowerCase()});la=n.uaMatch(pc);la.browser&&(n.browser[la.browser]=!0,n.browser.version=la.version);n.browser.webkit&&(n.browser.safari=!0);kb.test(" ")&&(lb=/^[\s\xA0]+/, mb=/[\s\xA0]+$/);jb=n(r);r.addEventListener?X=function(){r.removeEventListener("DOMContentLoaded",X,!1);n.ready()}:r.attachEvent&&(X=function(){"complete"===r.readyState&&(r.detachEvent("onreadystatechange",X),n.ready())});c=n;var qb={};c.Callbacks=function(a){var b;if(a){if(!(b=qb[a])){b=a;var d=qb[b]={},e,f;b=b.split(/\s+/);e=0;for(f=b.length;e=g&&a&&c.isFunction(a.promise)?a:c.Deferred(),q=p.promise();if(1
a";Ka=t.getElementsByTagName("*");Y=t.getElementsByTagName("a")[0];if(!Ka||!Ka.length||!Y)Ja={};else{na=r.createElement("select");oa=na.appendChild(r.createElement("option"));D=t.getElementsByTagName("input")[0];z={leadingWhitespace:3=== t.firstChild.nodeType,tbody:!t.getElementsByTagName("tbody").length,htmlSerialize:!!t.getElementsByTagName("link").length,style:/top/.test(Y.getAttribute("style")),hrefNormalized:"/a"===Y.getAttribute("href"),opacity:/^0.55/.test(Y.style.opacity),cssFloat:!!Y.style.cssFloat,checkOn:"on"===D.value,optSelected:oa.selected,getSetAttribute:"t"!==t.className,enctype:!!r.createElement("form").enctype,html5Clone:"<:nav>"!==r.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0, focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0};c.boxModel=z.boxModel="CSS1Compat"===r.compatMode;D.checked=!0;z.noCloneChecked=D.cloneNode(!0).checked;na.disabled=!0;z.optDisabled=!oa.disabled;try{delete t.test}catch(id){z.deleteExpando=!1}!t.addEventListener&&t.attachEvent&&t.fireEvent&&(t.attachEvent("onclick",function(){z.noCloneEvent=!1}),t.cloneNode(!0).fireEvent("onclick"));D=r.createElement("input");D.value= "t";D.setAttribute("type","radio");z.radioValue="t"===D.value;D.setAttribute("checked","checked");D.setAttribute("name","t");t.appendChild(D);J=r.createDocumentFragment();J.appendChild(t.lastChild);z.checkClone=J.cloneNode(!0).cloneNode(!0).lastChild.checked;z.appendChecked=D.checked;J.removeChild(D);J.appendChild(t);if(t.attachEvent)for(La in{submit:1,change:1,focusin:1})pa="on"+La,(ea=pa in t)||(t.setAttribute(pa,"return;"),ea="function"==typeof t[pa]),z[La+"Bubbles"]=ea;J.removeChild(t);J=na=oa= t=D=null;c(function(){var a,b,d,e,f,g,h=r.getElementsByTagName("body")[0];!h||(a=r.createElement("div"),a.style.cssText="padding:0;margin:0;border:0;visibility:hidden;width:0;height:0;position:static;top:0;margin-top:1px",h.insertBefore(a,h.firstChild),t=r.createElement("div"),a.appendChild(t),t.innerHTML="
t
",da=t.getElementsByTagName("td"),ea=0===da[0].offsetHeight,da[0].style.display="",da[1].style.display= "none",z.reliableHiddenOffsets=ea&&0===da[0].offsetHeight,m.getComputedStyle&&(t.innerHTML="",g=r.createElement("div"),g.style.width="0",g.style.marginRight="0",t.style.width="2px",t.appendChild(g),z.reliableMarginRight=0===(parseInt((m.getComputedStyle(g,null)||{marginRight:0}).marginRight,10)||0)),"undefined"!=typeof t.style.zoom&&(t.innerHTML="",t.style.width=t.style.padding="1px",t.style.border=0,t.style.overflow="hidden",t.style.display="inline",t.style.zoom=1,z.inlineBlockNeedsLayout=3===t.offsetWidth, t.style.display="block",t.style.overflow="visible",t.innerHTML="
",z.shrinkWrapBlocks=3!==t.offsetWidth),t.style.cssText="position:absolute;top:0;left:0;width:1px;height:1px;padding:0;margin:0;border:0;visibility:hidden;",t.innerHTML="
", b=t.firstChild,d=b.firstChild,e=b.nextSibling.firstChild.firstChild,f={doesNotAddBorder:5!==d.offsetTop,doesAddBorderForTableAndCells:5===e.offsetTop},d.style.position="fixed",d.style.top="20px",f.fixedPosition=20===d.offsetTop||15===d.offsetTop,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",f.subtractsBorderForOverflowNotVisible=-5===d.offsetTop,f.doesNotIncludeMarginInBodyOffset=1!==h.offsetTop,m.getComputedStyle&&(t.style.marginTop="1%",z.pixelMargin="1%"!== (m.getComputedStyle(t,null)||{marginTop:0}).marginTop),"undefined"!=typeof a.style.zoom&&(a.style.zoom=1),h.removeChild(a),t=null,c.extend(z,f))});Ja=z}rc.support=Ja;var Zb=/^(?:\{.*\}|\[.*\])$/,Yb=/([A-Z])/g;c.extend({cache:{},uuid:0,expando:"jQuery"+(c.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?c.cache[a[c.expando]]:a[c.expando];return!!a&&!Ea(a)},data:function(a,b,d,e){if(c.acceptData(a)){var f, g;f=c.expando;var h="string"==typeof b,j=a.nodeType,p=j?c.cache:a,q=j?a[f]:a[f]&&f,l="events"===b;if(q&&p[q]&&(l||e||p[q].data)||!(h&&d===k)){q||(j?a[f]=q=++c.uuid:q=f);p[q]||(p[q]={},j||(p[q].toJSON=c.noop));if("object"==typeof b||"function"==typeof b)e?p[q]=c.extend(p[q],b):p[q].data=c.extend(p[q].data,b);a=f=p[q];e||(f.data||(f.data={}),f=f.data);d!==k&&(f[c.camelCase(b)]=d);if(l&&!f[b])return a.events;h?(g=f[b],null==g&&(g=f[c.camelCase(b)])):g=f;return g}}},removeData:function(a,b,d){if(c.acceptData(a)){var e, f,g,h=c.expando,j=a.nodeType,p=j?c.cache:a,q=j?a[h]:h;if(p[q]){if(b&&(e=d?p[q]:p[q].data)){c.isArray(b)||(b in e?b=[b]:(b=c.camelCase(b),b in e?b=[b]:b=b.split(" ")));f=0;for(g=b.length;fe)return null;a=h?e:0;for(d=h?e+1:g.length;af.indexOf(":")?"on"+f:"",d){if(a.result= k,a.target||(a.target=d),b=null!=b?c.makeArray(b):[],b.unshift(a),q=c.event.special[f]||{},!(q.trigger&&!1===q.trigger.apply(d,b))){n=[[d,q.bindType||f]];if(!e&&!q.noBubble&&!c.isWindow(d)){j=q.delegateType||f;g=xb.test(j+f)?d:d.parentNode;for(p=null;g;g=g.parentNode)n.push([g,j]),p=g;p&&p===d.ownerDocument&&n.push([p.defaultView||p.parentWindow||m,j])}for(j=0;jd&&h.push({elem:this,matches:b.slice(d)});for(j=0;j+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,Z="sizcache"+(Math.random()+"").replace(".",""),Oa=0,Bb=Object.prototype.toString,ra=!1,Cb=!0,$=/\\/g,Bc=/\r\n/g,sa=/\W/;[0,0].sort(function(){Cb=!1;return 0}); var s=function(a,b,d,c){d=d||[];var f=b=b||r;if(1!==b.nodeType&&9!==b.nodeType)return[];if(!a||"string"!=typeof a)return d;var g,h,j,p,q,l,m=!0,n=s.isXML(b),k=[],u=a;do if(Na.exec(""),g=Na.exec(u))if(u=g[3],k.push(g[1]),g[2]){p=g[3];break}while(g);if(1":function(a,b){var d,c="string"==typeof b,f=0,g=a.length;if(c&&!sa.test(b))for(b=b.toLowerCase();fd[3]-0},nth:function(a,b,d){return d[3]-0===b},eq:function(a,b,d){return d[3]-0===b}},filter:{PSEUDO:function(a,b,d,c){var f=b[1],g=w.filters[f];if(g)return g(a,d,b,c);if("contains"===f)return 0<=(a.textContent||a.innerText|| Pa([a])||"").indexOf(b[3]);if("not"===f){b=b[3];d=0;for(c=b.length;d";va.insertBefore(ua,va.firstChild);r.getElementById(Fb)&&(w.find.ID=function(a,b,c){if("undefined"!=typeof b.getElementById&&!c)return(b=b.getElementById(a[1]))?b.id===a[1]||"undefined"!=typeof b.getAttributeNode&&b.getAttributeNode("id").nodeValue=== a[1]?[b]:k:[]},w.filter.ID=function(a,b){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return 1===a.nodeType&&c&&c.nodeValue===b});va.removeChild(ua);var va=ua=null,L=r.createElement("div");L.appendChild(r.createComment(""));0

";if(!wa.querySelectorAll||0!==wa.querySelectorAll(".TEST").length){var s=function(a,b,c,e){b=b||r;if(!e&&!s.isXML(b)){var f=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(a);if(f&&(1===b.nodeType||9===b.nodeType)){if(f[1])return H(b.getElementsByTagName(a),c);if(f[2]&&w.find.CLASS&&b.getElementsByClassName)return H(b.getElementsByClassName(f[2]), c)}if(9===b.nodeType){if("body"===a&&b.body)return H([b.body],c);if(f&&f[3]){var g=b.getElementById(f[3]);if(!g||!g.parentNode)return H([],c);if(g.id===f[3])return H([g],c)}try{return H(b.querySelectorAll(a),c)}catch(h){}}else if(1===b.nodeType&&"object"!==b.nodeName.toLowerCase()){var f=b,j=(g=b.getAttribute("id"))||"__sizzle__",p=b.parentNode,l=/^\s*[+~]/.test(a);g?j=j.replace(/'/g,"\\$&"):b.setAttribute("id",j);l&&p&&(b=b.parentNode);try{if(!l||p)return H(b.querySelectorAll("[id='"+j+"'] "+a), c)}catch(k){}finally{g||f.removeAttribute("id")}}}return Qa(a,b,c,e)},Ra;for(Ra in Qa)s[Ra]=Qa[Ra];wa=null}}var xa=r.documentElement,ya=xa.matchesSelector||xa.mozMatchesSelector||xa.webkitMatchesSelector||xa.msMatchesSelector;if(ya){var Dc=!ya.call(r.createElement("div"),"div"),Gb=!1;try{ya.call(r.documentElement,"[test!='']:sizzle")}catch(kd){Gb=!0}s.matchesSelector=function(a,b){b=b.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!s.isXML(a))try{if(Gb||!w.match.PSEUDO.test(b)&&!/!=/.test(b)){var c= ya.call(a,b);if(c||!Dc||a.document&&11!==a.document.nodeType)return c}}catch(e){}return 0
";aa.getElementsByClassName&&0!==aa.getElementsByClassName("e").length&&(aa.lastChild.className="e",1!==aa.getElementsByClassName("e").length&&(w.order.splice(1,0,"CLASS"),w.find.CLASS=function(a,b,c){if("undefined"!=typeof b.getElementsByClassName&&!c)return b.getElementsByClassName(a[1])}, aa=null));r.documentElement.contains?s.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:r.documentElement.compareDocumentPosition?s.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:s.contains=function(){return!1};s.isXML=function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?"HTML"!==a.nodeName:!1};var Eb=function(a,b,c){var e,f=[],g="";for(b=b.nodeType?[b]:b;e=w.match.PSEUDO.exec(a);)g+=e[0],a=a.replace(w.match.PSEUDO,"");a=w.relative[a]?a+"*":a;e=0;for(var h= b.length;e]*)\/>/ig,Jb=/<([\w:]+)/,Kc=/]", "i"),Lb=/checked\s*(?:[^=]|=\s*.checked.)/i,Mb=/\/(java|ecma)script/i,Oc=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Ta=db(r);G.optgroup=G.option;G.tbody=G.tfoot=G.colgroup=G.caption=G.thead; G.th=G.td;c.support.htmlSerialize||(G._default=[1,"div
","
"]);c.fn.extend({text:function(a){return c.access(this,function(a){return a===k?c.text(this):this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapAll(a.call(this,b))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var a=this;a.firstChild&& 1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return c.isFunction(a)?this.each(function(b){c(this).wrapInner(a.call(this,b))}):this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){var b=c.isFunction(a);return this.each(function(d){c(this).wrapAll(b?a.call(this,d):a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()}, append:function(){return this.domManip(arguments,!0,function(a){1===this.nodeType&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1===this.nodeType&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=c.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&& this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c.clean(arguments));return a}},remove:function(a,b){for(var d=0,e;null!=(e=this[d]);d++)if(!a||c.filter(a,[e]).length)!b&&1===e.nodeType&&(c.cleanData(e.getElementsByTagName("*")),c.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;null!=(b=this[a]);a++)for(1=== b.nodeType&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a,b){a=null==a?!1:a;b=null==b?a:b;return this.map(function(){return c.clone(this,a,b)})},html:function(a){return c.access(this,function(a){var d=this[0]||{},e=0,f=this.length;if(a===k)return 1===d.nodeType?d.innerHTML.replace(Jc,""):null;if("string"==typeof a&&!Mc.test(a)&&(c.support.leadingWhitespace||!Sa.test(a))&&!G[(Jb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ib,"<$1>"); try{for(;ej.length&&h===r&&"<"===j.charAt(0)&&!Nc.test(j)&&(c.support.checkClone||!Lb.test(j))&&(c.support.html5Clone||!Kb.test(j))&&(f=!0,g=c.fragments[j],g&&1!==g&&(e=g));e||(e=h.createDocumentFragment(),c.clean(a,h,e,d));f&&(c.fragments[j]= g?e:1);return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=1===this.length&&this[0].parentNode;if(f&&11===f.nodeType&&1===f.childNodes.length&&1===d.length)return d[b](this[0]),this;for(var f=0,g=d.length;f")?e=a.cloneNode(!0):(e=r.createElement("div"),Ta.appendChild(e),e.innerHTML=a.outerHTML,e=e.firstChild);var h=e;if((!c.support.noCloneEvent||!c.support.noCloneChecked)&&(1===a.nodeType||11===a.nodeType)&&!c.isXMLDoc(a)){bb(a,h);e=ja(a);f=ja(h);for(g=0;e[g];++g)f[g]&&bb(e[g],f[g])}if(b&&(cb(a,h),d)){e=ja(a);f=ja(h);for(g=0;e[g];++g)cb(e[g],f[g])}return h},clean:function(a,b,d,e){var f,g=[];b=b||r;"undefined"==typeof b.createElement&& (b=b.ownerDocument||b[0]&&b[0].ownerDocument||r);for(var h=0,j;null!=(j=a[h]);h++)if("number"==typeof j&&(j+=""),j){if("string"==typeof j)if(Lc.test(j)){j=j.replace(Ib,"<$1>");f=(Jb.exec(j)||["",""])[1].toLowerCase();var p=G[f]||G._default,l=p[0],k=b.createElement("div"),m=Ta.childNodes,n;b===r?Ta.appendChild(k):db(b).appendChild(k);for(k.innerHTML=p[1]+j+p[2];l--;)k=k.lastChild;if(!c.support.tbody){l=Kc.test(j);p="table"===f&&!l?k.firstChild&&k.firstChild.childNodes:""===p[1]&&!l?k.childNodes: [];for(f=p.length-1;0<=f;--f)c.nodeName(p[f],"tbody")&&!p[f].childNodes.length&&p[f].parentNode.removeChild(p[f])}!c.support.leadingWhitespace&&Sa.test(j)&&k.insertBefore(b.createTextNode(Sa.exec(j)[0]),k.firstChild);j=k.childNodes;k&&(k.parentNode.removeChild(k),0c;c++)f[a+P[c]+b]=e[c]||e[c-2]||e[0];return f}}});var Vc=/%20/g,Wb=/\[\]$/,Pb=/\r?\n/g,Wc=/#.*$/,Xc=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Yc=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Zc=/^(?:GET|HEAD)$/,$c=/^\/\//,Qb=/\?/,ad=/)<[^<]*)*<\/script>/gi,bd=/^(?:select|textarea)/i,Ya=/\s+/,cd=/([?&])_=[^&]*/, Rb=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,Sb=c.fn.load,Ca={},Tb={},Q,T,Ub=["*/"]+["*"];try{Q=$b.href}catch(ld){Q=r.createElement("a"),Q.href="",Q=Q.href}T=Rb.exec(Q.toLowerCase())||[];c.fn.extend({load:function(a,b,d){if("string"!=typeof a&&Sb)return Sb.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(0<=e){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";b&&(c.isFunction(b)?(d=b,b=k):"object"==typeof b&&(b=c.param(b,c.ajaxSettings.traditional),e="POST"));var g= this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(a,b,e){e=a.responseText;a.isResolved()&&(a.done(function(a){e=a}),g.html(f?c("
").append(e.replace(ad,"")).find(f):e));d&&g.each(d,[e,b,a])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bd.test(this.nodeName)||Yc.test(this.type))}).map(function(a, b){var d=c(this).val();return null==d?null:c.isArray(d)?c.map(d,function(a){return{name:b.name,value:a.replace(Pb,"\r\n")}}):{name:b.name,value:d.replace(Pb,"\r\n")}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(a){return this.on(b,a)}});c.each(["get","post"],function(a,b){c[b]=function(a,e,f,g){c.isFunction(e)&&(g=g||f,f=e,e=k);return c.ajax({type:b,url:a,data:e,success:f,dataType:g})}});c.extend({getScript:function(a, b){return c.get(a,k,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},ajaxSetup:function(a,b){b?K(a,c.ajaxSettings):(b=a,a=c.ajaxSettings);K(a,b);return a},ajaxSettings:{url:Q,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(T[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Ub}, contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":m.String,"text html":!0,"text json":c.parseJSON,"text xml":c.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:R(Ca),ajaxTransport:R(Tb),ajax:function(a,b){function d(a,b,d,m){if(2!==w){w=2;v&&clearTimeout(v);s=k;r=m||"";x.readyState=0a||304===a){if(e.ifModified){if(C=x.getResponseHeader("Last-Modified"))c.lastModified[q]=C;if(C=x.getResponseHeader("Etag"))c.etag[q]=C}if(304===a)m="notmodified",n=!0;else try{C=e;C.dataFilter&&(d=C.dataFilter(d, C.dataType));var G=C.dataTypes;B={};var R,H,N=G.length,I,E=G[0],K,P,S,J,L;for(R=1;Ra&&(a=0);x.status=a;x.statusText=""+(b||m);n?h.resolveWith(f,[u,m,x]):h.rejectWith(f,[x,m,t]);x.statusCode(l);l=k;y&&g.trigger("ajax"+(n?"Success":"Error"),[x,e,n?u:t]);j.fireWith(f,[x,m]);y&&(g.trigger("ajaxComplete",[x,e]),--c.active||c.event.trigger("ajaxStop"))}}"object"==typeof a&&(b=a,a=k);b=b||{};var e=c.ajaxSetup({},b),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof c)?c(f):c.event,h=c.Deferred(),j=c.Callbacks("once memory"),l=e.statusCode||{},q,m={},n= {},r,u,s,v,t,w=0,y,F,x={readyState:0,setRequestHeader:function(a,b){if(!w){var c=a.toLowerCase();a=n[c]=n[c]||a;m[a]=b}return this},getAllResponseHeaders:function(){return 2===w?r:null},getResponseHeader:function(a){var b;if(2===w){if(!u)for(u={};b=Xc.exec(r);)u[b[1].toLowerCase()]=b[2];b=u[a.toLowerCase()]}return b===k?null:b},overrideMimeType:function(a){w||(e.mimeType=a);return this},abort:function(a){a=a||"abort";s&&s.abort(a);d(0,a);return this}};h.promise(x);x.success=x.done;x.error=x.fail; x.complete=j.add;x.statusCode=function(a){if(a){var b;if(2>w)for(b in a)l[b]=[l[b],a[b]];else b=a[x.status],x.then(b,b)}return this};e.url=((a||e.url)+"").replace(Wc,"").replace($c,T[1]+"//");e.dataTypes=c.trim(e.dataType||"*").toLowerCase().split(Ya);null==e.crossDomain&&(t=Rb.exec(e.url.toLowerCase()),e.crossDomain=!(!t||t[1]==T[1]&&t[2]==T[2]&&(t[3]||("http:"===t[1]?80:443))==(T[3]||("http:"===T[1]?80:443))));e.data&&e.processData&&"string"!=typeof e.data&&(e.data=c.param(e.data,e.traditional)); M(Ca,e,b,x);if(2===w)return!1;y=e.global;e.type=e.type.toUpperCase();e.hasContent=!Zc.test(e.type);y&&0===c.active++&&c.event.trigger("ajaxStart");if(!e.hasContent&&(e.data&&(e.url+=(Qb.test(e.url)?"&":"?")+e.data,delete e.data),q=e.url,!1===e.cache)){t=c.now();var z=e.url.replace(cd,"$1_="+t);e.url=z+(z===e.url?(Qb.test(e.url)?"&":"?")+"_="+t:"")}(e.data&&e.hasContent&&!1!==e.contentType||b.contentType)&&x.setRequestHeader("Content-Type",e.contentType);e.ifModified&&(q=q||e.url,c.lastModified[q]&& x.setRequestHeader("If-Modified-Since",c.lastModified[q]),c.etag[q]&&x.setRequestHeader("If-None-Match",c.etag[q]));x.setRequestHeader("Accept",e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+("*"!==e.dataTypes[0]?", "+Ub+"; q=0.01":""):e.accepts["*"]);for(F in e.headers)x.setRequestHeader(F,e.headers[F]);if(e.beforeSend&&(!1===e.beforeSend.call(f,x,e)||2===w))return x.abort(),!1;for(F in{success:1,error:1,complete:1})x[F](e[F]);if(s=M(Tb,e,b,x)){x.readyState=1;y&&g.trigger("ajaxSend", [x,e]);e.async&&0w)d(-1,A);else throw A;}}else d(-1,"No Transport");return x},param:function(a,b){var d=[],e=function(a,b){b=c.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};b===k&&(b=c.ajaxSettings.traditional);if(c.isArray(a)||a.jquery&&!c.isPlainObject(a))c.each(a,function(){e(this.name,this.value)});else for(var f in a)A(f,a[f],b,e);return d.join("&").replace(Vc, "+")}});c.extend({active:0,lastModified:{},etag:{}});var dd=c.now(),za=/(\=)\?(&|$)|\?\?/i;c.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return c.expando+"_"+dd++}});c.ajaxPrefilter("json jsonp",function(a,b,d){b="string"==typeof a.data&&/^application\/x\-www\-form\-urlencoded/.test(a.contentType);if("jsonp"===a.dataTypes[0]||!1!==a.jsonp&&(za.test(a.url)||b&&za.test(a.data))){var e,f=a.jsonpCallback=c.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,g=m[f],h=a.url,j=a.data, l="$1"+f+"$2";!1!==a.jsonp&&(h=h.replace(za,l),a.url===h&&(b&&(j=j.replace(za,l)),a.data===j&&(h+=(/\?/.test(h)?"&":"?")+a.jsonp+"="+f)));a.url=h;a.data=j;m[f]=function(a){e=[a]};d.always(function(){m[f]=g;e&&c.isFunction(g)&&m[f](e[0])});a.converters["script json"]=function(){e||c.error(f+" was not called");return e[0]};a.dataTypes[0]="json";return"script"}});c.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/}, converters:{"text script":function(a){c.globalEval(a);return a}}});c.ajaxPrefilter("script",function(a){a.cache===k&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});c.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=r.head||r.getElementsByTagName("head")[0]||r.documentElement;return{send:function(e,f){b=r.createElement("script");b.async="async";a.scriptCharset&&(b.charset=a.scriptCharset);b.src=a.url;b.onload=b.onreadystatechange=function(a,e){if(e||!b.readyState||/loaded|complete/.test(b.readyState))b.onload= b.onreadystatechange=null,c&&b.parentNode&&c.removeChild(b),b=k,e||f(200,"success")};c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(0,1)}}}});var Va=m.ActiveXObject?function(){for(var a in ba)ba[a](0,1)}:!1,ed=0,ba;c.ajaxSettings.xhr=m.ActiveXObject?function(){var a;if(!(a=!this.isLocal&&F()))a:{try{a=new m.ActiveXObject("Microsoft.XMLHTTP");break a}catch(b){}a=void 0}return a}:F;var Wa=c.ajaxSettings.xhr();c.extend(c.support,{ajax:!!Wa,cors:!!Wa&&"withCredentials"in Wa});c.support.ajax&& c.ajaxTransport(function(a){if(!a.crossDomain||c.support.cors){var b;return{send:function(d,e){var f=a.xhr(),g,h;a.username?f.open(a.type,a.url,a.async,a.username,a.password):f.open(a.type,a.url,a.async);if(a.xhrFields)for(h in a.xhrFields)f[h]=a.xhrFields[h];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType);!a.crossDomain&&!d["X-Requested-With"]&&(d["X-Requested-With"]="XMLHttpRequest");try{for(h in d)f.setRequestHeader(h,d[h])}catch(j){}f.send(a.hasContent&&a.data||null);b=function(d, h){var j,l,m,n,r;try{if(b&&(h||4===f.readyState))if(b=k,g&&(f.onreadystatechange=c.noop,Va&&delete ba[g]),h)4!==f.readyState&&f.abort();else{j=f.status;m=f.getAllResponseHeaders();n={};(r=f.responseXML)&&r.documentElement&&(n.xml=r);try{n.text=f.responseText}catch(u){}try{l=f.statusText}catch(s){l=""}!j&&a.isLocal&&!a.crossDomain?j=n.text?200:404:1223===j&&(j=204)}}catch(t){h||e(-1,t)}n&&e(j,l,n,m)};!a.async||4===f.readyState?b():(g=++ed,Va&&(ba||(ba={},c(m).unload(Va)),ba[g]=b),f.onreadystatechange= b)},abort:function(){b&&b(0,1)}}}});var Ba={},I,U,fd=/^(?:toggle|show|hide)$/,gd=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Aa,ha=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ia;c.fn.extend({show:function(a,b,d){var e;if(a||0===a)return this.animate(l("show",3),a,b,d);b=0;for(d=this.length;b=h.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();h.animatedProperties[this.prop]=!0;for(b in h.animatedProperties)!0!==h.animatedProperties[b]&&(f=!1);if(f){null!=h.overflow&&!c.support.shrinkWrapBlocks&&c.each(["","X","Y"],function(a,b){g.style["overflow"+b]=h.overflow[a]});h.hide&&c(g).hide();if(h.hide||h.show)for(b in h.animatedProperties)c.style(g,b,h.orig[b]),c.removeData(g,"fxshow"+b,!0),c.removeData(g,"toggle"+ b,!0);(a=h.complete)&&(h.complete=!1,a.call(g))}return!1}Infinity==h.duration?this.now=e:(d=e-this.startTime,this.state=d/h.duration,this.pos=c.easing[h.animatedProperties[this.prop]](this.state,d,0,1,h.duration),this.now=this.start+(this.end-this.start)*this.pos);this.update();return!0}};c.extend(c.fx,{tick:function(){for(var a,b=c.timers,d=0;d=b[e]?b[d]:Math.max(a.body[e],b[e],a.body[f],b[f]);if(g===k)return a=c.css(a,b),b=parseFloat(a),c.isNumeric(b)?b:a;c(a).css(b,g)},b,a,arguments.length,null)}});m.jQuery=m.$=c;"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return c})})(window);jQuery.noConflict();(function(m,k){function N(l,k){var v=l.nodeName.toLowerCase();if("area"===v){var v=l.parentNode,F=v.name,A;return!l.href||!F||"map"!==v.nodeName.toLowerCase()?!1:(A=m("img[usemap=#"+F+"]")[0],!!A&&y(A))}return(/input|select|textarea|button|object/.test(v)?!l.disabled:"a"==v?l.href||k:k)&&y(l)}function y(l){return!m(l).parents().andSelf().filter(function(){return"hidden"===m.curCSS(this,"visibility")||m.expr.filters.hidden(this)}).length}m.ui=m.ui||{};m.ui.version||(m.extend(m.ui,{version:"1.8.20", keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),m.fn.extend({propAttr:m.fn.prop||m.fn.attr,_focus:m.fn.focus,focus:function(l,k){return"number"==typeof l?this.each(function(){var v= this;setTimeout(function(){m(v).focus();k&&k.call(v)},l)}):this._focus.apply(this,arguments)},scrollParent:function(){var l;return m.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?l=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(m.curCSS(this,"position",1))&&/(auto|scroll)/.test(m.curCSS(this,"overflow",1)+m.curCSS(this,"overflow-y",1)+m.curCSS(this,"overflow-x",1))}).eq(0):l=this.parents().filter(function(){return/(auto|scroll)/.test(m.curCSS(this, "overflow",1)+m.curCSS(this,"overflow-y",1)+m.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!l.length?m(document):l},zIndex:function(l){if(l!==k)return this.css("zIndex",l);if(this.length){l=m(this[0]);for(var u;l.length&&l[0]!==document;){u=l.css("position");if("absolute"===u||"relative"===u||"fixed"===u)if(u=parseInt(l.css("zIndex"),10),!isNaN(u)&&0!==u)return u;l=l.parent()}}return 0},disableSelection:function(){return this.bind((m.support.selectstart?"selectstart":"mousedown")+ ".ui-disableSelection",function(l){l.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),m.each(["Width","Height"],function(l,u){function v(l,k,u,v){return m.each(y,function(){k-=parseFloat(m.curCSS(l,"padding"+this,!0))||0;u&&(k-=parseFloat(m.curCSS(l,"border"+this+"Width",!0))||0);v&&(k-=parseFloat(m.curCSS(l,"margin"+this,!0))||0)}),k}var y="Width"===u?["Left","Right"]:["Top","Bottom"],A=u.toLowerCase(),K={innerWidth:m.fn.innerWidth,innerHeight:m.fn.innerHeight, outerWidth:m.fn.outerWidth,outerHeight:m.fn.outerHeight};m.fn["inner"+u]=function(l){return l===k?K["inner"+u].call(this):this.each(function(){m(this).css(A,v(this,l)+"px")})};m.fn["outer"+u]=function(l,k){return"number"!=typeof l?K["outer"+u].call(this,l):this.each(function(){m(this).css(A,v(this,l,!0,k)+"px")})}}),m.extend(m.expr[":"],{data:function(l,k,v){return!!m.data(l,v[3])},focusable:function(l){return N(l,!isNaN(m.attr(l,"tabindex")))},tabbable:function(l){var k=m.attr(l,"tabindex"),v=isNaN(k); return(v||0<=k)&&N(l,!v)}}),m(function(){var l=document.body,k=l.appendChild(k=document.createElement("div"));k.offsetHeight;m.extend(k.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});m.support.minHeight=100===k.offsetHeight;m.support.selectstart="onselectstart"in k;l.removeChild(k).style.display="none"}),m.extend(m.ui,{plugin:{add:function(l,k,v){l=m.ui[l].prototype;for(var y in v)l.plugins[y]=l.plugins[y]||[],l.plugins[y].push([k,v[y]])},call:function(l,k,m){if((k=l.plugins[k])&& l.element[0].parentNode)for(var y=0;yk&&l0?d.split("/").slice(0,-1).join("/")+"/":""}(),q=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||false,r=window.cancelRequestAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame|| window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||false,x=false,E=function(){if(x)return x;var d=document.createElement("DIV"),c={haspointerlock:"pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document};c.isopera="opera"in window;c.isopera12=c.isopera&&"getUserMedia"in navigator;c.isie="all"in document&&"attachEvent"in d&&!c.isopera;c.isieold=c.isie&&!("msInterpolationMode"in d.style);c.isie7=c.isie&&!c.isieold&&(!("documentMode"in document)||document.documentMode==7);c.isie8=c.isie&&"documentMode"in document&&document.documentMode==8;c.isie9=c.isie&&"performance"in window&&document.documentMode>=9;c.isie10=c.isie&&"performance"in window&&document.documentMode>=10;c.isie9mobile=/iemobile.9/i.test(navigator.userAgent);if(c.isie9mobile)c.isie9=false;c.isie7mobile=!c.isie9mobile&&c.isie7&&/iemobile/i.test(navigator.userAgent);c.ismozilla="MozAppearance"in d.style;c.iswebkit="WebkitAppearance"in d.style;c.ischrome="chrome"in window; c.ischrome22=c.ischrome&&c.haspointerlock;c.cantouch="ontouchstart"in document.documentElement;c.hasmstouch=window.navigator.msPointerEnabled||false;c.ismac=/^mac$/i.test(navigator.platform);c.isios=c.cantouch&&/iphone|ipad|ipod/i.test(navigator.platform);c.isios4=c.isios&&!("seal"in Object);c.isandroid=/android/i.test(navigator.userAgent);c.trstyle=false;c.hastransform=false;c.hastranslate3d=false;c.transitionstyle=false;c.hastransition=false;c.transitionend=false;for(var h=["transform","msTransform", "webkitTransform","MozTransform","OTransform"],i=0;ih&&!d.tt)b.delaylist[f]={last:h+g,tt:setTimeout(function(){b.delaylist[f].tt=0;c.call()},g)};else if(!d||!d.tt)b.delaylist[f]= {last:h,tt:0},setTimeout(function(){c.call()},0)};this.synched=function(f,c){b.synclist[f]=c;(function(){if(!b.onsync)q(function(){b.onsync=false;for(f in b.synclist){var c=b.synclist[f];c&&c.call(b);b.synclist[f]=false}}),b.onsync=true})();return f};this.unsynched=function(f){b.synclist[f]&&(b.synclist[f]=false)};this.css=function(f,c){for(var g in c)b.saved.css.push([f,g,f.css(g)]),f.css(g,c[g])};this.scrollTop=function(f){return typeof f=="undefined"?b.getScrollTop():b.setScrollTop(f)};this.scrollLeft= function(f){return typeof f=="undefined"?b.getScrollLeft():b.setScrollLeft(f)};BezierClass=function(b,c,g,e,d,h,i){this.st=b;this.ed=c;this.spd=g;this.p1=e||0;this.p2=d||1;this.p3=h||0;this.p4=i||1;this.ts=(new Date).getTime();this.df=this.ed-this.st};BezierClass.prototype={B2:function(b){return 3*b*b*(1-b)},B3:function(b){return 3*b*(1-b)*(1-b)},B4:function(b){return(1-b)*(1-b)*(1-b)},getNow:function(){var b=1-((new Date).getTime()-this.ts)/this.spd,c=this.B2(b)+this.B3(b)+this.B4(b);return b<0? this.ed:this.st+Math.round(this.df*c)},update:function(b,c){this.st=this.getNow();this.ed=b;this.spd=c;this.ts=(new Date).getTime();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};e.hastranslate3d&&e.isios&&this.doc.css("-webkit-backface-visibility","hidden");var n=function(){var f=b.doc.css(e.trstyle);return f&&f.substr(0,6)=="matrix"?f.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):false};this.getScrollTop=function(f){if(!f){if(f= n())return f.length==16?-f[13]:-f[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y};this.getScrollLeft=function(f){if(!f){if(f=n())return f.length==16?-f[12]:-f[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x};this.notifyScrollEvent=document.createEvent?function(b){var c=document.createEvent("UIEvents");c.initUIEvent("scroll",false,true,window,1);b.dispatchEvent(c)}:document.fireEvent?function(b){var c= document.createEventObject();b.fireEvent("onscroll");c.cancelBubble=true}:function(){};e.hastranslate3d&&b.opt.enabletranslate3d?(this.setScrollTop=function(f,c){b.doc.translate.y=f;b.doc.translate.ty=f*-1+"px";b.doc.css(e.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0px)");c||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(f,c){b.doc.translate.x=f;b.doc.translate.tx=f*-1+"px";b.doc.css(e.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0px)");c|| b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(f,c){b.doc.translate.y=f;b.doc.translate.ty=f*-1+"px";b.doc.css(e.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");c||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(f,c){b.doc.translate.x=f;b.doc.translate.tx=f*-1+"px";b.doc.css(e.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");c||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop=function(){return b.docscroll.scrollTop()},this.setScrollTop= function(f){return b.docscroll.scrollTop(f)},this.getScrollLeft=function(){return b.docscroll.scrollLeft()},this.setScrollLeft=function(f){return b.docscroll.scrollLeft(f)};this.getTarget=function(b){return!b?false:b.target?b.target:b.srcElement?b.srcElement:false};this.hasParent=function(b,c){if(!b)return false;for(var g=b.target||b.srcElement||b||false;g&&g.id!=c;)g=g.parentNode||false;return g!==false};var p={thin:1,medium:3,thick:5};this.updateScrollBar=function(f){if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()}), b.railh&&b.railh.css({width:b.win.innerWidth()});else{var c=b.isfixed?{top:parseFloat(b.win.css("top")),left:parseFloat(b.win.css("left"))}:b.win.offset(),g=c.top,e=c.left;g+=h(b.win,"border-top-width",true);b.win.outerWidth();b.win.innerWidth();e+=b.rail.align?b.win.outerWidth()-h(b.win,"border-right-width")-b.rail.width:h(b.win,"border-left-width");var d=b.opt.railoffset;d&&(d.top&&(g+=d.top),b.rail.align&&d.left&&(e+=d.left));b.locked||b.rail.css({top:g,left:e,height:f?f.h:b.win.innerHeight()}); b.zoom&&b.zoom.css({top:g+1,left:b.rail.align==1?e-20:e+b.rail.width+4});if(b.railh&&!b.locked)g=c.top,e=c.left,f=b.railh.align?g+h(b.win,"border-top-width",true)+b.win.innerHeight()-b.railh.height:g+h(b.win,"border-top-width",true),e+=h(b.win,"border-left-width"),b.railh.css({top:f,left:e,width:b.railh.width})}};this.doRailClick=function(f,c,g){var e;!(b.rail.drag&&b.rail.drag.pt!=1)&&!b.locked&&!b.rail.drag&&(b.cancelScroll(),b.cancelEvent(f),c?(c=g?b.doScrollLeft:b.doScrollTop,e=g?(f.pageX-b.railh.offset().left- b.cursorwidth/2)*b.scrollratio.x:(f.pageY-b.rail.offset().top-b.cursorheight/2)*b.scrollratio.y,c(e)):(c=g?b.doScrollLeftBy:b.doScrollBy,e=g?b.scroll.x:b.scroll.y,f=g?f.pageX-b.railh.offset().left:f.pageY-b.rail.offset().top,g=g?b.view.w:b.view.h,e>=f?c(g):c(-g)))};b.hasanimationframe=q;b.hascancelanimationframe=r;b.hasanimationframe?b.hascancelanimationframe||(r=function(){b.cancelAnimationFrame=true}):(q=function(b){return setTimeout(b,16)},r=clearInterval);this.init=function(){b.saved.css=[];if(e.isie7mobile)return true; e.hasmstouch&&b.css(b.ispage?d("html"):b.win,{"-ms-touch-action":"none"});if(!b.ispage||!e.cantouch&&!e.isieold&&!e.isie9mobile){var f=b.docscroll;b.ispage&&(f=b.haswrapper?b.win:b.doc);e.isie9mobile||b.css(f,{"overflow-y":"hidden"});b.ispage&&e.isie7&&(b.doc[0].nodeName=="BODY"?b.css(d("html"),{"overflow-y":"hidden"}):b.doc[0].nodeName=="HTML"&&b.css(d("body"),{"overflow-y":"hidden"}));e.isios&&!b.ispage&&!b.haswrapper&&b.css(d("body"),{"-webkit-overflow-scrolling":"touch"});var c=d(document.createElement("div")); c.css({position:"relative",top:0,"float":"right",width:b.opt.cursorwidth,height:"0px","background-color":b.opt.cursorcolor,border:b.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":b.opt.cursorborderradius,"-moz-border-radius":b.opt.cursorborderradius,"border-radius":b.opt.cursorborderradius});c.hborder=parseFloat(c.outerHeight()-c.innerHeight());b.cursor=c;var g=d(document.createElement("div"));g.attr("id",b.id);var h,i,j=["left","right"],y;for(y in j)i=j[y],(h=b.opt.railpadding[i])? g.css("padding-"+i,h+"px"):b.opt.railpadding[i]=0;g.append(c);g.width=Math.max(parseFloat(b.opt.cursorwidth),c.outerWidth())+b.opt.railpadding.left+b.opt.railpadding.right;g.css({width:g.width+"px",zIndex:b.ispage?b.opt.zindex:b.opt.zindex+2,background:b.opt.background});g.visibility=true;g.scrollable=true;g.align=b.opt.railalign=="left"?0:1;b.rail=g;c=b.rail.drag=false;if(b.opt.boxzoom&&!b.ispage&&!e.isieold&&(c=document.createElement("div"),b.bind(c,"click",b.doZoom),b.zoom=d(c),b.zoom.css({cursor:"pointer", "z-index":b.opt.zindex,backgroundImage:"url("+D+"zoomico.png)",height:18,width:18,backgroundPosition:"0px 0px"}),b.opt.dblclickzoom&&b.bind(b.win,"dblclick",b.doZoom),e.cantouch&&b.opt.gesturezoom))b.ongesturezoom=function(c){c.scale>1.5&&b.doZoomIn(c);c.scale<0.8&&b.doZoomOut(c);return b.cancelEvent(c)},b.bind(b.win,"gestureend",b.ongesturezoom);b.railh=false;if(b.opt.horizrailenabled){b.css(f,{"overflow-x":"hidden"});c=d(document.createElement("div"));c.css({position:"relative",top:0,height:b.opt.cursorwidth, width:"0px","background-color":b.opt.cursorcolor,border:b.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":b.opt.cursorborderradius,"-moz-border-radius":b.opt.cursorborderradius,"border-radius":b.opt.cursorborderradius});c.wborder=parseFloat(c.outerWidth()-c.innerWidth());b.cursorh=c;var k=d(document.createElement("div"));k.attr("id",b.id+"-hr");k.height=1+Math.max(parseFloat(b.opt.cursorwidth),c.outerHeight());k.css({height:k.height+"px",zIndex:b.ispage?b.opt.zindex:b.opt.zindex+ 2,background:b.opt.background});k.append(c);k.visibility=true;k.scrollable=true;k.align=b.opt.railvalign=="top"?0:1;b.railh=k;b.railh.drag=false}b.ispage?(g.css({position:"fixed",top:"0px",height:"100%"}),g.align?g.css({right:"0px"}):g.css({left:"0px"}),b.body.append(g),b.railh&&(k.css({position:"fixed",left:"0px",width:"100%"}),k.align?k.css({bottom:"0px"}):k.css({top:"0px"}),b.body.append(k))):(b.ishwscroll?(b.win.css("position")=="static"&&b.css(b.win,{position:"relative"}),f=b.win[0].nodeName== "HTML"?b.body:b.win,b.zoom&&(b.zoom.css({position:"absolute",top:1,right:0,"margin-right":g.width+4}),f.append(b.zoom)),g.css({position:"absolute",top:0}),g.align?g.css({right:0}):g.css({left:0}),f.append(g),k&&(k.css({position:"absolute",left:0,bottom:0}),k.align?k.css({bottom:0}):k.css({top:0}),f.append(k))):(b.isfixed=b.win.css("position")=="fixed",f=b.isfixed?"fixed":"absolute",g.css({position:f}),b.zoom&&b.zoom.css({position:f}),b.updateScrollBar(),b.body.append(g),b.zoom&&b.body.append(b.zoom), b.railh&&(k.css({position:f}),b.body.append(k))),e.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),e.isie&&b.opt.disableoutline&&b.win.attr("hideFocus","true"),e.iswebkit&&b.opt.disableoutline&&b.win.css({outline:"none"}));if(b.opt.autohidemode===false)b.autohidedom=false;else if(b.opt.autohidemode===true){if(b.autohidedom=d().add(b.rail),b.railh)b.autohidedom=b.autohidedom.add(b.railh)}else if(b.opt.autohidemode=="scroll"){if(b.autohidedom=d().add(b.rail), b.railh)b.autohidedom=b.autohidedom.add(b.railh)}else if(b.opt.autohidemode=="cursor"){if(b.autohidedom=d().add(b.cursor),b.railh)b.autohidedom=b.autohidedom.add(b.railh.cursor)}else if(b.opt.autohidemode=="hidden")b.autohidedom=false,b.hide(),b.locked=false;if(e.isie9mobile)b.scrollmom=new z(b),b.onmangotouch=function(){var c=b.getScrollTop(),f=b.getScrollLeft();if(c==b.scrollmom.lastscrolly&&f==b.scrollmom.lastscrollx)return true;var g=c-b.mangotouch.sy,e=f-b.mangotouch.sx;if(Math.round(Math.sqrt(Math.pow(e, 2)+Math.pow(g,2)))!=0){var l=g<0?-1:1,d=e<0?-1:1,h=+new Date;b.mangotouch.lazy&&clearTimeout(b.mangotouch.lazy);if(h-b.mangotouch.tm>80||b.mangotouch.dry!=l||b.mangotouch.drx!=d)b.scrollmom.stop(),b.scrollmom.reset(f,c),b.mangotouch.sy=c,b.mangotouch.ly=c,b.mangotouch.sx=f,b.mangotouch.lx=f,b.mangotouch.dry=l,b.mangotouch.drx=d,b.mangotouch.tm=h;else if(b.scrollmom.stop(),b.scrollmom.update(b.mangotouch.sx-e,b.mangotouch.sy-g),b.mangotouch.tm=h,g=Math.max(Math.abs(b.mangotouch.ly-c),Math.abs(b.mangotouch.lx- f)),b.mangotouch.ly=c,b.mangotouch.lx=f,g>2)b.mangotouch.lazy=setTimeout(function(){b.mangotouch.lazy=false;b.mangotouch.dry=0;b.mangotouch.drx=0;b.mangotouch.tm=0;b.scrollmom.doMomentum(30)},100)}},g=b.getScrollTop(),k=b.getScrollLeft(),b.mangotouch={sy:g,ly:g,dry:0,sx:k,lx:k,drx:0,lazy:false,tm:0},b.bind(b.docscroll,"scroll",b.onmangotouch);else{if(e.cantouch||b.istouchcapable||b.opt.touchbehavior||e.hasmstouch){b.scrollmom=new z(b);b.ontouchstart=function(c){if(c.pointerType&&c.pointerType!=2)return false; if(!b.locked){if(e.hasmstouch)for(var f=c.target?c.target:false;f;){var g=d(f).getNiceScroll();if(g.length>0&&g[0].me==b.me)break;if(g.length>0)return false;if(f.nodeName=="DIV"&&f.id==b.id)break;f=f.parentNode?f.parentNode:false}b.cancelScroll();if((f=b.getTarget(c))&&/INPUT/i.test(f.nodeName)&&/range/i.test(f.type))return b.stopPropagation(c);if(b.forcescreen)g=c,c={original:c.original?c.original:c},c.clientX=g.screenX,c.clientY=g.screenY;b.rail.drag={x:c.clientX,y:c.clientY,sx:b.scroll.x,sy:b.scroll.y, st:b.getScrollTop(),sl:b.getScrollLeft(),pt:2};b.opt.touchbehavior&&b.isiframe&&e.isie&&(g=b.win.position(),b.rail.drag.x+=g.left,b.rail.drag.y+=g.top);b.hasmoving=false;b.lastmouseup=false;b.scrollmom.reset(c.clientX,c.clientY);if(!e.cantouch&&!this.istouchcapable&&!e.hasmstouch){if(!f||!/INPUT|SELECT|TEXTAREA/i.test(f.nodeName))return!b.ispage&&e.hasmousecapture&&f.setCapture(),b.cancelEvent(c);if(/SUBMIT|CANCEL|BUTTON/i.test(d(f).attr("type")))pc={tg:f,click:false},b.preventclick=pc}}};b.ontouchend= function(c){if(c.pointerType&&c.pointerType!=2)return false;if(b.rail.drag&&b.rail.drag.pt==2&&(b.scrollmom.doMomentum(),b.rail.drag=false,b.hasmoving&&(b.hasmoving=false,b.lastmouseup=true,b.hideCursor(),e.hasmousecapture&&document.releaseCapture(),!e.cantouch)))return b.cancelEvent(c)};var o=b.opt.touchbehavior&&b.isiframe&&!e.hasmousecapture;b.ontouchmove=function(c,f){if(c.pointerType&&c.pointerType!=2)return false;if(b.rail.drag&&b.rail.drag.pt==2){if(e.cantouch&&typeof c.original=="undefined")return true; b.hasmoving=true;if(b.preventclick&&!b.preventclick.click)b.preventclick.click=b.preventclick.tg.onclick||false,b.preventclick.tg.onclick=b.onpreventclick;if(b.forcescreen){var g=c,c={original:c.original?c.original:c};c.clientX=g.screenX;c.clientY=g.screenY}g=ofy=0;if(o&&!f){var l=b.win.position(),g=-l.left;ofy=-l.top}var d=c.clientY+ofy,h=b.rail.drag.st-(d-b.rail.drag.y);if(b.ishwscroll&&b.opt.bouncescroll)h<0?h=Math.round(h/2):h>b.page.maxh&&(h=b.page.maxh+Math.round((h-b.page.maxh)/2));else if(h< 0&&(d=h=0),h>b.page.maxh)h=b.page.maxh,d=0;var i=c.clientX+g;if(b.railh&&b.railh.scrollable){var m=b.rail.drag.sl-(i-b.rail.drag.x);if(b.ishwscroll&&b.opt.bouncescroll)m<0?m=Math.round(m/2):m>b.page.maxw&&(m=b.page.maxw+Math.round((m-b.page.maxw)/2));else if(m<0&&(i=m=0),m>b.page.maxw)m=b.page.maxw,i=0}b.synched("touchmove",function(){b.rail.drag&&b.rail.drag.pt==2&&(b.prepareTransition&&b.prepareTransition(0),b.rail.scrollable&&b.setScrollTop(h),b.scrollmom.update(i,d),b.railh&&b.railh.scrollable? (b.setScrollLeft(m),b.showCursor(h,m)):b.showCursor(h),e.isie10&&document.selection.clear())});return b.cancelEvent(c)}}}e.cantouch||b.opt.touchbehavior?(b.onpreventclick=function(c){if(b.preventclick)return b.preventclick.tg.onclick=b.preventclick.click,b.preventclick=false,b.cancelEvent(c)},b.onmousedown=b.ontouchstart,b.onmouseup=b.ontouchend,b.onclick=e.isios?false:function(c){return b.lastmouseup?(b.lastmouseup=false,b.cancelEvent(c)):true},b.onmousemove=b.ontouchmove,e.cursorgrabvalue&&(b.css(b.ispage? b.doc:b.win,{cursor:e.cursorgrabvalue}),b.css(b.rail,{cursor:e.cursorgrabvalue}))):(b.onmousedown=function(c,f){if(!(b.rail.drag&&b.rail.drag.pt!=1)){if(b.locked)return b.cancelEvent(c);b.cancelScroll();b.rail.drag={x:c.clientX,y:c.clientY,sx:b.scroll.x,sy:b.scroll.y,pt:1,hr:!!f};var g=b.getTarget(c);!b.ispage&&e.hasmousecapture&&g.setCapture();if(b.isiframe&&!e.hasmousecapture)b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"});return b.cancelEvent(c)}},b.onmouseup= function(c){if(b.rail.drag&&(e.hasmousecapture&&document.releaseCapture(),b.isiframe&&!e.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),b.rail.drag.pt==1))return b.rail.drag=false,b.cancelEvent(c)},b.onmousemove=function(c){if(b.rail.drag){if(b.rail.drag.pt==1){if(e.ischrome&&c.which==0)return b.onmouseup(c);b.cursorfreezed=true;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(c.clientX-b.rail.drag.x);if(b.scroll.x<0)b.scroll.x=0;var f=b.scrollvaluemaxw;if(b.scroll.x>f)b.scroll.x= f}else{b.scroll.y=b.rail.drag.sy+(c.clientY-b.rail.drag.y);if(b.scroll.y<0)b.scroll.y=0;f=b.scrollvaluemax;if(b.scroll.y>f)b.scroll.y=f}b.synched("mousemove",function(){b.rail.drag&&b.rail.drag.pt==1&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x*b.scrollratio.x)):b.doScrollTop(Math.round(b.scroll.y*b.scrollratio.y)))});return b.cancelEvent(c)}}else b.checkarea=true});(e.cantouch||b.opt.touchbehavior)&&b.bind(b.win,"mousedown",b.onmousedown);e.hasmstouch&&(b.css(b.rail,{"-ms-touch-action":"none"}), b.css(b.cursor,{"-ms-touch-action":"none"}),b.bind(b.win,"MSPointerDown",b.ontouchstart),b.bind(document,"MSPointerUp",b.ontouchend),b.bind(document,"MSPointerMove",b.ontouchmove),b.bind(b.cursor,"MSGestureHold",function(b){b.preventDefault()}),b.bind(b.cursor,"contextmenu",function(b){b.preventDefault()}));this.istouchcapable&&(b.bind(b.win,"touchstart",b.ontouchstart),b.bind(document,"touchend",b.ontouchend),b.bind(document,"touchmove",b.ontouchmove));b.bind(b.cursor,"mousedown",b.onmousedown); b.bind(b.cursor,"mouseup",b.onmouseup);b.railh&&(b.bind(b.cursorh,"mousedown",function(c){b.onmousedown(c,true)}),b.bind(b.cursorh,"mouseup",function(c){if(!(b.rail.drag&&b.rail.drag.pt==2))return b.rail.drag=false,b.hasmoving=false,b.hideCursor(),e.hasmousecapture&&document.releaseCapture(),b.cancelEvent(c)}));b.bind(document,"mouseup",b.onmouseup);e.hasmousecapture&&b.bind(b.win,"mouseup",b.onmouseup);b.bind(document,"mousemove",b.onmousemove);b.onclick&&b.bind(document,"click",b.onclick);!e.cantouch&& !b.opt.touchbehavior&&(b.rail.mouseenter(function(){b.canshowonmouseevent&&b.showCursor();b.rail.active=true}),b.rail.mouseleave(function(){b.rail.active=false;b.rail.drag||b.hideCursor()}),b.opt.sensitiverail&&(b.rail.click(function(c){b.doRailClick(c,false,false)}),b.rail.dblclick(function(c){b.doRailClick(c,true,false)}),b.cursor.click(function(c){b.cancelEvent(c)}),b.cursor.dblclick(function(c){b.cancelEvent(c)})),b.railh&&(b.railh.mouseenter(function(){b.canshowonmouseevent&&b.showCursor();b.rail.active= true}),b.railh.mouseleave(function(){b.rail.active=false;b.rail.drag||b.hideCursor()})),b.zoom&&(b.zoom.mouseenter(function(){b.canshowonmouseevent&&b.showCursor();b.rail.active=true}),b.zoom.mouseleave(function(){b.rail.active=false;b.rail.drag||b.hideCursor()})));b.opt.enablemousewheel&&(b.isiframe||b.bind(e.isie&&b.ispage?document:b.docscroll,"mousewheel",b.onmousewheel),b.bind(b.rail,"mousewheel",b.onmousewheel),b.railh&&b.bind(b.railh,"mousewheel",b.onmousewheelhr));!b.ispage&&!e.cantouch&&!/HTML|BODY/.test(b.win[0].nodeName)&& (b.win.attr("tabindex")||b.win.attr({tabindex:B++}),b.win.focus(function(c){s=b.getTarget(c).id||true;b.hasfocus=true;b.canshowonmouseevent&&b.noticeCursor()}),b.win.blur(function(){s=false;b.hasfocus=false}),b.win.mouseenter(function(c){w=b.getTarget(c).id||true;b.hasmousefocus=true;b.canshowonmouseevent&&b.noticeCursor()}),b.win.mouseleave(function(){w=false;b.hasmousefocus=false}))}b.onkeypress=function(c){if(b.locked&&b.page.maxh==0)return true;var c=c?c:window.e,f=b.getTarget(c);if(f&&/INPUT|TEXTAREA|SELECT|OPTION/.test(f.nodeName)&& (!f.getAttribute("type")&&!f.type||!/submit|button|cancel/i.tp))return true;if(b.hasfocus||b.hasmousefocus&&!s||b.ispage&&!s&&!w){var f=c.keyCode,g=c.ctrlKey||false;if(b.locked&&f!=27)return b.cancelEvent(c);var e=false;switch(f){case 38:case 63233:b.doScrollBy(72);e=true;break;case 40:case 63235:b.doScrollBy(-72);e=true;break;case 37:case 63232:b.railh&&(g?b.doScrollLeft(0):b.doScrollLeftBy(72),e=true);break;case 39:case 63234:b.railh&&(g?b.doScrollLeft(b.page.maxw):b.doScrollLeftBy(-72),e=true); break;case 33:case 63276:b.doScrollBy(b.view.h);e=true;break;case 34:case 63277:b.doScrollBy(-b.view.h);e=true;break;case 36:case 63273:b.railh&&g?b.doScrollPos(0,0):b.doScrollTo(0);e=true;break;case 35:case 63275:b.railh&&g?b.doScrollPos(b.page.maxw,b.page.maxh):b.doScrollTo(b.page.maxh);e=true;break;case 32:b.opt.spacebarenabled&&(b.doScrollBy(-b.view.h),e=true);break;case 27:b.zoomactive&&(b.doZoom(),e=true)}if(e)return b.cancelEvent(c)}};b.opt.enablekeyboard&&b.bind(document,e.isopera&&!e.isopera12? "keypress":"keydown",b.onkeypress);b.bind(window,"resize",b.resize);b.bind(window,"orientationchange",b.resize);b.bind(window,"load",b.resize);if(e.ischrome&&!b.ispage&&!b.haswrapper){var n=b.win.attr("style"),g=parseFloat(b.win.css("width"))+1;b.win.css("width",g);b.synched("chromefix",function(){b.win.attr("style",n)})}b.onAttributeChange=function(){b.lazyResize()};if(!b.ispage&&!b.haswrapper)"WebKitMutationObserver"in window?(b.observer=new WebKitMutationObserver(function(c){c.forEach(b.onAttributeChange)}), b.observer.observe(b.win[0],{attributes:true,subtree:false})):(b.bind(b.win,e.isie&&!e.isie9?"propertychange":"DOMAttrModified",b.onAttributeChange),e.isie9&&b.win[0].attachEvent("onpropertychange",b.onAttributeChange));!b.ispage&&b.opt.boxzoom&&b.bind(window,"resize",b.resizeZoom);b.istextarea&&b.bind(b.win,"mouseup",b.resize);b.resize()}if(this.doc[0].nodeName=="IFRAME"){var A=function(){b.iframexd=false;try{var c="contentDocument"in this?this.contentDocument:this.contentWindow.document}catch(f){b.iframexd= true,c=false}if(b.iframexd)return"console"in window&&console.log("NiceScroll error: policy restriced iframe"),true;b.forcescreen=true;if(b.isiframe)b.iframe={doc:d(c),html:b.doc.contents().find("html")[0],body:b.doc.contents().find("body")[0]},b.getContentSize=function(){return{w:Math.max(b.iframe.html.scrollWidth,b.iframe.body.scrollWidth),h:Math.max(b.iframe.html.scrollHeight,b.iframe.body.scrollHeight)}},b.docscroll=d(b.iframe.body);if(!e.isios&&b.opt.iframeautoresize&&!b.isiframe){b.win.scrollTop(0); b.doc.height("");var g=Math.max(c.getElementsByTagName("html")[0].scrollHeight,c.body.scrollHeight);b.doc.height(g)}b.resize();e.isie7&&b.css(d(b.iframe.html),{"overflow-y":"hidden"});b.css(d(b.iframe.body),{"overflow-y":"hidden"});"contentWindow"in this?b.bind(this.contentWindow,"scroll",b.onscroll):b.bind(c,"scroll",b.onscroll);b.opt.enablemousewheel&&b.bind(c,"mousewheel",b.onmousewheel);b.opt.enablekeyboard&&b.bind(c,e.isopera?"keypress":"keydown",b.onkeypress);if(e.cantouch||b.opt.touchbehavior)b.bind(c, "mousedown",b.onmousedown),b.bind(c,"mousemove",function(c){b.onmousemove(c,true)}),e.cursorgrabvalue&&b.css(d(c.body),{cursor:e.cursorgrabvalue});b.bind(c,"mouseup",b.onmouseup);b.zoom&&(b.opt.dblclickzoom&&b.bind(c,"dblclick",b.doZoom),b.ongesturezoom&&b.bind(c,"gestureend",b.ongesturezoom))};this.doc[0].readyState&&this.doc[0].readyState=="complete"&&setTimeout(function(){A.call(b.doc[0],false)},500);b.bind(this.doc,"load",A)}};this.showCursor=function(c,e){if(b.cursortimeout)clearTimeout(b.cursortimeout), b.cursortimeout=0;if(b.rail){if(b.autohidedom)b.autohidedom.stop().css({opacity:b.opt.cursoropacitymax}),b.cursoractive=true;if(typeof c!="undefined"&&c!==false)b.scroll.y=Math.round(c*1/b.scrollratio.y);if(typeof e!="undefined")b.scroll.x=Math.round(e*1/b.scrollratio.x);b.cursor.css({height:b.cursorheight,top:b.scroll.y});if(b.cursorh)!b.rail.align&&b.rail.visibility?b.cursorh.css({width:b.cursorwidth,left:b.scroll.x+b.rail.width}):b.cursorh.css({width:b.cursorwidth,left:b.scroll.x}),b.cursoractive= true;b.zoom&&b.zoom.stop().css({opacity:b.opt.cursoropacitymax})}};this.hideCursor=function(c){if(!b.cursortimeout&&b.rail&&b.autohidedom)b.cursortimeout=setTimeout(function(){if(!b.rail.active||!b.showonmouseevent)b.autohidedom.stop().animate({opacity:b.opt.cursoropacitymin}),b.zoom&&b.zoom.stop().animate({opacity:b.opt.cursoropacitymin}),b.cursoractive=false;b.cursortimeout=0},c||400)};this.noticeCursor=function(c,e,g){b.showCursor(e,g);b.rail.active||b.hideCursor(c)};this.getContentSize=b.ispage? function(){return{w:Math.max(document.body.scrollWidth,document.documentElement.scrollWidth),h:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}}:b.haswrapper?function(){return{w:b.doc.outerWidth()+parseInt(b.win.css("paddingLeft"))+parseInt(b.win.css("paddingRight")),h:b.doc.outerHeight()+parseInt(b.win.css("paddingTop"))+parseInt(b.win.css("paddingBottom"))}}:function(){return{w:b.docscroll[0].scrollWidth,h:b.docscroll[0].scrollHeight}};this.onResize=function(c,e){if(!b.win)return false; if(!b.haswrapper&&!b.ispage)if(b.win.css("display")=="none")return b.visibility&&b.hideRail().hideRailHr(),false;else!b.hidden&&!b.visibility&&b.showRail().showRailHr();var g=b.page.maxh,d=b.page.maxw,h=b.view.w;b.view={w:b.ispage?b.win.width():parseInt(b.win[0].clientWidth),h:b.ispage?b.win.height():parseInt(b.win[0].clientHeight)};b.page=e?e:b.getContentSize();b.page.maxh=Math.max(0,b.page.h-b.view.h);b.page.maxw=Math.max(0,b.page.w-b.view.w);if(b.page.maxh==g&&b.page.maxw==d&&b.view.w==h)if(b.ispage)return b; else{g=b.win.offset();if(b.lastposition&&(d=b.lastposition,d.top==g.top&&d.left==g.left))return b;b.lastposition=g}b.page.maxh==0?(b.hideRail(),b.scrollvaluemax=0,b.scroll.y=0,b.scrollratio.y=0,b.cursorheight=0,b.setScrollTop(0),b.rail.scrollable=false):b.rail.scrollable=true;b.page.maxw==0?(b.hideRailHr(),b.scrollvaluemaxw=0,b.scroll.x=0,b.scrollratio.x=0,b.cursorwidth=0,b.setScrollLeft(0),b.railh.scrollable=false):b.railh.scrollable=true;b.locked=b.page.maxh==0&&b.page.maxw==0;if(b.locked)return b.ispage|| b.updateScrollBar(b.view),false;!b.hidden&&!b.visibility?b.showRail().showRailHr():!b.hidden&&!b.railh.visibility&&b.showRailHr();b.istextarea&&b.win.css("resize")&&b.win.css("resize")!="none"&&(b.view.h-=20);b.ispage||b.updateScrollBar(b.view);b.cursorheight=Math.min(b.view.h,Math.round(b.view.h*(b.view.h/b.page.h)));b.cursorheight=Math.max(b.opt.cursorminheight,b.cursorheight);b.cursorwidth=Math.min(b.view.w,Math.round(b.view.w*(b.view.w/b.page.w)));b.cursorwidth=Math.max(b.opt.cursorminheight, b.cursorwidth);b.scrollvaluemax=b.view.h-b.cursorheight-b.cursor.hborder;if(b.railh)b.railh.width=b.page.maxh>0?b.view.w-b.rail.width:b.view.w,b.scrollvaluemaxw=b.railh.width-b.cursorwidth-b.cursorh.wborder;b.scrollratio={x:b.page.maxw/b.scrollvaluemaxw,y:b.page.maxh/b.scrollvaluemax};b.getScrollTop()>b.page.maxh?b.doScroll(b.page.maxh):(b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y)),b.scroll.x=Math.round(b.getScrollLeft()*(1/b.scrollratio.x)),b.cursoractive&&b.noticeCursor());b.scroll.y&& b.getScrollTop()==0&&b.doScrollTo(Math.floor(b.scroll.y*b.scrollratio.y));return b};this.resize=function(){b.delayed("resize",b.onResize,30);return b};this.lazyResize=function(){b.delayed("resize",b.resize,250)};this._bind=function(c,e,g,d){b.events.push({e:c,n:e,f:g,b:d});c.addEventListener?c.addEventListener(e,g,d||false):c.attachEvent?c.attachEvent("on"+e,g):c["on"+e]=g};this.bind=function(c,d,g,h){var i="jquery"in c?c[0]:c;i.addEventListener?(e.cantouch&&/mouseup|mousedown|mousemove/.test(d)&& b._bind(i,d=="mousedown"?"touchstart":d=="mouseup"?"touchend":"touchmove",function(b){if(b.touches){if(b.touches.length<2){var c=b.touches.length?b.touches[0]:b;c.original=b;g.call(this,c)}}else if(b.changedTouches)c=b.changedTouches[0],c.original=b,g.call(this,c)},h||false),b._bind(i,d,g,h||false),d=="mousewheel"&&b._bind(i,"DOMMouseScroll",g,h||false),e.cantouch&&d=="mouseup"&&b._bind(i,"touchcancel",g,h||false)):b._bind(i,d,function(c){if((c=c||window.event||false)&&c.srcElement)c.target=c.srcElement; return g.call(i,c)===false||h===false?b.cancelEvent(c):true})};this._unbind=function(b,c,g,e){b.removeEventListener?b.removeEventListener(c,g,e):b.detachEvent?b.detachEvent("on"+c,g):b["on"+c]=false};this.unbindAll=function(){for(var c=0;c20?c:0};b.opt.smoothscroll?b.ishwscroll&&e.hastransition&&b.opt.usetransition?(this.prepareTransition=function(c,d){var g=d?c>20?c:0:b.getTransitionSpeed(c),h=g?e.prefixstyle+"transform "+g+"ms ease-out":"";if(!b.lasttransitionstyle||b.lasttransitionstyle!=h)b.lasttransitionstyle=h,b.doc.css(e.transitionstyle,h);return g},this.doScrollLeft=function(c,e){var g=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(c,g,e)},this.doScrollTop= function(c,e){var g=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(g,c,e)},this.doScrollPos=function(c,d,g){var h=b.getScrollTop(),i=b.getScrollLeft();((b.newscrolly-h)*(d-h)<0||(b.newscrollx-i)*(c-i)<0)&&b.cancelScroll();b.newscrolly=d;b.newscrollx=c;b.newscrollspeed=g||false;if(b.timer)return false;b.timer=setTimeout(function(){var g=b.getScrollTop(),h=b.getScrollLeft(),i,j;i=c-h;j=d-g;i=Math.round(Math.sqrt(Math.pow(i,2)+Math.pow(j,2)));i=b.prepareTransition(b.newscrollspeed?b.newscrollspeed: i);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm);if(i>0){!b.scrollrunning&&b.onscrollstart&&b.onscrollstart.call(b,{type:"scrollstart",current:{x:h,y:g},request:{x:c,y:d},end:{x:b.newscrollx,y:b.newscrolly},speed:i});if(e.transitionend){if(!b.scrollendtrapped)b.scrollendtrapped=true,b.bind(b.doc,e.transitionend,b.onScrollEnd,false)}else b.scrollendtrapped&&clearTimeout(b.scrollendtrapped),b.scrollendtrapped=setTimeout(b.onScrollEnd,i);b.timerscroll={bz:new BezierClass(g,b.newscrolly, i,0,0,0.58,1),bh:new BezierClass(h,b.newscrollx,i,0,0,0.58,1)};if(!b.cursorfreezed)b.timerscroll.tm=setInterval(function(){b.showCursor(b.getScrollTop(),b.getScrollLeft())},60)}b.synched("doScroll-set",function(){b.timer=0;if(b.scrollendtrapped)b.scrollrunning=true;b.setScrollTop(b.newscrolly);b.setScrollLeft(b.newscrollx);if(!b.scrollendtrapped)b.onScrollEnd()})},50)},this.cancelScroll=function(){if(!b.scrollendtrapped)return true;var c=b.getScrollTop(),d=b.getScrollLeft();b.scrollrunning=false; e.transitionend||clearTimeout(e.transitionend);b.scrollendtrapped=false;b._unbind(b.doc,e.transitionend,b.onScrollEnd);b.prepareTransition(0);b.setScrollTop(c);b.railh&&b.setScrollLeft(d);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm);b.timerscroll=false;b.cursorfreezed=false;b.showCursor(c,d);return b},this.onScrollEnd=function(){b.scrollendtrapped&&b._unbind(b.doc,e.transitionend,b.onScrollEnd);b.scrollendtrapped=false;b.prepareTransition(0);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm); b.timerscroll=false;var c=b.getScrollTop(),d=b.getScrollLeft();b.setScrollTop(c);b.railh&&b.setScrollLeft(d);b.noticeCursor(false,c,d);b.cursorfreezed=false;if(c<0)c=0;else if(c>b.page.maxh)c=b.page.maxh;if(d<0)d=0;else if(d>b.page.maxw)d=b.page.maxw;if(c!=b.newscrolly||d!=b.newscrollx)return b.doScrollPos(d,c,b.opt.snapbackspeed);b.onscrollend&&b.scrollrunning&&b.onscrollend.call(b,{type:"scrollend",current:{x:d,y:c},end:{x:b.newscrollx,y:b.newscrolly}});b.scrollrunning=false}):(this.doScrollLeft= function(c){var e=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(c,e)},this.doScrollTop=function(c){var e=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(e,c)},this.doScrollPos=function(c,e){function g(){if(b.cancelAnimationFrame)return true;b.scrollrunning=true;if(o=1-o)return b.timer=q(g)||1;var c=0,f=sy=b.getScrollTop();if(b.dst.ay){var f=b.bzscroll?b.dst.py+b.bzscroll.getNow()*b.dst.ay:b.newscrolly,e=f-sy;if(e<0&&f0&&f>b.newscrolly)f=b.newscrolly;b.setScrollTop(f); f==b.newscrolly&&(c=1)}else c=1;var d=sx=b.getScrollLeft();if(b.dst.ax){d=b.bzscroll?b.dst.px+b.bzscroll.getNow()*b.dst.ax:b.newscrollx;e=d-sx;if(e<0&&d0&&d>b.newscrollx)d=b.newscrollx;b.setScrollLeft(d);d==b.newscrollx&&(c+=1)}else c+=1;if(c==2){b.timer=0;b.cursorfreezed=false;b.bzscroll=false;b.scrollrunning=false;if(f<0)f=0;else if(f>b.page.maxh)f=b.page.maxh;if(d<0)d=0;else if(d>b.page.maxw)d=b.page.maxw;d!=b.newscrollx||f!=b.newscrolly?b.doScrollPos(d,f):b.onscrollend&&b.onscrollend.call(b, {type:"scrollend",current:{x:sx,y:sy},end:{x:b.newscrollx,y:b.newscrolly}})}else b.timer=q(g)||1}e=typeof e=="undefined"||e===false?b.getScrollTop(true):e;if(b.timer&&b.newscrolly==e&&b.newscrollx==c)return true;b.timer&&r(b.timer);b.timer=0;var d=b.getScrollTop(),h=b.getScrollLeft();((b.newscrolly-d)*(e-d)<0||(b.newscrollx-h)*(c-h)<0)&&b.cancelScroll();b.newscrolly=e;b.newscrollx=c;if(!b.bouncescroll||!b.rail.visibility)if(b.newscrolly<0)b.newscrolly=0;else if(b.newscrolly>b.page.maxh)b.newscrolly= b.page.maxh;if(!b.bouncescroll||!b.railh.visibility)if(b.newscrollx<0)b.newscrollx=0;else if(b.newscrollx>b.page.maxw)b.newscrollx=b.page.maxw;b.dst={};b.dst.x=c-h;b.dst.y=e-d;b.dst.px=h;b.dst.py=d;var i=Math.round(Math.sqrt(Math.pow(b.dst.x,2)+Math.pow(b.dst.y,2)));b.dst.ax=b.dst.x/i;b.dst.ay=b.dst.y/i;var j=0,k=i;if(b.dst.x==0)j=d,k=e,b.dst.ay=1,b.dst.py=0;else if(b.dst.y==0)j=h,k=c,b.dst.ax=1,b.dst.px=0;i=b.getTransitionSpeed(i);b.bzscroll=i>0?b.bzscroll?b.bzscroll.update(k,i):new BezierClass(j, k,i,0,1,0,1):false;if(!b.timer){(d==b.page.maxh&&e>=b.page.maxh||h==b.page.maxw&&c>=b.page.maxw)&&b.checkContentSize();var o=1;b.cancelAnimationFrame=false;b.timer=1;b.onscrollstart&&!b.scrollrunning&&b.onscrollstart.call(b,{type:"scrollstart",current:{x:h,y:d},request:{x:c,y:e},end:{x:b.newscrollx,y:b.newscrolly},speed:i});g();(d==b.page.maxh&&e>=d||h==b.page.maxw&&c>=h)&&b.checkContentSize();b.noticeCursor()}},this.cancelScroll=function(){b.timer&&r(b.timer);b.timer=0;b.bzscroll=false;b.scrollrunning= false;return b}):(this.doScrollLeft=function(c,e){var g=b.getScrollTop();b.doScrollPos(c,g,e)},this.doScrollTop=function(c,e){var g=b.getScrollLeft();b.doScrollPos(g,c,e)},this.doScrollPos=function(c,e){var g=c>b.page.maxw?b.page.maxw:c;g<0&&(g=0);var d=e>b.page.maxh?b.page.maxh:e;d<0&&(d=0);b.synched("scroll",function(){b.setScrollTop(d);b.setScrollLeft(g)})},this.cancelScroll=function(){});this.doScrollBy=function(c,e){var d=0,d=e?Math.floor((b.scroll.y-c)*b.scrollratio.y):(b.timer?b.newscrolly: b.getScrollTop(true))-c;if(b.bouncescroll){var h=Math.round(b.view.h/2);d<-h?d=-h:d>b.page.maxh+h&&(d=b.page.maxh+h)}b.cursorfreezed=false;py=b.getScrollTop(true);if(d<0&&py<=0)return b.noticeCursor();else if(d>b.page.maxh&&py>=b.page.maxh)return b.checkContentSize(),b.noticeCursor();b.doScrollTop(d)};this.doScrollLeftBy=function(c,e){var d=0,d=e?Math.floor((b.scroll.x-c)*b.scrollratio.x):(b.timer?b.newscrollx:b.getScrollLeft(true))-c;if(b.bouncescroll){var h=Math.round(b.view.w/2);d<-h?d=-h:d>b.page.maxw+ h&&(d=b.page.maxw+h)}b.cursorfreezed=false;px=b.getScrollLeft(true);if(d<0&&px<=0)return b.noticeCursor();else if(d>b.page.maxw&&px>=b.page.maxw)return b.noticeCursor();b.doScrollLeft(d)};this.doScrollTo=function(c,e){e&&Math.round(c*b.scrollratio.y);b.cursorfreezed=false;b.doScrollTop(c)};this.checkContentSize=function(){var c=b.getContentSize();(c.h!=b.page.h||c.w!=b.page.w)&&b.resize(false,c)};b.onscroll=function(){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()* (1/b.scrollratio.y));if(b.railh)b.scroll.x=Math.round(b.getScrollLeft()*(1/b.scrollratio.x));b.noticeCursor()})};b.bind(b.docscroll,"scroll",b.onscroll);this.doZoomIn=function(c){if(!b.zoomactive){b.zoomactive=true;b.zoomrestore={style:{}};var h="position,top,left,zIndex,backgroundColor,marginTop,marginBottom,marginLeft,marginRight".split(","),g=b.win[0].style,i;for(i in h){var j=h[i];b.zoomrestore.style[j]=typeof g[j]!="undefined"?g[j]:""}b.zoomrestore.style.width=b.win.css("width");b.zoomrestore.style.height= b.win.css("height");b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()-b.win.height()};if(e.isios4)b.zoomrestore.scrollTop=d(window).scrollTop(),d(window).scrollTop(0);b.win.css({position:e.isios4?"absolute":"fixed",top:0,left:0,"z-index":b.opt.zindex+100,margin:"0px"});h=b.win.css("backgroundColor");(h==""||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(h))&&b.win.css("backgroundColor","#fff");b.rail.css({"z-index":b.opt.zindex+110});b.zoom.css({"z-index":b.opt.zindex+ 112});b.zoom.css("backgroundPosition","0px -18px");b.resizeZoom();b.onzoomin&&b.onzoomin.call(b);return b.cancelEvent(c)}};this.doZoomOut=function(c){if(b.zoomactive)return b.zoomactive=false,b.win.css("margin",""),b.win.css(b.zoomrestore.style),e.isios4&&d(window).scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.ispage?b.opt.zindex:b.opt.zindex+2}),b.zoom.css({"z-index":b.opt.zindex}),b.zoomrestore=false,b.zoom.css("backgroundPosition","0px 0px"),b.onResize(),b.onzoomout&&b.onzoomout.call(b), b.cancelEvent(c)};this.doZoom=function(c){return b.zoomactive?b.doZoomOut(c):b.doZoomIn(c)};this.resizeZoom=function(){if(b.zoomactive){var c=b.getScrollTop();b.win.css({width:d(window).width()-b.zoomrestore.padding.w+"px",height:d(window).height()-b.zoomrestore.padding.h+"px"});b.onResize();b.setScrollTop(Math.min(b.page.maxh,c))}};this.init();d.nicescroll.push(this)},z=function(d){var c=this;this.nc=d;this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx= false;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.time=function(){return+new Date};this.reset=function(d,i){c.stop();var b=c.time();c.steptime=0;c.lasttime=b;c.speedx=0;c.speedy=0;c.lastx=d;c.lasty=i;c.lastscrollx=-1;c.lastscrolly=-1};this.update=function(d,i){var b=c.time();c.steptime=b-c.lasttime;c.lasttime=b;var b=i-c.lasty,j=d-c.lastx,e=c.nc.getScrollTop(),n=c.nc.getScrollLeft();e+=b;n+=j;c.snapx=n<0||n>c.nc.page.maxw;c.snapy=e<0||e>c.nc.page.maxh; c.speedx=j;c.speedy=b;c.lastx=d;c.lasty=i};this.stop=function(){c.nc.unsynched("domomentum2d");c.timer&&clearTimeout(c.timer);c.timer=0;c.lastscrollx=-1;c.lastscrolly=-1};this.doSnapy=function(d,i){var b=false;if(i<0)i=0,b=true;else if(i>c.nc.page.maxh)i=c.nc.page.maxh,b=true;if(d<0)d=0,b=true;else if(d>c.nc.page.maxw)d=c.nc.page.maxw,b=true;b&&c.nc.doScrollPos(d,i,c.nc.opt.snapbackspeed)};this.doMomentum=function(d){var i=c.time(),b=d?i+d:c.lasttime,d=c.nc.getScrollLeft(),j=c.nc.getScrollTop(),e= c.nc.page.maxh,n=c.nc.page.maxw;c.speedx=n>0?Math.min(60,c.speedx):0;c.speedy=e>0?Math.min(60,c.speedy):0;b=b&&i-b<=50;if(j<0||j>e||d<0||d>n)b=false;d=c.speedx&&b?c.speedx:false;if(c.speedy&&b&&c.speedy||d){var p=Math.max(16,c.steptime);p>50&&(d=p/50,c.speedx*=d,c.speedy*=d,p=50);c.demulxy=0;c.lastscrollx=c.nc.getScrollLeft();c.chkx=c.lastscrollx;c.lastscrolly=c.nc.getScrollTop();c.chky=c.lastscrolly;var f=c.lastscrollx,l=c.lastscrolly,g=function(){var b=c.time()-i>600?0.04:0.02;if(c.speedx&&(f=Math.floor(c.lastscrollx- c.speedx*(1-c.demulxy)),c.lastscrollx=f,f<0||f>n))b=0.1;if(c.speedy&&(l=Math.floor(c.lastscrolly-c.speedy*(1-c.demulxy)),c.lastscrolly=l,l<0||l>e))b=0.1;c.demulxy=Math.min(1,c.demulxy+b);c.nc.synched("domomentum2d",function(){if(c.speedx)c.nc.getScrollLeft()!=c.chkx&&c.stop(),c.chkx=f,c.nc.setScrollLeft(f);if(c.speedy)c.nc.getScrollTop()!=c.chky&&c.stop(),c.chky=l,c.nc.setScrollTop(l);c.timer||(c.nc.hideCursor(),c.doSnapy(f,l))});c.demulxy<1?c.timer=setTimeout(g,p):(c.stop(),c.nc.hideCursor(),c.doSnapy(f, l))};g()}else c.doSnapy(c.nc.getScrollLeft(),c.nc.getScrollTop())}},t=d.fn.scrollTop;d.cssHooks.pageYOffset={get:function(j){var c=d.data(j,"__nicescroll")||false;return c&&c.ishwscroll?c.getScrollTop():t.call(j)},set:function(j,c){var h=d.data(j,"__nicescroll")||false;h&&h.ishwscroll?h.setScrollTop(parseInt(c)):t.call(j,c);return this}};d.fn.scrollTop=function(j){if(typeof j=="undefined"){var c=this[0]?d.data(this[0],"__nicescroll")||false:false;return c&&c.ishwscroll?c.getScrollTop():t.call(this)}else return this.each(function(){var c= d.data(this,"__nicescroll")||false;c&&c.ishwscroll?c.setScrollTop(parseInt(j)):t.call(d(this),j)})};var u=d.fn.scrollLeft;d.cssHooks.pageXOffset={get:function(j){var c=d.data(j,"__nicescroll")||false;return c&&c.ishwscroll?c.getScrollLeft():u.call(j)},set:function(j,c){var h=d.data(j,"__nicescroll")||false;h&&h.ishwscroll?h.setScrollLeft(parseInt(c)):u.call(j,c);return this}};d.fn.scrollLeft=function(j){if(typeof j=="undefined"){var c=this[0]?d.data(this[0],"__nicescroll")||false:false;return c&& c.ishwscroll?c.getScrollLeft():u.call(this)}else return this.each(function(){var c=d.data(this,"__nicescroll")||false;c&&c.ishwscroll?c.setScrollLeft(parseInt(j)):u.call(d(this),j)})};var v=function(j){var c=this;this.length=0;this.name="nicescrollarray";this.each=function(d){for(var b=0;b=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); jQuery(document).ready(function(){function m(k,l,m){if(m){var v=new Date;v.setTime(v.getTime()+864E5*m);m="; expires="+v.toGMTString()}else m="";document.cookie=k+"="+l+m+"; path=/"}function k(k){k+="=";for(var l=document.cookie.split(";"),m=0;m