(function(d,k){function m(b){return j.isWindow(b)?b:b.nodeType===9?b.defaultView||b.parentWindow:false}function e(b){if(!Ya[b]){var f=j("<"+b+">").appendTo("body"),l=f.css("display");f.remove();if(l==="none"||l==="")l="block";Ya[b]=l}return Ya[b]}function h(b,f){var l={};j.each(bb.concat.apply([],bb.slice(0,f)),function(){l[this]=b});return l}function a(){try{return new d.XMLHttpRequest}catch(b){}}function g(){j(d).unload(function(){for(var b in Ha)Ha[b](0,1)})}function o(b,f,l,n){if(j.isArray(f)&&
f.length)j.each(f,function(t,x){l||rb.test(b)?n(b,x):o(b+"["+(typeof x==="object"||j.isArray(x)?t:"")+"]",x,l,n)});else if(l||f==null||typeof f!=="object")n(b,f);else if(j.isArray(f)||j.isEmptyObject(f))n(b,"");else for(var q in f)o(b+"["+q+"]",f[q],l,n)}function s(b,f,l,n,q,t){q=q||f.dataTypes[0];t=t||{};t[q]=true;q=b[q];for(var x=0,H=q?q.length:0,F=b===Za,D;x<H&&(F||!D);x++){D=q[x](f,l,n);typeof D==="string"&&(!F||t[D]?D=k:(f.dataTypes.unshift(D),D=s(b,f,l,n,D,t)))}(F||!D)&&!t["*"]&&(D=s(b,f,l,
n,"*",t));return D}function w(b){return function(f,l){typeof f!=="string"&&(l=f,f="*");if(j.isFunction(l))for(var n=f.toLowerCase().split(cb),q=0,t=n.length,x,H;q<t;q++){x=n[q];(H=/^\+/.test(x))&&(x=x.substr(1)||"*");x=b[x]=b[x]||[];x[H?"unshift":"push"](l)}}}function B(b,f,l){var n=f==="width"?b.offsetWidth:b.offsetHeight;if(l==="border")return n;j.each(f==="width"?sb:tb,function(){l||(n-=parseFloat(j.css(b,"padding"+this))||0);l==="margin"?n+=parseFloat(j.css(b,"margin"+this))||0:n-=parseFloat(j.css(b,
"border"+this+"Width"))||0});return n}function u(b,f){f.src?j.ajax({url:f.src,async:false,dataType:"script"}):j.globalEval(f.text||f.textContent||f.innerHTML||"");f.parentNode&&f.parentNode.removeChild(f)}function p(b){return"getElementsByTagName"in b?b.getElementsByTagName("*"):"querySelectorAll"in b?b.querySelectorAll("*"):[]}function v(b,f){if(f.nodeType===1){var l=f.nodeName.toLowerCase();f.clearAttributes();f.mergeAttributes(b);if(l==="object")f.outerHTML=b.outerHTML;else if(l!=="input"||b.type!==
"checkbox"&&b.type!=="radio")if(l==="option")f.selected=b.defaultSelected;else{if(l==="input"||l==="textarea")f.defaultValue=b.defaultValue}else{b.checked&&(f.defaultChecked=f.checked=b.checked);f.value!==b.value&&(f.value=b.value)}f.removeAttribute(j.expando)}}function C(b,f){if(f.nodeType===1&&j.hasData(b)){var l=j.expando,n=j.data(b),q=j.data(f,n);if(n=n[l]){var t=n.events;q=q[l]=j.extend({},n);if(t){delete q.handle;q.events={};for(var x in t){l=0;for(n=t[x].length;l<n;l++)j.event.add(f,x+(t[x][l].namespace?
".":"")+t[x][l].namespace,t[x][l],t[x][l].data)}}}}}function z(b,f,l){if(j.isFunction(f))return j.grep(b,function(q,t){return!!f.call(q,t,q)===l});if(f.nodeType)return j.grep(b,function(q){return q===f===l});if(typeof f==="string"){var n=j.grep(b,function(q){return q.nodeType===1});if(ub.test(f))return j.filter(f,n,!l);f=j.filter(f,n)}return j.grep(b,function(q){return j.inArray(q,f)>=0===l})}function K(b,f){return(b&&b!=="*"?b+".":"")+f.replace(ja,"`").replace(Qa,"&")}function L(b){var f,l,n,q,t,
x,H,F,D,O,U,da=[];q=[];t=j._data(this,"events");if(b.liveFired!==this&&t&&t.live&&!b.target.disabled&&(!b.button||b.type!=="click")){b.namespace&&(U=RegExp("(^|\\.)"+b.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)"));b.liveFired=this;var Z=t.live.slice(0);for(H=0;H<Z.length;H++){t=Z[H];t.origType.replace(qa,"")===b.type?q.push(t.selector):Z.splice(H--,1)}q=j(b.target).closest(q,b.currentTarget);F=0;for(D=q.length;F<D;F++){O=q[F];for(H=0;H<Z.length;H++){t=Z[H];if(O.selector===t.selector&&(!U||
U.test(t.namespace))&&!O.elem.disabled){x=O.elem;n=null;if(t.preType==="mouseenter"||t.preType==="mouseleave"){b.type=t.preType;n=j(b.relatedTarget).closest(t.selector)[0]}(!n||n!==x)&&da.push({elem:x,handleObj:t,level:O.level})}}}F=0;for(D=da.length;F<D;F++){q=da[F];if(l&&q.level>l)break;b.currentTarget=q.elem;b.data=q.handleObj.data;b.handleObj=q.handleObj;U=q.handleObj.origHandler.apply(q.elem,arguments);if(U===false||b.isPropagationStopped()){l=q.level;U===false&&(f=false);if(b.isImmediatePropagationStopped())break}}return f}}
function V(b,f,l){var n=j.extend({},l[0]);n.type=b;n.originalEvent={};n.liveFired=k;j.event.handle.call(f,n);n.isDefaultPrevented()&&l[0].preventDefault()}function R(){return true}function X(){return false}function Y(b){for(var f in b)if(f!=="toJSON")return false;return true}function ga(b,f,l){if(l===k&&b.nodeType===1){l=b.getAttribute("data-"+f);if(typeof l==="string"){try{l=l==="true"?true:l==="false"?false:l==="null"?null:j.isNaN(l)?ca.test(l)?j.parseJSON(l):l:parseFloat(l)}catch(n){}j.data(b,
f,l)}else l=k}return l}var P=d.document,j=function(){function b(){if(!f.isReady){try{P.documentElement.doScroll("left")}catch(y){setTimeout(b,1);return}f.ready()}}var f=function(y,I){return new f.fn.init(y,I,q)},l=d.jQuery,n=d.$,q,t=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,x=/\S/,H=/^\s+/,F=/\s+$/,D=/\d/,O=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,U=/^[\],:{}\s]*$/,da=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,Z=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,fa=/(?:^|:|,)(?:\s*\[)+/g,na=/(webkit)[ \/]([\w.]+)/,
ia=/(opera)(?:.*version)?[ \/]([\w.]+)/,oa=/(msie) ([\w.]+)/,ta=/(mozilla)(?:.*? rv:([\w.]+))?/,r=navigator.userAgent,A=false,J,E="then done fail isResolved isRejected promise".split(" "),G,M=Object.prototype.toString,T=Object.prototype.hasOwnProperty,S=Array.prototype.push,aa=Array.prototype.slice,la=String.prototype.trim,ka=Array.prototype.indexOf,pa={};f.fn=f.prototype={constructor:f,init:function(y,I,N){var Q,W;if(!y)return this;if(y.nodeType){this.context=this[0]=y;this.length=1;return this}if(y===
"body"&&!I&&P.body){this.context=P;this[0]=P.body;this.selector="body";this.length=1;return this}if(typeof y==="string"){Q=t.exec(y);if(!Q||!Q[1]&&I)return!I||I.jquery?(I||N).find(y):this.constructor(I).find(y);if(Q[1]){W=(I=I instanceof f?I[0]:I)?I.ownerDocument||I:P;(N=O.exec(y))?f.isPlainObject(I)?(y=[P.createElement(N[1])],f.fn.attr.call(y,I,true)):y=[W.createElement(N[1])]:(N=f.buildFragment([Q[1]],[W]),y=(N.cacheable?f.clone(N.fragment):N.fragment).childNodes);return f.merge(this,y)}if((I=P.getElementById(Q[2]))&&
I.parentNode){if(I.id!==Q[2])return N.find(y);this.length=1;this[0]=I}this.context=P;this.selector=y;return this}if(f.isFunction(y))return N.ready(y);y.selector!==k&&(this.selector=y.selector,this.context=y.context);return f.makeArray(y,this)},selector:"",jquery:"1.5.1",length:0,size:function(){return this.length},toArray:function(){return aa.call(this,0)},get:function(y){return y==null?this.toArray():y<0?this[this.length+y]:this[y]},pushStack:function(y,I,N){var Q=this.constructor();f.isArray(y)?
S.apply(Q,y):f.merge(Q,y);Q.prevObject=this;Q.context=this.context;I==="find"?Q.selector=this.selector+(this.selector?" ":"")+N:I&&(Q.selector=this.selector+"."+I+"("+N+")");return Q},each:function(y,I){return f.each(this,y,I)},ready:function(y){f.bindReady();J.done(y);return this},eq:function(y){return y===-1?this.slice(y):this.slice(y,+y+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(aa.apply(this,arguments),"slice",aa.call(arguments).join(","))},
map:function(y){return this.pushStack(f.map(this,function(I,N){return y.call(I,N,I)}))},end:function(){return this.prevObject||this.constructor(null)},push:S,sort:[].sort,splice:[].splice};f.fn.init.prototype=f.fn;f.extend=f.fn.extend=function(){var y,I,N,Q,W,ba,ea=arguments[0]||{},ha=1,ra=arguments.length,va=false;typeof ea==="boolean"&&(va=ea,ea=arguments[1]||{},ha=2);typeof ea!=="object"&&!f.isFunction(ea)&&(ea={});for(ra===ha&&(ea=this,--ha);ha<ra;ha++)if((y=arguments[ha])!=null)for(I in y){N=
ea[I];Q=y[I];if(ea!==Q)va&&Q&&(f.isPlainObject(Q)||(W=f.isArray(Q)))?(W?(W=false,ba=N&&f.isArray(N)?N:[]):ba=N&&f.isPlainObject(N)?N:{},ea[I]=f.extend(va,ba,Q)):Q!==k&&(ea[I]=Q)}return ea};f.extend({noConflict:function(y){d.$=n;y&&(d.jQuery=l);return f},isReady:false,readyWait:1,ready:function(y){y===true&&f.readyWait--;if(!f.readyWait||y!==true&&!f.isReady){if(!P.body)return setTimeout(f.ready,1);f.isReady=true;if(!(y!==true&&--f.readyWait>0)){J.resolveWith(P,[f]);f.fn.trigger&&f(P).trigger("ready").unbind("ready")}}},
bindReady:function(){if(!A){A=true;if(P.readyState==="complete")return setTimeout(f.ready,1);if(P.addEventListener){P.addEventListener("DOMContentLoaded",G,false);d.addEventListener("load",f.ready,false)}else if(P.attachEvent){P.attachEvent("onreadystatechange",G);d.attachEvent("onload",f.ready);var y=false;try{y=d.frameElement==null}catch(I){}P.documentElement.doScroll&&y&&b()}}},isFunction:function(y){return f.type(y)==="function"},isArray:Array.isArray||function(y){return f.type(y)==="array"},
isWindow:function(y){return y&&typeof y==="object"&&"setInterval"in y},isNaN:function(y){return y==null||!D.test(y)||isNaN(y)},type:function(y){return y==null?String(y):pa[M.call(y)]||"object"},isPlainObject:function(y){if(!y||f.type(y)!=="object"||y.nodeType||f.isWindow(y))return false;if(y.constructor&&!T.call(y,"constructor")&&!T.call(y.constructor.prototype,"isPrototypeOf"))return false;for(var I in y);return I===k||T.call(y,I)},isEmptyObject:function(y){for(var I in y)return false;return true},
error:function(y){throw y;},parseJSON:function(y){if(typeof y!=="string"||!y)return null;y=f.trim(y);if(U.test(y.replace(da,"@").replace(Z,"]").replace(fa,"")))return d.JSON&&d.JSON.parse?d.JSON.parse(y):(new Function("return "+y))();f.error("Invalid JSON: "+y)},parseXML:function(y,I,N){d.DOMParser?(N=new DOMParser,I=N.parseFromString(y,"text/xml")):(I=new ActiveXObject("Microsoft.XMLDOM"),I.async="false",I.loadXML(y));N=I.documentElement;(!N||!N.nodeName||N.nodeName==="parsererror")&&f.error("Invalid XML: "+
y);return I},noop:function(){},globalEval:function(y){if(y&&x.test(y)){var I=P.head||P.getElementsByTagName("head")[0]||P.documentElement,N=P.createElement("script");f.support.scriptEval()?N.appendChild(P.createTextNode(y)):N.text=y;I.insertBefore(N,I.firstChild);I.removeChild(N)}},nodeName:function(y,I){return y.nodeName&&y.nodeName.toUpperCase()===I.toUpperCase()},each:function(y,I,N){var Q,W=0,ba=y.length,ea=ba===k||f.isFunction(y);if(N)if(ea)for(Q in y){if(I.apply(y[Q],N)===false)break}else for(;W<
ba;){if(I.apply(y[W++],N)===false)break}else if(ea)for(Q in y){if(I.call(y[Q],Q,y[Q])===false)break}else for(N=y[0];W<ba&&I.call(N,W,N)!==false;N=y[++W]);return y},trim:la?function(y){return y==null?"":la.call(y)}:function(y){return y==null?"":(y+"").replace(H,"").replace(F,"")},makeArray:function(y,I){var N=I||[];if(y!=null){var Q=f.type(y);y.length==null||Q==="string"||Q==="function"||Q==="regexp"||f.isWindow(y)?S.call(N,y):f.merge(N,y)}return N},inArray:function(y,I){if(I.indexOf)return I.indexOf(y);
for(var N=0,Q=I.length;N<Q;N++)if(I[N]===y)return N;return-1},merge:function(y,I){var N=y.length,Q=0;if(typeof I.length==="number")for(var W=I.length;Q<W;Q++)y[N++]=I[Q];else for(;I[Q]!==k;)y[N++]=I[Q++];y.length=N;return y},grep:function(y,I,N){var Q=[],W;N=!!N;for(var ba=0,ea=y.length;ba<ea;ba++){W=!!I(y[ba],ba);N!==W&&Q.push(y[ba])}return Q},map:function(y,I,N){for(var Q=[],W,ba=0,ea=y.length;ba<ea;ba++){W=I(y[ba],ba,N);W!=null&&(Q[Q.length]=W)}return Q.concat.apply([],Q)},guid:1,proxy:function(y,
I,N){arguments.length===2&&(typeof I==="string"?(N=y,y=N[I],I=k):I&&!f.isFunction(I)&&(N=I,I=k));!I&&y&&(I=function(){return y.apply(N||this,arguments)});y&&(I.guid=y.guid=y.guid||I.guid||f.guid++);return I},access:function(y,I,N,Q,W,ba){var ea=y.length;if(typeof I==="object"){for(var ha in I)f.access(y,ha,I[ha],Q,W,N);return y}if(N!==k){Q=!ba&&Q&&f.isFunction(N);for(ha=0;ha<ea;ha++)W(y[ha],I,Q?N.call(y[ha],ha,W(y[ha],I)):N,ba);return y}return ea?W(y[0],I):k},now:function(){return(new Date).getTime()},
_Deferred:function(){var y=[],I,N,Q,W={done:function(){if(!Q){var ba=arguments,ea,ha,ra,va,wa;I&&(wa=I,I=0);ea=0;for(ha=ba.length;ea<ha;ea++){ra=ba[ea];va=f.type(ra);va==="array"?W.done.apply(W,ra):va==="function"&&y.push(ra)}wa&&W.resolveWith(wa[0],wa[1])}return this},resolveWith:function(ba,ea){if(!Q&&!I&&!N){N=1;try{for(;y[0];)y.shift().apply(ba,ea)}catch(ha){throw ha;}finally{I=[ba,ea];N=0}}return this},resolve:function(){W.resolveWith(f.isFunction(this.promise)?this.promise():this,arguments);
return this},isResolved:function(){return N||I},cancel:function(){Q=1;y=[];return this}};return W},Deferred:function(y){var I=f._Deferred(),N=f._Deferred(),Q;f.extend(I,{then:function(W,ba){I.done(W).fail(ba);return this},fail:N.done,rejectWith:N.resolveWith,reject:N.resolve,isRejected:N.isResolved,promise:function(W){if(W==null){if(Q)return Q;Q=W={}}for(var ba=E.length;ba--;)W[E[ba]]=I[E[ba]];return W}});I.done(N.cancel).fail(I.cancel);delete I.cancel;y&&y.call(I,I);return I},when:function(y){var I=
arguments.length,N=I<=1&&y&&f.isFunction(y.promise)?y:f.Deferred(),Q=N.promise();if(I>1){for(var W=aa.call(arguments,0),ba=I,ea=function(ha){return function(ra){W[ha]=arguments.length>1?aa.call(arguments,0):ra;--ba||N.resolveWith(Q,W)}};I--;)(y=W[I])&&f.isFunction(y.promise)?y.promise().then(ea(I),N.reject):--ba;ba||N.resolveWith(Q,W)}else N!==y&&N.resolve(y);return Q},uaMatch:function(y){y=y.toLowerCase();y=na.exec(y)||ia.exec(y)||oa.exec(y)||y.indexOf("compatible")<0&&ta.exec(y)||[];return{browser:y[1]||
"",version:y[2]||"0"}},sub:function(){function y(N,Q){return new y.fn.init(N,Q)}f.extend(true,y,this);y.superclass=this;y.fn=y.prototype=this();y.fn.constructor=y;y.subclass=this.subclass;y.fn.init=function N(N,Q){Q&&Q instanceof f&&!(Q instanceof y)&&(Q=y(Q));return f.fn.init.call(this,N,Q,I)};y.fn.init.prototype=y.fn;var I=y(P);return y},browser:{}});J=f._Deferred();f.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(y,I){pa["[object "+I+"]"]=I.toLowerCase()});r=
f.uaMatch(r);r.browser&&(f.browser[r.browser]=true,f.browser.version=r.version);f.browser.webkit&&(f.browser.safari=true);ka&&(f.inArray=function(y,I){return ka.call(I,y)});x.test("\u00a0")&&(H=/^[\s\xA0]+/,F=/[\s\xA0]+$/);q=f(P);P.addEventListener?G=function(){P.removeEventListener("DOMContentLoaded",G,false);f.ready()}:P.attachEvent&&(G=function(){P.readyState==="complete"&&(P.detachEvent("onreadystatechange",G),f.ready())});return f}();(function(){j.support={};var b=P.createElement("div");b.style.display=
"none";b.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=b.getElementsByTagName("*"),l=b.getElementsByTagName("a")[0],n=P.createElement("select"),q=n.appendChild(P.createElement("option")),t=b.getElementsByTagName("input")[0];if(f&&f.length&&l){j.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(l.getAttribute("style")),
hrefNormalized:l.getAttribute("href")==="/a",opacity:/^0.55$/.test(l.style.opacity),cssFloat:!!l.style.cssFloat,checkOn:t.value==="on",optSelected:q.selected,deleteExpando:true,optDisabled:false,checkClone:false,noCloneEvent:true,noCloneChecked:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};t.checked=true;j.support.noCloneChecked=t.cloneNode(true).checked;n.disabled=true;j.support.optDisabled=!q.disabled;var x=null;j.support.scriptEval=function(){if(x===
null){var F=P.documentElement,D=P.createElement("script"),O="script"+j.now();try{D.appendChild(P.createTextNode("window."+O+"=1;"))}catch(U){}F.insertBefore(D,F.firstChild);d[O]?(x=true,delete d[O]):x=false;F.removeChild(D)}return x};try{delete b.test}catch(H){j.support.deleteExpando=false}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function F(){j.support.noCloneEvent=false;b.detachEvent("onclick",F)}),b.cloneNode(true).fireEvent("onclick"));b=P.createElement("div");
b.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";f=P.createDocumentFragment();f.appendChild(b.firstChild);j.support.checkClone=f.cloneNode(true).cloneNode(true).lastChild.checked;j(function(){var F=P.createElement("div"),D=P.getElementsByTagName("body")[0];if(D){F.style.width=F.style.paddingLeft="1px";D.appendChild(F);j.boxModel=j.support.boxModel=F.offsetWidth===2;"zoom"in F.style&&(F.style.display="inline",F.style.zoom=1,j.support.inlineBlockNeedsLayout=F.offsetWidth===2,F.style.display=
"",F.innerHTML="<div style='width:4px;'></div>",j.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");j.support.reliableHiddenOffsets=O[0].offsetHeight===0;O[0].style.display="";O[1].style.display="none";j.support.reliableHiddenOffsets=j.support.reliableHiddenOffsets&&O[0].offsetHeight===0;F.innerHTML="";D.removeChild(F).style.display="none"}});f=function(F){var D=P.createElement("div");
F="on"+F;if(!D.attachEvent)return true;var O=F in D;O||(D.setAttribute(F,"return;"),O=typeof D[F]==="function");return O};j.support.submitBubbles=f("submit");j.support.changeBubbles=f("change");b=f=l=null}})();var ca=/^(?:\{.*\}|\[.*\])$/;j.extend({cache:{},uuid:0,expando:"jQuery"+(j.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(b){b=b.nodeType?j.cache[b[j.expando]]:b[j.expando];return!!b&&!Y(b)},data:function(b,
f,l,n){if(j.acceptData(b)){var q=j.expando,t=typeof f==="string",x=b.nodeType,H=x?j.cache:b,F=x?b[j.expando]:b[j.expando]&&j.expando;if(!((!F||n&&F&&!H[F][q])&&t&&l===k)){F||(x?b[j.expando]=F=++j.uuid:F=j.expando);H[F]||(H[F]={},x||(H[F].toJSON=j.noop));if(typeof f==="object"||typeof f==="function")n?H[F][q]=j.extend(H[F][q],f):H[F]=j.extend(H[F],f);b=H[F];n&&(b[q]||(b[q]={}),b=b[q]);l!==k&&(b[f]=l);if(f==="events"&&!b[f])return b[q]&&b[q].events;return t?b[f]:b}}},removeData:function(b,f,l){if(j.acceptData(b)){var n=
j.expando,q=b.nodeType,t=q?j.cache:b,x=q?b[j.expando]:j.expando;if(t[x]){if(f){var H=l?t[x][n]:t[x];if(H){delete H[f];if(!Y(H))return}}if(l){delete t[x][n];if(!Y(t[x]))return}f=t[x][n];j.support.deleteExpando||t!=d?delete t[x]:t[x]=null;f?(t[x]={},q||(t[x].toJSON=j.noop),t[x][n]=f):q&&(j.support.deleteExpando?delete b[j.expando]:b.removeAttribute?b.removeAttribute(j.expando):b[j.expando]=null)}}},_data:function(b,f,l){return j.data(b,f,l,true)},acceptData:function(b){if(b.nodeName){var f=j.noData[b.nodeName.toLowerCase()];
if(f)return f!==true&&b.getAttribute("classid")===f}return true}});j.fn.extend({data:function(b,f){var l=null;if(typeof b==="undefined"){if(this.length){l=j.data(this[0]);if(this[0].nodeType===1)for(var n=this[0].attributes,q,t=0,x=n.length;t<x;t++){q=n[t].name;q.indexOf("data-")===0&&(q=q.substr(5),ga(this[0],q,l[q]))}}return l}if(typeof b==="object")return this.each(function(){j.data(this,b)});var H=b.split(".");H[1]=H[1]?"."+H[1]:"";if(f===k){l=this.triggerHandler("getData"+H[1]+"!",[H[0]]);l===
k&&this.length&&(l=j.data(this[0],b),l=ga(this[0],b,l));return l===k&&H[1]?this.data(H[0]):l}return this.each(function(){var F=j(this),D=[H[0],f];F.triggerHandler("setData"+H[1]+"!",D);j.data(this,b,f);F.triggerHandler("changeData"+H[1]+"!",D)})},removeData:function(b){return this.each(function(){j.removeData(this,b)})}});j.extend({queue:function(b,f,l){if(b){f=(f||"fx")+"queue";var n=j._data(b,f);if(!l)return n||[];!n||j.isArray(l)?n=j._data(b,f,j.makeArray(l)):n.push(l);return n}},dequeue:function(b,
f){f=f||"fx";var l=j.queue(b,f),n=l.shift();n==="inprogress"&&(n=l.shift());n&&(f==="fx"&&l.unshift("inprogress"),n.call(b,function(){j.dequeue(b,f)}));l.length||j.removeData(b,f+"queue",true)}});j.fn.extend({queue:function(b,f){typeof b!=="string"&&(f=b,b="fx");if(f===k)return j.queue(this[0],b);return this.each(function(){var l=j.queue(this,b,f);b==="fx"&&l[0]!=="inprogress"&&j.dequeue(this,b)})},dequeue:function(b){return this.each(function(){j.dequeue(this,b)})},delay:function(b,f){b=j.fx?j.fx.speeds[b]||
b:b;f=f||"fx";return this.queue(f,function(){var l=this;setTimeout(function(){j.dequeue(l,f)},b)})},clearQueue:function(b){return this.queue(b||"fx",[])}});var xa=/[\n\t\r]/g,Ia=/\s+/,Na=/\r/g,Ba=/^(?:href|src|style)$/,Ra=/^(?:button|input)$/i,Ca=/^(?:button|input|object|select|textarea)$/i,Sa=/^a(?:rea)?$/i,ma=/^(?:radio|checkbox)$/i;j.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",
usemap:"useMap",frameborder:"frameBorder"};j.fn.extend({attr:function(b,f){return j.access(this,b,f,true,j.attr)},removeAttr:function(b){return this.each(function(){j.attr(this,b,"");this.nodeType===1&&this.removeAttribute(b)})},addClass:function(b){if(j.isFunction(b))return this.each(function(D){var O=j(this);O.addClass(b.call(this,D,O.attr("class")))});if(b&&typeof b==="string")for(var f=(b||"").split(Ia),l=0,n=this.length;l<n;l++){var q=this[l];if(q.nodeType===1)if(q.className){for(var t=" "+q.className+
" ",x=q.className,H=0,F=f.length;H<F;H++)t.indexOf(" "+f[H]+" ")<0&&(x+=" "+f[H]);q.className=j.trim(x)}else q.className=b}return this},removeClass:function(b){if(j.isFunction(b))return this.each(function(F){var D=j(this);D.removeClass(b.call(this,F,D.attr("class")))});if(b&&typeof b==="string"||b===k)for(var f=(b||"").split(Ia),l=0,n=this.length;l<n;l++){var q=this[l];if(q.nodeType===1&&q.className)if(b){for(var t=(" "+q.className+" ").replace(xa," "),x=0,H=f.length;x<H;x++)t=t.replace(" "+f[x]+
" "," ");q.className=j.trim(t)}else q.className=""}return this},toggleClass:function(b,f){var l=typeof b,n=typeof f==="boolean";if(j.isFunction(b))return this.each(function(q){var t=j(this);t.toggleClass(b.call(this,q,t.attr("class"),f),f)});return this.each(function(){if(l==="string")for(var q,t=0,x=j(this),H=f,F=b.split(Ia);q=F[t++];){H=n?H:!x.hasClass(q);x[H?"addClass":"removeClass"](q)}else if(l==="undefined"||l==="boolean"){this.className&&j._data(this,"__className__",this.className);this.className=
this.className||b===false?"":j._data(this,"__className__")||""}})},hasClass:function(b){b=" "+b+" ";for(var f=0,l=this.length;f<l;f++)if((" "+this[f].className+" ").replace(xa," ").indexOf(b)>-1)return true;return false},val:function(b){if(!arguments.length){var f=this[0];if(f){if(j.nodeName(f,"option")){var l=f.attributes.value;return!l||l.specified?f.value:f.text}if(j.nodeName(f,"select")){l=f.selectedIndex;var n=[],q=f.options;f=f.type==="select-one";if(l<0)return null;for(var t=f?l:0,x=f?l+1:
q.length;t<x;t++){var H=q[t];if(H.selected&&(j.support.optDisabled?!H.disabled:H.getAttribute("disabled")===null)&&(!H.parentNode.disabled||!j.nodeName(H.parentNode,"optgroup"))){b=j(H).val();if(f)return b;n.push(b)}}if(f&&!n.length&&q.length)return j(q[l]).val();return n}if(ma.test(f.type)&&!j.support.checkOn)return f.getAttribute("value")===null?"on":f.value;return(f.value||"").replace(Na,"")}return k}var F=j.isFunction(b);return this.each(function(D){var O=j(this),U=b;if(this.nodeType===1){F&&
(U=b.call(this,D,O.val()));U==null?U="":typeof U==="number"?U+="":j.isArray(U)&&(U=j.map(U,function(Z){return Z==null?"":Z+""}));if(j.isArray(U)&&ma.test(this.type))this.checked=j.inArray(O.val(),U)>=0;else if(j.nodeName(this,"select")){var da=j.makeArray(U);j("option",this).each(function(){this.selected=j.inArray(j(this).val(),da)>=0});da.length||(this.selectedIndex=-1)}else this.value=U}})}});j.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(b,
f,l,n){if(!b||b.nodeType===3||b.nodeType===8||b.nodeType===2)return k;if(n&&f in j.attrFn)return j(b)[f](l);n=b.nodeType!==1||!j.isXMLDoc(b);var q=l!==k;f=n&&j.props[f]||f;if(b.nodeType===1){var t=Ba.test(f);if((f in b||b[f]!==k)&&n&&!t){q&&(f==="type"&&Ra.test(b.nodeName)&&b.parentNode&&j.error("type property can't be changed"),l===null?b.nodeType===1&&b.removeAttribute(f):b[f]=l);if(j.nodeName(b,"form")&&b.getAttributeNode(f))return b.getAttributeNode(f).nodeValue;if(f==="tabIndex")return(f=b.getAttributeNode("tabIndex"))&&
f.specified?f.value:Ca.test(b.nodeName)||Sa.test(b.nodeName)&&b.href?0:k;return b[f]}if(!j.support.style&&n&&f==="style"){q&&(b.style.cssText=""+l);return b.style.cssText}q&&b.setAttribute(f,""+l);if(!b.attributes[f]&&b.hasAttribute&&!b.hasAttribute(f))return k;b=!j.support.hrefNormalized&&n&&t?b.getAttribute(f,2):b.getAttribute(f);return b===null?k:b}q&&(b[f]=l);return b[f]}});var qa=/\.(.*)$/,ua=/^(?:textarea|input|select)$/i,ja=/\./g,Qa=/ /g,Ta=/[^\w\s.|`]/g,Ja=function(b){return b.replace(Ta,
"\\$&")};j.event={add:function(b,f,l,n){if(b.nodeType!==3&&b.nodeType!==8){try{j.isWindow(b)&&b!==d&&!b.frameElement&&(b=d)}catch(q){}if(l===false)l=X;else if(!l)return;var t,x;l.handler&&(t=l,l=t.handler);l.guid||(l.guid=j.guid++);if(x=j._data(b)){var H=x.events,F=x.handle;H||(x.events=H={});F||(x.handle=F=function(){return typeof j!=="undefined"&&!j.event.triggered?j.event.handle.apply(F.elem,arguments):k});F.elem=b;f=f.split(" ");for(var D,O=0,U;D=f[O++];){x=t?j.extend({},t):{handler:l,data:n};
D.indexOf(".")>-1?(U=D.split("."),D=U.shift(),x.namespace=U.slice(0).sort().join(".")):(U=[],x.namespace="");x.type=D;x.guid||(x.guid=l.guid);var da=H[D],Z=j.event.special[D]||{};if(!da){da=H[D]=[];if(!Z.setup||Z.setup.call(b,n,U,F)===false)b.addEventListener?b.addEventListener(D,F,false):b.attachEvent&&b.attachEvent("on"+D,F)}Z.add&&(Z.add.call(b,x),x.handler.guid||(x.handler.guid=l.guid));da.push(x);j.event.global[D]=true}b=null}}},global:{},remove:function(b,f,l,n){if(b.nodeType!==3&&b.nodeType!==
8){l===false&&(l=X);var q,t,x=0,H,F,D,O,U,da,Z=j.hasData(b)&&j._data(b),fa=Z&&Z.events;if(Z&&fa){f&&f.type&&(l=f.handler,f=f.type);if(!f||typeof f==="string"&&f.charAt(0)==="."){f=f||"";for(q in fa)j.event.remove(b,q+f)}else{for(f=f.split(" ");q=f[x++];){O=q;H=q.indexOf(".")<0;F=[];H||(F=q.split("."),q=F.shift(),D=RegExp("(^|\\.)"+j.map(F.slice(0).sort(),Ja).join("\\.(?:.*\\.)?")+"(\\.|$)"));if(U=fa[q])if(l){O=j.event.special[q]||{};for(t=n||0;t<U.length;t++){da=U[t];if(l.guid===da.guid){if(H||D.test(da.namespace)){n==
null&&U.splice(t--,1);O.remove&&O.remove.call(b,da)}if(n!=null)break}}if(U.length===0||n!=null&&U.length===1){(!O.teardown||O.teardown.call(b,F)===false)&&j.removeEvent(b,q,Z.handle);delete fa[q]}}else for(t=0;t<U.length;t++){da=U[t];if(H||D.test(da.namespace)){j.event.remove(b,O,da.handler,t);U.splice(t--,1)}}}if(j.isEmptyObject(fa)){(f=Z.handle)&&(f.elem=null);delete Z.events;delete Z.handle;j.isEmptyObject(Z)&&j.removeData(b,k,true)}}}}},trigger:function(b,f,l,n){var q=b.type||b;if(!n){b=typeof b===
"object"?b[j.expando]?b:j.extend(j.Event(q),b):j.Event(q);q.indexOf("!")>=0&&(b.type=q=q.slice(0,-1),b.exclusive=true);l||(b.stopPropagation(),j.event.global[q]&&j.each(j.cache,function(){var U=this[j.expando];U&&U.events&&U.events[q]&&j.event.trigger(b,f,U.handle.elem)}));if(!l||l.nodeType===3||l.nodeType===8)return k;b.result=k;b.target=l;f=j.makeArray(f);f.unshift(b)}b.currentTarget=l;(n=j._data(l,"handle"))&&n.apply(l,f);n=l.parentNode||l.ownerDocument;try{l&&l.nodeName&&j.noData[l.nodeName.toLowerCase()]||
l["on"+q]&&l["on"+q].apply(l,f)===false&&(b.result=false,b.preventDefault())}catch(t){}if(!b.isPropagationStopped()&&n)j.event.trigger(b,f,n,true);else if(!b.isDefaultPrevented()){var x;n=b.target;var H=q.replace(qa,""),F=j.nodeName(n,"a")&&H==="click",D=j.event.special[H]||{};if((!D._default||D._default.call(l,b)===false)&&!F&&!(n&&n.nodeName&&j.noData[n.nodeName.toLowerCase()])){try{n[H]&&(x=n["on"+H],x&&(n["on"+H]=null),j.event.triggered=true,n[H]())}catch(O){}x&&(n["on"+H]=x);j.event.triggered=
false}}},handle:function(b){var f,l,n,q;q=[];var t=j.makeArray(arguments);b=t[0]=j.event.fix(b||d.event);b.currentTarget=this;(f=b.type.indexOf(".")<0&&!b.exclusive)||(l=b.type.split("."),b.type=l.shift(),q=l.slice(0).sort(),n=RegExp("(^|\\.)"+q.join("\\.(?:.*\\.)?")+"(\\.|$)"));b.namespace=b.namespace||q.join(".");q=j._data(this,"events");l=(q||{})[b.type];if(q&&l){l=l.slice(0);q=0;for(var x=l.length;q<x;q++){var H=l[q];if(f||n.test(H.namespace)){b.handler=H.handler;b.data=H.data;b.handleObj=H;H=
H.handler.apply(this,t);H!==k&&(b.result=H,H===false&&(b.preventDefault(),b.stopPropagation()));if(b.isImmediatePropagationStopped())break}}}return b.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(b){if(b[j.expando])return b;
var f=b;b=j.Event(f);for(var l=this.props.length,n;l;){n=this.props[--l];b[n]=f[n]}b.target||(b.target=b.srcElement||P);b.target.nodeType===3&&(b.target=b.target.parentNode);!b.relatedTarget&&b.fromElement&&(b.relatedTarget=b.fromElement===b.target?b.toElement:b.fromElement);if(b.pageX==null&&b.clientX!=null){f=P.documentElement;l=P.body;b.pageX=b.clientX+(f&&f.scrollLeft||l&&l.scrollLeft||0)-(f&&f.clientLeft||l&&l.clientLeft||0);b.pageY=b.clientY+(f&&f.scrollTop||l&&l.scrollTop||0)-(f&&f.clientTop||
l&&l.clientTop||0)}b.which==null&&(b.charCode!=null||b.keyCode!=null)&&(b.which=b.charCode!=null?b.charCode:b.keyCode);!b.metaKey&&b.ctrlKey&&(b.metaKey=b.ctrlKey);!b.which&&b.button!==k&&(b.which=b.button&1?1:b.button&2?3:b.button&4?2:0);return b},guid:1E8,proxy:j.proxy,special:{ready:{setup:j.bindReady,teardown:j.noop},live:{add:function(b){j.event.add(this,K(b.origType,b.selector),j.extend({},b,{handler:L,guid:b.handler.guid}))},remove:function(b){j.event.remove(this,K(b.origType,b.selector),b)}},
beforeunload:{setup:function(b,f,l){j.isWindow(this)&&(this.onbeforeunload=l)},teardown:function(b,f){this.onbeforeunload===f&&(this.onbeforeunload=null)}}}};j.removeEvent=P.removeEventListener?function(b,f,l){b.removeEventListener&&b.removeEventListener(f,l,false)}:function(b,f,l){b.detachEvent&&b.detachEvent("on"+f,l)};j.Event=function(b){if(!this.preventDefault)return new j.Event(b);b&&b.type?(this.originalEvent=b,this.type=b.type,this.isDefaultPrevented=b.defaultPrevented||b.returnValue===false||
b.getPreventDefault&&b.getPreventDefault()?R:X):this.type=b;this.timeStamp=j.now();this[j.expando]=true};j.Event.prototype={preventDefault:function(){this.isDefaultPrevented=R;var b=this.originalEvent;b&&(b.preventDefault?b.preventDefault():b.returnValue=false)},stopPropagation:function(){this.isPropagationStopped=R;var b=this.originalEvent;b&&(b.stopPropagation&&b.stopPropagation(),b.cancelBubble=true)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=R;this.stopPropagation()},
isDefaultPrevented:X,isPropagationStopped:X,isImmediatePropagationStopped:X};var ya=function(b){var f=b.relatedTarget;try{if(!(f!==P&&!f.parentNode)){for(;f&&f!==this;)f=f.parentNode;f!==this&&(b.type=b.data,j.event.handle.apply(this,arguments))}}catch(l){}},Ka=function(b){b.type=b.data;j.event.handle.apply(this,arguments)};j.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(b,f){j.event.special[b]={setup:function(l){j.event.add(this,f,l&&l.selector?Ka:ya,b)},teardown:function(l){j.event.remove(this,
f,l&&l.selector?Ka:ya)}}});j.support.submitBubbles||(j.event.special.submit={setup:function(){if(this.nodeName&&this.nodeName.toLowerCase()!=="form"){j.event.add(this,"click.specialSubmit",function(b){var f=b.target,l=f.type;(l==="submit"||l==="image")&&j(f).closest("form").length&&V("submit",this,arguments)});j.event.add(this,"keypress.specialSubmit",function(b){var f=b.target,l=f.type;(l==="text"||l==="password")&&j(f).closest("form").length&&b.keyCode===13&&V("submit",this,arguments)})}else return false},
teardown:function(){j.event.remove(this,".specialSubmit")}});if(!j.support.changeBubbles){var Oa,db=function(b){var f=b.type,l=b.value;f==="radio"||f==="checkbox"?l=b.checked:f==="select-multiple"?l=b.selectedIndex>-1?j.map(b.options,function(n){return n.selected}).join("-"):"":b.nodeName.toLowerCase()==="select"&&(l=b.selectedIndex);return l},Ua=function(b,f){var l=b.target,n,q;if(ua.test(l.nodeName)&&!l.readOnly){n=j._data(l,"_change_data");q=db(l);(b.type!=="focusout"||l.type!=="radio")&&j._data(l,
"_change_data",q);if(!(n===k||q===n))if(n!=null||q){b.type="change";b.liveFired=k;j.event.trigger(b,f,l)}}};j.event.special.change={filters:{focusout:Ua,beforedeactivate:Ua,click:function(b){var f=b.target,l=f.type;(l==="radio"||l==="checkbox"||f.nodeName.toLowerCase()==="select")&&Ua.call(this,b)},keydown:function(b){var f=b.target,l=f.type;(b.keyCode===13&&f.nodeName.toLowerCase()!=="textarea"||b.keyCode===32&&(l==="checkbox"||l==="radio")||l==="select-multiple")&&Ua.call(this,b)},beforeactivate:function(b){b=
b.target;j._data(b,"_change_data",db(b))}},setup:function(){if(this.type==="file")return false;for(var b in Oa)j.event.add(this,b+".specialChange",Oa[b]);return ua.test(this.nodeName)},teardown:function(){j.event.remove(this,".specialChange");return ua.test(this.nodeName)}};Oa=j.event.special.change.filters;Oa.focus=Oa.beforeactivate}P.addEventListener&&j.each({focus:"focusin",blur:"focusout"},function(b,f){function l(n){n=j.event.fix(n);n.type=f;return j.event.handle.call(this,n)}j.event.special[f]=
{setup:function(){this.addEventListener(b,l,true)},teardown:function(){this.removeEventListener(b,l,true)}}});j.each(["bind","one"],function(b,f){j.fn[f]=function(l,n,q){if(typeof l==="object"){for(var t in l)this[f](t,n,l[t],q);return this}if(j.isFunction(n)||n===false){q=n;n=k}var x=f==="one"?j.proxy(q,function(F){j(this).unbind(F,x);return q.apply(this,arguments)}):q;if(l==="unload"&&f!=="one")this.one(l,n,q);else{t=0;for(var H=this.length;t<H;t++)j.event.add(this[t],l,x,n)}return this}});j.fn.extend({unbind:function(b,
f){if(typeof b!=="object"||b.preventDefault)for(var l=0,n=this.length;l<n;l++)j.event.remove(this[l],b,f);else for(l in b)this.unbind(l,b[l]);return this},delegate:function(b,f,l,n){return this.live(f,l,n,b)},undelegate:function(b,f,l){return arguments.length===0?this.unbind("live"):this.die(f,null,l,b)},trigger:function(b,f){return this.each(function(){j.event.trigger(b,f,this)})},triggerHandler:function(b,f){if(this[0]){var l=j.Event(b);l.preventDefault();l.stopPropagation();j.event.trigger(l,f,
this[0]);return l.result}},toggle:function(b){for(var f=arguments,l=1;l<f.length;)j.proxy(b,f[l++]);return this.click(j.proxy(b,function(n){var q=(j._data(this,"lastToggle"+b.guid)||0)%l;j._data(this,"lastToggle"+b.guid,q+1);n.preventDefault();return f[q].apply(this,arguments)||false}))},hover:function(b,f){return this.mouseenter(b).mouseleave(f||b)}});var eb={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};j.each(["live","die"],function(b,f){j.fn[f]=function(l,n,q,t){var x,
H=0,F,D,O=t||this.selector;t=t?this:j(this.context);if(typeof l==="object"&&!l.preventDefault){for(x in l)t[f](x,n,l[x],O);return this}j.isFunction(n)&&(q=n,n=k);for(l=(l||"").split(" ");(x=l[H++])!=null;){F=qa.exec(x);D="";F&&(D=F[0],x=x.replace(qa,""));if(x==="hover")l.push("mouseenter"+D,"mouseleave"+D);else{F=x;x==="focus"||x==="blur"?(l.push(eb[x]+D),x+=D):x=(eb[x]||x)+D;if(f==="live"){D=0;for(var U=t.length;D<U;D++)j.event.add(t[D],"live."+K(x,O),{data:n,selector:O,handler:q,origType:x,origHandler:q,
preType:F})}else t.unbind("live."+K(x,O),q)}}return this}});j.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(b,f){j.fn[f]=function(l,n){n==null&&(n=l,l=null);return arguments.length>0?this.bind(f,l,n):this.trigger(f)};j.attrFn&&(j.attrFn[f]=true)});(function(){function b(r,A,J,E,G,M){G=0;for(var T=E.length;G<T;G++){var S=E[G];if(S){var aa=
false;for(S=S[r];S;){if(S.sizcache===J){aa=E[S.sizset];break}if(S.nodeType===1){M||(S.sizcache=J,S.sizset=G);if(typeof A!=="string"){if(S===A){aa=true;break}}else if(D.filter(A,[S]).length>0){aa=S;break}}S=S[r]}E[G]=aa}}}function f(r,A,J,E,G,M){G=0;for(var T=E.length;G<T;G++){var S=E[G];if(S){var aa=false;for(S=S[r];S;){if(S.sizcache===J){aa=E[S.sizset];break}S.nodeType===1&&!M&&(S.sizcache=J,S.sizset=G);if(S.nodeName.toLowerCase()===A){aa=S;break}S=S[r]}E[G]=aa}}}var l=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
n=0,q=Object.prototype.toString,t=false,x=true,H=/\\/g,F=/\W/;[0,0].sort(function(){x=false;return 0});var D=function(r,A,J,E){J=J||[];var G=A=A||P;if(A.nodeType!==1&&A.nodeType!==9)return[];if(!r||typeof r!=="string")return J;var M,T,S,aa,la,ka,pa=true,y=D.isXML(A),I=[],N=r;do{l.exec("");if(M=l.exec(N)){N=M[3];I.push(M[1]);if(M[2]){aa=M[3];break}}}while(M);if(I.length>1&&U.exec(r))if(I.length===2&&O.relative[I[0]])T=ta(I[0]+I[1],A);else for(T=O.relative[I[0]]?[A]:D(I.shift(),A);I.length;){r=I.shift();
O.relative[r]&&(r+=I.shift());T=ta(r,T)}else{!E&&I.length>1&&A.nodeType===9&&!y&&O.match.ID.test(I[0])&&!O.match.ID.test(I[I.length-1])&&(la=D.find(I.shift(),A,y),A=la.expr?D.filter(la.expr,la.set)[0]:la.set[0]);if(A){la=E?{expr:I.pop(),set:fa(E)}:D.find(I.pop(),I.length===1&&(I[0]==="~"||I[0]==="+")&&A.parentNode?A.parentNode:A,y);T=la.expr?D.filter(la.expr,la.set):la.set;for(I.length>0?S=fa(T):pa=false;I.length;){M=ka=I.pop();O.relative[ka]?M=I.pop():ka="";M==null&&(M=A);O.relative[ka](S,M,y)}}else S=
[]}S||(S=T);S||D.error(ka||r);if(q.call(S)==="[object Array]")if(pa)if(A&&A.nodeType===1)for(r=0;S[r]!=null;r++)S[r]&&(S[r]===true||S[r].nodeType===1&&D.contains(A,S[r]))&&J.push(T[r]);else for(r=0;S[r]!=null;r++)S[r]&&S[r].nodeType===1&&J.push(T[r]);else J.push.apply(J,S);else fa(S,J);aa&&(D(aa,G,J,E),D.uniqueSort(J));return J};D.uniqueSort=function(r){if(ia){t=x;r.sort(ia);if(t)for(var A=1;A<r.length;A++)r[A]===r[A-1]&&r.splice(A--,1)}return r};D.matches=function(r,A){return D(r,null,null,A)};D.matchesSelector=
function(r,A){return D(A,null,null,[r]).length>0};D.find=function(r,A,J){var E;if(!r)return[];for(var G=0,M=O.order.length;G<M;G++){var T,S=O.order[G];if(T=O.leftMatch[S].exec(r)){var aa=T[1];T.splice(1,1);if(aa.substr(aa.length-1)!=="\\"){T[1]=(T[1]||"").replace(H,"");E=O.find[S](T,A,J);if(E!=null){r=r.replace(O.match[S],"");break}}}}E||(E=typeof A.getElementsByTagName!=="undefined"?A.getElementsByTagName("*"):[]);return{set:E,expr:r}};D.filter=function(r,A,J,E){for(var G,M,T=r,S=[],aa=A,la=A&&A[0]&&
D.isXML(A[0]);r&&A.length;){for(var ka in O.filter)if((G=O.leftMatch[ka].exec(r))!=null&&G[2]){var pa,y,I=O.filter[ka];y=G[1];M=false;G.splice(1,1);if(y.substr(y.length-1)!=="\\"){aa===S&&(S=[]);if(O.preFilter[ka])if(G=O.preFilter[ka](G,aa,J,S,E,la)){if(G===true)continue}else M=pa=true;if(G)for(var N=0;(y=aa[N])!=null;N++)if(y){pa=I(y,G,N,aa);var Q=E^!!pa;J&&pa!=null?Q?M=true:aa[N]=false:Q&&(S.push(y),M=true)}if(pa!==k){J||(aa=S);r=r.replace(O.match[ka],"");if(!M)return[];break}}}if(r===T)if(M==null)D.error(r);
else break;T=r}return aa};D.error=function(r){throw"Syntax error, unrecognized expression: "+r;};var O=D.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(r){return r.getAttribute("href")},type:function(r){return r.getAttribute("type")}},relative:{"+":function(r,A){var J=typeof A==="string",E=J&&!F.test(A);J=J&&!E;E&&(A=A.toLowerCase());E=0;for(var G=r.length,M;E<G;E++)if(M=r[E]){for(;(M=M.previousSibling)&&M.nodeType!==
1;);r[E]=J||M&&M.nodeName.toLowerCase()===A?M||false:M===A}J&&D.filter(A,r,true)},">":function(r,A){var J,E=typeof A==="string",G=0,M=r.length;if(E&&!F.test(A))for(A=A.toLowerCase();G<M;G++){if(J=r[G]){J=J.parentNode;r[G]=J.nodeName.toLowerCase()===A?J:false}}else{for(;G<M;G++)(J=r[G])&&(r[G]=E?J.parentNode:J.parentNode===A);E&&D.filter(A,r,true)}},"":function(r,A,J){var E,G=n++,M=b;typeof A==="string"&&!F.test(A)&&(A=A.toLowerCase(),E=A,M=f);M("parentNode",A,G,r,E,J)},"~":function(r,A,J){var E,G=
n++,M=b;typeof A==="string"&&!F.test(A)&&(A=A.toLowerCase(),E=A,M=f);M("previousSibling",A,G,r,E,J)}},find:{ID:function(r,A,J){if(typeof A.getElementById!=="undefined"&&!J)return(r=A.getElementById(r[1]))&&r.parentNode?[r]:[]},NAME:function(r,A){if(typeof A.getElementsByName!=="undefined"){for(var J=[],E=A.getElementsByName(r[1]),G=0,M=E.length;G<M;G++)E[G].getAttribute("name")===r[1]&&J.push(E[G]);return J.length===0?null:J}},TAG:function(r,A){if(typeof A.getElementsByTagName!=="undefined")return A.getElementsByTagName(r[1])}},
preFilter:{CLASS:function(r,A,J,E,G,M){r=" "+r[1].replace(H,"")+" ";if(M)return r;M=0;for(var T;(T=A[M])!=null;M++)T&&(G^(T.className&&(" "+T.className+" ").replace(/[\t\n\r]/g," ").indexOf(r)>=0)?J||E.push(T):J&&(A[M]=false));return false},ID:function(r){return r[1].replace(H,"")},TAG:function(r){return r[1].replace(H,"").toLowerCase()},CHILD:function(r){if(r[1]==="nth"){r[2]||D.error(r[0]);r[2]=r[2].replace(/^\+|\s*/g,"");var A=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(r[2]==="even"&&"2n"||r[2]==="odd"&&
"2n+1"||!/\D/.test(r[2])&&"0n+"+r[2]||r[2]);r[2]=A[1]+(A[2]||1)-0;r[3]=A[3]-0}else r[2]&&D.error(r[0]);r[0]=n++;return r},ATTR:function(r,A,J,E,G,M){A=r[1]=r[1].replace(H,"");!M&&O.attrMap[A]&&(r[1]=O.attrMap[A]);r[4]=(r[4]||r[5]||"").replace(H,"");r[2]==="~="&&(r[4]=" "+r[4]+" ");return r},PSEUDO:function(r,A,J,E,G){if(r[1]==="not")if((l.exec(r[3])||"").length>1||/^\w/.test(r[3]))r[3]=D(r[3],null,null,A);else{r=D.filter(r[3],A,J,true^G);J||E.push.apply(E,r);return false}else if(O.match.POS.test(r[0])||
O.match.CHILD.test(r[0]))return true;return r},POS:function(r){r.unshift(true);return r}},filters:{enabled:function(r){return r.disabled===false&&r.type!=="hidden"},disabled:function(r){return r.disabled===true},checked:function(r){return r.checked===true},selected:function(r){return r.selected===true},parent:function(r){return!!r.firstChild},empty:function(r){return!r.firstChild},has:function(r,A,J){return!!D(J[3],r).length},header:function(r){return/h\d/i.test(r.nodeName)},text:function(r){return"text"===
r.getAttribute("type")},radio:function(r){return"radio"===r.type},checkbox:function(r){return"checkbox"===r.type},file:function(r){return"file"===r.type},password:function(r){return"password"===r.type},submit:function(r){return"submit"===r.type},image:function(r){return"image"===r.type},reset:function(r){return"reset"===r.type},button:function(r){return"button"===r.type||r.nodeName.toLowerCase()==="button"},input:function(r){return/input|select|textarea|button/i.test(r.nodeName)}},setFilters:{first:function(r,
A){return A===0},last:function(r,A,J,E){return A===E.length-1},even:function(r,A){return A%2===0},odd:function(r,A){return A%2===1},lt:function(r,A,J){return A<J[3]-0},gt:function(r,A,J){return A>J[3]-0},nth:function(r,A,J){return J[3]-0===A},eq:function(r,A,J){return J[3]-0===A}},filter:{PSEUDO:function(r,A,J,E){var G=A[1],M=O.filters[G];if(M)return M(r,J,A,E);if(G==="contains")return(r.textContent||r.innerText||D.getText([r])||"").indexOf(A[3])>=0;if(G==="not"){A=A[3];J=0;for(E=A.length;J<E;J++)if(A[J]===
r)return false;return true}D.error(G)},CHILD:function(r,A){var J=A[1],E=r;switch(J){case "only":case "first":for(;E=E.previousSibling;)if(E.nodeType===1)return false;if(J==="first")return true;E=r;case "last":for(;E=E.nextSibling;)if(E.nodeType===1)return false;return true;case "nth":J=A[2];var G=A[3];if(J===1&&G===0)return true;var M=A[0],T=r.parentNode;if(T&&(T.sizcache!==M||!r.nodeIndex)){var S=0;for(E=T.firstChild;E;E=E.nextSibling)E.nodeType===1&&(E.nodeIndex=++S);T.sizcache=M}E=r.nodeIndex-
G;return J===0?E===0:E%J===0&&E/J>=0}},ID:function(r,A){return r.nodeType===1&&r.getAttribute("id")===A},TAG:function(r,A){return A==="*"&&r.nodeType===1||r.nodeName.toLowerCase()===A},CLASS:function(r,A){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(A)>-1},ATTR:function(r,A){var J=A[1];J=O.attrHandle[J]?O.attrHandle[J](r):r[J]!=null?r[J]:r.getAttribute(J);var E=J+"",G=A[2],M=A[4];return J==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&&J!==false},POS:function(r,A,J,E){var G=O.setFilters[A[2]];if(G)return G(r,J,A,E)}}},U=O.match.POS,da=function(r,A){return"\\"+(A-0+1)},Z;for(Z in O.match){O.match[Z]=RegExp(O.match[Z].source+/(?![^\[]*\])(?![^\(]*\))/.source);O.leftMatch[Z]=RegExp(/(^(?:.|\r|\n)*?)/.source+O.match[Z].source.replace(/\\(\d+)/g,da))}var fa=function(r,A){r=Array.prototype.slice.call(r,
0);if(A){A.push.apply(A,r);return A}return r};try{Array.prototype.slice.call(P.documentElement.childNodes,0)}catch(na){fa=function(r,A){var J=0,E=A||[];if(q.call(r)==="[object Array]")Array.prototype.push.apply(E,r);else if(typeof r.length==="number")for(var G=r.length;J<G;J++)E.push(r[J]);else for(;r[J];J++)E.push(r[J]);return E}}var ia,oa;P.documentElement.compareDocumentPosition?ia=function(r,A){if(r===A){t=true;return 0}if(!r.compareDocumentPosition||!A.compareDocumentPosition)return r.compareDocumentPosition?
-1:1;return r.compareDocumentPosition(A)&4?-1:1}:(ia=function(r,A){var J,E,G=[],M=[];J=r.parentNode;E=A.parentNode;var T=J;if(r===A){t=true;return 0}if(J===E)return oa(r,A);if(!J)return-1;if(!E)return 1;for(;T;){G.unshift(T);T=T.parentNode}for(T=E;T;){M.unshift(T);T=T.parentNode}J=G.length;E=M.length;for(T=0;T<J&&T<E;T++)if(G[T]!==M[T])return oa(G[T],M[T]);return T===J?oa(r,M[T],-1):oa(G[T],A,1)},oa=function(r,A,J){if(r===A)return J;for(r=r.nextSibling;r;){if(r===A)return-1;r=r.nextSibling}return 1});
D.getText=function(r){for(var A="",J,E=0;r[E];E++){J=r[E];J.nodeType===3||J.nodeType===4?A+=J.nodeValue:J.nodeType!==8&&(A+=D.getText(J.childNodes))}return A};(function(){var r=P.createElement("div"),A="script"+(new Date).getTime(),J=P.documentElement;r.innerHTML="<a name='"+A+"'/>";J.insertBefore(r,J.firstChild);P.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]:k:[]},O.filter.ID=function(E,G){var M=typeof E.getAttributeNode!=="undefined"&&E.getAttributeNode("id");return E.nodeType===1&&M&&M.nodeValue===G});J.removeChild(r);J=r=null})();(function(){var r=P.createElement("div");r.appendChild(P.createComment(""));r.getElementsByTagName("*").length>0&&(O.find.TAG=function(A,J){var E=J.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});r.innerHTML="<a href='#'></a>";r.firstChild&&typeof r.firstChild.getAttribute!==
"undefined"&&r.firstChild.getAttribute("href")!=="#"&&(O.attrHandle.href=function(A){return A.getAttribute("href",2)});r=null})();P.querySelectorAll&&function(){var r=D,A=P.createElement("div");A.innerHTML="<p class='TEST'></p>";if(!A.querySelectorAll||A.querySelectorAll(".TEST").length!==0){D=function(E,G,M,T){G=G||P;if(!T&&!D.isXML(G)){var S=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(E);if(S&&(G.nodeType===1||G.nodeType===9)){if(S[1])return fa(G.getElementsByTagName(E),M);if(S[2]&&O.find.CLASS&&
G.getElementsByClassName)return fa(G.getElementsByClassName(S[2]),M)}if(G.nodeType===9){if(E==="body"&&G.body)return fa([G.body],M);if(S&&S[3]){var aa=G.getElementById(S[3]);if(!aa||!aa.parentNode)return fa([],M);if(aa.id===S[3])return fa([aa],M)}try{return fa(G.querySelectorAll(E),M)}catch(la){}}else if(G.nodeType===1&&G.nodeName.toLowerCase()!=="object"){S=G;var ka=(aa=G.getAttribute("id"))||"__sizzle__",pa=G.parentNode,y=/^\s*[+~]/.test(E);aa?ka=ka.replace(/'/g,"\\$&"):G.setAttribute("id",ka);
y&&pa&&(G=G.parentNode);try{if(!y||pa)return fa(G.querySelectorAll("[id='"+ka+"'] "+E),M)}catch(I){}finally{aa||S.removeAttribute("id")}}}return r(E,G,M,T)};for(var J in r)D[J]=r[J];A=null}}();(function(){var r=P.documentElement,A=r.matchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.msMatchesSelector,J=false;try{A.call(P.documentElement,"[test!='']:sizzle")}catch(E){J=true}A&&(D.matchesSelector=function(G,M){M=M.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!D.isXML(G))try{if(J||!O.match.PSEUDO.test(M)&&
!/!=/.test(M))return A.call(G,M)}catch(T){}return D(M,null,null,[G]).length>0})})();(function(){var r=P.createElement("div");r.innerHTML="<div class='test e'></div><div class='test'></div>";if(r.getElementsByClassName&&r.getElementsByClassName("e").length!==0){r.lastChild.className="e";if(r.getElementsByClassName("e").length!==1){O.order.splice(1,0,"CLASS");O.find.CLASS=function(A,J,E){if(typeof J.getElementsByClassName!=="undefined"&&!E)return J.getElementsByClassName(A[1])};r=null}}})();P.documentElement.contains?
D.contains=function(r,A){return r!==A&&(r.contains?r.contains(A):true)}:P.documentElement.compareDocumentPosition?D.contains=function(r,A){return!!(r.compareDocumentPosition(A)&16)}:D.contains=function(){return false};D.isXML=function(r){return(r=(r?r.ownerDocument||r:0).documentElement)?r.nodeName!=="HTML":false};var ta=function(r,A){for(var J,E=[],G="",M=A.nodeType?[A]:A;J=O.match.PSEUDO.exec(r);){G+=J[0];r=r.replace(O.match.PSEUDO,"")}r=O.relative[r]?r+"*":r;J=0;for(var T=M.length;J<T;J++)D(r,
M[J],E);return D.filter(G,E)};j.find=D;j.expr=D.selectors;j.expr[":"]=j.expr.filters;j.unique=D.uniqueSort;j.text=D.getText;j.isXMLDoc=D.isXML;j.contains=D.contains})();var vb=/Until$/,wb=/^(?:parents|prevUntil|prevAll)/,xb=/,/,ub=/^.[^:#\[\.,]*$/,yb=Array.prototype.slice,zb=j.expr.match.POS,Ab={children:true,contents:true,next:true,prev:true};j.fn.extend({find:function(b){for(var f=this.pushStack("","find",b),l=0,n=0,q=this.length;n<q;n++){l=f.length;j.find(b,this[n],f);if(n>0)for(var t=l;t<f.length;t++)for(var x=
0;x<l;x++)if(f[x]===f[t]){f.splice(t--,1);break}}return f},has:function(b){var f=j(b);return this.filter(function(){for(var l=0,n=f.length;l<n;l++)if(j.contains(this,f[l]))return true})},not:function(b){return this.pushStack(z(this,b,false),"not",b)},filter:function(b){return this.pushStack(z(this,b,true),"filter",b)},is:function(b){return!!b&&j.filter(b,this).length>0},closest:function(b,f){var l=[],n,q,t=this[0];if(j.isArray(b)){var x,H={},F=1;if(t&&b.length){n=0;for(q=b.length;n<q;n++){x=b[n];
H[x]||(H[x]=j.expr.match.POS.test(x)?j(x,f||this.context):x)}for(;t&&t.ownerDocument&&t!==f;){for(x in H){n=H[x];(n.jquery?n.index(t)>-1:j(t).is(n))&&l.push({selector:x,elem:t,level:F})}t=t.parentNode;F++}}return l}x=zb.test(b)?j(b,f||this.context):null;n=0;for(q=this.length;n<q;n++)for(t=this[n];t;){if(x?x.index(t)>-1:j.find.matchesSelector(t,b)){l.push(t);break}t=t.parentNode;if(!t||!t.ownerDocument||t===f)break}l=l.length>1?j.unique(l):l;return this.pushStack(l,"closest",b)},index:function(b){if(!b||
typeof b==="string")return j.inArray(this[0],b?j(b):this.parent().children());return j.inArray(b.jquery?b[0]:b,this)},add:function(b,f){var l=typeof b==="string"?j(b,f):j.makeArray(b),n=j.merge(this.get(),l);return this.pushStack(!l[0]||!l[0].parentNode||l[0].parentNode.nodeType===11||!n[0]||!n[0].parentNode||n[0].parentNode.nodeType===11?n:j.unique(n))},andSelf:function(){return this.add(this.prevObject)}});j.each({parent:function(b){return(b=b.parentNode)&&b.nodeType!==11?b:null},parents:function(b){return j.dir(b,
"parentNode")},parentsUntil:function(b,f,l){return j.dir(b,"parentNode",l)},next:function(b){return j.nth(b,2,"nextSibling")},prev:function(b){return j.nth(b,2,"previousSibling")},nextAll:function(b){return j.dir(b,"nextSibling")},prevAll:function(b){return j.dir(b,"previousSibling")},nextUntil:function(b,f,l){return j.dir(b,"nextSibling",l)},prevUntil:function(b,f,l){return j.dir(b,"previousSibling",l)},siblings:function(b){return j.sibling(b.parentNode.firstChild,b)},children:function(b){return j.sibling(b.firstChild)},
contents:function(b){return j.nodeName(b,"iframe")?b.contentDocument||b.contentWindow.document:j.makeArray(b.childNodes)}},function(b,f){j.fn[b]=function(l,n){var q=j.map(this,f,l),t=yb.call(arguments);vb.test(b)||(n=l);n&&typeof n==="string"&&(q=j.filter(n,q));q=this.length>1&&!Ab[b]?j.unique(q):q;(this.length>1||xb.test(n))&&wb.test(b)&&(q=q.reverse());return this.pushStack(q,b,t.join(","))}});j.extend({filter:function(b,f,l){l&&(b=":not("+b+")");return f.length===1?j.find.matchesSelector(f[0],
b)?[f[0]]:[]:j.find.matches(b,f)},dir:function(b,f,l){var n=[];for(b=b[f];b&&b.nodeType!==9&&(l===k||b.nodeType!==1||!j(b).is(l));){b.nodeType===1&&n.push(b);b=b[f]}return n},nth:function(b,f,l){f=f||1;for(var n=0;b;b=b[l])if(b.nodeType===1&&++n===f)break;return b},sibling:function(b,f){for(var l=[];b;b=b.nextSibling)b.nodeType===1&&b!==f&&l.push(b);return l}});var Bb=/ jQuery\d+="(?:\d+|null)"/g,$a=/^\s+/,fb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,gb=/<([\w:]+)/,
Cb=/<tbody/i,Db=/<|&#?\w+;/,hb=/<(?:script|object|embed|option|style)/i,ib=/checked\s*(?:[^=]|=\s*.checked.)/i,sa={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,"",""]};sa.optgroup=sa.option;sa.tbody=sa.tfoot=sa.colgroup=sa.caption=
sa.thead;sa.th=sa.td;j.support.htmlSerialize||(sa._default=[1,"div<div>","</div>"]);j.fn.extend({text:function(b){if(j.isFunction(b))return this.each(function(f){var l=j(this);l.text(b.call(this,f,l.text()))});if(typeof b!=="object"&&b!==k)return this.empty().append((this[0]&&this[0].ownerDocument||P).createTextNode(b));return j.text(this)},wrapAll:function(b){if(j.isFunction(b))return this.each(function(l){j(this).wrapAll(b.call(this,l))});if(this[0]){var f=j(b,this[0].ownerDocument).eq(0).clone(true);
this[0].parentNode&&f.insertBefore(this[0]);f.map(function(){for(var l=this;l.firstChild&&l.firstChild.nodeType===1;)l=l.firstChild;return l}).append(this)}return this},wrapInner:function(b){if(j.isFunction(b))return this.each(function(f){j(this).wrapInner(b.call(this,f))});return this.each(function(){var f=j(this),l=f.contents();l.length?l.wrapAll(b):f.append(b)})},wrap:function(b){return this.each(function(){j(this).wrapAll(b)})},unwrap:function(){return this.parent().each(function(){j.nodeName(this,
"body")||j(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(b){this.nodeType===1&&this.appendChild(b)})},prepend:function(){return this.domManip(arguments,true,function(b){this.nodeType===1&&this.insertBefore(b,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(f){this.parentNode.insertBefore(f,this)});if(arguments.length){var b=j(arguments[0]);b.push.apply(b,this.toArray());return this.pushStack(b,
"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(f){this.parentNode.insertBefore(f,this.nextSibling)});if(arguments.length){var b=this.pushStack(this,"after",arguments);b.push.apply(b,j(arguments[0]).toArray());return b}},remove:function(b,f){for(var l=0,n;(n=this[l])!=null;l++)if(!b||j.filter(b,[n]).length){!f&&n.nodeType===1&&(j.cleanData(n.getElementsByTagName("*")),j.cleanData([n]));n.parentNode&&n.parentNode.removeChild(n)}return this},
empty:function(){for(var b=0,f;(f=this[b])!=null;b++)for(f.nodeType===1&&j.cleanData(f.getElementsByTagName("*"));f.firstChild;)f.removeChild(f.firstChild);return this},clone:function(b,f){b=b==null?false:b;f=f==null?b:f;return this.map(function(){return j.clone(this,b,f)})},html:function(b){if(b===k)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Bb,""):null;if(typeof b!=="string"||hb.test(b)||!j.support.leadingWhitespace&&$a.test(b)||sa[(gb.exec(b)||["",""])[1].toLowerCase()])j.isFunction(b)?
this.each(function(q){var t=j(this);t.html(b.call(this,q,t.html()))}):this.empty().append(b);else{b=b.replace(fb,"<$1></$2>");try{for(var f=0,l=this.length;f<l;f++)this[f].nodeType===1&&(j.cleanData(this[f].getElementsByTagName("*")),this[f].innerHTML=b)}catch(n){this.empty().append(b)}}return this},replaceWith:function(b){if(this[0]&&this[0].parentNode){if(j.isFunction(b))return this.each(function(f){var l=j(this),n=l.html();l.replaceWith(b.call(this,f,n))});typeof b!=="string"&&(b=j(b).detach());
return this.each(function(){var f=this.nextSibling,l=this.parentNode;j(this).remove();f?j(f).before(b):j(l).append(b)})}return this.pushStack(j(j.isFunction(b)?b():b),"replaceWith",b)},detach:function(b){return this.remove(b,true)},domManip:function(b,f,l){var n,q,t,x=b[0],H=[];if(!j.support.checkClone&&arguments.length===3&&typeof x==="string"&&ib.test(x))return this.each(function(){j(this).domManip(b,f,l,true)});if(j.isFunction(x))return this.each(function(O){var U=j(this);b[0]=x.call(this,O,f?
U.html():k);U.domManip(b,f,l)});if(this[0]){t=x&&x.parentNode;j.support.parentNode&&t&&t.nodeType===11&&t.childNodes.length===this.length?n={fragment:t}:n=j.buildFragment(b,this,H);t=n.fragment;t.childNodes.length===1?q=t=t.firstChild:q=t.firstChild;if(q){f=f&&j.nodeName(q,"tr");q=0;for(var F=this.length,D=F-1;q<F;q++)l.call(f?j.nodeName(this[q],"table")?this[q].getElementsByTagName("tbody")[0]||this[q].appendChild(this[q].ownerDocument.createElement("tbody")):this[q]:this[q],n.cacheable||F>1&&q<
D?j.clone(t,true,true):t)}H.length&&j.each(H,u)}return this}});j.buildFragment=function(b,f,l){var n,q,t;f=f&&f[0]?f[0].ownerDocument||f[0]:P;b.length===1&&typeof b[0]==="string"&&b[0].length<512&&f===P&&b[0].charAt(0)==="<"&&!hb.test(b[0])&&(j.support.checkClone||!ib.test(b[0]))&&(q=true,t=j.fragments[b[0]],t&&t!==1&&(n=t));n||(n=f.createDocumentFragment(),j.clean(b,f,n,l));q&&(j.fragments[b[0]]=t?n:1);return{fragment:n,cacheable:q}};j.fragments={};j.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",
insertAfter:"after",replaceAll:"replaceWith"},function(b,f){j.fn[b]=function(l){var n=[];l=j(l);var q=this.length===1&&this[0].parentNode;if(q&&q.nodeType===11&&q.childNodes.length===1&&l.length===1){l[f](this[0]);return this}q=0;for(var t=l.length;q<t;q++){var x=(q>0?this.clone(true):this).get();j(l[q])[f](x);n=n.concat(x)}return this.pushStack(n,b,l.selector)}});j.extend({clone:function(b,f,l){var n=b.cloneNode(true),q,t,x;if((!j.support.noCloneEvent||!j.support.noCloneChecked)&&(b.nodeType===1||
b.nodeType===11)&&!j.isXMLDoc(b)){v(b,n);q=p(b);t=p(n);for(x=0;q[x];++x)v(q[x],t[x])}if(f){C(b,n);if(l){q=p(b);t=p(n);for(x=0;q[x];++x)C(q[x],t[x])}}return n},clean:function(b,f,l,n){f=f||P;typeof f.createElement==="undefined"&&(f=f.ownerDocument||f[0]&&f[0].ownerDocument||P);for(var q=[],t=0,x;(x=b[t])!=null;t++){typeof x==="number"&&(x+="");if(x){if(typeof x!=="string"||Db.test(x)){if(typeof x==="string"){x=x.replace(fb,"<$1></$2>");var H=(gb.exec(x)||["",""])[1].toLowerCase(),F=sa[H]||sa._default,
D=F[0],O=f.createElement("div");for(O.innerHTML=F[1]+x+F[2];D--;)O=O.lastChild;if(!j.support.tbody){D=Cb.test(x);H=H==="table"&&!D?O.firstChild&&O.firstChild.childNodes:F[1]==="<table>"&&!D?O.childNodes:[];for(F=H.length-1;F>=0;--F)j.nodeName(H[F],"tbody")&&!H[F].childNodes.length&&H[F].parentNode.removeChild(H[F])}!j.support.leadingWhitespace&&$a.test(x)&&O.insertBefore(f.createTextNode($a.exec(x)[0]),O.firstChild);x=O.childNodes}}else x=f.createTextNode(x);x.nodeType?q.push(x):q=j.merge(q,x)}}if(l)for(t=
0;q[t];t++)!n||!j.nodeName(q[t],"script")||q[t].type&&q[t].type.toLowerCase()!=="text/javascript"?(q[t].nodeType===1&&q.splice.apply(q,[t+1,0].concat(j.makeArray(q[t].getElementsByTagName("script")))),l.appendChild(q[t])):n.push(q[t].parentNode?q[t].parentNode.removeChild(q[t]):q[t]);return q},cleanData:function(b){for(var f,l,n=j.cache,q=j.expando,t=j.event.special,x=j.support.deleteExpando,H=0,F;(F=b[H])!=null;H++)if(!(F.nodeName&&j.noData[F.nodeName.toLowerCase()]))if(l=F[j.expando]){if((f=n[l]&&
n[l][q])&&f.events){for(var D in f.events)t[D]?j.event.remove(F,D):j.removeEvent(F,D,f.handle);f.handle&&(f.handle.elem=null)}x?delete F[j.expando]:F.removeAttribute&&F.removeAttribute(j.expando);delete n[l]}}});var jb=/alpha\([^)]*\)/i,Eb=/opacity=([^)]*)/,Fb=/-([a-z])/ig,Gb=/([A-Z])/g,kb=/^-?\d+(?:px)?$/i,Hb=/^-?\d/,Ib={position:"absolute",visibility:"hidden",display:"block"},sb=["Left","Right"],tb=["Top","Bottom"],Pa,Da,Va,Jb=function(b,f){return f.toUpperCase()};j.fn.css=function(b,f){if(arguments.length===
2&&f===k)return this;return j.access(this,b,f,true,function(l,n,q){return q!==k?j.style(l,n,q):j.css(l,n)})};j.extend({cssHooks:{opacity:{get:function(b,f){if(f){var l=Pa(b,"opacity","opacity");return l===""?"1":l}return b.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,zoom:true,lineHeight:true},cssProps:{"float":j.support.cssFloat?"cssFloat":"styleFloat"},style:function(b,f,l,n){if(b&&b.nodeType!==3&&b.nodeType!==8&&b.style){var q,t=j.camelCase(f),x=b.style,H=j.cssHooks[t];
f=j.cssProps[t]||t;if(l===k){if(H&&"get"in H&&(q=H.get(b,false,n))!==k)return q;return x[f]}if(!(typeof l==="number"&&isNaN(l)||l==null)){typeof l==="number"&&!j.cssNumber[t]&&(l+="px");if(!H||!("set"in H)||(l=H.set(b,l))!==k)try{x[f]=l}catch(F){}}}},css:function(b,f,l){var n,q=j.camelCase(f),t=j.cssHooks[q];f=j.cssProps[q]||q;if(t&&"get"in t&&(n=t.get(b,true,l))!==k)return n;if(Pa)return Pa(b,f,q)},swap:function(b,f,l){var n={},q;for(q in f){n[q]=b.style[q];b.style[q]=f[q]}l.call(b);for(q in f)b.style[q]=
n[q]},camelCase:function(b){return b.replace(Fb,Jb)}});j.curCSS=j.css;j.each(["height","width"],function(b,f){j.cssHooks[f]={get:function(l,n,q){var t;if(n){l.offsetWidth!==0?t=B(l,f,q):j.swap(l,Ib,function(){t=B(l,f,q)});if(t<=0){t=Pa(l,f,f);t==="0px"&&Va&&(t=Va(l,f,f));if(t!=null)return t===""||t==="auto"?"0px":t}if(t<0||t==null){t=l.style[f];return t===""||t==="auto"?"0px":t}return typeof t==="string"?t:t+"px"}},set:function(l,n){if(!kb.test(n))return n;n=parseFloat(n);if(n>=0)return n+"px"}}});
j.support.opacity||(j.cssHooks.opacity={get:function(b,f){return Eb.test((f&&b.currentStyle?b.currentStyle.filter:b.style.filter)||"")?parseFloat(RegExp.$1)/100+"":f?"1":""},set:function(b,f){var l=b.style;l.zoom=1;var n=j.isNaN(f)?"":"alpha(opacity="+f*100+")",q=l.filter||"";l.filter=jb.test(q)?q.replace(jb,n):l.filter+" "+n}});P.defaultView&&P.defaultView.getComputedStyle&&(Da=function(b,f,l){var n;l=l.replace(Gb,"-$1").toLowerCase();if(!(f=b.ownerDocument.defaultView))return k;if(f=f.getComputedStyle(b,
null)){n=f.getPropertyValue(l);n===""&&!j.contains(b.ownerDocument.documentElement,b)&&(n=j.style(b,l))}return n});P.documentElement.currentStyle&&(Va=function(b,f){var l,n=b.currentStyle&&b.currentStyle[f],q=b.runtimeStyle&&b.runtimeStyle[f],t=b.style;!kb.test(n)&&Hb.test(n)&&(l=t.left,q&&(b.runtimeStyle.left=b.currentStyle.left),t.left=f==="fontSize"?"1em":n||0,n=t.pixelLeft+"px",t.left=l,q&&(b.runtimeStyle.left=q));return n===""?"auto":n});Pa=Da||Va;j.expr&&j.expr.filters&&(j.expr.filters.hidden=
function(b){var f=b.offsetHeight;return b.offsetWidth===0&&f===0||!j.support.reliableHiddenOffsets&&(b.style.display||j.css(b,"display"))==="none"},j.expr.filters.visible=function(b){return!j.expr.filters.hidden(b)});var Kb=/%20/g,rb=/\[\]$/,lb=/\r?\n/g,Lb=/#.*$/,Mb=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Nb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Ob=/^(?:GET|HEAD)$/,Pb=/^\/\//,mb=/\?/,Qb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Rb=
/^(?:select|textarea)/i,cb=/\s+/,Sb=/([?&])_=[^&]*/,Tb=/(^|\-)([a-z])/g,Ub=function(b,f,l){return f+l.toUpperCase()},nb=/^([\w\+\.\-]+:)\/\/([^\/?#:]*)(?::(\d+))?/,ob=j.fn.load,Za={},pb={},Ea,Fa;try{Ea=P.location.href}catch(ac){Ea=P.createElement("a");Ea.href="";Ea=Ea.href}Fa=nb.exec(Ea.toLowerCase());j.fn.extend({load:function(b,f,l){if(typeof b!=="string"&&ob)return ob.apply(this,arguments);if(!this.length)return this;var n=b.indexOf(" ");if(n>=0){var q=b.slice(n,b.length);b=b.slice(0,n)}n="GET";
f&&(j.isFunction(f)?(l=f,f=k):typeof f==="object"&&(f=j.param(f,j.ajaxSettings.traditional),n="POST"));var t=this;j.ajax({url:b,type:n,dataType:"html",data:f,complete:function(x,H,F){F=x.responseText;x.isResolved()&&(x.done(function(D){F=D}),t.html(q?j("<div>").append(F.replace(Qb,"")).find(q):F));l&&t.each(l,[F,H,x])}});return this},serialize:function(){return j.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?j.makeArray(this.elements):this}).filter(function(){return this.name&&
!this.disabled&&(this.checked||Rb.test(this.nodeName)||Nb.test(this.type))}).map(function(b,f){var l=j(this).val();return l==null?null:j.isArray(l)?j.map(l,function(n){return{name:f.name,value:n.replace(lb,"\r\n")}}):{name:f.name,value:l.replace(lb,"\r\n")}}).get()}});j.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(b,f){j.fn[f]=function(l){return this.bind(f,l)}});j.each(["get","post"],function(b,f){j[f]=function(l,n,q,t){j.isFunction(n)&&(t=t||q,q=n,n=
k);return j.ajax({type:f,url:l,data:n,success:q,dataType:t})}});j.extend({getScript:function(b,f){return j.get(b,k,f,"script")},getJSON:function(b,f,l){return j.get(b,f,l,"json")},ajaxSetup:function(b,f){f?j.extend(true,b,j.ajaxSettings,f):(f=b,b=j.extend(true,j.ajaxSettings,f));for(var l in{context:1,url:1})l in f?b[l]=f[l]:l in j.ajaxSettings&&(b[l]=j.ajaxSettings[l]);return b},ajaxSettings:{url:Ea,isLocal:/(?:^file|^widget|\-extension):$/.test(Fa[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":d.String,"text html":true,"text json":j.parseJSON,"text xml":j.parseXML}},ajaxPrefilter:w(Za),ajaxTransport:w(pb),ajax:function(b,f){function l(E,G,M,T){if(ia!==2){ia=2;fa&&clearTimeout(fa);Z=k;U=T||"";r.readyState=E?4:0;var S,
aa,la;if(M){T=n;var ka=r,pa=T.contents,y=T.dataTypes,I=T.responseFields,N,Q,W,ba;for(Q in I)Q in M&&(ka[I[Q]]=M[Q]);for(;y[0]==="*";){y.shift();N===k&&(N=T.mimeType||ka.getResponseHeader("content-type"))}if(N)for(Q in pa)if(pa[Q]&&pa[Q].test(N)){y.unshift(Q);break}if(y[0]in M)W=y[0];else{for(Q in M){if(!y[0]||T.converters[Q+" "+y[0]]){W=Q;break}ba||(ba=Q)}W=W||ba}if(W){W!==y[0]&&y.unshift(W);M=M[W]}else M=void 0}else M=k;if(E>=200&&E<300||E===304){if(n.ifModified){if(N=r.getResponseHeader("Last-Modified"))j.lastModified[D]=
N;if(N=r.getResponseHeader("Etag"))j.etag[D]=N}if(E===304){G="notmodified";S=true}else try{N=n;N.dataFilter&&(M=N.dataFilter(M,N.dataType));var ea=N.dataTypes;Q={};var ha,ra,va=ea.length,wa,za=ea[0],La,ab,Aa,Ga,Ma;for(ha=1;ha<va;ha++){if(ha===1)for(ra in N.converters)typeof ra==="string"&&(Q[ra.toLowerCase()]=N.converters[ra]);La=za;za=ea[ha];if(za==="*")za=La;else if(La!=="*"&&La!==za){ab=La+" "+za;Aa=Q[ab]||Q["* "+za];if(!Aa){Ma=k;for(Ga in Q){wa=Ga.split(" ");if(wa[0]===La||wa[0]==="*")if(Ma=Q[wa[1]+
" "+za]){Ga=Q[Ga];Ga===true?Aa=Ma:Ma===true&&(Aa=Ga);break}}}!Aa&&!Ma&&j.error("No conversion from "+ab.replace(" "," to "));Aa!==true&&(M=Aa?Aa(M):Ma(Ga(M)))}}aa=M;G="success";S=true}catch(Vb){G="parsererror";la=Vb}}else{la=G;if(!G||E){G="error";E<0&&(E=0)}}r.status=E;r.statusText=G;S?x.resolveWith(q,[aa,G,r]):x.rejectWith(q,[r,G,la]);r.statusCode(F);F=k;oa&&t.trigger("ajax"+(S?"Success":"Error"),[r,n,S?aa:la]);H.resolveWith(q,[r,G]);oa&&(t.trigger("ajaxComplete",[r,n]),--j.active||j.event.trigger("ajaxStop"))}}
typeof b==="object"&&(f=b,b=k);f=f||{};var n=j.ajaxSetup({},f),q=n.context||n,t=q!==n&&(q.nodeType||q instanceof j)?j(q):j.event,x=j.Deferred(),H=j._Deferred(),F=n.statusCode||{},D,O={},U,da,Z,fa,na,ia=0,oa,ta,r={readyState:0,setRequestHeader:function(E,G){ia||(O[E.toLowerCase().replace(Tb,Ub)]=G);return this},getAllResponseHeaders:function(){return ia===2?U:null},getResponseHeader:function(E){var G;if(ia===2){if(!da)for(da={};G=Mb.exec(U);)da[G[1].toLowerCase()]=G[2];G=da[E.toLowerCase()]}return G===
k?null:G},overrideMimeType:function(E){ia||(n.mimeType=E);return this},abort:function(E){E=E||"abort";Z&&Z.abort(E);l(0,E);return this}};x.promise(r);r.success=r.done;r.error=r.fail;r.complete=H.done;r.statusCode=function(E){if(E){var G;if(ia<2)for(G in E)F[G]=[F[G],E[G]];else{G=E[r.status];r.then(G,G)}}return this};n.url=((b||n.url)+"").replace(Lb,"").replace(Pb,Fa[1]+"//");n.dataTypes=j.trim(n.dataType||"*").toLowerCase().split(cb);n.crossDomain||(na=nb.exec(n.url.toLowerCase()),n.crossDomain=na&&
(na[1]!=Fa[1]||na[2]!=Fa[2]||(na[3]||(na[1]==="http:"?80:443))!=(Fa[3]||(Fa[1]==="http:"?80:443))));n.data&&n.processData&&typeof n.data!=="string"&&(n.data=j.param(n.data,n.traditional));s(Za,n,f,r);if(ia===2)return false;oa=n.global;n.type=n.type.toUpperCase();n.hasContent=!Ob.test(n.type);oa&&j.active++===0&&j.event.trigger("ajaxStart");if(!n.hasContent){n.data&&(n.url+=(mb.test(n.url)?"&":"?")+n.data);D=n.url;if(n.cache===false){na=j.now();var A=n.url.replace(Sb,"$1_="+na);n.url=A+(A===n.url?
(mb.test(n.url)?"&":"?")+"_="+na:"")}}if(n.data&&n.hasContent&&n.contentType!==false||f.contentType)O["Content-Type"]=n.contentType;n.ifModified&&(D=D||n.url,j.lastModified[D]&&(O["If-Modified-Since"]=j.lastModified[D]),j.etag[D]&&(O["If-None-Match"]=j.etag[D]));O.Accept=n.dataTypes[0]&&n.accepts[n.dataTypes[0]]?n.accepts[n.dataTypes[0]]+(n.dataTypes[0]!=="*"?", */*; q=0.01":""):n.accepts["*"];for(ta in n.headers)r.setRequestHeader(ta,n.headers[ta]);if(n.beforeSend&&(n.beforeSend.call(q,r,n)===false||
ia===2)){r.abort();return false}for(ta in{success:1,error:1,complete:1})r[ta](n[ta]);if(Z=s(pb,n,f,r)){r.readyState=1;oa&&t.trigger("ajaxSend",[r,n]);n.async&&n.timeout>0&&(fa=setTimeout(function(){r.abort("timeout")},n.timeout));try{ia=1;Z.send(O,l)}catch(J){status<2?l(-1,J):j.error(J)}}else l(-1,"No Transport");return r},param:function(b,f){var l=[],n=function(t,x){x=j.isFunction(x)?x():x;l[l.length]=encodeURIComponent(t)+"="+encodeURIComponent(x)};f===k&&(f=j.ajaxSettings.traditional);if(j.isArray(b)||
b.jquery&&!j.isPlainObject(b))j.each(b,function(){n(this.name,this.value)});else for(var q in b)o(q,b[q],f,n);return l.join("&").replace(Kb,"+")}});j.extend({active:0,lastModified:{},etag:{}});var Wb=j.now(),Wa=/(\=)\?(&|$)|()\?\?()/i;j.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return j.expando+"_"+Wb++}});j.ajaxPrefilter("json jsonp",function(b,f,l){var n=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||f.jsonpCallback||f.jsonp!=null||b.jsonp!==false&&(Wa.test(b.url)||n&&Wa.test(b.data))){var q,
t=b.jsonpCallback=j.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,x=d[t];f=b.url;var H=b.data,F="$1"+t+"$2",D=function(){d[t]=x;q&&j.isFunction(x)&&d[t](q[0])};b.jsonp!==false&&(f=f.replace(Wa,F),b.url===f&&(n&&(H=H.replace(Wa,F)),b.data===H&&(f+=(/\?/.test(f)?"&":"?")+b.jsonp+"="+t)));b.url=f;b.data=H;d[t]=function(O){q=[O]};l.then(D,D);b.converters["script json"]=function(){q||j.error(t+" was not called");return q[0]};b.dataTypes[0]="json";return"script"}});j.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
contents:{script:/javascript|ecmascript/},converters:{"text script":function(b){j.globalEval(b);return b}}});j.ajaxPrefilter("script",function(b){b.cache===k&&(b.cache=false);b.crossDomain&&(b.type="GET",b.global=false)});j.ajaxTransport("script",function(b){if(b.crossDomain){var f,l=P.head||P.getElementsByTagName("head")[0]||P.documentElement;return{send:function(n,q){f=P.createElement("script");f.async="async";b.scriptCharset&&(f.charset=b.scriptCharset);f.src=b.url;f.onload=f.onreadystatechange=
function(t,x){if(!f.readyState||/loaded|complete/.test(f.readyState)){f.onload=f.onreadystatechange=null;l&&f.parentNode&&l.removeChild(f);f=k;x||q(200,"success")}};l.insertBefore(f,l.firstChild)},abort:function(){f&&f.onload(0,1)}}}});var Xb=j.now(),Ha;j.ajaxSettings.xhr=d.ActiveXObject?function(){var b;if(!(b=!this.isLocal&&a()))a:{try{b=new d.ActiveXObject("Microsoft.XMLHTTP");break a}catch(f){}b=void 0}return b}:a;Da=j.ajaxSettings.xhr();j.support.ajax=!!Da;j.support.cors=Da&&"withCredentials"in
Da;Da=k;j.support.ajax&&j.ajaxTransport(function(b){if(!b.crossDomain||j.support.cors){var f;return{send:function(l,n){var q=b.xhr(),t,x;b.username?q.open(b.type,b.url,b.async,b.username,b.password):q.open(b.type,b.url,b.async);if(b.xhrFields)for(x in b.xhrFields)q[x]=b.xhrFields[x];b.mimeType&&q.overrideMimeType&&q.overrideMimeType(b.mimeType);(!b.crossDomain||b.hasContent)&&!l["X-Requested-With"]&&(l["X-Requested-With"]="XMLHttpRequest");try{for(x in l)q.setRequestHeader(x,l[x])}catch(H){}q.send(b.hasContent&&
b.data||null);f=function(F,D){var O,U,da,Z,fa;try{if(f&&(D||q.readyState===4)){f=k;t&&(q.onreadystatechange=j.noop,delete Ha[t]);if(D)q.readyState!==4&&q.abort();else{O=q.status;da=q.getAllResponseHeaders();Z={};(fa=q.responseXML)&&fa.documentElement&&(Z.xml=fa);Z.text=q.responseText;try{U=q.statusText}catch(na){U=""}O||!b.isLocal||b.crossDomain?O===1223&&(O=204):O=Z.text?200:404}}}catch(ia){D||n(-1,ia)}Z&&n(O,U,Z,da)};b.async&&q.readyState!==4?(Ha||(Ha={},g()),t=Xb++,q.onreadystatechange=Ha[t]=f):
f()},abort:function(){f&&f(0,1)}}}});var Ya={},Yb=/^(?:toggle|show|hide)$/,Zb=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Xa,bb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];j.fn.extend({show:function(b,f,l){if(b||b===0)return this.animate(h("show",3),b,f,l);l=0;for(var n=this.length;l<n;l++){b=this[l];f=b.style.display;!j._data(b,"olddisplay")&&f==="none"&&(f=b.style.display="");f===""&&j.css(b,"display")===
"none"&&j._data(b,"olddisplay",e(b.nodeName))}for(l=0;l<n;l++){b=this[l];f=b.style.display;if(f===""||f==="none")b.style.display=j._data(b,"olddisplay")||""}return this},hide:function(b,f,l){if(b||b===0)return this.animate(h("hide",3),b,f,l);b=0;for(f=this.length;b<f;b++){l=j.css(this[b],"display");l!=="none"&&!j._data(this[b],"olddisplay")&&j._data(this[b],"olddisplay",l)}for(b=0;b<f;b++)this[b].style.display="none";return this},_toggle:j.fn.toggle,toggle:function(b,f,l){var n=typeof b==="boolean";
j.isFunction(b)&&j.isFunction(f)?this._toggle.apply(this,arguments):b==null||n?this.each(function(){var q=n?b:j(this).is(":hidden");j(this)[q?"show":"hide"]()}):this.animate(h("toggle",3),b,f,l);return this},fadeTo:function(b,f,l,n){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:f},b,l,n)},animate:function(b,f,l,n){var q=j.speed(f,l,n);if(j.isEmptyObject(b))return this.each(q.complete);return this[q.queue===false?"each":"queue"](function(){var t=j.extend({},q),x,H=this.nodeType===
1,F=H&&j(this).is(":hidden"),D=this;for(x in b){var O=j.camelCase(x);x!==O&&(b[O]=b[x],delete b[x],x=O);if(b[x]==="hide"&&F||b[x]==="show"&&!F)return t.complete.call(this);if(H&&(x==="height"||x==="width")){t.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(j.css(this,"display")==="inline"&&j.css(this,"float")==="none")if(j.support.inlineBlockNeedsLayout)e(this.nodeName)==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1);else this.style.display=
"inline-block"}j.isArray(b[x])&&((t.specialEasing=t.specialEasing||{})[x]=b[x][1],b[x]=b[x][0])}t.overflow!=null&&(this.style.overflow="hidden");t.curAnim=j.extend({},b);j.each(b,function(U,da){var Z=new j.fx(D,t,U);if(Yb.test(da))Z[da==="toggle"?F?"show":"hide":da](b);else{var fa=Zb.exec(da),na=Z.cur();if(fa){var ia=parseFloat(fa[2]),oa=fa[3]||(j.cssNumber[U]?"":"px");oa!=="px"&&(j.style(D,U,(ia||1)+oa),na*=(ia||1)/Z.cur(),j.style(D,U,na+oa));fa[1]&&(ia=(fa[1]==="-="?-1:1)*ia+na);Z.custom(na,ia,
oa)}else Z.custom(na,da,"")}});return true})},stop:function(b,f){var l=j.timers;b&&this.queue([]);this.each(function(){for(var n=l.length-1;n>=0;n--)l[n].elem===this&&(f&&l[n](true),l.splice(n,1))});f||this.dequeue();return this}});j.each({slideDown:h("show",1),slideUp:h("hide",1),slideToggle:h("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(b,f){j.fn[b]=function(l,n,q){return this.animate(f,l,n,q)}});j.extend({speed:function(b,f,l){var n=b&&typeof b===
"object"?j.extend({},b):{complete:l||!l&&f||j.isFunction(b)&&b,duration:b,easing:l&&f||f&&!j.isFunction(f)&&f};n.duration=j.fx.off?0:typeof n.duration==="number"?n.duration:n.duration in j.fx.speeds?j.fx.speeds[n.duration]:j.fx.speeds._default;n.old=n.complete;n.complete=function(){n.queue!==false&&j(this).dequeue();j.isFunction(n.old)&&n.old.call(this)};return n},easing:{linear:function(b,f,l,n){return l+n*b},swing:function(b,f,l,n){return(-Math.cos(b*Math.PI)/2+0.5)*n+l}},timers:[],fx:function(b,
f,l){this.options=f;this.elem=b;this.prop=l;f.orig||(f.orig={})}});j.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(j.fx.step[this.prop]||j.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 b,f=j.css(this.elem,this.prop);return isNaN(b=parseFloat(f))?!f||f==="auto"?0:f:b},custom:function(b,f,l){function n(x){return q.step(x)}var q=this,t=j.fx;
this.startTime=j.now();this.start=b;this.end=f;this.unit=l||this.unit||(j.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;n.elem=this.elem;n()&&j.timers.push(n)&&!Xa&&(Xa=setInterval(t.tick,t.interval))},show:function(){this.options.orig[this.prop]=j.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());j(this.elem).show()},hide:function(){this.options.orig[this.prop]=j.style(this.elem,this.prop);this.options.hide=
true;this.custom(this.cur(),0)},step:function(b){var f=j.now(),l=true;if(b||f>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var n in this.options.curAnim)this.options.curAnim[n]!==true&&(l=false);if(l){if(this.options.overflow!=null&&!j.support.shrinkWrapBlocks){var q=this.elem,t=this.options;j.each(["","X","Y"],function(H,F){q.style["overflow"+F]=t.overflow[H]})}this.options.hide&&j(this.elem).hide();if(this.options.hide||
this.options.show)for(var x in this.options.curAnim)j.style(this.elem,x,this.options.orig[x]);this.options.complete.call(this.elem)}return false}b=f-this.startTime;this.state=b/this.options.duration;f=this.options.easing||(j.easing.swing?"swing":"linear");this.pos=j.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||f](this.state,b,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update();return true}};j.extend(j.fx,{tick:function(){for(var b=
j.timers,f=0;f<b.length;f++)b[f]()||b.splice(f--,1);b.length||j.fx.stop()},interval:13,stop:function(){clearInterval(Xa);Xa=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(b){j.style(b.elem,"opacity",b.now)},_default:function(b){b.elem.style&&b.elem.style[b.prop]!=null?b.elem.style[b.prop]=(b.prop==="width"||b.prop==="height"?Math.max(0,b.now):b.now)+b.unit:b.elem[b.prop]=b.now}}});j.expr&&j.expr.filters&&(j.expr.filters.animated=function(b){return j.grep(j.timers,function(f){return b===
f.elem}).length});var $b=/^t(?:able|d|h)$/i,qb=/^(?:body|html)$/i;"getBoundingClientRect"in P.documentElement?j.fn.offset=function(b){var f=this[0],l;if(b)return this.each(function(x){j.offset.setOffset(this,b,x)});if(!f||!f.ownerDocument)return null;if(f===f.ownerDocument.body)return j.offset.bodyOffset(f);try{l=f.getBoundingClientRect()}catch(n){}var q=f.ownerDocument,t=q.documentElement;if(!l||!j.contains(t,f))return l?{top:l.top,left:l.left}:{top:0,left:0};f=q.body;q=m(q);return{top:l.top+(q.pageYOffset||
j.support.boxModel&&t.scrollTop||f.scrollTop)-(t.clientTop||f.clientTop||0),left:l.left+(q.pageXOffset||j.support.boxModel&&t.scrollLeft||f.scrollLeft)-(t.clientLeft||f.clientLeft||0)}}:j.fn.offset=function(b){var f=this[0];if(b)return this.each(function(D){j.offset.setOffset(this,b,D)});if(!f||!f.ownerDocument)return null;if(f===f.ownerDocument.body)return j.offset.bodyOffset(f);j.offset.initialize();var l,n=f.offsetParent,q=f.ownerDocument,t=q.documentElement,x=q.body;l=(q=q.defaultView)?q.getComputedStyle(f,
null):f.currentStyle;for(var H=f.offsetTop,F=f.offsetLeft;(f=f.parentNode)&&f!==x&&f!==t;){if(j.offset.supportsFixedPosition&&l.position==="fixed")break;l=q?q.getComputedStyle(f,null):f.currentStyle;H-=f.scrollTop;F-=f.scrollLeft;f===n&&(H+=f.offsetTop,F+=f.offsetLeft,j.offset.doesNotAddBorder&&(!j.offset.doesAddBorderForTableAndCells||!$b.test(f.nodeName))&&(H+=parseFloat(l.borderTopWidth)||0,F+=parseFloat(l.borderLeftWidth)||0),n=f.offsetParent);j.offset.subtractsBorderForOverflowNotVisible&&l.overflow!==
"visible"&&(H+=parseFloat(l.borderTopWidth)||0,F+=parseFloat(l.borderLeftWidth)||0)}if(l.position==="relative"||l.position==="static"){H+=x.offsetTop;F+=x.offsetLeft}j.offset.supportsFixedPosition&&l.position==="fixed"&&(H+=Math.max(t.scrollTop,x.scrollTop),F+=Math.max(t.scrollLeft,x.scrollLeft));return{top:H,left:F}};j.offset={initialize:function(){var b=P.body,f=P.createElement("div"),l,n,q,t=parseFloat(j.css(b,"marginTop"))||0;j.extend(f.style,{position:"absolute",top:0,left:0,margin:0,border:0,
width:"1px",height:"1px",visibility:"hidden"});f.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>";b.insertBefore(f,b.firstChild);l=f.firstChild;n=l.firstChild;q=l.nextSibling.firstChild.firstChild;this.doesNotAddBorder=n.offsetTop!==5;this.doesAddBorderForTableAndCells=
q.offsetTop===5;n.style.position="fixed";n.style.top="20px";this.supportsFixedPosition=n.offsetTop===20||n.offsetTop===15;n.style.position=n.style.top="";l.style.overflow="hidden";l.style.position="relative";this.subtractsBorderForOverflowNotVisible=n.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=b.offsetTop!==t;b.removeChild(f);j.offset.initialize=j.noop},bodyOffset:function(b){var f=b.offsetTop,l=b.offsetLeft;j.offset.initialize();j.offset.doesNotIncludeMarginInBodyOffset&&(f+=parseFloat(j.css(b,
"marginTop"))||0,l+=parseFloat(j.css(b,"marginLeft"))||0);return{top:f,left:l}},setOffset:function(b,f,l){var n=j.css(b,"position");n==="static"&&(b.style.position="relative");var q=j(b),t=q.offset(),x=j.css(b,"top"),H=j.css(b,"left"),F=n==="absolute"&&j.inArray("auto",[x,H])>-1;n={};var D={};F&&(D=q.position());x=F?D.top:parseInt(x,10)||0;H=F?D.left:parseInt(H,10)||0;j.isFunction(f)&&(f=f.call(b,l,t));f.top!=null&&(n.top=f.top-t.top+x);f.left!=null&&(n.left=f.left-t.left+H);"using"in f?f.using.call(b,
n):q.css(n)}};j.fn.extend({position:function(){if(!this[0])return null;var b=this[0],f=this.offsetParent(),l=this.offset(),n=qb.test(f[0].nodeName)?{top:0,left:0}:f.offset();l.top-=parseFloat(j.css(b,"marginTop"))||0;l.left-=parseFloat(j.css(b,"marginLeft"))||0;n.top+=parseFloat(j.css(f[0],"borderTopWidth"))||0;n.left+=parseFloat(j.css(f[0],"borderLeftWidth"))||0;return{top:l.top-n.top,left:l.left-n.left}},offsetParent:function(){return this.map(function(){for(var b=this.offsetParent||P.body;b&&!qb.test(b.nodeName)&&
j.css(b,"position")==="static";)b=b.offsetParent;return b})}});j.each(["Left","Top"],function(b,f){var l="scroll"+f;j.fn[l]=function(n){var q=this[0],t;if(!q)return null;if(n!==k)return this.each(function(){(t=m(this))?t.scrollTo(b?j(t).scrollLeft():n,b?n:j(t).scrollTop()):this[l]=n});return(t=m(q))?"pageXOffset"in t?t[b?"pageYOffset":"pageXOffset"]:j.support.boxModel&&t.document.documentElement[l]||t.document.body[l]:q[l]}});j.each(["Height","Width"],function(b,f){var l=f.toLowerCase();j.fn["inner"+
f]=function(){return this[0]?parseFloat(j.css(this[0],l,"padding")):null};j.fn["outer"+f]=function(n){return this[0]?parseFloat(j.css(this[0],l,n?"margin":"border")):null};j.fn[l]=function(n){var q=this[0];if(!q)return n==null?null:this;if(j.isFunction(n))return this.each(function(x){var H=j(this);H[l](n.call(this,x,H[l]()))});if(j.isWindow(q)){var t=q.document.documentElement["client"+f];return q.document.compatMode==="CSS1Compat"&&t||q.document.body["client"+f]||t}if(q.nodeType===9)return Math.max(q.documentElement["client"+
f],q.body["scroll"+f],q.documentElement["scroll"+f],q.body["offset"+f],q.documentElement["offset"+f]);if(n===k){q=j.css(q,l);t=parseFloat(q);return j.isNaN(t)?q:t}return this.css(l,typeof n==="string"?n:n+"px")}});d.jQuery=d.$=j})(window);(function(d,k){function m(e){return!d(e).parents().andSelf().filter(function(){return d.curCSS(this,"visibility")==="hidden"||d.expr.filters.hidden(this)}).length}d.ui=d.ui||{};if(!d.ui.version){d.extend(d.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}});d.fn.extend({_focus:d.fn.focus,focus:function(e,h){return typeof e==="number"?this.each(function(){var a=this;setTimeout(function(){d(a).focus();h&&h.call(a)},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;e=d.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(d.curCSS(this,
"position",1))&&/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(d.curCSS(this,"overflow",1)+d.curCSS(this,"overflow-y",1)+d.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!e.length?d(document):e},zIndex:function(e){if(e!==k)return this.css("zIndex",e);if(this.length){e=d(this[0]);for(var h;e.length&&e[0]!==document;){h=e.css("position");
if(h==="absolute"||h==="relative"||h==="fixed"){h=parseInt(e.css("zIndex"),10);if(!isNaN(h)&&h!==0)return h}e=e.parent()}}return 0},disableSelection:function(){return this.bind((d.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});d.each(["Width","Height"],function(e,h){function a(w,B,u,p){d.each(g,function(){B-=parseFloat(d.curCSS(w,"padding"+this,true))||0;if(u)B-=parseFloat(d.curCSS(w,
"border"+this+"Width",true))||0;if(p)B-=parseFloat(d.curCSS(w,"margin"+this,true))||0});return B}var g=h==="Width"?["Left","Right"]:["Top","Bottom"],o=h.toLowerCase(),s={innerWidth:d.fn.innerWidth,innerHeight:d.fn.innerHeight,outerWidth:d.fn.outerWidth,outerHeight:d.fn.outerHeight};d.fn["inner"+h]=function(w){if(w===k)return s["inner"+h].call(this);return this.each(function(){d(this).css(o,a(this,w)+"px")})};d.fn["outer"+h]=function(w,B){if(typeof w!=="number")return s["outer"+h].call(this,w);return this.each(function(){d(this).css(o,
a(this,w,true,B)+"px")})}});d.extend(d.expr[":"],{data:function(e,h,a){return!!d.data(e,a[3])},focusable:function(e){var h=e.nodeName.toLowerCase(),a=d.attr(e,"tabindex");if("area"===h){h=e.parentNode;a=h.name;if(!e.href||!a||h.nodeName.toLowerCase()!=="map")return false;e=d("img[usemap=#"+a+"]")[0];return!!e&&m(e)}return(/input|select|textarea|button|object/.test(h)?!e.disabled:"a"==h?e.href||!isNaN(a):!isNaN(a))&&m(e)},tabbable:function(e){var h=d.attr(e,"tabindex");return(isNaN(h)||h>=0)&&d(e).is(":focusable")}});
d(function(){var e=document.body,h=e.appendChild(h=document.createElement("div"));d.extend(h.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});d.support.minHeight=h.offsetHeight===100;d.support.selectstart="onselectstart"in h;e.removeChild(h).style.display="none"});d.extend(d.ui,{plugin:{add:function(e,h,a){e=d.ui[e].prototype;for(var g in a){e.plugins[g]=e.plugins[g]||[];e.plugins[g].push([h,a[g]])}},call:function(e,h,a){if((h=e.plugins[h])&&e.element[0].parentNode)for(var g=0;g<h.length;g++)e.options[h[g][0]]&&
h[g][1].apply(e.element,a)}},contains:function(e,h){return document.compareDocumentPosition?e.compareDocumentPosition(h)&16:e!==h&&e.contains(h)},hasScroll:function(e,h){if(d(e).css("overflow")==="hidden")return false;h=h&&h==="left"?"scrollLeft":"scrollTop";var a=false;if(e[h]>0)return true;e[h]=1;a=e[h]>0;e[h]=0;return a},isOverAxis:function(e,h,a){return e>h&&e<h+a},isOver:function(e,h,a,g,o,s){return d.ui.isOverAxis(e,a,o)&&d.ui.isOverAxis(h,g,s)}})}})(jQuery);
(function(d,k){if(d.cleanData){var m=d.cleanData;d.cleanData=function(h){for(var a=0,g;(g=h[a])!=null;a++)d(g).triggerHandler("remove");m(h)}}else{var e=d.fn.remove;d.fn.remove=function(h,a){return this.each(function(){if(!a)if(!h||d.filter(h,[this]).length)d("*",this).add([this]).each(function(){d(this).triggerHandler("remove")});return e.call(d(this),h,a)})}}d.widget=function(h,a,g){var o=h.split(".")[0],s;h=h.split(".")[1];s=o+"-"+h;if(!g){g=a;a=d.Widget}d.expr[":"][s]=function(w){return!!d.data(w,
h)};d[o]=d[o]||{};d[o][h]=function(w,B){arguments.length&&this._createWidget(w,B)};a=new a;a.options=d.extend(true,{},a.options);d[o][h].prototype=d.extend(true,a,{namespace:o,widgetName:h,widgetEventPrefix:d[o][h].prototype.widgetEventPrefix||h,widgetBaseClass:s},g);d.widget.bridge(h,d[o][h])};d.widget.bridge=function(h,a){d.fn[h]=function(g){var o=typeof g==="string",s=Array.prototype.slice.call(arguments,1),w=this;g=!o&&s.length?d.extend.apply(null,[true,g].concat(s)):g;if(o&&g.charAt(0)==="_")return w;
o?this.each(function(){var B=d.data(this,h),u=B&&d.isFunction(B[g])?B[g].apply(B,s):B;if(u!==B&&u!==k){w=u;return false}}):this.each(function(){var B=d.data(this,h);B?B.option(g||{})._init():d.data(this,h,new a(g,this))});return w}};d.Widget=function(h,a){arguments.length&&this._createWidget(h,a)};d.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(h,a){d.data(a,this.widgetName,this);this.element=d(a);this.options=d.extend(true,{},this.options,
this._getCreateOptions(),h);var g=this;this.element.bind("remove."+this.widgetName,function(){g.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return d.metadata&&d.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(h,a){var g=h;if(arguments.length===0)return d.extend({},this.options);if(typeof h==="string"){if(a===k)return this.options[h];g={};g[h]=a}this._setOptions(g);return this},_setOptions:function(h){var a=this;d.each(h,function(g,o){a._setOption(g,o)});return this},_setOption:function(h,a){this.options[h]=a;if(h==="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(h,a,g){var o=this.options[h];a=d.Event(a);a.type=(h===this.widgetEventPrefix?h:this.widgetEventPrefix+h).toLowerCase();g=g||{};if(a.originalEvent){h=d.event.props.length;for(var s;h;){s=d.event.props[--h];a[s]=a.originalEvent[s]}}this.element.trigger(a,g);return!(d.isFunction(o)&&o.call(this.element[0],a,g)===false||a.isDefaultPrevented())}}})(jQuery);
(function(d){d.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var k=this;this.element.bind("mousedown."+this.widgetName,function(m){return k._mouseDown(m)}).bind("click."+this.widgetName,function(m){if(true===d.data(m.target,k.widgetName+".preventClickEvent")){d.removeData(m.target,k.widgetName+".preventClickEvent");m.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(k){k.originalEvent=
k.originalEvent||{};if(!k.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(k);this._mouseDownEvent=k;var m=this,e=k.which==1,h=typeof this.options.cancel=="string"?d(k.target).parents().add(k.target).filter(this.options.cancel).length:false;if(!e||h||!this._mouseCapture(k))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){m.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(k)&&this._mouseDelayMet(k)){this._mouseStarted=
this._mouseStart(k)!==false;if(!this._mouseStarted){k.preventDefault();return true}}true===d.data(k.target,this.widgetName+".preventClickEvent")&&d.removeData(k.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(a){return m._mouseMove(a)};this._mouseUpDelegate=function(a){return m._mouseUp(a)};d(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);k.preventDefault();return k.originalEvent.mouseHandled=
true}},_mouseMove:function(k){if(d.browser.msie&&!(document.documentMode>=9)&&!k.button)return this._mouseUp(k);if(this._mouseStarted){this._mouseDrag(k);return k.preventDefault()}if(this._mouseDistanceMet(k)&&this._mouseDelayMet(k))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,k)!==false)?this._mouseDrag(k):this._mouseUp(k);return!this._mouseStarted},_mouseUp:function(k){d(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){this._mouseStarted=false;k.target==this._mouseDownEvent.target&&d.data(k.target,this.widgetName+".preventClickEvent",true);this._mouseStop(k)}return false},_mouseDistanceMet:function(k){return Math.max(Math.abs(this._mouseDownEvent.pageX-k.pageX),Math.abs(this._mouseDownEvent.pageY-k.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
(function(d){d.ui=d.ui||{};var k=/left|center|right/,m=/top|center|bottom/,e=d.fn.position,h=d.fn.offset;d.fn.position=function(a){if(!a||!a.of)return e.apply(this,arguments);a=d.extend({},a);var g=d(a.of),o=g[0],s=(a.collision||"flip").split(" "),w=a.offset?a.offset.split(" "):[0,0],B,u,p;if(o.nodeType===9){B=g.width();u=g.height();p={top:0,left:0}}else if(o.setTimeout){B=g.width();u=g.height();p={top:g.scrollTop(),left:g.scrollLeft()}}else if(o.preventDefault){a.at="left top";B=u=0;p={top:a.of.pageY,
left:a.of.pageX}}else{B=g.outerWidth();u=g.outerHeight();p=g.offset()}d.each(["my","at"],function(){var v=(a[this]||"").split(" ");if(v.length===1)v=k.test(v[0])?v.concat(["center"]):m.test(v[0])?["center"].concat(v):["center","center"];v[0]=k.test(v[0])?v[0]:"center";v[1]=m.test(v[1])?v[1]:"center";a[this]=v});if(s.length===1)s[1]=s[0];w[0]=parseInt(w[0],10)||0;if(w.length===1)w[1]=w[0];w[1]=parseInt(w[1],10)||0;if(a.at[0]==="right")p.left+=B;else if(a.at[0]==="center")p.left+=B/2;if(a.at[1]==="bottom")p.top+=
u;else if(a.at[1]==="center")p.top+=u/2;p.left+=w[0];p.top+=w[1];return this.each(function(){var v=d(this),C=v.outerWidth(),z=v.outerHeight(),K=parseInt(d.curCSS(this,"marginLeft",true))||0,L=parseInt(d.curCSS(this,"marginTop",true))||0,V=C+K+(parseInt(d.curCSS(this,"marginRight",true))||0),R=z+L+(parseInt(d.curCSS(this,"marginBottom",true))||0),X=d.extend({},p),Y;if(a.my[0]==="right")X.left-=C;else if(a.my[0]==="center")X.left-=C/2;if(a.my[1]==="bottom")X.top-=z;else if(a.my[1]==="center")X.top-=
z/2;X.left=Math.round(X.left);X.top=Math.round(X.top);Y={left:X.left-K,top:X.top-L};d.each(["left","top"],function(ga,P){d.ui.position[s[ga]]&&d.ui.position[s[ga]][P](X,{targetWidth:B,targetHeight:u,elemWidth:C,elemHeight:z,collisionPosition:Y,collisionWidth:V,collisionHeight:R,offset:w,my:a.my,at:a.at})});d.fn.bgiframe&&v.bgiframe();v.offset(d.extend(X,{using:a.using}))})};d.ui.position={fit:{left:function(a,g){var o=d(window);o=g.collisionPosition.left+g.collisionWidth-o.width()-o.scrollLeft();
a.left=o>0?a.left-o:Math.max(a.left-g.collisionPosition.left,a.left)},top:function(a,g){var o=d(window);o=g.collisionPosition.top+g.collisionHeight-o.height()-o.scrollTop();a.top=o>0?a.top-o:Math.max(a.top-g.collisionPosition.top,a.top)}},flip:{left:function(a,g){if(g.at[0]!=="center"){var o=d(window);o=g.collisionPosition.left+g.collisionWidth-o.width()-o.scrollLeft();var s=g.my[0]==="left"?-g.elemWidth:g.my[0]==="right"?g.elemWidth:0,w=g.at[0]==="left"?g.targetWidth:-g.targetWidth,B=-2*g.offset[0];
a.left+=g.collisionPosition.left<0?s+w+B:o>0?s+w+B:0}},top:function(a,g){if(g.at[1]!=="center"){var o=d(window);o=g.collisionPosition.top+g.collisionHeight-o.height()-o.scrollTop();var s=g.my[1]==="top"?-g.elemHeight:g.my[1]==="bottom"?g.elemHeight:0,w=g.at[1]==="top"?g.targetHeight:-g.targetHeight,B=-2*g.offset[1];a.top+=g.collisionPosition.top<0?s+w+B:o>0?s+w+B:0}}}};if(!d.offset.setOffset){d.offset.setOffset=function(a,g){if(/static/.test(d.curCSS(a,"position")))a.style.position="relative";var o=
d(a),s=o.offset(),w=parseInt(d.curCSS(a,"top",true),10)||0,B=parseInt(d.curCSS(a,"left",true),10)||0;s={top:g.top-s.top+w,left:g.left-s.left+B};"using"in g?g.using.call(a,s):o.css(s)};d.fn.offset=function(a){var g=this[0];if(!g||!g.ownerDocument)return null;if(a)return this.each(function(){d.offset.setOffset(this,a)});return h.call(this)}}})(jQuery);
(function(d){var k=0;d.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 m=this,e=this.element[0].ownerDocument,h;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(a){if(!(m.options.disabled||m.element.attr("readonly"))){h=
false;var g=d.ui.keyCode;switch(a.keyCode){case g.PAGE_UP:m._move("previousPage",a);break;case g.PAGE_DOWN:m._move("nextPage",a);break;case g.UP:m._move("previous",a);a.preventDefault();break;case g.DOWN:m._move("next",a);a.preventDefault();break;case g.ENTER:case g.NUMPAD_ENTER:if(m.menu.active){h=true;a.preventDefault()}case g.TAB:if(!m.menu.active)break;m.menu.select(a);break;case g.ESCAPE:m.element.val(m.term);m.close(a);break;default:clearTimeout(m.searching);m.searching=setTimeout(function(){if(m.term!=
m.element.val()){m.selectedItem=null;m.search(null,a)}},m.options.delay)}}}).bind("keypress.autocomplete",function(a){if(h){h=false;a.preventDefault()}}).bind("focus.autocomplete",function(){if(!m.options.disabled){m.selectedItem=null;m.previous=m.element.val()}}).bind("blur.autocomplete",function(a){if(!m.options.disabled){clearTimeout(m.searching);m.closing=setTimeout(function(){m.close(a);m._change(a)},150)}});this._initSource();this.response=function(){return m._response.apply(m,arguments)};this.menu=
d("<ul></ul>").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",e)[0]).mousedown(function(a){var g=m.menu.element[0];d(a.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(o){o.target!==m.element[0]&&o.target!==g&&!d.ui.contains(g,o.target)&&m.close()})},1);setTimeout(function(){clearTimeout(m.closing)},13)}).menu({focus:function(a,g){g=g.item.data("item.autocomplete");false!==m._trigger("focus",a,{item:g})&&/^key/.test(a.originalEvent.type)&&
m.element.val(g.value)},selected:function(a,g){var o=g.item.data("item.autocomplete"),s=m.previous;if(m.element[0]!==e.activeElement){m.element.focus();m.previous=s;setTimeout(function(){m.previous=s;m.selectedItem=o},1)}false!==m._trigger("select",a,{item:o})&&m.element.val(o.value);m.term=m.element.val();m.close(a);m.selectedItem=o},blur:function(){m.menu.element.is(":visible")&&m.element.val()!==m.term&&m.element.val(m.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");
d.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();d.Widget.prototype.destroy.call(this)},_setOption:function(m,e){d.Widget.prototype._setOption.apply(this,arguments);m==="source"&&this._initSource();if(m==="appendTo")this.menu.element.appendTo(d(e||"body",this.element[0].ownerDocument)[0]);m==="disabled"&&
e&&this.xhr&&this.xhr.abort()},_initSource:function(){var m=this,e,h;if(d.isArray(this.options.source)){e=this.options.source;this.source=function(a,g){g(d.ui.autocomplete.filter(e,a.term))}}else if(typeof this.options.source==="string"){h=this.options.source;this.source=function(a,g){m.xhr&&m.xhr.abort();m.xhr=d.ajax({url:h,data:a,dataType:"json",autocompleteRequest:++k,success:function(o){this.autocompleteRequest===k&&g(o)},error:function(){this.autocompleteRequest===k&&g([])}})}}else this.source=
this.options.source},search:function(m,e){m=m!=null?m:this.element.val();this.term=this.element.val();if(m.length<this.options.minLength)return this.close(e);clearTimeout(this.closing);if(this._trigger("search",e)!==false)return this._search(m)},_search:function(m){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:m},this.response)},_response:function(m){if(!this.options.disabled&&m&&m.length){m=this._normalize(m);this._suggest(m);this._trigger("open")}else this.close();
this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(m){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",m)}},_change:function(m){this.previous!==this.element.val()&&this._trigger("change",m,{item:this.selectedItem})},_normalize:function(m){if(m.length&&m[0].label&&m[0].value)return m;return d.map(m,function(e){if(typeof e==="string")return{label:e,value:e};return d.extend({label:e.label||
e.value,value:e.value||e.label},e)})},_suggest:function(m){var e=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(e,m);this.menu.deactivate();this.menu.refresh();e.show();this._resizeMenu();e.position(d.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next(new d.Event("mouseover"))},_resizeMenu:function(){var m=this.menu.element;m.outerWidth(Math.max(m.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(m,e){var h=this;
d.each(e,function(a,g){h._renderItem(m,g)})},_renderItem:function(m,e){return d("<li></li>").data("item.autocomplete",e).append(d("<a></a>").text(e.label)).appendTo(m)},_move:function(m,e){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(m)||this.menu.last()&&/^next/.test(m)){this.element.val(this.term);this.menu.deactivate()}else this.menu[m](e);else this.search(null,e)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(m){return m.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
"\\$&")},filter:function(m,e){var h=RegExp(d.ui.autocomplete.escapeRegex(e),"i");return d.grep(m,function(a){return h.test(a.label||a.value||a)})}})})(jQuery);
(function(d){d.widget("ui.menu",{_create:function(){var k=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(m){if(d(m.target).closest(".ui-menu-item a").length){m.preventDefault();k.select(m)}});this.refresh()},refresh:function(){var k=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(m){k.activate(m,d(this).parent())}).mouseleave(function(){k.deactivate()})},activate:function(k,m){this.deactivate();if(this.hasScroll()){var e=m.offset().top-this.element.offset().top,h=this.element.attr("scrollTop"),a=this.element.height();if(e<0)this.element.attr("scrollTop",h+e);else e>=a&&this.element.attr("scrollTop",h+e-a+m.height())}this.active=m.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",k,{item:m})},
deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(k){this.move("next",".ui-menu-item:first",k)},previous:function(k){this.move("prev",".ui-menu-item:last",k)},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(k,m,e){if(this.active){k=this.active[k+"All"](".ui-menu-item").eq(0);
k.length?this.activate(e,k):this.activate(e,this.element.children(m))}else this.activate(e,this.element.children(m))},nextPage:function(k){if(this.hasScroll())if(!this.active||this.last())this.activate(k,this.element.children(".ui-menu-item:first"));else{var m=this.active.offset().top,e=this.element.height(),h=this.element.children(".ui-menu-item").filter(function(){var a=d(this).offset().top-m-e+d(this).height();return a<10&&a>-10});h.length||(h=this.element.children(".ui-menu-item:last"));this.activate(k,
h)}else this.activate(k,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(k){if(this.hasScroll())if(!this.active||this.first())this.activate(k,this.element.children(".ui-menu-item:last"));else{var m=this.active.offset().top,e=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var h=d(this).offset().top-m+e-d(this).height();return h<10&&h>-10});result.length||(result=this.element.children(".ui-menu-item:first"));
this.activate(k,result)}else this.activate(k,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(k){this._trigger("selected",k,{item:this.active})}})})(jQuery);
(function(d,k){var m={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},e={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};d.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(h){var a=d(this).css(h).offset().top;a<0&&
d(this).css("top",h.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 h=this,a=h.options,g=a.title||"&#160;",o=d.ui.dialog.getTitleId(h.element),s=(h.uiDialog=d("<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(u){if(a.closeOnEscape&&u.keyCode&&u.keyCode===d.ui.keyCode.ESCAPE){h.close(u);u.preventDefault()}}).attr({role:"dialog","aria-labelledby":o}).mousedown(function(u){h.moveToTop(false,u)});h.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(s);var w=(h.uiDialogTitlebar=d("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(s),B=d('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role",
"button").hover(function(){B.addClass("ui-state-hover")},function(){B.removeClass("ui-state-hover")}).focus(function(){B.addClass("ui-state-focus")}).blur(function(){B.removeClass("ui-state-focus")}).click(function(u){h.close(u);return false}).appendTo(w);(h.uiDialogTitlebarCloseText=d("<span></span>")).addClass("ui-icon ui-icon-closethick").text(a.closeText).appendTo(B);d("<span></span>").addClass("ui-dialog-title").attr("id",o).html(g).prependTo(w);if(d.isFunction(a.beforeclose)&&!d.isFunction(a.beforeClose))a.beforeClose=
a.beforeclose;w.find("*").add(w).disableSelection();a.draggable&&d.fn.draggable&&h._makeDraggable();a.resizable&&d.fn.resizable&&h._makeResizable();h._createButtons(a.buttons);h._isOpen=false;d.fn.bgiframe&&s.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(h){var a=this,g,o;if(false!==a._trigger("beforeClose",h)){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",h)});else{a.uiDialog.hide();a._trigger("close",h)}d.ui.dialog.overlay.resize();if(a.options.modal){g=0;d(".ui-dialog").each(function(){if(this!==
a.uiDialog[0]){o=d(this).css("z-index");isNaN(o)||(g=Math.max(g,o))}});d.ui.dialog.maxZ=g}return a}},isOpen:function(){return this._isOpen},moveToTop:function(h,a){var g=this.options;if(g.modal&&!h||!g.stack&&!g.modal)return this._trigger("focus",a);if(g.zIndex>d.ui.dialog.maxZ)d.ui.dialog.maxZ=g.zIndex;if(this.overlay){d.ui.dialog.maxZ+=1;this.overlay.$el.css("z-index",d.ui.dialog.overlay.maxZ=d.ui.dialog.maxZ)}h={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};
d.ui.dialog.maxZ+=1;this.uiDialog.css("z-index",d.ui.dialog.maxZ);this.element.attr(h);this._trigger("focus",a);return this},open:function(){if(!this._isOpen){var h=this.options,a=this.uiDialog;this.overlay=h.modal?new d.ui.dialog.overlay(this):null;this._size();this._position(h.position);a.show(h.show);this.moveToTop(true);h.modal&&a.bind("keypress.ui-dialog",function(g){if(g.keyCode===d.ui.keyCode.TAB){var o=d(":tabbable",this),s=o.filter(":first");o=o.filter(":last");if(g.target===o[0]&&!g.shiftKey){s.focus(1);
return false}else if(g.target===s[0]&&g.shiftKey){o.focus(1);return false}}});d(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(h){var a=this,g=false,o=d("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),s=d("<div></div>").addClass("ui-dialog-buttonset").appendTo(o);a.uiDialog.find(".ui-dialog-buttonpane").remove();
typeof h==="object"&&h!==null&&d.each(h,function(){return!(g=true)});if(g){d.each(h,function(w,B){B=d.isFunction(B)?{click:B,text:w}:B;w=d('<button type="button"></button>').attr(B,true).unbind("click").click(function(){B.click.apply(a.element[0],arguments)}).appendTo(s);d.fn.button&&w.button()});o.appendTo(a.uiDialog)}},_makeDraggable:function(){function h(w){return{position:w.position,offset:w.offset}}var a=this,g=a.options,o=d(document),s;a.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",
handle:".ui-dialog-titlebar",containment:"document",start:function(w,B){s=g.height==="auto"?"auto":d(this).height();d(this).height(d(this).height()).addClass("ui-dialog-dragging");a._trigger("dragStart",w,h(B))},drag:function(w,B){a._trigger("drag",w,h(B))},stop:function(w,B){g.position=[B.position.left-o.scrollLeft(),B.position.top-o.scrollTop()];d(this).removeClass("ui-dialog-dragging").height(s);a._trigger("dragStop",w,h(B));d.ui.dialog.overlay.resize()}})},_makeResizable:function(h){function a(w){return{originalPosition:w.originalPosition,
originalSize:w.originalSize,position:w.position,size:w.size}}h=h===k?this.options.resizable:h;var g=this,o=g.options,s=g.uiDialog.css("position");h=typeof h==="string"?h:"n,e,s,w,se,sw,ne,nw";g.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:g.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:g._minHeight(),handles:h,start:function(w,B){d(this).addClass("ui-dialog-resizing");g._trigger("resizeStart",w,a(B))},resize:function(w,B){g._trigger("resize",
w,a(B))},stop:function(w,B){d(this).removeClass("ui-dialog-resizing");o.height=d(this).height();o.width=d(this).width();g._trigger("resizeStop",w,a(B));d.ui.dialog.overlay.resize()}}).css("position",s).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var h=this.options;return h.height==="auto"?h.minHeight:Math.min(h.minHeight,h.height)},_position:function(h){var a=[],g=[0,0],o;if(h){if(typeof h==="string"||typeof h==="object"&&"0"in h){a=h.split?h.split(" "):
[h[0],h[1]];if(a.length===1)a[1]=a[0];d.each(["left","top"],function(s,w){if(+a[s]===a[s]){g[s]=a[s];a[s]=w}});h={my:a.join(" "),at:a.join(" "),offset:g.join(" ")}}h=d.extend({},d.ui.dialog.prototype.options.position,h)}else h=d.ui.dialog.prototype.options.position;(o=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(d.extend({of:window},h));o||this.uiDialog.hide()},_setOptions:function(h){var a=this,g={},o=false;d.each(h,function(s,w){a._setOption(s,w);
if(s in m)o=true;if(s in e)g[s]=w});o&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",g)},_setOption:function(h,a){var g=this.uiDialog;switch(h){case "beforeclose":h="beforeClose";break;case "buttons":this._createButtons(a);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+a);break;case "dialogClass":g.removeClass(this.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+a);break;case "disabled":a?g.addClass("ui-dialog-disabled"):
g.removeClass("ui-dialog-disabled");break;case "draggable":var o=g.is(":data(draggable)");o&&!a&&g.draggable("destroy");!o&&a&&this._makeDraggable();break;case "position":this._position(a);break;case "resizable":(o=g.is(":data(resizable)"))&&!a&&g.resizable("destroy");o&&typeof a==="string"&&g.resizable("option","handles",a);!o&&a!==false&&this._makeResizable(a);break;case "title":d(".ui-dialog-title",this.uiDialogTitlebar).html(""+(a||"&#160;"))}d.Widget.prototype._setOption.apply(this,arguments)},
_size:function(){var h=this.options,a,g,o=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(h.minWidth>h.width)h.width=h.minWidth;a=this.uiDialog.css({height:"auto",width:h.width}).height();g=Math.max(0,h.minHeight-a);if(h.height==="auto")if(d.support.minHeight)this.element.css({minHeight:g,height:"auto"});else{this.uiDialog.show();h=this.element.css("height","auto").height();o||this.uiDialog.hide();this.element.height(Math.max(h,g))}else this.element.height(Math.max(h.height-
a,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});d.extend(d.ui.dialog,{version:"1.8.11",uuid:0,maxZ:0,getTitleId:function(h){h=h.attr("id");if(!h){this.uuid+=1;h=this.uuid}return"ui-dialog-title-"+h},overlay:function(h){this.$el=d.ui.dialog.overlay.create(h)}});d.extend(d.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:d.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(h){return h+".dialog-overlay"}).join(" "),
create:function(h){if(this.instances.length===0){setTimeout(function(){d.ui.dialog.overlay.instances.length&&d(document).bind(d.ui.dialog.overlay.events,function(g){if(d(g.target).zIndex()<d.ui.dialog.overlay.maxZ)return false})},1);d(document).bind("keydown.dialog-overlay",function(g){if(h.options.closeOnEscape&&g.keyCode&&g.keyCode===d.ui.keyCode.ESCAPE){h.close(g);g.preventDefault()}});d(window).bind("resize.dialog-overlay",d.ui.dialog.overlay.resize)}var a=(this.oldInstances.pop()||d("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
height:this.height()});d.fn.bgiframe&&a.bgiframe();this.instances.push(a);return a},destroy:function(h){var a=d.inArray(h,this.instances);a!=-1&&this.oldInstances.push(this.instances.splice(a,1)[0]);this.instances.length===0&&d([document,window]).unbind(".dialog-overlay");h.remove();var g=0;d.each(this.instances,function(){g=Math.max(g,this.css("z-index"))});this.maxZ=g},height:function(){var h,a;if(d.browser.msie&&d.browser.version<7){h=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
a=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return h<a?d(window).height()+"px":h+"px"}else return d(document).height()+"px"},width:function(){var h,a;if(d.browser.msie&&d.browser.version<7){h=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);a=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return h<a?d(window).width()+"px":h+"px"}else return d(document).width()+"px"},resize:function(){var h=d([]);d.each(d.ui.dialog.overlay.instances,
function(){h=h.add(this)});h.css({width:0,height:0}).css({width:d.ui.dialog.overlay.width(),height:d.ui.dialog.overlay.height()})}});d.extend(d.ui.dialog.overlay.prototype,{destroy:function(){d.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
(function(d){d.widget("ui.slider",d.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 k=this,m=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");m.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
this.range=d([]);if(m.range){if(m.range===true){this.range=d("<div></div>");if(!m.values)m.values=[this._valueMin(),this._valueMin()];if(m.values.length&&m.values.length!==2)m.values=[m.values[0],m.values[0]]}else this.range=d("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(m.range==="min"||m.range==="max")this.range.addClass("ui-slider-range-"+m.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
if(m.values&&m.values.length)for(;d(".ui-slider-handle",this.element).length<m.values.length;)d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".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(e){e.preventDefault()}).hover(function(){m.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(m.disabled)d(this).blur();
else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(e){d(this).data("index.ui-slider-handle",e)});this.handles.keydown(function(e){var h=true,a=d(this).data("index.ui-slider-handle"),g,o,s;if(!k.options.disabled){switch(e.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:h=
false;if(!k._keySliding){k._keySliding=true;d(this).addClass("ui-state-active");g=k._start(e,a);if(g===false)return}}s=k.options.step;g=k.options.values&&k.options.values.length?o=k.values(a):o=k.value();switch(e.keyCode){case d.ui.keyCode.HOME:o=k._valueMin();break;case d.ui.keyCode.END:o=k._valueMax();break;case d.ui.keyCode.PAGE_UP:o=k._trimAlignValue(g+(k._valueMax()-k._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:o=k._trimAlignValue(g-(k._valueMax()-k._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(g===
k._valueMax())return;o=k._trimAlignValue(g+s);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(g===k._valueMin())return;o=k._trimAlignValue(g-s)}k._slide(e,a,o);return h}}).keyup(function(e){var h=d(this).data("index.ui-slider-handle");if(k._keySliding){k._keySliding=false;k._stop(e,h);k._change(e,h);d(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(k){var m=this.options,e,h,a,g,o;if(m.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();e=this._normValueFromMouse({x:k.pageX,y:k.pageY});h=this._valueMax()-this._valueMin()+1;g=this;this.handles.each(function(s){var w=Math.abs(e-g.values(s));if(h>w){h=w;a=d(this);o=s}});if(m.range===true&&this.values(1)===m.min){o+=1;a=d(this.handles[o])}if(this._start(k,
o)===false)return false;this._mouseSliding=true;g._handleIndex=o;a.addClass("ui-state-active").focus();m=a.offset();this._clickOffset=!d(k.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:k.pageX-m.left-a.width()/2,top:k.pageY-m.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(k,o,e);return this._animateOff=true},_mouseStart:function(){return true},
_mouseDrag:function(k){var m=this._normValueFromMouse({x:k.pageX,y:k.pageY});this._slide(k,this._handleIndex,m);return false},_mouseStop:function(k){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(k,this._handleIndex);this._change(k,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(k){var m;
if(this.orientation==="horizontal"){m=this.elementSize.width;k=k.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{m=this.elementSize.height;k=k.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}m=k/m;if(m>1)m=1;if(m<0)m=0;if(this.orientation==="vertical")m=1-m;k=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+m*k)},_start:function(k,m){var e={handle:this.handles[m],value:this.value()};if(this.options.values&&this.options.values.length){e.value=
this.values(m);e.values=this.values()}return this._trigger("start",k,e)},_slide:function(k,m,e){var h;if(this.options.values&&this.options.values.length){h=this.values(m?0:1);if(this.options.values.length===2&&this.options.range===true&&(m===0&&e>h||m===1&&e<h))e=h;if(e!==this.values(m)){h=this.values();h[m]=e;k=this._trigger("slide",k,{handle:this.handles[m],value:e,values:h});this.values(m?0:1);k!==false&&this.values(m,e,true)}}else if(e!==this.value()){k=this._trigger("slide",k,{handle:this.handles[m],
value:e});k!==false&&this.value(e)}},_stop:function(k,m){var e={handle:this.handles[m],value:this.value()};if(this.options.values&&this.options.values.length){e.value=this.values(m);e.values=this.values()}this._trigger("stop",k,e)},_change:function(k,m){if(!this._keySliding&&!this._mouseSliding){var e={handle:this.handles[m],value:this.value()};if(this.options.values&&this.options.values.length){e.value=this.values(m);e.values=this.values()}this._trigger("change",k,e)}},value:function(k){if(arguments.length){this.options.value=
this._trimAlignValue(k);this._refreshValue();this._change(null,0)}return this._value()},values:function(k,m){var e,h,a;if(arguments.length>1){this.options.values[k]=this._trimAlignValue(m);this._refreshValue();this._change(null,k)}if(arguments.length)if(d.isArray(arguments[0])){e=this.options.values;h=arguments[0];for(a=0;a<e.length;a+=1){e[a]=this._trimAlignValue(h[a]);this._change(null,a)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(k):this.value();
else return this._values()},_setOption:function(k,m){var e,h=0;if(d.isArray(this.options.values))h=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(k){case "disabled":if(m){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(e=0;e<h;e+=1)this._change(null,e);this._animateOff=false}},_value:function(){return this._trimAlignValue(this.options.value)},_values:function(k){var m,e;if(arguments.length){m=this.options.values[k];
return this._trimAlignValue(m)}else{m=this.options.values.slice();for(e=0;e<m.length;e+=1)m[e]=this._trimAlignValue(m[e]);return m}},_trimAlignValue:function(k){if(k<=this._valueMin())return this._valueMin();if(k>=this._valueMax())return this._valueMax();var m=this.options.step>0?this.options.step:1,e=(k-this._valueMin())%m;alignValue=k-e;if(Math.abs(e)*2>=m)alignValue+=e>0?m:-m;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},
_refreshValue:function(){var k=this.options.range,m=this.options,e=this,h=!this._animateOff?m.animate:false,a,g={},o,s,w,B;if(this.options.values&&this.options.values.length)this.handles.each(function(u){a=(e.values(u)-e._valueMin())/(e._valueMax()-e._valueMin())*100;g[e.orientation==="horizontal"?"left":"bottom"]=a+"%";d(this).stop(1,1)[h?"animate":"css"](g,m.animate);if(e.options.range===true)if(e.orientation==="horizontal"){if(u===0)e.range.stop(1,1)[h?"animate":"css"]({left:a+"%"},m.animate);
if(u===1)e.range[h?"animate":"css"]({width:a-o+"%"},{queue:false,duration:m.animate})}else{if(u===0)e.range.stop(1,1)[h?"animate":"css"]({bottom:a+"%"},m.animate);if(u===1)e.range[h?"animate":"css"]({height:a-o+"%"},{queue:false,duration:m.animate})}o=a});else{s=this.value();w=this._valueMin();B=this._valueMax();a=B!==w?(s-w)/(B-w)*100:0;g[e.orientation==="horizontal"?"left":"bottom"]=a+"%";this.handle.stop(1,1)[h?"animate":"css"](g,m.animate);if(k==="min"&&this.orientation==="horizontal")this.range.stop(1,
1)[h?"animate":"css"]({width:a+"%"},m.animate);if(k==="max"&&this.orientation==="horizontal")this.range[h?"animate":"css"]({width:100-a+"%"},{queue:false,duration:m.animate});if(k==="min"&&this.orientation==="vertical")this.range.stop(1,1)[h?"animate":"css"]({height:a+"%"},m.animate);if(k==="max"&&this.orientation==="vertical")this.range[h?"animate":"css"]({height:100-a+"%"},{queue:false,duration:m.animate})}}});d.extend(d.ui.slider,{version:"1.8.11"})})(jQuery);
(function(d,k){function m(){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};d.extend(this._defaults,this.regional[""]);this.dpDiv=d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}function e(a,g){d.extend(a,g);for(var o in g)if(g[o]==
null||g[o]==k)a[o]=g[o];return a}d.extend(d.ui,{datepicker:{version:"1.8.11"}});var h=(new Date).getTime();d.extend(m.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){e(this._defaults,a||{});return this},_attachDatepicker:function(a,g){var o=null,s;for(s in this._defaults){var w=a.getAttribute("date:"+s);if(w){o=o||{};try{o[s]=eval(w)}catch(B){o[s]=w}}}s=a.nodeName.toLowerCase();
w=s=="div"||s=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var u=this._newInst(d(a),w);u.settings=d.extend({},g||{},o||{});if(s=="input")this._connectDatepicker(a,u);else w&&this._inlineDatepicker(a,u)},_newInst:function(a,g){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:g,dpDiv:!g?this.dpDiv:d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},
_connectDatepicker:function(a,g){var o=d(a);g.append=d([]);g.trigger=d([]);if(!o.hasClass(this.markerClassName)){this._attachments(o,g);o.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(s,w,B){g.settings[w]=B}).bind("getData.datepicker",function(s,w){return this._get(g,w)});this._autoSize(g);d.data(a,"datepicker",g)}},_attachments:function(a,g){var o=this._get(g,"appendText"),s=this._get(g,"isRTL");g.append&&
g.append.remove();if(o){g.append=d('<span class="'+this._appendClass+'">'+o+"</span>");a[s?"before":"after"](g.append)}a.unbind("focus",this._showDatepicker);g.trigger&&g.trigger.remove();o=this._get(g,"showOn");if(o=="focus"||o=="both")a.focus(this._showDatepicker);if(o=="button"||o=="both"){o=this._get(g,"buttonText");var w=this._get(g,"buttonImage");g.trigger=d(this._get(g,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:w,alt:o,title:o}):d('<button type="button"></button>').addClass(this._triggerClass).html(w==
""?o:d("<img/>").attr({src:w,alt:o,title:o})));a[s?"before":"after"](g.trigger);g.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var g=new Date(2009,11,20),o=this._get(a,"dateFormat");if(o.match(/[DM]/)){var s=function(w){for(var B=0,u=0,p=0;p<w.length;p++)if(w[p].length>B){B=w[p].length;u=p}return u};g.setMonth(s(this._get(a,
o.match(/MM/)?"monthNames":"monthNamesShort")));g.setDate(s(this._get(a,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-g.getDay())}a.input.attr("size",this._formatDate(a,g).length)}},_inlineDatepicker:function(a,g){var o=d(a);if(!o.hasClass(this.markerClassName)){o.addClass(this.markerClassName).append(g.dpDiv).bind("setData.datepicker",function(s,w,B){g.settings[w]=B}).bind("getData.datepicker",function(s,w){return this._get(g,w)});d.data(a,"datepicker",g);this._setDate(g,this._getDefaultDate(g),
true);this._updateDatepicker(g);this._updateAlternate(g);g.dpDiv.show()}},_dialogDatepicker:function(a,g,o,s,w){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}e(a.settings,s||{});
g=g&&g.constructor==Date?this._formatDate(a,g):g;this._dialogInput.val(g);this._pos=w?w.length?w:[w.pageX,w.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=o;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);
this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var g=d(a),o=d.data(a,"datepicker");if(g.hasClass(this.markerClassName)){var s=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(s=="input"){o.append.remove();o.trigger.remove();g.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",
this._doKeyUp)}else if(s=="div"||s=="span")g.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var g=d(a),o=d.data(a,"datepicker");if(g.hasClass(this.markerClassName)){var s=a.nodeName.toLowerCase();if(s=="input"){a.disabled=false;o.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(s=="div"||s=="span")g.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,
function(w){return w==a?null:w})}},_disableDatepicker:function(a){var g=d(a),o=d.data(a,"datepicker");if(g.hasClass(this.markerClassName)){var s=a.nodeName.toLowerCase();if(s=="input"){a.disabled=true;o.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(s=="div"||s=="span")g.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=d.map(this._disabledInputs,function(w){return w==a?null:
w});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var g=0;g<this._disabledInputs.length;g++)if(this._disabledInputs[g]==a)return true;return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(g){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,g,o){var s=this._getInst(a);if(arguments.length==2&&typeof g=="string")return g=="defaults"?d.extend({},d.datepicker._defaults):s?g=="all"?d.extend({},
s.settings):this._get(s,g):null;var w=g||{};if(typeof g=="string"){w={};w[g]=o}if(s){this._curInst==s&&this._hideDatepicker();var B=this._getDateDatepicker(a,true),u=this._getMinMaxDate(s,"min"),p=this._getMinMaxDate(s,"max");e(s.settings,w);if(u!==null&&w.dateFormat!==k&&w.minDate===k)s.settings.minDate=this._formatDate(s,u);if(p!==null&&w.dateFormat!==k&&w.maxDate===k)s.settings.maxDate=this._formatDate(s,p);this._attachments(d(a),s);this._autoSize(s);this._setDateDatepicker(a,B);this._updateDatepicker(s)}},
_changeDatepicker:function(a,g,o){this._optionDatepicker(a,g,o)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,g){if(a=this._getInst(a)){this._setDate(a,g);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,g){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,g);return a?this._getDate(a):null},_doKeyDown:function(a){var g=d.datepicker._getInst(a.target),o=true,s=g.dpDiv.is(".ui-datepicker-rtl");
g._keyEvent=true;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker();o=false;break;case 13:o=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",g.dpDiv);o[0]?d.datepicker._selectDay(a.target,g.selectedMonth,g.selectedYear,o[0]):d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(g,"stepBigMonths"):-d.datepicker._get(g,"stepMonths"),
"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(g,"stepBigMonths"):+d.datepicker._get(g,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)d.datepicker._clearDate(a.target);o=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)d.datepicker._gotoToday(a.target);o=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,s?+1:-1,"D");o=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?
-d.datepicker._get(g,"stepBigMonths"):-d.datepicker._get(g,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,-7,"D");o=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,s?-1:+1,"D");o=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(g,"stepBigMonths"):+d.datepicker._get(g,"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,
+7,"D");o=a.ctrlKey||a.metaKey;break;default:o=false}else if(a.keyCode==36&&a.ctrlKey)d.datepicker._showDatepicker(this);else o=false;if(o){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var g=d.datepicker._getInst(a.target);if(d.datepicker._get(g,"constrainInput")){g=d.datepicker._possibleChars(d.datepicker._get(g,"dateFormat"));var o=String.fromCharCode(a.charCode==k?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||o<" "||!g||g.indexOf(o)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);
if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(g){d.datepicker.log(g)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var g=d.datepicker._getInst(a);
d.datepicker._curInst&&d.datepicker._curInst!=g&&d.datepicker._curInst.dpDiv.stop(true,true);var o=d.datepicker._get(g,"beforeShow");e(g.settings,o?o.apply(a,[a,g]):{});g.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(g);if(d.datepicker._inDialog)a.value="";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var s=false;d(a).parents().each(function(){s|=d(this).css("position")=="fixed";return!s});if(s&&d.browser.opera){d.datepicker._pos[0]-=
document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}o={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;g.dpDiv.empty();g.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(g);o=d.datepicker._checkOffset(g,o,s);g.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":s?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"});if(!g.inline){o=d.datepicker._get(g,"showAnim");
var w=d.datepicker._get(g,"duration"),B=function(){d.datepicker._datepickerShowing=true;var u=g.dpDiv.find("iframe.ui-datepicker-cover");if(u.length){var p=d.datepicker._getBorders(g.dpDiv);u.css({left:-p[0],top:-p[1],width:g.dpDiv.outerWidth(),height:g.dpDiv.outerHeight()})}};g.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&d.effects[o]?g.dpDiv.show(o,d.datepicker._get(g,"showOptions"),w,B):g.dpDiv[o||"show"](o?w:null,B);if(!o||!w)B();g.input.is(":visible")&&!g.input.is(":disabled")&&g.input.focus();d.datepicker._curInst=
g}}},_updateDatepicker:function(a){var g=this,o=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var s=a.dpDiv.find("iframe.ui-datepicker-cover");s.length&&s.css({left:-o[0],top:-o[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(){d(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover");
this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!g._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover")}}).end().find("."+
this._dayOverClass+" a").trigger("mouseover").end();o=this._getNumberOfMonths(a);s=o[1];s>1?a.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(o[0]!=1||o[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&
a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var w=a.yearshtml;setTimeout(function(){w===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);w=a.yearshtml=null},0)}},_getBorders:function(a){var g=function(o){return{thin:1,medium:2,thick:3}[o]||o};return[parseFloat(g(a.css("border-left-width"))),parseFloat(g(a.css("border-top-width")))]},_checkOffset:function(a,g,o){var s=a.dpDiv.outerWidth(),w=a.dpDiv.outerHeight(),B=a.input?a.input.outerWidth():
0,u=a.input?a.input.outerHeight():0,p=document.documentElement.clientWidth+d(document).scrollLeft(),v=document.documentElement.clientHeight+d(document).scrollTop();g.left-=this._get(a,"isRTL")?s-B:0;g.left-=o&&g.left==a.input.offset().left?d(document).scrollLeft():0;g.top-=o&&g.top==a.input.offset().top+u?d(document).scrollTop():0;g.left-=Math.min(g.left,g.left+s>p&&p>s?Math.abs(g.left+s-p):0);g.top-=Math.min(g.top,g.top+w>v&&v>w?Math.abs(w+u):0);return g},_findPos:function(a){for(var g=this._get(this._getInst(a),
"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[g?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var g=this._curInst;if(!(!g||a&&g!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(g,"showAnim");var o=this._get(g,"duration"),s=function(){d.datepicker._tidyDialog(g);this._curInst=null};d.effects&&d.effects[a]?g.dpDiv.hide(a,d.datepicker._get(g,"showOptions"),o,s):g.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?
"fadeOut":"hide"](a?o:null,s);a||s();if(a=this._get(g,"onClose"))a.apply(g.input?g.input[0]:null,[g.input?g.input.val():"",g]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a=
d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,g,o){a=d(a);var s=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(s,g+(o=="M"?this._get(s,"showCurrentAtPos"):0),o);this._updateDatepicker(s)}},_gotoToday:function(a){a=
d(a);var g=this._getInst(a[0]);if(this._get(g,"gotoCurrent")&&g.currentDay){g.selectedDay=g.currentDay;g.drawMonth=g.selectedMonth=g.currentMonth;g.drawYear=g.selectedYear=g.currentYear}else{var o=new Date;g.selectedDay=o.getDate();g.drawMonth=g.selectedMonth=o.getMonth();g.drawYear=g.selectedYear=o.getFullYear()}this._notifyChange(g);this._adjustDate(a)},_selectMonthYear:function(a,g,o){a=d(a);var s=this._getInst(a[0]);s._selectingMonthYear=false;s["selected"+(o=="M"?"Month":"Year")]=s["draw"+(o==
"M"?"Month":"Year")]=parseInt(g.options[g.selectedIndex].value,10);this._notifyChange(s);this._adjustDate(a)},_clickMonthYear:function(a){var g=this._getInst(d(a)[0]);g.input&&g._selectingMonthYear&&setTimeout(function(){g.input.focus()},0);g._selectingMonthYear=!g._selectingMonthYear},_selectDay:function(a,g,o,s){var w=d(a);if(!(d(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(w[0]))){w=this._getInst(w[0]);w.selectedDay=w.currentDay=d("a",s).html();w.selectedMonth=w.currentMonth=
g;w.selectedYear=w.currentYear=o;this._selectDate(a,this._formatDate(w,w.currentDay,w.currentMonth,w.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,g){a=this._getInst(d(a)[0]);g=g!=null?g:this._formatDate(a);a.input&&a.input.val(g);this._updateAlternate(a);var o=this._get(a,"onSelect");if(o)o.apply(a.input?a.input[0]:null,[g,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 g=this._get(a,"altField");if(g){var o=this._get(a,"altFormat")||this._get(a,"dateFormat"),s=this._getDate(a),w=this.formatDate(o,s,this._getFormatConfig(a));d(g).each(function(){d(this).val(w)})}},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 g=a.getTime();a.setMonth(0);
a.setDate(1);return Math.floor(Math.round((g-a)/864E5)/7)+1},parseDate:function(a,g,o){if(a==null||g==null)throw"Invalid arguments";g=typeof g=="object"?g.toString():g+"";if(g=="")return null;var s=(o?o.shortYearCutoff:null)||this._defaults.shortYearCutoff;s=typeof s!="string"?s:(new Date).getFullYear()%100+parseInt(s,10);for(var w=(o?o.dayNamesShort:null)||this._defaults.dayNamesShort,B=(o?o.dayNames:null)||this._defaults.dayNames,u=(o?o.monthNamesShort:null)||this._defaults.monthNamesShort,p=(o?
o.monthNames:null)||this._defaults.monthNames,v=o=-1,C=-1,z=-1,K=false,L=function(j){(j=ga+1<a.length&&a.charAt(ga+1)==j)&&ga++;return j},V=function(j){var ca=L(j);j=g.substring(Y).match(RegExp("^\\d{1,"+(j=="@"?14:j=="!"?20:j=="y"&&ca?4:j=="o"?3:2)+"}"));if(!j)throw"Missing number at position "+Y;Y+=j[0].length;return parseInt(j[0],10)},R=function(j,ca,xa){j=L(j)?xa:ca;for(ca=0;ca<j.length;ca++)if(g.substr(Y,j[ca].length).toLowerCase()==j[ca].toLowerCase()){Y+=j[ca].length;return ca+1}throw"Unknown name at position "+
Y;},X=function(){if(g.charAt(Y)!=a.charAt(ga))throw"Unexpected literal at position "+Y;Y++},Y=0,ga=0;ga<a.length;ga++)if(K)if(a.charAt(ga)=="'"&&!L("'"))K=false;else X();else switch(a.charAt(ga)){case "d":C=V("d");break;case "D":R("D",w,B);break;case "o":z=V("o");break;case "m":v=V("m");break;case "M":v=R("M",u,p);break;case "y":o=V("y");break;case "@":var P=new Date(V("@"));o=P.getFullYear();v=P.getMonth()+1;C=P.getDate();break;case "!":P=new Date((V("!")-this._ticksTo1970)/1E4);o=P.getFullYear();
v=P.getMonth()+1;C=P.getDate();break;case "'":if(L("'"))X();else K=true;break;default:X()}if(o==-1)o=(new Date).getFullYear();else if(o<100)o+=(new Date).getFullYear()-(new Date).getFullYear()%100+(o<=s?0:-100);if(z>-1){v=1;C=z;do{s=this._getDaysInMonth(o,v-1);if(C<=s)break;v++;C-=s}while(1)}P=this._daylightSavingAdjust(new Date(o,v-1,C));if(P.getFullYear()!=o||P.getMonth()+1!=v||P.getDate()!=C)throw"Invalid date";return P},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,g,o){if(!g)return"";var s=(o?o.dayNamesShort:null)||this._defaults.dayNamesShort,w=(o?o.dayNames:null)||this._defaults.dayNames,B=(o?o.monthNamesShort:null)||this._defaults.monthNamesShort;o=(o?o.monthNames:null)||this._defaults.monthNames;var u=function(L){(L=
K+1<a.length&&a.charAt(K+1)==L)&&K++;return L},p=function(L,V,R){V=""+V;if(u(L))for(;V.length<R;)V="0"+V;return V},v=function(L,V,R,X){return u(L)?X[V]:R[V]},C="",z=false;if(g)for(var K=0;K<a.length;K++)if(z)if(a.charAt(K)=="'"&&!u("'"))z=false;else C+=a.charAt(K);else switch(a.charAt(K)){case "d":C+=p("d",g.getDate(),2);break;case "D":C+=v("D",g.getDay(),s,w);break;case "o":C+=p("o",(g.getTime()-(new Date(g.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":C+=p("m",g.getMonth()+1,2);break;case "M":C+=
v("M",g.getMonth(),B,o);break;case "y":C+=u("y")?g.getFullYear():(g.getYear()%100<10?"0":"")+g.getYear()%100;break;case "@":C+=g.getTime();break;case "!":C+=g.getTime()*1E4+this._ticksTo1970;break;case "'":if(u("'"))C+="'";else z=true;break;default:C+=a.charAt(K)}return C},_possibleChars:function(a){for(var g="",o=false,s=function(B){(B=w+1<a.length&&a.charAt(w+1)==B)&&w++;return B},w=0;w<a.length;w++)if(o)if(a.charAt(w)=="'"&&!s("'"))o=false;else g+=a.charAt(w);else switch(a.charAt(w)){case "d":case "m":case "y":case "@":g+=
"0123456789";break;case "D":case "M":return null;case "'":if(s("'"))g+="'";else o=true;break;default:g+=a.charAt(w)}return g},_get:function(a,g){return a.settings[g]!==k?a.settings[g]:this._defaults[g]},_setDateFromField:function(a,g){if(a.input.val()!=a.lastVal){var o=this._get(a,"dateFormat"),s=a.lastVal=a.input?a.input.val():null,w,B;w=B=this._getDefaultDate(a);var u=this._getFormatConfig(a);try{w=this.parseDate(o,s,u)||B}catch(p){this.log(p);s=g?"":s}a.selectedDay=w.getDate();a.drawMonth=a.selectedMonth=
w.getMonth();a.drawYear=a.selectedYear=w.getFullYear();a.currentDay=s?w.getDate():0;a.currentMonth=s?w.getMonth():0;a.currentYear=s?w.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,g,o){var s=function(w){var B=new Date;B.setDate(B.getDate()+w);return B};if(g=(g=g==null||g===""?o:typeof g=="string"?function(w){try{return d.datepicker.parseDate(d.datepicker._get(a,
"dateFormat"),w,d.datepicker._getFormatConfig(a))}catch(B){}var u=(w.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,p=u.getFullYear(),v=u.getMonth();u=u.getDate();for(var C=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,z=C.exec(w);z;){switch(z[2]||"d"){case "d":case "D":u+=parseInt(z[1],10);break;case "w":case "W":u+=parseInt(z[1],10)*7;break;case "m":case "M":v+=parseInt(z[1],10);u=Math.min(u,d.datepicker._getDaysInMonth(p,v));break;case "y":case "Y":p+=parseInt(z[1],10);u=Math.min(u,
d.datepicker._getDaysInMonth(p,v))}z=C.exec(w)}return new Date(p,v,u)}(g):typeof g=="number"?isNaN(g)?o:s(g):new Date(g.getTime()))&&g.toString()=="Invalid Date"?o:g){g.setHours(0);g.setMinutes(0);g.setSeconds(0);g.setMilliseconds(0)}return this._daylightSavingAdjust(g)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,g,o){var s=!g,w=a.selectedMonth,B=a.selectedYear;g=this._restrictMinMax(a,this._determineDate(a,g,new Date));
a.selectedDay=a.currentDay=g.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth();a.drawYear=a.selectedYear=a.currentYear=g.getFullYear();if((w!=a.selectedMonth||B!=a.selectedYear)&&!o)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(s?"":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 g=new Date;g=this._daylightSavingAdjust(new Date(g.getFullYear(),
g.getMonth(),g.getDate()));var o=this._get(a,"isRTL"),s=this._get(a,"showButtonPanel"),w=this._get(a,"hideIfNoPrevNext"),B=this._get(a,"navigationAsDateFormat"),u=this._getNumberOfMonths(a),p=this._get(a,"showCurrentAtPos"),v=this._get(a,"stepMonths"),C=u[0]!=1||u[1]!=1,z=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),K=this._getMinMaxDate(a,"min"),L=this._getMinMaxDate(a,"max");p=a.drawMonth-p;var V=a.drawYear;if(p<0){p+=12;V--}if(L){var R=
this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth()-u[0]*u[1]+1,L.getDate()));for(R=K&&R<K?K:R;this._daylightSavingAdjust(new Date(V,p,1))>R;){p--;if(p<0){p=11;V--}}}a.drawMonth=p;a.drawYear=V;R=this._get(a,"prevText");R=!B?R:this.formatDate(R,this._daylightSavingAdjust(new Date(V,p-v,1)),this._getFormatConfig(a));R=this._canAdjustMonth(a,-1,V,p)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+h+".datepicker._adjustDate('#"+a.id+"', -"+v+", 'M');\" title=\""+R+'"><span class="ui-icon ui-icon-circle-triangle-'+
(o?"e":"w")+'">'+R+"</span></a>":w?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+R+'"><span class="ui-icon ui-icon-circle-triangle-'+(o?"e":"w")+'">'+R+"</span></a>";var X=this._get(a,"nextText");X=!B?X:this.formatDate(X,this._daylightSavingAdjust(new Date(V,p+v,1)),this._getFormatConfig(a));w=this._canAdjustMonth(a,+1,V,p)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+h+".datepicker._adjustDate('#"+a.id+"', +"+v+", 'M');\" title=\""+X+'"><span class="ui-icon ui-icon-circle-triangle-'+
(o?"w":"e")+'">'+X+"</span></a>":w?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+X+'"><span class="ui-icon ui-icon-circle-triangle-'+(o?"w":"e")+'">'+X+"</span></a>";v=this._get(a,"currentText");X=this._get(a,"gotoCurrent")&&a.currentDay?z:g;v=!B?v:this.formatDate(v,X,this._getFormatConfig(a));B=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+h+'.datepicker._hideDatepicker();">'+this._get(a,
"closeText")+"</button>":"";s=s?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(o?B:"")+(this._isInRange(a,X)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+h+".datepicker._gotoToday('#"+a.id+"');\">"+v+"</button>":"")+(o?"":B)+"</div>":"";B=parseInt(this._get(a,"firstDay"),10);B=isNaN(B)?0:B;v=this._get(a,"showWeek");X=this._get(a,"dayNames");this._get(a,"dayNamesShort");var Y=this._get(a,"dayNamesMin"),ga=
this._get(a,"monthNames"),P=this._get(a,"monthNamesShort"),j=this._get(a,"beforeShowDay"),ca=this._get(a,"showOtherMonths"),xa=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var Ia=this._getDefaultDate(a),Na="",Ba=0;Ba<u[0];Ba++){for(var Ra="",Ca=0;Ca<u[1];Ca++){var Sa=this._daylightSavingAdjust(new Date(V,p,a.selectedDay)),ma=" ui-corner-all",qa="";if(C){qa+='<div class="ui-datepicker-group';if(u[1]>1)switch(Ca){case 0:qa+=" ui-datepicker-group-first";ma=" ui-corner-"+(o?"right":
"left");break;case u[1]-1:qa+=" ui-datepicker-group-last";ma=" ui-corner-"+(o?"left":"right");break;default:qa+=" ui-datepicker-group-middle";ma=""}qa+='">'}qa+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+ma+'">'+(/all|left/.test(ma)&&Ba==0?o?w:R:"")+(/all|right/.test(ma)&&Ba==0?o?R:w:"")+this._generateMonthYearHeader(a,p,V,K,L,Ba>0||Ca>0,ga,P)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var ua=v?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+
"</th>":"";for(ma=0;ma<7;ma++){var ja=(ma+B)%7;ua+="<th"+((ma+B+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+X[ja]+'">'+Y[ja]+"</span></th>"}qa+=ua+"</tr></thead><tbody>";ua=this._getDaysInMonth(V,p);if(V==a.selectedYear&&p==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,ua);ma=(this._getFirstDayOfMonth(V,p)-B+7)%7;ua=C?6:Math.ceil((ma+ua)/7);ja=this._daylightSavingAdjust(new Date(V,p,1-ma));for(var Qa=0;Qa<ua;Qa++){qa+="<tr>";var Ta=!v?"":'<td class="ui-datepicker-week-col">'+
this._get(a,"calculateWeek")(ja)+"</td>";for(ma=0;ma<7;ma++){var Ja=j?j.apply(a.input?a.input[0]:null,[ja]):[true,""],ya=ja.getMonth()!=p,Ka=ya&&!xa||!Ja[0]||K&&ja<K||L&&ja>L;Ta+='<td class="'+((ma+B+6)%7>=5?" ui-datepicker-week-end":"")+(ya?" ui-datepicker-other-month":"")+(ja.getTime()==Sa.getTime()&&p==a.selectedMonth&&a._keyEvent||Ia.getTime()==ja.getTime()&&Ia.getTime()==Sa.getTime()?" "+this._dayOverClass:"")+(Ka?" "+this._unselectableClass+" ui-state-disabled":"")+(ya&&!ca?"":" "+Ja[1]+(ja.getTime()==
z.getTime()?" "+this._currentClass:"")+(ja.getTime()==g.getTime()?" ui-datepicker-today":""))+'"'+((!ya||ca)&&Ja[2]?' title="'+Ja[2]+'"':"")+(Ka?"":' onclick="DP_jQuery_'+h+".datepicker._selectDay('#"+a.id+"',"+ja.getMonth()+","+ja.getFullYear()+', this);return false;"')+">"+(ya&&!ca?"&#xa0;":Ka?'<span class="ui-state-default">'+ja.getDate()+"</span>":'<a class="ui-state-default'+(ja.getTime()==g.getTime()?" ui-state-highlight":"")+(ja.getTime()==z.getTime()?" ui-state-active":"")+(ya?" ui-priority-secondary":
"")+'" href="#">'+ja.getDate()+"</a>")+"</td>";ja.setDate(ja.getDate()+1);ja=this._daylightSavingAdjust(ja)}qa+=Ta+"</tr>"}p++;if(p>11){p=0;V++}qa+="</tbody></table>"+(C?"</div>"+(u[0]>0&&Ca==u[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");Ra+=qa}Na+=Ra}Na+=s+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return Na},_generateMonthYearHeader:function(a,g,o,s,w,B,
u,p){var v=this._get(a,"changeMonth"),C=this._get(a,"changeYear"),z=this._get(a,"showMonthAfterYear"),K='<div class="ui-datepicker-title">',L="";if(B||!v)L+='<span class="ui-datepicker-month">'+u[g]+"</span>";else{u=s&&s.getFullYear()==o;var V=w&&w.getFullYear()==o;L+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+h+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+h+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var R=0;R<12;R++)if((!u||R>=s.getMonth())&&
(!V||R<=w.getMonth()))L+='<option value="'+R+'"'+(R==g?' selected="selected"':"")+">"+p[R]+"</option>";L+="</select>"}z||(K+=L+(B||!(v&&C)?"&#xa0;":""));a.yearshtml="";if(B||!C)K+='<span class="ui-datepicker-year">'+o+"</span>";else{p=this._get(a,"yearRange").split(":");var X=(new Date).getFullYear();u=function(Y){Y=Y.match(/c[+-].*/)?o+parseInt(Y.substring(1),10):Y.match(/[+-].*/)?X+parseInt(Y,10):parseInt(Y,10);return isNaN(Y)?X:Y};g=u(p[0]);p=Math.max(g,u(p[1]||""));g=s?Math.max(g,s.getFullYear()):
g;p=w?Math.min(p,w.getFullYear()):p;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+h+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+h+".datepicker._clickMonthYear('#"+a.id+"');\">";g<=p;g++)a.yearshtml+='<option value="'+g+'"'+(g==o?' selected="selected"':"")+">"+g+"</option>";a.yearshtml+="</select>";if(d.browser.mozilla)K+='<select class="ui-datepicker-year"><option value="'+o+'" selected="selected">'+o+"</option></select>";else{K+=a.yearshtml;
a.yearshtml=null}}K+=this._get(a,"yearSuffix");if(z)K+=(B||!(v&&C)?"&#xa0;":"")+L;K+="</div>";return K},_adjustInstDate:function(a,g,o){var s=a.drawYear+(o=="Y"?g:0),w=a.drawMonth+(o=="M"?g:0);g=Math.min(a.selectedDay,this._getDaysInMonth(s,w))+(o=="D"?g:0);s=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(s,w,g)));a.selectedDay=s.getDate();a.drawMonth=a.selectedMonth=s.getMonth();a.drawYear=a.selectedYear=s.getFullYear();if(o=="M"||o=="Y")this._notifyChange(a)},_restrictMinMax:function(a,
g){var o=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");g=o&&g<o?o:g;return a&&g>a?a:g},_notifyChange:function(a){var g=this._get(a,"onChangeMonthYear");if(g)g.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,g){return this._determineDate(a,this._get(a,g+"Date"),null)},_getDaysInMonth:function(a,g){return 32-this._daylightSavingAdjust(new Date(a,
g,32)).getDate()},_getFirstDayOfMonth:function(a,g){return(new Date(a,g,1)).getDay()},_canAdjustMonth:function(a,g,o,s){var w=this._getNumberOfMonths(a);o=this._daylightSavingAdjust(new Date(o,s+(g<0?g:w[0]*w[1]),1));g<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth()));return this._isInRange(a,o)},_isInRange:function(a,g){var o=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!o||g.getTime()>=o.getTime())&&(!a||g.getTime()<=a.getTime())},_getFormatConfig:function(a){var g=
this._get(a,"shortYearCutoff");g=typeof g!="string"?g:(new Date).getFullYear()%100+parseInt(g,10);return{shortYearCutoff:g,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,g,o,s){if(!g){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}g=g?typeof g=="object"?g:this._daylightSavingAdjust(new Date(s,o,g)):this._daylightSavingAdjust(new Date(a.currentYear,
a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),g,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this;if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var g=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(g));
if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(g));return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(g)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new m;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.11";window["DP_jQuery_"+h]=d})(jQuery);
jQuery.effects||function(d,k){function m(u){var p;if(u&&u.constructor==Array&&u.length==3)return u;if(p=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(u))return[parseInt(p[1],10),parseInt(p[2],10),parseInt(p[3],10)];if(p=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(u))return[parseFloat(p[1])*2.55,parseFloat(p[2])*2.55,parseFloat(p[3])*2.55];if(p=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(u))return[parseInt(p[1],
16),parseInt(p[2],16),parseInt(p[3],16)];if(p=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(u))return[parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16),parseInt(p[3]+p[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(u))return s.transparent;return s[d.trim(u).toLowerCase()]}function e(){var u=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,p={},v,C;if(u&&u.length&&u[0]&&u[u[0]])for(var z=u.length;z--;){v=u[z];if(typeof u[v]=="string"){C=v.replace(/\-(\w)/g,function(K,L){return L.toUpperCase()});
p[C]=u[v]}}else for(v in u)if(typeof u[v]==="string")p[v]=u[v];return p}function h(u){var p,v;for(p in u){v=u[p];if(v==null||d.isFunction(v)||p in B||/scrollbar/.test(p)||!/color/i.test(p)&&isNaN(parseFloat(v)))delete u[p]}return u}function a(u,p){var v={_:0},C;for(C in p)if(u[C]!=p[C])v[C]=p[C];return v}function g(u,p,v,C){if(typeof u=="object"){C=p;v=null;p=u;u=p.effect}if(d.isFunction(p)){C=p;v=null;p={}}if(typeof p=="number"||d.fx.speeds[p]){C=v;v=p;p={}}if(d.isFunction(v)){C=v;v=null}p=p||{};
v=v||p.duration;v=d.fx.off?0:typeof v=="number"?v:v in d.fx.speeds?d.fx.speeds[v]:d.fx.speeds._default;C=C||p.complete;return[u,p,v,C]}function o(u){if(!u||typeof u==="number"||d.fx.speeds[u])return true;if(typeof u==="string"&&!d.effects[u])return true;return false}d.effects={};d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(u,p){d.fx.step[p]=function(v){if(!v.colorInit){var C;C=v.elem;var z=p,K;do{K=
d.curCSS(C,z);if(K!=""&&K!="transparent"||d.nodeName(C,"body"))break;z="backgroundColor"}while(C=C.parentNode);C=m(K);v.start=C;v.end=m(v.end);v.colorInit=true}v.elem.style[p]="rgb("+Math.max(Math.min(parseInt(v.pos*(v.end[0]-v.start[0])+v.start[0],10),255),0)+","+Math.max(Math.min(parseInt(v.pos*(v.end[1]-v.start[1])+v.start[1],10),255),0)+","+Math.max(Math.min(parseInt(v.pos*(v.end[2]-v.start[2])+v.start[2],10),255),0)+")"}});var s={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]},w=["add","remove","toggle"],B={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};d.effects.animateClass=function(u,p,v,
C){if(d.isFunction(v)){C=v;v=null}return this.queue("fx",function(){var z=d(this),K=z.attr("style")||" ",L=h(e.call(this)),V,R=z.attr("className");d.each(w,function(X,Y){u[Y]&&z[Y+"Class"](u[Y])});V=h(e.call(this));z.attr("className",R);z.animate(a(L,V),p,v,function(){d.each(w,function(X,Y){u[Y]&&z[Y+"Class"](u[Y])});if(typeof z.attr("style")=="object"){z.attr("style").cssText="";z.attr("style").cssText=K}else z.attr("style",K);C&&C.apply(this,arguments)});L=d.queue(this);V=L.splice(L.length-1,1)[0];
L.splice(1,0,V);d.dequeue(this)})};d.fn.extend({_addClass:d.fn.addClass,addClass:function(u,p,v,C){return p?d.effects.animateClass.apply(this,[{add:u},p,v,C]):this._addClass(u)},_removeClass:d.fn.removeClass,removeClass:function(u,p,v,C){return p?d.effects.animateClass.apply(this,[{remove:u},p,v,C]):this._removeClass(u)},_toggleClass:d.fn.toggleClass,toggleClass:function(u,p,v,C,z){return typeof p=="boolean"||p===k?v?d.effects.animateClass.apply(this,[p?{add:u}:{remove:u},v,C,z]):this._toggleClass(u,
p):d.effects.animateClass.apply(this,[{toggle:u},p,v,C])},switchClass:function(u,p,v,C,z){return d.effects.animateClass.apply(this,[{add:p,remove:u},v,C,z])}});d.extend(d.effects,{version:"1.8.11",save:function(u,p){for(var v=0;v<p.length;v++)p[v]!==null&&u.data("ec.storage."+p[v],u[0].style[p[v]])},restore:function(u,p){for(var v=0;v<p.length;v++)p[v]!==null&&u.css(p[v],u.data("ec.storage."+p[v]))},setMode:function(u,p){if(p=="toggle")p=u.is(":hidden")?"show":"hide";return p},getBaseline:function(u,
p){var v;switch(u[0]){case "top":v=0;break;case "middle":v=0.5;break;case "bottom":v=1;break;default:v=u[0]/p.height}switch(u[1]){case "left":u=0;break;case "center":u=0.5;break;case "right":u=1;break;default:u=u[1]/p.width}return{x:u,y:v}},createWrapper:function(u){if(u.parent().is(".ui-effects-wrapper"))return u.parent();var p={width:u.outerWidth(true),height:u.outerHeight(true),"float":u.css("float")},v=d("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",
border:"none",margin:0,padding:0});u.wrap(v);v=u.parent();if(u.css("position")=="static"){v.css({position:"relative"});u.css({position:"relative"})}else{d.extend(p,{position:u.css("position"),zIndex:u.css("z-index")});d.each(["top","left","bottom","right"],function(C,z){p[z]=u.css(z);if(isNaN(parseInt(p[z],10)))p[z]="auto"});u.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return v.css(p).show()},removeWrapper:function(u){if(u.parent().is(".ui-effects-wrapper"))return u.parent().replaceWith(u);
return u},setTransition:function(u,p,v,C){C=C||{};d.each(p,function(z,K){unit=u.cssUnit(K);if(unit[0]>0)C[K]=unit[0]*v+unit[1]});return C}});d.fn.extend({effect:function(u){var p=g.apply(this,arguments),v={options:p[1],duration:p[2],callback:p[3]};p=v.options.mode;var C=d.effects[u];if(d.fx.off||!C)return p?this[p](v.duration,v.callback):this.each(function(){v.callback&&v.callback.call(this)});return C.call(this,v)},_show:d.fn.show,show:function(u){if(o(u))return this._show.apply(this,arguments);
else{var p=g.apply(this,arguments);p[1].mode="show";return this.effect.apply(this,p)}},_hide:d.fn.hide,hide:function(u){if(o(u))return this._hide.apply(this,arguments);else{var p=g.apply(this,arguments);p[1].mode="hide";return this.effect.apply(this,p)}},__toggle:d.fn.toggle,toggle:function(u){if(o(u)||typeof u==="boolean"||d.isFunction(u))return this.__toggle.apply(this,arguments);else{var p=g.apply(this,arguments);p[1].mode="toggle";return this.effect.apply(this,p)}},cssUnit:function(u){var p=this.css(u),
v=[];d.each(["em","px","%","pt"],function(C,z){if(p.indexOf(z)>0)v=[parseFloat(p),z]});return v}});d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(u,p,v,C,z){return d.easing[d.easing.def](u,p,v,C,z)},easeInQuad:function(u,p,v,C,z){return C*(p/=z)*p+v},easeOutQuad:function(u,p,v,C,z){return-C*(p/=z)*(p-2)+v},easeInOutQuad:function(u,p,v,C,z){if((p/=z/2)<1)return C/2*p*p+v;return-C/2*(--p*(p-2)-1)+v},easeInCubic:function(u,p,v,C,z){return C*(p/=z)*p*p+v},easeOutCubic:function(u,
p,v,C,z){return C*((p=p/z-1)*p*p+1)+v},easeInOutCubic:function(u,p,v,C,z){if((p/=z/2)<1)return C/2*p*p*p+v;return C/2*((p-=2)*p*p+2)+v},easeInQuart:function(u,p,v,C,z){return C*(p/=z)*p*p*p+v},easeOutQuart:function(u,p,v,C,z){return-C*((p=p/z-1)*p*p*p-1)+v},easeInOutQuart:function(u,p,v,C,z){if((p/=z/2)<1)return C/2*p*p*p*p+v;return-C/2*((p-=2)*p*p*p-2)+v},easeInQuint:function(u,p,v,C,z){return C*(p/=z)*p*p*p*p+v},easeOutQuint:function(u,p,v,C,z){return C*((p=p/z-1)*p*p*p*p+1)+v},easeInOutQuint:function(u,
p,v,C,z){if((p/=z/2)<1)return C/2*p*p*p*p*p+v;return C/2*((p-=2)*p*p*p*p+2)+v},easeInSine:function(u,p,v,C,z){return-C*Math.cos(p/z*(Math.PI/2))+C+v},easeOutSine:function(u,p,v,C,z){return C*Math.sin(p/z*(Math.PI/2))+v},easeInOutSine:function(u,p,v,C,z){return-C/2*(Math.cos(Math.PI*p/z)-1)+v},easeInExpo:function(u,p,v,C,z){return p==0?v:C*Math.pow(2,10*(p/z-1))+v},easeOutExpo:function(u,p,v,C,z){return p==z?v+C:C*(-Math.pow(2,-10*p/z)+1)+v},easeInOutExpo:function(u,p,v,C,z){if(p==0)return v;if(p==
z)return v+C;if((p/=z/2)<1)return C/2*Math.pow(2,10*(p-1))+v;return C/2*(-Math.pow(2,-10*--p)+2)+v},easeInCirc:function(u,p,v,C,z){return-C*(Math.sqrt(1-(p/=z)*p)-1)+v},easeOutCirc:function(u,p,v,C,z){return C*Math.sqrt(1-(p=p/z-1)*p)+v},easeInOutCirc:function(u,p,v,C,z){if((p/=z/2)<1)return-C/2*(Math.sqrt(1-p*p)-1)+v;return C/2*(Math.sqrt(1-(p-=2)*p)+1)+v},easeInElastic:function(u,p,v,C,z){var K=0,L=C;if(p==0)return v;if((p/=z)==1)return v+C;K||(K=z*0.3);if(L<Math.abs(C)){L=C;u=K/4}else u=K/(2*Math.PI)*
Math.asin(C/L);return-(L*Math.pow(2,10*(p-=1))*Math.sin((p*z-u)*2*Math.PI/K))+v},easeOutElastic:function(u,p,v,C,z){var K=0,L=C;if(p==0)return v;if((p/=z)==1)return v+C;K||(K=z*0.3);if(L<Math.abs(C)){L=C;u=K/4}else u=K/(2*Math.PI)*Math.asin(C/L);return L*Math.pow(2,-10*p)*Math.sin((p*z-u)*2*Math.PI/K)+C+v},easeInOutElastic:function(u,p,v,C,z){var K=0,L=C;if(p==0)return v;if((p/=z/2)==2)return v+C;K||(K=z*0.3*1.5);if(L<Math.abs(C)){L=C;u=K/4}else u=K/(2*Math.PI)*Math.asin(C/L);if(p<1)return-0.5*L*
Math.pow(2,10*(p-=1))*Math.sin((p*z-u)*2*Math.PI/K)+v;return L*Math.pow(2,-10*(p-=1))*Math.sin((p*z-u)*2*Math.PI/K)*0.5+C+v},easeInBack:function(u,p,v,C,z,K){if(K==k)K=1.70158;return C*(p/=z)*p*((K+1)*p-K)+v},easeOutBack:function(u,p,v,C,z,K){if(K==k)K=1.70158;return C*((p=p/z-1)*p*((K+1)*p+K)+1)+v},easeInOutBack:function(u,p,v,C,z,K){if(K==k)K=1.70158;if((p/=z/2)<1)return C/2*p*p*(((K*=1.525)+1)*p-K)+v;return C/2*((p-=2)*p*(((K*=1.525)+1)*p+K)+2)+v},easeInBounce:function(u,p,v,C,z){return C-d.easing.easeOutBounce(u,
z-p,0,C,z)+v},easeOutBounce:function(u,p,v,C,z){return(p/=z)<1/2.75?C*7.5625*p*p+v:p<2/2.75?C*(7.5625*(p-=1.5/2.75)*p+0.75)+v:p<2.5/2.75?C*(7.5625*(p-=2.25/2.75)*p+0.9375)+v:C*(7.5625*(p-=2.625/2.75)*p+0.984375)+v},easeInOutBounce:function(u,p,v,C,z){if(p<z/2)return d.easing.easeInBounce(u,p*2,0,C,z)*0.5+v;return d.easing.easeOutBounce(u,p*2-z,0,C,z)*0.5+C*0.5+v}})}(jQuery);
(function(d){d.effects.fade=function(k){return this.queue(function(){var m=d(this),e=d.effects.setMode(m,k.options.mode||"hide");m.animate({opacity:e},{queue:false,duration:k.duration,easing:k.options.easing,complete:function(){k.callback&&k.callback.apply(this,arguments);m.dequeue()}})})}})(jQuery);jQuery.easing.jswing=jQuery.easing.swing;
jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(d,k,m,e,h){return jQuery.easing[jQuery.easing.def](d,k,m,e,h)},easeInQuad:function(d,k,m,e,h){return e*(k/=h)*k+m},easeOutQuad:function(d,k,m,e,h){return-e*(k/=h)*(k-2)+m},easeInOutQuad:function(d,k,m,e,h){if((k/=h/2)<1)return e/2*k*k+m;return-e/2*(--k*(k-2)-1)+m},easeInCubic:function(d,k,m,e,h){return e*(k/=h)*k*k+m},easeOutCubic:function(d,k,m,e,h){return e*((k=k/h-1)*k*k+1)+m},easeInOutCubic:function(d,k,m,e,h){if((k/=h/2)<1)return e/
2*k*k*k+m;return e/2*((k-=2)*k*k+2)+m},easeInQuart:function(d,k,m,e,h){return e*(k/=h)*k*k*k+m},easeOutQuart:function(d,k,m,e,h){return-e*((k=k/h-1)*k*k*k-1)+m},easeInOutQuart:function(d,k,m,e,h){if((k/=h/2)<1)return e/2*k*k*k*k+m;return-e/2*((k-=2)*k*k*k-2)+m},easeInQuint:function(d,k,m,e,h){return e*(k/=h)*k*k*k*k+m},easeOutQuint:function(d,k,m,e,h){return e*((k=k/h-1)*k*k*k*k+1)+m},easeInOutQuint:function(d,k,m,e,h){if((k/=h/2)<1)return e/2*k*k*k*k*k+m;return e/2*((k-=2)*k*k*k*k+2)+m},easeInSine:function(d,
k,m,e,h){return-e*Math.cos(k/h*(Math.PI/2))+e+m},easeOutSine:function(d,k,m,e,h){return e*Math.sin(k/h*(Math.PI/2))+m},easeInOutSine:function(d,k,m,e,h){return-e/2*(Math.cos(Math.PI*k/h)-1)+m},easeInExpo:function(d,k,m,e,h){return k==0?m:e*Math.pow(2,10*(k/h-1))+m},easeOutExpo:function(d,k,m,e,h){return k==h?m+e:e*(-Math.pow(2,-10*k/h)+1)+m},easeInOutExpo:function(d,k,m,e,h){if(k==0)return m;if(k==h)return m+e;if((k/=h/2)<1)return e/2*Math.pow(2,10*(k-1))+m;return e/2*(-Math.pow(2,-10*--k)+2)+m},
easeInCirc:function(d,k,m,e,h){return-e*(Math.sqrt(1-(k/=h)*k)-1)+m},easeOutCirc:function(d,k,m,e,h){return e*Math.sqrt(1-(k=k/h-1)*k)+m},easeInOutCirc:function(d,k,m,e,h){if((k/=h/2)<1)return-e/2*(Math.sqrt(1-k*k)-1)+m;return e/2*(Math.sqrt(1-(k-=2)*k)+1)+m},easeInElastic:function(d,k,m,e,h){d=1.70158;var a=0,g=e;if(k==0)return m;if((k/=h)==1)return m+e;a||(a=h*0.3);if(g<Math.abs(e)){g=e;d=a/4}else d=a/(2*Math.PI)*Math.asin(e/g);return-(g*Math.pow(2,10*(k-=1))*Math.sin((k*h-d)*2*Math.PI/a))+m},easeOutElastic:function(d,
k,m,e,h){d=1.70158;var a=0,g=e;if(k==0)return m;if((k/=h)==1)return m+e;a||(a=h*0.3);if(g<Math.abs(e)){g=e;d=a/4}else d=a/(2*Math.PI)*Math.asin(e/g);return g*Math.pow(2,-10*k)*Math.sin((k*h-d)*2*Math.PI/a)+e+m},easeInOutElastic:function(d,k,m,e,h){d=1.70158;var a=0,g=e;if(k==0)return m;if((k/=h/2)==2)return m+e;a||(a=h*0.3*1.5);if(g<Math.abs(e)){g=e;d=a/4}else d=a/(2*Math.PI)*Math.asin(e/g);if(k<1)return-0.5*g*Math.pow(2,10*(k-=1))*Math.sin((k*h-d)*2*Math.PI/a)+m;return g*Math.pow(2,-10*(k-=1))*Math.sin((k*
h-d)*2*Math.PI/a)*0.5+e+m},easeInBack:function(d,k,m,e,h,a){if(a==undefined)a=1.70158;return e*(k/=h)*k*((a+1)*k-a)+m},easeOutBack:function(d,k,m,e,h,a){if(a==undefined)a=1.70158;return e*((k=k/h-1)*k*((a+1)*k+a)+1)+m},easeInOutBack:function(d,k,m,e,h,a){if(a==undefined)a=1.70158;if((k/=h/2)<1)return e/2*k*k*(((a*=1.525)+1)*k-a)+m;return e/2*((k-=2)*k*(((a*=1.525)+1)*k+a)+2)+m},easeInBounce:function(d,k,m,e,h){return e-jQuery.easing.easeOutBounce(d,h-k,0,e,h)+m},easeOutBounce:function(d,k,m,e,h){return(k/=
h)<1/2.75?e*7.5625*k*k+m:k<2/2.75?e*(7.5625*(k-=1.5/2.75)*k+0.75)+m:k<2.5/2.75?e*(7.5625*(k-=2.25/2.75)*k+0.9375)+m:e*(7.5625*(k-=2.625/2.75)*k+0.984375)+m},easeInOutBounce:function(d,k,m,e,h){if(k<h/2)return jQuery.easing.easeInBounce(d,k*2,0,e,h)*0.5+m;return jQuery.easing.easeOutBounce(d,k*2-h,0,e,h)*0.5+e*0.5+m}});(function(d){function k(m,e){this.$element=d(m);this.options=e;this.enabled=true;this.fixTitle()}k.prototype={show:function(){var m=this.getTitle();if(m&&this.enabled){var e=this.tip();e.find(".tipsy-inner")[this.options.html?"html":"text"](m);e[0].className="tipsy";e.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).appendTo(document.body);m=d.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var h=e[0].offsetWidth,a=e[0].offsetHeight,
g=typeof this.options.gravity=="function"?this.options.gravity.call(this.$element[0]):this.options.gravity,o;switch(g.charAt(0)){case "n":o={top:m.top+m.height+this.options.offset,left:m.left+m.width/2-h/2};break;case "s":o={top:m.top-a-this.options.offset,left:m.left+m.width/2-h/2};break;case "e":o={top:m.top+m.height/2-a/2,left:m.left-h-this.options.offset};break;case "w":o={top:m.top+m.height/2-a/2,left:m.left+m.width+this.options.offset}}if(g.length==2)o.left=g.charAt(1)=="w"?m.left+m.width/2-
15:m.left+m.width/2-h+15;e.css(o).addClass("tipsy-"+g);this.options.fade?e.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity}):e.css({visibility:"visible",opacity:this.options.opacity})}},hide:function(){this.options.fade?this.tip().stop().fadeOut(function(){d(this).remove()}):this.tip().remove()},fixTitle:function(){var m=this.$element;if(m.attr("title")||typeof m.attr("original-title")!="string")m.attr("original-title",m.attr("title")||"").removeAttr("title")},
getTitle:function(){var m,e=this.$element,h=this.options;this.fixTitle();h=this.options;if(typeof h.title=="string")m=e.attr(h.title=="title"?"original-title":h.title);else if(typeof h.title=="function")m=h.title.call(e[0]);return(m=(""+m).replace(/(^\s*|\s*$)/,""))||h.fallback},tip:function(){if(!this.$tip)this.$tip=d('<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}};d.fn.tipsy=function(m){function e(s){var w=d.data(s,"tipsy");if(!w){w=new k(s,d.fn.tipsy.elementOptions(s,m));d.data(s,"tipsy",w)}return w}function h(){var s=e(this);s.hoverState="in";if(m.delayIn==0)s.show();else{s.fixTitle();setTimeout(function(){s.hoverState=="in"&&s.show()},m.delayIn)}}function a(){var s=e(this);s.hoverState="out";
m.delayOut==0?s.hide():setTimeout(function(){s.hoverState=="out"&&s.hide()},m.delayOut)}if(m===true)return this.data("tipsy");else if(typeof m=="string"){var g=this.data("tipsy");if(g)g[m]();return this}m=d.extend({},d.fn.tipsy.defaults,m);m.live||this.each(function(){e(this)});if(m.trigger!="manual"){g=m.live?"live":"bind";var o=m.trigger=="hover"?"mouseleave":"blur";this[g](m.trigger=="hover"?"mouseenter":"focus",h)[g](o,a)}return this};d.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"};d.fn.tipsy.elementOptions=function(m,e){return d.metadata?d.extend({},e,d(m).metadata()):e};d.fn.tipsy.autoNS=function(){return d(this).offset().top>d(document).scrollTop()+d(window).height()/2?"s":"n"};d.fn.tipsy.autoWE=function(){return d(this).offset().left>d(document).scrollLeft()+d(window).width()/2?"e":"w"}})(jQuery);(function(d){d.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 k=this,m=this.options,e=this.element.attr("id")||"ui-selectmenu-"+Math.random().toString(16).slice(2,10);this.ids=[e+"-button",e+"-menu"];
this._safemouseup=true;if(d.browser.msie)m.typeAhead="";this.newelement=d('<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(m.wrapperElement);(e=this.element.attr("tabindex"))&&this.newelement.attr("tabindex",e);this.newelement.data("selectelement",this.element);this.selectmenuIcon=d('<span class="'+this.widgetBaseClass+
'-icon ui-icon"></span>').prependTo(this.newelement);this.newelement.prepend('<span class="'+k.widgetBaseClass+'-status" />');d('label[for="'+this.element.attr("id")+'"]').attr("for",this.ids[0]).bind("click.selectmenu",function(){k.newelement[0].focus();return false});this.newelement.bind("mousedown.selectmenu",function(h){k._toggle(h,true);if(m.style=="popup"){k._safemouseup=false;setTimeout(function(){k._safemouseup=true},300)}return false}).bind("click.selectmenu",function(){return false}).bind("keydown.selectmenu",
function(h){var a=false;switch(h.keyCode){case d.ui.keyCode.ENTER:a=true;break;case d.ui.keyCode.SPACE:k._toggle(h);break;case d.ui.keyCode.UP:h.altKey?k.open(h):k._moveSelection(-1);break;case d.ui.keyCode.DOWN:h.altKey?k.open(h):k._moveSelection(1);break;case d.ui.keyCode.LEFT:k._moveSelection(-1);break;case d.ui.keyCode.RIGHT:k._moveSelection(1);break;case d.ui.keyCode.TAB:a=true;break;default:a=true;k._typeAhead(h.keyCode,"mouseup")}return a}).bind("mouseover.selectmenu focus.selectmenu",function(){m.disabled||
d(this).addClass(k.widgetBaseClass+"-focus ui-state-hover")}).bind("mouseout.selectmenu blur.selectmenu",function(){m.disabled||d(this).removeClass(k.widgetBaseClass+"-focus ui-state-hover")});d(document).bind("mousedown.selectmenu",function(h){k.close(h)});this.element.bind("click.selectmenu",function(){k._refreshValue()}).bind("focus.selectmenu",function(){this.newelement&&this.newelement[0].focus()});e=this.element.width();this.newelement.width(m.width?m.width:e);this.element.hide();this.list=
d('<ul class="'+k.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(m.wrapperElement);this.list.bind("keydown.selectmenu",function(h){var a=false;switch(h.keyCode){case d.ui.keyCode.UP:h.altKey?k.close(h,true):k._moveFocus(-1);break;case d.ui.keyCode.DOWN:h.altKey?k.close(h,true):k._moveFocus(1);break;case d.ui.keyCode.LEFT:k._moveFocus(-1);break;case d.ui.keyCode.RIGHT:k._moveFocus(1);
break;case d.ui.keyCode.HOME:k._moveFocus(":first");break;case d.ui.keyCode.PAGE_UP:k._scrollPage("up");break;case d.ui.keyCode.PAGE_DOWN:k._scrollPage("down");break;case d.ui.keyCode.END:k._moveFocus(":last");break;case d.ui.keyCode.ENTER:case d.ui.keyCode.SPACE:k.close(h,true);d(h.target).parents("li:eq(0)").trigger("mouseup");break;case d.ui.keyCode.TAB:a=true;k.close(h,true);break;case d.ui.keyCode.ESCAPE:k.close(h,true);break;default:a=true;k._typeAhead(h.keyCode,"focus")}return a});d(window).bind("resize.selectmenu",
d.proxy(k._refreshPosition,this))},_init:function(){var k=this,m=this.options,e=[];this.element.find("option").each(function(){e.push({value:d(this).attr("value"),text:k._formatText(d(this).text()),selected:d(this).attr("selected"),classes:d(this).attr("class"),typeahead:d(this).attr("typeahead"),parentOptGroup:d(this).parent("optgroup").attr("label"),bgImage:m.bgImage.call(d(this))})});var h=k.options.style=="popup"?" ui-state-active":"";this.list.html("");for(var a=0;a<e.length;a++){var g=d('<li role="presentation"><a href="#" tabindex="-1" role="option" aria-selected="false"'+
(e[a].typeahead?' typeahead="'+e[a].typeahead+'"':"")+">"+e[a].text+"</a></li>").data("index",a).addClass(e[a].classes).data("optionClasses",e[a].classes||"").bind("mouseup.selectmenu",function(w){if(k._safemouseup){var B=d(this).data("index")!=k._selectedIndex();k.index(d(this).data("index"));k.select(w);B&&k.change(w);k.close(w,true)}return false}).bind("click.selectmenu",function(){return false}).bind("mouseover.selectmenu focus.selectmenu",function(){k._selectedOptionLi().addClass(h);k._focusedOptionLi().removeClass(k.widgetBaseClass+
"-item-focus ui-state-hover");d(this).removeClass("ui-state-active").addClass(k.widgetBaseClass+"-item-focus ui-state-hover")}).bind("mouseout.selectmenu blur.selectmenu",function(){d(this).is(k._selectedOptionLi().selector)&&d(this).addClass(h);d(this).removeClass(k.widgetBaseClass+"-item-focus ui-state-hover")});if(e[a].parentOptGroup){var o=k.widgetBaseClass+"-group-"+e[a].parentOptGroup.replace(/[^a-zA-Z0-9]/g,"");this.list.find("li."+o).size()?this.list.find("li."+o+":last ul").append(g):d('<li role="presentation" class="'+
k.widgetBaseClass+"-group "+o+'"><span class="'+k.widgetBaseClass+'-group-label">'+e[a].parentOptGroup+"</span><ul></ul></li>").appendTo(this.list).find("ul").append(g)}else g.appendTo(this.list);this.list.bind("mousedown.selectmenu mouseup.selectmenu",function(){return false});if(m.icons)for(var s in m.icons)if(g.is(m.icons[s].find)){g.data("optionClasses",e[a].classes+" "+k.widgetBaseClass+"-hasIcon").addClass(k.widgetBaseClass+"-hasIcon");o=m.icons[s].icon||"";g.find("a:eq(0)").prepend('<span class="'+
k.widgetBaseClass+"-item-icon ui-icon "+o+'"></span>');e[a].bgImage&&g.find("span").css("background-image",e[a].bgImage)}}a=m.style=="dropdown";this.newelement.toggleClass(k.widgetBaseClass+"-dropdown",a).toggleClass(k.widgetBaseClass+"-popup",!a);this.list.toggleClass(k.widgetBaseClass+"-menu-dropdown ui-corner-bottom",a).toggleClass(k.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(m.transferClasses){a=this.element.attr("class")||"";this.newelement.add(this.list).addClass(a)}a=this.element.width();m.style=="dropdown"?this.list.width(m.menuWidth?m.menuWidth:m.width?m.width:a):this.list.width(m.menuWidth?m.menuWidth:m.width?m.width-m.handleWidth:a-m.handleWidth);if(m.maxHeight)m.maxHeight<this.list.height()&&this.list.height(m.maxHeight);else if(!m.format&&d(window).height()/3<this.list.height()){m.maxHeight=d(window).height()/3;
this.list.height(m.maxHeight)}this._optionLis=this.list.find("li:not(."+k.widgetBaseClass+"-group)");this.element.attr("disabled")===true&&this.disable();this.index(this._selectedIndex());window.setTimeout(function(){k._refreshPosition()},200)},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled").unbind(".selectmenu");d(window).unbind(".selectmenu");d(document).unbind(".selectmenu");
d("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();d.Widget.prototype.destroy.apply(this,arguments)},_typeAhead:function(k,m){var e=this,h=false,a=String.fromCharCode(k);c=a.toLowerCase();if(e.options.typeAhead=="sequential"){window.clearTimeout("ui.selectmenu-"+
e.selectmenuId);var g=typeof e._prevChar=="undefined"?"":e._prevChar.join(""),o=function(s,w,B){h=true;d(s).trigger(m);typeof e._prevChar=="undefined"?e._prevChar=[B]:e._prevChar[e._prevChar.length]=B};this.list.find("li a").each(function(s){if(!h){var w=d(this).attr("typeahead")||d(this).text();if(w.indexOf(g+a)==0)o(this,s,a);else w.indexOf(g+c)==0&&o(this,s,c)}});window.setTimeout(function(s){s._prevChar=undefined},1E3,e)}else{if(!e._prevChar)e._prevChar=["",0];h=false;this.list.find("li a").each(function(s){if(!h){var w=
d(this).text();if(w.indexOf(a)==0||w.indexOf(c)==0)if(e._prevChar[0]==a){if(e._prevChar[1]<s){h=true;d(this).trigger(m);e._prevChar[1]=s}}else{h=true;d(this).trigger(m);e._prevChar[1]=s}}});this._prevChar[0]=a}},_uiHash:function(){var k=this.index();return{index:k,option:d("option",this.element).get(k),value:this.element[0].value}},open:function(k){if(this.newelement.attr("aria-disabled")!="true"){this._closeOthers(k);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",k,this._uiHash())}},close:function(k,m){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");m&&this.newelement.focus();this._trigger("close",k,this._uiHash())}},change:function(k){this.element.trigger("change");this._trigger("change",k,this._uiHash())},select:function(k){this._trigger("select",k,this._uiHash())},_closeOthers:function(k){d("."+this.widgetBaseClass+".ui-state-active").not(this.newelement).each(function(){d(this).data("selectelement").selectmenu("close",k)});d("."+
this.widgetBaseClass+".ui-state-hover").trigger("mouseout")},_toggle:function(k,m){this.list.is("."+this.widgetBaseClass+"-open")?this.close(k,m):this.open(k)},_formatText:function(k){return this.options.format?this.options.format(k):k},_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(k){return this._optionLis.eq(parseInt(this._selectedOptionLi().data("index"),
10)+k).trigger("mouseup")},_moveFocus:function(k){k=isNaN(k)?parseInt(this._optionLis.filter(k).data("index"),10):parseInt(this._focusedOptionLi().data("index")||0,10)+k;if(k<0)k=0;if(k>this._optionLis.size()-1)k=this._optionLis.size()-1;var m=this.widgetBaseClass+"-item-"+Math.round(Math.random()*1E3);this._focusedOptionLi().find("a:eq(0)").attr("id","");this._optionLis.eq(k).find("a:eq(0)").attr("id",m).focus();this.list.attr("aria-activedescendant",m)},_scrollPage:function(k){var m=Math.floor(this.list.outerHeight()/
this.list.find("li:first").outerHeight());this._moveFocus(k=="up"?-m:m)},_setOption:function(k,m){this.options[k]=m;if(k=="disabled"){this.close();this.element.add(this.newelement).add(this.list)[m?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",m)}},index:function(k){if(arguments.length){this.element[0].selectedIndex=k;this._refreshValue()}else return this._selectedIndex()},value:function(k){if(arguments.length){this.element[0].value=
k;this._refreshValue()}else return this.element[0].value},_refreshValue:function(){var k=this.options.style=="popup"?" ui-state-active":"",m=this.widgetBaseClass+"-item-"+Math.round(Math.random()*1E3);this.list.find("."+this.widgetBaseClass+"-item-selected").removeClass(this.widgetBaseClass+"-item-selected"+k).find("a").attr("aria-selected","false").attr("id","");this._selectedOptionLi().addClass(this.widgetBaseClass+"-item-selected"+k).find("a").attr("aria-selected","true").attr("id",m);k=this.newelement.data("optionClasses")?
this.newelement.data("optionClasses"):"";var e=this._selectedOptionLi().data("optionClasses")?this._selectedOptionLi().data("optionClasses"):"";this.newelement.removeClass(k).data("optionClasses",e).addClass(e).find("."+this.widgetBaseClass+"-status").html(this._selectedOptionLi().find("a:eq(0)").html());this.list.attr("aria-activedescendant",m)},_refreshPosition:function(){var k=this.options;if(k.style=="popup"&&!k.positionOptions.offset){var m=this._selectedOptionLi();m="0 -"+(m.outerHeight()+m.offset().top-
this.list.offset().top)}this.list.css({zIndex:this.element.zIndex()}).position({of:k.positionOptions.of||this.newelement,my:k.positionOptions.my,at:k.positionOptions.at,offset:k.positionOptions.offset||m})}})})(jQuery);(function(d){var k=function(m,e){var h=d.extend({},d.fn.nivoSlider.defaults,e),a={currentSlide:0,currentImage:"",totalSlides:0,randAnim:"",running:false,paused:false,stop:false},g=d(m);g.data("nivo:vars",a);g.css("position","relative");g.addClass("nivoSlider");var o=g.children();o.each(function(){var z=d(this),K="";if(!z.is("img")){if(z.is("a")){z.addClass("nivo-imageLink");K=z}z=z.find("img:first")}var L=z.width();if(L==0)L=z.attr("width");var V=z.height();if(V==0)V=z.attr("height");L>g.width()&&
g.width(L);V>g.height()&&g.height(V);K!=""&&K.css("display","none");z.css("display","none");a.totalSlides++});if(h.startSlide>0){if(h.startSlide>=a.totalSlides)h.startSlide=a.totalSlides-1;a.currentSlide=h.startSlide}a.currentImage=d(o[a.currentSlide]).is("img")?d(o[a.currentSlide]):d(o[a.currentSlide]).find("img:first");d(o[a.currentSlide]).is("a")&&d(o[a.currentSlide]).css("display","block");g.css("background",'url("'+a.currentImage.attr("src")+'") no-repeat');for(var s=0;s<h.slices;s++){var w=
Math.round(g.width()/h.slices);s==h.slices-1?g.append(d('<div class="nivo-slice"></div>').css({left:w*s+"px",width:g.width()-w*s+"px"})):g.append(d('<div class="nivo-slice"></div>').css({left:w*s+"px",width:w+"px"}))}g.append(d('<div class="nivo-caption"><p></p></div>').css({display:"none",opacity:h.captionOpacity}));if(a.currentImage.attr("title")!=""){s=a.currentImage.attr("title");if(s.substr(0,1)=="#")s=d(s).html();d(".nivo-caption p",g).html(s);d(".nivo-caption",g).fadeIn(h.animSpeed)}var B=
0;if(!h.manualAdvance&&o.length>1)B=setInterval(function(){v(g,o,h,false)},h.pauseTime);if(h.directionNav){g.append('<div class="nivo-directionNav"><a class="nivo-prevNav">Prev</a><a class="nivo-nextNav">Next</a></div>');if(h.directionNavHide){d(".nivo-directionNav",g).hide();g.hover(function(){d(".nivo-directionNav",g).show()},function(){d(".nivo-directionNav",g).hide()})}d("a.nivo-prevNav",g).live("click",function(){if(a.running)return false;clearInterval(B);B="";a.currentSlide-=2;v(g,o,h,"prev")});
d("a.nivo-nextNav",g).live("click",function(){if(a.running)return false;clearInterval(B);B="";v(g,o,h,"next")})}if(h.controlNav){w=d('<div class="nivo-controlNav"></div>');g.append(w);for(s=0;s<o.length;s++)if(h.controlNavThumbs){var u=o.eq(s);u.is("img")||(u=u.find("img:first"));h.controlNavThumbsFromRel?w.append('<a class="nivo-control" rel="'+s+'"><img src="'+u.attr("rel")+'" alt="" /></a>'):w.append('<a class="nivo-control" rel="'+s+'"><img src="'+u.attr("src").replace(h.controlNavThumbsSearch,
h.controlNavThumbsReplace)+'" alt="" /></a>')}else w.append('<a class="nivo-control" rel="'+s+'">'+(s+1)+"</a>");d(".nivo-controlNav a:eq("+a.currentSlide+")",g).addClass("active");d(".nivo-controlNav a",g).live("click",function(){if(a.running)return false;if(d(this).hasClass("active"))return false;clearInterval(B);B="";g.css("background",'url("'+a.currentImage.attr("src")+'") no-repeat');a.currentSlide=d(this).attr("rel")-1;v(g,o,h,"control")})}h.keyboardNav&&d(window).keypress(function(z){if(z.keyCode==
"37"){if(a.running)return false;clearInterval(B);B="";a.currentSlide-=2;v(g,o,h,"prev")}if(z.keyCode=="39"){if(a.running)return false;clearInterval(B);B="";v(g,o,h,"next")}});h.pauseOnHover&&g.hover(function(){a.paused=true;clearInterval(B);B=""},function(){a.paused=false;if(B==""&&!h.manualAdvance)B=setInterval(function(){v(g,o,h,false)},h.pauseTime)});g.bind("nivo:animFinished",function(){a.running=false;d(o).each(function(){d(this).is("a")&&d(this).css("display","none")});d(o[a.currentSlide]).is("a")&&
d(o[a.currentSlide]).css("display","block");if(B==""&&!a.paused&&!h.manualAdvance)B=setInterval(function(){v(g,o,h,false)},h.pauseTime);h.afterChange.call(this)});var p=function(z,K){var L=0;d(".nivo-slice",z).each(function(){var V=d(this),R=Math.round(z.width()/K.slices);L==K.slices-1?V.css("width",z.width()-R*L+"px"):V.css("width",R+"px");L++})},v=function(z,K,L,V){var R=z.data("nivo:vars");R&&R.currentSlide==R.totalSlides-1&&L.lastSlide.call(this);if((!R||R.stop)&&!V)return false;L.beforeChange.call(this);
if(V){V=="prev"&&z.css("background",'url("'+R.currentImage.attr("src")+'") no-repeat');V=="next"&&z.css("background",'url("'+R.currentImage.attr("src")+'") no-repeat')}else z.css("background",'url("'+R.currentImage.attr("src")+'") no-repeat');R.currentSlide++;if(R.currentSlide==R.totalSlides){R.currentSlide=0;L.slideshowEnd.call(this)}if(R.currentSlide<0)R.currentSlide=R.totalSlides-1;R.currentImage=d(K[R.currentSlide]).is("img")?d(K[R.currentSlide]):d(K[R.currentSlide]).find("img:first");if(L.controlNav){d(".nivo-controlNav a",
z).removeClass("active");d(".nivo-controlNav a:eq("+R.currentSlide+")",z).addClass("active")}if(R.currentImage.attr("title")!=""){var X=R.currentImage.attr("title");if(X.substr(0,1)=="#")X=d(X).html();d(".nivo-caption",z).css("display")=="block"?d(".nivo-caption p",z).fadeOut(L.animSpeed,function(){d(this).html(X);d(this).fadeIn(L.animSpeed)}):d(".nivo-caption p",z).html(X);d(".nivo-caption",z).fadeIn(L.animSpeed)}else d(".nivo-caption",z).fadeOut(L.animSpeed);var Y=0;d(".nivo-slice",z).each(function(){var ca=
Math.round(z.width()/L.slices);d(this).css({height:"0px",opacity:"0",background:'url("'+R.currentImage.attr("src")+'") no-repeat -'+(ca+Y*ca-ca)+"px 0%"});Y++});if(L.effect=="random"){K=["sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade","slideInRight","slideInLeft"];R.randAnim=K[Math.floor(Math.random()*(K.length+1))];if(R.randAnim==undefined)R.randAnim="fade"}if(L.effect.indexOf(",")!=-1){K=L.effect.split(",");R.randAnim=K[Math.floor(Math.random()*
K.length)];if(R.randAnim==undefined)R.randAnim="fade"}R.running=true;if(L.effect=="sliceDown"||L.effect=="sliceDownRight"||R.randAnim=="sliceDownRight"||L.effect=="sliceDownLeft"||R.randAnim=="sliceDownLeft"){var ga=0;Y=0;p(z,L);K=d(".nivo-slice",z);if(L.effect=="sliceDownLeft"||R.randAnim=="sliceDownLeft")K=d(".nivo-slice",z)._reverse();K.each(function(){var ca=d(this);ca.css({top:"0px"});Y==L.slices-1?setTimeout(function(){ca.animate({height:"100%",opacity:"1.0"},L.animSpeed,"",function(){z.trigger("nivo:animFinished")})},
100+ga):setTimeout(function(){ca.animate({height:"100%",opacity:"1.0"},L.animSpeed)},100+ga);ga+=50;Y++})}else if(L.effect=="sliceUp"||L.effect=="sliceUpRight"||R.randAnim=="sliceUpRight"||L.effect=="sliceUpLeft"||R.randAnim=="sliceUpLeft"){Y=ga=0;p(z,L);K=d(".nivo-slice",z);if(L.effect=="sliceUpLeft"||R.randAnim=="sliceUpLeft")K=d(".nivo-slice",z)._reverse();K.each(function(){var ca=d(this);ca.css({bottom:"0px"});Y==L.slices-1?setTimeout(function(){ca.animate({height:"100%",opacity:"1.0"},L.animSpeed,
"",function(){z.trigger("nivo:animFinished")})},100+ga):setTimeout(function(){ca.animate({height:"100%",opacity:"1.0"},L.animSpeed)},100+ga);ga+=50;Y++})}else if(L.effect=="sliceUpDown"||L.effect=="sliceUpDownRight"||R.randAnim=="sliceUpDown"||L.effect=="sliceUpDownLeft"||R.randAnim=="sliceUpDownLeft"){var P=Y=ga=0;p(z,L);K=d(".nivo-slice",z);if(L.effect=="sliceUpDownLeft"||R.randAnim=="sliceUpDownLeft")K=d(".nivo-slice",z)._reverse();K.each(function(){var ca=d(this);if(Y==0){ca.css("top","0px");
Y++}else{ca.css("bottom","0px");Y=0}P==L.slices-1?setTimeout(function(){ca.animate({height:"100%",opacity:"1.0"},L.animSpeed,"",function(){z.trigger("nivo:animFinished")})},100+ga):setTimeout(function(){ca.animate({height:"100%",opacity:"1.0"},L.animSpeed)},100+ga);ga+=50;P++})}else if(L.effect=="fold"||R.randAnim=="fold"){Y=ga=0;p(z,L);d(".nivo-slice",z).each(function(){var ca=d(this),xa=ca.width();ca.css({top:"0px",height:"100%",width:"0px"});Y==L.slices-1?setTimeout(function(){ca.animate({width:xa,
opacity:"1.0"},L.animSpeed,"",function(){z.trigger("nivo:animFinished")})},100+ga):setTimeout(function(){ca.animate({width:xa,opacity:"1.0"},L.animSpeed)},100+ga);ga+=50;Y++})}else if(L.effect=="fade"||R.randAnim=="fade"){var j=d(".nivo-slice:first",z);j.css({height:"100%",width:z.width()+"px"});j.animate({opacity:"1.0"},L.animSpeed*2,"",function(){z.trigger("nivo:animFinished")})}else if(L.effect=="slideInRight"||R.randAnim=="slideInRight"){j=d(".nivo-slice:first",z);j.css({height:"100%",width:"0px",
opacity:"1"});j.animate({width:z.width()+"px"},L.animSpeed*2,"",function(){z.trigger("nivo:animFinished")})}else if(L.effect=="slideInLeft"||R.randAnim=="slideInLeft"){j=d(".nivo-slice:first",z);j.css({height:"100%",width:"0px",opacity:"1",left:"",right:"0px"});j.animate({width:z.width()+"px"},L.animSpeed*2,"",function(){j.css({left:"0px",right:""});z.trigger("nivo:animFinished")})}},C=function(z){this.console&&typeof console.log!="undefined"&&console.log(z)};this.stop=function(){if(!d(m).data("nivo:vars").stop){d(m).data("nivo:vars").stop=
true;C("Stop Slider")}};this.start=function(){if(d(m).data("nivo:vars").stop){d(m).data("nivo:vars").stop=false;C("Start Slider")}};h.afterLoad.call(this)};d.fn.nivoSlider=function(m){return this.each(function(){var e=d(this);if(!e.data("nivoslider")){var h=new k(this,m);e.data("nivoslider",h)}})};d.fn.nivoSlider.defaults={effect:"random",slices:15,animSpeed:500,pauseTime:3E3,startSlide:0,directionNav:true,directionNavHide:true,controlNav:true,controlNavThumbs:false,controlNavThumbsFromRel:false,
controlNavThumbsSearch:".jpg",controlNavThumbsReplace:"_thumb.jpg",keyboardNav:true,pauseOnHover:true,manualAdvance:false,captionOpacity:0.8,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};d.fn._reverse=[].reverse})(jQuery);(function(d){d.anythingSlider=function(k,m){var e=this;e.$el=d(k).addClass("anythingBase").wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>');e.$el.data("AnythingSlider",e);e.init=function(){e.options=d.extend({},d.anythingSlider.defaults,m);d.isFunction(e.options.onBeforeInitialize)&&e.$el.bind("before_initialize",e.options.onBeforeInitialize);e.$el.trigger("before_initialize",e);e.$wrapper=e.$el.parent().closest("div.anythingSlider").addClass("anythingSlider-"+e.options.theme);
e.$window=e.$el.closest("div.anythingWindow");e.$controls=d('<div class="anythingControls"></div>').appendTo(d(e.options.appendControlsTo).length?d(e.options.appendControlsTo):e.$wrapper);e.$nav=d('<ul class="thumbNav" />').appendTo(e.$controls);e.timer=null;e.flag=false;e.playing=false;e.hovered=false;e.panelSize=[];e.currentPage=e.options.startPanel;e.options.playRtl&&e.$wrapper.addClass("rtl");e.original=[e.options.autoPlay,e.options.buildNavigation,e.options.buildArrows];e.updateSlider();e.$currentPage=
e.$items.eq(e.currentPage);e.$lastPage=e.$currentPage;e.runTimes=d("div.anythingSlider").index(e.$wrapper)+1;e.regex=RegExp("panel"+e.runTimes+"-(\\d+)","i");if(!d.isFunction(d.easing[e.options.easing]))e.options.easing="swing";e.options.theme!="default"&&!d("link[href*="+e.options.theme+"]").length&&d("body").append('<link rel="stylesheet" href="'+e.options.themeDirectory.replace(/\{themeName\}/g,e.options.theme)+'" type="text/css" />');e.options.pauseOnHover&&e.$wrapper.hover(function(){if(e.playing){e.$el.trigger("slideshow_paused",
e);e.clearTimer(true)}},function(){if(e.playing){e.$el.trigger("slideshow_unpaused",e);e.startStop(e.playing,true)}});var h=e.options.hashTags?e.gotoHash()||e.options.startPanel:e.options.startPanel;e.setCurrentPage(h,false);e.slideControls(false);e.$wrapper.hover(function(a){e.hovered=a.type=="mouseenter"?true:false;e.slideControls(e.hovered,false)});e.options.enableKeyboard&&d(document).keyup(function(a){if(e.$wrapper.is(".activeSlider"))switch(a.which){case 39:e.goForward();break;case 37:e.goBack()}});
d.isFunction(e.options.onShowPause)&&e.$el.bind("slideshow_paused",e.options.onShowPause);d.isFunction(e.options.onShowUnpause)&&e.$el.bind("slideshow_unpaused",e.options.onShowUnpause);d.isFunction(e.options.onSlideInit)&&e.$el.bind("slide_init",e.options.onSlideInit);d.isFunction(e.options.onSlideBegin)&&e.$el.bind("slide_begin",e.options.onSlideBegin);d.isFunction(e.options.onShowStop)&&e.$el.bind("slideshow_stop",e.options.onShowStop);d.isFunction(e.options.onShowStart)&&e.$el.bind("slideshow_start",
e.options.onShowStart);d.isFunction(e.options.onInitialized)&&e.$el.bind("initialized",e.options.onInitialized);d.isFunction(e.options.onSWFComplete)&&e.$el.bind("swf_completed",e.options.onSWFComplete);d.isFunction(e.options.onSlideComplete)&&e.$el.bind("slide_complete",function(){setTimeout(function(){e.options.onSlideComplete(e)},0)});e.$el.trigger("initialized",e)};e.updateSlider=function(){e.$el.find("li.cloned").remove();e.$nav.empty();e.$items=e.$el.find("> li");e.pages=e.$items.length;if(e.options.resizeContents){e.options.width&&
e.$wrapper.add(e.$items).css("width",e.options.width);e.options.height&&e.$wrapper.add(e.$items).css("height",e.options.height)}if(e.pages===1){e.options.autoPlay=false;e.options.buildNavigation=false;e.options.buildArrows=false;e.$controls.hide();e.$nav.hide();e.$forward&&e.$forward.add(e.$back).hide()}else{e.options.autoPlay=e.original[0];e.options.buildNavigation=e.original[1];e.options.buildArrows=e.original[2];e.$controls.show();e.$nav.show();e.$forward&&e.$forward.add(e.$back).show()}e.buildNavigation();
if(e.options.autoPlay){e.playing=!e.options.startStopped;e.buildAutoPlay()}e.options.buildArrows&&e.buildNextBackButtons();e.$el.prepend(e.$items.filter(":last").clone().addClass("cloned").removeAttr("id"));e.$el.append(e.$items.filter(":first").clone().addClass("cloned").removeAttr("id"));e.$el.find("li.cloned").each(function(){d(this).html(function(h,a){return a.replace(/<a/gi,"<span").replace(/\/a>/gi,"/span>")})});e.$items=e.$el.find("> li").addClass("panel");e.setDimensions();e.options.resizeContents||
d(window).load(function(){e.setDimensions()});if(e.currentPage>e.pages){e.currentPage=e.pages;e.setCurrentPage(e.pages,false)}e.$nav.find("a").eq(e.currentPage-1).addClass("cur");e.hasEmb=e.$items.find("embed[src*=youtube]").length;e.hasSwfo=typeof swfobject!=="undefined"&&swfobject.hasOwnProperty("embedSWF")&&d.isFunction(swfobject.embedSWF)?true:false;e.hasEmb&&e.hasSwfo&&e.$items.find("embed[src*=youtube]").each(function(h){var a=d(this).parent()[0].tagName=="OBJECT"?d(this).parent():d(this);a.wrap('<div id="ytvideo'+
h+'"></div>');swfobject.embedSWF(d(this).attr("src")+"&enablejsapi=1&version=3&playerapiid=ytvideo"+h,"ytvideo"+h,a.attr("width"),a.attr("height"),"10",null,null,{allowScriptAccess:"always",wmode:e.options.addWmodeToObject},{"class":a.attr("class"),style:a.attr("style")},function(){h>=e.hasEmb-1&&e.$el.trigger("swf_completed",e)})});e.$items.find("a").unbind("focus").bind("focus",function(h){e.$items.find(".focusedLink").removeClass("focusedLink");d(this).addClass("focusedLink");var a=d(this).closest(".panel");
if(!a.is(".activePage")){e.gotoPage(e.$items.index(a));h.preventDefault()}})};e.buildNavigation=function(){e.options.buildNavigation&&e.pages>1&&e.$items.filter(":not(.cloned)").each(function(h){var a=h+1;h=(a==1?"first":"")+(a==e.pages?"last":"");h=d('<a href="#"></a>').addClass("panel"+a).wrap('<li class="'+h+'" />');e.$nav.append(h.parent());if(d.isFunction(e.options.navigationFormatter)){var g=e.options.navigationFormatter(a,d(this));h.html(g);parseInt(h.css("text-indent"),10)<0&&h.addClass(e.options.tooltipClass).attr("title",
g)}else h.text(a);h.bind(e.options.clickControls,function(o){if(!e.flag&&e.options.enableNavigation){e.flag=true;setTimeout(function(){e.flag=false},100);e.gotoPage(a);e.options.hashTags&&e.setHash(a)}o.preventDefault()})})};e.buildNextBackButtons=function(){if(!e.$forward){e.$forward=d('<span class="arrow forward"><a href="#">'+e.options.forwardText+"</a></span>");e.$back=d('<span class="arrow back"><a href="#">'+e.options.backText+"</a></span>");e.$back.bind(e.options.clickArrows,function(h){e.goBack();
h.preventDefault()});e.$forward.bind(e.options.clickArrows,function(h){e.goForward();h.preventDefault()});e.$back.add(e.$forward).find("a").bind("focusin focusout",function(){d(this).toggleClass("hover")});e.$wrapper.prepend(e.$forward).prepend(e.$back);e.$arrowWidth=e.$forward.width()}};e.buildAutoPlay=function(){if(!e.$startStop){e.$startStop=d("<a href='#' class='start-stop'></a>").html(e.playing?e.options.stopText:e.options.startText);e.$controls.prepend(e.$startStop);e.$startStop.bind(e.options.clickSlideshow,
function(h){if(e.options.enablePlay){e.startStop(!e.playing);if(e.playing)e.options.playRtl?e.goBack(true):e.goForward(true)}h.preventDefault()}).bind("focusin focusout",function(){d(this).toggleClass("hover")});e.startStop(e.playing)}};e.setDimensions=function(){var h,a,g,o,s,w=0,B=e.$window.width(),u=d(window).width();e.$items.each(function(p){g=d(this).children("*");if(e.options.resizeContents){h=parseInt(e.options.width,10)||B;a=parseInt(e.options.height,10)||e.$window.height();d(this).css({width:h,
height:a});if(g.length==1){g.css({width:"100%",height:"100%"});g[0].tagName=="OBJECT"&&g.find("embed").andSelf().attr({width:"100%",height:"100%"})}}else{h=d(this).width();s=h>=u?true:false;if(g.length==1&&s){o=g.width()>=u?B:g.width();d(this).css("width",o);g.css("max-width",o);h=o}h=s?e.options.width||B:h;d(this).css("width",h);a=d(this).outerHeight();d(this).css("height",a)}e.panelSize[p]=[h,a,w];w+=h});e.$el.css("width",w<e.options.maxOverallWidth?w:e.options.maxOverallWidth)};e.gotoPage=function(h,
a,g){if(e.pages!==1){e.$lastPage=e.$items.eq(e.currentPage);if(typeof h==="undefined"||h===null){h=e.options.startPage;e.setCurrentPage(e.options.startPage)}if(!(e.hasEmb&&e.checkVideo(e.playing))){if(h>e.pages+1)h=e.pages;if(h<0)h=1;e.$currentPage=e.$items.eq(h);e.currentPage=h;e.$el.trigger("slide_init",e);e.slideControls(true,false);if(a!==true)a=false;if(!a||e.options.stopAtEnd&&h==e.pages)e.startStop(false);e.$el.trigger("slide_begin",e);e.options.resizeContents||e.$wrapper.filter(":not(:animated)").animate({width:e.panelSize[h][0],
height:e.panelSize[h][1]},{queue:false,duration:e.options.animationTime,easing:e.options.easing});e.$window.filter(":not(:animated)").animate({scrollLeft:e.panelSize[h][2]},{queue:false,duration:e.options.animationTime,easing:e.options.easing,complete:function(){e.endAnimation(h,g)}})}}};e.endAnimation=function(h,a){if(h===0){e.$window.scrollLeft(e.panelSize[e.pages][2]);h=e.pages}else if(h>e.pages){e.$window.scrollLeft(e.panelSize[1][2]);h=1}e.setCurrentPage(h,false);e.$items.removeClass("activePage").eq(h).addClass("activePage");
e.hovered||e.slideControls(false);if(e.hasEmb){var g=e.$currentPage.find("object[id*=ytvideo], embed[id*=ytvideo]");g.length&&d.isFunction(g[0].getPlayerState)&&g[0].getPlayerState()>0&&g[0].getPlayerState()!=5&&g[0].playVideo()}e.$el.trigger("slide_complete",e);typeof a==="function"&&a(e);e.options.autoPlayLocked&&!e.playing&&setTimeout(function(){e.startStop(true)},e.options.resumeDelay-e.options.delay)};e.setCurrentPage=function(h,a){if(h>e.pages+1)h=e.pages;if(h<0)h=1;if(e.options.buildNavigation){e.$nav.find(".cur").removeClass("cur");
e.$nav.find("a").eq(h-1).addClass("cur")}if(!a){e.$wrapper.css({width:e.panelSize[h][0],height:e.panelSize[h][1]});e.$wrapper.scrollLeft(0);e.$window.scrollLeft(e.panelSize[h][2])}e.currentPage=h;if(!e.$wrapper.is(".activeSlider")){d(".activeSlider").removeClass("activeSlider");e.$wrapper.addClass("activeSlider")}};e.goForward=function(h){if(h!==true){h=false;e.startStop(false)}e.gotoPage(e.currentPage+1,h)};e.goBack=function(h){if(h!==true){h=false;e.startStop(false)}e.gotoPage(e.currentPage-1,h)};
e.gotoHash=function(){var h=window.location.hash.match(e.regex);return h===null?"":parseInt(h[1],10)};e.setHash=function(h){var a="panel"+e.runTimes+"-",g=window.location.hash;if(typeof g!=="undefined")window.location.hash=g.indexOf(a)>0?g.replace(e.regex,a+h):g+"&"+a+h};e.slideControls=function(h){var a=h?"slideDown":"slideUp",g=h?0:e.options.animationTime,o=h?e.options.animationTime:0;h=h?0:1;e.options.toggleControls&&e.$controls.stop(true,true).delay(g)[a](e.options.animationTime/2).delay(o);if(e.options.buildArrows&&
e.options.toggleArrows){if(!e.hovered&&e.playing){h=1;o=0}e.$forward.stop(true,true).delay(g).animate({right:h*e.$arrowWidth,opacity:o},e.options.animationTime/2);e.$back.stop(true,true).delay(g).animate({left:h*e.$arrowWidth,opacity:o},e.options.animationTime/2)}};e.clearTimer=function(h){if(e.timer){window.clearInterval(e.timer);h||e.$el.trigger("slideshow_stop",e)}};e.startStop=function(h,a){if(h!==true)h=false;h&&!a&&e.$el.trigger("slideshow_start",e);e.playing=h;if(e.options.autoPlay){e.$startStop.toggleClass("playing",
h).html(h?e.options.stopText:e.options.startText);if(parseInt(e.$startStop.css("text-indent"),10)<0)e.$startStop.addClass(e.options.tooltipClass).attr("title",h?"Stop":"Start")}if(h){e.clearTimer(true);e.timer=window.setInterval(function(){e.hasEmb&&e.checkVideo(h)||(e.options.playRtl?e.goBack(true):e.goForward(true))},e.options.delay)}else e.clearTimer()};e.checkVideo=function(h){var a,g,o=false;e.$items.find("object[id*=ytvideo], embed[id*=ytvideo]").each(function(){a=d(this);if(a.length&&d.isFunction(a[0].getPlayerState)){g=
a[0].getPlayerState();if(h&&(g==1||g>2)&&e.$items.index(a.closest("li.panel"))==e.currentPage&&e.options.resumeOnVideoEnd)o=true;else g>0&&a[0].pauseVideo()}});return o};e.init()};d.anythingSlider.defaults={width:null,height:null,resizeContents:true,tooltipClass:"tooltip",theme:"default",themeDirectory:"css/theme-{themeName}.css",startPanel:1,hashTags:true,enableKeyboard:true,buildArrows:true,toggleArrows:false,buildNavigation:true,enableNavigation:true,toggleControls:false,appendControlsTo:null,
navigationFormatter:null,forwardText:"&raquo;",backText:"&laquo;",enablePlay:true,autoPlay:true,autoPlayLocked:false,startStopped:false,pauseOnHover:true,resumeOnVideoEnd:true,stopAtEnd:false,playRtl:false,startText:"Start",stopText:"Stop",delay:3E3,resumeDelay:15E3,animationTime:600,easing:"swing",onBeforeInitialize:null,onInitialized:null,onSWFComplete:null,onShowStart:null,onShowStop:null,onShowPause:null,onShowUnpause:null,onSlideInit:null,onSlideBegin:null,onSlideComplete:null,clickArrows:"click",
clickControls:"click focusin",clickSlideshow:"click",addWmodeToObject:"opaque",maxOverallWidth:32766};d.fn.anythingSlider=function(k,m){return this.each(function(){var e=d(this).data("AnythingSlider");if((typeof k).match("object|undefined"))if(e)e.updateSlider();else new d.anythingSlider(this,k);else if(/\d/.test(k)&&!isNaN(k)&&e){var h=typeof k=="number"?k:parseInt(d.trim(k),10);h>=1&&h<=e.pages&&e.gotoPage(h,false,m)}})}})(jQuery);(function(d){d.marquee={version:"1.0.01"};d.fn.marquee=function(k){var m=typeof arguments[0]=="string"&&arguments[0],e=m&&Array.prototype.slice.call(arguments,1)||arguments,h=this.length==0?null:d.data(this[0],"marquee");if(h&&m&&this.length)if(m.toLowerCase()=="object")return h;else if(h[m]){var a;this.each(function(g){var o=d.data(this,"marquee")[m].apply(h,e);if(g==0&&o)if(o.jquery)a=d([]).add(o);else{a=o;return false}else if(o&&o.jquery)a=a.add(o)});return a||this}else return this;else return this.each(function(){new d.Marquee(this,
k)})};d.Marquee=function(k,m){function e(K){if(u.filter("."+m.cssShowing).length>0)return false;var L=u.eq(K).show();d.isFunction(m.beforeshow)&&m.beforeshow.apply(w,[B,L]);K={top:(m.yScroll=="top"?"-":"+")+L.outerHeight()+"px",left:0};B.data("marquee.showing",true);L.addClass(m.cssShowing);L.css(K).animate({top:"0px"},m.showSpeed,m.fxEasingShow,function(){d.isFunction(m.show)&&m.show.apply(w,[B,L]);B.data("marquee.showing",false);h(L)})}function h(K,L){if(C==true)return false;L=L||m.pauseSpeed;if(K.outerWidth()>
B.innerWidth())setTimeout(function(){if(C==true)return false;var V=K.outerWidth(),R=(V-B.innerWidth())*-1,X=parseInt(K.css("left"),10);K.animate({left:R+"px"},(V+X)*m.scrollSpeed,m.fxEasingScroll,function(){setTimeout(function(){a(K)},2E3)})},L);else u.length>1&&setTimeout(function(){if(C==true)return false;K.animate({top:(m.yScroll=="top"?"+":"-")+B.innerHeight()+"px"},m.showSpeed,m.fxEasingScroll);a(K)},L)}function a(K){d.isFunction(m.aftershow)&&m.aftershow.apply(w,[B,K]);K.removeClass(m.cssShowing);
K.fadeOut(200);s()}function g(){C=true;B.data("marquee.showing")!=true&&u.filter("."+m.cssShowing).dequeue().stop()}function o(){C=false;B.data("marquee.showing")!=true&&h(u.filter("."+m.cssShowing),1)}function s(){p++;if(p>=u.length){if(!isNaN(m.loop)&&m.loop>0&&++z>=m.loop)return false;p=0}e(p)}m=d.extend({},d.Marquee.defaults,m);var w=this,B=d(k),u=B.find("> li"),p=-1,v=false,C=false,z=0;d.data(B[0],"marquee",w);this.pause=function(){v=true;g()};this.resume=function(){v=false;o()};this.update=
function(){var K=u.length;u=B.find("> li");K<=1&&o()};m.pauseOnHover&&B.hover(function(){if(v)return false;g()},function(){if(v)return false;o()});d.isFunction(m.init)&&m.init.apply(w,[B,m]);s()};d.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);$.fn.preloader=function(d){d=$.extend({delay:200,preload_parent:"a",check_timer:200,ondone:function(){},oneachload:function(){},fadein:400},d);var k=$(this).find("img").css({visibility:"hidden",opacity:0}),m,e=0,h=0,a=[],g=d.delay,o=function(){m=setInterval(function(){if(e>=a.length){clearInterval(m);d.ondone()}else for(h=0;h<k.length;h++)if(k[h].complete==true){if(a[h]==false){a[h]=true;d.oneachload(k[h]);e++;g+=d.delay}$(k[h]).css("visibility","visible").delay(g).animate({opacity:1},d.fadein,function(){$(this).parent().removeClass("preloader-gray")})}},
d.check_timer)};k.each(function(){$(this).parent(d.preload_parent).length==0?$(this).wrap("<a class='preloader-gray' />"):$(this).parent().addClass("preloader");a[h++]=false});k=$.makeArray(k);var s=jQuery("<img />",{id:"loadingicon",src:"/images/v2/loading_box.gif"}).hide().appendTo("body");m=setInterval(function(){if(s[0].complete==true){clearInterval(m);o();s.remove()}},100)};(function(d){function k(){var h;h=d(this);if(!h.data("timeago")){h.data("timeago",{datetime:e.datetime(h)});var a=d.trim(h.text());a.length>0&&h.attr("title",a)}h=h.data("timeago");isNaN(h.datetime)||d(this).text(m(h.datetime));return this}function m(h){return e.inWords((new Date).getTime()-h.getTime())}d.timeago=function(h){return h instanceof Date?m(h):typeof h==="string"?m(d.timeago.parse(h)):m(d.timeago.datetime(h))};var e=d.timeago;d.extend(d.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(h){function a(C,z){return(d.isFunction(C)?C(z,h):C).replace(/%d/i,g.numbers&&g.numbers[z]||z)}var g=this.settings.strings,o=g.prefixAgo,s=g.suffixAgo;if(this.settings.allowFuture){if(h<
0){o=g.prefixFromNow;s=g.suffixFromNow}h=Math.abs(h)}var w=h/1E3,B=w/60,u=B/60,p=u/24,v=p/365;w=w<45&&a(g.seconds,Math.round(w))||w<90&&a(g.minute,1)||B<45&&a(g.minutes,Math.round(B))||B<90&&a(g.hour,1)||u<24&&a(g.hours,Math.round(u))||u<48&&a(g.day,1)||p<30&&a(g.days,Math.floor(p))||p<60&&a(g.month,1)||p<365&&a(g.months,Math.floor(p/30))||v<2&&a(g.year,1)||a(g.years,Math.floor(v));return d.trim([o,w,s].join(" "))},parse:function(h){h=d.trim(h);h=h.replace(/\.\d\d\d+/,"");h=h.replace(/-/,"/").replace(/-/,
"/");h=h.replace(/T/," ").replace(/Z/," UTC");h=h.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2");return new Date(h)},datetime:function(h){h=d(h).get(0).tagName.toLowerCase()==="time"?d(h).attr("datetime"):d(h).attr("title");return e.parse(h)}});d.fn.timeago=function(){var h=this;h.each(k);var a=e.settings;a.refreshMillis>0&&setInterval(function(){h.each(k)},a.refreshMillis);return h};document.createElement("abbr");document.createElement("time")})(jQuery);(function(d){d.activityScroller=function(k,m){var e=this;e.$el=d(k);e.el=k;e.$el.data("activityScroller",e);e.init=function(){e.options=d.extend({},d.activityScroller.defaultOptions,m);d.ajax({url:"/greenriders/grevents",dataType:"json",success:function(h){e.parseItems(h)}})};e.parseItems=function(h){for(var a=h.length<e.options.numItems?h.length:e.options.numItems,g=0,o,s="";g<a;g++){o=h[g].type;s+=g==0?'<li class="event-item first clearfix">':'<li class="event-item clearfix">';s+=o=="RIDE_CREATED"?
e.parseRideCreated(h[g],g):e.parseUserJoined(h[g],g);s+="</li>"}e.$el.removeClass("preloader-white").html(s)};e.parseRideCreated=function(h){var a=h.created,g=h.userFirstName,o=h.rideFromAddress,s=h.rideToAddress,w=h.rideLink,B=h.userGender=="FEMALE"&&h.userGender?"female":"male";h=h.rideType=="OFFER"?e.options.messages.offersRide:e.options.messages.requestsRide;$output="";$output+='<div class="event-item-image">        \t\t\t\t\t\t<img src="/images/v2/profile_image_'+B+'.png" />        \t\t\t\t\t</div>        \t\t\t\t\t<div class="event-description">        \t\t\t\t\t\t<strong>'+
g+"</strong> "+h+' <a href="'+w+'">'+o+' <span class="arrow">&nbsp;</span> '+s+'</a>.        \t\t\t\t\t\t<span class="time">'+jQuery.timeago(a)+"</span>        \t\t\t\t\t</div>";return $output};e.parseUserJoined=function(h){var a="";a+='<div class="event-item-image">        \t\t\t\t\t<img src="/images/v2/profile_image_'+(h.userGender=="FEMALE"&&h.userGender?"female":"male")+'.png" />        \t\t\t\t</div>\t\t\t\t\t\t<div class="event-description">\t\t\t\t\t\t\t<strong>'+h.userFirstName+"</strong> "+
e.options.messages.joined+'.\t\t\t\t\t\t\t<span class="time">'+jQuery.timeago(h.created)+"</span>\t\t\t\t\t\t</div>";return a};e.animate=function(){e.$timer=setInterval(function(){e.$items.eq(e.$i-1).slideDown("500",function(){if(e.$i==0)clearInterval(e.$timer);else e.$i--})},3E3)};e.init()};d.activityScroller.defaultOptions={url:"",numItems:5,delay:3E3,duration:500,messages:{joined:"liittyi GreenRidersiin",offersRide:"tarjoaa kyyti\u00e4 v\u00e4lille",requestsRide:"pyyt\u00e4\u00e4 kyyti\u00e4 v\u00e4lille"}};
d.fn.activityScroller=function(k){return this.each(function(){new d.activityScroller(this,k)})}})(jQuery);$(function(){window.language=$("#language").val();window.uid=$("#uid").val();var d=$("#tweets"),k=$("#twitterName").val();d.length>0&&$.getJSON("http://api.twitter.com/1/statuses/user_timeline.json?screen_name="+k+"&count=5&callback=?",function(h){var a="";$.each(h,function(g,o){var s;s=o.text;s=s.replace(/http:\/\/\S+/g,'<a href="$&" target="_blank">$&</a>');s=s.replace(/\s(@)(\w+)/g,' @<a href="http://twitter.com/$2" target="_blank">$2</a>');s=s.replace(/\s(#)(\w+)/g,' #<a href="http://search.twitter.com/search?q=%23$2" target="_blank">$2</a>');
a+='<li class="tweet">'+s+"</li>"});d.append(a).marquee({scrollSpeed:10})});var m=$("#email").val(),e=$("#password").val();$(".email, .textbox-email ,.password").focus(function(){$this=$(this);if($this.val()==m||$this.val()==e)$this.val("").addClass("active")});$(".email, .textbox-email, .password").blur(function(){var h=$(this);if(h.val()=="")h.attr("id")=="email"?h.val(m).removeClass("active"):h.val(e).removeClass("active")});$.getJSON("/json/statistics/usersamount",function(h){$("#users-amount").text(h.result)});
$.getJSON("/json/statistics/ridesamount",function(h){$("#rides-amount").text(h.result)});$("#back-top").click(function(h){h.preventDefault();window.scrollTo(0,0);return false});$("#video, a.video").click(function(h){h.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 g=$(this);$(".dialog-close").click(function(o){o.preventDefault();g.dialog("close")})},close:function(){a.remove()}});return false})});function setCookie(d,k,m){var e=new Date;e.setDate(e.getDate()+m);document.cookie=d+"="+escape(k)+(m==null?"":";expires="+e.toUTCString())+";path=/"}
function setSecureAuthenticationCookies(d,k){var m=document.getElementById(d).value,e=document.getElementById(k).value;setCookie("email",m,365);setCookie("sessionId",e,365)}function setQuizCookie(){setCookie("quizAnswered",true,365)}function getCookie(d){var k,m,e,h=document.cookie.split(";");for(k=0;k<h.length;k++){m=h[k].substr(0,h[k].indexOf("="));e=h[k].substr(h[k].indexOf("=")+1);m=m.replace(/^\s+|\s+$/g,"");if(m==d)return unescape(e)}}
function quizCookieExists(){var d=getCookie("quizAnswered");return d!=null&&d!=""?true:false}function adjustColumnHeight(){$(".column-right").height($("#content").outerHeight())}function getUrlParameters(){var d={};window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(k,m,e){d[m]=e});return d}function getObjectSize(d){var k=0,m;for(m in d)k++;return k}function pad(d,k){for(var m=""+d;m.length<k;)m="0"+m;return m};$(function(){var d=$("#fromDate"),k=$("#toDate"),m=$("#search"),e=true;$("#mobile, #video").preloader();jQuery.timeago.settings.allowFuture=true;$("span.timeago").timeago();$(".ride-time").each(function(){var g=$(this),o=convertToTimezone(g.attr("title"));g.text(o.time);g.siblings(".ride-day").text(o.day)});$("#calendar").datepicker({numberOfMonths:1,defaultDate:null,dateFormat:"dd.mm.yy",firstDay:1,minDate:"0",selectOtherMonths:true,showOtherMonths:true,beforeShowDay:customRange,onSelect:function(g){if(d.val()==
""){d.val(g);k.val(g)}else if(d.val()==k.val())if(e){k.val(g);e=true}else{d.val(g);k.val(g);e=false}else{d.val(g);k.val(g);e=true}}});$("#testimonial-list").anythingSlider({width:272,height:160,resizeContents:false,startPanel:1,hashTags:false,buildArrows:false,buildNavigation:true,navigationFormatter:null,forwardText:"&raquo;",backText:"&laquo;",autoPlay:true,startStopped:false,pauseOnHover:true,resumeOnVideoEnd:true,stopAtEnd:false,playRtl:false,startText:"Start",stopText:"Stop",delay:1E4,animationTime:1E3,
easing:"easeOutQuad"});$(".recent-event-list").activityScroller();$(".radio, label",$("#search")).click(function(g){g.preventDefault();$this=$(this);$this.parents("#type").find("a").removeClass("checked");g=$("input:radio[name=type]");$.each(g,function(){$(this).removeAttr("checked")});$this.hasClass("radio")?$this.addClass("checked"):$this.prev().addClass("checked");$this.siblings("input").attr("checked",true);return false});if(m.length>0){var h=[];$.getJSON("/json/cities",function(g){numCities=
g.results.length;for(i=0;i<numCities;i++)h.push(g.results[i].caption);$(".location",m).autocomplete({minLength:2,source:function(o,s){var w=RegExp($.ui.autocomplete.escapeRegex(o.term),"i");s($.map(h,function(B){if(!o.term||w.test(B))return{label:B.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+$.ui.autocomplete.escapeRegex(o.term)+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>"),value:B,option:this}}))}});$("#from",m).data("autocomplete")._renderItem=function(o,s){return $("<li></li>").data("item.autocomplete",
s).append($("<a></a>").html(s.label)).appendTo(o)};$("#to",m).data("autocomplete")._renderItem=function(o,s){return $("<li></li>").data("item.autocomplete",s).append($("<a></a>").html(s.label)).appendTo(o)}})}var a=$(".quiz-items");$(".quiz-item",a).click(function(){var g=$(this);g.children("input").attr("checked","checked");g.siblings().removeClass("checked");g.addClass("checked")});$(".quiz-item").hover(function(){$(this).addClass("active")},function(){$(this).removeClass("active")});quizCookieExists()&&
a.html("<div class='thanks'>Olet jo \u00e4\u00e4nest\u00e4nyt.</div>");a.show();$("#quiz-submit").click(function(g){g.preventDefault();g=$("input:radio[name=answer]:checked").val();g!="undefined"&&g!=""&&$.post("/greenriders/answer",{answer:g},function(o){if(o=="OK"){setQuizCookie();$(".quiz-items").html("<div class='thanks'>Olemme vastaanottaneet \u00e4\u00e4nesi. Kiitos!</div>")}},"html");return false});$("#calendar").tipsy({gravity:"s",fade:true});$(".leaving-soon").tipsy({gravity:"s",fade:true,
live:true})});function customRange(d){var k=$("#fromDate").val(),m=$("#toDate").val();d=dateWithin(k,m,d);return k!=""&&m!=""?d?[true,"date-range"]:[true,""]:[true]}function dateWithin(d,k,m){d=d.split(".");d=d[1]+"/"+d[0]+"/"+d[2];var e=k.split(".");e=e[1]+"/"+e[0]+"/"+e[2];k=Date.parse(d);d=Date.parse(e);m=Date.parse(m);if(m<=d&&m>=k)return true;return false}
function convertToTimezone(d){d=dateFromUTC(d,"-");return{day:padZero(d.getDate()),time:padZero(d.getHours())+":"+padZero(d.getMinutes())}}function dateFromUTC(d,k){var m=d.match(RegExp("(\\d{4})"+k+"(\\d{2})"+k+"(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})Z"));return new Date(Date.UTC(parseInt(m[1]),parseInt(m[2],10)-1,parseInt(m[3],10),parseInt(m[4],10),parseInt(m[5],10),parseInt(m[6],10),0))}function padZero(d){if(d<10)return"0"+d;return d};$(function(){function d(){h.text(a.val()+"/"+$eventUrl.val())}function k(B){var u=B.results?B.results.length:0,p=B.resultsHasMore?B.resultsHasMore:false,v=B.resultsNextPageUrl?B.resultsNextPageUrl:"";if(B.status=="OK"&&u>0){$.each(B.results,function(C,z){$("#eventItemTemplate").tmpl(z).appendTo(o)});w.hide();if(p){s.attr("href",v);s.css("display","block").show()}else s.hide();o.find(".delete").live("click",function(){$anchor=$(this);$("#dialog-confirm").dialog({resizable:false,height:170,modal:true,
buttons:{Delete:function(){$(this).dialog("close");window.location=$anchor.attr("href")},Cancel:function(){$(this).dialog("close")}}});return false})}else{$("#no-results").show();w.hide();s.hide()}s.removeClass("loading")}var m=$(".events").length>0?true:false,e=$(".events-list").length>0?true:false;if(m){var h=$("#event-url-dynamic"),a=$("#event_type");$eventUrl=$("#event_url");$("#event_start_date, #event_end_date").datepicker();a.change(function(){d()});$eventUrl.keyup(function(){d()});var g=new google.maps.Geocoder;
$(".location").autocomplete({minLength:2,source:function(B,u){g.geocode({address:B.term},function(p){u($.map(p,function(v){return{label:v.formatted_address.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+$.ui.autocomplete.escapeRegex(B.term)+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>"),value:v.formatted_address,latitude:v.geometry.location.lat(),longitude:v.geometry.location.lng(),option:this}}))})},select:function(B,u){$("#eventLat").val(u.item.latitude);$("#eventLng").val(u.item.longitude)}}).data("autocomplete")._renderItem=
function(B,u){return $("<li></li>").data("item.autocomplete",u).append($("<a></a>").html(u.label)).appendTo(B)}}if(e){var o=$("#event-items"),s=$("#more-results"),w=$("#search-loading");m=getUrlParameters();e=$("#site");$.ajax({url:"/json/events?startDateFrom=01.01.2011",dataType:"json",beforeSend:function(){w.show()},data:m,success:k});e.val(m.siteId);e.change(function(){var B=$(this).val();window.location=B===""?"/admin/events/list":"/admin/events/list?siteId="+B})}});$(function(){$(".competitions-front")});$(function(){if($(".uusikaupunki").length>0){paramsRequest={address:"Uusikaupunki",type:"request"};paramsOffer={address:"Uusikaupunki",type:"offer"};$.getJSON("/json/rides/search",paramsRequest,function(d){var k=d.results==null?[]:d.results,m=k.length;d=$("#ride_request_table");var e=[];m>0?$.each(k,function(h,a){e.push('<tr id="'+h+'"><td><a href="'+a.rideLink+'"><span id="ride_date_field">'+a.startDate+'</span> <span id="ride_from">'+a.from+'</span><span class="arrow"></span><span id="ride_to">'+
a.to+"</span></a></td></tr>")}):e.push('<tr><td><div class="message warning">Uudestakaupungista ei l\u00f6ydy yht\u00e4\u00e4n kyytipyynt\u00f6\u00e4 t\u00e4ll\u00e4 hetkell\u00e4.</div></td></tr>');k=e.join("");d.html(k)});$.getJSON("/json/rides/search",paramsOffer,function(d){var k=d.results==null?[]:d.results,m=k.length;d=$("#ride_offer_table");var e=[];m>0?$.each(k,function(h,a){e.push('<tr id="'+h+'"><td><a href="'+a.rideLink+'"><span id="ride_date_field">'+a.startDate+'</span> <span id="ride_from">'+
a.from+'</span><span class="arrow"></span><span id="ride_to">'+a.to+"</span></a></td></tr>")}):e.push('<tr><td><div class="message warning">Uudestakaupungista ei l\u00f6ydy yht\u00e4\u00e4n kyytitarjousta t\u00e4ll\u00e4 hetkell\u00e4.</div></td></tr>');k=e.join("");d.html(k)})}});
