(function(b,f){function h(d){return g.isWindow(d)?d:d.nodeType===9?d.defaultView||d.parentWindow:false}function l(d){if(!Xa[d]){var e=g("<"+d+">").appendTo("body"),j=e.css("display");e.remove();if(j==="none"||j==="")j="block";Xa[d]=j}return Xa[d]}function k(d,e){var j={};g.each(ab.concat.apply([],ab.slice(0,e)),function(){j[this]=d});return j}function a(){try{return new b.XMLHttpRequest}catch(d){}}function i(){g(b).unload(function(){for(var d in Ma)Ma[d](0,1)})}function n(d,e,j,m){if(g.isArray(e)&&
e.length)g.each(e,function(r,w){j||qb.test(d)?m(d,w):n(d+"["+(typeof w==="object"||g.isArray(w)?r:"")+"]",w,j,m)});else if(j||e==null||typeof e!=="object")m(d,e);else if(g.isArray(e)||g.isEmptyObject(e))m(d,"");else for(var p in e)n(d+"["+p+"]",e[p],j,m)}function t(d,e,j,m,p,r){p=p||e.dataTypes[0];r=r||{};r[p]=true;p=d[p];for(var w=0,H=p?p.length:0,F=d===Ya,C;w<H&&(F||!C);w++){C=p[w](e,j,m);typeof C==="string"&&(!F||r[C]?C=f:(e.dataTypes.unshift(C),C=t(d,e,j,m,C,r)))}(F||!C)&&!r["*"]&&(C=t(d,e,j,
m,"*",r));return C}function v(d){return function(e,j){typeof e!=="string"&&(j=e,e="*");if(g.isFunction(j))for(var m=e.toLowerCase().split(bb),p=0,r=m.length,w,H;p<r;p++){w=m[p];(H=/^\+/.test(w))&&(w=w.substr(1)||"*");w=d[w]=d[w]||[];w[H?"unshift":"push"](j)}}}function y(d,e,j){var m=e==="width"?d.offsetWidth:d.offsetHeight;if(j==="border")return m;g.each(e==="width"?rb:sb,function(){j||(m-=parseFloat(g.css(d,"padding"+this))||0);j==="margin"?m+=parseFloat(g.css(d,"margin"+this))||0:m-=parseFloat(g.css(d,
"border"+this+"Width"))||0});return m}function s(d,e){e.src?g.ajax({url:e.src,async:false,dataType:"script"}):g.globalEval(e.text||e.textContent||e.innerHTML||"");e.parentNode&&e.parentNode.removeChild(e)}function o(d){return"getElementsByTagName"in d?d.getElementsByTagName("*"):"querySelectorAll"in d?d.querySelectorAll("*"):[]}function u(d,e){if(e.nodeType===1){var j=e.nodeName.toLowerCase();e.clearAttributes();e.mergeAttributes(d);if(j==="object")e.outerHTML=d.outerHTML;else if(j!=="input"||d.type!==
"checkbox"&&d.type!=="radio")if(j==="option")e.selected=d.defaultSelected;else{if(j==="input"||j==="textarea")e.defaultValue=d.defaultValue}else{d.checked&&(e.defaultChecked=e.checked=d.checked);e.value!==d.value&&(e.value=d.value)}e.removeAttribute(g.expando)}}function z(d,e){if(e.nodeType===1&&g.hasData(d)){var j=g.expando,m=g.data(d),p=g.data(e,m);if(m=m[j]){var r=m.events;p=p[j]=g.extend({},m);if(r){delete p.handle;p.events={};for(var w in r){j=0;for(m=r[w].length;j<m;j++)g.event.add(e,w+(r[w][j].namespace?
".":"")+r[w][j].namespace,r[w][j],r[w][j].data)}}}}}function I(d,e,j){if(g.isFunction(e))return g.grep(d,function(p,r){return!!e.call(p,r,p)===j});if(e.nodeType)return g.grep(d,function(p){return p===e===j});if(typeof e==="string"){var m=g.grep(d,function(p){return p.nodeType===1});if(tb.test(e))return g.filter(e,m,!j);e=g.filter(e,m)}return g.grep(d,function(p){return g.inArray(p,e)>=0===j})}function D(d,e){return(d&&d!=="*"?d+".":"")+e.replace(ca,"`").replace(Ba,"&")}function P(d){var e,j,m,p,r,
w,H,F,C,O,Y,ga=[];p=[];r=g._data(this,"events");if(d.liveFired!==this&&r&&r.live&&!d.target.disabled&&(!d.button||d.type!=="click")){d.namespace&&(Y=RegExp("(^|\\.)"+d.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)"));d.liveFired=this;var aa=r.live.slice(0);for(H=0;H<aa.length;H++){r=aa[H];r.origType.replace(la,"")===d.type?p.push(r.selector):aa.splice(H--,1)}p=g(d.target).closest(p,d.currentTarget);F=0;for(C=p.length;F<C;F++){O=p[F];for(H=0;H<aa.length;H++){r=aa[H];if(O.selector===r.selector&&
(!Y||Y.test(r.namespace))&&!O.elem.disabled){w=O.elem;m=null;if(r.preType==="mouseenter"||r.preType==="mouseleave"){d.type=r.preType;m=g(d.relatedTarget).closest(r.selector)[0]}(!m||m!==w)&&ga.push({elem:w,handleObj:r,level:O.level})}}}F=0;for(C=ga.length;F<C;F++){p=ga[F];if(j&&p.level>j)break;d.currentTarget=p.elem;d.data=p.handleObj.data;d.handleObj=p.handleObj;Y=p.handleObj.origHandler.apply(p.elem,arguments);if(Y===false||d.isPropagationStopped()){j=p.level;Y===false&&(e=false);if(d.isImmediatePropagationStopped())break}}return e}}
function L(d,e,j){var m=g.extend({},j[0]);m.type=d;m.originalEvent={};m.liveFired=f;g.event.handle.call(e,m);m.isDefaultPrevented()&&j[0].preventDefault()}function Q(){return true}function R(){return false}function T(d){for(var e in d)if(e!=="toJSON")return false;return true}function ja(d,e,j){if(j===f&&d.nodeType===1){j=d.getAttribute("data-"+e);if(typeof j==="string"){try{j=j==="true"?true:j==="false"?false:j==="null"?null:g.isNaN(j)?X.test(j)?g.parseJSON(j):j:parseFloat(j)}catch(m){}g.data(d,e,
j)}else j=f}return j}var B=b.document,g=function(){function d(){if(!e.isReady){try{B.documentElement.doScroll("left")}catch(x){setTimeout(d,1);return}e.ready()}}var e=function(x,J){return new e.fn.init(x,J,p)},j=b.jQuery,m=b.$,p,r=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,w=/\S/,H=/^\s+/,F=/\s+$/,C=/\d/,O=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Y=/^[\],:{}\s]*$/,ga=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,aa=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ia=/(?:^|:|,)(?:\s*\[)+/g,ta=/(webkit)[ \/]([\w.]+)/,
pa=/(opera)(?:.*version)?[ \/]([\w.]+)/,ua=/(msie) ([\w.]+)/,Aa=/(mozilla)(?:.*? rv:([\w.]+))?/,q=navigator.userAgent,A=false,K,E="then done fail isResolved isRejected promise".split(" "),G,M=Object.prototype.toString,W=Object.prototype.hasOwnProperty,U=Array.prototype.push,ea=Array.prototype.slice,ra=String.prototype.trim,qa=Array.prototype.indexOf,va={};e.fn=e.prototype={constructor:e,init:function(x,J,N){var S,Z;if(!x)return this;if(x.nodeType){this.context=this[0]=x;this.length=1;return this}if(x===
"body"&&!J&&B.body){this.context=B;this[0]=B.body;this.selector="body";this.length=1;return this}if(typeof x==="string"){S=r.exec(x);if(!S||!S[1]&&J)return!J||J.jquery?(J||N).find(x):this.constructor(J).find(x);if(S[1]){Z=(J=J instanceof e?J[0]:J)?J.ownerDocument||J:B;(N=O.exec(x))?e.isPlainObject(J)?(x=[B.createElement(N[1])],e.fn.attr.call(x,J,true)):x=[Z.createElement(N[1])]:(N=e.buildFragment([S[1]],[Z]),x=(N.cacheable?e.clone(N.fragment):N.fragment).childNodes);return e.merge(this,x)}if((J=B.getElementById(S[2]))&&
J.parentNode){if(J.id!==S[2])return N.find(x);this.length=1;this[0]=J}this.context=B;this.selector=x;return this}if(e.isFunction(x))return N.ready(x);x.selector!==f&&(this.selector=x.selector,this.context=x.context);return e.makeArray(x,this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return ea.call(this,0)},get:function(x){return x==null?this.toArray():x<0?this[this.length+x]:this[x]},pushStack:function(x,J,N){var S=this.constructor();e.isArray(x)?
U.apply(S,x):e.merge(S,x);S.prevObject=this;S.context=this.context;J==="find"?S.selector=this.selector+(this.selector?" ":"")+N:J&&(S.selector=this.selector+"."+J+"("+N+")");return S},each:function(x,J){return e.each(this,x,J)},ready:function(x){e.bindReady();K.done(x);return this},eq:function(x){return x===-1?this.slice(x):this.slice(x,+x+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(ea.apply(this,arguments),"slice",ea.call(arguments).join(","))},
map:function(x){return this.pushStack(e.map(this,function(J,N){return x.call(J,N,J)}))},end:function(){return this.prevObject||this.constructor(null)},push:U,sort:[].sort,splice:[].splice};e.fn.init.prototype=e.fn;e.extend=e.fn.extend=function(){var x,J,N,S,Z,fa,ha=arguments[0]||{},ma=1,wa=arguments.length,Ca=false;typeof ha==="boolean"&&(Ca=ha,ha=arguments[1]||{},ma=2);typeof ha!=="object"&&!e.isFunction(ha)&&(ha={});for(wa===ma&&(ha=this,--ma);ma<wa;ma++)if((x=arguments[ma])!=null)for(J in x){N=
ha[J];S=x[J];if(ha!==S)Ca&&S&&(e.isPlainObject(S)||(Z=e.isArray(S)))?(Z?(Z=false,fa=N&&e.isArray(N)?N:[]):fa=N&&e.isPlainObject(N)?N:{},ha[J]=e.extend(Ca,fa,S)):S!==f&&(ha[J]=S)}return ha};e.extend({noConflict:function(x){b.$=m;x&&(b.jQuery=j);return e},isReady:false,readyWait:1,ready:function(x){x===true&&e.readyWait--;if(!e.readyWait||x!==true&&!e.isReady){if(!B.body)return setTimeout(e.ready,1);e.isReady=true;if(!(x!==true&&--e.readyWait>0)){K.resolveWith(B,[e]);e.fn.trigger&&e(B).trigger("ready").unbind("ready")}}},
bindReady:function(){if(!A){A=true;if(B.readyState==="complete")return setTimeout(e.ready,1);if(B.addEventListener){B.addEventListener("DOMContentLoaded",G,false);b.addEventListener("load",e.ready,false)}else if(B.attachEvent){B.attachEvent("onreadystatechange",G);b.attachEvent("onload",e.ready);var x=false;try{x=b.frameElement==null}catch(J){}B.documentElement.doScroll&&x&&d()}}},isFunction:function(x){return e.type(x)==="function"},isArray:Array.isArray||function(x){return e.type(x)==="array"},
isWindow:function(x){return x&&typeof x==="object"&&"setInterval"in x},isNaN:function(x){return x==null||!C.test(x)||isNaN(x)},type:function(x){return x==null?String(x):va[M.call(x)]||"object"},isPlainObject:function(x){if(!x||e.type(x)!=="object"||x.nodeType||e.isWindow(x))return false;if(x.constructor&&!W.call(x,"constructor")&&!W.call(x.constructor.prototype,"isPrototypeOf"))return false;for(var J in x);return J===f||W.call(x,J)},isEmptyObject:function(x){for(var J in x)return false;return true},
error:function(x){throw x;},parseJSON:function(x){if(typeof x!=="string"||!x)return null;x=e.trim(x);if(Y.test(x.replace(ga,"@").replace(aa,"]").replace(ia,"")))return b.JSON&&b.JSON.parse?b.JSON.parse(x):(new Function("return "+x))();e.error("Invalid JSON: "+x)},parseXML:function(x,J,N){b.DOMParser?(N=new DOMParser,J=N.parseFromString(x,"text/xml")):(J=new ActiveXObject("Microsoft.XMLDOM"),J.async="false",J.loadXML(x));N=J.documentElement;(!N||!N.nodeName||N.nodeName==="parsererror")&&e.error("Invalid XML: "+
x);return J},noop:function(){},globalEval:function(x){if(x&&w.test(x)){var J=B.head||B.getElementsByTagName("head")[0]||B.documentElement,N=B.createElement("script");e.support.scriptEval()?N.appendChild(B.createTextNode(x)):N.text=x;J.insertBefore(N,J.firstChild);J.removeChild(N)}},nodeName:function(x,J){return x.nodeName&&x.nodeName.toUpperCase()===J.toUpperCase()},each:function(x,J,N){var S,Z=0,fa=x.length,ha=fa===f||e.isFunction(x);if(N)if(ha)for(S in x){if(J.apply(x[S],N)===false)break}else for(;Z<
fa;){if(J.apply(x[Z++],N)===false)break}else if(ha)for(S in x){if(J.call(x[S],S,x[S])===false)break}else for(N=x[0];Z<fa&&J.call(N,Z,N)!==false;N=x[++Z]);return x},trim:ra?function(x){return x==null?"":ra.call(x)}:function(x){return x==null?"":(x+"").replace(H,"").replace(F,"")},makeArray:function(x,J){var N=J||[];if(x!=null){var S=e.type(x);x.length==null||S==="string"||S==="function"||S==="regexp"||e.isWindow(x)?U.call(N,x):e.merge(N,x)}return N},inArray:function(x,J){if(J.indexOf)return J.indexOf(x);
for(var N=0,S=J.length;N<S;N++)if(J[N]===x)return N;return-1},merge:function(x,J){var N=x.length,S=0;if(typeof J.length==="number")for(var Z=J.length;S<Z;S++)x[N++]=J[S];else for(;J[S]!==f;)x[N++]=J[S++];x.length=N;return x},grep:function(x,J,N){var S=[],Z;N=!!N;for(var fa=0,ha=x.length;fa<ha;fa++){Z=!!J(x[fa],fa);N!==Z&&S.push(x[fa])}return S},map:function(x,J,N){for(var S=[],Z,fa=0,ha=x.length;fa<ha;fa++){Z=J(x[fa],fa,N);Z!=null&&(S[S.length]=Z)}return S.concat.apply([],S)},guid:1,proxy:function(x,
J,N){arguments.length===2&&(typeof J==="string"?(N=x,x=N[J],J=f):J&&!e.isFunction(J)&&(N=J,J=f));!J&&x&&(J=function(){return x.apply(N||this,arguments)});x&&(J.guid=x.guid=x.guid||J.guid||e.guid++);return J},access:function(x,J,N,S,Z,fa){var ha=x.length;if(typeof J==="object"){for(var ma in J)e.access(x,ma,J[ma],S,Z,N);return x}if(N!==f){S=!fa&&S&&e.isFunction(N);for(ma=0;ma<ha;ma++)Z(x[ma],J,S?N.call(x[ma],ma,Z(x[ma],J)):N,fa);return x}return ha?Z(x[0],J):f},now:function(){return(new Date).getTime()},
_Deferred:function(){var x=[],J,N,S,Z={done:function(){if(!S){var fa=arguments,ha,ma,wa,Ca,Da;J&&(Da=J,J=0);ha=0;for(ma=fa.length;ha<ma;ha++){wa=fa[ha];Ca=e.type(wa);Ca==="array"?Z.done.apply(Z,wa):Ca==="function"&&x.push(wa)}Da&&Z.resolveWith(Da[0],Da[1])}return this},resolveWith:function(fa,ha){if(!S&&!J&&!N){N=1;try{for(;x[0];)x.shift().apply(fa,ha)}catch(ma){throw ma;}finally{J=[fa,ha];N=0}}return this},resolve:function(){Z.resolveWith(e.isFunction(this.promise)?this.promise():this,arguments);
return this},isResolved:function(){return N||J},cancel:function(){S=1;x=[];return this}};return Z},Deferred:function(x){var J=e._Deferred(),N=e._Deferred(),S;e.extend(J,{then:function(Z,fa){J.done(Z).fail(fa);return this},fail:N.done,rejectWith:N.resolveWith,reject:N.resolve,isRejected:N.isResolved,promise:function(Z){if(Z==null){if(S)return S;S=Z={}}for(var fa=E.length;fa--;)Z[E[fa]]=J[E[fa]];return Z}});J.done(N.cancel).fail(J.cancel);delete J.cancel;x&&x.call(J,J);return J},when:function(x){var J=
arguments.length,N=J<=1&&x&&e.isFunction(x.promise)?x:e.Deferred(),S=N.promise();if(J>1){for(var Z=ea.call(arguments,0),fa=J,ha=function(ma){return function(wa){Z[ma]=arguments.length>1?ea.call(arguments,0):wa;--fa||N.resolveWith(S,Z)}};J--;)(x=Z[J])&&e.isFunction(x.promise)?x.promise().then(ha(J),N.reject):--fa;fa||N.resolveWith(S,Z)}else N!==x&&N.resolve(x);return S},uaMatch:function(x){x=x.toLowerCase();x=ta.exec(x)||pa.exec(x)||ua.exec(x)||x.indexOf("compatible")<0&&Aa.exec(x)||[];return{browser:x[1]||
"",version:x[2]||"0"}},sub:function(){function x(N,S){return new x.fn.init(N,S)}e.extend(true,x,this);x.superclass=this;x.fn=x.prototype=this();x.fn.constructor=x;x.subclass=this.subclass;x.fn.init=function N(N,S){S&&S instanceof e&&!(S instanceof x)&&(S=x(S));return e.fn.init.call(this,N,S,J)};x.fn.init.prototype=x.fn;var J=x(B);return x},browser:{}});K=e._Deferred();e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(x,J){va["[object "+J+"]"]=J.toLowerCase()});q=
e.uaMatch(q);q.browser&&(e.browser[q.browser]=true,e.browser.version=q.version);e.browser.webkit&&(e.browser.safari=true);qa&&(e.inArray=function(x,J){return qa.call(J,x)});w.test("\u00a0")&&(H=/^[\s\xA0]+/,F=/[\s\xA0]+$/);p=e(B);B.addEventListener?G=function(){B.removeEventListener("DOMContentLoaded",G,false);e.ready()}:B.attachEvent&&(G=function(){B.readyState==="complete"&&(B.detachEvent("onreadystatechange",G),e.ready())});return e}();(function(){g.support={};var d=B.createElement("div");d.style.display=
"none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0],m=B.createElement("select"),p=m.appendChild(B.createElement("option")),r=d.getElementsByTagName("input")[0];if(e&&e.length&&j){g.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),
hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:r.value==="on",optSelected:p.selected,deleteExpando:true,optDisabled:false,checkClone:false,noCloneEvent:true,noCloneChecked:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};r.checked=true;g.support.noCloneChecked=r.cloneNode(true).checked;m.disabled=true;g.support.optDisabled=!p.disabled;var w=null;g.support.scriptEval=function(){if(w===
null){var F=B.documentElement,C=B.createElement("script"),O="script"+g.now();try{C.appendChild(B.createTextNode("window."+O+"=1;"))}catch(Y){}F.insertBefore(C,F.firstChild);b[O]?(w=true,delete b[O]):w=false;F.removeChild(C)}return w};try{delete d.test}catch(H){g.support.deleteExpando=false}!d.addEventListener&&d.attachEvent&&d.fireEvent&&(d.attachEvent("onclick",function F(){g.support.noCloneEvent=false;d.detachEvent("onclick",F)}),d.cloneNode(true).fireEvent("onclick"));d=B.createElement("div");
d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";e=B.createDocumentFragment();e.appendChild(d.firstChild);g.support.checkClone=e.cloneNode(true).cloneNode(true).lastChild.checked;g(function(){var F=B.createElement("div"),C=B.getElementsByTagName("body")[0];if(C){F.style.width=F.style.paddingLeft="1px";C.appendChild(F);g.boxModel=g.support.boxModel=F.offsetWidth===2;"zoom"in F.style&&(F.style.display="inline",F.style.zoom=1,g.support.inlineBlockNeedsLayout=F.offsetWidth===2,F.style.display=
"",F.innerHTML="<div style='width:4px;'></div>",g.support.shrinkWrapBlocks=F.offsetWidth!==2);F.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var O=F.getElementsByTagName("td");g.support.reliableHiddenOffsets=O[0].offsetHeight===0;O[0].style.display="";O[1].style.display="none";g.support.reliableHiddenOffsets=g.support.reliableHiddenOffsets&&O[0].offsetHeight===0;F.innerHTML="";C.removeChild(F).style.display="none"}});e=function(F){var C=B.createElement("div");
F="on"+F;if(!C.attachEvent)return true;var O=F in C;O||(C.setAttribute(F,"return;"),O=typeof C[F]==="function");return O};g.support.submitBubbles=e("submit");g.support.changeBubbles=e("change");d=e=j=null}})();var X=/^(?:\{.*\}|\[.*\])$/;g.extend({cache:{},uuid:0,expando:"jQuery"+(g.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(d){d=d.nodeType?g.cache[d[g.expando]]:d[g.expando];return!!d&&!T(d)},data:function(d,
e,j,m){if(g.acceptData(d)){var p=g.expando,r=typeof e==="string",w=d.nodeType,H=w?g.cache:d,F=w?d[g.expando]:d[g.expando]&&g.expando;if(!((!F||m&&F&&!H[F][p])&&r&&j===f)){F||(w?d[g.expando]=F=++g.uuid:F=g.expando);H[F]||(H[F]={},w||(H[F].toJSON=g.noop));if(typeof e==="object"||typeof e==="function")m?H[F][p]=g.extend(H[F][p],e):H[F]=g.extend(H[F],e);d=H[F];m&&(d[p]||(d[p]={}),d=d[p]);j!==f&&(d[e]=j);if(e==="events"&&!d[e])return d[p]&&d[p].events;return r?d[e]:d}}},removeData:function(d,e,j){if(g.acceptData(d)){var m=
g.expando,p=d.nodeType,r=p?g.cache:d,w=p?d[g.expando]:g.expando;if(r[w]){if(e){var H=j?r[w][m]:r[w];if(H){delete H[e];if(!T(H))return}}if(j){delete r[w][m];if(!T(r[w]))return}e=r[w][m];g.support.deleteExpando||r!=b?delete r[w]:r[w]=null;e?(r[w]={},p||(r[w].toJSON=g.noop),r[w][m]=e):p&&(g.support.deleteExpando?delete d[g.expando]:d.removeAttribute?d.removeAttribute(g.expando):d[g.expando]=null)}}},_data:function(d,e,j){return g.data(d,e,j,true)},acceptData:function(d){if(d.nodeName){var e=g.noData[d.nodeName.toLowerCase()];
if(e)return e!==true&&d.getAttribute("classid")===e}return true}});g.fn.extend({data:function(d,e){var j=null;if(typeof d==="undefined"){if(this.length){j=g.data(this[0]);if(this[0].nodeType===1)for(var m=this[0].attributes,p,r=0,w=m.length;r<w;r++){p=m[r].name;p.indexOf("data-")===0&&(p=p.substr(5),ja(this[0],p,j[p]))}}return j}if(typeof d==="object")return this.each(function(){g.data(this,d)});var H=d.split(".");H[1]=H[1]?"."+H[1]:"";if(e===f){j=this.triggerHandler("getData"+H[1]+"!",[H[0]]);j===
f&&this.length&&(j=g.data(this[0],d),j=ja(this[0],d,j));return j===f&&H[1]?this.data(H[0]):j}return this.each(function(){var F=g(this),C=[H[0],e];F.triggerHandler("setData"+H[1]+"!",C);g.data(this,d,e);F.triggerHandler("changeData"+H[1]+"!",C)})},removeData:function(d){return this.each(function(){g.removeData(this,d)})}});g.extend({queue:function(d,e,j){if(d){e=(e||"fx")+"queue";var m=g._data(d,e);if(!j)return m||[];!m||g.isArray(j)?m=g._data(d,e,g.makeArray(j)):m.push(j);return m}},dequeue:function(d,
e){e=e||"fx";var j=g.queue(d,e),m=j.shift();m==="inprogress"&&(m=j.shift());m&&(e==="fx"&&j.unshift("inprogress"),m.call(d,function(){g.dequeue(d,e)}));j.length||g.removeData(d,e+"queue",true)}});g.fn.extend({queue:function(d,e){typeof d!=="string"&&(e=d,d="fx");if(e===f)return g.queue(this[0],d);return this.each(function(){var j=g.queue(this,d,e);d==="fx"&&j[0]!=="inprogress"&&g.dequeue(this,d)})},dequeue:function(d){return this.each(function(){g.dequeue(this,d)})},delay:function(d,e){d=g.fx?g.fx.speeds[d]||
d:d;e=e||"fx";return this.queue(e,function(){var j=this;setTimeout(function(){g.dequeue(j,e)},d)})},clearQueue:function(d){return this.queue(d||"fx",[])}});var V=/[\n\t\r]/g,ba=/\s+/,da=/\r/g,ka=/^(?:href|src|style)$/,sa=/^(?:button|input)$/i,xa=/^(?:button|input|object|select|textarea)$/i,ya=/^a(?:rea)?$/i,na=/^(?:radio|checkbox)$/i;g.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",
usemap:"useMap",frameborder:"frameBorder"};g.fn.extend({attr:function(d,e){return g.access(this,d,e,true,g.attr)},removeAttr:function(d){return this.each(function(){g.attr(this,d,"");this.nodeType===1&&this.removeAttribute(d)})},addClass:function(d){if(g.isFunction(d))return this.each(function(C){var O=g(this);O.addClass(d.call(this,C,O.attr("class")))});if(d&&typeof d==="string")for(var e=(d||"").split(ba),j=0,m=this.length;j<m;j++){var p=this[j];if(p.nodeType===1)if(p.className){for(var r=" "+p.className+
" ",w=p.className,H=0,F=e.length;H<F;H++)r.indexOf(" "+e[H]+" ")<0&&(w+=" "+e[H]);p.className=g.trim(w)}else p.className=d}return this},removeClass:function(d){if(g.isFunction(d))return this.each(function(F){var C=g(this);C.removeClass(d.call(this,F,C.attr("class")))});if(d&&typeof d==="string"||d===f)for(var e=(d||"").split(ba),j=0,m=this.length;j<m;j++){var p=this[j];if(p.nodeType===1&&p.className)if(d){for(var r=(" "+p.className+" ").replace(V," "),w=0,H=e.length;w<H;w++)r=r.replace(" "+e[w]+" ",
" ");p.className=g.trim(r)}else p.className=""}return this},toggleClass:function(d,e){var j=typeof d,m=typeof e==="boolean";if(g.isFunction(d))return this.each(function(p){var r=g(this);r.toggleClass(d.call(this,p,r.attr("class"),e),e)});return this.each(function(){if(j==="string")for(var p,r=0,w=g(this),H=e,F=d.split(ba);p=F[r++];){H=m?H:!w.hasClass(p);w[H?"addClass":"removeClass"](p)}else if(j==="undefined"||j==="boolean"){this.className&&g._data(this,"__className__",this.className);this.className=
this.className||d===false?"":g._data(this,"__className__")||""}})},hasClass:function(d){d=" "+d+" ";for(var e=0,j=this.length;e<j;e++)if((" "+this[e].className+" ").replace(V," ").indexOf(d)>-1)return true;return false},val:function(d){if(!arguments.length){var e=this[0];if(e){if(g.nodeName(e,"option")){var j=e.attributes.value;return!j||j.specified?e.value:e.text}if(g.nodeName(e,"select")){j=e.selectedIndex;var m=[],p=e.options;e=e.type==="select-one";if(j<0)return null;for(var r=e?j:0,w=e?j+1:p.length;r<
w;r++){var H=p[r];if(H.selected&&(g.support.optDisabled?!H.disabled:H.getAttribute("disabled")===null)&&(!H.parentNode.disabled||!g.nodeName(H.parentNode,"optgroup"))){d=g(H).val();if(e)return d;m.push(d)}}if(e&&!m.length&&p.length)return g(p[j]).val();return m}if(na.test(e.type)&&!g.support.checkOn)return e.getAttribute("value")===null?"on":e.value;return(e.value||"").replace(da,"")}return f}var F=g.isFunction(d);return this.each(function(C){var O=g(this),Y=d;if(this.nodeType===1){F&&(Y=d.call(this,
C,O.val()));Y==null?Y="":typeof Y==="number"?Y+="":g.isArray(Y)&&(Y=g.map(Y,function(aa){return aa==null?"":aa+""}));if(g.isArray(Y)&&na.test(this.type))this.checked=g.inArray(O.val(),Y)>=0;else if(g.nodeName(this,"select")){var ga=g.makeArray(Y);g("option",this).each(function(){this.selected=g.inArray(g(this).val(),ga)>=0});ga.length||(this.selectedIndex=-1)}else this.value=Y}})}});g.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(d,
e,j,m){if(!d||d.nodeType===3||d.nodeType===8||d.nodeType===2)return f;if(m&&e in g.attrFn)return g(d)[e](j);m=d.nodeType!==1||!g.isXMLDoc(d);var p=j!==f;e=m&&g.props[e]||e;if(d.nodeType===1){var r=ka.test(e);if((e in d||d[e]!==f)&&m&&!r){p&&(e==="type"&&sa.test(d.nodeName)&&d.parentNode&&g.error("type property can't be changed"),j===null?d.nodeType===1&&d.removeAttribute(e):d[e]=j);if(g.nodeName(d,"form")&&d.getAttributeNode(e))return d.getAttributeNode(e).nodeValue;if(e==="tabIndex")return(e=d.getAttributeNode("tabIndex"))&&
e.specified?e.value:xa.test(d.nodeName)||ya.test(d.nodeName)&&d.href?0:f;return d[e]}if(!g.support.style&&m&&e==="style"){p&&(d.style.cssText=""+j);return d.style.cssText}p&&d.setAttribute(e,""+j);if(!d.attributes[e]&&d.hasAttribute&&!d.hasAttribute(e))return f;d=!g.support.hrefNormalized&&m&&r?d.getAttribute(e,2):d.getAttribute(e);return d===null?f:d}p&&(d[e]=j);return d[e]}});var la=/\.(.*)$/,oa=/^(?:textarea|input|select)$/i,ca=/\./g,Ba=/ /g,Fa=/[^\w\s.|`]/g,Na=function(d){return d.replace(Fa,
"\\$&")};g.event={add:function(d,e,j,m){if(d.nodeType!==3&&d.nodeType!==8){try{g.isWindow(d)&&d!==b&&!d.frameElement&&(d=b)}catch(p){}if(j===false)j=R;else if(!j)return;var r,w;j.handler&&(r=j,j=r.handler);j.guid||(j.guid=g.guid++);if(w=g._data(d)){var H=w.events,F=w.handle;H||(w.events=H={});F||(w.handle=F=function(){return typeof g!=="undefined"&&!g.event.triggered?g.event.handle.apply(F.elem,arguments):f});F.elem=d;e=e.split(" ");for(var C,O=0,Y;C=e[O++];){w=r?g.extend({},r):{handler:j,data:m};
C.indexOf(".")>-1?(Y=C.split("."),C=Y.shift(),w.namespace=Y.slice(0).sort().join(".")):(Y=[],w.namespace="");w.type=C;w.guid||(w.guid=j.guid);var ga=H[C],aa=g.event.special[C]||{};if(!ga){ga=H[C]=[];if(!aa.setup||aa.setup.call(d,m,Y,F)===false)d.addEventListener?d.addEventListener(C,F,false):d.attachEvent&&d.attachEvent("on"+C,F)}aa.add&&(aa.add.call(d,w),w.handler.guid||(w.handler.guid=j.guid));ga.push(w);g.event.global[C]=true}d=null}}},global:{},remove:function(d,e,j,m){if(d.nodeType!==3&&d.nodeType!==
8){j===false&&(j=R);var p,r,w=0,H,F,C,O,Y,ga,aa=g.hasData(d)&&g._data(d),ia=aa&&aa.events;if(aa&&ia){e&&e.type&&(j=e.handler,e=e.type);if(!e||typeof e==="string"&&e.charAt(0)==="."){e=e||"";for(p in ia)g.event.remove(d,p+e)}else{for(e=e.split(" ");p=e[w++];){O=p;H=p.indexOf(".")<0;F=[];H||(F=p.split("."),p=F.shift(),C=RegExp("(^|\\.)"+g.map(F.slice(0).sort(),Na).join("\\.(?:.*\\.)?")+"(\\.|$)"));if(Y=ia[p])if(j){O=g.event.special[p]||{};for(r=m||0;r<Y.length;r++){ga=Y[r];if(j.guid===ga.guid){if(H||
C.test(ga.namespace)){m==null&&Y.splice(r--,1);O.remove&&O.remove.call(d,ga)}if(m!=null)break}}if(Y.length===0||m!=null&&Y.length===1){(!O.teardown||O.teardown.call(d,F)===false)&&g.removeEvent(d,p,aa.handle);delete ia[p]}}else for(r=0;r<Y.length;r++){ga=Y[r];if(H||C.test(ga.namespace)){g.event.remove(d,O,ga.handler,r);Y.splice(r--,1)}}}if(g.isEmptyObject(ia)){(e=aa.handle)&&(e.elem=null);delete aa.events;delete aa.handle;g.isEmptyObject(aa)&&g.removeData(d,f,true)}}}}},trigger:function(d,e,j,m){var p=
d.type||d;if(!m){d=typeof d==="object"?d[g.expando]?d:g.extend(g.Event(p),d):g.Event(p);p.indexOf("!")>=0&&(d.type=p=p.slice(0,-1),d.exclusive=true);j||(d.stopPropagation(),g.event.global[p]&&g.each(g.cache,function(){var Y=this[g.expando];Y&&Y.events&&Y.events[p]&&g.event.trigger(d,e,Y.handle.elem)}));if(!j||j.nodeType===3||j.nodeType===8)return f;d.result=f;d.target=j;e=g.makeArray(e);e.unshift(d)}d.currentTarget=j;(m=g._data(j,"handle"))&&m.apply(j,e);m=j.parentNode||j.ownerDocument;try{j&&j.nodeName&&
g.noData[j.nodeName.toLowerCase()]||j["on"+p]&&j["on"+p].apply(j,e)===false&&(d.result=false,d.preventDefault())}catch(r){}if(!d.isPropagationStopped()&&m)g.event.trigger(d,e,m,true);else if(!d.isDefaultPrevented()){var w;m=d.target;var H=p.replace(la,""),F=g.nodeName(m,"a")&&H==="click",C=g.event.special[H]||{};if((!C._default||C._default.call(j,d)===false)&&!F&&!(m&&m.nodeName&&g.noData[m.nodeName.toLowerCase()])){try{m[H]&&(w=m["on"+H],w&&(m["on"+H]=null),g.event.triggered=true,m[H]())}catch(O){}w&&
(m["on"+H]=w);g.event.triggered=false}}},handle:function(d){var e,j,m,p;p=[];var r=g.makeArray(arguments);d=r[0]=g.event.fix(d||b.event);d.currentTarget=this;(e=d.type.indexOf(".")<0&&!d.exclusive)||(j=d.type.split("."),d.type=j.shift(),p=j.slice(0).sort(),m=RegExp("(^|\\.)"+p.join("\\.(?:.*\\.)?")+"(\\.|$)"));d.namespace=d.namespace||p.join(".");p=g._data(this,"events");j=(p||{})[d.type];if(p&&j){j=j.slice(0);p=0;for(var w=j.length;p<w;p++){var H=j[p];if(e||m.test(H.namespace)){d.handler=H.handler;
d.data=H.data;d.handleObj=H;H=H.handler.apply(this,r);H!==f&&(d.result=H,H===false&&(d.preventDefault(),d.stopPropagation()));if(d.isImmediatePropagationStopped())break}}}return d.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(d){if(d[g.expando])return d;var e=d;d=g.Event(e);for(var j=this.props.length,m;j;){m=this.props[--j];d[m]=e[m]}d.target||(d.target=d.srcElement||B);d.target.nodeType===3&&(d.target=d.target.parentNode);!d.relatedTarget&&d.fromElement&&(d.relatedTarget=d.fromElement===d.target?d.toElement:d.fromElement);if(d.pageX==null&&d.clientX!=null){e=B.documentElement;j=B.body;d.pageX=d.clientX+(e&&e.scrollLeft||j&&j.scrollLeft||0)-(e&&e.clientLeft||j&&j.clientLeft||0);d.pageY=d.clientY+(e&&e.scrollTop||
j&&j.scrollTop||0)-(e&&e.clientTop||j&&j.clientTop||0)}d.which==null&&(d.charCode!=null||d.keyCode!=null)&&(d.which=d.charCode!=null?d.charCode:d.keyCode);!d.metaKey&&d.ctrlKey&&(d.metaKey=d.ctrlKey);!d.which&&d.button!==f&&(d.which=d.button&1?1:d.button&2?3:d.button&4?2:0);return d},guid:1E8,proxy:g.proxy,special:{ready:{setup:g.bindReady,teardown:g.noop},live:{add:function(d){g.event.add(this,D(d.origType,d.selector),g.extend({},d,{handler:P,guid:d.handler.guid}))},remove:function(d){g.event.remove(this,
D(d.origType,d.selector),d)}},beforeunload:{setup:function(d,e,j){g.isWindow(this)&&(this.onbeforeunload=j)},teardown:function(d,e){this.onbeforeunload===e&&(this.onbeforeunload=null)}}}};g.removeEvent=B.removeEventListener?function(d,e,j){d.removeEventListener&&d.removeEventListener(e,j,false)}:function(d,e,j){d.detachEvent&&d.detachEvent("on"+e,j)};g.Event=function(d){if(!this.preventDefault)return new g.Event(d);d&&d.type?(this.originalEvent=d,this.type=d.type,this.isDefaultPrevented=d.defaultPrevented||
d.returnValue===false||d.getPreventDefault&&d.getPreventDefault()?Q:R):this.type=d;this.timeStamp=g.now();this[g.expando]=true};g.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Q;var d=this.originalEvent;d&&(d.preventDefault?d.preventDefault():d.returnValue=false)},stopPropagation:function(){this.isPropagationStopped=Q;var d=this.originalEvent;d&&(d.stopPropagation&&d.stopPropagation(),d.cancelBubble=true)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=
Q;this.stopPropagation()},isDefaultPrevented:R,isPropagationStopped:R,isImmediatePropagationStopped:R};var Ea=function(d){var e=d.relatedTarget;try{if(!(e!==B&&!e.parentNode)){for(;e&&e!==this;)e=e.parentNode;e!==this&&(d.type=d.data,g.event.handle.apply(this,arguments))}}catch(j){}},Oa=function(d){d.type=d.data;g.event.handle.apply(this,arguments)};g.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(d,e){g.event.special[d]={setup:function(j){g.event.add(this,e,j&&j.selector?Oa:Ea,d)},
teardown:function(j){g.event.remove(this,e,j&&j.selector?Oa:Ea)}}});g.support.submitBubbles||(g.event.special.submit={setup:function(){if(this.nodeName&&this.nodeName.toLowerCase()!=="form"){g.event.add(this,"click.specialSubmit",function(d){var e=d.target,j=e.type;(j==="submit"||j==="image")&&g(e).closest("form").length&&L("submit",this,arguments)});g.event.add(this,"keypress.specialSubmit",function(d){var e=d.target,j=e.type;(j==="text"||j==="password")&&g(e).closest("form").length&&d.keyCode===
13&&L("submit",this,arguments)})}else return false},teardown:function(){g.event.remove(this,".specialSubmit")}});if(!g.support.changeBubbles){var Ra,cb=function(d){var e=d.type,j=d.value;e==="radio"||e==="checkbox"?j=d.checked:e==="select-multiple"?j=d.selectedIndex>-1?g.map(d.options,function(m){return m.selected}).join("-"):"":d.nodeName.toLowerCase()==="select"&&(j=d.selectedIndex);return j},Ta=function(d,e){var j=d.target,m,p;if(oa.test(j.nodeName)&&!j.readOnly){m=g._data(j,"_change_data");p=
cb(j);(d.type!=="focusout"||j.type!=="radio")&&g._data(j,"_change_data",p);if(!(m===f||p===m))if(m!=null||p){d.type="change";d.liveFired=f;g.event.trigger(d,e,j)}}};g.event.special.change={filters:{focusout:Ta,beforedeactivate:Ta,click:function(d){var e=d.target,j=e.type;(j==="radio"||j==="checkbox"||e.nodeName.toLowerCase()==="select")&&Ta.call(this,d)},keydown:function(d){var e=d.target,j=e.type;(d.keyCode===13&&e.nodeName.toLowerCase()!=="textarea"||d.keyCode===32&&(j==="checkbox"||j==="radio")||
j==="select-multiple")&&Ta.call(this,d)},beforeactivate:function(d){d=d.target;g._data(d,"_change_data",cb(d))}},setup:function(){if(this.type==="file")return false;for(var d in Ra)g.event.add(this,d+".specialChange",Ra[d]);return oa.test(this.nodeName)},teardown:function(){g.event.remove(this,".specialChange");return oa.test(this.nodeName)}};Ra=g.event.special.change.filters;Ra.focus=Ra.beforeactivate}B.addEventListener&&g.each({focus:"focusin",blur:"focusout"},function(d,e){function j(m){m=g.event.fix(m);
m.type=e;return g.event.handle.call(this,m)}g.event.special[e]={setup:function(){this.addEventListener(d,j,true)},teardown:function(){this.removeEventListener(d,j,true)}}});g.each(["bind","one"],function(d,e){g.fn[e]=function(j,m,p){if(typeof j==="object"){for(var r in j)this[e](r,m,j[r],p);return this}if(g.isFunction(m)||m===false){p=m;m=f}var w=e==="one"?g.proxy(p,function(F){g(this).unbind(F,w);return p.apply(this,arguments)}):p;if(j==="unload"&&e!=="one")this.one(j,m,p);else{r=0;for(var H=this.length;r<
H;r++)g.event.add(this[r],j,w,m)}return this}});g.fn.extend({unbind:function(d,e){if(typeof d!=="object"||d.preventDefault)for(var j=0,m=this.length;j<m;j++)g.event.remove(this[j],d,e);else for(j in d)this.unbind(j,d[j]);return this},delegate:function(d,e,j,m){return this.live(e,j,m,d)},undelegate:function(d,e,j){return arguments.length===0?this.unbind("live"):this.die(e,null,j,d)},trigger:function(d,e){return this.each(function(){g.event.trigger(d,e,this)})},triggerHandler:function(d,e){if(this[0]){var j=
g.Event(d);j.preventDefault();j.stopPropagation();g.event.trigger(j,e,this[0]);return j.result}},toggle:function(d){for(var e=arguments,j=1;j<e.length;)g.proxy(d,e[j++]);return this.click(g.proxy(d,function(m){var p=(g._data(this,"lastToggle"+d.guid)||0)%j;g._data(this,"lastToggle"+d.guid,p+1);m.preventDefault();return e[p].apply(this,arguments)||false}))},hover:function(d,e){return this.mouseenter(d).mouseleave(e||d)}});var db={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};
g.each(["live","die"],function(d,e){g.fn[e]=function(j,m,p,r){var w,H=0,F,C,O=r||this.selector;r=r?this:g(this.context);if(typeof j==="object"&&!j.preventDefault){for(w in j)r[e](w,m,j[w],O);return this}g.isFunction(m)&&(p=m,m=f);for(j=(j||"").split(" ");(w=j[H++])!=null;){F=la.exec(w);C="";F&&(C=F[0],w=w.replace(la,""));if(w==="hover")j.push("mouseenter"+C,"mouseleave"+C);else{F=w;w==="focus"||w==="blur"?(j.push(db[w]+C),w+=C):w=(db[w]||w)+C;if(e==="live"){C=0;for(var Y=r.length;C<Y;C++)g.event.add(r[C],
"live."+D(w,O),{data:m,selector:O,handler:p,origType:w,origHandler:p,preType:F})}else r.unbind("live."+D(w,O),p)}}return this}});g.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(d,e){g.fn[e]=function(j,m){m==null&&(m=j,j=null);return arguments.length>0?this.bind(e,j,m):this.trigger(e)};g.attrFn&&(g.attrFn[e]=true)});(function(){function d(q,
A,K,E,G,M){G=0;for(var W=E.length;G<W;G++){var U=E[G];if(U){var ea=false;for(U=U[q];U;){if(U.sizcache===K){ea=E[U.sizset];break}if(U.nodeType===1){M||(U.sizcache=K,U.sizset=G);if(typeof A!=="string"){if(U===A){ea=true;break}}else if(C.filter(A,[U]).length>0){ea=U;break}}U=U[q]}E[G]=ea}}}function e(q,A,K,E,G,M){G=0;for(var W=E.length;G<W;G++){var U=E[G];if(U){var ea=false;for(U=U[q];U;){if(U.sizcache===K){ea=E[U.sizset];break}U.nodeType===1&&!M&&(U.sizcache=K,U.sizset=G);if(U.nodeName.toLowerCase()===
A){ea=U;break}U=U[q]}E[G]=ea}}}var j=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,m=0,p=Object.prototype.toString,r=false,w=true,H=/\\/g,F=/\W/;[0,0].sort(function(){w=false;return 0});var C=function(q,A,K,E){K=K||[];var G=A=A||B;if(A.nodeType!==1&&A.nodeType!==9)return[];if(!q||typeof q!=="string")return K;var M,W,U,ea,ra,qa,va=true,x=C.isXML(A),J=[],N=q;do{j.exec("");if(M=j.exec(N)){N=M[3];J.push(M[1]);if(M[2]){ea=
M[3];break}}}while(M);if(J.length>1&&Y.exec(q))if(J.length===2&&O.relative[J[0]])W=Aa(J[0]+J[1],A);else for(W=O.relative[J[0]]?[A]:C(J.shift(),A);J.length;){q=J.shift();O.relative[q]&&(q+=J.shift());W=Aa(q,W)}else{!E&&J.length>1&&A.nodeType===9&&!x&&O.match.ID.test(J[0])&&!O.match.ID.test(J[J.length-1])&&(ra=C.find(J.shift(),A,x),A=ra.expr?C.filter(ra.expr,ra.set)[0]:ra.set[0]);if(A){ra=E?{expr:J.pop(),set:ia(E)}:C.find(J.pop(),J.length===1&&(J[0]==="~"||J[0]==="+")&&A.parentNode?A.parentNode:A,x);
W=ra.expr?C.filter(ra.expr,ra.set):ra.set;for(J.length>0?U=ia(W):va=false;J.length;){M=qa=J.pop();O.relative[qa]?M=J.pop():qa="";M==null&&(M=A);O.relative[qa](U,M,x)}}else U=[]}U||(U=W);U||C.error(qa||q);if(p.call(U)==="[object Array]")if(va)if(A&&A.nodeType===1)for(q=0;U[q]!=null;q++)U[q]&&(U[q]===true||U[q].nodeType===1&&C.contains(A,U[q]))&&K.push(W[q]);else for(q=0;U[q]!=null;q++)U[q]&&U[q].nodeType===1&&K.push(W[q]);else K.push.apply(K,U);else ia(U,K);ea&&(C(ea,G,K,E),C.uniqueSort(K));return K};
C.uniqueSort=function(q){if(pa){r=w;q.sort(pa);if(r)for(var A=1;A<q.length;A++)q[A]===q[A-1]&&q.splice(A--,1)}return q};C.matches=function(q,A){return C(q,null,null,A)};C.matchesSelector=function(q,A){return C(A,null,null,[q]).length>0};C.find=function(q,A,K){var E;if(!q)return[];for(var G=0,M=O.order.length;G<M;G++){var W,U=O.order[G];if(W=O.leftMatch[U].exec(q)){var ea=W[1];W.splice(1,1);if(ea.substr(ea.length-1)!=="\\"){W[1]=(W[1]||"").replace(H,"");E=O.find[U](W,A,K);if(E!=null){q=q.replace(O.match[U],
"");break}}}}E||(E=typeof A.getElementsByTagName!=="undefined"?A.getElementsByTagName("*"):[]);return{set:E,expr:q}};C.filter=function(q,A,K,E){for(var G,M,W=q,U=[],ea=A,ra=A&&A[0]&&C.isXML(A[0]);q&&A.length;){for(var qa in O.filter)if((G=O.leftMatch[qa].exec(q))!=null&&G[2]){var va,x,J=O.filter[qa];x=G[1];M=false;G.splice(1,1);if(x.substr(x.length-1)!=="\\"){ea===U&&(U=[]);if(O.preFilter[qa])if(G=O.preFilter[qa](G,ea,K,U,E,ra)){if(G===true)continue}else M=va=true;if(G)for(var N=0;(x=ea[N])!=null;N++)if(x){va=
J(x,G,N,ea);var S=E^!!va;K&&va!=null?S?M=true:ea[N]=false:S&&(U.push(x),M=true)}if(va!==f){K||(ea=U);q=q.replace(O.match[qa],"");if(!M)return[];break}}}if(q===W)if(M==null)C.error(q);else break;W=q}return ea};C.error=function(q){throw"Syntax error, unrecognized expression: "+q;};var O=C.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(q){return q.getAttribute("href")},type:function(q){return q.getAttribute("type")}},relative:{"+":function(q,A){var K=
typeof A==="string",E=K&&!F.test(A);K=K&&!E;E&&(A=A.toLowerCase());E=0;for(var G=q.length,M;E<G;E++)if(M=q[E]){for(;(M=M.previousSibling)&&M.nodeType!==1;);q[E]=K||M&&M.nodeName.toLowerCase()===A?M||false:M===A}K&&C.filter(A,q,true)},">":function(q,A){var K,E=typeof A==="string",G=0,M=q.length;if(E&&!F.test(A))for(A=A.toLowerCase();G<M;G++){if(K=q[G]){K=K.parentNode;q[G]=K.nodeName.toLowerCase()===A?K:false}}else{for(;G<M;G++)(K=q[G])&&(q[G]=E?K.parentNode:K.parentNode===A);E&&C.filter(A,q,true)}},
"":function(q,A,K){var E,G=m++,M=d;typeof A==="string"&&!F.test(A)&&(A=A.toLowerCase(),E=A,M=e);M("parentNode",A,G,q,E,K)},"~":function(q,A,K){var E,G=m++,M=d;typeof A==="string"&&!F.test(A)&&(A=A.toLowerCase(),E=A,M=e);M("previousSibling",A,G,q,E,K)}},find:{ID:function(q,A,K){if(typeof A.getElementById!=="undefined"&&!K)return(q=A.getElementById(q[1]))&&q.parentNode?[q]:[]},NAME:function(q,A){if(typeof A.getElementsByName!=="undefined"){for(var K=[],E=A.getElementsByName(q[1]),G=0,M=E.length;G<M;G++)E[G].getAttribute("name")===
q[1]&&K.push(E[G]);return K.length===0?null:K}},TAG:function(q,A){if(typeof A.getElementsByTagName!=="undefined")return A.getElementsByTagName(q[1])}},preFilter:{CLASS:function(q,A,K,E,G,M){q=" "+q[1].replace(H,"")+" ";if(M)return q;M=0;for(var W;(W=A[M])!=null;M++)W&&(G^(W.className&&(" "+W.className+" ").replace(/[\t\n\r]/g," ").indexOf(q)>=0)?K||E.push(W):K&&(A[M]=false));return false},ID:function(q){return q[1].replace(H,"")},TAG:function(q){return q[1].replace(H,"").toLowerCase()},CHILD:function(q){if(q[1]===
"nth"){q[2]||C.error(q[0]);q[2]=q[2].replace(/^\+|\s*/g,"");var A=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(q[2]==="even"&&"2n"||q[2]==="odd"&&"2n+1"||!/\D/.test(q[2])&&"0n+"+q[2]||q[2]);q[2]=A[1]+(A[2]||1)-0;q[3]=A[3]-0}else q[2]&&C.error(q[0]);q[0]=m++;return q},ATTR:function(q,A,K,E,G,M){A=q[1]=q[1].replace(H,"");!M&&O.attrMap[A]&&(q[1]=O.attrMap[A]);q[4]=(q[4]||q[5]||"").replace(H,"");q[2]==="~="&&(q[4]=" "+q[4]+" ");return q},PSEUDO:function(q,A,K,E,G){if(q[1]==="not")if((j.exec(q[3])||"").length>1||
/^\w/.test(q[3]))q[3]=C(q[3],null,null,A);else{q=C.filter(q[3],A,K,true^G);K||E.push.apply(E,q);return false}else if(O.match.POS.test(q[0])||O.match.CHILD.test(q[0]))return true;return q},POS:function(q){q.unshift(true);return q}},filters:{enabled:function(q){return q.disabled===false&&q.type!=="hidden"},disabled:function(q){return q.disabled===true},checked:function(q){return q.checked===true},selected:function(q){return q.selected===true},parent:function(q){return!!q.firstChild},empty:function(q){return!q.firstChild},
has:function(q,A,K){return!!C(K[3],q).length},header:function(q){return/h\d/i.test(q.nodeName)},text:function(q){return"text"===q.getAttribute("type")},radio:function(q){return"radio"===q.type},checkbox:function(q){return"checkbox"===q.type},file:function(q){return"file"===q.type},password:function(q){return"password"===q.type},submit:function(q){return"submit"===q.type},image:function(q){return"image"===q.type},reset:function(q){return"reset"===q.type},button:function(q){return"button"===q.type||
q.nodeName.toLowerCase()==="button"},input:function(q){return/input|select|textarea|button/i.test(q.nodeName)}},setFilters:{first:function(q,A){return A===0},last:function(q,A,K,E){return A===E.length-1},even:function(q,A){return A%2===0},odd:function(q,A){return A%2===1},lt:function(q,A,K){return A<K[3]-0},gt:function(q,A,K){return A>K[3]-0},nth:function(q,A,K){return K[3]-0===A},eq:function(q,A,K){return K[3]-0===A}},filter:{PSEUDO:function(q,A,K,E){var G=A[1],M=O.filters[G];if(M)return M(q,K,A,
E);if(G==="contains")return(q.textContent||q.innerText||C.getText([q])||"").indexOf(A[3])>=0;if(G==="not"){A=A[3];K=0;for(E=A.length;K<E;K++)if(A[K]===q)return false;return true}C.error(G)},CHILD:function(q,A){var K=A[1],E=q;switch(K){case "only":case "first":for(;E=E.previousSibling;)if(E.nodeType===1)return false;if(K==="first")return true;E=q;case "last":for(;E=E.nextSibling;)if(E.nodeType===1)return false;return true;case "nth":K=A[2];var G=A[3];if(K===1&&G===0)return true;var M=A[0],W=q.parentNode;
if(W&&(W.sizcache!==M||!q.nodeIndex)){var U=0;for(E=W.firstChild;E;E=E.nextSibling)E.nodeType===1&&(E.nodeIndex=++U);W.sizcache=M}E=q.nodeIndex-G;return K===0?E===0:E%K===0&&E/K>=0}},ID:function(q,A){return q.nodeType===1&&q.getAttribute("id")===A},TAG:function(q,A){return A==="*"&&q.nodeType===1||q.nodeName.toLowerCase()===A},CLASS:function(q,A){return(" "+(q.className||q.getAttribute("class"))+" ").indexOf(A)>-1},ATTR:function(q,A){var K=A[1];K=O.attrHandle[K]?O.attrHandle[K](q):q[K]!=null?q[K]:
q.getAttribute(K);var E=K+"",G=A[2],M=A[4];return K==null?G==="!=":G==="="?E===M:G==="*="?E.indexOf(M)>=0:G==="~="?(" "+E+" ").indexOf(M)>=0:M?G==="!="?E!==M:G==="^="?E.indexOf(M)===0:G==="$="?E.substr(E.length-M.length)===M:G==="|="?E===M||E.substr(0,M.length+1)===M+"-":false:E&&K!==false},POS:function(q,A,K,E){var G=O.setFilters[A[2]];if(G)return G(q,K,A,E)}}},Y=O.match.POS,ga=function(q,A){return"\\"+(A-0+1)},aa;for(aa in O.match){O.match[aa]=RegExp(O.match[aa].source+/(?![^\[]*\])(?![^\(]*\))/.source);
O.leftMatch[aa]=RegExp(/(^(?:.|\r|\n)*?)/.source+O.match[aa].source.replace(/\\(\d+)/g,ga))}var ia=function(q,A){q=Array.prototype.slice.call(q,0);if(A){A.push.apply(A,q);return A}return q};try{Array.prototype.slice.call(B.documentElement.childNodes,0)}catch(ta){ia=function(q,A){var K=0,E=A||[];if(p.call(q)==="[object Array]")Array.prototype.push.apply(E,q);else if(typeof q.length==="number")for(var G=q.length;K<G;K++)E.push(q[K]);else for(;q[K];K++)E.push(q[K]);return E}}var pa,ua;B.documentElement.compareDocumentPosition?
pa=function(q,A){if(q===A){r=true;return 0}if(!q.compareDocumentPosition||!A.compareDocumentPosition)return q.compareDocumentPosition?-1:1;return q.compareDocumentPosition(A)&4?-1:1}:(pa=function(q,A){var K,E,G=[],M=[];K=q.parentNode;E=A.parentNode;var W=K;if(q===A){r=true;return 0}if(K===E)return ua(q,A);if(!K)return-1;if(!E)return 1;for(;W;){G.unshift(W);W=W.parentNode}for(W=E;W;){M.unshift(W);W=W.parentNode}K=G.length;E=M.length;for(W=0;W<K&&W<E;W++)if(G[W]!==M[W])return ua(G[W],M[W]);return W===
K?ua(q,M[W],-1):ua(G[W],A,1)},ua=function(q,A,K){if(q===A)return K;for(q=q.nextSibling;q;){if(q===A)return-1;q=q.nextSibling}return 1});C.getText=function(q){for(var A="",K,E=0;q[E];E++){K=q[E];K.nodeType===3||K.nodeType===4?A+=K.nodeValue:K.nodeType!==8&&(A+=C.getText(K.childNodes))}return A};(function(){var q=B.createElement("div"),A="script"+(new Date).getTime(),K=B.documentElement;q.innerHTML="<a name='"+A+"'/>";K.insertBefore(q,K.firstChild);B.getElementById(A)&&(O.find.ID=function(E,G,M){if(typeof G.getElementById!==
"undefined"&&!M)return(G=G.getElementById(E[1]))?G.id===E[1]||typeof G.getAttributeNode!=="undefined"&&G.getAttributeNode("id").nodeValue===E[1]?[G]:f:[]},O.filter.ID=function(E,G){var M=typeof E.getAttributeNode!=="undefined"&&E.getAttributeNode("id");return E.nodeType===1&&M&&M.nodeValue===G});K.removeChild(q);K=q=null})();(function(){var q=B.createElement("div");q.appendChild(B.createComment(""));q.getElementsByTagName("*").length>0&&(O.find.TAG=function(A,K){var E=K.getElementsByTagName(A[1]);
if(A[1]==="*"){for(var G=[],M=0;E[M];M++)E[M].nodeType===1&&G.push(E[M]);E=G}return E});q.innerHTML="<a href='#'></a>";q.firstChild&&typeof q.firstChild.getAttribute!=="undefined"&&q.firstChild.getAttribute("href")!=="#"&&(O.attrHandle.href=function(A){return A.getAttribute("href",2)});q=null})();B.querySelectorAll&&function(){var q=C,A=B.createElement("div");A.innerHTML="<p class='TEST'></p>";if(!A.querySelectorAll||A.querySelectorAll(".TEST").length!==0){C=function(E,G,M,W){G=G||B;if(!W&&!C.isXML(G)){var U=
/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(E);if(U&&(G.nodeType===1||G.nodeType===9)){if(U[1])return ia(G.getElementsByTagName(E),M);if(U[2]&&O.find.CLASS&&G.getElementsByClassName)return ia(G.getElementsByClassName(U[2]),M)}if(G.nodeType===9){if(E==="body"&&G.body)return ia([G.body],M);if(U&&U[3]){var ea=G.getElementById(U[3]);if(!ea||!ea.parentNode)return ia([],M);if(ea.id===U[3])return ia([ea],M)}try{return ia(G.querySelectorAll(E),M)}catch(ra){}}else if(G.nodeType===1&&G.nodeName.toLowerCase()!==
"object"){U=G;var qa=(ea=G.getAttribute("id"))||"__sizzle__",va=G.parentNode,x=/^\s*[+~]/.test(E);ea?qa=qa.replace(/'/g,"\\$&"):G.setAttribute("id",qa);x&&va&&(G=G.parentNode);try{if(!x||va)return ia(G.querySelectorAll("[id='"+qa+"'] "+E),M)}catch(J){}finally{ea||U.removeAttribute("id")}}}return q(E,G,M,W)};for(var K in q)C[K]=q[K];A=null}}();(function(){var q=B.documentElement,A=q.matchesSelector||q.mozMatchesSelector||q.webkitMatchesSelector||q.msMatchesSelector,K=false;try{A.call(B.documentElement,
"[test!='']:sizzle")}catch(E){K=true}A&&(C.matchesSelector=function(G,M){M=M.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!C.isXML(G))try{if(K||!O.match.PSEUDO.test(M)&&!/!=/.test(M))return A.call(G,M)}catch(W){}return C(M,null,null,[G]).length>0})})();(function(){var q=B.createElement("div");q.innerHTML="<div class='test e'></div><div class='test'></div>";if(q.getElementsByClassName&&q.getElementsByClassName("e").length!==0){q.lastChild.className="e";if(q.getElementsByClassName("e").length!==1){O.order.splice(1,
0,"CLASS");O.find.CLASS=function(A,K,E){if(typeof K.getElementsByClassName!=="undefined"&&!E)return K.getElementsByClassName(A[1])};q=null}}})();B.documentElement.contains?C.contains=function(q,A){return q!==A&&(q.contains?q.contains(A):true)}:B.documentElement.compareDocumentPosition?C.contains=function(q,A){return!!(q.compareDocumentPosition(A)&16)}:C.contains=function(){return false};C.isXML=function(q){return(q=(q?q.ownerDocument||q:0).documentElement)?q.nodeName!=="HTML":false};var Aa=function(q,
A){for(var K,E=[],G="",M=A.nodeType?[A]:A;K=O.match.PSEUDO.exec(q);){G+=K[0];q=q.replace(O.match.PSEUDO,"")}q=O.relative[q]?q+"*":q;K=0;for(var W=M.length;K<W;K++)C(q,M[K],E);return C.filter(G,E)};g.find=C;g.expr=C.selectors;g.expr[":"]=g.expr.filters;g.unique=C.uniqueSort;g.text=C.getText;g.isXMLDoc=C.isXML;g.contains=C.contains})();var ub=/Until$/,vb=/^(?:parents|prevUntil|prevAll)/,wb=/,/,tb=/^.[^:#\[\.,]*$/,xb=Array.prototype.slice,yb=g.expr.match.POS,zb={children:true,contents:true,next:true,
prev:true};g.fn.extend({find:function(d){for(var e=this.pushStack("","find",d),j=0,m=0,p=this.length;m<p;m++){j=e.length;g.find(d,this[m],e);if(m>0)for(var r=j;r<e.length;r++)for(var w=0;w<j;w++)if(e[w]===e[r]){e.splice(r--,1);break}}return e},has:function(d){var e=g(d);return this.filter(function(){for(var j=0,m=e.length;j<m;j++)if(g.contains(this,e[j]))return true})},not:function(d){return this.pushStack(I(this,d,false),"not",d)},filter:function(d){return this.pushStack(I(this,d,true),"filter",
d)},is:function(d){return!!d&&g.filter(d,this).length>0},closest:function(d,e){var j=[],m,p,r=this[0];if(g.isArray(d)){var w,H={},F=1;if(r&&d.length){m=0;for(p=d.length;m<p;m++){w=d[m];H[w]||(H[w]=g.expr.match.POS.test(w)?g(w,e||this.context):w)}for(;r&&r.ownerDocument&&r!==e;){for(w in H){m=H[w];(m.jquery?m.index(r)>-1:g(r).is(m))&&j.push({selector:w,elem:r,level:F})}r=r.parentNode;F++}}return j}w=yb.test(d)?g(d,e||this.context):null;m=0;for(p=this.length;m<p;m++)for(r=this[m];r;){if(w?w.index(r)>
-1:g.find.matchesSelector(r,d)){j.push(r);break}r=r.parentNode;if(!r||!r.ownerDocument||r===e)break}j=j.length>1?g.unique(j):j;return this.pushStack(j,"closest",d)},index:function(d){if(!d||typeof d==="string")return g.inArray(this[0],d?g(d):this.parent().children());return g.inArray(d.jquery?d[0]:d,this)},add:function(d,e){var j=typeof d==="string"?g(d,e):g.makeArray(d),m=g.merge(this.get(),j);return this.pushStack(!j[0]||!j[0].parentNode||j[0].parentNode.nodeType===11||!m[0]||!m[0].parentNode||
m[0].parentNode.nodeType===11?m:g.unique(m))},andSelf:function(){return this.add(this.prevObject)}});g.each({parent:function(d){return(d=d.parentNode)&&d.nodeType!==11?d:null},parents:function(d){return g.dir(d,"parentNode")},parentsUntil:function(d,e,j){return g.dir(d,"parentNode",j)},next:function(d){return g.nth(d,2,"nextSibling")},prev:function(d){return g.nth(d,2,"previousSibling")},nextAll:function(d){return g.dir(d,"nextSibling")},prevAll:function(d){return g.dir(d,"previousSibling")},nextUntil:function(d,
e,j){return g.dir(d,"nextSibling",j)},prevUntil:function(d,e,j){return g.dir(d,"previousSibling",j)},siblings:function(d){return g.sibling(d.parentNode.firstChild,d)},children:function(d){return g.sibling(d.firstChild)},contents:function(d){return g.nodeName(d,"iframe")?d.contentDocument||d.contentWindow.document:g.makeArray(d.childNodes)}},function(d,e){g.fn[d]=function(j,m){var p=g.map(this,e,j),r=xb.call(arguments);ub.test(d)||(m=j);m&&typeof m==="string"&&(p=g.filter(m,p));p=this.length>1&&!zb[d]?
g.unique(p):p;(this.length>1||wb.test(m))&&vb.test(d)&&(p=p.reverse());return this.pushStack(p,d,r.join(","))}});g.extend({filter:function(d,e,j){j&&(d=":not("+d+")");return e.length===1?g.find.matchesSelector(e[0],d)?[e[0]]:[]:g.find.matches(d,e)},dir:function(d,e,j){var m=[];for(d=d[e];d&&d.nodeType!==9&&(j===f||d.nodeType!==1||!g(d).is(j));){d.nodeType===1&&m.push(d);d=d[e]}return m},nth:function(d,e,j){e=e||1;for(var m=0;d;d=d[j])if(d.nodeType===1&&++m===e)break;return d},sibling:function(d,e){for(var j=
[];d;d=d.nextSibling)d.nodeType===1&&d!==e&&j.push(d);return j}});var Ab=/ jQuery\d+="(?:\d+|null)"/g,Za=/^\s+/,eb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,fb=/<([\w:]+)/,Bb=/<tbody/i,Cb=/<|&#?\w+;/,gb=/<(?:script|object|embed|option|style)/i,hb=/checked\s*(?:[^=]|=\s*.checked.)/i,za={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>",
"</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};za.optgroup=za.option;za.tbody=za.tfoot=za.colgroup=za.caption=za.thead;za.th=za.td;g.support.htmlSerialize||(za._default=[1,"div<div>","</div>"]);g.fn.extend({text:function(d){if(g.isFunction(d))return this.each(function(e){var j=g(this);j.text(d.call(this,e,j.text()))});if(typeof d!=="object"&&d!==f)return this.empty().append((this[0]&&this[0].ownerDocument||B).createTextNode(d));
return g.text(this)},wrapAll:function(d){if(g.isFunction(d))return this.each(function(j){g(this).wrapAll(d.call(this,j))});if(this[0]){var e=g(d,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&e.insertBefore(this[0]);e.map(function(){for(var j=this;j.firstChild&&j.firstChild.nodeType===1;)j=j.firstChild;return j}).append(this)}return this},wrapInner:function(d){if(g.isFunction(d))return this.each(function(e){g(this).wrapInner(d.call(this,e))});return this.each(function(){var e=g(this),
j=e.contents();j.length?j.wrapAll(d):e.append(d)})},wrap:function(d){return this.each(function(){g(this).wrapAll(d)})},unwrap:function(){return this.parent().each(function(){g.nodeName(this,"body")||g(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(d){this.nodeType===1&&this.appendChild(d)})},prepend:function(){return this.domManip(arguments,true,function(d){this.nodeType===1&&this.insertBefore(d,this.firstChild)})},before:function(){if(this[0]&&
this[0].parentNode)return this.domManip(arguments,false,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var d=g(arguments[0]);d.push.apply(d,this.toArray());return this.pushStack(d,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var d=this.pushStack(this,"after",arguments);d.push.apply(d,g(arguments[0]).toArray());return d}},remove:function(d,
e){for(var j=0,m;(m=this[j])!=null;j++)if(!d||g.filter(d,[m]).length){!e&&m.nodeType===1&&(g.cleanData(m.getElementsByTagName("*")),g.cleanData([m]));m.parentNode&&m.parentNode.removeChild(m)}return this},empty:function(){for(var d=0,e;(e=this[d])!=null;d++)for(e.nodeType===1&&g.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(d,e){d=d==null?false:d;e=e==null?d:e;return this.map(function(){return g.clone(this,d,e)})},html:function(d){if(d===
f)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ab,""):null;if(typeof d!=="string"||gb.test(d)||!g.support.leadingWhitespace&&Za.test(d)||za[(fb.exec(d)||["",""])[1].toLowerCase()])g.isFunction(d)?this.each(function(p){var r=g(this);r.html(d.call(this,p,r.html()))}):this.empty().append(d);else{d=d.replace(eb,"<$1></$2>");try{for(var e=0,j=this.length;e<j;e++)this[e].nodeType===1&&(g.cleanData(this[e].getElementsByTagName("*")),this[e].innerHTML=d)}catch(m){this.empty().append(d)}}return this},
replaceWith:function(d){if(this[0]&&this[0].parentNode){if(g.isFunction(d))return this.each(function(e){var j=g(this),m=j.html();j.replaceWith(d.call(this,e,m))});typeof d!=="string"&&(d=g(d).detach());return this.each(function(){var e=this.nextSibling,j=this.parentNode;g(this).remove();e?g(e).before(d):g(j).append(d)})}return this.pushStack(g(g.isFunction(d)?d():d),"replaceWith",d)},detach:function(d){return this.remove(d,true)},domManip:function(d,e,j){var m,p,r,w=d[0],H=[];if(!g.support.checkClone&&
arguments.length===3&&typeof w==="string"&&hb.test(w))return this.each(function(){g(this).domManip(d,e,j,true)});if(g.isFunction(w))return this.each(function(O){var Y=g(this);d[0]=w.call(this,O,e?Y.html():f);Y.domManip(d,e,j)});if(this[0]){r=w&&w.parentNode;g.support.parentNode&&r&&r.nodeType===11&&r.childNodes.length===this.length?m={fragment:r}:m=g.buildFragment(d,this,H);r=m.fragment;r.childNodes.length===1?p=r=r.firstChild:p=r.firstChild;if(p){e=e&&g.nodeName(p,"tr");p=0;for(var F=this.length,
C=F-1;p<F;p++)j.call(e?g.nodeName(this[p],"table")?this[p].getElementsByTagName("tbody")[0]||this[p].appendChild(this[p].ownerDocument.createElement("tbody")):this[p]:this[p],m.cacheable||F>1&&p<C?g.clone(r,true,true):r)}H.length&&g.each(H,s)}return this}});g.buildFragment=function(d,e,j){var m,p,r;e=e&&e[0]?e[0].ownerDocument||e[0]:B;d.length===1&&typeof d[0]==="string"&&d[0].length<512&&e===B&&d[0].charAt(0)==="<"&&!gb.test(d[0])&&(g.support.checkClone||!hb.test(d[0]))&&(p=true,r=g.fragments[d[0]],
r&&r!==1&&(m=r));m||(m=e.createDocumentFragment(),g.clean(d,e,m,j));p&&(g.fragments[d[0]]=r?m:1);return{fragment:m,cacheable:p}};g.fragments={};g.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(d,e){g.fn[d]=function(j){var m=[];j=g(j);var p=this.length===1&&this[0].parentNode;if(p&&p.nodeType===11&&p.childNodes.length===1&&j.length===1){j[e](this[0]);return this}p=0;for(var r=j.length;p<r;p++){var w=(p>0?this.clone(true):this).get();
g(j[p])[e](w);m=m.concat(w)}return this.pushStack(m,d,j.selector)}});g.extend({clone:function(d,e,j){var m=d.cloneNode(true),p,r,w;if((!g.support.noCloneEvent||!g.support.noCloneChecked)&&(d.nodeType===1||d.nodeType===11)&&!g.isXMLDoc(d)){u(d,m);p=o(d);r=o(m);for(w=0;p[w];++w)u(p[w],r[w])}if(e){z(d,m);if(j){p=o(d);r=o(m);for(w=0;p[w];++w)z(p[w],r[w])}}return m},clean:function(d,e,j,m){e=e||B;typeof e.createElement==="undefined"&&(e=e.ownerDocument||e[0]&&e[0].ownerDocument||B);for(var p=[],r=0,w;(w=
d[r])!=null;r++){typeof w==="number"&&(w+="");if(w){if(typeof w!=="string"||Cb.test(w)){if(typeof w==="string"){w=w.replace(eb,"<$1></$2>");var H=(fb.exec(w)||["",""])[1].toLowerCase(),F=za[H]||za._default,C=F[0],O=e.createElement("div");for(O.innerHTML=F[1]+w+F[2];C--;)O=O.lastChild;if(!g.support.tbody){C=Bb.test(w);H=H==="table"&&!C?O.firstChild&&O.firstChild.childNodes:F[1]==="<table>"&&!C?O.childNodes:[];for(F=H.length-1;F>=0;--F)g.nodeName(H[F],"tbody")&&!H[F].childNodes.length&&H[F].parentNode.removeChild(H[F])}!g.support.leadingWhitespace&&
Za.test(w)&&O.insertBefore(e.createTextNode(Za.exec(w)[0]),O.firstChild);w=O.childNodes}}else w=e.createTextNode(w);w.nodeType?p.push(w):p=g.merge(p,w)}}if(j)for(r=0;p[r];r++)!m||!g.nodeName(p[r],"script")||p[r].type&&p[r].type.toLowerCase()!=="text/javascript"?(p[r].nodeType===1&&p.splice.apply(p,[r+1,0].concat(g.makeArray(p[r].getElementsByTagName("script")))),j.appendChild(p[r])):m.push(p[r].parentNode?p[r].parentNode.removeChild(p[r]):p[r]);return p},cleanData:function(d){for(var e,j,m=g.cache,
p=g.expando,r=g.event.special,w=g.support.deleteExpando,H=0,F;(F=d[H])!=null;H++)if(!(F.nodeName&&g.noData[F.nodeName.toLowerCase()]))if(j=F[g.expando]){if((e=m[j]&&m[j][p])&&e.events){for(var C in e.events)r[C]?g.event.remove(F,C):g.removeEvent(F,C,e.handle);e.handle&&(e.handle.elem=null)}w?delete F[g.expando]:F.removeAttribute&&F.removeAttribute(g.expando);delete m[j]}}});var ib=/alpha\([^)]*\)/i,Db=/opacity=([^)]*)/,Eb=/-([a-z])/ig,Fb=/([A-Z])/g,jb=/^-?\d+(?:px)?$/i,Gb=/^-?\d/,Hb={position:"absolute",
visibility:"hidden",display:"block"},rb=["Left","Right"],sb=["Top","Bottom"],Sa,Ia,Ua,Ib=function(d,e){return e.toUpperCase()};g.fn.css=function(d,e){if(arguments.length===2&&e===f)return this;return g.access(this,d,e,true,function(j,m,p){return p!==f?g.style(j,m,p):g.css(j,m)})};g.extend({cssHooks:{opacity:{get:function(d,e){if(e){var j=Sa(d,"opacity","opacity");return j===""?"1":j}return d.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":g.support.cssFloat?
"cssFloat":"styleFloat"},style:function(d,e,j,m){if(d&&d.nodeType!==3&&d.nodeType!==8&&d.style){var p,r=g.camelCase(e),w=d.style,H=g.cssHooks[r];e=g.cssProps[r]||r;if(j===f){if(H&&"get"in H&&(p=H.get(d,false,m))!==f)return p;return w[e]}if(!(typeof j==="number"&&isNaN(j)||j==null)){typeof j==="number"&&!g.cssNumber[r]&&(j+="px");if(!H||!("set"in H)||(j=H.set(d,j))!==f)try{w[e]=j}catch(F){}}}},css:function(d,e,j){var m,p=g.camelCase(e),r=g.cssHooks[p];e=g.cssProps[p]||p;if(r&&"get"in r&&(m=r.get(d,
true,j))!==f)return m;if(Sa)return Sa(d,e,p)},swap:function(d,e,j){var m={},p;for(p in e){m[p]=d.style[p];d.style[p]=e[p]}j.call(d);for(p in e)d.style[p]=m[p]},camelCase:function(d){return d.replace(Eb,Ib)}});g.curCSS=g.css;g.each(["height","width"],function(d,e){g.cssHooks[e]={get:function(j,m,p){var r;if(m){j.offsetWidth!==0?r=y(j,e,p):g.swap(j,Hb,function(){r=y(j,e,p)});if(r<=0){r=Sa(j,e,e);r==="0px"&&Ua&&(r=Ua(j,e,e));if(r!=null)return r===""||r==="auto"?"0px":r}if(r<0||r==null){r=j.style[e];
return r===""||r==="auto"?"0px":r}return typeof r==="string"?r:r+"px"}},set:function(j,m){if(!jb.test(m))return m;m=parseFloat(m);if(m>=0)return m+"px"}}});g.support.opacity||(g.cssHooks.opacity={get:function(d,e){return Db.test((e&&d.currentStyle?d.currentStyle.filter:d.style.filter)||"")?parseFloat(RegExp.$1)/100+"":e?"1":""},set:function(d,e){var j=d.style;j.zoom=1;var m=g.isNaN(e)?"":"alpha(opacity="+e*100+")",p=j.filter||"";j.filter=ib.test(p)?p.replace(ib,m):j.filter+" "+m}});B.defaultView&&
B.defaultView.getComputedStyle&&(Ia=function(d,e,j){var m;j=j.replace(Fb,"-$1").toLowerCase();if(!(e=d.ownerDocument.defaultView))return f;if(e=e.getComputedStyle(d,null)){m=e.getPropertyValue(j);m===""&&!g.contains(d.ownerDocument.documentElement,d)&&(m=g.style(d,j))}return m});B.documentElement.currentStyle&&(Ua=function(d,e){var j,m=d.currentStyle&&d.currentStyle[e],p=d.runtimeStyle&&d.runtimeStyle[e],r=d.style;!jb.test(m)&&Gb.test(m)&&(j=r.left,p&&(d.runtimeStyle.left=d.currentStyle.left),r.left=
e==="fontSize"?"1em":m||0,m=r.pixelLeft+"px",r.left=j,p&&(d.runtimeStyle.left=p));return m===""?"auto":m});Sa=Ia||Ua;g.expr&&g.expr.filters&&(g.expr.filters.hidden=function(d){var e=d.offsetHeight;return d.offsetWidth===0&&e===0||!g.support.reliableHiddenOffsets&&(d.style.display||g.css(d,"display"))==="none"},g.expr.filters.visible=function(d){return!g.expr.filters.hidden(d)});var Jb=/%20/g,qb=/\[\]$/,kb=/\r?\n/g,Kb=/#.*$/,Lb=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Mb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
Nb=/^(?:GET|HEAD)$/,Ob=/^\/\//,lb=/\?/,Pb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Qb=/^(?:select|textarea)/i,bb=/\s+/,Rb=/([?&])_=[^&]*/,Sb=/(^|\-)([a-z])/g,Tb=function(d,e,j){return e+j.toUpperCase()},mb=/^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/,nb=g.fn.load,Ya={},ob={},Ja,Ka;try{Ja=B.location.href}catch($b){Ja=B.createElement("a");Ja.href="";Ja=Ja.href}Ka=mb.exec(Ja.toLowerCase());g.fn.extend({load:function(d,e,j){if(typeof d!=="string"&&nb)return nb.apply(this,arguments);if(!this.length)return this;
var m=d.indexOf(" ");if(m>=0){var p=d.slice(m,d.length);d=d.slice(0,m)}m="GET";e&&(g.isFunction(e)?(j=e,e=f):typeof e==="object"&&(e=g.param(e,g.ajaxSettings.traditional),m="POST"));var r=this;g.ajax({url:d,type:m,dataType:"html",data:e,complete:function(w,H,F){F=w.responseText;w.isResolved()&&(w.done(function(C){F=C}),r.html(p?g("<div>").append(F.replace(Pb,"")).find(p):F));j&&r.each(j,[F,H,w])}});return this},serialize:function(){return g.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?
g.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Qb.test(this.nodeName)||Mb.test(this.type))}).map(function(d,e){var j=g(this).val();return j==null?null:g.isArray(j)?g.map(j,function(m){return{name:e.name,value:m.replace(kb,"\r\n")}}):{name:e.name,value:j.replace(kb,"\r\n")}}).get()}});g.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(d,e){g.fn[e]=function(j){return this.bind(e,j)}});g.each(["get","post"],
function(d,e){g[e]=function(j,m,p,r){g.isFunction(m)&&(r=r||p,p=m,m=f);return g.ajax({type:e,url:j,data:m,success:p,dataType:r})}});g.extend({getScript:function(d,e){return g.get(d,f,e,"script")},getJSON:function(d,e,j){return g.get(d,e,j,"json")},ajaxSetup:function(d,e){e?g.extend(true,d,g.ajaxSettings,e):(e=d,d=g.extend(true,g.ajaxSettings,e));for(var j in{context:1,url:1})j in e?d[j]=e[j]:j in g.ajaxSettings&&(d[j]=g.ajaxSettings[j]);return d},ajaxSettings:{url:Ja,isLocal:/(?:^file|^widget|\-extension):$/.test(Ka[1]),
global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":b.String,"text html":true,"text json":g.parseJSON,"text xml":g.parseXML}},ajaxPrefilter:v(Ya),ajaxTransport:v(ob),ajax:function(d,e){function j(E,G,M,W){if(pa!==
2){pa=2;ia&&clearTimeout(ia);aa=f;Y=W||"";q.readyState=E?4:0;var U,ea,ra;if(M){W=m;var qa=q,va=W.contents,x=W.dataTypes,J=W.responseFields,N,S,Z,fa;for(S in J)S in M&&(qa[J[S]]=M[S]);for(;x[0]==="*";){x.shift();N===f&&(N=W.mimeType||qa.getResponseHeader("content-type"))}if(N)for(S in va)if(va[S]&&va[S].test(N)){x.unshift(S);break}if(x[0]in M)Z=x[0];else{for(S in M){if(!x[0]||W.converters[S+" "+x[0]]){Z=S;break}fa||(fa=S)}Z=Z||fa}if(Z){Z!==x[0]&&x.unshift(Z);M=M[Z]}else M=void 0}else M=f;if(E>=200&&
E<300||E===304){if(m.ifModified){if(N=q.getResponseHeader("Last-Modified"))g.lastModified[C]=N;if(N=q.getResponseHeader("Etag"))g.etag[C]=N}if(E===304){G="notmodified";U=true}else try{N=m;N.dataFilter&&(M=N.dataFilter(M,N.dataType));var ha=N.dataTypes;S={};var ma,wa,Ca=ha.length,Da,Ga=ha[0],Pa,$a,Ha,La,Qa;for(ma=1;ma<Ca;ma++){if(ma===1)for(wa in N.converters)typeof wa==="string"&&(S[wa.toLowerCase()]=N.converters[wa]);Pa=Ga;Ga=ha[ma];if(Ga==="*")Ga=Pa;else if(Pa!=="*"&&Pa!==Ga){$a=Pa+" "+Ga;Ha=S[$a]||
S["* "+Ga];if(!Ha){Qa=f;for(La in S){Da=La.split(" ");if(Da[0]===Pa||Da[0]==="*")if(Qa=S[Da[1]+" "+Ga]){La=S[La];La===true?Ha=Qa:Qa===true&&(Ha=La);break}}}!Ha&&!Qa&&g.error("No conversion from "+$a.replace(" "," to "));Ha!==true&&(M=Ha?Ha(M):Qa(La(M)))}}ea=M;G="success";U=true}catch(Ub){G="parsererror";ra=Ub}}else{ra=G;if(!G||E){G="error";E<0&&(E=0)}}q.status=E;q.statusText=G;U?w.resolveWith(p,[ea,G,q]):w.rejectWith(p,[q,G,ra]);q.statusCode(F);F=f;ua&&r.trigger("ajax"+(U?"Success":"Error"),[q,m,
U?ea:ra]);H.resolveWith(p,[q,G]);ua&&(r.trigger("ajaxComplete",[q,m]),--g.active||g.event.trigger("ajaxStop"))}}typeof d==="object"&&(e=d,d=f);e=e||{};var m=g.ajaxSetup({},e),p=m.context||m,r=p!==m&&(p.nodeType||p instanceof g)?g(p):g.event,w=g.Deferred(),H=g._Deferred(),F=m.statusCode||{},C,O={},Y,ga,aa,ia,ta,pa=0,ua,Aa,q={readyState:0,setRequestHeader:function(E,G){pa||(O[E.toLowerCase().replace(Sb,Tb)]=G);return this},getAllResponseHeaders:function(){return pa===2?Y:null},getResponseHeader:function(E){var G;
if(pa===2){if(!ga)for(ga={};G=Lb.exec(Y);)ga[G[1].toLowerCase()]=G[2];G=ga[E.toLowerCase()]}return G===f?null:G},overrideMimeType:function(E){pa||(m.mimeType=E);return this},abort:function(E){E=E||"abort";aa&&aa.abort(E);j(0,E);return this}};w.promise(q);q.success=q.done;q.error=q.fail;q.complete=H.done;q.statusCode=function(E){if(E){var G;if(pa<2)for(G in E)F[G]=[F[G],E[G]];else{G=E[q.status];q.then(G,G)}}return this};m.url=((d||m.url)+"").replace(Kb,"").replace(Ob,Ka[1]+"//");m.dataTypes=g.trim(m.dataType||
"*").toLowerCase().split(bb);m.crossDomain||(ta=mb.exec(m.url.toLowerCase()),m.crossDomain=ta&&(ta[1]!=Ka[1]||ta[2]!=Ka[2]||(ta[3]||(ta[1]==="http:"?80:443))!=(Ka[3]||(Ka[1]==="http:"?80:443))));m.data&&m.processData&&typeof m.data!=="string"&&(m.data=g.param(m.data,m.traditional));t(Ya,m,e,q);if(pa===2)return false;ua=m.global;m.type=m.type.toUpperCase();m.hasContent=!Nb.test(m.type);ua&&g.active++===0&&g.event.trigger("ajaxStart");if(!m.hasContent){m.data&&(m.url+=(lb.test(m.url)?"&":"?")+m.data);
C=m.url;if(m.cache===false){ta=g.now();var A=m.url.replace(Rb,"$1_="+ta);m.url=A+(A===m.url?(lb.test(m.url)?"&":"?")+"_="+ta:"")}}if(m.data&&m.hasContent&&m.contentType!==false||e.contentType)O["Content-Type"]=m.contentType;m.ifModified&&(C=C||m.url,g.lastModified[C]&&(O["If-Modified-Since"]=g.lastModified[C]),g.etag[C]&&(O["If-None-Match"]=g.etag[C]));O.Accept=m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+(m.dataTypes[0]!=="*"?", */*; q=0.01":""):m.accepts["*"];for(Aa in m.headers)q.setRequestHeader(Aa,
m.headers[Aa]);if(m.beforeSend&&(m.beforeSend.call(p,q,m)===false||pa===2)){q.abort();return false}for(Aa in{success:1,error:1,complete:1})q[Aa](m[Aa]);if(aa=t(ob,m,e,q)){q.readyState=1;ua&&r.trigger("ajaxSend",[q,m]);m.async&&m.timeout>0&&(ia=setTimeout(function(){q.abort("timeout")},m.timeout));try{pa=1;aa.send(O,j)}catch(K){status<2?j(-1,K):g.error(K)}}else j(-1,"No Transport");return q},param:function(d,e){var j=[],m=function(r,w){w=g.isFunction(w)?w():w;j[j.length]=encodeURIComponent(r)+"="+
encodeURIComponent(w)};e===f&&(e=g.ajaxSettings.traditional);if(g.isArray(d)||d.jquery&&!g.isPlainObject(d))g.each(d,function(){m(this.name,this.value)});else for(var p in d)n(p,d[p],e,m);return j.join("&").replace(Jb,"+")}});g.extend({active:0,lastModified:{},etag:{}});var Vb=g.now(),Va=/(\=)\?(&|$)|()\?\?()/i;g.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return g.expando+"_"+Vb++}});g.ajaxPrefilter("json jsonp",function(d,e,j){var m=typeof d.data==="string";if(d.dataTypes[0]==="jsonp"||
e.jsonpCallback||e.jsonp!=null||d.jsonp!==false&&(Va.test(d.url)||m&&Va.test(d.data))){var p,r=d.jsonpCallback=g.isFunction(d.jsonpCallback)?d.jsonpCallback():d.jsonpCallback,w=b[r];e=d.url;var H=d.data,F="$1"+r+"$2",C=function(){b[r]=w;p&&g.isFunction(w)&&b[r](p[0])};d.jsonp!==false&&(e=e.replace(Va,F),d.url===e&&(m&&(H=H.replace(Va,F)),d.data===H&&(e+=(/\?/.test(e)?"&":"?")+d.jsonp+"="+r)));d.url=e;d.data=H;b[r]=function(O){p=[O]};j.then(C,C);d.converters["script json"]=function(){p||g.error(r+
" was not called");return p[0]};d.dataTypes[0]="json";return"script"}});g.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(d){g.globalEval(d);return d}}});g.ajaxPrefilter("script",function(d){d.cache===f&&(d.cache=false);d.crossDomain&&(d.type="GET",d.global=false)});g.ajaxTransport("script",function(d){if(d.crossDomain){var e,j=B.head||B.getElementsByTagName("head")[0]||
B.documentElement;return{send:function(m,p){e=B.createElement("script");e.async="async";d.scriptCharset&&(e.charset=d.scriptCharset);e.src=d.url;e.onload=e.onreadystatechange=function(r,w){if(!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;j&&e.parentNode&&j.removeChild(e);e=f;w||p(200,"success")}};j.insertBefore(e,j.firstChild)},abort:function(){e&&e.onload(0,1)}}}});var Wb=g.now(),Ma;g.ajaxSettings.xhr=b.ActiveXObject?function(){var d;if(!(d=!this.isLocal&&
a()))a:{try{d=new b.ActiveXObject("Microsoft.XMLHTTP");break a}catch(e){}d=void 0}return d}:a;Ia=g.ajaxSettings.xhr();g.support.ajax=!!Ia;g.support.cors=Ia&&"withCredentials"in Ia;Ia=f;g.support.ajax&&g.ajaxTransport(function(d){if(!d.crossDomain||g.support.cors){var e;return{send:function(j,m){var p=d.xhr(),r,w;d.username?p.open(d.type,d.url,d.async,d.username,d.password):p.open(d.type,d.url,d.async);if(d.xhrFields)for(w in d.xhrFields)p[w]=d.xhrFields[w];d.mimeType&&p.overrideMimeType&&p.overrideMimeType(d.mimeType);
(!d.crossDomain||d.hasContent)&&!j["X-Requested-With"]&&(j["X-Requested-With"]="XMLHttpRequest");try{for(w in j)p.setRequestHeader(w,j[w])}catch(H){}p.send(d.hasContent&&d.data||null);e=function(F,C){var O,Y,ga,aa,ia;try{if(e&&(C||p.readyState===4)){e=f;r&&(p.onreadystatechange=g.noop,delete Ma[r]);if(C)p.readyState!==4&&p.abort();else{O=p.status;ga=p.getAllResponseHeaders();aa={};(ia=p.responseXML)&&ia.documentElement&&(aa.xml=ia);aa.text=p.responseText;try{Y=p.statusText}catch(ta){Y=""}O||!d.isLocal||
d.crossDomain?O===1223&&(O=204):O=aa.text?200:404}}}catch(pa){C||m(-1,pa)}aa&&m(O,Y,aa,ga)};d.async&&p.readyState!==4?(Ma||(Ma={},i()),r=Wb++,p.onreadystatechange=Ma[r]=e):e()},abort:function(){e&&e(0,1)}}}});var Xa={},Xb=/^(?:toggle|show|hide)$/,Yb=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Wa,ab=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];g.fn.extend({show:function(d,e,j){if(d||d===0)return this.animate(k("show",
3),d,e,j);j=0;for(var m=this.length;j<m;j++){d=this[j];e=d.style.display;!g._data(d,"olddisplay")&&e==="none"&&(e=d.style.display="");e===""&&g.css(d,"display")==="none"&&g._data(d,"olddisplay",l(d.nodeName))}for(j=0;j<m;j++){d=this[j];e=d.style.display;if(e===""||e==="none")d.style.display=g._data(d,"olddisplay")||""}return this},hide:function(d,e,j){if(d||d===0)return this.animate(k("hide",3),d,e,j);d=0;for(e=this.length;d<e;d++){j=g.css(this[d],"display");j!=="none"&&!g._data(this[d],"olddisplay")&&
g._data(this[d],"olddisplay",j)}for(d=0;d<e;d++)this[d].style.display="none";return this},_toggle:g.fn.toggle,toggle:function(d,e,j){var m=typeof d==="boolean";g.isFunction(d)&&g.isFunction(e)?this._toggle.apply(this,arguments):d==null||m?this.each(function(){var p=m?d:g(this).is(":hidden");g(this)[p?"show":"hide"]()}):this.animate(k("toggle",3),d,e,j);return this},fadeTo:function(d,e,j,m){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:e},d,j,m)},animate:function(d,e,
j,m){var p=g.speed(e,j,m);if(g.isEmptyObject(d))return this.each(p.complete);return this[p.queue===false?"each":"queue"](function(){var r=g.extend({},p),w,H=this.nodeType===1,F=H&&g(this).is(":hidden"),C=this;for(w in d){var O=g.camelCase(w);w!==O&&(d[O]=d[w],delete d[w],w=O);if(d[w]==="hide"&&F||d[w]==="show"&&!F)return r.complete.call(this);if(H&&(w==="height"||w==="width")){r.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(g.css(this,"display")==="inline"&&g.css(this,
"float")==="none")if(g.support.inlineBlockNeedsLayout)l(this.nodeName)==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1);else this.style.display="inline-block"}g.isArray(d[w])&&((r.specialEasing=r.specialEasing||{})[w]=d[w][1],d[w]=d[w][0])}r.overflow!=null&&(this.style.overflow="hidden");r.curAnim=g.extend({},d);g.each(d,function(Y,ga){var aa=new g.fx(C,r,Y);if(Xb.test(ga))aa[ga==="toggle"?F?"show":"hide":ga](d);else{var ia=Yb.exec(ga),ta=aa.cur();if(ia){var pa=
parseFloat(ia[2]),ua=ia[3]||(g.cssNumber[Y]?"":"px");ua!=="px"&&(g.style(C,Y,(pa||1)+ua),ta*=(pa||1)/aa.cur(),g.style(C,Y,ta+ua));ia[1]&&(pa=(ia[1]==="-="?-1:1)*pa+ta);aa.custom(ta,pa,ua)}else aa.custom(ta,ga,"")}});return true})},stop:function(d,e){var j=g.timers;d&&this.queue([]);this.each(function(){for(var m=j.length-1;m>=0;m--)j[m].elem===this&&(e&&j[m](true),j.splice(m,1))});e||this.dequeue();return this}});g.each({slideDown:k("show",1),slideUp:k("hide",1),slideToggle:k("toggle",1),fadeIn:{opacity:"show"},
fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(d,e){g.fn[d]=function(j,m,p){return this.animate(e,j,m,p)}});g.extend({speed:function(d,e,j){var m=d&&typeof d==="object"?g.extend({},d):{complete:j||!j&&e||g.isFunction(d)&&d,duration:d,easing:j&&e||e&&!g.isFunction(e)&&e};m.duration=g.fx.off?0:typeof m.duration==="number"?m.duration:m.duration in g.fx.speeds?g.fx.speeds[m.duration]:g.fx.speeds._default;m.old=m.complete;m.complete=function(){m.queue!==false&&g(this).dequeue();g.isFunction(m.old)&&
m.old.call(this)};return m},easing:{linear:function(d,e,j,m){return j+m*d},swing:function(d,e,j,m){return(-Math.cos(d*Math.PI)/2+0.5)*m+j}},timers:[],fx:function(d,e,j){this.options=e;this.elem=d;this.prop=j;e.orig||(e.orig={})}});g.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(g.fx.step[this.prop]||g.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];
var d,e=g.css(this.elem,this.prop);return isNaN(d=parseFloat(e))?!e||e==="auto"?0:e:d},custom:function(d,e,j){function m(w){return p.step(w)}var p=this,r=g.fx;this.startTime=g.now();this.start=d;this.end=e;this.unit=j||this.unit||(g.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;m.elem=this.elem;m()&&g.timers.push(m)&&!Wa&&(Wa=setInterval(r.tick,r.interval))},show:function(){this.options.orig[this.prop]=g.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop===
"width"||this.prop==="height"?1:0,this.cur());g(this.elem).show()},hide:function(){this.options.orig[this.prop]=g.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(d){var e=g.now(),j=true;if(d||e>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var m in this.options.curAnim)this.options.curAnim[m]!==true&&(j=false);if(j){if(this.options.overflow!=null&&!g.support.shrinkWrapBlocks){var p=
this.elem,r=this.options;g.each(["","X","Y"],function(H,F){p.style["overflow"+F]=r.overflow[H]})}this.options.hide&&g(this.elem).hide();if(this.options.hide||this.options.show)for(var w in this.options.curAnim)g.style(this.elem,w,this.options.orig[w]);this.options.complete.call(this.elem)}return false}d=e-this.startTime;this.state=d/this.options.duration;e=this.options.easing||(g.easing.swing?"swing":"linear");this.pos=g.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||e](this.state,
d,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update();return true}};g.extend(g.fx,{tick:function(){for(var d=g.timers,e=0;e<d.length;e++)d[e]()||d.splice(e--,1);d.length||g.fx.stop()},interval:13,stop:function(){clearInterval(Wa);Wa=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(d){g.style(d.elem,"opacity",d.now)},_default:function(d){d.elem.style&&d.elem.style[d.prop]!=null?d.elem.style[d.prop]=(d.prop==="width"||d.prop==="height"?Math.max(0,
d.now):d.now)+d.unit:d.elem[d.prop]=d.now}}});g.expr&&g.expr.filters&&(g.expr.filters.animated=function(d){return g.grep(g.timers,function(e){return d===e.elem}).length});var Zb=/^t(?:able|d|h)$/i,pb=/^(?:body|html)$/i;"getBoundingClientRect"in B.documentElement?g.fn.offset=function(d){var e=this[0],j;if(d)return this.each(function(w){g.offset.setOffset(this,d,w)});if(!e||!e.ownerDocument)return null;if(e===e.ownerDocument.body)return g.offset.bodyOffset(e);try{j=e.getBoundingClientRect()}catch(m){}var p=
e.ownerDocument,r=p.documentElement;if(!j||!g.contains(r,e))return j?{top:j.top,left:j.left}:{top:0,left:0};e=p.body;p=h(p);return{top:j.top+(p.pageYOffset||g.support.boxModel&&r.scrollTop||e.scrollTop)-(r.clientTop||e.clientTop||0),left:j.left+(p.pageXOffset||g.support.boxModel&&r.scrollLeft||e.scrollLeft)-(r.clientLeft||e.clientLeft||0)}}:g.fn.offset=function(d){var e=this[0];if(d)return this.each(function(C){g.offset.setOffset(this,d,C)});if(!e||!e.ownerDocument)return null;if(e===e.ownerDocument.body)return g.offset.bodyOffset(e);
g.offset.initialize();var j,m=e.offsetParent,p=e.ownerDocument,r=p.documentElement,w=p.body;j=(p=p.defaultView)?p.getComputedStyle(e,null):e.currentStyle;for(var H=e.offsetTop,F=e.offsetLeft;(e=e.parentNode)&&e!==w&&e!==r;){if(g.offset.supportsFixedPosition&&j.position==="fixed")break;j=p?p.getComputedStyle(e,null):e.currentStyle;H-=e.scrollTop;F-=e.scrollLeft;e===m&&(H+=e.offsetTop,F+=e.offsetLeft,g.offset.doesNotAddBorder&&(!g.offset.doesAddBorderForTableAndCells||!Zb.test(e.nodeName))&&(H+=parseFloat(j.borderTopWidth)||
0,F+=parseFloat(j.borderLeftWidth)||0),m=e.offsetParent);g.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"&&(H+=parseFloat(j.borderTopWidth)||0,F+=parseFloat(j.borderLeftWidth)||0)}if(j.position==="relative"||j.position==="static"){H+=w.offsetTop;F+=w.offsetLeft}g.offset.supportsFixedPosition&&j.position==="fixed"&&(H+=Math.max(r.scrollTop,w.scrollTop),F+=Math.max(r.scrollLeft,w.scrollLeft));return{top:H,left:F}};g.offset={initialize:function(){var d=B.body,e=B.createElement("div"),
j,m,p,r=parseFloat(g.css(d,"marginTop"))||0;g.extend(e.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});e.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";d.insertBefore(e,d.firstChild);j=e.firstChild;
m=j.firstChild;p=j.nextSibling.firstChild.firstChild;this.doesNotAddBorder=m.offsetTop!==5;this.doesAddBorderForTableAndCells=p.offsetTop===5;m.style.position="fixed";m.style.top="20px";this.supportsFixedPosition=m.offsetTop===20||m.offsetTop===15;m.style.position=m.style.top="";j.style.overflow="hidden";j.style.position="relative";this.subtractsBorderForOverflowNotVisible=m.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=d.offsetTop!==r;d.removeChild(e);g.offset.initialize=g.noop},bodyOffset:function(d){var e=
d.offsetTop,j=d.offsetLeft;g.offset.initialize();g.offset.doesNotIncludeMarginInBodyOffset&&(e+=parseFloat(g.css(d,"marginTop"))||0,j+=parseFloat(g.css(d,"marginLeft"))||0);return{top:e,left:j}},setOffset:function(d,e,j){var m=g.css(d,"position");m==="static"&&(d.style.position="relative");var p=g(d),r=p.offset(),w=g.css(d,"top"),H=g.css(d,"left"),F=m==="absolute"&&g.inArray("auto",[w,H])>-1;m={};var C={};F&&(C=p.position());w=F?C.top:parseInt(w,10)||0;H=F?C.left:parseInt(H,10)||0;g.isFunction(e)&&
(e=e.call(d,j,r));e.top!=null&&(m.top=e.top-r.top+w);e.left!=null&&(m.left=e.left-r.left+H);"using"in e?e.using.call(d,m):p.css(m)}};g.fn.extend({position:function(){if(!this[0])return null;var d=this[0],e=this.offsetParent(),j=this.offset(),m=pb.test(e[0].nodeName)?{top:0,left:0}:e.offset();j.top-=parseFloat(g.css(d,"marginTop"))||0;j.left-=parseFloat(g.css(d,"marginLeft"))||0;m.top+=parseFloat(g.css(e[0],"borderTopWidth"))||0;m.left+=parseFloat(g.css(e[0],"borderLeftWidth"))||0;return{top:j.top-
m.top,left:j.left-m.left}},offsetParent:function(){return this.map(function(){for(var d=this.offsetParent||B.body;d&&!pb.test(d.nodeName)&&g.css(d,"position")==="static";)d=d.offsetParent;return d})}});g.each(["Left","Top"],function(d,e){var j="scroll"+e;g.fn[j]=function(m){var p=this[0],r;if(!p)return null;if(m!==f)return this.each(function(){(r=h(this))?r.scrollTo(d?g(r).scrollLeft():m,d?m:g(r).scrollTop()):this[j]=m});return(r=h(p))?"pageXOffset"in r?r[d?"pageYOffset":"pageXOffset"]:g.support.boxModel&&
r.document.documentElement[j]||r.document.body[j]:p[j]}});g.each(["Height","Width"],function(d,e){var j=e.toLowerCase();g.fn["inner"+e]=function(){return this[0]?parseFloat(g.css(this[0],j,"padding")):null};g.fn["outer"+e]=function(m){return this[0]?parseFloat(g.css(this[0],j,m?"margin":"border")):null};g.fn[j]=function(m){var p=this[0];if(!p)return m==null?null:this;if(g.isFunction(m))return this.each(function(w){var H=g(this);H[j](m.call(this,w,H[j]()))});if(g.isWindow(p)){var r=p.document.documentElement["client"+
e];return p.document.compatMode==="CSS1Compat"&&r||p.document.body["client"+e]||r}if(p.nodeType===9)return Math.max(p.documentElement["client"+e],p.body["scroll"+e],p.documentElement["scroll"+e],p.body["offset"+e],p.documentElement["offset"+e]);if(m===f){p=g.css(p,j);r=parseFloat(p);return g.isNaN(r)?p:r}return this.css(j,typeof m==="string"?m:m+"px")}});b.jQuery=b.$=g})(window);(function(b,f){function h(l){return!b(l).parents().andSelf().filter(function(){return b.curCSS(this,"visibility")==="hidden"||b.expr.filters.hidden(this)}).length}b.ui=b.ui||{};if(!b.ui.version){b.extend(b.ui,{version:"1.8.11",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}});b.fn.extend({_focus:b.fn.focus,focus:function(l,k){return typeof l==="number"?this.each(function(){var a=this;setTimeout(function(){b(a).focus();k&&k.call(a)},l)}):this._focus.apply(this,arguments)},scrollParent:function(){var l;l=b.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(b.curCSS(this,
"position",1))&&/(auto|scroll)/.test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!l.length?b(document):l},zIndex:function(l){if(l!==f)return this.css("zIndex",l);if(this.length){l=b(this[0]);for(var k;l.length&&l[0]!==document;){k=l.css("position");
if(k==="absolute"||k==="relative"||k==="fixed"){k=parseInt(l.css("zIndex"),10);if(!isNaN(k)&&k!==0)return k}l=l.parent()}}return 0},disableSelection:function(){return this.bind((b.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(l){l.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});b.each(["Width","Height"],function(l,k){function a(v,y,s,o){b.each(i,function(){y-=parseFloat(b.curCSS(v,"padding"+this,true))||0;if(s)y-=parseFloat(b.curCSS(v,
"border"+this+"Width",true))||0;if(o)y-=parseFloat(b.curCSS(v,"margin"+this,true))||0});return y}var i=k==="Width"?["Left","Right"]:["Top","Bottom"],n=k.toLowerCase(),t={innerWidth:b.fn.innerWidth,innerHeight:b.fn.innerHeight,outerWidth:b.fn.outerWidth,outerHeight:b.fn.outerHeight};b.fn["inner"+k]=function(v){if(v===f)return t["inner"+k].call(this);return this.each(function(){b(this).css(n,a(this,v)+"px")})};b.fn["outer"+k]=function(v,y){if(typeof v!=="number")return t["outer"+k].call(this,v);return this.each(function(){b(this).css(n,
a(this,v,true,y)+"px")})}});b.extend(b.expr[":"],{data:function(l,k,a){return!!b.data(l,a[3])},focusable:function(l){var k=l.nodeName.toLowerCase(),a=b.attr(l,"tabindex");if("area"===k){k=l.parentNode;a=k.name;if(!l.href||!a||k.nodeName.toLowerCase()!=="map")return false;l=b("img[usemap=#"+a+"]")[0];return!!l&&h(l)}return(/input|select|textarea|button|object/.test(k)?!l.disabled:"a"==k?l.href||!isNaN(a):!isNaN(a))&&h(l)},tabbable:function(l){var k=b.attr(l,"tabindex");return(isNaN(k)||k>=0)&&b(l).is(":focusable")}});
b(function(){var l=document.body,k=l.appendChild(k=document.createElement("div"));b.extend(k.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});b.support.minHeight=k.offsetHeight===100;b.support.selectstart="onselectstart"in k;l.removeChild(k).style.display="none"});b.extend(b.ui,{plugin:{add:function(l,k,a){l=b.ui[l].prototype;for(var i in a){l.plugins[i]=l.plugins[i]||[];l.plugins[i].push([k,a[i]])}},call:function(l,k,a){if((k=l.plugins[k])&&l.element[0].parentNode)for(var i=0;i<k.length;i++)l.options[k[i][0]]&&
k[i][1].apply(l.element,a)}},contains:function(l,k){return document.compareDocumentPosition?l.compareDocumentPosition(k)&16:l!==k&&l.contains(k)},hasScroll:function(l,k){if(b(l).css("overflow")==="hidden")return false;k=k&&k==="left"?"scrollLeft":"scrollTop";var a=false;if(l[k]>0)return true;l[k]=1;a=l[k]>0;l[k]=0;return a},isOverAxis:function(l,k,a){return l>k&&l<k+a},isOver:function(l,k,a,i,n,t){return b.ui.isOverAxis(l,a,n)&&b.ui.isOverAxis(k,i,t)}})}})(jQuery);
(function(b,f){if(b.cleanData){var h=b.cleanData;b.cleanData=function(k){for(var a=0,i;(i=k[a])!=null;a++)b(i).triggerHandler("remove");h(k)}}else{var l=b.fn.remove;b.fn.remove=function(k,a){return this.each(function(){if(!a)if(!k||b.filter(k,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return l.call(b(this),k,a)})}}b.widget=function(k,a,i){var n=k.split(".")[0],t;k=k.split(".")[1];t=n+"-"+k;if(!i){i=a;a=b.Widget}b.expr[":"][t]=function(v){return!!b.data(v,
k)};b[n]=b[n]||{};b[n][k]=function(v,y){arguments.length&&this._createWidget(v,y)};a=new a;a.options=b.extend(true,{},a.options);b[n][k].prototype=b.extend(true,a,{namespace:n,widgetName:k,widgetEventPrefix:b[n][k].prototype.widgetEventPrefix||k,widgetBaseClass:t},i);b.widget.bridge(k,b[n][k])};b.widget.bridge=function(k,a){b.fn[k]=function(i){var n=typeof i==="string",t=Array.prototype.slice.call(arguments,1),v=this;i=!n&&t.length?b.extend.apply(null,[true,i].concat(t)):i;if(n&&i.charAt(0)==="_")return v;
n?this.each(function(){var y=b.data(this,k),s=y&&b.isFunction(y[i])?y[i].apply(y,t):y;if(s!==y&&s!==f){v=s;return false}}):this.each(function(){var y=b.data(this,k);y?y.option(i||{})._init():b.data(this,k,new a(i,this))});return v}};b.Widget=function(k,a){arguments.length&&this._createWidget(k,a)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(k,a){b.data(a,this.widgetName,this);this.element=b(a);this.options=b.extend(true,{},this.options,
this._getCreateOptions(),k);var i=this;this.element.bind("remove."+this.widgetName,function(){i.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
widget:function(){return this.element},option:function(k,a){var i=k;if(arguments.length===0)return b.extend({},this.options);if(typeof k==="string"){if(a===f)return this.options[k];i={};i[k]=a}this._setOptions(i);return this},_setOptions:function(k){var a=this;b.each(k,function(i,n){a._setOption(i,n)});return this},_setOption:function(k,a){this.options[k]=a;if(k==="disabled")this.widget()[a?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",a);return this},
enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(k,a,i){var n=this.options[k];a=b.Event(a);a.type=(k===this.widgetEventPrefix?k:this.widgetEventPrefix+k).toLowerCase();i=i||{};if(a.originalEvent){k=b.event.props.length;for(var t;k;){t=b.event.props[--k];a[t]=a.originalEvent[t]}}this.element.trigger(a,i);return!(b.isFunction(n)&&n.call(this.element[0],a,i)===false||a.isDefaultPrevented())}}})(jQuery);
(function(b){b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var f=this;this.element.bind("mousedown."+this.widgetName,function(h){return f._mouseDown(h)}).bind("click."+this.widgetName,function(h){if(true===b.data(h.target,f.widgetName+".preventClickEvent")){b.removeData(h.target,f.widgetName+".preventClickEvent");h.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){f.originalEvent=
f.originalEvent||{};if(!f.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(f);this._mouseDownEvent=f;var h=this,l=f.which==1,k=typeof this.options.cancel=="string"?b(f.target).parents().add(f.target).filter(this.options.cancel).length:false;if(!l||k||!this._mouseCapture(f))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){h.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=
this._mouseStart(f)!==false;if(!this._mouseStarted){f.preventDefault();return true}}true===b.data(f.target,this.widgetName+".preventClickEvent")&&b.removeData(f.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(a){return h._mouseMove(a)};this._mouseUpDelegate=function(a){return h._mouseUp(a)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();return f.originalEvent.mouseHandled=
true}},_mouseMove:function(f){if(b.browser.msie&&!(document.documentMode>=9)&&!f.button)return this._mouseUp(f);if(this._mouseStarted){this._mouseDrag(f);return f.preventDefault()}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,f)!==false)?this._mouseDrag(f):this._mouseUp(f);return!this._mouseStarted},_mouseUp:function(f){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){this._mouseStarted=false;f.target==this._mouseDownEvent.target&&b.data(f.target,this.widgetName+".preventClickEvent",true);this._mouseStop(f)}return false},_mouseDistanceMet:function(f){return Math.max(Math.abs(this._mouseDownEvent.pageX-f.pageX),Math.abs(this._mouseDownEvent.pageY-f.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
(function(b){b.ui=b.ui||{};var f=/left|center|right/,h=/top|center|bottom/,l=b.fn.position,k=b.fn.offset;b.fn.position=function(a){if(!a||!a.of)return l.apply(this,arguments);a=b.extend({},a);var i=b(a.of),n=i[0],t=(a.collision||"flip").split(" "),v=a.offset?a.offset.split(" "):[0,0],y,s,o;if(n.nodeType===9){y=i.width();s=i.height();o={top:0,left:0}}else if(n.setTimeout){y=i.width();s=i.height();o={top:i.scrollTop(),left:i.scrollLeft()}}else if(n.preventDefault){a.at="left top";y=s=0;o={top:a.of.pageY,
left:a.of.pageX}}else{y=i.outerWidth();s=i.outerHeight();o=i.offset()}b.each(["my","at"],function(){var u=(a[this]||"").split(" ");if(u.length===1)u=f.test(u[0])?u.concat(["center"]):h.test(u[0])?["center"].concat(u):["center","center"];u[0]=f.test(u[0])?u[0]:"center";u[1]=h.test(u[1])?u[1]:"center";a[this]=u});if(t.length===1)t[1]=t[0];v[0]=parseInt(v[0],10)||0;if(v.length===1)v[1]=v[0];v[1]=parseInt(v[1],10)||0;if(a.at[0]==="right")o.left+=y;else if(a.at[0]==="center")o.left+=y/2;if(a.at[1]==="bottom")o.top+=
s;else if(a.at[1]==="center")o.top+=s/2;o.left+=v[0];o.top+=v[1];return this.each(function(){var u=b(this),z=u.outerWidth(),I=u.outerHeight(),D=parseInt(b.curCSS(this,"marginLeft",true))||0,P=parseInt(b.curCSS(this,"marginTop",true))||0,L=z+D+(parseInt(b.curCSS(this,"marginRight",true))||0),Q=I+P+(parseInt(b.curCSS(this,"marginBottom",true))||0),R=b.extend({},o),T;if(a.my[0]==="right")R.left-=z;else if(a.my[0]==="center")R.left-=z/2;if(a.my[1]==="bottom")R.top-=I;else if(a.my[1]==="center")R.top-=
I/2;R.left=Math.round(R.left);R.top=Math.round(R.top);T={left:R.left-D,top:R.top-P};b.each(["left","top"],function(ja,B){b.ui.position[t[ja]]&&b.ui.position[t[ja]][B](R,{targetWidth:y,targetHeight:s,elemWidth:z,elemHeight:I,collisionPosition:T,collisionWidth:L,collisionHeight:Q,offset:v,my:a.my,at:a.at})});b.fn.bgiframe&&u.bgiframe();u.offset(b.extend(R,{using:a.using}))})};b.ui.position={fit:{left:function(a,i){var n=b(window);n=i.collisionPosition.left+i.collisionWidth-n.width()-n.scrollLeft();
a.left=n>0?a.left-n:Math.max(a.left-i.collisionPosition.left,a.left)},top:function(a,i){var n=b(window);n=i.collisionPosition.top+i.collisionHeight-n.height()-n.scrollTop();a.top=n>0?a.top-n:Math.max(a.top-i.collisionPosition.top,a.top)}},flip:{left:function(a,i){if(i.at[0]!=="center"){var n=b(window);n=i.collisionPosition.left+i.collisionWidth-n.width()-n.scrollLeft();var t=i.my[0]==="left"?-i.elemWidth:i.my[0]==="right"?i.elemWidth:0,v=i.at[0]==="left"?i.targetWidth:-i.targetWidth,y=-2*i.offset[0];
a.left+=i.collisionPosition.left<0?t+v+y:n>0?t+v+y:0}},top:function(a,i){if(i.at[1]!=="center"){var n=b(window);n=i.collisionPosition.top+i.collisionHeight-n.height()-n.scrollTop();var t=i.my[1]==="top"?-i.elemHeight:i.my[1]==="bottom"?i.elemHeight:0,v=i.at[1]==="top"?i.targetHeight:-i.targetHeight,y=-2*i.offset[1];a.top+=i.collisionPosition.top<0?t+v+y:n>0?t+v+y:0}}}};if(!b.offset.setOffset){b.offset.setOffset=function(a,i){if(/static/.test(b.curCSS(a,"position")))a.style.position="relative";var n=
b(a),t=n.offset(),v=parseInt(b.curCSS(a,"top",true),10)||0,y=parseInt(b.curCSS(a,"left",true),10)||0;t={top:i.top-t.top+v,left:i.left-t.left+y};"using"in i?i.using.call(a,t):n.css(t)};b.fn.offset=function(a){var i=this[0];if(!i||!i.ownerDocument)return null;if(a)return this.each(function(){b.offset.setOffset(this,a)});return k.call(this)}}})(jQuery);
(function(b){var f=0;b.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var h=this,l=this.element[0].ownerDocument,k;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(a){if(!(h.options.disabled||h.element.attr("readonly"))){k=
false;var i=b.ui.keyCode;switch(a.keyCode){case i.PAGE_UP:h._move("previousPage",a);break;case i.PAGE_DOWN:h._move("nextPage",a);break;case i.UP:h._move("previous",a);a.preventDefault();break;case i.DOWN:h._move("next",a);a.preventDefault();break;case i.ENTER:case i.NUMPAD_ENTER:if(h.menu.active){k=true;a.preventDefault()}case i.TAB:if(!h.menu.active)break;h.menu.select(a);break;case i.ESCAPE:h.element.val(h.term);h.close(a);break;default:clearTimeout(h.searching);h.searching=setTimeout(function(){if(h.term!=
h.element.val()){h.selectedItem=null;h.search(null,a)}},h.options.delay)}}}).bind("keypress.autocomplete",function(a){if(k){k=false;a.preventDefault()}}).bind("focus.autocomplete",function(){if(!h.options.disabled){h.selectedItem=null;h.previous=h.element.val()}}).bind("blur.autocomplete",function(a){if(!h.options.disabled){clearTimeout(h.searching);h.closing=setTimeout(function(){h.close(a);h._change(a)},150)}});this._initSource();this.response=function(){return h._response.apply(h,arguments)};this.menu=
b("<ul></ul>").addClass("ui-autocomplete").appendTo(b(this.options.appendTo||"body",l)[0]).mousedown(function(a){var i=h.menu.element[0];b(a.target).closest(".ui-menu-item").length||setTimeout(function(){b(document).one("mousedown",function(n){n.target!==h.element[0]&&n.target!==i&&!b.ui.contains(i,n.target)&&h.close()})},1);setTimeout(function(){clearTimeout(h.closing)},13)}).menu({focus:function(a,i){i=i.item.data("item.autocomplete");false!==h._trigger("focus",a,{item:i})&&/^key/.test(a.originalEvent.type)&&
h.element.val(i.value)},selected:function(a,i){var n=i.item.data("item.autocomplete"),t=h.previous;if(h.element[0]!==l.activeElement){h.element.focus();h.previous=t;setTimeout(function(){h.previous=t;h.selectedItem=n},1)}false!==h._trigger("select",a,{item:n})&&h.element.val(n.value);h.term=h.element.val();h.close(a);h.selectedItem=n},blur:function(){h.menu.element.is(":visible")&&h.element.val()!==h.term&&h.element.val(h.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");
b.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();b.Widget.prototype.destroy.call(this)},_setOption:function(h,l){b.Widget.prototype._setOption.apply(this,arguments);h==="source"&&this._initSource();if(h==="appendTo")this.menu.element.appendTo(b(l||"body",this.element[0].ownerDocument)[0]);h==="disabled"&&
l&&this.xhr&&this.xhr.abort()},_initSource:function(){var h=this,l,k;if(b.isArray(this.options.source)){l=this.options.source;this.source=function(a,i){i(b.ui.autocomplete.filter(l,a.term))}}else if(typeof this.options.source==="string"){k=this.options.source;this.source=function(a,i){h.xhr&&h.xhr.abort();h.xhr=b.ajax({url:k,data:a,dataType:"json",autocompleteRequest:++f,success:function(n){this.autocompleteRequest===f&&i(n)},error:function(){this.autocompleteRequest===f&&i([])}})}}else this.source=
this.options.source},search:function(h,l){h=h!=null?h:this.element.val();this.term=this.element.val();if(h.length<this.options.minLength)return this.close(l);clearTimeout(this.closing);if(this._trigger("search",l)!==false)return this._search(h)},_search:function(h){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:h},this.response)},_response:function(h){if(!this.options.disabled&&h&&h.length){h=this._normalize(h);this._suggest(h);this._trigger("open")}else this.close();
this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(h){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",h)}},_change:function(h){this.previous!==this.element.val()&&this._trigger("change",h,{item:this.selectedItem})},_normalize:function(h){if(h.length&&h[0].label&&h[0].value)return h;return b.map(h,function(l){if(typeof l==="string")return{label:l,value:l};return b.extend({label:l.label||
l.value,value:l.value||l.label},l)})},_suggest:function(h){var l=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(l,h);this.menu.deactivate();this.menu.refresh();l.show();this._resizeMenu();l.position(b.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next(new b.Event("mouseover"))},_resizeMenu:function(){var h=this.menu.element;h.outerWidth(Math.max(h.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(h,l){var k=this;
b.each(l,function(a,i){k._renderItem(h,i)})},_renderItem:function(h,l){return b("<li></li>").data("item.autocomplete",l).append(b("<a></a>").text(l.label)).appendTo(h)},_move:function(h,l){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(h)||this.menu.last()&&/^next/.test(h)){this.element.val(this.term);this.menu.deactivate()}else this.menu[h](l);else this.search(null,l)},widget:function(){return this.menu.element}});b.extend(b.ui.autocomplete,{escapeRegex:function(h){return h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
"\\$&")},filter:function(h,l){var k=RegExp(b.ui.autocomplete.escapeRegex(l),"i");return b.grep(h,function(a){return k.test(a.label||a.value||a)})}})})(jQuery);
(function(b){b.widget("ui.menu",{_create:function(){var f=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(h){if(b(h.target).closest(".ui-menu-item a").length){h.preventDefault();f.select(h)}});this.refresh()},refresh:function(){var f=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
-1).mouseenter(function(h){f.activate(h,b(this).parent())}).mouseleave(function(){f.deactivate()})},activate:function(f,h){this.deactivate();if(this.hasScroll()){var l=h.offset().top-this.element.offset().top,k=this.element.attr("scrollTop"),a=this.element.height();if(l<0)this.element.attr("scrollTop",k+l);else l>=a&&this.element.attr("scrollTop",k+l-a+h.height())}this.active=h.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",f,{item:h})},
deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(f){this.move("next",".ui-menu-item:first",f)},previous:function(f){this.move("prev",".ui-menu-item:last",f)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(f,h,l){if(this.active){f=this.active[f+"All"](".ui-menu-item").eq(0);
f.length?this.activate(l,f):this.activate(l,this.element.children(h))}else this.activate(l,this.element.children(h))},nextPage:function(f){if(this.hasScroll())if(!this.active||this.last())this.activate(f,this.element.children(".ui-menu-item:first"));else{var h=this.active.offset().top,l=this.element.height(),k=this.element.children(".ui-menu-item").filter(function(){var a=b(this).offset().top-h-l+b(this).height();return a<10&&a>-10});k.length||(k=this.element.children(".ui-menu-item:last"));this.activate(f,
k)}else this.activate(f,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(f){if(this.hasScroll())if(!this.active||this.first())this.activate(f,this.element.children(".ui-menu-item:last"));else{var h=this.active.offset().top,l=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var k=b(this).offset().top-h+l-b(this).height();return k<10&&k>-10});result.length||(result=this.element.children(".ui-menu-item:first"));
this.activate(f,result)}else this.activate(f,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(f){this._trigger("selected",f,{item:this.active})}})})(jQuery);
(function(b,f){var h={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},l={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};b.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(k){var a=b(this).css(k).offset().top;a<0&&
b(this).css("top",k.top-a)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var k=this,a=k.options,i=a.title||"&#160;",n=b.ui.dialog.getTitleId(k.element),t=(k.uiDialog=b("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+a.dialogClass).css({zIndex:a.zIndex}).attr("tabIndex",
-1).css("outline",0).keydown(function(s){if(a.closeOnEscape&&s.keyCode&&s.keyCode===b.ui.keyCode.ESCAPE){k.close(s);s.preventDefault()}}).attr({role:"dialog","aria-labelledby":n}).mousedown(function(s){k.moveToTop(false,s)});k.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(t);var v=(k.uiDialogTitlebar=b("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(t),y=b('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role",
"button").hover(function(){y.addClass("ui-state-hover")},function(){y.removeClass("ui-state-hover")}).focus(function(){y.addClass("ui-state-focus")}).blur(function(){y.removeClass("ui-state-focus")}).click(function(s){k.close(s);return false}).appendTo(v);(k.uiDialogTitlebarCloseText=b("<span></span>")).addClass("ui-icon ui-icon-closethick").text(a.closeText).appendTo(y);b("<span></span>").addClass("ui-dialog-title").attr("id",n).html(i).prependTo(v);if(b.isFunction(a.beforeclose)&&!b.isFunction(a.beforeClose))a.beforeClose=
a.beforeclose;v.find("*").add(v).disableSelection();a.draggable&&b.fn.draggable&&k._makeDraggable();a.resizable&&b.fn.resizable&&k._makeResizable();k._createButtons(a.buttons);k._isOpen=false;b.fn.bgiframe&&t.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();
this.originalTitle&&this.element.attr("title",this.originalTitle);return this},widget:function(){return this.uiDialog},close:function(k){var a=this,i,n;if(false!==a._trigger("beforeClose",k)){a.overlay&&a.overlay.destroy();a.uiDialog.unbind("keypress.ui-dialog");a._isOpen=false;if(a.options.hide)a.uiDialog.hide(a.options.hide,function(){a._trigger("close",k)});else{a.uiDialog.hide();a._trigger("close",k)}b.ui.dialog.overlay.resize();if(a.options.modal){i=0;b(".ui-dialog").each(function(){if(this!==
a.uiDialog[0]){n=b(this).css("z-index");isNaN(n)||(i=Math.max(i,n))}});b.ui.dialog.maxZ=i}return a}},isOpen:function(){return this._isOpen},moveToTop:function(k,a){var i=this.options;if(i.modal&&!k||!i.stack&&!i.modal)return this._trigger("focus",a);if(i.zIndex>b.ui.dialog.maxZ)b.ui.dialog.maxZ=i.zIndex;if(this.overlay){b.ui.dialog.maxZ+=1;this.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=b.ui.dialog.maxZ)}k={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};
b.ui.dialog.maxZ+=1;this.uiDialog.css("z-index",b.ui.dialog.maxZ);this.element.attr(k);this._trigger("focus",a);return this},open:function(){if(!this._isOpen){var k=this.options,a=this.uiDialog;this.overlay=k.modal?new b.ui.dialog.overlay(this):null;this._size();this._position(k.position);a.show(k.show);this.moveToTop(true);k.modal&&a.bind("keypress.ui-dialog",function(i){if(i.keyCode===b.ui.keyCode.TAB){var n=b(":tabbable",this),t=n.filter(":first");n=n.filter(":last");if(i.target===n[0]&&!i.shiftKey){t.focus(1);
return false}else if(i.target===t[0]&&i.shiftKey){n.focus(1);return false}}});b(this.element.find(":tabbable").get().concat(a.find(".ui-dialog-buttonpane :tabbable").get().concat(a.get()))).eq(0).focus();this._isOpen=true;this._trigger("open");return this}},_createButtons:function(k){var a=this,i=false,n=b("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),t=b("<div></div>").addClass("ui-dialog-buttonset").appendTo(n);a.uiDialog.find(".ui-dialog-buttonpane").remove();
typeof k==="object"&&k!==null&&b.each(k,function(){return!(i=true)});if(i){b.each(k,function(v,y){y=b.isFunction(y)?{click:y,text:v}:y;v=b('<button type="button"></button>').attr(y,true).unbind("click").click(function(){y.click.apply(a.element[0],arguments)}).appendTo(t);b.fn.button&&v.button()});n.appendTo(a.uiDialog)}},_makeDraggable:function(){function k(v){return{position:v.position,offset:v.offset}}var a=this,i=a.options,n=b(document),t;a.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",
handle:".ui-dialog-titlebar",containment:"document",start:function(v,y){t=i.height==="auto"?"auto":b(this).height();b(this).height(b(this).height()).addClass("ui-dialog-dragging");a._trigger("dragStart",v,k(y))},drag:function(v,y){a._trigger("drag",v,k(y))},stop:function(v,y){i.position=[y.position.left-n.scrollLeft(),y.position.top-n.scrollTop()];b(this).removeClass("ui-dialog-dragging").height(t);a._trigger("dragStop",v,k(y));b.ui.dialog.overlay.resize()}})},_makeResizable:function(k){function a(v){return{originalPosition:v.originalPosition,
originalSize:v.originalSize,position:v.position,size:v.size}}k=k===f?this.options.resizable:k;var i=this,n=i.options,t=i.uiDialog.css("position");k=typeof k==="string"?k:"n,e,s,w,se,sw,ne,nw";i.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:i.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:i._minHeight(),handles:k,start:function(v,y){b(this).addClass("ui-dialog-resizing");i._trigger("resizeStart",v,a(y))},resize:function(v,y){i._trigger("resize",
v,a(y))},stop:function(v,y){b(this).removeClass("ui-dialog-resizing");n.height=b(this).height();n.width=b(this).width();i._trigger("resizeStop",v,a(y));b.ui.dialog.overlay.resize()}}).css("position",t).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var k=this.options;return k.height==="auto"?k.minHeight:Math.min(k.minHeight,k.height)},_position:function(k){var a=[],i=[0,0],n;if(k){if(typeof k==="string"||typeof k==="object"&&"0"in k){a=k.split?k.split(" "):
[k[0],k[1]];if(a.length===1)a[1]=a[0];b.each(["left","top"],function(t,v){if(+a[t]===a[t]){i[t]=a[t];a[t]=v}});k={my:a.join(" "),at:a.join(" "),offset:i.join(" ")}}k=b.extend({},b.ui.dialog.prototype.options.position,k)}else k=b.ui.dialog.prototype.options.position;(n=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(b.extend({of:window},k));n||this.uiDialog.hide()},_setOptions:function(k){var a=this,i={},n=false;b.each(k,function(t,v){a._setOption(t,v);
if(t in h)n=true;if(t in l)i[t]=v});n&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",i)},_setOption:function(k,a){var i=this.uiDialog;switch(k){case "beforeclose":k="beforeClose";break;case "buttons":this._createButtons(a);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+a);break;case "dialogClass":i.removeClass(this.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+a);break;case "disabled":a?i.addClass("ui-dialog-disabled"):
i.removeClass("ui-dialog-disabled");break;case "draggable":var n=i.is(":data(draggable)");n&&!a&&i.draggable("destroy");!n&&a&&this._makeDraggable();break;case "position":this._position(a);break;case "resizable":(n=i.is(":data(resizable)"))&&!a&&i.resizable("destroy");n&&typeof a==="string"&&i.resizable("option","handles",a);!n&&a!==false&&this._makeResizable(a);break;case "title":b(".ui-dialog-title",this.uiDialogTitlebar).html(""+(a||"&#160;"))}b.Widget.prototype._setOption.apply(this,arguments)},
_size:function(){var k=this.options,a,i,n=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(k.minWidth>k.width)k.width=k.minWidth;a=this.uiDialog.css({height:"auto",width:k.width}).height();i=Math.max(0,k.minHeight-a);if(k.height==="auto")if(b.support.minHeight)this.element.css({minHeight:i,height:"auto"});else{this.uiDialog.show();k=this.element.css("height","auto").height();n||this.uiDialog.hide();this.element.height(Math.max(k,i))}else this.element.height(Math.max(k.height-
a,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});b.extend(b.ui.dialog,{version:"1.8.11",uuid:0,maxZ:0,getTitleId:function(k){k=k.attr("id");if(!k){this.uuid+=1;k=this.uuid}return"ui-dialog-title-"+k},overlay:function(k){this.$el=b.ui.dialog.overlay.create(k)}});b.extend(b.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(k){return k+".dialog-overlay"}).join(" "),
create:function(k){if(this.instances.length===0){setTimeout(function(){b.ui.dialog.overlay.instances.length&&b(document).bind(b.ui.dialog.overlay.events,function(i){if(b(i.target).zIndex()<b.ui.dialog.overlay.maxZ)return false})},1);b(document).bind("keydown.dialog-overlay",function(i){if(k.options.closeOnEscape&&i.keyCode&&i.keyCode===b.ui.keyCode.ESCAPE){k.close(i);i.preventDefault()}});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var a=(this.oldInstances.pop()||b("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
height:this.height()});b.fn.bgiframe&&a.bgiframe();this.instances.push(a);return a},destroy:function(k){var a=b.inArray(k,this.instances);a!=-1&&this.oldInstances.push(this.instances.splice(a,1)[0]);this.instances.length===0&&b([document,window]).unbind(".dialog-overlay");k.remove();var i=0;b.each(this.instances,function(){i=Math.max(i,this.css("z-index"))});this.maxZ=i},height:function(){var k,a;if(b.browser.msie&&b.browser.version<7){k=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
a=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return k<a?b(window).height()+"px":k+"px"}else return b(document).height()+"px"},width:function(){var k,a;if(b.browser.msie&&b.browser.version<7){k=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);a=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return k<a?b(window).width()+"px":k+"px"}else return b(document).width()+"px"},resize:function(){var k=b([]);b.each(b.ui.dialog.overlay.instances,
function(){k=k.add(this)});k.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})}});b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
(function(b){b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var f=this,h=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");h.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
this.range=b([]);if(h.range){if(h.range===true){this.range=b("<div></div>");if(!h.values)h.values=[this._valueMin(),this._valueMin()];if(h.values.length&&h.values.length!==2)h.values=[h.values[0],h.values[0]]}else this.range=b("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(h.range==="min"||h.range==="max")this.range.addClass("ui-slider-range-"+h.range);this.range.addClass("ui-widget-header")}b(".ui-slider-handle",this.element).length===0&&b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
if(h.values&&h.values.length)for(;b(".ui-slider-handle",this.element).length<h.values.length;)b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(l){l.preventDefault()}).hover(function(){h.disabled||b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(h.disabled)b(this).blur();
else{b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(l){b(this).data("index.ui-slider-handle",l)});this.handles.keydown(function(l){var k=true,a=b(this).data("index.ui-slider-handle"),i,n,t;if(!f.options.disabled){switch(l.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:k=
false;if(!f._keySliding){f._keySliding=true;b(this).addClass("ui-state-active");i=f._start(l,a);if(i===false)return}}t=f.options.step;i=f.options.values&&f.options.values.length?n=f.values(a):n=f.value();switch(l.keyCode){case b.ui.keyCode.HOME:n=f._valueMin();break;case b.ui.keyCode.END:n=f._valueMax();break;case b.ui.keyCode.PAGE_UP:n=f._trimAlignValue(i+(f._valueMax()-f._valueMin())/5);break;case b.ui.keyCode.PAGE_DOWN:n=f._trimAlignValue(i-(f._valueMax()-f._valueMin())/5);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(i===
f._valueMax())return;n=f._trimAlignValue(i+t);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(i===f._valueMin())return;n=f._trimAlignValue(i-t)}f._slide(l,a,n);return k}}).keyup(function(l){var k=b(this).data("index.ui-slider-handle");if(f._keySliding){f._keySliding=false;f._stop(l,k);f._change(l,k);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
this._mouseDestroy();return this},_mouseCapture:function(f){var h=this.options,l,k,a,i,n;if(h.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();l=this._normValueFromMouse({x:f.pageX,y:f.pageY});k=this._valueMax()-this._valueMin()+1;i=this;this.handles.each(function(t){var v=Math.abs(l-i.values(t));if(k>v){k=v;a=b(this);n=t}});if(h.range===true&&this.values(1)===h.min){n+=1;a=b(this.handles[n])}if(this._start(f,
n)===false)return false;this._mouseSliding=true;i._handleIndex=n;a.addClass("ui-state-active").focus();h=a.offset();this._clickOffset=!b(f.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:f.pageX-h.left-a.width()/2,top:f.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(f,n,l);return this._animateOff=true},_mouseStart:function(){return true},
_mouseDrag:function(f){var h=this._normValueFromMouse({x:f.pageX,y:f.pageY});this._slide(f,this._handleIndex,h);return false},_mouseStop:function(f){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(f,this._handleIndex);this._change(f,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(f){var h;
if(this.orientation==="horizontal"){h=this.elementSize.width;f=f.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{h=this.elementSize.height;f=f.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}h=f/h;if(h>1)h=1;if(h<0)h=0;if(this.orientation==="vertical")h=1-h;f=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+h*f)},_start:function(f,h){var l={handle:this.handles[h],value:this.value()};if(this.options.values&&this.options.values.length){l.value=
this.values(h);l.values=this.values()}return this._trigger("start",f,l)},_slide:function(f,h,l){var k;if(this.options.values&&this.options.values.length){k=this.values(h?0:1);if(this.options.values.length===2&&this.options.range===true&&(h===0&&l>k||h===1&&l<k))l=k;if(l!==this.values(h)){k=this.values();k[h]=l;f=this._trigger("slide",f,{handle:this.handles[h],value:l,values:k});this.values(h?0:1);f!==false&&this.values(h,l,true)}}else if(l!==this.value()){f=this._trigger("slide",f,{handle:this.handles[h],
value:l});f!==false&&this.value(l)}},_stop:function(f,h){var l={handle:this.handles[h],value:this.value()};if(this.options.values&&this.options.values.length){l.value=this.values(h);l.values=this.values()}this._trigger("stop",f,l)},_change:function(f,h){if(!this._keySliding&&!this._mouseSliding){var l={handle:this.handles[h],value:this.value()};if(this.options.values&&this.options.values.length){l.value=this.values(h);l.values=this.values()}this._trigger("change",f,l)}},value:function(f){if(arguments.length){this.options.value=
this._trimAlignValue(f);this._refreshValue();this._change(null,0)}return this._value()},values:function(f,h){var l,k,a;if(arguments.length>1){this.options.values[f]=this._trimAlignValue(h);this._refreshValue();this._change(null,f)}if(arguments.length)if(b.isArray(arguments[0])){l=this.options.values;k=arguments[0];for(a=0;a<l.length;a+=1){l[a]=this._trimAlignValue(k[a]);this._change(null,a)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(f):this.value();
else return this._values()},_setOption:function(f,h){var l,k=0;if(b.isArray(this.options.values))k=this.options.values.length;b.Widget.prototype._setOption.apply(this,arguments);switch(f){case "disabled":if(h){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(l=0;l<k;l+=1)this._change(null,l);this._animateOff=false}},_value:function(){return this._trimAlignValue(this.options.value)},_values:function(f){var h,l;if(arguments.length){h=this.options.values[f];
return this._trimAlignValue(h)}else{h=this.options.values.slice();for(l=0;l<h.length;l+=1)h[l]=this._trimAlignValue(h[l]);return h}},_trimAlignValue:function(f){if(f<=this._valueMin())return this._valueMin();if(f>=this._valueMax())return this._valueMax();var h=this.options.step>0?this.options.step:1,l=(f-this._valueMin())%h;alignValue=f-l;if(Math.abs(l)*2>=h)alignValue+=l>0?h:-h;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},
_refreshValue:function(){var f=this.options.range,h=this.options,l=this,k=!this._animateOff?h.animate:false,a,i={},n,t,v,y;if(this.options.values&&this.options.values.length)this.handles.each(function(s){a=(l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())*100;i[l.orientation==="horizontal"?"left":"bottom"]=a+"%";b(this).stop(1,1)[k?"animate":"css"](i,h.animate);if(l.options.range===true)if(l.orientation==="horizontal"){if(s===0)l.range.stop(1,1)[k?"animate":"css"]({left:a+"%"},h.animate);
if(s===1)l.range[k?"animate":"css"]({width:a-n+"%"},{queue:false,duration:h.animate})}else{if(s===0)l.range.stop(1,1)[k?"animate":"css"]({bottom:a+"%"},h.animate);if(s===1)l.range[k?"animate":"css"]({height:a-n+"%"},{queue:false,duration:h.animate})}n=a});else{t=this.value();v=this._valueMin();y=this._valueMax();a=y!==v?(t-v)/(y-v)*100:0;i[l.orientation==="horizontal"?"left":"bottom"]=a+"%";this.handle.stop(1,1)[k?"animate":"css"](i,h.animate);if(f==="min"&&this.orientation==="horizontal")this.range.stop(1,
1)[k?"animate":"css"]({width:a+"%"},h.animate);if(f==="max"&&this.orientation==="horizontal")this.range[k?"animate":"css"]({width:100-a+"%"},{queue:false,duration:h.animate});if(f==="min"&&this.orientation==="vertical")this.range.stop(1,1)[k?"animate":"css"]({height:a+"%"},h.animate);if(f==="max"&&this.orientation==="vertical")this.range[k?"animate":"css"]({height:100-a+"%"},{queue:false,duration:h.animate})}}});b.extend(b.ui.slider,{version:"1.8.11"})})(jQuery);
(function(b,f){function h(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
"Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};b.extend(this._defaults,this.regional[""]);this.dpDiv=b('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}function l(a,i){b.extend(a,i);for(var n in i)if(i[n]==
null||i[n]==f)a[n]=i[n];return a}b.extend(b.ui,{datepicker:{version:"1.8.11"}});var k=(new Date).getTime();b.extend(h.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){l(this._defaults,a||{});return this},_attachDatepicker:function(a,i){var n=null,t;for(t in this._defaults){var v=a.getAttribute("date:"+t);if(v){n=n||{};try{n[t]=eval(v)}catch(y){n[t]=v}}}t=a.nodeName.toLowerCase();
v=t=="div"||t=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var s=this._newInst(b(a),v);s.settings=b.extend({},i||{},n||{});if(t=="input")this._connectDatepicker(a,s);else v&&this._inlineDatepicker(a,s)},_newInst:function(a,i){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:!i?this.dpDiv:b('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},
_connectDatepicker:function(a,i){var n=b(a);i.append=b([]);i.trigger=b([]);if(!n.hasClass(this.markerClassName)){this._attachments(n,i);n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(t,v,y){i.settings[v]=y}).bind("getData.datepicker",function(t,v){return this._get(i,v)});this._autoSize(i);b.data(a,"datepicker",i)}},_attachments:function(a,i){var n=this._get(i,"appendText"),t=this._get(i,"isRTL");i.append&&
i.append.remove();if(n){i.append=b('<span class="'+this._appendClass+'">'+n+"</span>");a[t?"before":"after"](i.append)}a.unbind("focus",this._showDatepicker);i.trigger&&i.trigger.remove();n=this._get(i,"showOn");if(n=="focus"||n=="both")a.focus(this._showDatepicker);if(n=="button"||n=="both"){n=this._get(i,"buttonText");var v=this._get(i,"buttonImage");i.trigger=b(this._get(i,"buttonImageOnly")?b("<img/>").addClass(this._triggerClass).attr({src:v,alt:n,title:n}):b('<button type="button"></button>').addClass(this._triggerClass).html(v==
""?n:b("<img/>").attr({src:v,alt:n,title:n})));a[t?"before":"after"](i.trigger);i.trigger.click(function(){b.datepicker._datepickerShowing&&b.datepicker._lastInput==a[0]?b.datepicker._hideDatepicker():b.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var i=new Date(2009,11,20),n=this._get(a,"dateFormat");if(n.match(/[DM]/)){var t=function(v){for(var y=0,s=0,o=0;o<v.length;o++)if(v[o].length>y){y=v[o].length;s=o}return s};i.setMonth(t(this._get(a,
n.match(/MM/)?"monthNames":"monthNamesShort")));i.setDate(t(this._get(a,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-i.getDay())}a.input.attr("size",this._formatDate(a,i).length)}},_inlineDatepicker:function(a,i){var n=b(a);if(!n.hasClass(this.markerClassName)){n.addClass(this.markerClassName).append(i.dpDiv).bind("setData.datepicker",function(t,v,y){i.settings[v]=y}).bind("getData.datepicker",function(t,v){return this._get(i,v)});b.data(a,"datepicker",i);this._setDate(i,this._getDefaultDate(i),
true);this._updateDatepicker(i);this._updateAlternate(i);i.dpDiv.show()}},_dialogDatepicker:function(a,i,n,t,v){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=b('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);b("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};b.data(this._dialogInput[0],"datepicker",a)}l(a.settings,t||{});
i=i&&i.constructor==Date?this._formatDate(a,i):i;this._dialogInput.val(i);this._pos=v?v.length?v:[v.pageX,v.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=n;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);
this._showDatepicker(this._dialogInput[0]);b.blockUI&&b.blockUI(this.dpDiv);b.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var i=b(a),n=b.data(a,"datepicker");if(i.hasClass(this.markerClassName)){var t=a.nodeName.toLowerCase();b.removeData(a,"datepicker");if(t=="input"){n.append.remove();n.trigger.remove();i.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",
this._doKeyUp)}else if(t=="div"||t=="span")i.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var i=b(a),n=b.data(a,"datepicker");if(i.hasClass(this.markerClassName)){var t=a.nodeName.toLowerCase();if(t=="input"){a.disabled=false;n.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(t=="div"||t=="span")i.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=b.map(this._disabledInputs,
function(v){return v==a?null:v})}},_disableDatepicker:function(a){var i=b(a),n=b.data(a,"datepicker");if(i.hasClass(this.markerClassName)){var t=a.nodeName.toLowerCase();if(t=="input"){a.disabled=true;n.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(t=="div"||t=="span")i.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=b.map(this._disabledInputs,function(v){return v==a?null:
v});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var i=0;i<this._disabledInputs.length;i++)if(this._disabledInputs[i]==a)return true;return false},_getInst:function(a){try{return b.data(a,"datepicker")}catch(i){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,i,n){var t=this._getInst(a);if(arguments.length==2&&typeof i=="string")return i=="defaults"?b.extend({},b.datepicker._defaults):t?i=="all"?b.extend({},
t.settings):this._get(t,i):null;var v=i||{};if(typeof i=="string"){v={};v[i]=n}if(t){this._curInst==t&&this._hideDatepicker();var y=this._getDateDatepicker(a,true),s=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max");l(t.settings,v);if(s!==null&&v.dateFormat!==f&&v.minDate===f)t.settings.minDate=this._formatDate(t,s);if(o!==null&&v.dateFormat!==f&&v.maxDate===f)t.settings.maxDate=this._formatDate(t,o);this._attachments(b(a),t);this._autoSize(t);this._setDateDatepicker(a,y);this._updateDatepicker(t)}},
_changeDatepicker:function(a,i,n){this._optionDatepicker(a,i,n)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,i){if(a=this._getInst(a)){this._setDate(a,i);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,i){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,i);return a?this._getDate(a):null},_doKeyDown:function(a){var i=b.datepicker._getInst(a.target),n=true,t=i.dpDiv.is(".ui-datepicker-rtl");
i._keyEvent=true;if(b.datepicker._datepickerShowing)switch(a.keyCode){case 9:b.datepicker._hideDatepicker();n=false;break;case 13:n=b("td."+b.datepicker._dayOverClass+":not(."+b.datepicker._currentClass+")",i.dpDiv);n[0]?b.datepicker._selectDay(a.target,i.selectedMonth,i.selectedYear,n[0]):b.datepicker._hideDatepicker();return false;case 27:b.datepicker._hideDatepicker();break;case 33:b.datepicker._adjustDate(a.target,a.ctrlKey?-b.datepicker._get(i,"stepBigMonths"):-b.datepicker._get(i,"stepMonths"),
"M");break;case 34:b.datepicker._adjustDate(a.target,a.ctrlKey?+b.datepicker._get(i,"stepBigMonths"):+b.datepicker._get(i,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)b.datepicker._clearDate(a.target);n=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)b.datepicker._gotoToday(a.target);n=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,t?+1:-1,"D");n=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)b.datepicker._adjustDate(a.target,a.ctrlKey?
-b.datepicker._get(i,"stepBigMonths"):-b.datepicker._get(i,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,-7,"D");n=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,t?-1:+1,"D");n=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)b.datepicker._adjustDate(a.target,a.ctrlKey?+b.datepicker._get(i,"stepBigMonths"):+b.datepicker._get(i,"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,
+7,"D");n=a.ctrlKey||a.metaKey;break;default:n=false}else if(a.keyCode==36&&a.ctrlKey)b.datepicker._showDatepicker(this);else n=false;if(n){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var i=b.datepicker._getInst(a.target);if(b.datepicker._get(i,"constrainInput")){i=b.datepicker._possibleChars(b.datepicker._get(i,"dateFormat"));var n=String.fromCharCode(a.charCode==f?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||n<" "||!i||i.indexOf(n)>-1}},_doKeyUp:function(a){a=b.datepicker._getInst(a.target);
if(a.input.val()!=a.lastVal)try{if(b.datepicker.parseDate(b.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,b.datepicker._getFormatConfig(a))){b.datepicker._setDateFromField(a);b.datepicker._updateAlternate(a);b.datepicker._updateDatepicker(a)}}catch(i){b.datepicker.log(i)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=b("input",a.parentNode)[0];if(!(b.datepicker._isDisabledDatepicker(a)||b.datepicker._lastInput==a)){var i=b.datepicker._getInst(a);
b.datepicker._curInst&&b.datepicker._curInst!=i&&b.datepicker._curInst.dpDiv.stop(true,true);var n=b.datepicker._get(i,"beforeShow");l(i.settings,n?n.apply(a,[a,i]):{});i.lastVal=null;b.datepicker._lastInput=a;b.datepicker._setDateFromField(i);if(b.datepicker._inDialog)a.value="";if(!b.datepicker._pos){b.datepicker._pos=b.datepicker._findPos(a);b.datepicker._pos[1]+=a.offsetHeight}var t=false;b(a).parents().each(function(){t|=b(this).css("position")=="fixed";return!t});if(t&&b.browser.opera){b.datepicker._pos[0]-=
document.documentElement.scrollLeft;b.datepicker._pos[1]-=document.documentElement.scrollTop}n={left:b.datepicker._pos[0],top:b.datepicker._pos[1]};b.datepicker._pos=null;i.dpDiv.empty();i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});b.datepicker._updateDatepicker(i);n=b.datepicker._checkOffset(i,n,t);i.dpDiv.css({position:b.datepicker._inDialog&&b.blockUI?"static":t?"fixed":"absolute",display:"none",left:n.left+"px",top:n.top+"px"});if(!i.inline){n=b.datepicker._get(i,"showAnim");
var v=b.datepicker._get(i,"duration"),y=function(){b.datepicker._datepickerShowing=true;var s=i.dpDiv.find("iframe.ui-datepicker-cover");if(s.length){var o=b.datepicker._getBorders(i.dpDiv);s.css({left:-o[0],top:-o[1],width:i.dpDiv.outerWidth(),height:i.dpDiv.outerHeight()})}};i.dpDiv.zIndex(b(a).zIndex()+1);b.effects&&b.effects[n]?i.dpDiv.show(n,b.datepicker._get(i,"showOptions"),v,y):i.dpDiv[n||"show"](n?v:null,y);if(!n||!v)y();i.input.is(":visible")&&!i.input.is(":disabled")&&i.input.focus();b.datepicker._curInst=
i}}},_updateDatepicker:function(a){var i=this,n=b.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var t=a.dpDiv.find("iframe.ui-datepicker-cover");t.length&&t.css({left:-n[0],top:-n[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){b(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&b(this).removeClass("ui-datepicker-prev-hover");
this.className.indexOf("ui-datepicker-next")!=-1&&b(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!i._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){b(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");b(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&b(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&b(this).addClass("ui-datepicker-next-hover")}}).end().find("."+
this._dayOverClass+" a").trigger("mouseover").end();n=this._getNumberOfMonths(a);t=n[1];t>1?a.dpDiv.addClass("ui-datepicker-multi-"+t).css("width",17*t+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(n[0]!=1||n[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==b.datepicker._curInst&&b.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&
a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var v=a.yearshtml;setTimeout(function(){v===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);v=a.yearshtml=null},0)}},_getBorders:function(a){var i=function(n){return{thin:1,medium:2,thick:3}[n]||n};return[parseFloat(i(a.css("border-left-width"))),parseFloat(i(a.css("border-top-width")))]},_checkOffset:function(a,i,n){var t=a.dpDiv.outerWidth(),v=a.dpDiv.outerHeight(),y=a.input?a.input.outerWidth():
0,s=a.input?a.input.outerHeight():0,o=document.documentElement.clientWidth+b(document).scrollLeft(),u=document.documentElement.clientHeight+b(document).scrollTop();i.left-=this._get(a,"isRTL")?t-y:0;i.left-=n&&i.left==a.input.offset().left?b(document).scrollLeft():0;i.top-=n&&i.top==a.input.offset().top+s?b(document).scrollTop():0;i.left-=Math.min(i.left,i.left+t>o&&o>t?Math.abs(i.left+t-o):0);i.top-=Math.min(i.top,i.top+v>u&&u>v?Math.abs(v+s):0);return i},_findPos:function(a){for(var i=this._get(this._getInst(a),
"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||b.expr.filters.hidden(a));)a=a[i?"previousSibling":"nextSibling"];a=b(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var i=this._curInst;if(!(!i||a&&i!=b.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(i,"showAnim");var n=this._get(i,"duration"),t=function(){b.datepicker._tidyDialog(i);this._curInst=null};b.effects&&b.effects[a]?i.dpDiv.hide(a,b.datepicker._get(i,"showOptions"),n,t):i.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?
"fadeOut":"hide"](a?n:null,t);a||t();if(a=this._get(i,"onClose"))a.apply(i.input?i.input[0]:null,[i.input?i.input.val():"",i]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(b.blockUI){b.unblockUI();b("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(b.datepicker._curInst){a=
b(a.target);a[0].id!=b.datepicker._mainDivId&&a.parents("#"+b.datepicker._mainDivId).length==0&&!a.hasClass(b.datepicker.markerClassName)&&!a.hasClass(b.datepicker._triggerClass)&&b.datepicker._datepickerShowing&&!(b.datepicker._inDialog&&b.blockUI)&&b.datepicker._hideDatepicker()}},_adjustDate:function(a,i,n){a=b(a);var t=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(t,i+(n=="M"?this._get(t,"showCurrentAtPos"):0),n);this._updateDatepicker(t)}},_gotoToday:function(a){a=
b(a);var i=this._getInst(a[0]);if(this._get(i,"gotoCurrent")&&i.currentDay){i.selectedDay=i.currentDay;i.drawMonth=i.selectedMonth=i.currentMonth;i.drawYear=i.selectedYear=i.currentYear}else{var n=new Date;i.selectedDay=n.getDate();i.drawMonth=i.selectedMonth=n.getMonth();i.drawYear=i.selectedYear=n.getFullYear()}this._notifyChange(i);this._adjustDate(a)},_selectMonthYear:function(a,i,n){a=b(a);var t=this._getInst(a[0]);t._selectingMonthYear=false;t["selected"+(n=="M"?"Month":"Year")]=t["draw"+(n==
"M"?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10);this._notifyChange(t);this._adjustDate(a)},_clickMonthYear:function(a){var i=this._getInst(b(a)[0]);i.input&&i._selectingMonthYear&&setTimeout(function(){i.input.focus()},0);i._selectingMonthYear=!i._selectingMonthYear},_selectDay:function(a,i,n,t){var v=b(a);if(!(b(t).hasClass(this._unselectableClass)||this._isDisabledDatepicker(v[0]))){v=this._getInst(v[0]);v.selectedDay=v.currentDay=b("a",t).html();v.selectedMonth=v.currentMonth=
i;v.selectedYear=v.currentYear=n;this._selectDate(a,this._formatDate(v,v.currentDay,v.currentMonth,v.currentYear))}},_clearDate:function(a){a=b(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,i){a=this._getInst(b(a)[0]);i=i!=null?i:this._formatDate(a);a.input&&a.input.val(i);this._updateAlternate(a);var n=this._get(a,"onSelect");if(n)n.apply(a.input?a.input[0]:null,[i,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();
this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var i=this._get(a,"altField");if(i){var n=this._get(a,"altFormat")||this._get(a,"dateFormat"),t=this._getDate(a),v=this.formatDate(n,t,this._getFormatConfig(a));b(i).each(function(){b(this).val(v)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var i=a.getTime();a.setMonth(0);
a.setDate(1);return Math.floor(Math.round((i-a)/864E5)/7)+1},parseDate:function(a,i,n){if(a==null||i==null)throw"Invalid arguments";i=typeof i=="object"?i.toString():i+"";if(i=="")return null;var t=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff;t=typeof t!="string"?t:(new Date).getFullYear()%100+parseInt(t,10);for(var v=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,y=(n?n.dayNames:null)||this._defaults.dayNames,s=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,o=(n?
n.monthNames:null)||this._defaults.monthNames,u=n=-1,z=-1,I=-1,D=false,P=function(g){(g=ja+1<a.length&&a.charAt(ja+1)==g)&&ja++;return g},L=function(g){var X=P(g);g=i.substring(T).match(RegExp("^\\d{1,"+(g=="@"?14:g=="!"?20:g=="y"&&X?4:g=="o"?3:2)+"}"));if(!g)throw"Missing number at position "+T;T+=g[0].length;return parseInt(g[0],10)},Q=function(g,X,V){g=P(g)?V:X;for(X=0;X<g.length;X++)if(i.substr(T,g[X].length).toLowerCase()==g[X].toLowerCase()){T+=g[X].length;return X+1}throw"Unknown name at position "+
T;},R=function(){if(i.charAt(T)!=a.charAt(ja))throw"Unexpected literal at position "+T;T++},T=0,ja=0;ja<a.length;ja++)if(D)if(a.charAt(ja)=="'"&&!P("'"))D=false;else R();else switch(a.charAt(ja)){case "d":z=L("d");break;case "D":Q("D",v,y);break;case "o":I=L("o");break;case "m":u=L("m");break;case "M":u=Q("M",s,o);break;case "y":n=L("y");break;case "@":var B=new Date(L("@"));n=B.getFullYear();u=B.getMonth()+1;z=B.getDate();break;case "!":B=new Date((L("!")-this._ticksTo1970)/1E4);n=B.getFullYear();
u=B.getMonth()+1;z=B.getDate();break;case "'":if(P("'"))R();else D=true;break;default:R()}if(n==-1)n=(new Date).getFullYear();else if(n<100)n+=(new Date).getFullYear()-(new Date).getFullYear()%100+(n<=t?0:-100);if(I>-1){u=1;z=I;do{t=this._getDaysInMonth(n,u-1);if(z<=t)break;u++;z-=t}while(1)}B=this._daylightSavingAdjust(new Date(n,u-1,z));if(B.getFullYear()!=n||B.getMonth()+1!=u||B.getDate()!=z)throw"Invalid date";return B},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",
RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*864E9,formatDate:function(a,i,n){if(!i)return"";var t=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,v=(n?n.dayNames:null)||this._defaults.dayNames,y=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort;n=(n?n.monthNames:null)||this._defaults.monthNames;var s=function(P){(P=
D+1<a.length&&a.charAt(D+1)==P)&&D++;return P},o=function(P,L,Q){L=""+L;if(s(P))for(;L.length<Q;)L="0"+L;return L},u=function(P,L,Q,R){return s(P)?R[L]:Q[L]},z="",I=false;if(i)for(var D=0;D<a.length;D++)if(I)if(a.charAt(D)=="'"&&!s("'"))I=false;else z+=a.charAt(D);else switch(a.charAt(D)){case "d":z+=o("d",i.getDate(),2);break;case "D":z+=u("D",i.getDay(),t,v);break;case "o":z+=o("o",(i.getTime()-(new Date(i.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":z+=o("m",i.getMonth()+1,2);break;case "M":z+=
u("M",i.getMonth(),y,n);break;case "y":z+=s("y")?i.getFullYear():(i.getYear()%100<10?"0":"")+i.getYear()%100;break;case "@":z+=i.getTime();break;case "!":z+=i.getTime()*1E4+this._ticksTo1970;break;case "'":if(s("'"))z+="'";else I=true;break;default:z+=a.charAt(D)}return z},_possibleChars:function(a){for(var i="",n=false,t=function(y){(y=v+1<a.length&&a.charAt(v+1)==y)&&v++;return y},v=0;v<a.length;v++)if(n)if(a.charAt(v)=="'"&&!t("'"))n=false;else i+=a.charAt(v);else switch(a.charAt(v)){case "d":case "m":case "y":case "@":i+=
"0123456789";break;case "D":case "M":return null;case "'":if(t("'"))i+="'";else n=true;break;default:i+=a.charAt(v)}return i},_get:function(a,i){return a.settings[i]!==f?a.settings[i]:this._defaults[i]},_setDateFromField:function(a,i){if(a.input.val()!=a.lastVal){var n=this._get(a,"dateFormat"),t=a.lastVal=a.input?a.input.val():null,v,y;v=y=this._getDefaultDate(a);var s=this._getFormatConfig(a);try{v=this.parseDate(n,t,s)||y}catch(o){this.log(o);t=i?"":t}a.selectedDay=v.getDate();a.drawMonth=a.selectedMonth=
v.getMonth();a.drawYear=a.selectedYear=v.getFullYear();a.currentDay=t?v.getDate():0;a.currentMonth=t?v.getMonth():0;a.currentYear=t?v.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,i,n){var t=function(v){var y=new Date;y.setDate(y.getDate()+v);return y};if(i=(i=i==null||i===""?n:typeof i=="string"?function(v){try{return b.datepicker.parseDate(b.datepicker._get(a,
"dateFormat"),v,b.datepicker._getFormatConfig(a))}catch(y){}var s=(v.toLowerCase().match(/^c/)?b.datepicker._getDate(a):null)||new Date,o=s.getFullYear(),u=s.getMonth();s=s.getDate();for(var z=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,I=z.exec(v);I;){switch(I[2]||"d"){case "d":case "D":s+=parseInt(I[1],10);break;case "w":case "W":s+=parseInt(I[1],10)*7;break;case "m":case "M":u+=parseInt(I[1],10);s=Math.min(s,b.datepicker._getDaysInMonth(o,u));break;case "y":case "Y":o+=parseInt(I[1],10);s=Math.min(s,
b.datepicker._getDaysInMonth(o,u))}I=z.exec(v)}return new Date(o,u,s)}(i):typeof i=="number"?isNaN(i)?n:t(i):new Date(i.getTime()))&&i.toString()=="Invalid Date"?n:i){i.setHours(0);i.setMinutes(0);i.setSeconds(0);i.setMilliseconds(0)}return this._daylightSavingAdjust(i)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,i,n){var t=!i,v=a.selectedMonth,y=a.selectedYear;i=this._restrictMinMax(a,this._determineDate(a,i,new Date));
a.selectedDay=a.currentDay=i.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=i.getMonth();a.drawYear=a.selectedYear=a.currentYear=i.getFullYear();if((v!=a.selectedMonth||y!=a.selectedYear)&&!n)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(t?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var i=new Date;i=this._daylightSavingAdjust(new Date(i.getFullYear(),
i.getMonth(),i.getDate()));var n=this._get(a,"isRTL"),t=this._get(a,"showButtonPanel"),v=this._get(a,"hideIfNoPrevNext"),y=this._get(a,"navigationAsDateFormat"),s=this._getNumberOfMonths(a),o=this._get(a,"showCurrentAtPos"),u=this._get(a,"stepMonths"),z=s[0]!=1||s[1]!=1,I=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),D=this._getMinMaxDate(a,"min"),P=this._getMinMaxDate(a,"max");o=a.drawMonth-o;var L=a.drawYear;if(o<0){o+=12;L--}if(P){var Q=
this._daylightSavingAdjust(new Date(P.getFullYear(),P.getMonth()-s[0]*s[1]+1,P.getDate()));for(Q=D&&Q<D?D:Q;this._daylightSavingAdjust(new Date(L,o,1))>Q;){o--;if(o<0){o=11;L--}}}a.drawMonth=o;a.drawYear=L;Q=this._get(a,"prevText");Q=!y?Q:this.formatDate(Q,this._daylightSavingAdjust(new Date(L,o-u,1)),this._getFormatConfig(a));Q=this._canAdjustMonth(a,-1,L,o)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+k+".datepicker._adjustDate('#"+a.id+"', -"+u+", 'M');\" title=\""+Q+'"><span class="ui-icon ui-icon-circle-triangle-'+
(n?"e":"w")+'">'+Q+"</span></a>":v?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+Q+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+Q+"</span></a>";var R=this._get(a,"nextText");R=!y?R:this.formatDate(R,this._daylightSavingAdjust(new Date(L,o+u,1)),this._getFormatConfig(a));v=this._canAdjustMonth(a,+1,L,o)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+k+".datepicker._adjustDate('#"+a.id+"', +"+u+", 'M');\" title=\""+R+'"><span class="ui-icon ui-icon-circle-triangle-'+
(n?"w":"e")+'">'+R+"</span></a>":v?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+R+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+R+"</span></a>";u=this._get(a,"currentText");R=this._get(a,"gotoCurrent")&&a.currentDay?I:i;u=!y?u:this.formatDate(u,R,this._getFormatConfig(a));y=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+k+'.datepicker._hideDatepicker();">'+this._get(a,
"closeText")+"</button>":"";t=t?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(n?y:"")+(this._isInRange(a,R)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+k+".datepicker._gotoToday('#"+a.id+"');\">"+u+"</button>":"")+(n?"":y)+"</div>":"";y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;u=this._get(a,"showWeek");R=this._get(a,"dayNames");this._get(a,"dayNamesShort");var T=this._get(a,"dayNamesMin"),ja=
this._get(a,"monthNames"),B=this._get(a,"monthNamesShort"),g=this._get(a,"beforeShowDay"),X=this._get(a,"showOtherMonths"),V=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var ba=this._getDefaultDate(a),da="",ka=0;ka<s[0];ka++){for(var sa="",xa=0;xa<s[1];xa++){var ya=this._daylightSavingAdjust(new Date(L,o,a.selectedDay)),na=" ui-corner-all",la="";if(z){la+='<div class="ui-datepicker-group';if(s[1]>1)switch(xa){case 0:la+=" ui-datepicker-group-first";na=" ui-corner-"+(n?"right":
"left");break;case s[1]-1:la+=" ui-datepicker-group-last";na=" ui-corner-"+(n?"left":"right");break;default:la+=" ui-datepicker-group-middle";na=""}la+='">'}la+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+na+'">'+(/all|left/.test(na)&&ka==0?n?v:Q:"")+(/all|right/.test(na)&&ka==0?n?Q:v:"")+this._generateMonthYearHeader(a,o,L,D,P,ka>0||xa>0,ja,B)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var oa=u?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+
"</th>":"";for(na=0;na<7;na++){var ca=(na+y)%7;oa+="<th"+((na+y+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+R[ca]+'">'+T[ca]+"</span></th>"}la+=oa+"</tr></thead><tbody>";oa=this._getDaysInMonth(L,o);if(L==a.selectedYear&&o==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,oa);na=(this._getFirstDayOfMonth(L,o)-y+7)%7;oa=z?6:Math.ceil((na+oa)/7);ca=this._daylightSavingAdjust(new Date(L,o,1-na));for(var Ba=0;Ba<oa;Ba++){la+="<tr>";var Fa=!u?"":'<td class="ui-datepicker-week-col">'+
this._get(a,"calculateWeek")(ca)+"</td>";for(na=0;na<7;na++){var Na=g?g.apply(a.input?a.input[0]:null,[ca]):[true,""],Ea=ca.getMonth()!=o,Oa=Ea&&!V||!Na[0]||D&&ca<D||P&&ca>P;Fa+='<td class="'+((na+y+6)%7>=5?" ui-datepicker-week-end":"")+(Ea?" ui-datepicker-other-month":"")+(ca.getTime()==ya.getTime()&&o==a.selectedMonth&&a._keyEvent||ba.getTime()==ca.getTime()&&ba.getTime()==ya.getTime()?" "+this._dayOverClass:"")+(Oa?" "+this._unselectableClass+" ui-state-disabled":"")+(Ea&&!X?"":" "+Na[1]+(ca.getTime()==
I.getTime()?" "+this._currentClass:"")+(ca.getTime()==i.getTime()?" ui-datepicker-today":""))+'"'+((!Ea||X)&&Na[2]?' title="'+Na[2]+'"':"")+(Oa?"":' onclick="DP_jQuery_'+k+".datepicker._selectDay('#"+a.id+"',"+ca.getMonth()+","+ca.getFullYear()+', this);return false;"')+">"+(Ea&&!X?"&#xa0;":Oa?'<span class="ui-state-default">'+ca.getDate()+"</span>":'<a class="ui-state-default'+(ca.getTime()==i.getTime()?" ui-state-highlight":"")+(ca.getTime()==I.getTime()?" ui-state-active":"")+(Ea?" ui-priority-secondary":
"")+'" href="#">'+ca.getDate()+"</a>")+"</td>";ca.setDate(ca.getDate()+1);ca=this._daylightSavingAdjust(ca)}la+=Fa+"</tr>"}o++;if(o>11){o=0;L++}la+="</tbody></table>"+(z?"</div>"+(s[0]>0&&xa==s[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");sa+=la}da+=sa}da+=t+(b.browser.msie&&parseInt(b.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return da},_generateMonthYearHeader:function(a,i,n,t,v,y,
s,o){var u=this._get(a,"changeMonth"),z=this._get(a,"changeYear"),I=this._get(a,"showMonthAfterYear"),D='<div class="ui-datepicker-title">',P="";if(y||!u)P+='<span class="ui-datepicker-month">'+s[i]+"</span>";else{s=t&&t.getFullYear()==n;var L=v&&v.getFullYear()==n;P+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+k+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+k+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var Q=0;Q<12;Q++)if((!s||Q>=t.getMonth())&&
(!L||Q<=v.getMonth()))P+='<option value="'+Q+'"'+(Q==i?' selected="selected"':"")+">"+o[Q]+"</option>";P+="</select>"}I||(D+=P+(y||!(u&&z)?"&#xa0;":""));a.yearshtml="";if(y||!z)D+='<span class="ui-datepicker-year">'+n+"</span>";else{o=this._get(a,"yearRange").split(":");var R=(new Date).getFullYear();s=function(T){T=T.match(/c[+-].*/)?n+parseInt(T.substring(1),10):T.match(/[+-].*/)?R+parseInt(T,10):parseInt(T,10);return isNaN(T)?R:T};i=s(o[0]);o=Math.max(i,s(o[1]||""));i=t?Math.max(i,t.getFullYear()):
i;o=v?Math.min(o,v.getFullYear()):o;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+k+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+k+".datepicker._clickMonthYear('#"+a.id+"');\">";i<=o;i++)a.yearshtml+='<option value="'+i+'"'+(i==n?' selected="selected"':"")+">"+i+"</option>";a.yearshtml+="</select>";if(b.browser.mozilla)D+='<select class="ui-datepicker-year"><option value="'+n+'" selected="selected">'+n+"</option></select>";else{D+=a.yearshtml;
a.yearshtml=null}}D+=this._get(a,"yearSuffix");if(I)D+=(y||!(u&&z)?"&#xa0;":"")+P;D+="</div>";return D},_adjustInstDate:function(a,i,n){var t=a.drawYear+(n=="Y"?i:0),v=a.drawMonth+(n=="M"?i:0);i=Math.min(a.selectedDay,this._getDaysInMonth(t,v))+(n=="D"?i:0);t=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(t,v,i)));a.selectedDay=t.getDate();a.drawMonth=a.selectedMonth=t.getMonth();a.drawYear=a.selectedYear=t.getFullYear();if(n=="M"||n=="Y")this._notifyChange(a)},_restrictMinMax:function(a,
i){var n=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");i=n&&i<n?n:i;return a&&i>a?a:i},_notifyChange:function(a){var i=this._get(a,"onChangeMonthYear");if(i)i.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,i){return this._determineDate(a,this._get(a,i+"Date"),null)},_getDaysInMonth:function(a,i){return 32-this._daylightSavingAdjust(new Date(a,
i,32)).getDate()},_getFirstDayOfMonth:function(a,i){return(new Date(a,i,1)).getDay()},_canAdjustMonth:function(a,i,n,t){var v=this._getNumberOfMonths(a);n=this._daylightSavingAdjust(new Date(n,t+(i<0?i:v[0]*v[1]),1));i<0&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth()));return this._isInRange(a,n)},_isInRange:function(a,i){var n=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!n||i.getTime()>=n.getTime())&&(!a||i.getTime()<=a.getTime())},_getFormatConfig:function(a){var i=
this._get(a,"shortYearCutoff");i=typeof i!="string"?i:(new Date).getFullYear()%100+parseInt(i,10);return{shortYearCutoff:i,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,i,n,t){if(!i){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}i=i?typeof i=="object"?i:this._daylightSavingAdjust(new Date(t,n,i)):this._daylightSavingAdjust(new Date(a.currentYear,
a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),i,this._getFormatConfig(a))}});b.fn.datepicker=function(a){if(!this.length)return this;if(!b.datepicker.initialized){b(document).mousedown(b.datepicker._checkExternalClick).find("body").append(b.datepicker.dpDiv);b.datepicker.initialized=true}var i=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(i));
if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(i));return this.each(function(){typeof a=="string"?b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this].concat(i)):b.datepicker._attachDatepicker(this,a)})};b.datepicker=new h;b.datepicker.initialized=false;b.datepicker.uuid=(new Date).getTime();b.datepicker.version="1.8.11";window["DP_jQuery_"+k]=b})(jQuery);
jQuery.effects||function(b,f){function h(s){var o;if(s&&s.constructor==Array&&s.length==3)return s;if(o=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(s))return[parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10)];if(o=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(s))return[parseFloat(o[1])*2.55,parseFloat(o[2])*2.55,parseFloat(o[3])*2.55];if(o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(s))return[parseInt(o[1],
16),parseInt(o[2],16),parseInt(o[3],16)];if(o=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(s))return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(s))return t.transparent;return t[b.trim(s).toLowerCase()]}function l(){var s=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,o={},u,z;if(s&&s.length&&s[0]&&s[s[0]])for(var I=s.length;I--;){u=s[I];if(typeof s[u]=="string"){z=u.replace(/\-(\w)/g,function(D,P){return P.toUpperCase()});
o[z]=s[u]}}else for(u in s)if(typeof s[u]==="string")o[u]=s[u];return o}function k(s){var o,u;for(o in s){u=s[o];if(u==null||b.isFunction(u)||o in y||/scrollbar/.test(o)||!/color/i.test(o)&&isNaN(parseFloat(u)))delete s[o]}return s}function a(s,o){var u={_:0},z;for(z in o)if(s[z]!=o[z])u[z]=o[z];return u}function i(s,o,u,z){if(typeof s=="object"){z=o;u=null;o=s;s=o.effect}if(b.isFunction(o)){z=o;u=null;o={}}if(typeof o=="number"||b.fx.speeds[o]){z=u;u=o;o={}}if(b.isFunction(u)){z=u;u=null}o=o||{};
u=u||o.duration;u=b.fx.off?0:typeof u=="number"?u:u in b.fx.speeds?b.fx.speeds[u]:b.fx.speeds._default;z=z||o.complete;return[s,o,u,z]}function n(s){if(!s||typeof s==="number"||b.fx.speeds[s])return true;if(typeof s==="string"&&!b.effects[s])return true;return false}b.effects={};b.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(s,o){b.fx.step[o]=function(u){if(!u.colorInit){var z;z=u.elem;var I=o,D;do{D=
b.curCSS(z,I);if(D!=""&&D!="transparent"||b.nodeName(z,"body"))break;I="backgroundColor"}while(z=z.parentNode);z=h(D);u.start=z;u.end=h(u.end);u.colorInit=true}u.elem.style[o]="rgb("+Math.max(Math.min(parseInt(u.pos*(u.end[0]-u.start[0])+u.start[0],10),255),0)+","+Math.max(Math.min(parseInt(u.pos*(u.end[1]-u.start[1])+u.start[1],10),255),0)+","+Math.max(Math.min(parseInt(u.pos*(u.end[2]-u.start[2])+u.start[2],10),255),0)+")"}});var t={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},v=["add","remove","toggle"],y={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};b.effects.animateClass=function(s,o,u,
z){if(b.isFunction(u)){z=u;u=null}return this.queue("fx",function(){var I=b(this),D=I.attr("style")||" ",P=k(l.call(this)),L,Q=I.attr("className");b.each(v,function(R,T){s[T]&&I[T+"Class"](s[T])});L=k(l.call(this));I.attr("className",Q);I.animate(a(P,L),o,u,function(){b.each(v,function(R,T){s[T]&&I[T+"Class"](s[T])});if(typeof I.attr("style")=="object"){I.attr("style").cssText="";I.attr("style").cssText=D}else I.attr("style",D);z&&z.apply(this,arguments)});P=b.queue(this);L=P.splice(P.length-1,1)[0];
P.splice(1,0,L);b.dequeue(this)})};b.fn.extend({_addClass:b.fn.addClass,addClass:function(s,o,u,z){return o?b.effects.animateClass.apply(this,[{add:s},o,u,z]):this._addClass(s)},_removeClass:b.fn.removeClass,removeClass:function(s,o,u,z){return o?b.effects.animateClass.apply(this,[{remove:s},o,u,z]):this._removeClass(s)},_toggleClass:b.fn.toggleClass,toggleClass:function(s,o,u,z,I){return typeof o=="boolean"||o===f?u?b.effects.animateClass.apply(this,[o?{add:s}:{remove:s},u,z,I]):this._toggleClass(s,
o):b.effects.animateClass.apply(this,[{toggle:s},o,u,z])},switchClass:function(s,o,u,z,I){return b.effects.animateClass.apply(this,[{add:o,remove:s},u,z,I])}});b.extend(b.effects,{version:"1.8.11",save:function(s,o){for(var u=0;u<o.length;u++)o[u]!==null&&s.data("ec.storage."+o[u],s[0].style[o[u]])},restore:function(s,o){for(var u=0;u<o.length;u++)o[u]!==null&&s.css(o[u],s.data("ec.storage."+o[u]))},setMode:function(s,o){if(o=="toggle")o=s.is(":hidden")?"show":"hide";return o},getBaseline:function(s,
o){var u;switch(s[0]){case "top":u=0;break;case "middle":u=0.5;break;case "bottom":u=1;break;default:u=s[0]/o.height}switch(s[1]){case "left":s=0;break;case "center":s=0.5;break;case "right":s=1;break;default:s=s[1]/o.width}return{x:s,y:u}},createWrapper:function(s){if(s.parent().is(".ui-effects-wrapper"))return s.parent();var o={width:s.outerWidth(true),height:s.outerHeight(true),"float":s.css("float")},u=b("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",
border:"none",margin:0,padding:0});s.wrap(u);u=s.parent();if(s.css("position")=="static"){u.css({position:"relative"});s.css({position:"relative"})}else{b.extend(o,{position:s.css("position"),zIndex:s.css("z-index")});b.each(["top","left","bottom","right"],function(z,I){o[I]=s.css(I);if(isNaN(parseInt(o[I],10)))o[I]="auto"});s.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return u.css(o).show()},removeWrapper:function(s){if(s.parent().is(".ui-effects-wrapper"))return s.parent().replaceWith(s);
return s},setTransition:function(s,o,u,z){z=z||{};b.each(o,function(I,D){unit=s.cssUnit(D);if(unit[0]>0)z[D]=unit[0]*u+unit[1]});return z}});b.fn.extend({effect:function(s){var o=i.apply(this,arguments),u={options:o[1],duration:o[2],callback:o[3]};o=u.options.mode;var z=b.effects[s];if(b.fx.off||!z)return o?this[o](u.duration,u.callback):this.each(function(){u.callback&&u.callback.call(this)});return z.call(this,u)},_show:b.fn.show,show:function(s){if(n(s))return this._show.apply(this,arguments);
else{var o=i.apply(this,arguments);o[1].mode="show";return this.effect.apply(this,o)}},_hide:b.fn.hide,hide:function(s){if(n(s))return this._hide.apply(this,arguments);else{var o=i.apply(this,arguments);o[1].mode="hide";return this.effect.apply(this,o)}},__toggle:b.fn.toggle,toggle:function(s){if(n(s)||typeof s==="boolean"||b.isFunction(s))return this.__toggle.apply(this,arguments);else{var o=i.apply(this,arguments);o[1].mode="toggle";return this.effect.apply(this,o)}},cssUnit:function(s){var o=this.css(s),
u=[];b.each(["em","px","%","pt"],function(z,I){if(o.indexOf(I)>0)u=[parseFloat(o),I]});return u}});b.easing.jswing=b.easing.swing;b.extend(b.easing,{def:"easeOutQuad",swing:function(s,o,u,z,I){return b.easing[b.easing.def](s,o,u,z,I)},easeInQuad:function(s,o,u,z,I){return z*(o/=I)*o+u},easeOutQuad:function(s,o,u,z,I){return-z*(o/=I)*(o-2)+u},easeInOutQuad:function(s,o,u,z,I){if((o/=I/2)<1)return z/2*o*o+u;return-z/2*(--o*(o-2)-1)+u},easeInCubic:function(s,o,u,z,I){return z*(o/=I)*o*o+u},easeOutCubic:function(s,
o,u,z,I){return z*((o=o/I-1)*o*o+1)+u},easeInOutCubic:function(s,o,u,z,I){if((o/=I/2)<1)return z/2*o*o*o+u;return z/2*((o-=2)*o*o+2)+u},easeInQuart:function(s,o,u,z,I){return z*(o/=I)*o*o*o+u},easeOutQuart:function(s,o,u,z,I){return-z*((o=o/I-1)*o*o*o-1)+u},easeInOutQuart:function(s,o,u,z,I){if((o/=I/2)<1)return z/2*o*o*o*o+u;return-z/2*((o-=2)*o*o*o-2)+u},easeInQuint:function(s,o,u,z,I){return z*(o/=I)*o*o*o*o+u},easeOutQuint:function(s,o,u,z,I){return z*((o=o/I-1)*o*o*o*o+1)+u},easeInOutQuint:function(s,
o,u,z,I){if((o/=I/2)<1)return z/2*o*o*o*o*o+u;return z/2*((o-=2)*o*o*o*o+2)+u},easeInSine:function(s,o,u,z,I){return-z*Math.cos(o/I*(Math.PI/2))+z+u},easeOutSine:function(s,o,u,z,I){return z*Math.sin(o/I*(Math.PI/2))+u},easeInOutSine:function(s,o,u,z,I){return-z/2*(Math.cos(Math.PI*o/I)-1)+u},easeInExpo:function(s,o,u,z,I){return o==0?u:z*Math.pow(2,10*(o/I-1))+u},easeOutExpo:function(s,o,u,z,I){return o==I?u+z:z*(-Math.pow(2,-10*o/I)+1)+u},easeInOutExpo:function(s,o,u,z,I){if(o==0)return u;if(o==
I)return u+z;if((o/=I/2)<1)return z/2*Math.pow(2,10*(o-1))+u;return z/2*(-Math.pow(2,-10*--o)+2)+u},easeInCirc:function(s,o,u,z,I){return-z*(Math.sqrt(1-(o/=I)*o)-1)+u},easeOutCirc:function(s,o,u,z,I){return z*Math.sqrt(1-(o=o/I-1)*o)+u},easeInOutCirc:function(s,o,u,z,I){if((o/=I/2)<1)return-z/2*(Math.sqrt(1-o*o)-1)+u;return z/2*(Math.sqrt(1-(o-=2)*o)+1)+u},easeInElastic:function(s,o,u,z,I){var D=0,P=z;if(o==0)return u;if((o/=I)==1)return u+z;D||(D=I*0.3);if(P<Math.abs(z)){P=z;s=D/4}else s=D/(2*Math.PI)*
Math.asin(z/P);return-(P*Math.pow(2,10*(o-=1))*Math.sin((o*I-s)*2*Math.PI/D))+u},easeOutElastic:function(s,o,u,z,I){var D=0,P=z;if(o==0)return u;if((o/=I)==1)return u+z;D||(D=I*0.3);if(P<Math.abs(z)){P=z;s=D/4}else s=D/(2*Math.PI)*Math.asin(z/P);return P*Math.pow(2,-10*o)*Math.sin((o*I-s)*2*Math.PI/D)+z+u},easeInOutElastic:function(s,o,u,z,I){var D=0,P=z;if(o==0)return u;if((o/=I/2)==2)return u+z;D||(D=I*0.3*1.5);if(P<Math.abs(z)){P=z;s=D/4}else s=D/(2*Math.PI)*Math.asin(z/P);if(o<1)return-0.5*P*
Math.pow(2,10*(o-=1))*Math.sin((o*I-s)*2*Math.PI/D)+u;return P*Math.pow(2,-10*(o-=1))*Math.sin((o*I-s)*2*Math.PI/D)*0.5+z+u},easeInBack:function(s,o,u,z,I,D){if(D==f)D=1.70158;return z*(o/=I)*o*((D+1)*o-D)+u},easeOutBack:function(s,o,u,z,I,D){if(D==f)D=1.70158;return z*((o=o/I-1)*o*((D+1)*o+D)+1)+u},easeInOutBack:function(s,o,u,z,I,D){if(D==f)D=1.70158;if((o/=I/2)<1)return z/2*o*o*(((D*=1.525)+1)*o-D)+u;return z/2*((o-=2)*o*(((D*=1.525)+1)*o+D)+2)+u},easeInBounce:function(s,o,u,z,I){return z-b.easing.easeOutBounce(s,
I-o,0,z,I)+u},easeOutBounce:function(s,o,u,z,I){return(o/=I)<1/2.75?z*7.5625*o*o+u:o<2/2.75?z*(7.5625*(o-=1.5/2.75)*o+0.75)+u:o<2.5/2.75?z*(7.5625*(o-=2.25/2.75)*o+0.9375)+u:z*(7.5625*(o-=2.625/2.75)*o+0.984375)+u},easeInOutBounce:function(s,o,u,z,I){if(o<I/2)return b.easing.easeInBounce(s,o*2,0,z,I)*0.5+u;return b.easing.easeOutBounce(s,o*2-I,0,z,I)*0.5+z*0.5+u}})}(jQuery);
(function(b){b.effects.fade=function(f){return this.queue(function(){var h=b(this),l=b.effects.setMode(h,f.options.mode||"hide");h.animate({opacity:l},{queue:false,duration:f.duration,easing:f.options.easing,complete:function(){f.callback&&f.callback.apply(this,arguments);h.dequeue()}})})}})(jQuery);(function(b){function f(h,l){this.$element=b(h);this.options=l;this.enabled=true;this.fixTitle()}f.prototype={show:function(){var h=this.getTitle();if(h&&this.enabled){var l=this.tip();l.find(".tipsy-inner")[this.options.html?"html":"text"](h);l[0].className="tipsy";l.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).appendTo(document.body);h=b.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var k=l[0].offsetWidth,a=l[0].offsetHeight,
i=typeof this.options.gravity=="function"?this.options.gravity.call(this.$element[0]):this.options.gravity,n;switch(i.charAt(0)){case "n":n={top:h.top+h.height+this.options.offset,left:h.left+h.width/2-k/2};break;case "s":n={top:h.top-a-this.options.offset,left:h.left+h.width/2-k/2};break;case "e":n={top:h.top+h.height/2-a/2,left:h.left-k-this.options.offset};break;case "w":n={top:h.top+h.height/2-a/2,left:h.left+h.width+this.options.offset}}if(i.length==2)n.left=i.charAt(1)=="w"?h.left+h.width/2-
15:h.left+h.width/2-k+15;l.css(n).addClass("tipsy-"+i);this.options.fade?l.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):l.css({visibility:"visible",opacity:this.options.opacity})}},hide:function(){this.options.fade?this.tip().stop().fadeOut(function(){b(this).remove()}):this.tip().remove()},fixTitle:function(){var h=this.$element;if(h.attr("title")||typeof h.attr("original-title")!="string")h.attr("original-title",h.attr("title")||"").removeAttr("title")},
getTitle:function(){var h,l=this.$element,k=this.options;this.fixTitle();k=this.options;if(typeof k.title=="string")h=l.attr(k.title=="title"?"original-title":k.title);else if(typeof k.title=="function")h=k.title.call(l[0]);return(h=(""+h).replace(/(^\s*|\s*$)/,""))||k.fallback},tip:function(){if(!this.$tip)this.$tip=b('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>');return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();
this.options=this.$element=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};b.fn.tipsy=function(h){function l(t){var v=b.data(t,"tipsy");if(!v){v=new f(t,b.fn.tipsy.elementOptions(t,h));b.data(t,"tipsy",v)}return v}function k(){var t=l(this);t.hoverState="in";if(h.delayIn==0)t.show();else{t.fixTitle();setTimeout(function(){t.hoverState=="in"&&t.show()},h.delayIn)}}function a(){var t=l(this);t.hoverState="out";
h.delayOut==0?t.hide():setTimeout(function(){t.hoverState=="out"&&t.hide()},h.delayOut)}if(h===true)return this.data("tipsy");else if(typeof h=="string"){var i=this.data("tipsy");if(i)i[h]();return this}h=b.extend({},b.fn.tipsy.defaults,h);h.live||this.each(function(){l(this)});if(h.trigger!="manual"){i=h.live?"live":"bind";var n=h.trigger=="hover"?"mouseleave":"blur";this[i](h.trigger=="hover"?"mouseenter":"focus",k)[i](n,a)}return this};b.fn.tipsy.defaults={delayIn:0,delayOut:0,fade:false,fallback:"",
gravity:"n",html:false,live:false,offset:0,opacity:0.8,title:"title",trigger:"hover"};b.fn.tipsy.elementOptions=function(h,l){return b.metadata?b.extend({},l,b(h).metadata()):l};b.fn.tipsy.autoNS=function(){return b(this).offset().top>b(document).scrollTop()+b(window).height()/2?"s":"n"};b.fn.tipsy.autoWE=function(){return b(this).offset().left>b(document).scrollLeft()+b(window).width()/2?"e":"w"}})(jQuery);(function(b){function f(){var k;k=b(this);if(!k.data("timeago")){k.data("timeago",{datetime:l.datetime(k)});var a=b.trim(k.text());a.length>0&&k.attr("title",a)}k=k.data("timeago");isNaN(k.datetime)||b(this).text(h(k.datetime));return this}function h(k){return l.inWords((new Date).getTime()-k.getTime())}b.timeago=function(k){return k instanceof Date?h(k):typeof k==="string"?h(b.timeago.parse(k)):h(b.timeago.datetime(k))};var l=b.timeago;b.extend(b.timeago,{settings:{refreshMillis:6E4,allowFuture:false,
strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",numbers:[]}},inWords:function(k){function a(z,I){return(b.isFunction(z)?z(I,k):z).replace(/%d/i,i.numbers&&i.numbers[I]||I)}var i=this.settings.strings,n=i.prefixAgo,t=i.suffixAgo;if(this.settings.allowFuture){if(k<
0){n=i.prefixFromNow;t=i.suffixFromNow}k=Math.abs(k)}var v=k/1E3,y=v/60,s=y/60,o=s/24,u=o/365;v=v<45&&a(i.seconds,Math.round(v))||v<90&&a(i.minute,1)||y<45&&a(i.minutes,Math.round(y))||y<90&&a(i.hour,1)||s<24&&a(i.hours,Math.round(s))||s<48&&a(i.day,1)||o<30&&a(i.days,Math.floor(o))||o<60&&a(i.month,1)||o<365&&a(i.months,Math.floor(o/30))||u<2&&a(i.year,1)||a(i.years,Math.floor(u));return b.trim([n,v,t].join(" "))},parse:function(k){k=b.trim(k);k=k.replace(/\.\d\d\d+/,"");k=k.replace(/-/,"/").replace(/-/,
"/");k=k.replace(/T/," ").replace(/Z/," UTC");k=k.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2");return new Date(k)},datetime:function(k){k=b(k).get(0).tagName.toLowerCase()==="time"?b(k).attr("datetime"):b(k).attr("title");return l.parse(k)}});b.fn.timeago=function(){var k=this;k.each(f);var a=l.settings;a.refreshMillis>0&&setInterval(function(){k.each(f)},a.refreshMillis);return k};document.createElement("abbr");document.createElement("time")})(jQuery);(function(b){b.widget("ui.selectmenu",{getter:"value",version:"1.8",eventPrefix:"selectmenu",options:{transferClasses:true,typeAhead:"sequential",style:"dropdown",positionOptions:{my:"left top",at:"left bottom",offset:null},width:null,menuWidth:null,handleWidth:26,maxHeight:null,icons:null,format:null,bgImage:function(){},wrapperElement:""},_create:function(){var f=this,h=this.options,l=this.element.attr("id")||"ui-selectmenu-"+Math.random().toString(16).slice(2,10);this.ids=[l+"-button",l+"-menu"];
this._safemouseup=true;if(b.browser.msie)h.typeAhead="";this.newelement=b('<a class="'+this.widgetBaseClass+' ui-widget ui-state-default ui-corner-all" id="'+this.ids[0]+'" role="button" href="#" tabindex="0" aria-haspopup="true" aria-owns="'+this.ids[1]+'"></a>').insertAfter(this.element);this.newelement.wrap(h.wrapperElement);(l=this.element.attr("tabindex"))&&this.newelement.attr("tabindex",l);this.newelement.data("selectelement",this.element);this.selectmenuIcon=b('<span class="'+this.widgetBaseClass+
'-icon ui-icon"></span>').prependTo(this.newelement);this.newelement.prepend('<span class="'+f.widgetBaseClass+'-status" />');b('label[for="'+this.element.attr("id")+'"]').attr("for",this.ids[0]).bind("click.selectmenu",function(){f.newelement[0].focus();return false});this.newelement.bind("mousedown.selectmenu",function(k){f._toggle(k,true);if(h.style=="popup"){f._safemouseup=false;setTimeout(function(){f._safemouseup=true},300)}return false}).bind("click.selectmenu",function(){return false}).bind("keydown.selectmenu",
function(k){var a=false;switch(k.keyCode){case b.ui.keyCode.ENTER:a=true;break;case b.ui.keyCode.SPACE:f._toggle(k);break;case b.ui.keyCode.UP:k.altKey?f.open(k):f._moveSelection(-1);break;case b.ui.keyCode.DOWN:k.altKey?f.open(k):f._moveSelection(1);break;case b.ui.keyCode.LEFT:f._moveSelection(-1);break;case b.ui.keyCode.RIGHT:f._moveSelection(1);break;case b.ui.keyCode.TAB:a=true;break;default:a=true;f._typeAhead(k.keyCode,"mouseup")}return a}).bind("mouseover.selectmenu focus.selectmenu",function(){h.disabled||
b(this).addClass(f.widgetBaseClass+"-focus ui-state-hover")}).bind("mouseout.selectmenu blur.selectmenu",function(){h.disabled||b(this).removeClass(f.widgetBaseClass+"-focus ui-state-hover")});b(document).bind("mousedown.selectmenu",function(k){f.close(k)});this.element.bind("click.selectmenu",function(){f._refreshValue()}).bind("focus.selectmenu",function(){this.newelement&&this.newelement[0].focus()});l=this.element.width();this.newelement.width(h.width?h.width:l);this.element.hide();this.list=
b('<ul class="'+f.widgetBaseClass+'-menu ui-widget ui-widget-content" aria-hidden="true" role="listbox" aria-labelledby="'+this.ids[0]+'" id="'+this.ids[1]+'"></ul>').appendTo("body");this.list.wrap(h.wrapperElement);this.list.bind("keydown.selectmenu",function(k){var a=false;switch(k.keyCode){case b.ui.keyCode.UP:k.altKey?f.close(k,true):f._moveFocus(-1);break;case b.ui.keyCode.DOWN:k.altKey?f.close(k,true):f._moveFocus(1);break;case b.ui.keyCode.LEFT:f._moveFocus(-1);break;case b.ui.keyCode.RIGHT:f._moveFocus(1);
break;case b.ui.keyCode.HOME:f._moveFocus(":first");break;case b.ui.keyCode.PAGE_UP:f._scrollPage("up");break;case b.ui.keyCode.PAGE_DOWN:f._scrollPage("down");break;case b.ui.keyCode.END:f._moveFocus(":last");break;case b.ui.keyCode.ENTER:case b.ui.keyCode.SPACE:f.close(k,true);b(k.target).parents("li:eq(0)").trigger("mouseup");break;case b.ui.keyCode.TAB:a=true;f.close(k,true);break;case b.ui.keyCode.ESCAPE:f.close(k,true);break;default:a=true;f._typeAhead(k.keyCode,"focus")}return a});b(window).bind("resize.selectmenu",
b.proxy(f._refreshPosition,this))},_init:function(){var f=this,h=this.options,l=[];this.element.find("option").each(function(){l.push({value:b(this).attr("value"),text:f._formatText(b(this).text()),selected:b(this).attr("selected"),classes:b(this).attr("class"),typeahead:b(this).attr("typeahead"),parentOptGroup:b(this).parent("optgroup").attr("label"),bgImage:h.bgImage.call(b(this))})});var k=f.options.style=="popup"?" ui-state-active":"";this.list.html("");for(var a=0;a<l.length;a++){var i=b('<li role="presentation"><a href="#" tabindex="-1" role="option" aria-selected="false"'+
(l[a].typeahead?' typeahead="'+l[a].typeahead+'"':"")+">"+l[a].text+"</a></li>").data("index",a).addClass(l[a].classes).data("optionClasses",l[a].classes||"").bind("mouseup.selectmenu",function(v){if(f._safemouseup){var y=b(this).data("index")!=f._selectedIndex();f.index(b(this).data("index"));f.select(v);y&&f.change(v);f.close(v,true)}return false}).bind("click.selectmenu",function(){return false}).bind("mouseover.selectmenu focus.selectmenu",function(){f._selectedOptionLi().addClass(k);f._focusedOptionLi().removeClass(f.widgetBaseClass+
"-item-focus ui-state-hover");b(this).removeClass("ui-state-active").addClass(f.widgetBaseClass+"-item-focus ui-state-hover")}).bind("mouseout.selectmenu blur.selectmenu",function(){b(this).is(f._selectedOptionLi().selector)&&b(this).addClass(k);b(this).removeClass(f.widgetBaseClass+"-item-focus ui-state-hover")});if(l[a].parentOptGroup){var n=f.widgetBaseClass+"-group-"+l[a].parentOptGroup.replace(/[^a-zA-Z0-9]/g,"");this.list.find("li."+n).size()?this.list.find("li."+n+":last ul").append(i):b('<li role="presentation" class="'+
f.widgetBaseClass+"-group "+n+'"><span class="'+f.widgetBaseClass+'-group-label">'+l[a].parentOptGroup+"</span><ul></ul></li>").appendTo(this.list).find("ul").append(i)}else i.appendTo(this.list);this.list.bind("mousedown.selectmenu mouseup.selectmenu",function(){return false});if(h.icons)for(var t in h.icons)if(i.is(h.icons[t].find)){i.data("optionClasses",l[a].classes+" "+f.widgetBaseClass+"-hasIcon").addClass(f.widgetBaseClass+"-hasIcon");n=h.icons[t].icon||"";i.find("a:eq(0)").prepend('<span class="'+
f.widgetBaseClass+"-item-icon ui-icon "+n+'"></span>');l[a].bgImage&&i.find("span").css("background-image",l[a].bgImage)}}a=h.style=="dropdown";this.newelement.toggleClass(f.widgetBaseClass+"-dropdown",a).toggleClass(f.widgetBaseClass+"-popup",!a);this.list.toggleClass(f.widgetBaseClass+"-menu-dropdown ui-corner-bottom",a).toggleClass(f.widgetBaseClass+"-menu-popup ui-corner-all",!a).find("li:first").toggleClass("ui-corner-top",!a).end().find("li:last").addClass("ui-corner-bottom");this.selectmenuIcon.toggleClass("ui-icon-triangle-1-s",
a).toggleClass("ui-icon-triangle-2-n-s",!a);if(h.transferClasses){a=this.element.attr("class")||"";this.newelement.add(this.list).addClass(a)}a=this.element.width();h.style=="dropdown"?this.list.width(h.menuWidth?h.menuWidth:h.width?h.width:a):this.list.width(h.menuWidth?h.menuWidth:h.width?h.width-h.handleWidth:a-h.handleWidth);if(h.maxHeight)h.maxHeight<this.list.height()&&this.list.height(h.maxHeight);else if(!h.format&&b(window).height()/3<this.list.height()){h.maxHeight=b(window).height()/3;
this.list.height(h.maxHeight)}this._optionLis=this.list.find("li:not(."+f.widgetBaseClass+"-group)");this.element.attr("disabled")===true&&this.disable();this.index(this._selectedIndex());window.setTimeout(function(){f._refreshPosition()},200)},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled").unbind(".selectmenu");b(window).unbind(".selectmenu");b(document).unbind(".selectmenu");
b("label[for="+this.newelement.attr("id")+"]").attr("for",this.element.attr("id")).unbind(".selectmenu");if(this.options.wrapperElement){this.newelement.find(this.options.wrapperElement).remove();this.list.find(this.options.wrapperElement).remove()}else{this.newelement.remove();this.list.remove()}this.element.show();b.Widget.prototype.destroy.apply(this,arguments)},_typeAhead:function(f,h){var l=this,k=false,a=String.fromCharCode(f);c=a.toLowerCase();if(l.options.typeAhead=="sequential"){window.clearTimeout("ui.selectmenu-"+
l.selectmenuId);var i=typeof l._prevChar=="undefined"?"":l._prevChar.join(""),n=function(t,v,y){k=true;b(t).trigger(h);typeof l._prevChar=="undefined"?l._prevChar=[y]:l._prevChar[l._prevChar.length]=y};this.list.find("li a").each(function(t){if(!k){var v=b(this).attr("typeahead")||b(this).text();if(v.indexOf(i+a)==0)n(this,t,a);else v.indexOf(i+c)==0&&n(this,t,c)}});window.setTimeout(function(t){t._prevChar=undefined},1E3,l)}else{if(!l._prevChar)l._prevChar=["",0];k=false;this.list.find("li a").each(function(t){if(!k){var v=
b(this).text();if(v.indexOf(a)==0||v.indexOf(c)==0)if(l._prevChar[0]==a){if(l._prevChar[1]<t){k=true;b(this).trigger(h);l._prevChar[1]=t}}else{k=true;b(this).trigger(h);l._prevChar[1]=t}}});this._prevChar[0]=a}},_uiHash:function(){var f=this.index();return{index:f,option:b("option",this.element).get(f),value:this.element[0].value}},open:function(f){if(this.newelement.attr("aria-disabled")!="true"){this._closeOthers(f);this.newelement.addClass("ui-state-active");this.options.wrapperElement?this.list.parent().appendTo("body"):
this.list.appendTo("body");this.list.addClass(this.widgetBaseClass+"-open").attr("aria-hidden",false).find("li:not(."+this.widgetBaseClass+"-group):eq("+this._selectedIndex()+") a")[0].focus();this.options.style=="dropdown"&&this.newelement.removeClass("ui-corner-all").addClass("ui-corner-top");this._refreshPosition();this._trigger("open",f,this._uiHash())}},close:function(f,h){if(this.newelement.is(".ui-state-active")){this.newelement.removeClass("ui-state-active");this.list.attr("aria-hidden",true).removeClass(this.widgetBaseClass+
"-open");this.options.style=="dropdown"&&this.newelement.removeClass("ui-corner-top").addClass("ui-corner-all");h&&this.newelement.focus();this._trigger("close",f,this._uiHash())}},change:function(f){this.element.trigger("change");this._trigger("change",f,this._uiHash())},select:function(f){this._trigger("select",f,this._uiHash())},_closeOthers:function(f){b("."+this.widgetBaseClass+".ui-state-active").not(this.newelement).each(function(){b(this).data("selectelement").selectmenu("close",f)});b("."+
this.widgetBaseClass+".ui-state-hover").trigger("mouseout")},_toggle:function(f,h){this.list.is("."+this.widgetBaseClass+"-open")?this.close(f,h):this.open(f)},_formatText:function(f){return this.options.format?this.options.format(f):f},_selectedIndex:function(){return this.element[0].selectedIndex},_selectedOptionLi:function(){return this._optionLis.eq(this._selectedIndex())},_focusedOptionLi:function(){return this.list.find("."+this.widgetBaseClass+"-item-focus")},_moveSelection:function(f){return this._optionLis.eq(parseInt(this._selectedOptionLi().data("index"),
10)+f).trigger("mouseup")},_moveFocus:function(f){f=isNaN(f)?parseInt(this._optionLis.filter(f).data("index"),10):parseInt(this._focusedOptionLi().data("index")||0,10)+f;if(f<0)f=0;if(f>this._optionLis.size()-1)f=this._optionLis.size()-1;var h=this.widgetBaseClass+"-item-"+Math.round(Math.random()*1E3);this._focusedOptionLi().find("a:eq(0)").attr("id","");this._optionLis.eq(f).find("a:eq(0)").attr("id",h).focus();this.list.attr("aria-activedescendant",h)},_scrollPage:function(f){var h=Math.floor(this.list.outerHeight()/
this.list.find("li:first").outerHeight());this._moveFocus(f=="up"?-h:h)},_setOption:function(f,h){this.options[f]=h;if(f=="disabled"){this.close();this.element.add(this.newelement).add(this.list)[h?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",h)}},index:function(f){if(arguments.length){this.element[0].selectedIndex=f;this._refreshValue()}else return this._selectedIndex()},value:function(f){if(arguments.length){this.element[0].value=
f;this._refreshValue()}else return this.element[0].value},_refreshValue:function(){var f=this.options.style=="popup"?" ui-state-active":"",h=this.widgetBaseClass+"-item-"+Math.round(Math.random()*1E3);this.list.find("."+this.widgetBaseClass+"-item-selected").removeClass(this.widgetBaseClass+"-item-selected"+f).find("a").attr("aria-selected","false").attr("id","");this._selectedOptionLi().addClass(this.widgetBaseClass+"-item-selected"+f).find("a").attr("aria-selected","true").attr("id",h);f=this.newelement.data("optionClasses")?
this.newelement.data("optionClasses"):"";var l=this._selectedOptionLi().data("optionClasses")?this._selectedOptionLi().data("optionClasses"):"";this.newelement.removeClass(f).data("optionClasses",l).addClass(l).find("."+this.widgetBaseClass+"-status").html(this._selectedOptionLi().find("a:eq(0)").html());this.list.attr("aria-activedescendant",h)},_refreshPosition:function(){var f=this.options;if(f.style=="popup"&&!f.positionOptions.offset){var h=this._selectedOptionLi();h="0 -"+(h.outerHeight()+h.offset().top-
this.list.offset().top)}this.list.css({zIndex:this.element.zIndex()}).position({of:f.positionOptions.of||this.newelement,my:f.positionOptions.my,at:f.positionOptions.at,offset:f.positionOptions.offset||h})}})})(jQuery);(function(b){function f(B,g,X,V){V={data:V||(g?g.data:{}),_wrap:g?g._wrap:null,tmpl:null,parent:g||null,nodes:[],calls:t,nest:v,wrap:y,html:s,update:o};B&&b.extend(V,B,{nodes:[],parent:g});if(X){V.tmpl=X;V._ctnt=V._ctnt||V.tmpl(b,V);V.key=++R;(ja.length?P:D)[R]=V}return V}function h(B,g,X){var V;X=X?b.map(X,function(ba){return typeof ba==="string"?B.key?ba.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+z+'="'+B.key+'" $2'):ba:h(ba,B,ba._ctnt)}):B;if(g)return X;X=X.join("");X.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,
function(ba,da,ka,sa){V=b(ka).get();n(V);if(da)V=l(da).concat(V);if(sa)V=V.concat(l(sa))});return V?V:l(X)}function l(B){var g=document.createElement("div");g.innerHTML=B;return b.makeArray(g.childNodes)}function k(B){return new Function("jQuery","$item","var $=jQuery,call,_=[],$data=$item.data;with($data){_.push('"+b.trim(B).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,
function(g,X,V,ba,da,ka,sa){g=b.tmpl.tag[V];if(!g)throw"Template command not found: "+V;V=g._default||[];if(ka&&!/\w$/.test(da)){da+=ka;ka=""}if(da){da=i(da);sa=sa?","+i(sa)+")":ka?")":"";sa=ka?da.indexOf(".")>-1?da+ka:"("+da+").call($item"+sa:da;ka=ka?sa:"(typeof("+da+")==='function'?("+da+").call($item):("+da+"))"}else ka=sa=V.$1||"null";ba=i(ba);return"');"+g[X?"close":"open"].split("$notnull_1").join(da?"typeof("+da+")!=='undefined' && ("+da+")!=null":"true").split("$1a").join(ka).split("$1").join(sa).split("$2").join(ba?
ba.replace(/\s*([^\(]+)\s*(\((.*?)\))?/g,function(xa,ya,na,la){return(la=la?","+la+")":na?")":"")?"("+ya+").call($item"+la:xa}):V.$2||"")+"_.push('"})+"');}return _;")}function a(B,g){B._wrap=h(B,true,b.isArray(g)?g:[I.test(g)?g:b(g).html()]).join("")}function i(B){return B?B.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function n(B){function g(ya){function na(Fa){Fa+=X;ca=da[Fa]=da[Fa]||f(ca,D[ca.parent.key+X]||ca.parent,null,true)}var la,oa=ya,ca,Ba;if(Ba=ya.getAttribute(z)){for(;oa.parentNode&&
(oa=oa.parentNode).nodeType===1&&!(la=oa.getAttribute(z)););if(la!==Ba){oa=oa.parentNode?oa.nodeType===11?0:oa.getAttribute(z)||0:0;if(!(ca=D[Ba])){ca=P[Ba];ca=f(ca,D[oa]||P[oa],null,true);ca.key=++R;D[R]=ca}T&&na(Ba)}ya.removeAttribute(z)}else if(T&&(ca=b.data(ya,"tmplItem"))){na(ca.key);D[ca.key]=ca;oa=(oa=b.data(ya.parentNode,"tmplItem"))?oa.key:0}if(ca){for(la=ca;la&&la.key!=oa;){la.nodes.push(ya);la=la.parent}delete ca._ctnt;delete ca._wrap;b.data(ya,"tmplItem",ca)}}var X="_"+T,V,ba,da={},ka,
sa,xa;ka=0;for(sa=B.length;ka<sa;ka++)if((V=B[ka]).nodeType===1){ba=V.getElementsByTagName("*");for(xa=ba.length-1;xa>=0;xa--)g(ba[xa]);g(V)}}function t(B,g,X,V){if(!B)return ja.pop();ja.push({_:B,tmpl:g,item:this,data:X,options:V})}function v(B,g,X){return b.tmpl(b.template(B),g,X,this)}function y(B,g){var X=B.options||{};X.wrapped=g;return b.tmpl(b.template(B.tmpl),B.data,X,B.item)}function s(B,g){var X=this._wrap;return b.map(b(b.isArray(X)?X.join(""):X).filter(B||"*"),function(V){if(g)V=V.innerText||
V.textContent;else{var ba;if(!(ba=V.outerHTML)){ba=document.createElement("div");ba.appendChild(V.cloneNode(true));ba=ba.innerHTML}V=ba}return V})}function o(){var B=this.nodes;b.tmpl(null,null,null,this).insertBefore(B[0]);b(B).remove()}var u=b.fn.domManip,z="_tmplitem",I=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,D={},P={},L,Q={key:0,data:{}},R=0,T=0,ja=[];b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(B,g){b.fn[B]=function(X){var V=
[];X=b(X);var ba,da,ka;ba=this.length===1&&this[0].parentNode;L=D||{};if(ba&&ba.nodeType===11&&ba.childNodes.length===1&&X.length===1){X[g](this[0]);V=this}else{da=0;for(ka=X.length;da<ka;da++){T=da;ba=(da>0?this.clone(true):this).get();b.fn[g].apply(b(X[da]),ba);V=V.concat(ba)}T=0;V=this.pushStack(V,B,X.selector)}X=L;L=null;b.tmpl.complete(X);return V}});b.fn.extend({tmpl:function(B,g,X){return b.tmpl(this[0],B,g,X)},tmplItem:function(){return b.tmplItem(this[0])},template:function(B){return b.template(B,
this[0])},domManip:function(B,g,X){if(B[0]&&B[0].nodeType){for(var V=b.makeArray(arguments),ba=B.length,da=0,ka;da<ba&&!(ka=b.data(B[da++],"tmplItem")););if(ba>1)V[0]=[b.makeArray(B)];if(ka&&T)V[2]=function(sa){b.tmpl.afterManip(this,sa,X)};u.apply(this,V)}else u.apply(this,arguments);T=0;!L&&b.tmpl.complete(D);return this}});b.extend({tmpl:function(B,g,X,V){var ba=!V;if(ba){V=Q;B=b.template[B]||b.template(null,B);P={}}else if(!B){B=V.tmpl;D[V.key]=V;V.nodes=[];V.wrapped&&a(V,V.wrapped);return b(h(V,
null,V.tmpl(b,V)))}if(!B)return[];if(typeof g==="function")g=g.call(V||{});X&&X.wrapped&&a(X,X.wrapped);g=b.isArray(g)?b.map(g,function(da){return da?f(X,V,B,da):null}):[f(X,V,B,g)];return ba?b(h(V,null,g)):g},tmplItem:function(B){var g;if(B instanceof b)B=B[0];for(;B&&B.nodeType===1&&!(g=b.data(B,"tmplItem"))&&(B=B.parentNode););return g||Q},template:function(B,g){if(g){if(typeof g==="string")g=k(g);else if(g instanceof b)g=g[0]||{};if(g.nodeType)g=b.data(g,"tmpl")||b.data(g,"tmpl",k(g.innerHTML));
return typeof B==="string"?b.template[B]=g:g}return B?typeof B!=="string"?b.template(null,B):b.template[B]||b.template(null,I.test(B)?B:b(B)):null},encode:function(B){return(""+B).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});b.extend(b.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){_=_.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(_,$1,$2);_=[];",close:"call=$item.calls();_=call._.concat($item.wrap(call,_));"},
each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){_.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){_.push($.encode($1a));}"},"!":{open:""}},complete:function(){D={}},afterManip:function(B,g,X){var V=g.nodeType===11?b.makeArray(g.childNodes):g.nodeType===1?[g]:[];X.call(B,g);n(V);T++}})})(jQuery);(function(b){b.marquee={version:"1.0.01"};b.fn.marquee=function(f){var h=typeof arguments[0]=="string"&&arguments[0],l=h&&Array.prototype.slice.call(arguments,1)||arguments,k=this.length==0?null:b.data(this[0],"marquee");if(k&&h&&this.length)if(h.toLowerCase()=="object")return k;else if(k[h]){var a;this.each(function(i){var n=b.data(this,"marquee")[h].apply(k,l);if(i==0&&n)if(n.jquery)a=b([]).add(n);else{a=n;return false}else if(n&&n.jquery)a=a.add(n)});return a||this}else return this;else return this.each(function(){new b.Marquee(this,
f)})};b.Marquee=function(f,h){function l(D){if(s.filter("."+h.cssShowing).length>0)return false;var P=s.eq(D).show();b.isFunction(h.beforeshow)&&h.beforeshow.apply(v,[y,P]);D={top:(h.yScroll=="top"?"-":"+")+P.outerHeight()+"px",left:0};y.data("marquee.showing",true);P.addClass(h.cssShowing);P.css(D).animate({top:"0px"},h.showSpeed,h.fxEasingShow,function(){b.isFunction(h.show)&&h.show.apply(v,[y,P]);y.data("marquee.showing",false);k(P)})}function k(D,P){if(z==true)return false;P=P||h.pauseSpeed;if(D.outerWidth()>
y.innerWidth())setTimeout(function(){if(z==true)return false;var L=D.outerWidth(),Q=(L-y.innerWidth())*-1,R=parseInt(D.css("left"),10);D.animate({left:Q+"px"},(L+R)*h.scrollSpeed,h.fxEasingScroll,function(){setTimeout(function(){a(D)},2E3)})},P);else s.length>1&&setTimeout(function(){if(z==true)return false;D.animate({top:(h.yScroll=="top"?"+":"-")+y.innerHeight()+"px"},h.showSpeed,h.fxEasingScroll);a(D)},P)}function a(D){b.isFunction(h.aftershow)&&h.aftershow.apply(v,[y,D]);D.removeClass(h.cssShowing);
D.fadeOut(200);t()}function i(){z=true;y.data("marquee.showing")!=true&&s.filter("."+h.cssShowing).dequeue().stop()}function n(){z=false;y.data("marquee.showing")!=true&&k(s.filter("."+h.cssShowing),1)}function t(){o++;if(o>=s.length){if(!isNaN(h.loop)&&h.loop>0&&++I>=h.loop)return false;o=0}l(o)}h=b.extend({},b.Marquee.defaults,h);var v=this,y=b(f),s=y.find("> li"),o=-1,u=false,z=false,I=0;b.data(y[0],"marquee",v);this.pause=function(){u=true;i()};this.resume=function(){u=false;n()};this.update=
function(){var D=s.length;s=y.find("> li");D<=1&&n()};h.pauseOnHover&&y.hover(function(){if(u)return false;i()},function(){if(u)return false;n()});b.isFunction(h.init)&&h.init.apply(v,[y,h]);t()};b.Marquee.defaults={yScroll:"top",showSpeed:850,scrollSpeed:12,pauseSpeed:5E3,pauseOnHover:true,loop:-1,fxEasingShow:"swing",fxEasingScroll:"linear",cssShowing:"marquee-showing",init:null,beforeshow:null,show:null,aftershow:null}})(jQuery);(function(b){b.extend(b.fn,{validate:function(f){if(this.length){var h=b.data(this[0],"validator");if(h)return h;h=new b.validator(f,this[0]);b.data(this[0],"validator",h);if(h.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){h.cancelSubmit=true});h.settings.submitHandler&&this.find("input, button").filter(":submit").click(function(){h.submitButton=this});this.submit(function(l){function k(){if(h.settings.submitHandler){if(h.submitButton)var a=b("<input type='hidden'/>").attr("name",
h.submitButton.name).val(h.submitButton.value).appendTo(h.currentForm);h.settings.submitHandler.call(h,h.currentForm);h.submitButton&&a.remove();return false}return true}h.settings.debug&&l.preventDefault();if(h.cancelSubmit){h.cancelSubmit=false;return k()}if(h.form()){if(h.pendingRequest){h.formSubmitted=true;return false}return k()}else{h.focusInvalid();return false}})}return h}else f&&f.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(b(this[0]).is("form"))return this.validate().form();
else{var f=true,h=b(this[0].form).validate();this.each(function(){f&=h.element(this)});return f}},removeAttrs:function(f){var h={},l=this;b.each(f.split(/\s/),function(k,a){h[a]=l.attr(a);l.removeAttr(a)});return h},rules:function(f,h){var l=this[0];if(f){var k=b.data(l.form,"validator").settings,a=k.rules,i=b.validator.staticRules(l);switch(f){case "add":b.extend(i,b.validator.normalizeRule(h));a[l.name]=i;if(h.messages)k.messages[l.name]=b.extend(k.messages[l.name],h.messages);break;case "remove":if(!h){delete a[l.name];
return i}var n={};b.each(h.split(/\s/),function(t,v){n[v]=i[v];delete i[v]});return n}}l=b.validator.normalizeRules(b.extend({},b.validator.metadataRules(l),b.validator.classRules(l),b.validator.attributeRules(l),b.validator.staticRules(l)),l);if(l.required){k=l.required;delete l.required;l=b.extend({required:k},l)}return l}});b.extend(b.expr[":"],{blank:function(f){return!b.trim(""+f.value)},filled:function(f){return!!b.trim(""+f.value)},unchecked:function(f){return!f.checked}});b.validator=function(f,
h){this.settings=b.extend(true,{},b.validator.defaults,f);this.currentForm=h;this.init()};b.validator.format=function(f,h){if(arguments.length==1)return function(){var l=b.makeArray(arguments);l.unshift(f);return b.validator.format.apply(this,l)};if(arguments.length>2&&h.constructor!=Array)h=b.makeArray(arguments).slice(1);if(h.constructor!=Array)h=[h];b.each(h,function(l,k){f=f.replace(RegExp("\\{"+l+"\\}","g"),k)});return f};b.extend(b.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",
validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:b([]),errorLabelContainer:b([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(f){this.lastActive=f;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,f,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(f)).hide()}},onfocusout:function(f){if(!this.checkable(f)&&(f.name in this.submitted||!this.optional(f)))this.element(f)},
onkeyup:function(f){if(f.name in this.submitted||f==this.lastElement)this.element(f)},onclick:function(f){if(f.name in this.submitted)this.element(f);else f.parentNode.name in this.submitted&&this.element(f.parentNode)},highlight:function(f,h,l){b(f).addClass(h).removeClass(l)},unhighlight:function(f,h,l){b(f).removeClass(h).addClass(l)}},setDefaults:function(f){b.extend(b.validator.defaults,f)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",
url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:b.validator.format("Please enter no more than {0} characters."),minlength:b.validator.format("Please enter at least {0} characters."),rangelength:b.validator.format("Please enter a value between {0} and {1} characters long."),
range:b.validator.format("Please enter a value between {0} and {1}."),max:b.validator.format("Please enter a value less than or equal to {0}."),min:b.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function f(k){var a=b.data(this[0].form,"validator");k="on"+k.type.replace(/^validate/,"");a.settings[k]&&a.settings[k].call(a,this[0])}this.labelContainer=b(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&
this.labelContainer||b(this.currentForm);this.containers=b(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var h=this.groups={};b.each(this.settings.groups,function(k,a){b.each(a.split(/\s/),function(i,n){h[n]=k})});var l=this.settings.rules;b.each(l,function(k,a){l[k]=b.validator.normalizeRule(a)});b(this.currentForm).validateDelegate(":text, :password, :file, select, textarea",
"focusin focusout keyup",f).validateDelegate(":radio, :checkbox, select, option","click",f);this.settings.invalidHandler&&b(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();b.extend(this.submitted,this.errorMap);this.invalid=b.extend({},this.errorMap);this.valid()||b(this.currentForm).triggerHandler("invalid-form",[this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var f=0,h=this.currentElements=this.elements();h[f];f++)this.check(h[f]);
return this.valid()},element:function(f){this.lastElement=f=this.clean(f);this.prepareElement(f);this.currentElements=b(f);var h=this.check(f);if(h)delete this.invalid[f.name];else this.invalid[f.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return h},showErrors:function(f){if(f){b.extend(this.errorMap,f);this.errorList=[];for(var h in f)this.errorList.push({message:f[h],element:this.findByName(h)[0]});this.successList=b.grep(this.successList,
function(l){return!(l.name in f)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){b.fn.resetForm&&b(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(f){var h=0,l;for(l in f)h++;return h},hideErrors:function(){this.addWrapper(this.toHide).hide()},
valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{b(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(f){}},findLastActive:function(){var f=this.lastActive;return f&&b.grep(this.errorList,function(h){return h.element.name==f.name}).length==1&&f},elements:function(){var f=this,h={};return b([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&
f.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in h||!f.objectLength(b(this).rules()))return false;return h[this.name]=true})},clean:function(f){return b(f)[0]},errors:function(){return b(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=b([]);this.toHide=b([]);this.currentElements=b([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},
prepareElement:function(f){this.reset();this.toHide=this.errorsFor(f)},check:function(f){f=this.clean(f);if(this.checkable(f))f=this.findByName(f.name).not(this.settings.ignore)[0];var h=b(f).rules(),l=false,k;for(k in h){var a={method:k,parameters:h[k]};try{var i=b.validator.methods[k].call(this,f.value.replace(/\r/g,""),f,a.parameters);if(i=="dependency-mismatch")l=true;else{l=false;if(i=="pending"){this.toHide=this.toHide.not(this.errorsFor(f));return}if(!i){this.formatAndAdd(f,a);return false}}}catch(n){this.settings.debug&&
window.console&&console.log("exception occured when checking element "+f.id+", check the '"+a.method+"' method",n);throw n;}}if(!l){this.objectLength(h)&&this.successList.push(f);return true}},customMetaMessage:function(f,h){if(b.metadata){var l=this.settings.meta?b(f).metadata()[this.settings.meta]:b(f).metadata();return l&&l.messages&&l.messages[h]}},customMessage:function(f,h){var l=this.settings.messages[f];return l&&(l.constructor==String?l:l[h])},findDefined:function(){for(var f=0;f<arguments.length;f++)if(arguments[f]!==
undefined)return arguments[f]},defaultMessage:function(f,h){return this.findDefined(this.customMessage(f.name,h),this.customMetaMessage(f,h),!this.settings.ignoreTitle&&f.title||undefined,b.validator.messages[h],"<strong>Warning: No message defined for "+f.name+"</strong>")},formatAndAdd:function(f,h){var l=this.defaultMessage(f,h.method),k=/\$?\{(\d+)\}/g;if(typeof l=="function")l=l.call(this,h.parameters,f);else if(k.test(l))l=jQuery.format(l.replace(k,"{$1}"),h.parameters);this.errorList.push({message:l,
element:f});this.errorMap[f.name]=l;this.submitted[f.name]=l},addWrapper:function(f){if(this.settings.wrapper)f=f.add(f.parent(this.settings.wrapper));return f},defaultShowErrors:function(){for(var f=0;this.errorList[f];f++){var h=this.errorList[f];this.settings.highlight&&this.settings.highlight.call(this,h.element,this.settings.errorClass,this.settings.validClass);this.showLabel(h.element,h.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(f=
0;this.successList[f];f++)this.showLabel(this.successList[f]);if(this.settings.unhighlight){f=0;for(h=this.validElements();h[f];f++)this.settings.unhighlight.call(this,h[f],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return b(this.errorList).map(function(){return this.element})},showLabel:function(f,
h){var l=this.errorsFor(f);if(l.length){l.removeClass().addClass(this.settings.errorClass);l.attr("generated")&&l.html(h)}else{l=b("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(f),generated:true}).addClass(this.settings.errorClass).html(h||"");if(this.settings.wrapper)l=l.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(l).length||(this.settings.errorPlacement?this.settings.errorPlacement(l,b(f)):l.insertAfter(f))}if(!h&&this.settings.success){l.text("");
typeof this.settings.success=="string"?l.addClass(this.settings.success):this.settings.success(l)}this.toShow=this.toShow.add(l)},errorsFor:function(f){var h=this.idOrName(f);return this.errors().filter(function(){return b(this).attr("for")==h})},idOrName:function(f){return this.groups[f.name]||(this.checkable(f)?f.name:f.id||f.name)},checkable:function(f){return/radio|checkbox/i.test(f.type)},findByName:function(f){var h=this.currentForm;return b(document.getElementsByName(f)).map(function(l,k){return k.form==
h&&k.name==f&&k||null})},getLength:function(f,h){switch(h.nodeName.toLowerCase()){case "select":return b("option:selected",h).length;case "input":if(this.checkable(h))return this.findByName(h.name).filter(":checked").length}return f.length},depend:function(f,h){return this.dependTypes[typeof f]?this.dependTypes[typeof f](f,h):true},dependTypes:{"boolean":function(f){return f},string:function(f,h){return!!b(f,h.form).length},"function":function(f,h){return f(h)}},optional:function(f){return!b.validator.methods.required.call(this,
b.trim(f.value),f)&&"dependency-mismatch"},startRequest:function(f){if(!this.pending[f.name]){this.pendingRequest++;this.pending[f.name]=true}},stopRequest:function(f,h){this.pendingRequest--;if(this.pendingRequest<0)this.pendingRequest=0;delete this.pending[f.name];if(h&&this.pendingRequest==0&&this.formSubmitted&&this.form()){b(this.currentForm).submit();this.formSubmitted=false}else if(!h&&this.pendingRequest==0&&this.formSubmitted){b(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=
false}},previousValue:function(f){return b.data(f,"previousValue")||b.data(f,"previousValue",{old:null,valid:true,message:this.defaultMessage(f,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(f,h){f.constructor==String?this.classRuleSettings[f]=h:b.extend(this.classRuleSettings,
f)},classRules:function(f){var h={};(f=b(f).attr("class"))&&b.each(f.split(" "),function(){this in b.validator.classRuleSettings&&b.extend(h,b.validator.classRuleSettings[this])});return h},attributeRules:function(f){var h={};f=b(f);for(var l in b.validator.methods){var k=f.attr(l);if(k)h[l]=k}h.maxlength&&/-1|2147483647|524288/.test(h.maxlength)&&delete h.maxlength;return h},metadataRules:function(f){if(!b.metadata)return{};var h=b.data(f.form,"validator").settings.meta;return h?b(f).metadata()[h]:
b(f).metadata()},staticRules:function(f){var h={},l=b.data(f.form,"validator");if(l.settings.rules)h=b.validator.normalizeRule(l.settings.rules[f.name])||{};return h},normalizeRules:function(f,h){b.each(f,function(l,k){if(k===false)delete f[l];else if(k.param||k.depends){var a=true;switch(typeof k.depends){case "string":a=!!b(k.depends,h.form).length;break;case "function":a=k.depends.call(h,h)}if(a)f[l]=k.param!==undefined?k.param:true;else delete f[l]}});b.each(f,function(l,k){f[l]=b.isFunction(k)?
k(h):k});b.each(["minlength","maxlength","min","max"],function(){if(f[this])f[this]=Number(f[this])});b.each(["rangelength","range"],function(){if(f[this])f[this]=[Number(f[this][0]),Number(f[this][1])]});if(b.validator.autoCreateRanges){if(f.min&&f.max){f.range=[f.min,f.max];delete f.min;delete f.max}if(f.minlength&&f.maxlength){f.rangelength=[f.minlength,f.maxlength];delete f.minlength;delete f.maxlength}}f.messages&&delete f.messages;return f},normalizeRule:function(f){if(typeof f=="string"){var h=
{};b.each(f.split(/\s/),function(){h[this]=true});f=h}return f},addMethod:function(f,h,l){b.validator.methods[f]=h;b.validator.messages[f]=l!=undefined?l:b.validator.messages[f];h.length<3&&b.validator.addClassRules(f,b.validator.normalizeRule(f))},methods:{required:function(f,h,l){if(!this.depend(l,h))return"dependency-mismatch";switch(h.nodeName.toLowerCase()){case "select":return(f=b(h).val())&&f.length>0;case "input":if(this.checkable(h))return this.getLength(f,h)>0;default:return b.trim(f).length>
0}},remote:function(f,h,l){if(this.optional(h))return"dependency-mismatch";var k=this.previousValue(h);this.settings.messages[h.name]||(this.settings.messages[h.name]={});k.originalMessage=this.settings.messages[h.name].remote;this.settings.messages[h.name].remote=k.message;l=typeof l=="string"&&{url:l}||l;if(this.pending[h.name])return"pending";if(k.old===f)return k.valid;k.old=f;var a=this;this.startRequest(h);var i={};i[h.name]=f;b.ajax(b.extend(true,{url:l,mode:"abort",port:"validate"+h.name,
dataType:"json",data:i,success:function(n){a.settings.messages[h.name].remote=k.originalMessage;var t=n===true;if(t){var v=a.formSubmitted;a.prepareElement(h);a.formSubmitted=v;a.successList.push(h);a.showErrors()}else{v={};n=n||a.defaultMessage(h,"remote");v[h.name]=k.message=b.isFunction(n)?n(f):n;a.showErrors(v)}k.valid=t;a.stopRequest(h,t)}},l));return"pending"},minlength:function(f,h,l){return this.optional(h)||this.getLength(b.trim(f),h)>=l},maxlength:function(f,h,l){return this.optional(h)||
this.getLength(b.trim(f),h)<=l},rangelength:function(f,h,l){f=this.getLength(b.trim(f),h);return this.optional(h)||f>=l[0]&&f<=l[1]},min:function(f,h,l){return this.optional(h)||f>=l},max:function(f,h,l){return this.optional(h)||f<=l},range:function(f,h,l){return this.optional(h)||f>=l[0]&&f<=l[1]},email:function(f,h){return this.optional(h)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(f)},
url:function(f,h){return this.optional(h)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(f)},
date:function(f,h){return this.optional(h)||!/Invalid|NaN/.test(new Date(f))},dateISO:function(f,h){return this.optional(h)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(f)},number:function(f,h){return this.optional(h)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(f)},digits:function(f,h){return this.optional(h)||/^\d+$/.test(f)},creditcard:function(f,h){if(this.optional(h))return"dependency-mismatch";if(/[^0-9-]+/.test(f))return false;var l=0,k=0,a=false;f=f.replace(/\D/g,"");for(var i=f.length-1;i>=
0;i--){k=f.charAt(i);k=parseInt(k,10);if(a)if((k*=2)>9)k-=9;l+=k;a=!a}return l%10==0},accept:function(f,h,l){l=typeof l=="string"?l.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(h)||f.match(RegExp(".("+l+")$","i"))},equalTo:function(f,h,l){l=b(l).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){b(h).valid()});return f==l.val()}}});b.format=b.validator.format})(jQuery);
(function(b){var f={};if(b.ajaxPrefilter)b.ajaxPrefilter(function(l,k,a){k=l.port;if(l.mode=="abort"){f[k]&&f[k].abort();f[k]=a}});else{var h=b.ajax;b.ajax=function(l){var k=("port"in l?l:b.ajaxSettings).port;if(("mode"in l?l:b.ajaxSettings).mode=="abort"){f[k]&&f[k].abort();return f[k]=h.apply(this,arguments)}return h.apply(this,arguments)}}})(jQuery);
(function(b){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&b.each({focus:"focusin",blur:"focusout"},function(f,h){function l(k){k=b.event.fix(k);k.type=h;return b.event.handle.call(this,k)}b.event.special[h]={setup:function(){this.addEventListener(f,l,true)},teardown:function(){this.removeEventListener(f,l,true)},handler:function(k){arguments[0]=b.event.fix(k);arguments[0].type=h;return b.event.handle.apply(this,arguments)}}});b.extend(b.fn,{validateDelegate:function(f,
h,l){return this.bind(h,function(k){var a=b(k.target);if(a.is(f))return l.apply(a,arguments)})}})})(jQuery);$(function(){window.language=$("#language").val();window.uid=$("#uid").val();var b=$("#tweets"),f=$("#twitterName").val();b.length>0&&$.getJSON("http://api.twitter.com/1/statuses/user_timeline.json?screen_name="+f+"&count=5&callback=?",function(k){var a="";$.each(k,function(i,n){var t;t=n.text;t=t.replace(/http:\/\/\S+/g,'<a href="$&" target="_blank">$&</a>');t=t.replace(/\s(@)(\w+)/g,' @<a href="http://twitter.com/$2" target="_blank">$2</a>');t=t.replace(/\s(#)(\w+)/g,' #<a href="http://search.twitter.com/search?q=%23$2" target="_blank">$2</a>');
a+='<li class="tweet">'+t+"</li>"});b.append(a).marquee({scrollSpeed:10})});var h=$("#email").val(),l=$("#password").val();$(".email, .textbox-email ,.password").focus(function(){$this=$(this);if($this.val()==h||$this.val()==l)$this.val("").addClass("active")});$(".email, .textbox-email, .password").blur(function(){var k=$(this);if(k.val()=="")k.attr("id")=="email"?k.val(h).removeClass("active"):k.val(l).removeClass("active")});$.getJSON("/json/statistics/usersamount",function(k){$("#users-amount").text(k.result)});
$.getJSON("/json/statistics/ridesamount",function(k){$("#rides-amount").text(k.result)});$("#back-top").click(function(k){k.preventDefault();window.scrollTo(0,0);return false});$("#video, a.video").click(function(k){k.preventDefault();var a=$('<div id="video-overlay"><a href="#" class="dialog-close"></a><h2>Miten GreenRiders toimii?</h2><iframe title="YouTube video player" class="youtube-player" type="text/html" width="600" height="368" src="http://www.youtube.com/embed/_UOtVajypE0?rel=0&amp;hd=1;autoplay=1" frameborder="0" style="display:block; margin-bottom:15px"></iframe></div>').appendTo("body");
a.dialog({modal:true,minHeight:370,minWidth:625,open:function(){var i=$(this);$(".dialog-close").click(function(n){n.preventDefault();i.dialog("close")})},close:function(){a.remove()}});return false})});function setCookie(b,f,h){var l=new Date;l.setDate(l.getDate()+h);document.cookie=b+"="+escape(f)+(h==null?"":";expires="+l.toUTCString())+";path=/"}
function setSecureAuthenticationCookies(b,f){var h=document.getElementById(b).value,l=document.getElementById(f).value;setCookie("email",h,365);setCookie("sessionId",l,365)}function setQuizCookie(){setCookie("quizAnswered",true,365)}function getCookie(b){var f,h,l,k=document.cookie.split(";");for(f=0;f<k.length;f++){h=k[f].substr(0,k[f].indexOf("="));l=k[f].substr(k[f].indexOf("=")+1);h=h.replace(/^\s+|\s+$/g,"");if(h==b)return unescape(l)}}
function quizCookieExists(){var b=getCookie("quizAnswered");return b!=null&&b!=""?true:false}function adjustColumnHeight(){$(".column-right").height($("#content").outerHeight())}function getUrlParameters(){var b={};window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(f,h,l){b[h]=l});return b}function getObjectSize(b){var f=0,h;for(h in b)f++;return f}function pad(b,f){for(var h=""+b;h.length<f;)h="0"+h;return h};$(function(){var b=getUrlParameters();$.validator.setDefaults({errorPlacement:function(l,k){var a=k.parent(".form-item"),i=k.outerWidth()-14,n=k.outerHeight()-14,t=k.position();l.appendTo(a).width(i).css({left:t.left,top:t.top+n+8}).hide().slideDown(300)}});$.validator.addMethod("stringEqual",function(l,k,a){return l==a},"Invitation token is wrong. Please check spelling!");$.validator.addMethod("address",function(l,k){return $(k).hasClass("valid-address")});$.validator.addMethod("emailDomain",function(l,
k,a){return l.split("@")[1]==$(a).find(":selected").attr("id")},"Email address has to match the company selected");$.validator.addMethod("phone",function(l){return/^\+(?:[0-9] ?){6,14}[0-9]$/.test(l)});$.validator.addMethod("time",function(l){return/^([0-1][0-9]|[2][0-3]):([0-5][0-9])$/.test(l)});$.validator.addMethod("dateFI",function(l,k){return this.optional(k)||/^(0[1-9]|[12][0-9]|3[01]|[1-9])\.(0[1-9]|1[012]|[1-9])\.(\d{4}|\d{2})$/.test(l)});var f=$("#signup").validate({rules:{joinFirstName:"required",
joinLastName:"required",joinPassword:{required:true,minlength:6},joinEmail:{required:true,email:true},joinGender:"required",joinPhoneNumber:{required:true,phone:true}}});$("#popup-form-ride").validate({ignore:":hidden",rules:{joinFirstName:"required",joinLastName:"required",joinPassword:{required:true,minlength:6},joinEmail:{required:true,email:true},joinGender:"required",joinPhoneNumber:{required:true,phone:true},rideType:"required",rideFrom:{required:true,address:true},rideTo:{required:true,address:true},
rideDate:{required:true,dateFI:true},rideTime:{required:true,time:true},rideSeats:"required"}});var h=$("#cleantech-signup").validate({rules:{joinFirstName:"required",joinLastName:"required",joinPassword:{required:true,minlength:6},joinEmail:{required:true,email:true,emailDomain:"#join_company"},joinInvitationToken:{required:true,stringEqual:"greenme"},joinGender:"required",joinAgeCheck:"required",joinPhoneNumber:{required:true,phone:true}}});if(b.error=="007")if(f)f.showErrors({joinEmail:$.validator.messages.emailalreadyinuse});
else h&&h.showErrors({joinEmail:$.validator.messages.emailalreadyinuse});$("#thankYouForm").validate({errorLabelContainer:"#thankYouForm #error-messages",errorClass:"normal-error",rules:{message:"required",toFirstName:"required",toLastName:"required",toEmail:{email:true},fromFirstName:"required",fromLastName:"required",fromEmail:{required:true,email:true}},messages:{message:"Viesti on pakollinen",toFirstName:"Kiitett\u00e4v\u00e4n etunimi on pakollinen",toLastName:"Kiitett\u00e4v\u00e4n sukunimi on pakollinen",
toEmail:"Anna kiitett\u00e4v\u00e4n oikea s\u00e4hk\u00f6postiosoite",fromFirstName:"Oma etunimi on pakollinen",fromLastName:"Oma sukunimi on pakollinen",fromEmail:"Anna oikea s\u00e4hk\u00f6postiosoiteesi"}})});$(function(){function b(D){$.each(D.results,function(P,L){var Q=L.from,R=L.to,T=L.startDate;t&&t.geocode({address:Q},function(ja,B){if(!(!B==google.maps.GeocoderStatus.OK||B==google.maps.GeocoderStatus.OVER_QUERY_LIMIT)){var g=ja[0].geometry.location,X=new google.maps.Marker({position:g,map:l,icon:"/images/map_marker_car.png"});bounds.extend(g);l.fitBounds(bounds);google.maps.event.addListener(X,"click",function(){var V=google.maps.event.addListener(l,"idle",function(){var da=$("#info-window");google.maps.event.removeListener(V);
if(da.is(":visible"))da.slideUp("500",function(){$("#from").text(Q);$("#to").text(R);$("#date").text(T);$("#close").attr("rel",P)}).slideDown("500");else{$("#from").text(Q);$("#to").text(R);$("#date").text(T);$("#close").attr("rel",P);da.slideDown("500")}}),ba=k.getProjection().fromLatLngToDivPixel(X.getPosition());ba=k.getProjection().fromDivPixelToLatLng(ba);l.panTo(ba)})}})})}function f(){t.geocode({address:n},function(D,P){if(P==google.maps.GeocoderStatus.OK){l.setCenter(D[0].geometry.location);
new google.maps.Marker({map:l,position:D[0].geometry.location});var L=D[0].geometry.location.lat(),Q=D[0].geometry.location.lng();$("#toLat").val(L);$("#toLon").val(Q);$("#fromLat").val(L);$("#fromLon").val(Q)}})}function h(){var D=new google.maps.LatLng(document.getElementById("fromLat").value,document.getElementById("fromLon").value),P=new google.maps.LatLng(document.getElementById("toLat").value,document.getElementById("toLon").value);y.route({origin:D,destination:P,travelMode:google.maps.DirectionsTravelMode.DRIVING},
function(L,Q){if(Q==google.maps.DirectionsStatus.OK){v.setDirections(L);v.setMap(l)}})}var l=null,k,a=$("#ride-map").length>0?true:false,i=$(".city-rides").length>0?true:false,n=$("#city").val(),t,v,y,s=$("#ride_from"),o=$("#ride_to"),u=$("#ride_date"),z=$("#ride_time");if(i){i=function(){var D={zoom:7,mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU,mapTypeIds:[google.maps.MapTypeId.ROADMAP,google.maps.MapTypeId.SATELLITE]}};l=new google.maps.Map(document.getElementById("ride-map"),
D);k=new google.maps.OverlayView;k.draw=function(){};k.setMap(l)};if(a){var I={address:n};i();$.ajax({url:"/json/rides/search",dataType:"json",success:b,data:I})}t=new google.maps.Geocoder;bounds=new google.maps.LatLngBounds;f();$("#map-loading").hide();if(a){paramsRequest={address:n,type:"request"};paramsOffer={address:n,type:"offer"};$.getJSON("/json/rides/search",paramsRequest,function(D){var P=D.results==null?[]:D.results,L=P.length;D=$("#ride_request_table");var Q=[];L>0?$.each(P,function(R,
T){Q.push('<tr id="'+R+'"><td><a href="'+T.rideLink+'"><span id="ride_date_field">'+T.startDate+'</span> <span id="ride_from">'+T.from+'</span><span class="arrow"></span><span id="ride_to">'+T.to+"</span></a></td></tr>")}):Q.push('<tr><td><div class="message warning">Kaupungista '+n+" ei l\u00f6ydy yht\u00e4\u00e4n kyytipyynt\u00f6\u00e4 t\u00e4ll\u00e4 hetkell\u00e4.</div></td></tr>");P=Q.join("");D.html(P).prev().remove()});$.getJSON("/json/rides/search",paramsOffer,function(D){var P=D.results==
null?[]:D.results,L=P.length;D=$("#ride_offer_table");var Q=[];L>0?$.each(P,function(R,T){Q.push('<tr id="'+R+'"><td><a href="'+T.rideLink+'"><span id="ride_date_field">'+T.startDate+'</span> <span id="ride_from">'+T.from+'</span><span class="arrow"></span><span id="ride_to">'+T.to+"</span></a></td></tr>")}):Q.push('<tr><td><div class="message warning">Kaupungista '+n+" ei l\u00f6ydy yht\u00e4\u00e4n kyytitarjousta t\u00e4ll\u00e4 hetkell\u00e4.</div></td></tr>");P=Q.join("");D.html(P).prev().remove()})}$(".add-ride").click(function(D){D.preventDefault();
t=new google.maps.Geocoder;v=new google.maps.DirectionsRenderer;y=new google.maps.DirectionsService;D=$("#festival-ride-overlay");var P=$(this);$("#ride_from, #ride_to").val("");o.removeClass("valid-address");s.removeClass("valid-address");P.attr("id")=="OFFER"?$("#ride_type_offer").attr("checked","checked"):$("#ride_type_request").attr("checked","checked");if(P.hasClass("to")){o.val(n);o.addClass("valid-address")}else if(P.hasClass("from")){s.val(n);s.addClass("valid-address")}D.dialog({modal:true,
minHeight:370,minWidth:800,close:function(){v.setMap(null)},open:function(){P=$(this);$("#dialog-close").click(function(Q){Q.preventDefault();P.dialog("close")});$("#popup-form-ride").validate().resetForm();$("#popup-add-ride").show();$(".popup-join-register").hide();var L=new google.maps.LatLng(60.1755556,24.9341667);L={zoom:7,mapTypeId:google.maps.MapTypeId.ROADMAP,center:L};l=new google.maps.Map(document.getElementById("popup-map"),L)},dialogClass:"popup-festari"});return false});$("#add-ride-button").click(function(D){D.preventDefault();
D=isNaN(window.uid);var P=window.uid==""?true:false;addRideForm=$("#popup-add-ride");registerJoinForm=$(".popup-join-register");popupRideForm=$("#popup-form-ride");if(isRideFormValid=popupRideForm.valid())!P&&!D?popupRideForm.submit():addRideForm.fadeOut(300,function(){registerJoinForm.fadeIn(300);$("#festival-ride-overlay").dialog("option","position","center")});return false});$(".location").autocomplete({minLength:2,search:function(){var D=$(this);if(D.attr("id")=="ride_from")s.removeClass("valid-address");
else D.attr("id")=="ride_to"&&o.removeClass("valid-address")},source:function(D,P){t.geocode({address:D.term},function(L){P($.map(L,function(Q){return{label:Q.formatted_address.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+$.ui.autocomplete.escapeRegex(D.term)+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>"),value:Q.formatted_address,latitude:Q.geometry.location.lat(),longitude:Q.geometry.location.lng(),option:this}}))})},select:function(D,P){var L=$(this);if(L.attr("id")=="ride_from"){$("#fromLat").val(P.item.latitude);
$("#fromLon").val(P.item.longitude);s.addClass("valid-address")}else if(L.attr("id")=="ride_to"){$("#toLat").val(P.item.latitude);$("#toLon").val(P.item.longitude);o.addClass("valid-address")}h()},close:function(){var D=$(this);if(D.attr("id")=="ride_from")$("#popup-form-ride").validate().element(s);else D.attr("id")=="ride_to"&&$("#popup-form-ride").validate().element(o)}});s.data("autocomplete")._renderItem=function(D,P){return $("<li></li>").data("item.autocomplete",P).append($("<a></a>").html(P.label)).appendTo(D)};
o.data("autocomplete")._renderItem=function(D,P){return $("<li></li>").data("item.autocomplete",P).append($("<a></a>").html(P.label)).appendTo(D)};u.datepicker({defaultDate:null,dateFormat:"dd.mm.yy",firstDay:1});u.datepicker("setDate",new Date);tempDate=(new Date).getTime()+108E5;newDate=new Date(tempDate);z.val(pad(newDate.getHours(),2)+":"+pad(newDate.getMinutes(),2))}});$(function(){function b(){var k=new google.maps.LatLng(document.getElementById("fromLat").value,document.getElementById("fromLon").value),a=new google.maps.LatLng(document.getElementById("toLat").value,document.getElementById("toLon").value);f.route({origin:k,destination:a,travelMode:google.maps.DirectionsTravelMode.DRIVING},function(i,n){n==google.maps.DirectionsStatus.OK&&directionsDisplay.setDirections(i)})}if($(".ride").length>0){var f=new google.maps.DirectionsService,h,l=function(){directionsDisplay=
new google.maps.DirectionsRenderer;var k=new google.maps.LatLng(60.1755556,24.9341667);k={zoom:7,mapTypeId:google.maps.MapTypeId.ROADMAP,center:k};h=new google.maps.Map(document.getElementById("ride-map"),k);directionsDisplay.setMap(h);b()};$("#ride-map").length>0&&l();jQuery.timeago.settings.allowFuture=true;$(".timeago").timeago()}});$(function(){function b(y){var s=y.results?y.results.length:0,o=y.resultsHasMore?y.resultsHasMore:false,u=y.resultsNextPageUrl?y.resultsNextPageUrl:"";if(y.status=="OK"&&s>0){$.each(y.results,function(z,I){I.type=I.type=="OFFER"?language=="fi"?"Tarjous":"Offer":language=="fi"?"Pyynt\u00f6":"Request";$("#searchItemTemplate").tmpl(I).appendTo(v)});y=$("#content").outerHeight();$(".search-column .content-inner").height(y);t.hide();if(o){i.attr("href",u);i.css("display","block").show()}else i.hide()}else{$("#no-results").show();
t.hide();i.hide()}i.removeClass("loading")}if($(".search").length>0){var f=getUrlParameters();getObjectSize(f);var h=$("#fromDate"),l=$("#toDate"),k=$("#from"),a=$("#to"),i=$("#more-results"),n=true,t=$("#search-loading"),v=$("#search-items");$("#calendar").datepicker({numberOfMonths:1,defaultDate:null,dateFormat:"dd.mm.yy",firstDay:1,minDate:"0",selectOtherMonths:true,showOtherMonths:true,beforeShowDay:customRange,onSelect:function(y){if(h.val()==""){h.val(y);l.val(y)}else if(h.val()==l.val())if(n){l.val(y);
n=true}else{h.val(y);l.val(y);n=false}else{h.val(y);l.val(y);n=true}}});$.ajax({url:"/json/rides/search",dataType:"json",beforeSend:function(){t.show()},data:f,success:b});$("#location-switch").click(function(y){y.preventDefault();y=k.val();var s=a.val();k.val(s);a.val(y);return false});i.click(function(y){y.preventDefault();$this=$(this).addClass("loading");$.ajax({url:$this.attr("href"),dataType:"json",success:b});return false});$(".radio, label",$("#type")).click(function(y){y.preventDefault();
$this=$(this);$this.parents("#type").find("a").removeClass("checked");y=$("input:radio[name=type]");$.each(y,function(){$(this).removeAttr("checked")});$this.hasClass("radio")?$this.addClass("checked"):$this.prev().addClass("checked");$this.siblings("input").attr("checked",true);return false});$("#location-switch").tipsy({gravity:"w",fade:true,delayIn:1E3})}});
function customRange(b){var f=$("#fromDate").val(),h=$("#toDate").val();b=dateWithin(f,h,b);return f!=""&&h!=""?b?[true,"date-range"]:[true,""]:[true]}function dateWithin(b,f,h){b=b.split(".");b=b[1]+"/"+b[0]+"/"+b[2];var l=f.split(".");l=l[1]+"/"+l[0]+"/"+l[2];f=Date.parse(b);b=Date.parse(l);h=Date.parse(h);if(h<=b&&h>=f)return true;return false};$(function(){function b(L){var Q="";Q=new Date;Q.setDate(Q.getDate()+L);return Q=pad(Q.getDate())+"."+pad(Q.getMonth()+1)+"."+Q.getFullYear()}function f(L,Q){var R="";R=L.split(".");R=new Date(R[1]+"/"+R[0]+"/"+R[2]);R.setDate(R.getDate()+Q);return R=pad(R.getDate())+"."+pad(R.getMonth()+1)+"."+R.getFullYear()}function h(L,Q){var R=L.split("."),T=R[2],ja=parseInt(l(R[1]))-1;R=parseInt(l(R[0]))+parseInt(Q);return new Date(T,ja,R)}function l(L){for(;L.substr(0,1)=="0"&&L.length>1;)L=L.substr(1,9999);
return L}function k(){var L=new google.maps.LatLng(document.getElementById("fromLat").value,document.getElementById("fromLon").value),Q=new google.maps.LatLng(document.getElementById("toLat").value,document.getElementById("toLon").value);n.route({origin:L,destination:Q,travelMode:google.maps.DirectionsTravelMode.DRIVING},function(R,T){if(T==google.maps.DirectionsStatus.OK){i.setDirections(R);i.setMap(map)}})}var a=$(".festival").length>0?true:false,i=new google.maps.DirectionsRenderer,n=new google.maps.DirectionsService;
if(a){var t=$("#event-id").val(),v=$("#event-address").val();a=$("#event-start-date").val();var y=$("#event-end-date").val(),s,o=b(-7),u=f(a,-2),z=f(y,2),I=$("#ride_from"),D=$("#ride_to");$.getJSON("/json/events?startDateFrom="+o,function(L){var Q=[],R=$("#festivals-select");$.each(L.results,function(T,ja){var B="";if(ja.id==t)B="selected='true'";Q.push("<option value='"+ja.eventUrl+"' "+B+">"+ja.eventName+"</option>")});R.html(Q.join(""));R.selectmenu({width:258,select:function(T,ja){window.location=
ja.value}})});o=function(){s=new google.maps.Geocoder;var L={center:new google.maps.LatLng(61.1712307,28.7679672),zoom:9,mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU,mapTypeIds:[google.maps.MapTypeId.ROADMAP,google.maps.MapTypeId.SATELLITE]}};map=new google.maps.Map(document.getElementById("festari-map"),L);overlay=new google.maps.OverlayView;overlay.draw=function(){};overlay.setMap(map);P()};var P=function(){s.geocode({address:v},
function(L,Q){if(Q==google.maps.GeocoderStatus.OK){map.setCenter(L[0].geometry.location);new google.maps.Marker({map:map,position:L[0].geometry.location});var R=L[0].geometry.location.lat(),T=L[0].geometry.location.lng();$("#toLat").val(R);$("#toLon").val(T);$("#fromLat").val(R);$("#fromLon").val(T)}})};if($("#festari-map").length>0){o();o=v.split(",");$.getJSON(encodeURI("/json/rides/search?to="+o[0]+"&startDateFrom="+u+"&startDateTo="+z),function(L){L=L.results?L.results:{};var Q=L.length,R=$("#ride_request_to_table"),
T=$("#ride_offer_to_table");Q>0&&$.each(L,function(ja,B){B.type=="OFFER"?$("#festivalItemTemplate").tmpl(B).appendTo(T):$("#festivalItemTemplate").tmpl(B).appendTo(R)});T.next().remove();R.next().remove();T.find("tr").live("click",function(){window.location=$(this).find("a").attr("href")});R.find("tr").live("click",function(){window.location=$(this).find("a").attr("href")})});$.getJSON(encodeURI("/json/rides/search?from="+o[0]+"&startDateFrom="+u+"&startDateTo="+z),function(L){L=L.results?L.results:
{};var Q=L.length,R=$("#ride_request_from_table"),T=$("#ride_offer_from_table");Q>0&&$.each(L,function(ja,B){B.type=="OFFER"?$("#festivalItemTemplate").tmpl(B).appendTo(T):$("#festivalItemTemplate").tmpl(B).appendTo(R)});T.next().remove();R.next().remove();T.find("tr").live("click",function(){window.location=$(this).find("a").attr("href")});R.find("tr").live("click",function(){window.location=$(this).find("a").attr("href")})})}$(".add-ride").click(function(L){L.preventDefault();L=$("#festival-ride-overlay");
var Q=$(this);$("#ride_from, #ride_to").val("");D.removeClass("valid-address");I.removeClass("valid-address");Q.attr("id")=="OFFER"?$("#ride_type_offer").attr("checked","checked"):$("#ride_type_request").attr("checked","checked");if(Q.hasClass("to")){$("#ride_to").val(v);D.addClass("valid-address")}else if(Q.hasClass("from")){$("#ride_from").val(v);I.addClass("valid-address")}L.dialog({modal:true,minHeight:370,minWidth:800,close:function(){i.setMap(null)},open:function(){Q=$(this);$("#dialog-close").click(function(T){T.preventDefault();
Q.dialog("close")});$("#popup-form-ride").validate().resetForm();$("#popup-add-ride").show();$(".popup-join-register").hide();var R=new google.maps.LatLng(60.1755556,24.9341667);R={zoom:7,mapTypeId:google.maps.MapTypeId.ROADMAP,center:R};map=new google.maps.Map(document.getElementById("popup-map"),R)},dialogClass:"popup-festari"});return false});$("#add-ride-button").click(function(L){L.preventDefault();L=isNaN(window.uid);var Q=window.uid==""?true:false;addRideForm=$("#popup-add-ride");registerJoinForm=
$(".popup-join-register");popupRideForm=$("#popup-form-ride");if(isRideFormValid=popupRideForm.valid())!Q&&!L?popupRideForm.submit():addRideForm.fadeOut(300,function(){registerJoinForm.fadeIn(300);$("#festival-ride-overlay").dialog("option","position","center")});return false});$(".location").autocomplete({minLength:2,search:function(){var L=$(this);if(L.attr("id")=="ride_from")I.removeClass("valid-address");else L.attr("id")=="ride_to"&&D.removeClass("valid-address")},source:function(L,Q){s.geocode({address:L.term},
function(R){Q($.map(R,function(T){return{label:T.formatted_address.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+$.ui.autocomplete.escapeRegex(L.term)+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>"),value:T.formatted_address,latitude:T.geometry.location.lat(),longitude:T.geometry.location.lng(),option:this}}))})},select:function(L,Q){var R=$(this);if(R.attr("id")=="ride_from"){$("#fromLat").val(Q.item.latitude);$("#fromLon").val(Q.item.longitude);I.addClass("valid-address")}else if(R.attr("id")==
"ride_to"){$("#toLat").val(Q.item.latitude);$("#toLon").val(Q.item.longitude);D.addClass("valid-address")}k()},close:function(){var L=$(this);if(L.attr("id")=="ride_from")$("#popup-form-ride").validate().element("#ride_from");else L.attr("id")=="ride_to"&&$("#popup-form-ride").validate().element("#ride_to")}});$("#ride_from").data("autocomplete")._renderItem=function(L,Q){return $("<li></li>").data("item.autocomplete",Q).append($("<a></a>").html(Q.label)).appendTo(L)};$("#ride_to").data("autocomplete")._renderItem=
function(L,Q){return $("<li></li>").data("item.autocomplete",Q).append($("<a></a>").html(Q.label)).appendTo(L)};$("#ride_date").datepicker({defaultDate:null,dateFormat:"dd.mm.yy",firstDay:1,minDate:h(a,-2),maxDate:h(y,2)})}});$(function(){if($(".groups-front").length>0){jQuery.timeago.settings.allowFuture=true;$("span.timeago").timeago();$(".ride-time").each(function(){var b=$(this),f=convertToTimezone(b.attr("title"));b.text(f.time);b.siblings(".ride-day").text(f.day)});$(".open-popup-register").click(function(b){b.preventDefault();$("#popup-register-overlay").dialog({modal:true,minHeight:370,minWidth:500,open:function(){$this=$(this);$("#dialog-close").click(function(f){f.preventDefault();$this.dialog("close")})},dialogClass:"popup-register"});
return false}).tipsy({gravity:"s"});adjustColumnHeight()}});function convertToTimezone(b){b=dateFromUTC(b,"-");return{day:padZero(b.getDate()),time:padZero(b.getHours())+":"+padZero(b.getMinutes())}}function dateFromUTC(b,f){var h=b.match(RegExp("(\\d{4})"+f+"(\\d{2})"+f+"(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})Z"));return new Date(Date.UTC(parseInt(h[1]),parseInt(h[2],10)-1,parseInt(h[3],10),parseInt(h[4],10),parseInt(h[5],10),parseInt(h[6],10),0))}function padZero(b){if(b<10)return"0"+b;return b};$(function(){function b(){var y=new google.maps.LatLng(document.getElementById("fromLat").value,document.getElementById("fromLon").value),s=new google.maps.LatLng(document.getElementById("toLat").value,document.getElementById("toLon").value);a.route({origin:y,destination:s,travelMode:google.maps.DirectionsTravelMode.DRIVING},function(o,u){if(u==google.maps.DirectionsStatus.OK){k.setDirections(o);k.setMap(map)}})}if($(".competition").length>0){var f=$("#competition-id").val(),h=getDate(-1),l,k,a,i=
$("#ride_from"),n=$("#ride_to"),t=$("#ride_date"),v=$("#ride_time");$.getJSON("/json/competitions?startDateFrom="+h,function(y){var s=[],o=$("#competitions-select");$.each(y.results,function(u,z){var I="";if(z.id==f)I="selected='true'";s.push("<option value='"+z.competitionUrl+"' "+I+">"+z.competitionName+"</option>")});o.html(s.join(""));o.selectmenu({width:258,select:function(u,z){window.location=z.value}})});adjustColumnHeight();$(".add-ride").click(function(y){y.preventDefault();l=new google.maps.Geocoder;
k=new google.maps.DirectionsRenderer;a=new google.maps.DirectionsService;y=$("#festival-ride-overlay");var s=$(this);$("#ride_from, #ride_to").val("");n.removeClass("valid-address");i.removeClass("valid-address");s.attr("id")=="OFFER"?$("#ride_type_offer").attr("checked","checked"):$("#ride_type_request").attr("checked","checked");if(s.hasClass("to")){$("#ride_to").val($eventAddress);n.addClass("valid-address")}else if(s.hasClass("from")){$("#ride_from").val($eventAddress);i.addClass("valid-address")}y.dialog({modal:true,
minHeight:370,minWidth:800,close:function(){k.setMap(null)},open:function(){s=$(this);$("#dialog-close").click(function(u){u.preventDefault();s.dialog("close")});$("#popup-form-ride").validate().resetForm();$("#popup-add-ride").show();$(".popup-join-register").hide();var o=new google.maps.LatLng(60.1755556,24.9341667);o={zoom:7,mapTypeId:google.maps.MapTypeId.ROADMAP,center:o};map=new google.maps.Map(document.getElementById("popup-map"),o)},dialogClass:"popup-festari"});return false});$("#add-ride-button").click(function(y){y.preventDefault();
y=isNaN(window.uid);var s=window.uid==""?true:false;addRideForm=$("#popup-add-ride");registerJoinForm=$(".popup-join-register");popupRideForm=$("#popup-form-ride");if(isRideFormValid=popupRideForm.valid())!s&&!y?popupRideForm.submit():addRideForm.fadeOut(300,function(){registerJoinForm.fadeIn(300);$("#festival-ride-overlay").dialog("option","position","center")});return false});$(".location").autocomplete({minLength:2,search:function(){var y=$(this);if(y.attr("id")=="ride_from")i.removeClass("valid-address");
else y.attr("id")=="ride_to"&&n.removeClass("valid-address")},source:function(y,s){l.geocode({address:y.term},function(o){s($.map(o,function(u){return{label:u.formatted_address.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+$.ui.autocomplete.escapeRegex(y.term)+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>"),value:u.formatted_address,latitude:u.geometry.location.lat(),longitude:u.geometry.location.lng(),option:this}}))})},select:function(y,s){var o=$(this);if(o.attr("id")=="ride_from"){$("#fromLat").val(s.item.latitude);
$("#fromLon").val(s.item.longitude);i.addClass("valid-address")}else if(o.attr("id")=="ride_to"){$("#toLat").val(s.item.latitude);$("#toLon").val(s.item.longitude);n.addClass("valid-address")}b()},close:function(){var y=$(this);if(y.attr("id")=="ride_from")$("#popup-form-ride").validate().element("#ride_from");else y.attr("id")=="ride_to"&&$("#popup-form-ride").validate().element("#ride_to")}});$("#ride_from").data("autocomplete")._renderItem=function(y,s){return $("<li></li>").data("item.autocomplete",
s).append($("<a></a>").html(s.label)).appendTo(y)};$("#ride_to").data("autocomplete")._renderItem=function(y,s){return $("<li></li>").data("item.autocomplete",s).append($("<a></a>").html(s.label)).appendTo(y)};t.datepicker({defaultDate:null,dateFormat:"dd.mm.yy",firstDay:1});t.datepicker("setDate",new Date);tempDate=(new Date).getTime()+108E5;newDate=new Date(tempDate);v.val(pad(newDate.getHours(),2)+":"+pad(newDate.getMinutes(),2))}});
function getDate(b){var f="";f=new Date;f.setDate(f.getDate()+b);return f=pad(f.getDate())+"."+pad(f.getMonth()+1)+"."+f.getFullYear()}function pad(b,f){for(var h=""+b;h.length<f;)h="0"+h;return h};$(function(){if($(".cleantech").length>0){adjustColumnHeight();var b=$("#join_company");$.getJSON("/greenriders/customer",function(f){var h=[];$.each(f.companies,function(l,k){h.push("<option id='"+k.domain+"' value='"+k.companyId+"'>"+k.company+"</option>")});b.html(h.join(""))});$("#join_company").change(function(){$("#join_email").val("@"+$(this).find(":selected").attr("id"))})}});
