/*
 * jQuery JavaScript Library v1.5.2
 * http://jquery.com/
 *
 * Copyright 2011, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2011, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Thu Mar 31 15:28:23 2011 -0400
 */
(function(Aq,Ao){function AF(A){return Ak.isWindow(A)?A:A.nodeType===9?A.defaultView||A.parentWindow:!1}function AL(B){if(!BN[B]){var A=Ak("<"+B+">").appendTo("body"),C=A.css("display");A.remove();if(C==="none"||C===""){C="block"}BN[B]=C}return BN[B]}function AN(B,A){var C={};Ak.each(AO.concat.apply([],AO.slice(0,A)),function(){C[this]=B});return C}function B2(){try{return new Aq.ActiveXObject("Microsoft.XMLHTTP")}catch(A){}}function BU(){try{return new Aq.XMLHttpRequest}catch(A){}}function BW(){Ak(Aq).unload(function(){for(var A in BZ){BZ[A](0,1)}})}function Bi(N,M){N.dataFilter&&(M=N.dataFilter(M,N.dataType));var L=N.dataTypes,K={},J,I,H=L.length,G,F=L[0],E,D,C,B,A;for(J=1;J<H;J++){if(J===1){for(I in N.converters){typeof I==="string"&&(K[I.toLowerCase()]=N.converters[I])}}E=F,F=L[J];if(F==="*"){F=E}else{if(E!=="*"&&E!==F){D=E+" "+F,C=K[D]||K["* "+F];if(!C){A=Ao;for(B in K){G=B.split(" ");if(G[0]===E||G[0]==="*"){A=K[G[1]+" "+F];if(A){B=K[B],B===!0?C=A:A===!0&&(C=B);break}}}}!C&&!A&&Ak.error("No conversion from "+D.replace(" "," to ")),C!==!0&&(M=C?C(M):A(B(M)))}}}return M}function Bj(J,I,H){var G=J.contents,F=J.dataTypes,E=J.responseFields,D,C,B,A;for(C in E){C in H&&(I[E[C]]=H[C])}while(F[0]==="*"){F.shift(),D===Ao&&(D=J.mimeType||I.getResponseHeader("content-type"))}if(D){for(C in G){if(G[C]&&G[C].test(D)){F.unshift(C);break}}}if(F[0] in H){B=F[0]}else{for(C in H){if(!F[0]||J.converters[C+" "+F[0]]){B=C;break}A||(A=C)}B=B||A}if(B){B!==F[0]&&F.unshift(B);return H[B]}}function Bk(B,A,E,D){if(Ak.isArray(A)&&A.length){Ak.each(A,function(F,G){E||Ap.test(B)?D(B,G):Bk(B+"["+(typeof G==="object"||Ak.isArray(G)?F:"")+"]",G,E,D)})}else{if(E||A==null||typeof A!=="object"){D(B,A)}else{if(Ak.isArray(A)||Ak.isEmptyObject(A)){D(B,"")}else{for(var C in A){Bk(B+"["+C+"]",A[C],E,D)}}}}}function Bl(K,J,I,H,G,F){G=G||J.dataTypes[0],F=F||{},F[G]=!0;var E=K[G],D=0,C=E?E.length:0,B=K===Br,A;for(;D<C&&(B||!A);D++){A=E[D](J,I,H),typeof A==="string"&&(!B||F[A]?A=Ao:(J.dataTypes.unshift(A),A=Bl(K,J,I,H,A,F)))}(B||!A)&&!F["*"]&&(A=Bl(K,J,I,H,"*",F));return A}function Bm(A){return function(B,I){typeof B!=="string"&&(I=B,B="*");if(Ak.isFunction(I)){var H=B.toLowerCase().split(Bx),G=0,F=H.length,E,D,C;for(;G<F;G++){E=H[G],C=/^\+/.test(E),C&&(E=E.substr(1)||"*"),D=A[E]=A[E]||[],D[C?"unshift":"push"](I)}}}}function At(B,A,E){var D=A==="width"?A0:Ay,C=A==="width"?B.offsetWidth:B.offsetHeight;if(E==="border"){return C}Ak.each(D,function(){E||(C-=parseFloat(Ak.css(B,"padding"+this))||0),E==="margin"?C+=parseFloat(Ak.css(B,"margin"+this))||0:C-=parseFloat(Ak.css(B,"border"+this+"Width"))||0});return C}function BG(B,A){A.src?Ak.ajax({url:A.src,async:!1,dataType:"script"}):Ak.globalEval(A.text||A.textContent||A.innerHTML||""),A.parentNode&&A.parentNode.removeChild(A)}function BI(A){return"getElementsByTagName" in A?A.getElementsByTagName("*"):"querySelectorAll" in A?A.querySelectorAll("*"):[]}function BK(B,A){if(A.nodeType===1){var C=A.nodeName.toLowerCase();A.clearAttributes(),A.mergeAttributes(B);if(C==="object"){A.outerHTML=B.outerHTML}else{if(C!=="input"||B.type!=="checkbox"&&B.type!=="radio"){if(C==="option"){A.selected=B.defaultSelected}else{if(C==="input"||C==="textarea"){A.defaultValue=B.defaultValue}}}else{B.checked&&(A.defaultChecked=A.checked=B.checked),A.value!==B.value&&(A.value=B.value)}}A.removeAttribute(Ak.expando)}}function As(I,H){if(H.nodeType===1&&Ak.hasData(I)){var G=Ak.expando,F=Ak.data(I),E=Ak.data(H,F);if(F=F[G]){var D=F.events;E=E[G]=Ak.extend({},F);if(D){delete E.handle,E.events={};for(var C in D){for(var B=0,A=D[C].length;B<A;B++){Ak.event.add(H,C+(D[C][B].namespace?".":"")+D[C][B].namespace,D[C][B],D[C][B].data)}}}}}}function B1(B,A){return Ak.nodeName(B,"table")?B.getElementsByTagName("tbody")[0]||B.appendChild(B.ownerDocument.createElement("tbody")):B}function BH(B,A,D){if(Ak.isFunction(A)){return Ak.grep(B,function(E,G){var F=!!A.call(E,G,E);return F===D})}if(A.nodeType){return Ak.grep(B,function(E,F){return E===A===D})}if(typeof A==="string"){var C=Ak.grep(B,function(E){return E.nodeType===1});if(BP.test(A)){return Ak.filter(A,C,!D)}A=Ak.filter(A,C)}return Ak.grep(B,function(E,F){return Ak.inArray(E,A)>=0===D})}function BJ(A){return !A||!A.parentNode||A.parentNode.nodeType===11}function BT(B,A){return(B&&B!=="*"?B+".":"")+A.replace(AJ,"`").replace(AH,"&")}function BV(R){var Q,P,O,N,M,L,K,J,I,H,G,F,E,D=[],C=[],B=Ak._data(this,"events");if(R.liveFired!==this&&B&&B.live&&!R.target.disabled&&(!R.button||R.type!=="click")){R.namespace&&(F=new RegExp("(^|\\.)"+R.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),R.liveFired=this;var A=B.live.slice(0);for(K=0;K<A.length;K++){M=A[K],M.origType.replace(AM,"")===R.type?C.push(M.selector):A.splice(K--,1)}N=Ak(R.target).closest(C,R.currentTarget);for(J=0,I=N.length;J<I;J++){G=N[J];for(K=0;K<A.length;K++){M=A[K];if(G.selector===M.selector&&(!F||F.test(M.namespace))&&!G.elem.disabled){L=G.elem,O=null;if(M.preType==="mouseenter"||M.preType==="mouseleave"){R.type=M.preType,O=Ak(R.relatedTarget).closest(M.selector)[0]}(!O||O!==L)&&D.push({elem:L,handleObj:M,level:G.level})}}}for(J=0,I=D.length;J<I;J++){N=D[J];if(P&&N.level>P){break}R.currentTarget=N.elem,R.data=N.handleObj.data,R.handleObj=N.handleObj,E=N.handleObj.origHandler.apply(N.elem,arguments);if(E===!1||R.isPropagationStopped()){P=N.level,E===!1&&(Q=!1);if(R.isImmediatePropagationStopped()){break}}}return Q}}function Ba(A,D,C){var B=Ak.extend({},C[0]);B.type=A,B.originalEvent={},B.liveFired=Ao,Ak.event.handle.call(D,B),B.isDefaultPrevented()&&C[0].preventDefault()}function AB(){return !0}function AC(){return !1}function Aa(B){for(var A in B){if(A!=="toJSON"){return !1}}return !0}function Ac(A,D,C){if(C===Ao&&A.nodeType===1){C=A.getAttribute("data-"+D);if(typeof C==="string"){try{C=C==="true"?!0:C==="false"?!1:C==="null"?null:Ak.isNaN(C)?Ae.test(C)?Ak.parseJSON(C):C:parseFloat(C)}catch(B){}Ak.data(A,D,C)}else{C=Ao}}return C}var Am=Aq.document,Ak=function(){function M(){if(!CA.isReady){try{Am.documentElement.doScroll("left")}catch(A){setTimeout(M,1);return }CA.ready()}}var CA=function(B,A){return new CA.fn.init(B,A,B7)},B9=Aq.jQuery,B8=Aq.$,B7,B6=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,B5=/\S/,B4=/^\s+/,B3=/\s+$/,c=/\d/,b=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,a=/^[\],:{}\s]*$/,Z=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,Y=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,W=/(?:^|:|,)(?:\s*\[)+/g,U=/(webkit)[ \/]([\w.]+)/,S=/(opera)(?:.*version)?[ \/]([\w.]+)/,Q=/(msie) ([\w.]+)/,O=/(mozilla)(?:.*? rv:([\w.]+))?/,L=navigator.userAgent,K,J,I,H=Object.prototype.toString,X=Object.prototype.hasOwnProperty,V=Array.prototype.push,T=Array.prototype.slice,R=String.prototype.trim,P=Array.prototype.indexOf,N={};CA.fn=CA.prototype={constructor:CA,init:function(A,G,F){var E,D,C,B;if(!A){return this}if(A.nodeType){this.context=this[0]=A,this.length=1;return this}if(A==="body"&&!G&&Am.body){this.context=Am,this[0]=Am.body,this.selector="body",this.length=1;return this}if(typeof A==="string"){E=B6.exec(A);if(!E||!E[1]&&G){return !G||G.jquery?(G||F).find(A):this.constructor(G).find(A)}if(E[1]){G=G instanceof CA?G[0]:G,B=G?G.ownerDocument||G:Am,C=b.exec(A),C?CA.isPlainObject(G)?(A=[Am.createElement(C[1])],CA.fn.attr.call(A,G,!0)):A=[B.createElement(C[1])]:(C=CA.buildFragment([E[1]],[B]),A=(C.cacheable?CA.clone(C.fragment):C.fragment).childNodes);return CA.merge(this,A)}D=Am.getElementById(E[2]);if(D&&D.parentNode){if(D.id!==E[2]){return F.find(A)}this.length=1,this[0]=D}this.context=Am,this.selector=A;return this}if(CA.isFunction(A)){return F.ready(A)}A.selector!==Ao&&(this.selector=A.selector,this.context=A.context);return CA.makeArray(A,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return T.call(this,0)},get:function(A){return A==null?this.toArray():A<0?this[this.length+A]:this[A]},pushStack:function(B,A,D){var C=this.constructor();CA.isArray(B)?V.apply(C,B):CA.merge(C,B),C.prevObject=this,C.context=this.context,A==="find"?C.selector=this.selector+(this.selector?" ":"")+D:A&&(C.selector=this.selector+"."+A+"("+D+")");return C},each:function(B,A){return CA.each(this,B,A)},ready:function(A){CA.bindReady(),J.done(A);return this},eq:function(A){return A===-1?this.slice(A):this.slice(A,+A+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(T.apply(this,arguments),"slice",T.call(arguments).join(","))},map:function(A){return this.pushStack(CA.map(this,function(B,C){return A.call(B,C,B)}))},end:function(){return this.prevObject||this.constructor(null)},push:V,sort:[].sort,splice:[].splice},CA.fn.init.prototype=CA.fn,CA.extend=CA.fn.extend=function(){var n,m,d,G,F,E,D=arguments[0]||{},C=1,B=arguments.length,A=!1;typeof D==="boolean"&&(A=D,D=arguments[1]||{},C=2),typeof D!=="object"&&!CA.isFunction(D)&&(D={}),B===C&&(D=this,--C);for(;C<B;C++){if((n=arguments[C])!=null){for(m in n){d=D[m],G=n[m];if(D===G){continue}A&&G&&(CA.isPlainObject(G)||(F=CA.isArray(G)))?(F?(F=!1,E=d&&CA.isArray(d)?d:[]):E=d&&CA.isPlainObject(d)?d:{},D[m]=CA.extend(A,E,G)):G!==Ao&&(D[m]=G)}}}return D},CA.extend({noConflict:function(A){Aq.$=B8,A&&(Aq.jQuery=B9);return CA},isReady:!1,readyWait:1,ready:function(A){A===!0&&CA.readyWait--;if(!CA.readyWait||A!==!0&&!CA.isReady){if(!Am.body){return setTimeout(CA.ready,1)}CA.isReady=!0;if(A!==!0&&--CA.readyWait>0){return }J.resolveWith(Am,[CA]),CA.fn.trigger&&CA(Am).trigger("ready").unbind("ready")}},bindReady:function(){if(!J){J=CA._Deferred();if(Am.readyState==="complete"){return setTimeout(CA.ready,1)}if(Am.addEventListener){Am.addEventListener("DOMContentLoaded",I,!1),Aq.addEventListener("load",CA.ready,!1)}else{if(Am.attachEvent){Am.attachEvent("onreadystatechange",I),Aq.attachEvent("onload",CA.ready);var A=!1;try{A=Aq.frameElement==null}catch(B){}Am.documentElement.doScroll&&A&&M()}}}},isFunction:function(A){return CA.type(A)==="function"},isArray:Array.isArray||function(A){return CA.type(A)==="array"},isWindow:function(A){return A&&typeof A==="object"&&"setInterval" in A},isNaN:function(A){return A==null||!c.test(A)||isNaN(A)},type:function(A){return A==null?String(A):N[H.call(A)]||"object"},isPlainObject:function(A){if(!A||CA.type(A)!=="object"||A.nodeType||CA.isWindow(A)){return !1}if(A.constructor&&!X.call(A,"constructor")&&!X.call(A.constructor.prototype,"isPrototypeOf")){return !1}var B;for(B in A){}return B===Ao||X.call(A,B)},isEmptyObject:function(B){for(var A in B){return !1}return !0},error:function(A){throw A},parseJSON:function(A){if(typeof A!=="string"||!A){return null}A=CA.trim(A);if(a.test(A.replace(Z,"@").replace(Y,"]").replace(W,""))){return Aq.JSON&&Aq.JSON.parse?Aq.JSON.parse(A):(new Function("return "+A))()}CA.error("Invalid JSON: "+A)},parseXML:function(A,C,B){Aq.DOMParser?(B=new DOMParser,C=B.parseFromString(A,"text/xml")):(C=new ActiveXObject("Microsoft.XMLDOM"),C.async="false",C.loadXML(A)),B=C.documentElement,(!B||!B.nodeName||B.nodeName==="parsererror")&&CA.error("Invalid XML: "+A);return C},noop:function(){},globalEval:function(B){if(B&&B5.test(B)){var A=Am.head||Am.getElementsByTagName("head")[0]||Am.documentElement,C=Am.createElement("script");CA.support.scriptEval()?C.appendChild(Am.createTextNode(B)):C.text=B,A.insertBefore(C,A.firstChild),A.removeChild(C)}},nodeName:function(B,A){return B.nodeName&&B.nodeName.toUpperCase()===A.toUpperCase()},each:function(A,d,G){var F,E=0,D=A.length,C=D===Ao||CA.isFunction(A);if(G){if(C){for(F in A){if(d.apply(A[F],G)===!1){break}}}else{for(;E<D;){if(d.apply(A[E++],G)===!1){break}}}}else{if(C){for(F in A){if(d.call(A[F],F,A[F])===!1){break}}}else{for(var B=A[0];E<D&&d.call(B,E,B)!==!1;B=A[++E]){}}}return A},trim:R?function(A){return A==null?"":R.call(A)}:function(A){return A==null?"":(A+"").replace(B4,"").replace(B3,"")},makeArray:function(B,A){var D=A||[];if(B!=null){var C=CA.type(B);B.length==null||C==="string"||C==="function"||C==="regexp"||CA.isWindow(B)?V.call(D,B):CA.merge(D,B)}return D},inArray:function(B,A){if(A.indexOf){return A.indexOf(B)}for(var D=0,C=A.length;D<C;D++){if(A[D]===B){return D}}return -1},merge:function(A,E){var D=A.length,C=0;if(typeof E.length==="number"){for(var B=E.length;C<B;C++){A[D++]=E[C]}}else{while(E[C]!==Ao){A[D++]=E[C++]}}A.length=D;return A},grep:function(B,A,G){var F=[],E;G=!!G;for(var D=0,C=B.length;D<C;D++){E=!!A(B[D],D),G!==E&&F.push(B[D])}return F},map:function(B,A,G){var F=[],E;for(var D=0,C=B.length;D<C;D++){E=A(B[D],D,G),E!=null&&(F[F.length]=E)}return F.concat.apply([],F)},guid:1,proxy:function(A,C,B){arguments.length===2&&(typeof C==="string"?(B=A,A=B[C],C=Ao):C&&!CA.isFunction(C)&&(B=C,C=Ao)),!C&&A&&(C=function(){return A.apply(B||this,arguments)}),A&&(C.guid=A.guid=A.guid||C.guid||CA.guid++);return C},access:function(l,d,G,F,E,D){var C=l.length;if(typeof d==="object"){for(var B in d){CA.access(l,B,d[B],F,E,G)}return l}if(G!==Ao){F=!D&&F&&CA.isFunction(G);for(var A=0;A<C;A++){E(l[A],d,F?G.call(l[A],A,E(l[A],d)):G,D)}return l}return C?E(l[0],d):Ao},now:function(){return(new Date).getTime()},uaMatch:function(B){B=B.toLowerCase();var A=U.exec(B)||S.exec(B)||Q.exec(B)||B.indexOf("compatible")<0&&O.exec(B)||[];return{browser:A[1]||"",version:A[2]||"0"}},sub:function(){function B(D,E){return new B.fn.init(D,E)}CA.extend(!0,B,this),B.superclass=this,B.fn=B.prototype=this(),B.fn.constructor=B,B.subclass=this.subclass,B.fn.init=function A(D,E){E&&E instanceof CA&&!(E instanceof B)&&(E=B(E));return CA.fn.init.call(this,D,E,C)},B.fn.init.prototype=B.fn;var C=B(Am);return B},browser:{}}),CA.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(B,A){N["[object "+A+"]"]=A.toLowerCase()}),K=CA.uaMatch(L),K.browser&&(CA.browser[K.browser]=!0,CA.browser.version=K.version),CA.browser.webkit&&(CA.browser.safari=!0),P&&(CA.inArray=function(B,A){return P.call(A,B)}),B5.test(" ")&&(B4=/^[\s\xA0]+/,B3=/[\s\xA0]+$/),B7=CA(Am),Am.addEventListener?I=function(){Am.removeEventListener("DOMContentLoaded",I,!1),CA.ready()}:Am.attachEvent&&(I=function(){Am.readyState==="complete"&&(Am.detachEvent("onreadystatechange",I),CA.ready())});return CA}(),Ai="then done fail isResolved isRejected promise".split(" "),Ag=[].slice;Ak.extend({_Deferred:function(){var B=[],A,E,D,C={done:function(){if(!D){var K=arguments,J,I,H,G,F;A&&(F=A,A=0);for(J=0,I=K.length;J<I;J++){H=K[J],G=Ak.type(H),G==="array"?C.done.apply(C,H):G==="function"&&B.push(H)}F&&C.resolveWith(F[0],F[1])}return this},resolveWith:function(G,F){if(!D&&!A&&!E){F=F||[],E=1;try{while(B[0]){B.shift().apply(G,F)}}finally{A=[G,F],E=0}}return this},resolve:function(){C.resolveWith(this,arguments);return this},isResolved:function(){return E||A},cancel:function(){D=1,B=[];return this}};return C},Deferred:function(B){var A=Ak._Deferred(),D=Ak._Deferred(),C;Ak.extend(A,{then:function(E,F){A.done(E).fail(F);return this},fail:D.done,rejectWith:D.resolveWith,reject:D.resolve,isRejected:D.isResolved,promise:function(E){if(E==null){if(C){return C}C=E={}}var F=Ai.length;while(F--){E[Ai[F]]=A[Ai[F]]}return E}}),A.done(D.cancel).fail(A.cancel),delete A.cancel,B&&B.call(A,A);return A},when:function(B){function C(H){return function(I){A[H]=arguments.length>1?Ag.call(arguments,0):I,--E||D.resolveWith(D,Ag.call(A,0))}}var A=arguments,G=0,F=A.length,E=F,D=F<=1&&B&&Ak.isFunction(B.promise)?B:Ak.Deferred();if(F>1){for(;G<F;G++){A[G]&&Ak.isFunction(A[G].promise)?A[G].promise().then(C(G),D.reject):--E}E||D.resolveWith(D,A)}else{D!==B&&D.resolveWith(D,F?[B]:[])}return D.promise()}}),function(){Ak.support={};var K=Am.createElement("div");K.style.display="none",K.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var J=K.getElementsByTagName("*"),I=K.getElementsByTagName("a")[0],H=Am.createElement("select"),G=H.appendChild(Am.createElement("option")),F=K.getElementsByTagName("input")[0];if(J&&J.length&&I){Ak.support={leadingWhitespace:K.firstChild.nodeType===3,tbody:!K.getElementsByTagName("tbody").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(I.getAttribute("style")),hrefNormalized:I.getAttribute("href")==="/a",opacity:/^0.55$/.test(I.style.opacity),cssFloat:!!I.style.cssFloat,checkOn:F.value==="on",optSelected:G.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0,reliableMarginRight:!0},F.checked=!0,Ak.support.noCloneChecked=F.cloneNode(!0).checked,H.disabled=!0,Ak.support.optDisabled=!G.disabled;var E=null;Ak.support.scriptEval=function(){if(E===null){var L=Am.documentElement,O=Am.createElement("script"),N="script"+Ak.now();try{O.appendChild(Am.createTextNode("window."+N+"=1;"))}catch(M){}L.insertBefore(O,L.firstChild),Aq[N]?(E=!0,delete Aq[N]):E=!1,L.removeChild(O)}return E};try{delete K.test}catch(D){Ak.support.deleteExpando=!1}!K.addEventListener&&K.attachEvent&&K.fireEvent&&(K.attachEvent("onclick",function C(){Ak.support.noCloneEvent=!1,K.detachEvent("onclick",C)}),K.cloneNode(!0).fireEvent("onclick")),K=Am.createElement("div"),K.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var B=Am.createDocumentFragment();B.appendChild(K.firstChild),Ak.support.checkClone=B.cloneNode(!0).cloneNode(!0).lastChild.checked,Ak(function(){var M=Am.createElement("div"),L=Am.getElementsByTagName("body")[0];if(L){M.style.width=M.style.paddingLeft="1px",L.appendChild(M),Ak.boxModel=Ak.support.boxModel=M.offsetWidth===2,"zoom" in M.style&&(M.style.display="inline",M.style.zoom=1,Ak.support.inlineBlockNeedsLayout=M.offsetWidth===2,M.style.display="",M.innerHTML="<div style='width:4px;'></div>",Ak.support.shrinkWrapBlocks=M.offsetWidth!==2),M.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var N=M.getElementsByTagName("td");Ak.support.reliableHiddenOffsets=N[0].offsetHeight===0,N[0].style.display="",N[1].style.display="none",Ak.support.reliableHiddenOffsets=Ak.support.reliableHiddenOffsets&&N[0].offsetHeight===0,M.innerHTML="",Am.defaultView&&Am.defaultView.getComputedStyle&&(M.style.width="1px",M.style.marginRight="0",Ak.support.reliableMarginRight=(parseInt(Am.defaultView.getComputedStyle(M,null).marginRight,10)||0)===0),L.removeChild(M).style.display="none",M=N=null}});var A=function(M){var L=Am.createElement("div");M="on"+M;if(!L.attachEvent){return !0}var N=M in L;N||(L.setAttribute(M,"return;"),N=typeof L[M]==="function");return N};Ak.support.submitBubbles=A("submit"),Ak.support.changeBubbles=A("change"),K=J=I=null}}();var Ae=/^(?:\{.*\}|\[.*\])$/;Ak.extend({cache:{},uuid:0,expando:"jQuery"+(Ak.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(A){A=A.nodeType?Ak.cache[A[Ak.expando]]:A[Ak.expando];return !!A&&!Aa(A)},data:function(J,I,H,G){if(Ak.acceptData(J)){var F=Ak.expando,E=typeof I==="string",D,C=J.nodeType,B=C?Ak.cache:J,A=C?J[Ak.expando]:J[Ak.expando]&&Ak.expando;if((!A||G&&A&&!B[A][F])&&E&&H===Ao){return }A||(C?J[Ak.expando]=A=++Ak.uuid:A=Ak.expando),B[A]||(B[A]={},C||(B[A].toJSON=Ak.noop));if(typeof I==="object"||typeof I==="function"){G?B[A][F]=Ak.extend(B[A][F],I):B[A]=Ak.extend(B[A],I)}D=B[A],G&&(D[F]||(D[F]={}),D=D[F]),H!==Ao&&(D[I]=H);if(I==="events"&&!D[I]){return D[F]&&D[F].events}return E?D[I]:D}},removeData:function(I,H,G){if(Ak.acceptData(I)){var F=Ak.expando,E=I.nodeType,D=E?Ak.cache:I,C=E?I[Ak.expando]:Ak.expando;if(!D[C]){return }if(H){var B=G?D[C][F]:D[C];if(B){delete B[H];if(!Aa(B)){return }}}if(G){delete D[C][F];if(!Aa(D[C])){return }}var A=D[C][F];Ak.support.deleteExpando||D!=Aq?delete D[C]:D[C]=null,A?(D[C]={},E||(D[C].toJSON=Ak.noop),D[C][F]=A):E&&(Ak.support.deleteExpando?delete I[Ak.expando]:I.removeAttribute?I.removeAttribute(Ak.expando):I[Ak.expando]=null)}},_data:function(B,A,C){return Ak.data(B,A,C,!0)},acceptData:function(B){if(B.nodeName){var A=Ak.noData[B.nodeName.toLowerCase()];if(A){return A!==!0&&B.getAttribute("classid")===A}}return !0}}),Ak.fn.extend({data:function(A,H){var G=null;if(typeof A==="undefined"){if(this.length){G=Ak.data(this[0]);if(this[0].nodeType===1){var F=this[0].attributes,E;for(var D=0,C=F.length;D<C;D++){E=F[D].name,E.indexOf("data-")===0&&(E=E.substr(5),Ac(this[0],E,G[E]))}}}return G}if(typeof A==="object"){return this.each(function(){Ak.data(this,A)})}var B=A.split(".");B[1]=B[1]?"."+B[1]:"";if(H===Ao){G=this.triggerHandler("getData"+B[1]+"!",[B[0]]),G===Ao&&this.length&&(G=Ak.data(this[0],A),G=Ac(this[0],A,G));return G===Ao&&B[1]?this.data(B[0]):G}return this.each(function(){var I=Ak(this),J=[B[0],H];I.triggerHandler("setData"+B[1]+"!",J),Ak.data(this,A,H),I.triggerHandler("changeData"+B[1]+"!",J)})},removeData:function(A){return this.each(function(){Ak.removeData(this,A)})}}),Ak.extend({queue:function(B,A,D){if(B){A=(A||"fx")+"queue";var C=Ak._data(B,A);if(!D){return C||[]}!C||Ak.isArray(D)?C=Ak._data(B,A,Ak.makeArray(D)):C.push(D);return C}},dequeue:function(B,A){A=A||"fx";var D=Ak.queue(B,A),C=D.shift();C==="inprogress"&&(C=D.shift()),C&&(A==="fx"&&D.unshift("inprogress"),C.call(B,function(){Ak.dequeue(B,A)})),D.length||Ak.removeData(B,A+"queue",!0)}}),Ak.fn.extend({queue:function(A,B){typeof A!=="string"&&(B=A,A="fx");if(B===Ao){return Ak.queue(this[0],A)}return this.each(function(C){var D=Ak.queue(this,A,B);A==="fx"&&D[0]!=="inprogress"&&Ak.dequeue(this,A)})},dequeue:function(A){return this.each(function(){Ak.dequeue(this,A)})},delay:function(B,A){B=Ak.fx?Ak.fx.speeds[B]||B:B,A=A||"fx";return this.queue(A,function(){var C=this;setTimeout(function(){Ak.dequeue(C,A)},B)})},clearQueue:function(A){return this.queue(A||"fx",[])}});var AZ=/[\n\t\r]/g,AY=/\s+/,AX=/\r/g,AW=/^(?:href|src|style)$/,AV=/^(?:button|input)$/i,AT=/^(?:button|input|object|select|textarea)$/i,AR=/^a(?:rea)?$/i,AP=/^(?:radio|checkbox)$/i;Ak.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"},Ak.fn.extend({attr:function(B,A){return Ak.access(this,B,A,!0,Ak.attr)},removeAttr:function(B,A){return this.each(function(){Ak.attr(this,B,""),this.nodeType===1&&this.removeAttribute(B)})},addClass:function(I){if(Ak.isFunction(I)){return this.each(function(J){var K=Ak(this);K.addClass(I.call(this,J,K.attr("class")))})}if(I&&typeof I==="string"){var H=(I||"").split(AY);for(var G=0,F=this.length;G<F;G++){var E=this[G];if(E.nodeType===1){if(E.className){var D=" "+E.className+" ",C=E.className;for(var B=0,A=H.length;B<A;B++){D.indexOf(" "+H[B]+" ")<0&&(C+=" "+H[B])}E.className=Ak.trim(C)}else{E.className=I}}}}return this},removeClass:function(B){if(Ak.isFunction(B)){return this.each(function(I){var J=Ak(this);J.removeClass(B.call(this,I,J.attr("class")))})}if(B&&typeof B==="string"||B===Ao){var H=(B||"").split(AY);for(var G=0,F=this.length;G<F;G++){var E=this[G];if(E.nodeType===1&&E.className){if(B){var D=(" "+E.className+" ").replace(AZ," ");for(var C=0,A=H.length;C<A;C++){D=D.replace(" "+H[C]+" "," ")}E.className=Ak.trim(D)}else{E.className=""}}}}return this},toggleClass:function(B,A){var D=typeof B,C=typeof A==="boolean";if(Ak.isFunction(B)){return this.each(function(F){var E=Ak(this);E.toggleClass(B.call(this,F,E.attr("class"),A),A)})}return this.each(function(){if(D==="string"){var I,H=0,G=Ak(this),F=A,E=B.split(AY);while(I=E[H++]){F=C?F:!G.hasClass(I),G[F?"addClass":"removeClass"](I)}}else{if(D==="undefined"||D==="boolean"){this.className&&Ak._data(this,"__className__",this.className),this.className=this.className||B===!1?"":Ak._data(this,"__className__")||""}}})},hasClass:function(B){var A=" "+B+" ";for(var D=0,C=this.length;D<C;D++){if((" "+this[D].className+" ").replace(AZ," ").indexOf(A)>-1){return !0}}return !1},val:function(K){if(!arguments.length){var J=this[0];if(J){if(Ak.nodeName(J,"option")){var I=J.attributes.value;return !I||I.specified?J.value:J.text}if(Ak.nodeName(J,"select")){var H=J.selectedIndex,G=[],F=J.options,E=J.type==="select-one";if(H<0){return null}for(var D=E?H:0,C=E?H+1:F.length;D<C;D++){var B=F[D];if(B.selected&&(Ak.support.optDisabled?!B.disabled:B.getAttribute("disabled")===null)&&(!B.parentNode.disabled||!Ak.nodeName(B.parentNode,"optgroup"))){K=Ak(B).val();if(E){return K}G.push(K)}}if(E&&!G.length&&F.length){return Ak(F[H]).val()}return G}if(AP.test(J.type)&&!Ak.support.checkOn){return J.getAttribute("value")===null?"on":J.value}return(J.value||"").replace(AX,"")}return Ao}var A=Ak.isFunction(K);return this.each(function(L){var O=Ak(this),N=K;if(this.nodeType===1){A&&(N=K.call(this,L,O.val())),N==null?N="":typeof N==="number"?N+="":Ak.isArray(N)&&(N=Ak.map(N,function(P){return P==null?"":P+""}));if(Ak.isArray(N)&&AP.test(this.type)){this.checked=Ak.inArray(O.val(),N)>=0}else{if(Ak.nodeName(this,"select")){var M=Ak.makeArray(N);Ak("option",this).each(function(){this.selected=Ak.inArray(Ak(this).val(),M)>=0}),M.length||(this.selectedIndex=-1)}else{this.value=N}}}})}}),Ak.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(J,I,H,G){if(!J||J.nodeType===3||J.nodeType===8||J.nodeType===2){return Ao}if(G&&I in Ak.attrFn){return Ak(J)[I](H)}var F=J.nodeType!==1||!Ak.isXMLDoc(J),E=H!==Ao;I=F&&Ak.props[I]||I;if(J.nodeType===1){var D=AW.test(I);if(I==="selected"&&!Ak.support.optSelected){var C=J.parentNode;C&&(C.selectedIndex,C.parentNode&&C.parentNode.selectedIndex)}if((I in J||J[I]!==Ao)&&F&&!D){E&&(I==="type"&&AV.test(J.nodeName)&&J.parentNode&&Ak.error("type property can't be changed"),H===null?J.nodeType===1&&J.removeAttribute(I):J[I]=H);if(Ak.nodeName(J,"form")&&J.getAttributeNode(I)){return J.getAttributeNode(I).nodeValue}if(I==="tabIndex"){var B=J.getAttributeNode("tabIndex");return B&&B.specified?B.value:AT.test(J.nodeName)||AR.test(J.nodeName)&&J.href?0:Ao}return J[I]}if(!Ak.support.style&&F&&I==="style"){E&&(J.style.cssText=""+H);return J.style.cssText}E&&J.setAttribute(I,""+H);if(!J.attributes[I]&&(J.hasAttribute&&!J.hasAttribute(I))){return Ao}var A=!Ak.support.hrefNormalized&&F&&D?J.getAttribute(I,2):J.getAttribute(I);return A===null?Ao:A}E&&(J[I]=H);return J[I]}});var AM=/\.(.*)$/,AK=/^(?:textarea|input|select)$/i,AJ=/\./g,AH=/ /g,AE=/[^\w\s.|`]/g,AD=function(A){return A.replace(AE,"\\$&")};Ak.event={add:function(O,N,M,L){if(O.nodeType!==3&&O.nodeType!==8){try{Ak.isWindow(O)&&(O!==Aq&&!O.frameElement)&&(O=Aq)}catch(K){}if(M===!1){M=AC}else{if(!M){return }}var J,I;M.handler&&(J=M,M=J.handler),M.guid||(M.guid=Ak.guid++);var H=Ak._data(O);if(!H){return }var G=H.events,F=H.handle;G||(H.events=G={}),F||(H.handle=F=function(P){return typeof Ak!=="undefined"&&Ak.event.triggered!==P.type?Ak.event.handle.apply(F.elem,arguments):Ao}),F.elem=O,N=N.split(" ");var E,D=0,C;while(E=N[D++]){I=J?Ak.extend({},J):{handler:M,data:L},E.indexOf(".")>-1?(C=E.split("."),E=C.shift(),I.namespace=C.slice(0).sort().join(".")):(C=[],I.namespace=""),I.type=E,I.guid||(I.guid=M.guid);var B=G[E],A=Ak.event.special[E]||{};if(!B){B=G[E]=[];if(!A.setup||A.setup.call(O,L,C,F)===!1){O.addEventListener?O.addEventListener(E,F,!1):O.attachEvent&&O.attachEvent("on"+E,F)}}A.add&&(A.add.call(O,I),I.handler.guid||(I.handler.guid=M.guid)),B.push(I),Ak.event.global[E]=!0}O=null}},global:{},remove:function(S,R,Q,P){if(S.nodeType!==3&&S.nodeType!==8){Q===!1&&(Q=AC);var O,N,M,L,K=0,J,I,H,G,F,E,D,C=Ak.hasData(S)&&Ak._data(S),B=C&&C.events;if(!C||!B){return }R&&R.type&&(Q=R.handler,R=R.type);if(!R||typeof R==="string"&&R.charAt(0)==="."){R=R||"";for(N in B){Ak.event.remove(S,N+R)}return }R=R.split(" ");while(N=R[K++]){D=N,E=null,J=N.indexOf(".")<0,I=[],J||(I=N.split("."),N=I.shift(),H=new RegExp("(^|\\.)"+Ak.map(I.slice(0).sort(),AD).join("\\.(?:.*\\.)?")+"(\\.|$)")),F=B[N];if(!F){continue}if(!Q){for(L=0;L<F.length;L++){E=F[L];if(J||H.test(E.namespace)){Ak.event.remove(S,D,E.handler,L),F.splice(L--,1)}}continue}G=Ak.event.special[N]||{};for(L=P||0;L<F.length;L++){E=F[L];if(Q.guid===E.guid){if(J||H.test(E.namespace)){P==null&&F.splice(L--,1),G.remove&&G.remove.call(S,E)}if(P!=null){break}}}if(F.length===0||P!=null&&F.length===1){(!G.teardown||G.teardown.call(S,I)===!1)&&Ak.removeEvent(S,N,C.handle),O=null,delete B[N]}}if(Ak.isEmptyObject(B)){var A=C.handle;A&&(A.elem=null),delete C.events,delete C.handle,Ak.isEmptyObject(C)&&Ak.removeData(S,Ao,!0)}}},trigger:function(N,M,L){var K=N.type||N,J=arguments[3];if(!J){N=typeof N==="object"?N[Ak.expando]?N:Ak.extend(Ak.Event(K),N):Ak.Event(K),K.indexOf("!")>=0&&(N.type=K=K.slice(0,-1),N.exclusive=!0),L||(N.stopPropagation(),Ak.event.global[K]&&Ak.each(Ak.cache,function(){var O=Ak.expando,P=this[O];P&&P.events&&P.events[K]&&Ak.event.trigger(N,M,P.handle.elem)}));if(!L||L.nodeType===3||L.nodeType===8){return Ao}N.result=Ao,N.target=L,M=Ak.makeArray(M),M.unshift(N)}N.currentTarget=L;var I=Ak._data(L,"handle");I&&I.apply(L,M);var H=L.parentNode||L.ownerDocument;try{L&&L.nodeName&&Ak.noData[L.nodeName.toLowerCase()]||L["on"+K]&&L["on"+K].apply(L,M)===!1&&(N.result=!1,N.preventDefault())}catch(G){}if(!N.isPropagationStopped()&&H){Ak.event.trigger(N,M,H,!0)}else{if(!N.isDefaultPrevented()){var F,E=N.target,D=K.replace(AM,""),C=Ak.nodeName(E,"a")&&D==="click",B=Ak.event.special[D]||{};if((!B._default||B._default.call(L,N)===!1)&&!C&&!(E&&E.nodeName&&Ak.noData[E.nodeName.toLowerCase()])){try{E[D]&&(F=E["on"+D],F&&(E["on"+D]=null),Ak.event.triggered=N.type,E[D]())}catch(A){}F&&(E["on"+D]=F),Ak.event.triggered=Ao}}}},handle:function(L){var K,J,I,H,G,F=[],E=Ak.makeArray(arguments);L=E[0]=Ak.event.fix(L||Aq.event),L.currentTarget=this,K=L.type.indexOf(".")<0&&!L.exclusive,K||(I=L.type.split("."),L.type=I.shift(),F=I.slice(0).sort(),H=new RegExp("(^|\\.)"+F.join("\\.(?:.*\\.)?")+"(\\.|$)")),L.namespace=L.namespace||F.join("."),G=Ak._data(this,"events"),J=(G||{})[L.type];if(G&&J){J=J.slice(0);for(var D=0,C=J.length;D<C;D++){var B=J[D];if(K||H.test(B.namespace)){L.handler=B.handler,L.data=B.data,L.handleObj=B;var A=B.handler.apply(this,E);A!==Ao&&(L.result=A,A===!1&&(L.preventDefault(),L.stopPropagation()));if(L.isImmediatePropagationStopped()){break}}}}return L.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(A){if(A[Ak.expando]){return A}var F=A;A=Ak.Event(F);for(var E=this.props.length,D;E;){D=this.props[--E],A[D]=F[D]}A.target||(A.target=A.srcElement||Am),A.target.nodeType===3&&(A.target=A.target.parentNode),!A.relatedTarget&&A.fromElement&&(A.relatedTarget=A.fromElement===A.target?A.toElement:A.fromElement);if(A.pageX==null&&A.clientX!=null){var C=Am.documentElement,B=Am.body;A.pageX=A.clientX+(C&&C.scrollLeft||B&&B.scrollLeft||0)-(C&&C.clientLeft||B&&B.clientLeft||0),A.pageY=A.clientY+(C&&C.scrollTop||B&&B.scrollTop||0)-(C&&C.clientTop||B&&B.clientTop||0)}A.which==null&&(A.charCode!=null||A.keyCode!=null)&&(A.which=A.charCode!=null?A.charCode:A.keyCode),!A.metaKey&&A.ctrlKey&&(A.metaKey=A.ctrlKey),!A.which&&A.button!==Ao&&(A.which=A.button&1?1:A.button&2?3:A.button&4?2:0);return A},guid:100000000,proxy:Ak.proxy,special:{ready:{setup:Ak.bindReady,teardown:Ak.noop},live:{add:function(A){Ak.event.add(this,BT(A.origType,A.selector),Ak.extend({},A,{handler:BV,guid:A.handler.guid}))},remove:function(A){Ak.event.remove(this,BT(A.origType,A.selector),A)}},beforeunload:{setup:function(B,A,C){Ak.isWindow(this)&&(this.onbeforeunload=C)},teardown:function(B,A){this.onbeforeunload===A&&(this.onbeforeunload=null)}}}},Ak.removeEvent=Am.removeEventListener?function(B,A,C){B.removeEventListener&&B.removeEventListener(A,C,!1)}:function(B,A,C){B.detachEvent&&B.detachEvent("on"+A,C)},Ak.Event=function(A){if(!this.preventDefault){return new Ak.Event(A)}A&&A.type?(this.originalEvent=A,this.type=A.type,this.isDefaultPrevented=A.defaultPrevented||A.returnValue===!1||A.getPreventDefault&&A.getPreventDefault()?AB:AC):this.type=A,this.timeStamp=Ak.now(),this[Ak.expando]=!0},Ak.Event.prototype={preventDefault:function(){this.isDefaultPrevented=AB;var A=this.originalEvent;A&&(A.preventDefault?A.preventDefault():A.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=AB;var A=this.originalEvent;A&&(A.stopPropagation&&A.stopPropagation(),A.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=AB,this.stopPropagation()},isDefaultPrevented:AC,isPropagationStopped:AC,isImmediatePropagationStopped:AC};var AA=function(B){var A=B.relatedTarget;try{if(A&&A!==Am&&!A.parentNode){return }while(A&&A!==this){A=A.parentNode}A!==this&&(B.type=B.data,Ak.event.handle.apply(this,arguments))}catch(C){}},Bh=function(A){A.type=A.data,Ak.event.handle.apply(this,arguments)};Ak.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(B,A){Ak.event.special[B]={setup:function(C){Ak.event.add(this,A,C&&C.selector?Bh:AA,B)},teardown:function(C){Ak.event.remove(this,A,C&&C.selector?Bh:AA)}}}),Ak.support.submitBubbles||(Ak.event.special.submit={setup:function(B,A){if(this.nodeName&&this.nodeName.toLowerCase()!=="form"){Ak.event.add(this,"click.specialSubmit",function(D){var C=D.target,E=C.type;(E==="submit"||E==="image")&&Ak(C).closest("form").length&&Ba("submit",this,arguments)}),Ak.event.add(this,"keypress.specialSubmit",function(D){var C=D.target,E=C.type;(E==="text"||E==="password")&&Ak(C).closest("form").length&&D.keyCode===13&&Ba("submit",this,arguments)})}else{return !1}},teardown:function(A){Ak.event.remove(this,".specialSubmit")}});if(!Ak.support.changeBubbles){var Bg,Be=function(B){var A=B.type,C=B.value;A==="radio"||A==="checkbox"?C=B.checked:A==="select-multiple"?C=B.selectedIndex>-1?Ak.map(B.options,function(D){return D.selected}).join("-"):"":B.nodeName.toLowerCase()==="select"&&(C=B.selectedIndex);return C},Bc=function Bc(A){var D=A.target,C,B;if(AK.test(D.nodeName)&&!D.readOnly){C=Ak._data(D,"_change_data"),B=Be(D),(A.type!=="focusout"||D.type!=="radio")&&Ak._data(D,"_change_data",B);if(C===Ao||B===C){return }if(C!=null||B){A.type="change",A.liveFired=Ao,Ak.event.trigger(A,arguments[1],D)}}};Ak.event.special.change={filters:{focusout:Bc,beforedeactivate:Bc,click:function(B){var A=B.target,C=A.type;(C==="radio"||C==="checkbox"||A.nodeName.toLowerCase()==="select")&&Bc.call(this,B)},keydown:function(B){var A=B.target,C=A.type;(B.keyCode===13&&A.nodeName.toLowerCase()!=="textarea"||B.keyCode===32&&(C==="checkbox"||C==="radio")||C==="select-multiple")&&Bc.call(this,B)},beforeactivate:function(B){var A=B.target;Ak._data(A,"_change_data",Be(A))}},setup:function(B,A){if(this.type==="file"){return !1}for(var C in Bg){Ak.event.add(this,C+".specialChange",Bg[C])}return AK.test(this.nodeName)},teardown:function(A){Ak.event.remove(this,".specialChange");return AK.test(this.nodeName)}},Bg=Ak.event.special.change.filters,Bg.focus=Bg.beforeactivate}Am.addEventListener&&Ak.each({focus:"focusin",blur:"focusout"},function(B,A){function C(E){var F=Ak.event.fix(E);F.type=A,F.originalEvent={},Ak.event.trigger(F,null,F.target),F.isDefaultPrevented()&&E.preventDefault()}var D=0;Ak.event.special[A]={setup:function(){D++===0&&Am.addEventListener(B,C,!0)},teardown:function(){--D===0&&Am.removeEventListener(B,C,!0)}}}),Ak.each(["bind","one"],function(A,B){Ak.fn[B]=function(C,I,H){if(typeof C==="object"){for(var G in C){this[B](G,I,C[G],H)}return this}if(Ak.isFunction(I)||I===!1){H=I,I=Ao}var F=B==="one"?Ak.proxy(H,function(J){Ak(this).unbind(J,F);return H.apply(this,arguments)}):H;if(C==="unload"&&B!=="one"){this.one(C,I,H)}else{for(var E=0,D=this.length;E<D;E++){Ak.event.add(this[E],C,F,I)}}return this}}),Ak.fn.extend({unbind:function(B,A){if(typeof B!=="object"||B.preventDefault){for(var D=0,C=this.length;D<C;D++){Ak.event.remove(this[D],B,A)}}else{for(var E in B){this.unbind(E,B[E])}}return this},delegate:function(B,A,D,C){return this.live(A,D,C,B)},undelegate:function(B,A,C){return arguments.length===0?this.unbind("live"):this.die(A,null,C,B)},trigger:function(B,A){return this.each(function(){Ak.event.trigger(B,A,this)})},triggerHandler:function(B,A){if(this[0]){var C=Ak.Event(B);C.preventDefault(),C.stopPropagation(),Ak.event.trigger(C,A,this[0]);return C.result}},toggle:function(B){var A=arguments,C=1;while(C<A.length){Ak.proxy(B,A[C++])}return this.click(Ak.proxy(B,function(E){var D=(Ak._data(this,"lastToggle"+B.guid)||0)%C;Ak._data(this,"lastToggle"+B.guid,D+1),E.preventDefault();return A[D].apply(this,arguments)||!1}))},hover:function(B,A){return this.mouseenter(B).mouseleave(A||B)}});var BY={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};Ak.each(["live","die"],function(A,B){Ak.fn[B]=function(P,O,N,M){var L,K=0,J,I,H,G=M||this.selector,F=M?this:Ak(this.context);if(typeof P==="object"&&!P.preventDefault){for(var E in P){F[B](E,O,P[E],G)}return this}Ak.isFunction(O)&&(N=O,O=Ao),P=(P||"").split(" ");while((L=P[K++])!=null){J=AM.exec(L),I="",J&&(I=J[0],L=L.replace(AM,""));if(L==="hover"){P.push("mouseenter"+I,"mouseleave"+I);continue}H=L,L==="focus"||L==="blur"?(P.push(BY[L]+I),L=L+I):L=(BY[L]||L)+I;if(B==="live"){for(var D=0,C=F.length;D<C;D++){Ak.event.add(F[D],"live."+BT(L,G),{data:O,selector:G,handler:N,origType:L,origHandler:N,preType:H})}}else{F.unbind("live."+BT(L,G),N)}}return this}}),Ak.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,A){Ak.fn[A]=function(C,D){D==null&&(D=C,C=null);return arguments.length>0?this.bind(A,C,D):this.trigger(A)},Ak.attrFn&&(Ak.attrFn[A]=!0)}),function(){function B(m,l,k,Z,Y,X){for(var W=0,V=Z.length;W<V;W++){var U=Z[W];if(U){var T=!1;U=U[m];while(U){if(U.sizcache===k){T=Z[U.sizset];break}if(U.nodeType===1){X||(U.sizcache=k,U.sizset=W);if(typeof l!=="string"){if(U===l){T=!0;break}}else{if(L.filter(l,[U]).length>0){T=U;break}}}U=U[m]}Z[W]=T}}}function C(m,l,k,Z,Y,X){for(var W=0,V=Z.length;W<V;W++){var U=Z[W];if(U){var T=!1;U=U[m];while(U){if(U.sizcache===k){T=Z[U.sizset];break}U.nodeType===1&&!X&&(U.sizcache=k,U.sizset=W);if(U.nodeName.toLowerCase()===l){T=U;break}U=U[m]}Z[W]=T}}}var S=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,R=0,Q=Object.prototype.toString,P=!1,O=!0,N=/\\/g,M=/\W/;[0,0].sort(function(){O=!1;return 0});var L=function(l,f,c,a){c=c||[],f=f||Am;var Z=f;if(f.nodeType!==1&&f.nodeType!==9){return[]}if(!l||typeof l!=="string"){return c}var Y,X,W,V,U,T,B3,z,v=!0,p=L.isXML(f),m=[],k=l;do{S.exec(""),Y=S.exec(k);if(Y){k=Y[3],m.push(Y[1]);if(Y[2]){V=Y[3];break}}}while(Y);if(m.length>1&&J.exec(l)){if(m.length===2&&K.relative[m[0]]){X=A(m[0]+m[1],f)}else{X=K.relative[m[0]]?[f]:L(m.shift(),f);while(m.length){l=m.shift(),K.relative[l]&&(l+=m.shift()),X=A(l,X)}}}else{!a&&m.length>1&&f.nodeType===9&&!p&&K.match.ID.test(m[0])&&!K.match.ID.test(m[m.length-1])&&(U=L.find(m.shift(),f,p),f=U.expr?L.filter(U.expr,U.set)[0]:U.set[0]);if(f){U=a?{expr:m.pop(),set:G(a)}:L.find(m.pop(),m.length===1&&(m[0]==="~"||m[0]==="+")&&f.parentNode?f.parentNode:f,p),X=U.expr?L.filter(U.expr,U.set):U.set,m.length>0?W=G(X):v=!1;while(m.length){T=m.pop(),B3=T,K.relative[T]?B3=m.pop():T="",B3==null&&(B3=f),K.relative[T](W,B3,p)}}else{W=m=[]}}W||(W=X),W||L.error(T||l);if(Q.call(W)==="[object Array]"){if(v){if(f&&f.nodeType===1){for(z=0;W[z]!=null;z++){W[z]&&(W[z]===!0||W[z].nodeType===1&&L.contains(f,W[z]))&&c.push(X[z])}}else{for(z=0;W[z]!=null;z++){W[z]&&W[z].nodeType===1&&c.push(X[z])}}}else{c.push.apply(c,W)}}else{G(W,c)}V&&(L(V,Z,c,a),L.uniqueSort(c));return c};L.uniqueSort=function(U){if(E){P=O,U.sort(E);if(P){for(var T=1;T<U.length;T++){U[T]===U[T-1]&&U.splice(T--,1)}}}return U},L.matches=function(U,T){return L(U,null,null,T)},L.matchesSelector=function(U,T){return L(T,null,null,[U]).length>0},L.find=function(l,k,Z){var Y;if(!l){return[]}for(var X=0,W=K.order.length;X<W;X++){var V,U=K.order[X];if(V=K.leftMatch[U].exec(l)){var T=V[1];V.splice(1,1);if(T.substr(T.length-1)!=="\\"){V[1]=(V[1]||"").replace(N,""),Y=K.find[U](V,k,Z);if(Y!=null){l=l.replace(K.match[U],"");break}}}}Y||(Y=typeof k.getElementsByTagName!=="undefined"?k.getElementsByTagName("*"):[]);return{set:Y,expr:l}},L.filter=function(z,y,w,v){var u,l,k=z,b=[],Z=y,Y=y&&y[0]&&L.isXML(y[0]);while(z&&y.length){for(var X in K.filter){if((u=K.leftMatch[X].exec(z))!=null&&u[2]){var W,V,U=K.filter[X],T=u[1];l=!1,u.splice(1,1);if(T.substr(T.length-1)==="\\"){continue}Z===b&&(b=[]);if(K.preFilter[X]){u=K.preFilter[X](u,Z,w,b,v,Y);if(u){if(u===!0){continue}}else{l=W=!0}}if(u){for(var B4=0;(V=Z[B4])!=null;B4++){if(V){W=U(V,u,B4,Z);var B3=v^!!W;w&&W!=null?B3?l=!0:Z[B4]=!1:B3&&(b.push(V),l=!0)}}}if(W!==Ao){w||(Z=b),z=z.replace(K.match[X],"");if(!l){return[]}break}}}if(z===k){if(l==null){L.error(z)}else{break}}k=z}return Z},L.error=function(T){throw"Syntax error, unrecognized expression: "+T};var K=L.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(T){return T.getAttribute("href")},type:function(T){return T.getAttribute("type")}},relative:{"+":function(U,T){var j=typeof T==="string",Z=j&&!M.test(T),Y=j&&!Z;Z&&(T=T.toLowerCase());for(var X=0,W=U.length,V;X<W;X++){if(V=U[X]){while((V=V.previousSibling)&&V.nodeType!==1){}U[X]=Y||V&&V.nodeName.toLowerCase()===T?V||!1:V===T}}Y&&L.filter(T,U,!0)},">":function(U,T){var Z,Y=typeof T==="string",X=0,W=U.length;if(Y&&!M.test(T)){T=T.toLowerCase();for(;X<W;X++){Z=U[X];if(Z){var V=Z.parentNode;U[X]=V.nodeName.toLowerCase()===T?V:!1}}}else{for(;X<W;X++){Z=U[X],Z&&(U[X]=Y?Z.parentNode:Z.parentNode===T)}Y&&L.filter(T,U,!0)}},"":function(U,T,Y){var X,W=R++,V=B;typeof T==="string"&&!M.test(T)&&(T=T.toLowerCase(),X=T,V=C),V("parentNode",T,W,U,X,Y)},"~":function(U,T,Y){var X,W=R++,V=B;typeof T==="string"&&!M.test(T)&&(T=T.toLowerCase(),X=T,V=C),V("previousSibling",T,W,U,X,Y)}},find:{ID:function(U,T,W){if(typeof T.getElementById!=="undefined"&&!W){var V=T.getElementById(U[1]);return V&&V.parentNode?[V]:[]}},NAME:function(U,T){if(typeof T.getElementsByName!=="undefined"){var Y=[],X=T.getElementsByName(U[1]);for(var W=0,V=X.length;W<V;W++){X[W].getAttribute("name")===U[1]&&Y.push(X[W])}return Y.length===0?null:Y}},TAG:function(U,T){if(typeof T.getElementsByTagName!=="undefined"){return T.getElementsByTagName(U[1])}}},preFilter:{CLASS:function(U,T,j,Z,Y,X){U=" "+U[1].replace(N,"")+" ";if(X){return U}for(var W=0,V;(V=T[W])!=null;W++){V&&(Y^(V.className&&(" "+V.className+" ").replace(/[\t\n\r]/g," ").indexOf(U)>=0)?j||Z.push(V):j&&(T[W]=!1))}return !1},ID:function(T){return T[1].replace(N,"")},TAG:function(U,T){return U[1].replace(N,"").toLowerCase()},CHILD:function(U){if(U[1]==="nth"){U[2]||L.error(U[0]),U[2]=U[2].replace(/^\+|\s*/g,"");var T=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(U[2]==="even"&&"2n"||U[2]==="odd"&&"2n+1"||!/\D/.test(U[2])&&"0n+"+U[2]||U[2]);U[2]=T[1]+(T[2]||1)-0,U[3]=T[3]-0}else{U[2]&&L.error(U[0])}U[0]=R++;return U},ATTR:function(U,T,Z,Y,X,W){var V=U[1]=U[1].replace(N,"");!W&&K.attrMap[V]&&(U[1]=K.attrMap[V]),U[4]=(U[4]||U[5]||"").replace(N,""),U[2]==="~="&&(U[4]=" "+U[4]+" ");return U},PSEUDO:function(T,Y,X,W,V){if(T[1]==="not"){if((S.exec(T[3])||"").length>1||/^\w/.test(T[3])){T[3]=L(T[3],null,null,Y)}else{var U=L.filter(T[3],Y,X,!0^V);X||W.push.apply(W,U);return !1}}else{if(K.match.POS.test(T[0])||K.match.CHILD.test(T[0])){return !0}}return T},POS:function(T){T.unshift(!0);return T}},filters:{enabled:function(T){return T.disabled===!1&&T.type!=="hidden"},disabled:function(T){return T.disabled===!0},checked:function(T){return T.checked===!0},selected:function(T){T.parentNode&&T.parentNode.selectedIndex;return T.selected===!0},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(U,T,V){return !!L(V[3],U).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(U){var T=U.getAttribute("type"),V=U.type;return"text"===V&&(T===V||T===null)},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toLowerCase()==="button"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(U,T,W,V){return T===V.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(U,T,V){return T<V[3]-0},gt:function(U,T,V){return T>V[3]-0},nth:function(U,T,V){return V[3]-0===T},eq:function(U,T,V){return V[3]-0===T}},filter:{PSEUDO:function(k,j,Z,Y){var X=j[1],W=K.filters[X];if(W){return W(k,Z,j,Y)}if(X==="contains"){return(k.textContent||k.innerText||L.getText([k])||"").indexOf(j[3])>=0}if(X==="not"){var V=j[3];for(var U=0,T=V.length;U<T;U++){if(V[U]===k){return !1}}return !0}L.error(X)},CHILD:function(m,l){var k=l[1],Z=m;switch(k){case"only":case"first":while(Z=Z.previousSibling){if(Z.nodeType===1){return !1}}if(k==="first"){return !0}Z=m;case"last":while(Z=Z.nextSibling){if(Z.nodeType===1){return !1}}return !0;case"nth":var Y=l[2],X=l[3];if(Y===1&&X===0){return !0}var W=l[0],V=m.parentNode;if(V&&(V.sizcache!==W||!m.nodeIndex)){var U=0;for(Z=V.firstChild;Z;Z=Z.nextSibling){Z.nodeType===1&&(Z.nodeIndex=++U)}V.sizcache=W}var T=m.nodeIndex-X;return Y===0?T===0:T%Y===0&&T/Y>=0}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return T==="*"&&U.nodeType===1||U.nodeName.toLowerCase()===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(U,T){var Z=T[1],Y=K.attrHandle[Z]?K.attrHandle[Z](U):U[Z]!=null?U[Z]:U.getAttribute(Z),X=Y+"",W=T[2],V=T[4];return Y==null?W==="!=":W==="="?X===V:W==="*="?X.indexOf(V)>=0:W==="~="?(" "+X+" ").indexOf(V)>=0:V?W==="!="?X!==V:W==="^="?X.indexOf(V)===0:W==="$="?X.substr(X.length-V.length)===V:W==="|="?X===V||X.substr(0,V.length+1)===V+"-":!1:X&&Y!==!1},POS:function(U,T,Y,X){var W=T[2],V=K.setFilters[W];if(V){return V(U,Y,T,X)}}}},J=K.match.POS,I=function(U,T){return"\\"+(T-0+1)};for(var H in K.match){K.match[H]=new RegExp(K.match[H].source+/(?![^\[]*\])(?![^\(]*\))/.source),K.leftMatch[H]=new RegExp(/(^(?:.|\r|\n)*?)/.source+K.match[H].source.replace(/\\(\d+)/g,I))}var G=function(U,T){U=Array.prototype.slice.call(U,0);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(Am.documentElement.childNodes,0)[0].nodeType}catch(F){G=function(U,T){var X=0,W=T||[];if(Q.call(U)==="[object Array]"){Array.prototype.push.apply(W,U)}else{if(typeof U.length==="number"){for(var V=U.length;X<V;X++){W.push(U[X])}}else{for(;U[X];X++){W.push(U[X])}}}return W}}var E,D;Am.documentElement.compareDocumentPosition?E=function(U,T){if(U===T){P=!0;return 0}if(!U.compareDocumentPosition||!T.compareDocumentPosition){return U.compareDocumentPosition?-1:1}return U.compareDocumentPosition(T)&4?-1:1}:(E=function(m,l){var g,Z,Y=[],X=[],W=m.parentNode,V=l.parentNode,U=W;if(m===l){P=!0;return 0}if(W===V){return D(m,l)}if(!W){return -1}if(!V){return 1}while(U){Y.unshift(U),U=U.parentNode}U=V;while(U){X.unshift(U),U=U.parentNode}g=Y.length,Z=X.length;for(var T=0;T<g&&T<Z;T++){if(Y[T]!==X[T]){return D(Y[T],X[T])}}return T===g?D(m,X[T],-1):D(Y[T],l,1)},D=function(U,T,W){if(U===T){return W}var V=U.nextSibling;while(V){if(V===T){return -1}V=V.nextSibling}return 1}),L.getText=function(U){var T="",W;for(var V=0;U[V];V++){W=U[V],W.nodeType===3||W.nodeType===4?T+=W.nodeValue:W.nodeType!==8&&(T+=L.getText(W.childNodes))}return T},function(){var T=Am.createElement("div"),V="script"+(new Date).getTime(),U=Am.documentElement;T.innerHTML="<a name='"+V+"'/>",U.insertBefore(T,U.firstChild),Am.getElementById(V)&&(K.find.ID=function(W,Z,Y){if(typeof Z.getElementById!=="undefined"&&!Y){var X=Z.getElementById(W[1]);return X?X.id===W[1]||typeof X.getAttributeNode!=="undefined"&&X.getAttributeNode("id").nodeValue===W[1]?[X]:Ao:[]}},K.filter.ID=function(X,W){var Y=typeof X.getAttributeNode!=="undefined"&&X.getAttributeNode("id");return X.nodeType===1&&Y&&Y.nodeValue===W}),U.removeChild(T),U=T=null}(),function(){var T=Am.createElement("div");T.appendChild(Am.createComment("")),T.getElementsByTagName("*").length>0&&(K.find.TAG=function(V,U){var Y=U.getElementsByTagName(V[1]);if(V[1]==="*"){var X=[];for(var W=0;Y[W];W++){Y[W].nodeType===1&&X.push(Y[W])}Y=X}return Y}),T.innerHTML="<a href='#'></a>",T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"&&(K.attrHandle.href=function(U){return U.getAttribute("href",2)}),T=null}(),Am.querySelectorAll&&function(){var U=L,T=Am.createElement("div"),W="__sizzle__";T.innerHTML="<p class='TEST'></p>";if(!T.querySelectorAll||T.querySelectorAll(".TEST").length!==0){L=function(w,v,u,p){v=v||Am;if(!p&&!L.isXML(v)){var l=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(w);if(l&&(v.nodeType===1||v.nodeType===9)){if(l[1]){return G(v.getElementsByTagName(w),u)}if(l[2]&&K.find.CLASS&&v.getElementsByClassName){return G(v.getElementsByClassName(l[2]),u)}}if(v.nodeType===9){if(w==="body"&&v.body){return G([v.body],u)}if(l&&l[3]){var k=v.getElementById(l[3]);if(!k||!k.parentNode){return G([],u)}if(k.id===l[3]){return G([k],u)}}try{return G(v.querySelectorAll(w),u)}catch(d){}}else{if(v.nodeType===1&&v.nodeName.toLowerCase()!=="object"){var c=v,a=v.getAttribute("id"),Z=a||W,Y=v.parentNode,X=/^\s*[+~]/.test(w);a?Z=Z.replace(/'/g,"\\$&"):v.setAttribute("id",Z),X&&Y&&(v=v.parentNode);try{if(!X||Y){return G(v.querySelectorAll("[id='"+Z+"'] "+w),u)}}catch(y){}finally{a||c.removeAttribute("id")}}}}return U(w,v,u,p)};for(var V in U){L[V]=U[V]}T=null}}(),function(){var U=Am.documentElement,T=U.matchesSelector||U.mozMatchesSelector||U.webkitMatchesSelector||U.msMatchesSelector;if(T){var X=!T.call(Am.createElement("div"),"div"),W=!1;try{T.call(Am.documentElement,"[test!='']:sizzle")}catch(V){W=!0}L.matchesSelector=function(Y,d){d=d.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!L.isXML(Y)){try{if(W||!K.match.PSEUDO.test(d)&&!/!=/.test(d)){var b=T.call(Y,d);if(b||!X||Y.document&&Y.document.nodeType!==11){return b}}}catch(Z){}}return L(d,null,null,[Y]).length>0}}}(),function(){var T=Am.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName&&T.getElementsByClassName("e").length!==0){T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return }K.order.splice(1,0,"CLASS"),K.find.CLASS=function(V,U,W){if(typeof U.getElementsByClassName!=="undefined"&&!W){return U.getElementsByClassName(V[1])}},T=null}}(),Am.documentElement.contains?L.contains=function(U,T){return U!==T&&(U.contains?U.contains(T):!0)}:Am.documentElement.compareDocumentPosition?L.contains=function(U,T){return !!(U.compareDocumentPosition(T)&16)}:L.contains=function(){return !1},L.isXML=function(U){var T=(U?U.ownerDocument||U:0).documentElement;return T?T.nodeName!=="HTML":!1};var A=function(U,T){var j,Z=[],Y="",X=T.nodeType?[T]:T;while(j=K.match.PSEUDO.exec(U)){Y+=j[0],U=U.replace(K.match.PSEUDO,"")}U=K.relative[U]?U+"*":U;for(var W=0,V=X.length;W<V;W++){L(U,X[W],Z)}return L.filter(Y,Z)};Ak.find=L,Ak.expr=L.selectors,Ak.expr[":"]=Ak.expr.filters,Ak.unique=L.uniqueSort,Ak.text=L.getText,Ak.isXMLDoc=L.isXML,Ak.contains=L.contains}();var BS=/Until$/,BR=/^(?:parents|prevUntil|prevAll)/,BQ=/,/,BP=/^.[^:#\[\.,]*$/,BO=Array.prototype.slice,BM=Ak.expr.match.POS,BL={children:!0,contents:!0,next:!0,prev:!0};Ak.fn.extend({find:function(B){var A=this.pushStack("","find",B),G=0;for(var F=0,E=this.length;F<E;F++){G=A.length,Ak.find(B,this[F],A);if(F>0){for(var D=G;D<A.length;D++){for(var C=0;C<G;C++){if(A[C]===A[D]){A.splice(D--,1);break}}}}}return A},has:function(B){var A=Ak(B);return this.filter(function(){for(var C=0,D=A.length;C<D;C++){if(Ak.contains(this,A[C])){return !0}}})},not:function(A){return this.pushStack(BH(this,A,!1),"not",A)},filter:function(A){return this.pushStack(BH(this,A,!0),"filter",A)},is:function(A){return !!A&&Ak.filter(A,this).length>0},closest:function(K,J){var I=[],H,G,F=this[0];if(Ak.isArray(K)){var E,D,C={},B=1;if(F&&K.length){for(H=0,G=K.length;H<G;H++){D=K[H],C[D]||(C[D]=Ak.expr.match.POS.test(D)?Ak(D,J||this.context):D)}while(F&&F.ownerDocument&&F!==J){for(D in C){E=C[D],(E.jquery?E.index(F)>-1:Ak(F).is(E))&&I.push({selector:D,elem:F,level:B})}F=F.parentNode,B++}}return I}var A=BM.test(K)?Ak(K,J||this.context):null;for(H=0,G=this.length;H<G;H++){F=this[H];while(F){if(A?A.index(F)>-1:Ak.find.matchesSelector(F,K)){I.push(F);break}F=F.parentNode;if(!F||!F.ownerDocument||F===J){break}}}I=I.length>1?Ak.unique(I):I;return this.pushStack(I,"closest",K)},index:function(A){if(!A||typeof A==="string"){return Ak.inArray(this[0],A?Ak(A):this.parent().children())}return Ak.inArray(A.jquery?A[0]:A,this)},add:function(B,A){var D=typeof B==="string"?Ak(B,A):Ak.makeArray(B),C=Ak.merge(this.get(),D);return this.pushStack(BJ(D[0])||BJ(C[0])?C:Ak.unique(C))},andSelf:function(){return this.add(this.prevObject)}}),Ak.each({parent:function(B){var A=B.parentNode;return A&&A.nodeType!==11?A:null},parents:function(A){return Ak.dir(A,"parentNode")},parentsUntil:function(B,A,C){return Ak.dir(B,"parentNode",C)},next:function(A){return Ak.nth(A,2,"nextSibling")},prev:function(A){return Ak.nth(A,2,"previousSibling")},nextAll:function(A){return Ak.dir(A,"nextSibling")},prevAll:function(A){return Ak.dir(A,"previousSibling")},nextUntil:function(B,A,C){return Ak.dir(B,"nextSibling",C)},prevUntil:function(B,A,C){return Ak.dir(B,"previousSibling",C)},siblings:function(A){return Ak.sibling(A.parentNode.firstChild,A)},children:function(A){return Ak.sibling(A.firstChild)},contents:function(A){return Ak.nodeName(A,"iframe")?A.contentDocument||A.contentWindow.document:Ak.makeArray(A.childNodes)}},function(B,A){Ak.fn[B]=function(F,E){var D=Ak.map(this,A,F),C=BO.call(arguments);BS.test(B)||(E=F),E&&typeof E==="string"&&(D=Ak.filter(E,D)),D=this.length>1&&!BL[B]?Ak.unique(D):D,(this.length>1||BQ.test(E))&&BR.test(B)&&(D=D.reverse());return this.pushStack(D,B,C.join(","))}}),Ak.extend({filter:function(B,A,C){C&&(B=":not("+B+")");return A.length===1?Ak.find.matchesSelector(A[0],B)?[A[0]]:[]:Ak.find.matches(B,A)},dir:function(A,E,D){var C=[],B=A[E];while(B&&B.nodeType!==9&&(D===Ao||B.nodeType!==1||!Ak(B).is(D))){B.nodeType===1&&C.push(B),B=B[E]}return C},nth:function(B,A,E,D){A=A||1;var C=0;for(;B;B=B[E]){if(B.nodeType===1&&++C===A){break}}return B},sibling:function(B,A){var C=[];for(;B;B=B.nextSibling){B.nodeType===1&&B!==A&&C.push(B)}return C}});var BF=/ jQuery\d+="(?:\d+|null)"/g,BD=/^\s+/,BB=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,A9=/<([\w:]+)/,A7=/<tbody/i,A5=/<|&#?\w+;/,A3=/<(?:script|object|embed|option|style)/i,A1=/checked\s*(?:[^=]|=\s*.checked.)/i,Az={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,"",""]};Az.optgroup=Az.option,Az.tbody=Az.tfoot=Az.colgroup=Az.caption=Az.thead,Az.th=Az.td,Ak.support.htmlSerialize||(Az._default=[1,"div<div>","</div>"]),Ak.fn.extend({text:function(A){if(Ak.isFunction(A)){return this.each(function(B){var C=Ak(this);C.text(A.call(this,B,C.text()))})}if(typeof A!=="object"&&A!==Ao){return this.empty().append((this[0]&&this[0].ownerDocument||Am).createTextNode(A))}return Ak.text(this)},wrapAll:function(B){if(Ak.isFunction(B)){return this.each(function(C){Ak(this).wrapAll(B.call(this,C))})}if(this[0]){var A=Ak(B,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&A.insertBefore(this[0]),A.map(function(){var C=this;while(C.firstChild&&C.firstChild.nodeType===1){C=C.firstChild}return C}).append(this)}return this},wrapInner:function(A){if(Ak.isFunction(A)){return this.each(function(B){Ak(this).wrapInner(A.call(this,B))})}return this.each(function(){var B=Ak(this),C=B.contents();C.length?C.wrapAll(A):B.append(A)})},wrap:function(A){return this.each(function(){Ak(this).wrapAll(A)})},unwrap:function(){return this.parent().each(function(){Ak.nodeName(this,"body")||Ak(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(A){this.nodeType===1&&this.appendChild(A)})},prepend:function(){return this.domManip(arguments,!0,function(A){this.nodeType===1&&this.insertBefore(A,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,!1,function(B){this.parentNode.insertBefore(B,this)})}if(arguments.length){var A=Ak(arguments[0]);A.push.apply(A,this.toArray());return this.pushStack(A,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,!1,function(B){this.parentNode.insertBefore(B,this.nextSibling)})}if(arguments.length){var A=this.pushStack(this,"after",arguments);A.push.apply(A,Ak(arguments[0]).toArray());return A}},remove:function(B,A){for(var D=0,C;(C=this[D])!=null;D++){if(!B||Ak.filter(B,[C]).length){!A&&C.nodeType===1&&(Ak.cleanData(C.getElementsByTagName("*")),Ak.cleanData([C])),C.parentNode&&C.parentNode.removeChild(C)}}return this},empty:function(){for(var B=0,A;(A=this[B])!=null;B++){A.nodeType===1&&Ak.cleanData(A.getElementsByTagName("*"));while(A.firstChild){A.removeChild(A.firstChild)}}return this},clone:function(B,A){B=B==null?!1:B,A=A==null?B:A;return this.map(function(){return Ak.clone(this,B,A)})},html:function(A){if(A===Ao){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(BF,""):null}if(typeof A!=="string"||A3.test(A)||!Ak.support.leadingWhitespace&&BD.test(A)||Az[(A9.exec(A)||["",""])[1].toLowerCase()]){Ak.isFunction(A)?this.each(function(E){var F=Ak(this);F.html(A.call(this,E,F.html()))}):this.empty().append(A)}else{A=A.replace(BB,"<$1></$2>");try{for(var D=0,C=this.length;D<C;D++){this[D].nodeType===1&&(Ak.cleanData(this[D].getElementsByTagName("*")),this[D].innerHTML=A)}}catch(B){this.empty().append(A)}}return this},replaceWith:function(A){if(this[0]&&this[0].parentNode){if(Ak.isFunction(A)){return this.each(function(B){var D=Ak(this),C=D.html();D.replaceWith(A.call(this,B,C))})}typeof A!=="string"&&(A=Ak(A).detach());return this.each(function(){var B=this.nextSibling,C=this.parentNode;Ak(this).remove(),B?Ak(B).before(A):Ak(C).append(A)})}return this.length?this.pushStack(Ak(Ak.isFunction(A)?A():A),"replaceWith",A):this},detach:function(A){return this.remove(A,!0)},domManip:function(L,K,J){var I,H,G,F,E=L[0],D=[];if(!Ak.support.checkClone&&arguments.length===3&&typeof E==="string"&&A1.test(E)){return this.each(function(){Ak(this).domManip(L,K,J,!0)})}if(Ak.isFunction(E)){return this.each(function(N){var M=Ak(this);L[0]=E.call(this,N,K?M.html():Ao),M.domManip(L,K,J)})}if(this[0]){F=E&&E.parentNode,Ak.support.parentNode&&F&&F.nodeType===11&&F.childNodes.length===this.length?I={fragment:F}:I=Ak.buildFragment(L,this,D),G=I.fragment,G.childNodes.length===1?H=G=G.firstChild:H=G.firstChild;if(H){K=K&&Ak.nodeName(H,"tr");for(var C=0,B=this.length,A=B-1;C<B;C++){J.call(K?B1(this[C],H):this[C],I.cacheable||B>1&&C<A?Ak.clone(G,!0,!0):G)}}D.length&&Ak.each(D,BG)}return this}}),Ak.buildFragment=function(B,A,G){var F,E,D,C=A&&A[0]?A[0].ownerDocument||A[0]:Am;B.length===1&&typeof B[0]==="string"&&B[0].length<512&&C===Am&&B[0].charAt(0)==="<"&&!A3.test(B[0])&&(Ak.support.checkClone||!A1.test(B[0]))&&(E=!0,D=Ak.fragments[B[0]],D&&(D!==1&&(F=D))),F||(F=C.createDocumentFragment(),Ak.clean(B,C,F,G)),E&&(Ak.fragments[B[0]]=D?F:1);return{fragment:F,cacheable:E}},Ak.fragments={},Ak.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(B,A){Ak.fn[B]=function(I){var H=[],G=Ak(I),F=this.length===1&&this[0].parentNode;if(F&&F.nodeType===11&&F.childNodes.length===1&&G.length===1){G[A](this[0]);return this}for(var E=0,D=G.length;E<D;E++){var C=(E>0?this.clone(!0):this).get();Ak(G[E])[A](C),H=H.concat(C)}return this.pushStack(H,B,G.selector)}}),Ak.extend({clone:function(B,A,G){var F=B.cloneNode(!0),E,D,C;if((!Ak.support.noCloneEvent||!Ak.support.noCloneChecked)&&(B.nodeType===1||B.nodeType===11)&&!Ak.isXMLDoc(B)){BK(B,F),E=BI(B),D=BI(F);for(C=0;E[C];++C){BK(E[C],D[C])}}if(A){As(B,F);if(G){E=BI(B),D=BI(F);for(C=0;E[C];++C){As(E[C],D[C])}}}return F},clean:function(N,M,L,K){M=M||Am,typeof M.createElement==="undefined"&&(M=M.ownerDocument||M[0]&&M[0].ownerDocument||Am);var J=[];for(var I=0,H;(H=N[I])!=null;I++){typeof H==="number"&&(H+="");if(!H){continue}if(typeof H!=="string"||A5.test(H)){if(typeof H==="string"){H=H.replace(BB,"<$1></$2>");var G=(A9.exec(H)||["",""])[1].toLowerCase(),F=Az[G]||Az._default,E=F[0],D=M.createElement("div");D.innerHTML=F[1]+H+F[2];while(E--){D=D.lastChild}if(!Ak.support.tbody){var C=A7.test(H),B=G==="table"&&!C?D.firstChild&&D.firstChild.childNodes:F[1]==="<table>"&&!C?D.childNodes:[];for(var A=B.length-1;A>=0;--A){Ak.nodeName(B[A],"tbody")&&!B[A].childNodes.length&&B[A].parentNode.removeChild(B[A])}}!Ak.support.leadingWhitespace&&BD.test(H)&&D.insertBefore(M.createTextNode(BD.exec(H)[0]),D.firstChild),H=D.childNodes}}else{H=M.createTextNode(H)}H.nodeType?J.push(H):J=Ak.merge(J,H)}if(L){for(I=0;J[I];I++){!K||!Ak.nodeName(J[I],"script")||J[I].type&&J[I].type.toLowerCase()!=="text/javascript"?(J[I].nodeType===1&&J.splice.apply(J,[I+1,0].concat(Ak.makeArray(J[I].getElementsByTagName("script")))),L.appendChild(J[I])):K.push(J[I].parentNode?J[I].parentNode.removeChild(J[I]):J[I])}}return J},cleanData:function(J){var I,H,G=Ak.cache,F=Ak.expando,E=Ak.event.special,D=Ak.support.deleteExpando;for(var C=0,B;(B=J[C])!=null;C++){if(B.nodeName&&Ak.noData[B.nodeName.toLowerCase()]){continue}H=B[Ak.expando];if(H){I=G[H]&&G[H][F];if(I&&I.events){for(var A in I.events){E[A]?Ak.event.remove(B,A):Ak.removeEvent(B,A,I.handle)}I.handle&&(I.handle.elem=null)}D?delete B[Ak.expando]:B.removeAttribute&&B.removeAttribute(Ak.expando),delete G[H]}}}});var BE=/alpha\([^)]*\)/i,BC=/opacity=([^)]*)/,BA=/-([a-z])/ig,A8=/([A-Z]|^ms)/g,A6=/^-?\d+(?:px)?$/i,A4=/^-?\d/,A2={position:"absolute",visibility:"hidden",display:"block"},A0=["Left","Right"],Ay=["Top","Bottom"],Ax,Aw,Av,Au=function(B,A){return A.toUpperCase()};Ak.fn.css=function(A,B){if(arguments.length===2&&B===Ao){return this}return Ak.access(this,A,B,!0,function(C,E,D){return D!==Ao?Ak.style(C,E,D):Ak.css(C,E)})},Ak.extend({cssHooks:{opacity:{get:function(B,A){if(A){var C=Ax(B,"opacity","opacity");return C===""?"1":C}return B.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":Ak.support.cssFloat?"cssFloat":"styleFloat"},style:function(I,H,G,F){if(I&&I.nodeType!==3&&I.nodeType!==8&&I.style){var E,D=Ak.camelCase(H),C=I.style,B=Ak.cssHooks[D];H=Ak.cssProps[D]||D;if(G===Ao){if(B&&"get" in B&&(E=B.get(I,!1,F))!==Ao){return E}return C[H]}if(typeof G==="number"&&isNaN(G)||G==null){return }typeof G==="number"&&!Ak.cssNumber[D]&&(G+="px");if(!B||!("set" in B)||(G=B.set(I,G))!==Ao){try{C[H]=G}catch(A){}}}},css:function(A,F,E){var D,C=Ak.camelCase(F),B=Ak.cssHooks[C];F=Ak.cssProps[C]||C;if(B&&"get" in B&&(D=B.get(A,!0,E))!==Ao){return D}if(Ax){return Ax(A,F,C)}},swap:function(B,A,E){var D={};for(var C in A){D[C]=B.style[C],B.style[C]=A[C]}E.call(B);for(C in A){B.style[C]=D[C]}},camelCase:function(A){return A.replace(BA,Au)}}),Ak.curCSS=Ak.css,Ak.each(["height","width"],function(B,A){Ak.cssHooks[A]={get:function(C,F,E){var D;if(F){C.offsetWidth!==0?D=At(C,A,E):Ak.swap(C,A2,function(){D=At(C,A,E)});if(D<=0){D=Ax(C,A,A),D==="0px"&&Av&&(D=Av(C,A,A));if(D!=null){return D===""||D==="auto"?"0px":D}}if(D<0||D==null){D=C.style[A];return D===""||D==="auto"?"0px":D}return typeof D==="string"?D:D+"px"}},set:function(D,C){if(!A6.test(C)){return C}C=parseFloat(C);if(C>=0){return C+"px"}}}}),Ak.support.opacity||(Ak.cssHooks.opacity={get:function(B,A){return BC.test((A&&B.currentStyle?B.currentStyle.filter:B.style.filter)||"")?parseFloat(RegExp.$1)/100+"":A?"1":""},set:function(B,A){var E=B.style;E.zoom=1;var D=Ak.isNaN(A)?"":"alpha(opacity="+A*100+")",C=E.filter||"";E.filter=BE.test(C)?C.replace(BE,D):E.filter+" "+D}}),Ak(function(){Ak.support.reliableMarginRight||(Ak.cssHooks.marginRight={get:function(B,A){var C;Ak.swap(B,{display:"inline-block"},function(){A?C=Ax(B,"margin-right","marginRight"):C=B.style.marginRight});return C}})}),Am.defaultView&&Am.defaultView.getComputedStyle&&(Aw=function(A,F,E){var D,C,B;E=E.replace(A8,"-$1").toLowerCase();if(!(C=A.ownerDocument.defaultView)){return Ao}if(B=C.getComputedStyle(A,null)){D=B.getPropertyValue(E),D===""&&!Ak.contains(A.ownerDocument.documentElement,A)&&(D=Ak.style(A,E))}return D}),Am.documentElement.currentStyle&&(Av=function(B,A){var F,E=B.currentStyle&&B.currentStyle[A],D=B.runtimeStyle&&B.runtimeStyle[A],C=B.style;!A6.test(E)&&A4.test(E)&&(F=C.left,D&&(B.runtimeStyle.left=B.currentStyle.left),C.left=A==="fontSize"?"1em":E||0,E=C.pixelLeft+"px",C.left=F,D&&(B.runtimeStyle.left=D));return E===""?"auto":E}),Ax=Aw||Av,Ak.expr&&Ak.expr.filters&&(Ak.expr.filters.hidden=function(B){var A=B.offsetWidth,C=B.offsetHeight;return A===0&&C===0||!Ak.support.reliableHiddenOffsets&&(B.style.display||Ak.css(B,"display"))==="none"},Ak.expr.filters.visible=function(A){return !Ak.expr.filters.hidden(A)});var Ar=/%20/g,Ap=/\[\]$/,An=/\r?\n/g,Al=/#.*$/,Aj=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Ah=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Af=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,Ad=/^(?:GET|HEAD)$/,Ab=/^\/\//,B0=/\?/,Bz=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,By=/^(?:select|textarea)/i,Bx=/\s+/,Bw=/([?&])_=[^&]*/,Bv=/(^|\-)([a-z])/g,Bu=function(B,A,C){return A+C.toUpperCase()},Bt=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,Bs=Ak.fn.load,Br={},Bq={},Bp,Bo;try{Bp=Am.location.href}catch(Bn){Bp=Am.createElement("a"),Bp.href="",Bp=Bp.href}Bo=Bt.exec(Bp.toLowerCase())||[],Ak.fn.extend({load:function(A,G,F){if(typeof A!=="string"&&Bs){return Bs.apply(this,arguments)}if(!this.length){return this}var E=A.indexOf(" ");if(E>=0){var D=A.slice(E,A.length);A=A.slice(0,E)}var C="GET";G&&(Ak.isFunction(G)?(F=G,G=Ao):typeof G==="object"&&(G=Ak.param(G,Ak.ajaxSettings.traditional),C="POST"));var B=this;Ak.ajax({url:A,type:C,dataType:"html",data:G,complete:function(I,H,J){J=I.responseText,I.isResolved()&&(I.done(function(K){J=K}),B.html(D?Ak("<div>").append(J.replace(Bz,"")).find(D):J)),F&&B.each(F,[J,H,I])}});return this},serialize:function(){return Ak.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?Ak.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||By.test(this.nodeName)||Ah.test(this.type))}).map(function(B,A){var C=Ak(this).val();return C==null?null:Ak.isArray(C)?Ak.map(C,function(D,E){return{name:A.name,value:D.replace(An,"\r\n")}}):{name:A.name,value:C.replace(An,"\r\n")}}).get()}}),Ak.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(B,A){Ak.fn[A]=function(C){return this.bind(A,C)}}),Ak.each(["get","post"],function(A,B){Ak[B]=function(C,F,E,D){Ak.isFunction(F)&&(D=D||E,E=F,F=Ao);return Ak.ajax({type:B,url:C,data:F,success:E,dataType:D})}}),Ak.extend({getScript:function(A,B){return Ak.get(A,Ao,B,"script")},getJSON:function(B,A,C){return Ak.get(B,A,C,"json")},ajaxSetup:function(B,A){A?Ak.extend(!0,B,Ak.ajaxSettings,A):(A=B,B=Ak.extend(!0,Ak.ajaxSettings,A));for(var C in {context:1,url:1}){C in A?B[C]=A[C]:C in Ak.ajaxSettings&&(B[C]=Ak.ajaxSettings[C])}return B},ajaxSettings:{url:Bp,isLocal:Af.test(Bo[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,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":Aq.String,"text html":!0,"text json":Ak.parseJSON,"text xml":Ak.parseXML}},ajaxPrefilter:Bm(Br),ajaxTransport:Bm(Bq),ajax:function(W,V){function D(g,d,Z,Y){if(H!==2){H=2,J&&clearTimeout(J),K=Ao,M=Y||"",E.readyState=g?4:0;var X,k,j,h=Z?Bj(U,E,Z):Ao,f,e;if(g>=200&&g<300||g===304){if(U.ifModified){if(f=E.getResponseHeader("Last-Modified")){Ak.lastModified[O]=f}if(e=E.getResponseHeader("Etag")){Ak.etag[O]=e}}if(g===304){d="notmodified",X=!0}else{try{k=Bi(U,h),d="success",X=!0}catch(b){d="parsererror",j=b}}}else{j=d;if(!d||g){d="error",g<0&&(g=0)}}E.status=g,E.statusText=d,X?R.resolveWith(T,[k,d,E]):R.rejectWith(T,[E,d,j]),E.statusCode(P),P=Ao,G&&S.trigger("ajax"+(X?"Success":"Error"),[E,U,X?k:j]),Q.resolveWith(T,[E,d]),G&&(S.trigger("ajaxComplete",[E,U]),--Ak.active||Ak.event.trigger("ajaxStop"))}}typeof W==="object"&&(V=W,W=Ao),V=V||{};var U=Ak.ajaxSetup({},V),T=U.context||U,S=T!==U&&(T.nodeType||T instanceof Ak)?Ak(T):Ak.event,R=Ak.Deferred(),Q=Ak._Deferred(),P=U.statusCode||{},O,N={},M,L,K,J,I,H=0,G,F,E={readyState:0,setRequestHeader:function(Y,X){H||(N[Y.toLowerCase().replace(Bv,Bu)]=X);return this},getAllResponseHeaders:function(){return H===2?M:null},getResponseHeader:function(X){var Y;if(H===2){if(!L){L={};while(Y=Aj.exec(M)){L[Y[1].toLowerCase()]=Y[2]}}Y=L[X.toLowerCase()]}return Y===Ao?null:Y},overrideMimeType:function(X){H||(U.mimeType=X);return this},abort:function(X){X=X||"abort",K&&K.abort(X),D(0,X);return this}};R.promise(E),E.success=E.done,E.error=E.fail,E.complete=Q.done,E.statusCode=function(Y){if(Y){var X;if(H<2){for(X in Y){P[X]=[P[X],Y[X]]}}else{X=Y[E.status],E.then(X,X)}}return this},U.url=((W||U.url)+"").replace(Al,"").replace(Ab,Bo[1]+"//"),U.dataTypes=Ak.trim(U.dataType||"*").toLowerCase().split(Bx),U.crossDomain==null&&(I=Bt.exec(U.url.toLowerCase()),U.crossDomain=I&&(I[1]!=Bo[1]||I[2]!=Bo[2]||(I[3]||(I[1]==="http:"?80:443))!=(Bo[3]||(Bo[1]==="http:"?80:443)))),U.data&&U.processData&&typeof U.data!=="string"&&(U.data=Ak.param(U.data,U.traditional)),Bl(Br,U,V,E);if(H===2){return !1}G=U.global,U.type=U.type.toUpperCase(),U.hasContent=!Ad.test(U.type),G&&Ak.active++===0&&Ak.event.trigger("ajaxStart");if(!U.hasContent){U.data&&(U.url+=(B0.test(U.url)?"&":"?")+U.data),O=U.url;if(U.cache===!1){var C=Ak.now(),B=U.url.replace(Bw,"$1_="+C);U.url=B+(B===U.url?(B0.test(U.url)?"&":"?")+"_="+C:"")}}if(U.data&&U.hasContent&&U.contentType!==!1||V.contentType){N["Content-Type"]=U.contentType}U.ifModified&&(O=O||U.url,Ak.lastModified[O]&&(N["If-Modified-Since"]=Ak.lastModified[O]),Ak.etag[O]&&(N["If-None-Match"]=Ak.etag[O])),N.Accept=U.dataTypes[0]&&U.accepts[U.dataTypes[0]]?U.accepts[U.dataTypes[0]]+(U.dataTypes[0]!=="*"?", */*; q=0.01":""):U.accepts["*"];for(F in U.headers){E.setRequestHeader(F,U.headers[F])}if(U.beforeSend&&(U.beforeSend.call(T,E,U)===!1||H===2)){E.abort();return !1}for(F in {success:1,error:1,complete:1}){E[F](U[F])}K=Bl(Bq,U,V,E);if(K){E.readyState=1,G&&S.trigger("ajaxSend",[E,U]),U.async&&U.timeout>0&&(J=setTimeout(function(){E.abort("timeout")},U.timeout));try{H=1,K.send(N,D)}catch(A){status<2?D(-1,A):Ak.error(A)}}else{D(-1,"No Transport")}return E},param:function(A,E){var D=[],C=function(G,F){F=Ak.isFunction(F)?F():F,D[D.length]=encodeURIComponent(G)+"="+encodeURIComponent(F)};E===Ao&&(E=Ak.ajaxSettings.traditional);if(Ak.isArray(A)||A.jquery&&!Ak.isPlainObject(A)){Ak.each(A,function(){C(this.name,this.value)})}else{for(var B in A){Bk(B,A[B],E,C)}}return D.join("&").replace(Ar,"+")}}),Ak.extend({active:0,lastModified:{},etag:{}});var Bf=Ak.now(),Bd=/(\=)\?(&|$)|\?\?/i;Ak.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return Ak.expando+"_"+Bf++}}),Ak.ajaxPrefilter("json jsonp",function(K,J,I){var H=typeof K.data==="string";if(K.dataTypes[0]==="jsonp"||J.jsonpCallback||J.jsonp!=null||K.jsonp!==!1&&(Bd.test(K.url)||H&&Bd.test(K.data))){var G,F=K.jsonpCallback=Ak.isFunction(K.jsonpCallback)?K.jsonpCallback():K.jsonpCallback,E=Aq[F],D=K.url,C=K.data,B="$1"+F+"$2",A=function(){Aq[F]=E,G&&Ak.isFunction(E)&&Aq[F](G[0])};K.jsonp!==!1&&(D=D.replace(Bd,B),K.url===D&&(H&&(C=C.replace(Bd,B)),K.data===C&&(D+=(/\?/.test(D)?"&":"?")+K.jsonp+"="+F))),K.url=D,K.data=C,Aq[F]=function(L){G=[L]},I.then(A,A),K.converters["script json"]=function(){G||Ak.error(F+" was not called");return G[0]},K.dataTypes[0]="json";return"script"}}),Ak.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(A){Ak.globalEval(A);return A}}}),Ak.ajaxPrefilter("script",function(A){A.cache===Ao&&(A.cache=!1),A.crossDomain&&(A.type="GET",A.global=!1)}),Ak.ajaxTransport("script",function(A){if(A.crossDomain){var C,B=Am.head||Am.getElementsByTagName("head")[0]||Am.documentElement;return{send:function(E,D){C=Am.createElement("script"),C.async="async",A.scriptCharset&&(C.charset=A.scriptCharset),C.src=A.url,C.onload=C.onreadystatechange=function(F,G){if(!C.readyState||/loaded|complete/.test(C.readyState)){C.onload=C.onreadystatechange=null,B&&C.parentNode&&B.removeChild(C),C=Ao,G||D(200,"success")}},B.insertBefore(C,B.firstChild)},abort:function(){C&&C.onload(0,1)}}}});var Bb=Ak.now(),BZ,BX;Ak.ajaxSettings.xhr=Aq.ActiveXObject?function(){return !this.isLocal&&BU()||B2()}:BU,BX=Ak.ajaxSettings.xhr(),Ak.support.ajax=!!BX,Ak.support.cors=BX&&"withCredentials" in BX,BX=Ao,Ak.support.ajax&&Ak.ajaxTransport(function(A){if(!A.crossDomain||Ak.support.cors){var B;return{send:function(H,G){var F=A.xhr(),E,D;A.username?F.open(A.type,A.url,A.async,A.username,A.password):F.open(A.type,A.url,A.async);if(A.xhrFields){for(D in A.xhrFields){F[D]=A.xhrFields[D]}}A.mimeType&&F.overrideMimeType&&F.overrideMimeType(A.mimeType),!A.crossDomain&&!H["X-Requested-With"]&&(H["X-Requested-With"]="XMLHttpRequest");try{for(D in H){F.setRequestHeader(D,H[D])}}catch(C){}F.send(A.hasContent&&A.data||null),B=function(Q,P){var O,N,M,L,K;try{if(B&&(P||F.readyState===4)){B=Ao,E&&(F.onreadystatechange=Ak.noop,delete BZ[E]);if(P){F.readyState!==4&&F.abort()}else{O=F.status,M=F.getAllResponseHeaders(),L={},K=F.responseXML,K&&K.documentElement&&(L.xml=K),L.text=F.responseText;try{N=F.statusText}catch(J){N=""}O||!A.isLocal||A.crossDomain?O===1223&&(O=204):O=L.text?200:404}}}catch(I){P||G(-1,I)}L&&G(O,N,L,M)},A.async&&F.readyState!==4?(BZ||(BZ={},BW()),E=Bb++,F.onreadystatechange=BZ[E]=B):B()},abort:function(){B&&B(0,1)}}}});var BN={},AU=/^(?:toggle|show|hide)$/,AS=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,AQ,AO=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];Ak.fn.extend({show:function(B,A,G){var F,E;if(B||B===0){return this.animate(AN("show",3),B,A,G)}for(var D=0,C=this.length;D<C;D++){F=this[D],E=F.style.display,!Ak._data(F,"olddisplay")&&E==="none"&&(E=F.style.display=""),E===""&&Ak.css(F,"display")==="none"&&Ak._data(F,"olddisplay",AL(F.nodeName))}for(D=0;D<C;D++){F=this[D],E=F.style.display;if(E===""||E==="none"){F.style.display=Ak._data(F,"olddisplay")||""}}return this},hide:function(B,A,F){if(B||B===0){return this.animate(AN("hide",3),B,A,F)}for(var E=0,D=this.length;E<D;E++){var C=Ak.css(this[E],"display");C!=="none"&&!Ak._data(this[E],"olddisplay")&&Ak._data(this[E],"olddisplay",C)}for(E=0;E<D;E++){this[E].style.display="none"}return this},_toggle:Ak.fn.toggle,toggle:function(B,A,D){var C=typeof B==="boolean";Ak.isFunction(B)&&Ak.isFunction(A)?this._toggle.apply(this,arguments):B==null||C?this.each(function(){var E=C?B:Ak(this).is(":hidden");Ak(this)[E?"show":"hide"]()}):this.animate(AN("toggle",3),B,A,D);return this},fadeTo:function(B,A,D,C){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:A},B,D,C)},animate:function(B,A,E,D){var C=Ak.speed(A,E,D);if(Ak.isEmptyObject(B)){return this.each(C.complete)}return this[C.queue===!1?"each":"queue"](function(){var F=Ak.extend({},C),L,K=this.nodeType===1,J=K&&Ak(this).is(":hidden"),I=this;for(L in B){var H=Ak.camelCase(L);L!==H&&(B[H]=B[L],delete B[L],L=H);if(B[L]==="hide"&&J||B[L]==="show"&&!J){return F.complete.call(this)}if(K&&(L==="height"||L==="width")){F.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(Ak.css(this,"display")==="inline"&&Ak.css(this,"float")==="none"){if(Ak.support.inlineBlockNeedsLayout){var G=AL(this.nodeName);G==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)}else{this.style.display="inline-block"}}}Ak.isArray(B[L])&&((F.specialEasing=F.specialEasing||{})[L]=B[L][1],B[L]=B[L][0])}F.overflow!=null&&(this.style.overflow="hidden"),F.curAnim=Ak.extend({},B),Ak.each(B,function(S,R){var Q=new Ak.fx(I,F,S);if(AU.test(R)){Q[R==="toggle"?J?"show":"hide":R](B)}else{var P=AS.exec(R),O=Q.cur();if(P){var N=parseFloat(P[2]),M=P[3]||(Ak.cssNumber[S]?"":"px");M!=="px"&&(Ak.style(I,S,(N||1)+M),O=(N||1)/Q.cur()*O,Ak.style(I,S,O+M)),P[1]&&(N=(P[1]==="-="?-1:1)*N+O),Q.custom(O,N,M)}else{Q.custom(O,R,"")}}});return !0})},stop:function(B,A){var C=Ak.timers;B&&this.queue([]),this.each(function(){for(var D=C.length-1;D>=0;D--){C[D].elem===this&&(A&&C[D](!0),C.splice(D,1))}}),A||this.dequeue();return this}}),Ak.each({slideDown:AN("show",1),slideUp:AN("hide",1),slideToggle:AN("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(B,A){Ak.fn[B]=function(C,E,D){return this.animate(A,C,E,D)}}),Ak.extend({speed:function(B,A,D){var C=B&&typeof B==="object"?Ak.extend({},B):{complete:D||!D&&A||Ak.isFunction(B)&&B,duration:B,easing:D&&A||A&&!Ak.isFunction(A)&&A};C.duration=Ak.fx.off?0:typeof C.duration==="number"?C.duration:C.duration in Ak.fx.speeds?Ak.fx.speeds[C.duration]:Ak.fx.speeds._default,C.old=C.complete,C.complete=function(){C.queue!==!1&&Ak(this).dequeue(),Ak.isFunction(C.old)&&C.old.call(this)};return C},easing:{linear:function(B,A,D,C){return D+C*B},swing:function(B,A,D,C){return(-Math.cos(B*Math.PI)/2+0.5)*C+D}},timers:[],fx:function(B,A,C){this.options=A,this.elem=B,this.prop=C,A.orig||(A.orig={})}}),Ak.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(Ak.fx.step[this.prop]||Ak.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,A=Ak.css(this.elem,this.prop);return isNaN(B=parseFloat(A))?!A||A==="auto"?0:A:B},custom:function(B,A,F){function C(G){return E.step(G)}var E=this,D=Ak.fx;this.startTime=Ak.now(),this.start=B,this.end=A,this.unit=F||this.unit||(Ak.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,C.elem=this.elem,C()&&Ak.timers.push(C)&&!AQ&&(AQ=setInterval(D.tick,D.interval))},show:function(){this.options.orig[this.prop]=Ak.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),Ak(this.elem).show()},hide:function(){this.options.orig[this.prop]=Ak.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(J){var I=Ak.now(),H=!0;if(J||I>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var G in this.options.curAnim){this.options.curAnim[G]!==!0&&(H=!1)}if(H){if(this.options.overflow!=null&&!Ak.support.shrinkWrapBlocks){var F=this.elem,E=this.options;Ak.each(["","X","Y"],function(L,K){F.style["overflow"+K]=E.overflow[L]})}this.options.hide&&Ak(this.elem).hide();if(this.options.hide||this.options.show){for(var D in this.options.curAnim){Ak.style(this.elem,D,this.options.orig[D])}}this.options.complete.call(this.elem)}return !1}var C=I-this.startTime;this.state=C/this.options.duration;var B=this.options.specialEasing&&this.options.specialEasing[this.prop],A=this.options.easing||(Ak.easing.swing?"swing":"linear");this.pos=Ak.easing[B||A](this.state,C,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return !0}},Ak.extend(Ak.fx,{tick:function(){var B=Ak.timers;for(var A=0;A<B.length;A++){B[A]()||B.splice(A--,1)}B.length||Ak.fx.stop()},interval:13,stop:function(){clearInterval(AQ),AQ=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(A){Ak.style(A.elem,"opacity",A.now)},_default:function(A){A.elem.style&&A.elem.style[A.prop]!=null?A.elem.style[A.prop]=(A.prop==="width"||A.prop==="height"?Math.max(0,A.now):A.now)+A.unit:A.elem[A.prop]=A.now}}}),Ak.expr&&Ak.expr.filters&&(Ak.expr.filters.animated=function(A){return Ak.grep(Ak.timers,function(B){return A===B.elem}).length});var AI=/^t(?:able|d|h)$/i,AG=/^(?:body|html)$/i;"getBoundingClientRect" in Am.documentElement?Ak.fn.offset=function(N){var M=this[0],L;if(N){return this.each(function(O){Ak.offset.setOffset(this,N,O)})}if(!M||!M.ownerDocument){return null}if(M===M.ownerDocument.body){return Ak.offset.bodyOffset(M)}try{L=M.getBoundingClientRect()}catch(K){}var J=M.ownerDocument,I=J.documentElement;if(!L||!Ak.contains(I,M)){return L?{top:L.top,left:L.left}:{top:0,left:0}}var H=J.body,G=AF(J),F=I.clientTop||H.clientTop||0,E=I.clientLeft||H.clientLeft||0,D=G.pageYOffset||Ak.support.boxModel&&I.scrollTop||H.scrollTop,C=G.pageXOffset||Ak.support.boxModel&&I.scrollLeft||H.scrollLeft,B=L.top+D-F,A=L.left+C-E;return{top:B,left:A}}:Ak.fn.offset=function(L){var K=this[0];if(L){return this.each(function(M){Ak.offset.setOffset(this,L,M)})}if(!K||!K.ownerDocument){return null}if(K===K.ownerDocument.body){return Ak.offset.bodyOffset(K)}Ak.offset.initialize();var J,I=K.offsetParent,H=K,G=K.ownerDocument,F=G.documentElement,E=G.body,D=G.defaultView,C=D?D.getComputedStyle(K,null):K.currentStyle,B=K.offsetTop,A=K.offsetLeft;while((K=K.parentNode)&&K!==E&&K!==F){if(Ak.offset.supportsFixedPosition&&C.position==="fixed"){break}J=D?D.getComputedStyle(K,null):K.currentStyle,B-=K.scrollTop,A-=K.scrollLeft,K===I&&(B+=K.offsetTop,A+=K.offsetLeft,Ak.offset.doesNotAddBorder&&(!Ak.offset.doesAddBorderForTableAndCells||!AI.test(K.nodeName))&&(B+=parseFloat(J.borderTopWidth)||0,A+=parseFloat(J.borderLeftWidth)||0),H=I,I=K.offsetParent),Ak.offset.subtractsBorderForOverflowNotVisible&&J.overflow!=="visible"&&(B+=parseFloat(J.borderTopWidth)||0,A+=parseFloat(J.borderLeftWidth)||0),C=J}if(C.position==="relative"||C.position==="static"){B+=E.offsetTop,A+=E.offsetLeft}Ak.offset.supportsFixedPosition&&C.position==="fixed"&&(B+=Math.max(F.scrollTop,E.scrollTop),A+=Math.max(F.scrollLeft,E.scrollLeft));return{top:B,left:A}},Ak.offset={initialize:function(){var B=Am.body,A=Am.createElement("div"),H,G,F,E,D=parseFloat(Ak.css(B,"marginTop"))||0,C="<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>";Ak.extend(A.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),A.innerHTML=C,B.insertBefore(A,B.firstChild),H=A.firstChild,G=H.firstChild,E=H.nextSibling.firstChild.firstChild,this.doesNotAddBorder=G.offsetTop!==5,this.doesAddBorderForTableAndCells=E.offsetTop===5,G.style.position="fixed",G.style.top="20px",this.supportsFixedPosition=G.offsetTop===20||G.offsetTop===15,G.style.position=G.style.top="",H.style.overflow="hidden",H.style.position="relative",this.subtractsBorderForOverflowNotVisible=G.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=B.offsetTop!==D,B.removeChild(A),Ak.offset.initialize=Ak.noop},bodyOffset:function(B){var A=B.offsetTop,C=B.offsetLeft;Ak.offset.initialize(),Ak.offset.doesNotIncludeMarginInBodyOffset&&(A+=parseFloat(Ak.css(B,"marginTop"))||0,C+=parseFloat(Ak.css(B,"marginLeft"))||0);return{top:A,left:C}},setOffset:function(M,L,K){var J=Ak.css(M,"position");J==="static"&&(M.style.position="relative");var I=Ak(M),H=I.offset(),G=Ak.css(M,"top"),F=Ak.css(M,"left"),E=(J==="absolute"||J==="fixed")&&Ak.inArray("auto",[G,F])>-1,D={},C={},B,A;E&&(C=I.position()),B=E?C.top:parseInt(G,10)||0,A=E?C.left:parseInt(F,10)||0,Ak.isFunction(L)&&(L=L.call(M,K,H)),L.top!=null&&(D.top=L.top-H.top+B),L.left!=null&&(D.left=L.left-H.left+A),"using" in L?L.using.call(M,D):I.css(D)}},Ak.fn.extend({position:function(){if(!this[0]){return null}var B=this[0],A=this.offsetParent(),D=this.offset(),C=AG.test(A[0].nodeName)?{top:0,left:0}:A.offset();D.top-=parseFloat(Ak.css(B,"marginTop"))||0,D.left-=parseFloat(Ak.css(B,"marginLeft"))||0,C.top+=parseFloat(Ak.css(A[0],"borderTopWidth"))||0,C.left+=parseFloat(Ak.css(A[0],"borderLeftWidth"))||0;return{top:D.top-C.top,left:D.left-C.left}},offsetParent:function(){return this.map(function(){var A=this.offsetParent||Am.body;while(A&&(!AG.test(A.nodeName)&&Ak.css(A,"position")==="static")){A=A.offsetParent}return A})}}),Ak.each(["Left","Top"],function(A,C){var B="scroll"+C;Ak.fn[B]=function(F){var E=this[0],D;if(!E){return null}if(F!==Ao){return this.each(function(){D=AF(this),D?D.scrollTo(A?Ak(D).scrollLeft():F,A?F:Ak(D).scrollTop()):this[B]=F})}D=AF(E);return D?"pageXOffset" in D?D[A?"pageYOffset":"pageXOffset"]:Ak.support.boxModel&&D.document.documentElement[B]||D.document.body[B]:E[B]}}),Ak.each(["Height","Width"],function(A,C){var B=C.toLowerCase();Ak.fn["inner"+C]=function(){return this[0]?parseFloat(Ak.css(this[0],B,"padding")):null},Ak.fn["outer"+C]=function(D){return this[0]?parseFloat(Ak.css(this[0],B,D?"margin":"border")):null},Ak.fn[B]=function(D){var H=this[0];if(!H){return D==null?null:this}if(Ak.isFunction(D)){return this.each(function(I){var J=Ak(this);J[B](D.call(this,I,J[B]()))})}if(Ak.isWindow(H)){var G=H.document.documentElement["client"+C];return H.document.compatMode==="CSS1Compat"&&G||H.document.body["client"+C]||G}if(H.nodeType===9){return Math.max(H.documentElement["client"+C],H.body["scroll"+C],H.documentElement["scroll"+C],H.body["offset"+C],H.documentElement["offset"+C])}if(D===Ao){var F=Ak.css(H,B),E=parseFloat(F);return Ak.isNaN(E)?F:E}return this.css(B,typeof D==="string"?D:D+"px")}}),Aq.jQuery=Aq.$=Ak})(window);
/*
 * jQuery UI 1.8.11
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
(function(C,B){function A(D){return !C(D).parents().andSelf().filter(function(){return C.curCSS(this,"visibility")==="hidden"||C.expr.filters.hidden(this)}).length}C.ui=C.ui||{};if(!C.ui.version){C.extend(C.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}});C.fn.extend({_focus:C.fn.focus,focus:function(E,D){return typeof E==="number"?this.each(function(){var F=this;setTimeout(function(){C(F).focus();D&&D.call(F)},E)}):this._focus.apply(this,arguments)},scrollParent:function(){var D;D=C.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(C.curCSS(this,"position",1))&&/(auto|scroll)/.test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!D.length?C(document):D},zIndex:function(E){if(E!==B){return this.css("zIndex",E)}if(this.length){E=C(this[0]);for(var D;E.length&&E[0]!==document;){D=E.css("position");if(D==="absolute"||D==="relative"||D==="fixed"){D=parseInt(E.css("zIndex"),10);if(!isNaN(D)&&D!==0){return D}}E=E.parent()}}return 0},disableSelection:function(){return this.bind((C.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(D){D.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});C.each(["Width","Height"],function(E,D){function I(M,L,K,J){C.each(H,function(){L-=parseFloat(C.curCSS(M,"padding"+this,true))||0;if(K){L-=parseFloat(C.curCSS(M,"border"+this+"Width",true))||0}if(J){L-=parseFloat(C.curCSS(M,"margin"+this,true))||0}});return L}var H=D==="Width"?["Left","Right"]:["Top","Bottom"],G=D.toLowerCase(),F={innerWidth:C.fn.innerWidth,innerHeight:C.fn.innerHeight,outerWidth:C.fn.outerWidth,outerHeight:C.fn.outerHeight};C.fn["inner"+D]=function(J){if(J===B){return F["inner"+D].call(this)}return this.each(function(){C(this).css(G,I(this,J)+"px")})};C.fn["outer"+D]=function(K,J){if(typeof K!=="number"){return F["outer"+D].call(this,K)}return this.each(function(){C(this).css(G,I(this,K,true,J)+"px")})}});C.extend(C.expr[":"],{data:function(E,D,F){return !!C.data(E,F[3])},focusable:function(E){var D=E.nodeName.toLowerCase(),F=C.attr(E,"tabindex");if("area"===D){D=E.parentNode;F=D.name;if(!E.href||!F||D.nodeName.toLowerCase()!=="map"){return false}E=C("img[usemap=#"+F+"]")[0];return !!E&&A(E)}return(/input|select|textarea|button|object/.test(D)?!E.disabled:"a"==D?E.href||!isNaN(F):!isNaN(F))&&A(E)},tabbable:function(E){var D=C.attr(E,"tabindex");return(isNaN(D)||D>=0)&&C(E).is(":focusable")}});C(function(){var E=document.body,D=E.appendChild(D=document.createElement("div"));C.extend(D.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});C.support.minHeight=D.offsetHeight===100;C.support.selectstart="onselectstart" in D;E.removeChild(D).style.display="none"});C.extend(C.ui,{plugin:{add:function(E,D,G){E=C.ui[E].prototype;for(var F in G){E.plugins[F]=E.plugins[F]||[];E.plugins[F].push([D,G[F]])}},call:function(E,D,G){if((D=E.plugins[D])&&E.element[0].parentNode){for(var F=0;F<D.length;F++){E.options[D[F][0]]&&D[F][1].apply(E.element,G)}}}},contains:function(E,D){return document.compareDocumentPosition?E.compareDocumentPosition(D)&16:E!==D&&E.contains(D)},hasScroll:function(E,D){if(C(E).css("overflow")==="hidden"){return false}D=D&&D==="left"?"scrollLeft":"scrollTop";var F=false;if(E[D]>0){return true}E[D]=1;F=E[D]>0;E[D]=0;return F},isOverAxis:function(E,D,F){return E>D&&E<D+F},isOver:function(E,D,I,H,G,F){return C.ui.isOverAxis(E,I,G)&&C.ui.isOverAxis(D,H,F)}})}})(jQuery);
/*
 * jQuery UI Widget 1.8.11
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(A,D){if(A.cleanData){var C=A.cleanData;A.cleanData=function(E){for(var G=0,F;(F=E[G])!=null;G++){A(F).triggerHandler("remove")}C(E)}}else{var B=A.fn.remove;A.fn.remove=function(E,F){return this.each(function(){if(!F){if(!E||A.filter(E,[this]).length){A("*",this).add([this]).each(function(){A(this).triggerHandler("remove")})}}return B.call(A(this),E,F)})}}A.widget=function(E,I,H){var G=E.split(".")[0],F;E=E.split(".")[1];F=G+"-"+E;if(!H){H=I;I=A.Widget}A.expr[":"][F]=function(J){return !!A.data(J,E)};A[G]=A[G]||{};A[G][E]=function(J,K){arguments.length&&this._createWidget(J,K)};I=new I;I.options=A.extend(true,{},I.options);A[G][E].prototype=A.extend(true,I,{namespace:G,widgetName:E,widgetEventPrefix:A[G][E].prototype.widgetEventPrefix||E,widgetBaseClass:F},H);A.widget.bridge(E,A[G][E])};A.widget.bridge=function(E,F){A.fn[E]=function(J){var I=typeof J==="string",H=Array.prototype.slice.call(arguments,1),G=this;J=!I&&H.length?A.extend.apply(null,[true,J].concat(H)):J;if(I&&J.charAt(0)==="_"){return G}I?this.each(function(){var L=A.data(this,E),K=L&&A.isFunction(L[J])?L[J].apply(L,H):L;if(K!==L&&K!==D){G=K;return false}}):this.each(function(){var K=A.data(this,E);K?K.option(J||{})._init():A.data(this,E,new F(J,this))});return G}};A.Widget=function(E,F){arguments.length&&this._createWidget(E,F)};A.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(E,G){A.data(G,this.widgetName,this);this.element=A(G);this.options=A.extend(true,{},this.options,this._getCreateOptions(),E);var F=this;this.element.bind("remove."+this.widgetName,function(){F.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return A.metadata&&A.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(E,G){var F=E;if(arguments.length===0){return A.extend({},this.options)}if(typeof E==="string"){if(G===D){return this.options[E]}F={};F[E]=G}this._setOptions(F);return this},_setOptions:function(E){var F=this;A.each(E,function(H,G){F._setOption(H,G)});return this},_setOption:function(E,F){this.options[E]=F;if(E==="disabled"){this.widget()[F?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",F)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(E,I,H){var G=this.options[E];I=A.Event(I);I.type=(E===this.widgetEventPrefix?E:this.widgetEventPrefix+E).toLowerCase();H=H||{};if(I.originalEvent){E=A.event.props.length;for(var F;E;){F=A.event.props[--E];I[F]=I.originalEvent[F]}}this.element.trigger(I,H);return !(A.isFunction(G)&&G.call(this.element[0],I,H)===false||I.isDefaultPrevented())}}})(jQuery);
/*
 * jQuery UI Mouse 1.8.11
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Mouse
 *
 * Depends:
 *	jquery.ui.widget.js
 */
(function(A){A.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var B=this;this.element.bind("mousedown."+this.widgetName,function(C){return B._mouseDown(C)}).bind("click."+this.widgetName,function(C){if(true===A.data(C.target,B.widgetName+".preventClickEvent")){A.removeData(C.target,B.widgetName+".preventClickEvent");C.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(B){B.originalEvent=B.originalEvent||{};if(!B.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(B);this._mouseDownEvent=B;var E=this,D=B.which==1,C=typeof this.options.cancel=="string"?A(B.target).parents().add(B.target).filter(this.options.cancel).length:false;if(!D||C||!this._mouseCapture(B)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){E.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(B)&&this._mouseDelayMet(B)){this._mouseStarted=this._mouseStart(B)!==false;if(!this._mouseStarted){B.preventDefault();return true}}true===A.data(B.target,this.widgetName+".preventClickEvent")&&A.removeData(B.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(F){return E._mouseMove(F)};this._mouseUpDelegate=function(F){return E._mouseUp(F)};A(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);B.preventDefault();return B.originalEvent.mouseHandled=true}},_mouseMove:function(B){if(A.browser.msie&&!(document.documentMode>=9)&&!B.button){return this._mouseUp(B)}if(this._mouseStarted){this._mouseDrag(B);return B.preventDefault()}if(this._mouseDistanceMet(B)&&this._mouseDelayMet(B)){(this._mouseStarted=this._mouseStart(this._mouseDownEvent,B)!==false)?this._mouseDrag(B):this._mouseUp(B)}return !this._mouseStarted},_mouseUp:function(B){A(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;B.target==this._mouseDownEvent.target&&A.data(B.target,this.widgetName+".preventClickEvent",true);this._mouseStop(B)}return false},_mouseDistanceMet:function(B){return Math.max(Math.abs(this._mouseDownEvent.pageX-B.pageX),Math.abs(this._mouseDownEvent.pageY-B.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);(function(E){E.ui=E.ui||{};var D=/left|center|right/,C=/top|center|bottom/,B=E.fn.position,A=E.fn.offset;E.fn.position=function(F){if(!F||!F.of){return B.apply(this,arguments)}F=E.extend({},F);var G=E(F.of),M=G[0],K=(F.collision||"flip").split(" "),L=F.offset?F.offset.split(" "):[0,0],J,H,I;if(M.nodeType===9){J=G.width();H=G.height();I={top:0,left:0}}else{if(M.setTimeout){J=G.width();H=G.height();I={top:G.scrollTop(),left:G.scrollLeft()}}else{if(M.preventDefault){F.at="left top";J=H=0;I={top:F.of.pageY,left:F.of.pageX}}else{J=G.outerWidth();H=G.outerHeight();I=G.offset()}}}E.each(["my","at"],function(){var N=(F[this]||"").split(" ");if(N.length===1){N=D.test(N[0])?N.concat(["center"]):C.test(N[0])?["center"].concat(N):["center","center"]}N[0]=D.test(N[0])?N[0]:"center";N[1]=C.test(N[1])?N[1]:"center";F[this]=N});if(K.length===1){K[1]=K[0]}L[0]=parseInt(L[0],10)||0;if(L.length===1){L[1]=L[0]}L[1]=parseInt(L[1],10)||0;if(F.at[0]==="right"){I.left+=J}else{if(F.at[0]==="center"){I.left+=J/2}}if(F.at[1]==="bottom"){I.top+=H}else{if(F.at[1]==="center"){I.top+=H/2}}I.left+=L[0];I.top+=L[1];return this.each(function(){var T=E(this),R=T.outerWidth(),Q=T.outerHeight(),P=parseInt(E.curCSS(this,"marginLeft",true))||0,O=parseInt(E.curCSS(this,"marginTop",true))||0,V=R+P+(parseInt(E.curCSS(this,"marginRight",true))||0),U=Q+O+(parseInt(E.curCSS(this,"marginBottom",true))||0),S=E.extend({},I),N;if(F.my[0]==="right"){S.left-=R}else{if(F.my[0]==="center"){S.left-=R/2}}if(F.my[1]==="bottom"){S.top-=Q}else{if(F.my[1]==="center"){S.top-=Q/2}}S.left=Math.round(S.left);S.top=Math.round(S.top);N={left:S.left-P,top:S.top-O};E.each(["left","top"],function(X,W){E.ui.position[K[X]]&&E.ui.position[K[X]][W](S,{targetWidth:J,targetHeight:H,elemWidth:R,elemHeight:Q,collisionPosition:N,collisionWidth:V,collisionHeight:U,offset:L,my:F.my,at:F.at})});E.fn.bgiframe&&T.bgiframe();T.offset(E.extend(S,{using:F.using}))})};E.ui.position={fit:{left:function(F,G){var H=E(window);H=G.collisionPosition.left+G.collisionWidth-H.width()-H.scrollLeft();F.left=H>0?F.left-H:Math.max(F.left-G.collisionPosition.left,F.left)},top:function(F,G){var H=E(window);H=G.collisionPosition.top+G.collisionHeight-H.height()-H.scrollTop();F.top=H>0?F.top-H:Math.max(F.top-G.collisionPosition.top,F.top)}},flip:{left:function(F,G){if(G.at[0]!=="center"){var K=E(window);K=G.collisionPosition.left+G.collisionWidth-K.width()-K.scrollLeft();var I=G.my[0]==="left"?-G.elemWidth:G.my[0]==="right"?G.elemWidth:0,J=G.at[0]==="left"?G.targetWidth:-G.targetWidth,H=-2*G.offset[0];F.left+=G.collisionPosition.left<0?I+J+H:K>0?I+J+H:0}},top:function(F,G){if(G.at[1]!=="center"){var K=E(window);K=G.collisionPosition.top+G.collisionHeight-K.height()-K.scrollTop();var I=G.my[1]==="top"?-G.elemHeight:G.my[1]==="bottom"?G.elemHeight:0,J=G.at[1]==="top"?G.targetHeight:-G.targetHeight,H=-2*G.offset[1];F.top+=G.collisionPosition.top<0?I+J+H:K>0?I+J+H:0}}}};if(!E.offset.setOffset){E.offset.setOffset=function(F,G){if(/static/.test(E.curCSS(F,"position"))){F.style.position="relative"}var K=E(F),I=K.offset(),J=parseInt(E.curCSS(F,"top",true),10)||0,H=parseInt(E.curCSS(F,"left",true),10)||0;I={top:G.top-I.top+J,left:G.left-I.left+H};"using" in G?G.using.call(F,I):K.css(I)};E.fn.offset=function(F){var G=this[0];if(!G||!G.ownerDocument){return null}if(F){return this.each(function(){E.offset.setOffset(this,F)})}return A.call(this)}}})(jQuery);(function(A){A.widget("ui.sortable",A.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var B=this.items.length-1;B>=0;B--){this.items[B].item.removeData("sortable-item")}return this},_setOption:function(C,B){if(C==="disabled"){this.options[C]=B;this.widget()[B?"addClass":"removeClass"]("ui-sortable-disabled")}else{A.Widget.prototype._setOption.apply(this,arguments)}},_mouseCapture:function(C,B){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(C);var F=null,E=this;A(C.target).parents().each(function(){if(A.data(this,"sortable-item")==E){F=A(this);return false}});if(A.data(C.target,"sortable-item")==E){F=A(C.target)}if(!F){return false}if(this.options.handle&&!B){var D=false;A(this.options.handle,F).find("*").andSelf().each(function(){if(this==C.target){D=true}});if(!D){return false}}this.currentItem=F;this._removeCurrentsFromItems();return true},_mouseStart:function(C,B,E){B=this.options;var D=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(C);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");A.extend(this.offset,{click:{left:C.pageX-this.offset.left,top:C.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(C);this.originalPageX=C.pageX;this.originalPageY=C.pageY;B.cursorAt&&this._adjustOffsetFromHelper(B.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();B.containment&&this._setContainment();if(B.cursor){if(A("body").css("cursor")){this._storedCursor=A("body").css("cursor")}A("body").css("cursor",B.cursor)}if(B.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",B.opacity)}if(B.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",B.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",C,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!E){for(E=this.containers.length-1;E>=0;E--){this.containers[E]._trigger("activate",C,D._uiHash(this))}}if(A.ui.ddmanager){A.ui.ddmanager.current=this}A.ui.ddmanager&&!B.dropBehaviour&&A.ui.ddmanager.prepareOffsets(this,C);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(C);return true},_mouseDrag:function(C){this.position=this._generatePosition(C);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var B=this.options,F=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-C.pageY<B.scrollSensitivity){this.scrollParent[0].scrollTop=F=this.scrollParent[0].scrollTop+B.scrollSpeed}else{if(C.pageY-this.overflowOffset.top<B.scrollSensitivity){this.scrollParent[0].scrollTop=F=this.scrollParent[0].scrollTop-B.scrollSpeed}}if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-C.pageX<B.scrollSensitivity){this.scrollParent[0].scrollLeft=F=this.scrollParent[0].scrollLeft+B.scrollSpeed}else{if(C.pageX-this.overflowOffset.left<B.scrollSensitivity){this.scrollParent[0].scrollLeft=F=this.scrollParent[0].scrollLeft-B.scrollSpeed}}}else{if(C.pageY-A(document).scrollTop()<B.scrollSensitivity){F=A(document).scrollTop(A(document).scrollTop()-B.scrollSpeed)}else{if(A(window).height()-(C.pageY-A(document).scrollTop())<B.scrollSensitivity){F=A(document).scrollTop(A(document).scrollTop()+B.scrollSpeed)}}if(C.pageX-A(document).scrollLeft()<B.scrollSensitivity){F=A(document).scrollLeft(A(document).scrollLeft()-B.scrollSpeed)}else{if(A(window).width()-(C.pageX-A(document).scrollLeft())<B.scrollSensitivity){F=A(document).scrollLeft(A(document).scrollLeft()+B.scrollSpeed)}}}F!==false&&A.ui.ddmanager&&!B.dropBehaviour&&A.ui.ddmanager.prepareOffsets(this,C)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(B=this.items.length-1;B>=0;B--){F=this.items[B];var E=F.item[0],D=this._intersectsWithPointer(F);if(D){if(E!=this.currentItem[0]&&this.placeholder[D==1?"next":"prev"]()[0]!=E&&!A.ui.contains(this.placeholder[0],E)&&(this.options.type=="semi-dynamic"?!A.ui.contains(this.element[0],E):true)){this.direction=D==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(F)){this._rearrange(C,F)}else{break}this._trigger("change",C,this._uiHash());break}}}this._contactContainers(C);A.ui.ddmanager&&A.ui.ddmanager.drag(this,C);this._trigger("sort",C,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(C,B){if(C){A.ui.ddmanager&&!this.options.dropBehaviour&&A.ui.ddmanager.drop(this,C);if(this.options.revert){var D=this;B=D.placeholder.offset();D.reverting=true;A(this.helper).animate({left:B.left-this.offset.parent.left-D.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:B.top-this.offset.parent.top-D.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){D._clear(C)})}else{this._clear(C,B)}return false}},cancel:function(){var C=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var B=this.containers.length-1;B>=0;B--){this.containers[B]._trigger("deactivate",null,C._uiHash(this));if(this.containers[B].containerCache.over){this.containers[B]._trigger("out",null,C._uiHash(this));this.containers[B].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();A.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?A(this.domPosition.prev).after(this.currentItem):A(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(C){var B=this._getItemsAsjQuery(C&&C.connected),D=[];C=C||{};A(B).each(function(){var E=(A(C.item||this).attr(C.attribute||"id")||"").match(C.expression||/(.+)[-=_](.+)/);if(E){D.push((C.key||E[1]+"[]")+"="+(C.key&&C.expression?E[1]:E[2]))}});!D.length&&C.key&&D.push(C.key+"=");return D.join("&")},toArray:function(C){var B=this._getItemsAsjQuery(C&&C.connected),D=[];C=C||{};B.each(function(){D.push(A(C.item||this).attr(C.attribute||"id")||"")});return D},_intersectsWith:function(L){var K=this.positionAbs.left,J=K+this.helperProportions.width,I=this.positionAbs.top,H=I+this.helperProportions.height,G=L.left,F=G+L.width,E=L.top,C=E+L.height,D=this.offset.click.top,B=this.offset.click.left;D=I+D>E&&I+D<C&&K+B>G&&K+B<F;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>L[this.floating?"width":"height"]?D:G<K+this.helperProportions.width/2&&J-this.helperProportions.width/2<F&&E<I+this.helperProportions.height/2&&H-this.helperProportions.height/2<C},_intersectsWithPointer:function(C){var B=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,C.top,C.height);C=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,C.left,C.width);B=B&&C;C=this._getDragVerticalDirection();var D=this._getDragHorizontalDirection();if(!B){return false}return this.floating?D&&D=="right"||C=="down"?2:1:C&&(C=="down"?2:1)},_intersectsWithSides:function(C){var B=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,C.top+C.height/2,C.height);C=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,C.left+C.width/2,C.width);var E=this._getDragVerticalDirection(),D=this._getDragHorizontalDirection();return this.floating&&D?D=="right"&&C||D=="left"&&!C:E&&(E=="down"&&B||E=="up"&&!B)},_getDragVerticalDirection:function(){var B=this.positionAbs.top-this.lastPositionAbs.top;return B!=0&&(B>0?"down":"up")},_getDragHorizontalDirection:function(){var B=this.positionAbs.left-this.lastPositionAbs.left;return B!=0&&(B>0?"right":"left")},refresh:function(B){this._refreshItems(B);this.refreshPositions();return this},_connectWith:function(){var B=this.options;return B.connectWith.constructor==String?[B.connectWith]:B.connectWith},_getItemsAsjQuery:function(C){var B=[],H=[],G=this._connectWith();if(G&&C){for(C=G.length-1;C>=0;C--){for(var F=A(G[C]),E=F.length-1;E>=0;E--){var D=A.data(F[E],"sortable");if(D&&D!=this&&!D.options.disabled){H.push([A.isFunction(D.options.items)?D.options.items.call(D.element):A(D.options.items,D.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),D])}}}}H.push([A.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):A(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(C=H.length-1;C>=0;C--){H[C][0].each(function(){B.push(this)})}return A(B)},_removeCurrentsFromItems:function(){for(var C=this.currentItem.find(":data(sortable-item)"),B=0;B<this.items.length;B++){for(var D=0;D<C.length;D++){C[D]==this.items[B].item[0]&&this.items.splice(B,1)}}},_refreshItems:function(C){this.items=[];this.containers=[this];var B=this.items,I=[[A.isFunction(this.options.items)?this.options.items.call(this.element[0],C,{item:this.currentItem}):A(this.options.items,this.element),this]],H=this._connectWith();if(H){for(var G=H.length-1;G>=0;G--){for(var F=A(H[G]),E=F.length-1;E>=0;E--){var D=A.data(F[E],"sortable");if(D&&D!=this&&!D.options.disabled){I.push([A.isFunction(D.options.items)?D.options.items.call(D.element[0],C,{item:this.currentItem}):A(D.options.items,D.element),D]);this.containers.push(D)}}}}for(G=I.length-1;G>=0;G--){C=I[G][1];H=I[G][0];E=0;for(F=H.length;E<F;E++){D=A(H[E]);D.data("sortable-item",C);B.push({item:D,instance:C,width:0,height:0,left:0,top:0})}}},refreshPositions:function(C){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var B=this.items.length-1;B>=0;B--){var E=this.items[B],D=this.options.toleranceElement?A(this.options.toleranceElement,E.item):E.item;if(!C){E.width=D.outerWidth();E.height=D.outerHeight()}D=D.offset();E.left=D.left;E.top=D.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(B=this.containers.length-1;B>=0;B--){D=this.containers[B].element.offset();this.containers[B].containerCache.left=D.left;this.containers[B].containerCache.top=D.top;this.containers[B].containerCache.width=this.containers[B].element.outerWidth();this.containers[B].containerCache.height=this.containers[B].element.outerHeight()}}return this},_createPlaceholder:function(C){var B=C||this,E=B.options;if(!E.placeholder||E.placeholder.constructor==String){var D=E.placeholder;E.placeholder={element:function(){var F=A(document.createElement(B.currentItem[0].nodeName)).addClass(D||B.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!D){F.style.visibility="hidden"}return F},update:function(G,F){if(!(D&&!E.forcePlaceholderSize)){F.height()||F.height(B.currentItem.innerHeight()-parseInt(B.currentItem.css("paddingTop")||0,10)-parseInt(B.currentItem.css("paddingBottom")||0,10));F.width()||F.width(B.currentItem.innerWidth()-parseInt(B.currentItem.css("paddingLeft")||0,10)-parseInt(B.currentItem.css("paddingRight")||0,10))}}}}B.placeholder=A(E.placeholder.element.call(B.element,B.currentItem));B.currentItem.after(B.placeholder);E.placeholder.update(B,B.placeholder)},_contactContainers:function(C){for(var B=null,H=null,G=this.containers.length-1;G>=0;G--){if(!A.ui.contains(this.currentItem[0],this.containers[G].element[0])){if(this._intersectsWith(this.containers[G].containerCache)){if(!(B&&A.ui.contains(this.containers[G].element[0],B.element[0]))){B=this.containers[G];H=G}}else{if(this.containers[G].containerCache.over){this.containers[G]._trigger("out",C,this._uiHash(this));this.containers[G].containerCache.over=0}}}}if(B){if(this.containers.length===1){this.containers[H]._trigger("over",C,this._uiHash(this));this.containers[H].containerCache.over=1}else{if(this.currentContainer!=this.containers[H]){B=10000;G=null;for(var F=this.positionAbs[this.containers[H].floating?"left":"top"],E=this.items.length-1;E>=0;E--){if(A.ui.contains(this.containers[H].element[0],this.items[E].item[0])){var D=this.items[E][this.containers[H].floating?"left":"top"];if(Math.abs(D-F)<B){B=Math.abs(D-F);G=this.items[E]}}}if(G||this.options.dropOnEmpty){this.currentContainer=this.containers[H];G?this._rearrange(C,G,null,true):this._rearrange(C,null,this.containers[H].element,true);this._trigger("change",C,this._uiHash());this.containers[H]._trigger("change",C,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[H]._trigger("over",C,this._uiHash(this));this.containers[H].containerCache.over=1}}}}},_createHelper:function(C){var B=this.options;C=A.isFunction(B.helper)?A(B.helper.apply(this.element[0],[C,this.currentItem])):B.helper=="clone"?this.currentItem.clone():this.currentItem;C.parents("body").length||A(B.appendTo!="parent"?B.appendTo:this.currentItem[0].parentNode)[0].appendChild(C[0]);if(C[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(C[0].style.width==""||B.forceHelperSize){C.width(this.currentItem.width())}if(C[0].style.height==""||B.forceHelperSize){C.height(this.currentItem.height())}return C},_adjustOffsetFromHelper:function(B){if(typeof B=="string"){B=B.split(" ")}if(A.isArray(B)){B={left:+B[0],top:+B[1]||0}}if("left" in B){this.offset.click.left=B.left+this.margins.left}if("right" in B){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if("top" in B){this.offset.click.top=B.top+this.margins.top}if("bottom" in B){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0])){B.left+=this.scrollParent.scrollLeft();B.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.currentItem.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var C=this.options;if(C.containment=="parent"){C.containment=this.helper[0].parentNode}if(C.containment=="document"||C.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(C.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(A(C.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(C.containment)){var B=A(C.containment)[0];C=A(C.containment).offset();var D=A(B).css("overflow")!="hidden";this.containment=[C.left+(parseInt(A(B).css("borderLeftWidth"),10)||0)+(parseInt(A(B).css("paddingLeft"),10)||0)-this.margins.left,C.top+(parseInt(A(B).css("borderTopWidth"),10)||0)+(parseInt(A(B).css("paddingTop"),10)||0)-this.margins.top,C.left+(D?Math.max(B.scrollWidth,B.offsetWidth):B.offsetWidth)-(parseInt(A(B).css("borderLeftWidth"),10)||0)-(parseInt(A(B).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,C.top+(D?Math.max(B.scrollHeight,B.offsetHeight):B.offsetHeight)-(parseInt(A(B).css("borderTopWidth"),10)||0)-(parseInt(A(B).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(C,B){if(!B){B=this.position}C=C=="absolute"?1:-1;var E=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,D=/(html|body)/i.test(E[0].tagName);return{top:B.top+this.offset.relative.top*C+this.offset.parent.top*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():D?0:E.scrollTop())*C),left:B.left+this.offset.relative.left*C+this.offset.parent.left*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():D?0:E.scrollLeft())*C)}},_generatePosition:function(C){var B=this.options,G=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,F=/(html|body)/i.test(G[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var E=C.pageX,D=C.pageY;if(this.originalPosition){if(this.containment){if(C.pageX-this.offset.click.left<this.containment[0]){E=this.containment[0]+this.offset.click.left}if(C.pageY-this.offset.click.top<this.containment[1]){D=this.containment[1]+this.offset.click.top}if(C.pageX-this.offset.click.left>this.containment[2]){E=this.containment[2]+this.offset.click.left}if(C.pageY-this.offset.click.top>this.containment[3]){D=this.containment[3]+this.offset.click.top}}if(B.grid){D=this.originalPageY+Math.round((D-this.originalPageY)/B.grid[1])*B.grid[1];D=this.containment?!(D-this.offset.click.top<this.containment[1]||D-this.offset.click.top>this.containment[3])?D:!(D-this.offset.click.top<this.containment[1])?D-B.grid[1]:D+B.grid[1]:D;E=this.originalPageX+Math.round((E-this.originalPageX)/B.grid[0])*B.grid[0];E=this.containment?!(E-this.offset.click.left<this.containment[0]||E-this.offset.click.left>this.containment[2])?E:!(E-this.offset.click.left<this.containment[0])?E-B.grid[0]:E+B.grid[0]:E}}return{top:D-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(A.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():F?0:G.scrollTop()),left:E-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(A.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():F?0:G.scrollLeft())}},_rearrange:function(C,B,G,F){G?G[0].appendChild(this.placeholder[0]):B.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?B.item[0]:B.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var E=this,D=this.counter;window.setTimeout(function(){D==E.counter&&E.refreshPositions(!F)},0)},_clear:function(C,B){this.reverting=false;var E=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var D in this._storedCSS){if(this._storedCSS[D]=="auto"||this._storedCSS[D]=="static"){this._storedCSS[D]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}this.fromOutside&&!B&&E.push(function(F){this._trigger("receive",F,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!B){E.push(function(F){this._trigger("update",F,this._uiHash())})}if(!A.ui.contains(this.element[0],this.currentItem[0])){B||E.push(function(F){this._trigger("remove",F,this._uiHash())});for(D=this.containers.length-1;D>=0;D--){if(A.ui.contains(this.containers[D].element[0],this.currentItem[0])&&!B){E.push(function(F){return function(G){F._trigger("receive",G,this._uiHash(this))}}.call(this,this.containers[D]));E.push(function(F){return function(G){F._trigger("update",G,this._uiHash(this))}}.call(this,this.containers[D]))}}}for(D=this.containers.length-1;D>=0;D--){B||E.push(function(F){return function(G){F._trigger("deactivate",G,this._uiHash(this))}}.call(this,this.containers[D]));if(this.containers[D].containerCache.over){E.push(function(F){return function(G){F._trigger("out",G,this._uiHash(this))}}.call(this,this.containers[D]));this.containers[D].containerCache.over=0}}this._storedCursor&&A("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!B){this._trigger("beforeStop",C,this._uiHash());for(D=0;D<E.length;D++){E[D].call(this,C)}this._trigger("stop",C,this._uiHash())}return false}B||this._trigger("beforeStop",C,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!B){for(D=0;D<E.length;D++){E[D].call(this,C)}this._trigger("stop",C,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){A.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(C){var B=C||this;return{helper:B.helper,placeholder:B.placeholder||A([]),position:B.position,originalPosition:B.originalPosition,offset:B.positionAbs,item:B.currentItem,sender:C?C.element:null}}});A.extend(A.ui.sortable,{version:"1.8.11"})})(jQuery);(function(A){A.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var C=this,B=C.options;C.running=0;C.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");C.headers=C.element.find(B.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){B.disabled||A(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){B.disabled||A(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){B.disabled||A(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){B.disabled||A(this).removeClass("ui-state-focus")});C.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(B.navigation){var E=C.element.find("a").filter(B.navigationFilter).eq(0);if(E.length){var D=E.closest(".ui-accordion-header");C.active=D.length?D:E.closest(".ui-accordion-content").prev()}}C.active=C._findActive(C.active||B.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");C.active.next().addClass("ui-accordion-content-active");C._createIcons();C.resize();C.element.attr("role","tablist");C.headers.attr("role","tab").bind("keydown.accordion",function(F){return C._keydown(F)}).next().attr("role","tabpanel");C.headers.not(C.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();C.active.length?C.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):C.headers.eq(0).attr("tabIndex",0);A.browser.safari||C.headers.find("a").attr("tabIndex",-1);B.event&&C.headers.bind(B.event.split(" ").join(".accordion ")+".accordion",function(F){C._clickHandler.call(C,F,this);F.preventDefault()})},_createIcons:function(){var B=this.options;if(B.icons){A("<span></span>").addClass("ui-icon "+B.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(B.icons.header).toggleClass(B.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var C=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var B=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(C.autoHeight||C.fillHeight){B.css("height","")}return A.Widget.prototype.destroy.call(this)},_setOption:function(C,B){A.Widget.prototype._setOption.apply(this,arguments);C=="active"&&this.activate(B);if(C=="icons"){this._destroyIcons();B&&this._createIcons()}if(C=="disabled"){this.headers.add(this.headers.next())[B?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")}},_keydown:function(C){if(!(this.options.disabled||C.altKey||C.ctrlKey)){var B=A.ui.keyCode,F=this.headers.length,D=this.headers.index(C.target),E=false;switch(C.keyCode){case B.RIGHT:case B.DOWN:E=this.headers[(D+1)%F];break;case B.LEFT:case B.UP:E=this.headers[(D-1+F)%F];break;case B.SPACE:case B.ENTER:this._clickHandler({target:C.target},C.target);C.preventDefault()}if(E){A(C.target).attr("tabIndex",-1);A(E).attr("tabIndex",0);E.focus();return false}return true}},resize:function(){var C=this.options,B;if(C.fillSpace){if(A.browser.msie){var D=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}B=this.element.parent().height();A.browser.msie&&this.element.parent().css("overflow",D);this.headers.each(function(){B-=A(this).outerHeight(true)});this.headers.next().each(function(){A(this).height(Math.max(0,B-A(this).innerHeight()+A(this).height()))}).css("overflow","auto")}else{if(C.autoHeight){B=0;this.headers.next().each(function(){B=Math.max(B,A(this).height("").height())}).height(B)}}return this},activate:function(B){this.options.active=B;B=this._findActive(B)[0];this._clickHandler({target:B},B);return this},_findActive:function(B){return B?typeof B==="number"?this.headers.filter(":eq("+B+")"):this.headers.not(this.headers.not(B)):B===false?A([]):this.headers.filter(":eq(0)")},_clickHandler:function(C,B){var I=this.options;if(!I.disabled){if(C.target){C=A(C.currentTarget||B);B=C[0]===this.active[0];I.active=I.collapsible&&B?false:this.headers.index(C);if(!(this.running||!I.collapsible&&B)){var E=this.active;D=C.next();F=this.active.next();H={options:I,newHeader:B&&I.collapsible?A([]):C,oldHeader:this.active,newContent:B&&I.collapsible?A([]):D,oldContent:F};var G=this.headers.index(this.active[0])>this.headers.index(C[0]);this.active=B?A([]):C;this._toggle(D,F,H,B,G);E.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(I.icons.headerSelected).addClass(I.icons.header);if(!B){C.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(I.icons.header).addClass(I.icons.headerSelected);C.next().addClass("ui-accordion-content-active")}}}else{if(I.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(I.icons.headerSelected).addClass(I.icons.header);this.active.next().addClass("ui-accordion-content-active");var F=this.active.next(),H={options:I,newHeader:A([]),oldHeader:I.active,newContent:A([]),oldContent:F},D=this.active=A([]);this._toggle(D,F,H)}}}},_toggle:function(K,J,I,E,G){var F=this,H=F.options;F.toShow=K;F.toHide=J;F.data=I;var C=function(){if(F){return F._completed.apply(F,arguments)}};F._trigger("changestart",null,F.data);F.running=J.size()===0?K.size():J.size();if(H.animated){I={};I=H.collapsible&&E?{toShow:A([]),toHide:J,complete:C,down:G,autoHeight:H.autoHeight||H.fillSpace}:{toShow:K,toHide:J,complete:C,down:G,autoHeight:H.autoHeight||H.fillSpace};if(!H.proxied){H.proxied=H.animated}if(!H.proxiedDuration){H.proxiedDuration=H.duration}H.animated=A.isFunction(H.proxied)?H.proxied(I):H.proxied;H.duration=A.isFunction(H.proxiedDuration)?H.proxiedDuration(I):H.proxiedDuration;E=A.ui.accordion.animations;var D=H.duration,B=H.animated;if(B&&!E[B]&&!A.easing[B]){B="slide"}E[B]||(E[B]=function(L){this.slide(L,{easing:B,duration:D||700})});E[B](I)}else{if(H.collapsible&&E){K.toggle()}else{J.hide();K.show()}C(true)}J.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur();K.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(B){this.running=B?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length){this.toHide.parent()[0].className=this.toHide.parent()[0].className}this._trigger("change",null,this.data)}}});A.extend(A.ui.accordion,{version:"1.8.11",animations:{slide:function(C,B){C=A.extend({easing:"swing",duration:300},C,B);if(C.toHide.size()){if(C.toShow.size()){var H=C.toShow.css("overflow"),D=0,F={},E={},G;B=C.toShow;G=B[0].style.width;B.width(parseInt(B.parent().width(),10)-parseInt(B.css("paddingLeft"),10)-parseInt(B.css("paddingRight"),10)-(parseInt(B.css("borderLeftWidth"),10)||0)-(parseInt(B.css("borderRightWidth"),10)||0));A.each(["height","paddingTop","paddingBottom"],function(I,J){E[J]="hide";I=(""+A.css(C.toShow[0],J)).match(/^([\d+-.]+)(.*)$/);F[J]={value:I[1],unit:I[2]||"px"}});C.toShow.css({height:0,overflow:"hidden"}).show();C.toHide.filter(":hidden").each(C.complete).end().filter(":visible").animate(E,{step:function(I,J){if(J.prop=="height"){D=J.end-J.start===0?0:(J.now-J.start)/(J.end-J.start)}C.toShow[0].style[J.prop]=D*F[J.prop].value+F[J.prop].unit},duration:C.duration,easing:C.easing,complete:function(){C.autoHeight||C.toShow.css("height","");C.toShow.css({width:G,overflow:H});C.complete()}})}else{C.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},C)}}else{C.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},C)}},bounceslide:function(B){this.slide(B,{easing:B.down?"easeOutBounce":"swing",duration:B.down?1000:200})}}})})(jQuery);(function(B){var A=0;B.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var D=this,C=this.element[0].ownerDocument,E;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(G){if(!(D.options.disabled||D.element.attr("readonly"))){E=false;var F=B.ui.keyCode;switch(G.keyCode){case F.PAGE_UP:D._move("previousPage",G);break;case F.PAGE_DOWN:D._move("nextPage",G);break;case F.UP:D._move("previous",G);G.preventDefault();break;case F.DOWN:D._move("next",G);G.preventDefault();break;case F.ENTER:case F.NUMPAD_ENTER:if(D.menu.active){E=true;G.preventDefault()}case F.TAB:if(!D.menu.active){return }D.menu.select(G);break;case F.ESCAPE:D.element.val(D.term);D.close(G);break;default:clearTimeout(D.searching);D.searching=setTimeout(function(){if(D.term!=D.element.val()){D.selectedItem=null;D.search(null,G)}},D.options.delay);break}}}).bind("keypress.autocomplete",function(F){if(E){E=false;F.preventDefault()}}).bind("focus.autocomplete",function(){if(!D.options.disabled){D.selectedItem=null;D.previous=D.element.val()}}).bind("blur.autocomplete",function(F){if(!D.options.disabled){clearTimeout(D.searching);D.closing=setTimeout(function(){D.close(F);D._change(F)},150)}});this._initSource();this.response=function(){return D._response.apply(D,arguments)};this.menu=B("<ul></ul>").addClass("ui-autocomplete").appendTo(B(this.options.appendTo||"body",C)[0]).mousedown(function(G){var F=D.menu.element[0];B(G.target).closest(".ui-menu-item").length||setTimeout(function(){B(document).one("mousedown",function(H){H.target!==D.element[0]&&H.target!==F&&!B.ui.contains(F,H.target)&&D.close()})},1);setTimeout(function(){clearTimeout(D.closing)},13)}).menu({focus:function(G,F){F=F.item.data("item.autocomplete");false!==D._trigger("focus",G,{item:F})&&/^key/.test(G.originalEvent.type)&&D.element.val(F.value)},selected:function(I,H){var G=H.item.data("item.autocomplete"),F=D.previous;if(D.element[0]!==C.activeElement){D.element.focus();D.previous=F;setTimeout(function(){D.previous=F;D.selectedItem=G},1)}false!==D._trigger("select",I,{item:G})&&D.element.val(G.value);D.term=D.element.val();D.close(I);D.selectedItem=G},blur:function(){D.menu.element.is(":visible")&&D.element.val()!==D.term&&D.element.val(D.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");B.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();B.Widget.prototype.destroy.call(this)},_setOption:function(D,C){B.Widget.prototype._setOption.apply(this,arguments);D==="source"&&this._initSource();if(D==="appendTo"){this.menu.element.appendTo(B(C||"body",this.element[0].ownerDocument)[0])}D==="disabled"&&C&&this.xhr&&this.xhr.abort()},_initSource:function(){var D=this,C,E;if(B.isArray(this.options.source)){C=this.options.source;this.source=function(G,F){F(B.ui.autocomplete.filter(C,G.term))}}else{if(typeof this.options.source==="string"){E=this.options.source;this.source=function(G,F){D.xhr&&D.xhr.abort();D.xhr=B.ajax({url:E,data:G,dataType:"json",autocompleteRequest:++A,success:function(H){this.autocompleteRequest===A&&F(H)},error:function(){this.autocompleteRequest===A&&F([])}})}}else{this.source=this.options.source}}},search:function(D,C){D=D!=null?D:this.element.val();this.term=this.element.val();if(D.length<this.options.minLength){return this.close(C)}clearTimeout(this.closing);if(this._trigger("search",C)!==false){return this._search(D)}},_search:function(C){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:C},this.response)},_response:function(C){if(!this.options.disabled&&C&&C.length){C=this._normalize(C);this._suggest(C);this._trigger("open")}else{this.close()}this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(C){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",C)}},_change:function(C){this.previous!==this.element.val()&&this._trigger("change",C,{item:this.selectedItem})},_normalize:function(C){if(C.length&&C[0].label&&C[0].value){return C}return B.map(C,function(D){if(typeof D==="string"){return{label:D,value:D}}return B.extend({label:D.label||D.value,value:D.value||D.label},D)})},_suggest:function(D){var C=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(C,D);this.menu.deactivate();this.menu.refresh();C.show();this._resizeMenu();C.position(B.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next(new B.Event("mouseover"))},_resizeMenu:function(){var C=this.menu.element;C.outerWidth(Math.max(C.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(D,C){var E=this;B.each(C,function(G,F){E._renderItem(D,F)})},_renderItem:function(D,C){return B("<li></li>").data("item.autocomplete",C).append(B("<a></a>").text(C.label)).appendTo(D)},_move:function(D,C){if(this.menu.element.is(":visible")){if(this.menu.first()&&/^previous/.test(D)||this.menu.last()&&/^next/.test(D)){this.element.val(this.term);this.menu.deactivate()}else{this.menu[D](C)}}else{this.search(null,C)}},widget:function(){return this.menu.element}});B.extend(B.ui.autocomplete,{escapeRegex:function(C){return C.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(D,C){var E=new RegExp(B.ui.autocomplete.escapeRegex(C),"i");return B.grep(D,function(F){return E.test(F.label||F.value||F)})}})})(jQuery);(function(A){A.widget("ui.menu",{_create:function(){var B=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(C){if(A(C.target).closest(".ui-menu-item a").length){C.preventDefault();B.select(C)}});this.refresh()},refresh:function(){var B=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(C){B.activate(C,A(this).parent())}).mouseleave(function(){B.deactivate()})},activate:function(E,C){this.deactivate();if(this.hasScroll()){var B=C.offset().top-this.element.offset().top,D=this.element.attr("scrollTop"),F=this.element.height();if(B<0){this.element.attr("scrollTop",D+B)}else{B>=F&&this.element.attr("scrollTop",D+B-F+C.height())}}this.active=C.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",E,{item:C})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(B){this.move("next",".ui-menu-item:first",B)},previous:function(B){this.move("prev",".ui-menu-item:last",B)},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(D,C,B){if(this.active){D=this.active[D+"All"](".ui-menu-item").eq(0);D.length?this.activate(B,D):this.activate(B,this.element.children(C))}else{this.activate(B,this.element.children(C))}},nextPage:function(E){if(this.hasScroll()){if(!this.active||this.last()){this.activate(E,this.element.children(".ui-menu-item:first"))}else{var C=this.active.offset().top,B=this.element.height(),D=this.element.children(".ui-menu-item").filter(function(){var F=A(this).offset().top-C-B+A(this).height();return F<10&&F>-10});D.length||(D=this.element.children(".ui-menu-item:last"));this.activate(E,D)}}else{this.activate(E,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))}},previousPage:function(D){if(this.hasScroll()){if(!this.active||this.first()){this.activate(D,this.element.children(".ui-menu-item:last"))}else{var C=this.active.offset().top,B=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var E=A(this).offset().top-C+B-A(this).height();return E<10&&E>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(D,result)}}else{this.activate(D,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(B){this._trigger("selected",B,{item:this.active})}})})(jQuery);(function(D,C){var B={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},A={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(F){var E=D(this).css(F).offset().top;E<0&&D(this).css("top",F.top-E)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string"){this.originalTitle=""}this.options.title=this.options.title||this.originalTitle;var F=this,E=F.options,K=E.title||"&#160;",J=D.ui.dialog.getTitleId(F.element),H=(F.uiDialog=D("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+E.dialogClass).css({zIndex:E.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(L){if(E.closeOnEscape&&L.keyCode&&L.keyCode===D.ui.keyCode.ESCAPE){F.close(L);L.preventDefault()}}).attr({role:"dialog","aria-labelledby":J}).mousedown(function(L){F.moveToTop(false,L)});F.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(H);var I=(F.uiDialogTitlebar=D("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(H),G=D('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){G.addClass("ui-state-hover")},function(){G.removeClass("ui-state-hover")}).focus(function(){G.addClass("ui-state-focus")}).blur(function(){G.removeClass("ui-state-focus")}).click(function(L){F.close(L);return false}).appendTo(I);(F.uiDialogTitlebarCloseText=D("<span></span>")).addClass("ui-icon ui-icon-closethick").text(E.closeText).appendTo(G);D("<span></span>").addClass("ui-dialog-title").attr("id",J).html(K).prependTo(I);if(D.isFunction(E.beforeclose)&&!D.isFunction(E.beforeClose)){E.beforeClose=E.beforeclose}I.find("*").add(I).disableSelection();E.draggable&&D.fn.draggable&&F._makeDraggable();E.resizable&&D.fn.resizable&&F._makeResizable();F._createButtons(E.buttons);F._isOpen=false;D.fn.bgiframe&&H.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var E=this;E.overlay&&E.overlay.destroy();E.uiDialog.hide();E.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");E.uiDialog.remove();E.originalTitle&&E.element.attr("title",E.originalTitle);return E},widget:function(){return this.uiDialog},close:function(F){var E=this,H,G;if(false!==E._trigger("beforeClose",F)){E.overlay&&E.overlay.destroy();E.uiDialog.unbind("keypress.ui-dialog");E._isOpen=false;if(E.options.hide){E.uiDialog.hide(E.options.hide,function(){E._trigger("close",F)})}else{E.uiDialog.hide();E._trigger("close",F)}D.ui.dialog.overlay.resize();if(E.options.modal){H=0;D(".ui-dialog").each(function(){if(this!==E.uiDialog[0]){G=D(this).css("z-index");isNaN(G)||(H=Math.max(H,G))}});D.ui.dialog.maxZ=H}return E}},isOpen:function(){return this._isOpen},moveToTop:function(F,E){var H=this,G=H.options;if(G.modal&&!F||!G.stack&&!G.modal){return H._trigger("focus",E)}if(G.zIndex>D.ui.dialog.maxZ){D.ui.dialog.maxZ=G.zIndex}if(H.overlay){D.ui.dialog.maxZ+=1;H.overlay.$el.css("z-index",D.ui.dialog.overlay.maxZ=D.ui.dialog.maxZ)}F={scrollTop:H.element.attr("scrollTop"),scrollLeft:H.element.attr("scrollLeft")};D.ui.dialog.maxZ+=1;H.uiDialog.css("z-index",D.ui.dialog.maxZ);H.element.attr(F);H._trigger("focus",E);return H},open:function(){if(!this._isOpen){var F=this,E=F.options,G=F.uiDialog;F.overlay=E.modal?new D.ui.dialog.overlay(F):null;F._size();F._position(E.position);G.show(E.show);F.moveToTop(true);E.modal&&G.bind("keypress.ui-dialog",function(J){if(J.keyCode===D.ui.keyCode.TAB){var H=D(":tabbable",this),I=H.filter(":first");H=H.filter(":last");if(J.target===H[0]&&!J.shiftKey){I.focus(1);return false}else{if(J.target===I[0]&&J.shiftKey){H.focus(1);return false}}}});D(F.element.find(":tabbable").get().concat(G.find(".ui-dialog-buttonpane :tabbable").get().concat(G.get()))).eq(0).focus();F._isOpen=true;F._trigger("open");return F}},_createButtons:function(F){var E=this,I=false,H=D("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),G=D("<div></div>").addClass("ui-dialog-buttonset").appendTo(H);E.uiDialog.find(".ui-dialog-buttonpane").remove();typeof F==="object"&&F!==null&&D.each(F,function(){return !(I=true)});if(I){D.each(F,function(K,J){J=D.isFunction(J)?{click:J,text:K}:J;K=D('<button type="button"></button>').attr(J,true).unbind("click").click(function(){J.click.apply(E.element[0],arguments)}).appendTo(G);D.fn.button&&K.button()});H.appendTo(E.uiDialog)}},_makeDraggable:function(){function F(J){return{position:J.position,offset:J.offset}}var E=this,I=E.options,H=D(document),G;E.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(K,J){G=I.height==="auto"?"auto":D(this).height();D(this).height(D(this).height()).addClass("ui-dialog-dragging");E._trigger("dragStart",K,F(J))},drag:function(K,J){E._trigger("drag",K,F(J))},stop:function(K,J){I.position=[J.position.left-H.scrollLeft(),J.position.top-H.scrollTop()];D(this).removeClass("ui-dialog-dragging").height(G);E._trigger("dragStop",K,F(J));D.ui.dialog.overlay.resize()}})},_makeResizable:function(F){function E(J){return{originalPosition:J.originalPosition,originalSize:J.originalSize,position:J.position,size:J.size}}F=F===C?this.options.resizable:F;var I=this,H=I.options,G=I.uiDialog.css("position");F=typeof F==="string"?F:"n,e,s,w,se,sw,ne,nw";I.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:I.element,maxWidth:H.maxWidth,maxHeight:H.maxHeight,minWidth:H.minWidth,minHeight:I._minHeight(),handles:F,start:function(K,J){D(this).addClass("ui-dialog-resizing");I._trigger("resizeStart",K,E(J))},resize:function(K,J){I._trigger("resize",K,E(J))},stop:function(K,J){D(this).removeClass("ui-dialog-resizing");H.height=D(this).height();H.width=D(this).width();I._trigger("resizeStop",K,E(J));D.ui.dialog.overlay.resize()}}).css("position",G).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var E=this.options;return E.height==="auto"?E.minHeight:Math.min(E.minHeight,E.height)},_position:function(F){var E=[],H=[0,0],G;if(F){if(typeof F==="string"||typeof F==="object"&&"0" in F){E=F.split?F.split(" "):[F[0],F[1]];if(E.length===1){E[1]=E[0]}D.each(["left","top"],function(I,J){if(+E[I]===E[I]){H[I]=E[I];E[I]=J}});F={my:E.join(" "),at:E.join(" "),offset:H.join(" ")}}F=D.extend({},D.ui.dialog.prototype.options.position,F)}else{F=D.ui.dialog.prototype.options.position}(G=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(D.extend({of:window},F));G||this.uiDialog.hide()},_setOptions:function(F){var E=this,H={},G=false;D.each(F,function(I,J){E._setOption(I,J);if(I in B){G=true}if(I in A){H[I]=J}});G&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",H)},_setOption:function(F,E){var I=this,H=I.uiDialog;switch(F){case"beforeclose":F="beforeClose";break;case"buttons":I._createButtons(E);break;case"closeText":I.uiDialogTitlebarCloseText.text(""+E);break;case"dialogClass":H.removeClass(I.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+E);break;case"disabled":E?H.addClass("ui-dialog-disabled"):H.removeClass("ui-dialog-disabled");break;case"draggable":var G=H.is(":data(draggable)");G&&!E&&H.draggable("destroy");!G&&E&&I._makeDraggable();break;case"position":I._position(E);break;case"resizable":(G=H.is(":data(resizable)"))&&!E&&H.resizable("destroy");G&&typeof E==="string"&&H.resizable("option","handles",E);!G&&E!==false&&I._makeResizable(E);break;case"title":D(".ui-dialog-title",I.uiDialogTitlebar).html(""+(E||"&#160;"));break}D.Widget.prototype._setOption.apply(I,arguments)},_size:function(){var F=this.options,E,H,G=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(F.minWidth>F.width){F.width=F.minWidth}E=this.uiDialog.css({height:"auto",width:F.width}).height();H=Math.max(0,F.minHeight-E);if(F.height==="auto"){if(D.support.minHeight){this.element.css({minHeight:H,height:"auto"})}else{this.uiDialog.show();F=this.element.css("height","auto").height();G||this.uiDialog.hide();this.element.height(Math.max(F,H))}}else{this.element.height(Math.max(F.height-E,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(E){E=E.attr("id");if(!E){this.uuid+=1;E=this.uuid}return"ui-dialog-title-"+E},overlay:function(E){this.$el=D.ui.dialog.overlay.create(E)}});D.extend(D.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:D.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(E){return E+".dialog-overlay"}).join(" "),create:function(F){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(F.options.closeOnEscape&&G.keyCode&&G.keyCode===D.ui.keyCode.ESCAPE){F.close(G);G.preventDefault()}});D(window).bind("resize.dialog-overlay",D.ui.dialog.overlay.resize)}var E=(this.oldInstances.pop()||D("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});D.fn.bgiframe&&E.bgiframe();this.instances.push(E);return E},destroy:function(F){var E=D.inArray(F,this.instances);E!=-1&&this.oldInstances.push(this.instances.splice(E,1)[0]);this.instances.length===0&&D([document,window]).unbind(".dialog-overlay");F.remove();var G=0;D.each(this.instances,function(){G=Math.max(G,this.css("z-index"))});this.maxZ=G},height:function(){var F,E;if(D.browser.msie&&D.browser.version<7){F=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);E=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return F<E?D(window).height()+"px":F+"px"}else{return D(document).height()+"px"}},width:function(){var F,E;if(D.browser.msie&&D.browser.version<7){F=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);E=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return F<E?D(window).width()+"px":F+"px"}else{return D(document).width()+"px"}},resize:function(){var E=D([]);D.each(D.ui.dialog.overlay.instances,function(){E=E.add(this)});E.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(F,E){function D(){return ++C}function B(){return ++A}var C=0,A=0;F.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(G,H){if(G=="selected"){this.options.collapsible&&H==this.options.selected||this.select(H)}else{this.options[G]=H;this._tabify()}},_tabId:function(G){return G.title&&G.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+D()},_sanitizeSelector:function(G){return G.replace(/:/g,"\\:")},_cookie:function(){var G=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+B());return F.cookie.apply(null,[G].concat(F.makeArray(arguments)))},_ui:function(G,H){return{tab:G,panel:H,index:this.anchors.index(G)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var G=F(this);G.html(G.data("label.tabs")).removeData("label.tabs")})},_tabify:function(P){function N(S,T){S.css("display","");!F.support.opacity&&T.opacity&&S[0].style.removeAttribute("filter")}var Q=this,O=this.options,M=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=F(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return F("a",this)[0]});this.panels=F([]);this.anchors.each(function(U,W){var T=F(W).attr("href"),S=T.split("#")[0],V;if(S&&(S===location.toString().split("#")[0]||(V=F("base")[0])&&S===V.href)){T=W.hash;W.href=T}if(M.test(T)){Q.panels=Q.panels.add(Q.element.find(Q._sanitizeSelector(T)))}else{if(T&&T!=="#"){F.data(W,"href.tabs",T);F.data(W,"load.tabs",T.replace(/#.*$/,""));T=Q._tabId(W);W.href="#"+T;W=Q.element.find("#"+T);if(!W.length){W=F(O.panelTemplate).attr("id",T).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(Q.panels[U-1]||Q.list);W.data("destroy.tabs",true)}Q.panels=Q.panels.add(W)}else{O.disabled.push(U)}}});if(P){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(O.selected===E){location.hash&&this.anchors.each(function(S,T){if(T.hash==location.hash){O.selected=S;return false}});if(typeof O.selected!=="number"&&O.cookie){O.selected=parseInt(Q._cookie(),10)}if(typeof O.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){O.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}O.selected=O.selected||(this.lis.length?0:-1)}else{if(O.selected===null){O.selected=-1}}O.selected=O.selected>=0&&this.anchors[O.selected]||O.selected<0?O.selected:0;O.disabled=F.unique(O.disabled.concat(F.map(this.lis.filter(".ui-state-disabled"),function(S){return Q.lis.index(S)}))).sort();F.inArray(O.selected,O.disabled)!=-1&&O.disabled.splice(F.inArray(O.selected,O.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(O.selected>=0&&this.anchors.length){Q.element.find(Q._sanitizeSelector(Q.anchors[O.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(O.selected).addClass("ui-tabs-selected ui-state-active");Q.element.queue("tabs",function(){Q._trigger("show",null,Q._ui(Q.anchors[O.selected],Q.element.find(Q._sanitizeSelector(Q.anchors[O.selected].hash))[0]))});this.load(O.selected)}F(window).bind("unload",function(){Q.lis.add(Q.anchors).unbind(".tabs");Q.lis=Q.anchors=Q.panels=null})}else{O.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[O.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");O.cookie&&this._cookie(O.selected,O.cookie);P=0;for(var L;L=this.lis[P];P++){F(L)[F.inArray(P,O.disabled)!=-1&&!F(L).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}O.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(O.event!=="mouseover"){var K=function(S,T){T.is(":not(.ui-state-disabled)")&&T.addClass("ui-state-"+S)},I=function(S,T){T.removeClass("ui-state-"+S)};this.lis.bind("mouseover.tabs",function(){K("hover",F(this))});this.lis.bind("mouseout.tabs",function(){I("hover",F(this))});this.anchors.bind("focus.tabs",function(){K("focus",F(this).closest("li"))});this.anchors.bind("blur.tabs",function(){I("focus",F(this).closest("li"))})}var J,H;if(O.fx){if(F.isArray(O.fx)){J=O.fx[0];H=O.fx[1]}else{J=H=O.fx}}var G=H?function(S,T){F(S).closest("li").addClass("ui-tabs-selected ui-state-active");T.hide().removeClass("ui-tabs-hide").animate(H,H.duration||"normal",function(){N(T,H);Q._trigger("show",null,Q._ui(S,T[0]))})}:function(S,T){F(S).closest("li").addClass("ui-tabs-selected ui-state-active");T.removeClass("ui-tabs-hide");Q._trigger("show",null,Q._ui(S,T[0]))},R=J?function(S,T){T.animate(J,J.duration||"normal",function(){Q.lis.removeClass("ui-tabs-selected ui-state-active");T.addClass("ui-tabs-hide");N(T,J);Q.element.dequeue("tabs")})}:function(S,T){Q.lis.removeClass("ui-tabs-selected ui-state-active");T.addClass("ui-tabs-hide");Q.element.dequeue("tabs")};this.anchors.bind(O.event+".tabs",function(){var U=this,V=F(U).closest("li"),T=Q.panels.filter(":not(.ui-tabs-hide)"),S=Q.element.find(Q._sanitizeSelector(U.hash));if(V.hasClass("ui-tabs-selected")&&!O.collapsible||V.hasClass("ui-state-disabled")||V.hasClass("ui-state-processing")||Q.panels.filter(":animated").length||Q._trigger("select",null,Q._ui(this,S[0]))===false){this.blur();return false}O.selected=Q.anchors.index(this);Q.abort();if(O.collapsible){if(V.hasClass("ui-tabs-selected")){O.selected=-1;O.cookie&&Q._cookie(O.selected,O.cookie);Q.element.queue("tabs",function(){R(U,T)}).dequeue("tabs");this.blur();return false}else{if(!T.length){O.cookie&&Q._cookie(O.selected,O.cookie);Q.element.queue("tabs",function(){G(U,S)});Q.load(Q.anchors.index(this));this.blur();return false}}}O.cookie&&Q._cookie(O.selected,O.cookie);if(S.length){T.length&&Q.element.queue("tabs",function(){R(U,T)});Q.element.queue("tabs",function(){G(U,S)});Q.load(Q.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}F.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(G){if(typeof G=="string"){G=this.anchors.index(this.anchors.filter("[href$="+G+"]"))}return G},destroy:function(){var G=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var I=F.data(this,"href.tabs");if(I){this.href=I}var H=F(this).unbind(".tabs");F.each(["href","load","cache"],function(K,J){H.removeData(J+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){F.data(this,"destroy.tabs")?F(this).remove():F(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});G.cookie&&this._cookie(null,G.cookie);return this},add:function(G,K,H){if(H===E){H=this.anchors.length}var L=this,J=this.options;K=F(J.tabTemplate.replace(/#\{href\}/g,G).replace(/#\{label\}/g,K));G=!G.indexOf("#")?G.replace("#",""):this._tabId(F("a",K)[0]);K.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var I=L.element.find("#"+G);I.length||(I=F(J.panelTemplate).attr("id",G).data("destroy.tabs",true));I.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(H>=this.lis.length){K.appendTo(this.list);I.appendTo(this.list[0].parentNode)}else{K.insertBefore(this.lis[H]);I.insertBefore(this.panels[H])}J.disabled=F.map(J.disabled,function(M){return M>=H?++M:M});this._tabify();if(this.anchors.length==1){J.selected=0;K.addClass("ui-tabs-selected ui-state-active");I.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){L._trigger("show",null,L._ui(L.anchors[0],L.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[H],this.panels[H]));return this},remove:function(G){G=this._getIndex(G);var I=this.options,H=this.lis.eq(G).remove(),J=this.panels.eq(G).remove();if(H.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(G+(G+1<this.anchors.length?1:-1))}I.disabled=F.map(F.grep(I.disabled,function(K){return K!=G}),function(K){return K>=G?--K:K});this._tabify();this._trigger("remove",null,this._ui(H.find("a")[0],J[0]));return this},enable:function(G){G=this._getIndex(G);var H=this.options;if(F.inArray(G,H.disabled)!=-1){this.lis.eq(G).removeClass("ui-state-disabled");H.disabled=F.grep(H.disabled,function(I){return I!=G});this._trigger("enable",null,this._ui(this.anchors[G],this.panels[G]));return this}},disable:function(G){G=this._getIndex(G);var H=this.options;if(G!=H.selected){this.lis.eq(G).addClass("ui-state-disabled");H.disabled.push(G);H.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[G],this.panels[G]))}return this},select:function(G){G=this._getIndex(G);if(G==-1){if(this.options.collapsible&&this.options.selected!=-1){G=this.options.selected}else{return this}}this.anchors.eq(G).trigger(this.options.event+".tabs");return this},load:function(G){G=this._getIndex(G);var K=this,H=this.options,L=this.anchors.eq(G)[0],J=F.data(L,"load.tabs");this.abort();if(!J||this.element.queue("tabs").length!==0&&F.data(L,"cache.tabs")){this.element.dequeue("tabs")}else{this.lis.eq(G).addClass("ui-state-processing");if(H.spinner){var I=F("span",L);I.data("label.tabs",I.html()).html(H.spinner)}this.xhr=F.ajax(F.extend({},H.ajaxOptions,{url:J,success:function(N,O){K.element.find(K._sanitizeSelector(L.hash)).html(N);K._cleanup();H.cache&&F.data(L,"cache.tabs",true);K._trigger("load",null,K._ui(K.anchors[G],K.panels[G]));try{H.ajaxOptions.success(N,O)}catch(M){}},error:function(N,O){K._cleanup();K._trigger("load",null,K._ui(K.anchors[G],K.panels[G]));try{H.ajaxOptions.error(N,O,G,L)}catch(M){}}}));K.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(G,H){this.anchors.eq(G).removeData("cache.tabs").data("load.tabs",H);return this},length:function(){return this.anchors.length}});F.extend(F.ui.tabs,{version:"1.8.11"});F.extend(F.ui.tabs.prototype,{rotation:null,rotate:function(G,J){var H=this,K=this.options,I=H._rotate||(H._rotate=function(L){clearTimeout(H.rotation);H.rotation=setTimeout(function(){var M=K.selected;H.select(++M<H.anchors.length?M:0)},G);L&&L.stopPropagation()});J=H._unrotate||(H._unrotate=!J?function(L){L.clientX&&H.rotate(null)}:function(){t=K.selected;I()});if(G){this.element.bind("tabsshow",I);this.anchors.bind(K.event+".tabs",J);I()}else{clearTimeout(H.rotation);this.element.unbind("tabsshow",I);this.anchors.unbind(K.event+".tabs",J);delete this._rotate;delete this._unrotate}return this}})})(jQuery);(function(d,A){function K(){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 F(a,b){d.extend(a,b);for(var c in b){if(b[c]==null||b[c]==A){a[c]=b[c]}}return a}d.extend(d.ui,{datepicker:{version:"1.8.11"}});var y=(new Date).getTime();d.extend(K.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){F(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input"){this._connectDatepicker(a,i)}else{f&&this._inlineDatepicker(a,i)}},_newInst:function(a,b){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:b,dpDiv:!b?this.dpDiv:d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both"){a.focus(this._showDatepicker)}if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.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 b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++){if(f[g].length>h){h=f[g].length;i=g}}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()}},_dialogDatepicker:function(a,b,c,e,f){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)}F(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.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=c;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 b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(e=="div"||e=="span"){b.removeClass(this.markerClassName).empty()}}}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(e=="div"||e=="span"){b.children("."+this._inlineClass).children().removeClass("ui-state-disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(e=="div"||e=="span"){b.children("."+this._inlineClass).children().addClass("ui-state-disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a){return false}for(var b=0;b<this._disabledInputs.length;b++){if(this._disabledInputs[b]==a){return true}}return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string"){return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},e.settings):this._get(e,b):null}var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true),i=this._getMinMaxDate(e,"min"),g=this._getMinMaxDate(e,"max");F(e.settings,f);if(i!==null&&f.dateFormat!==A&&f.minDate===A){e.settings.minDate=this._formatDate(e,i)}if(g!==null&&f.dateFormat!==A&&f.maxDate===A){e.settings.maxDate=this._formatDate(e,g)}this._attachments(d(a),e);this._autoSize(e);this._setDateDatepicker(a,h);this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=true;if(d.datepicker._datepickerShowing){switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv);c[0]?d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey){d.datepicker._clearDate(a.target)}c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey){d.datepicker._gotoToday(a.target)}c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?+1:-1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M")}break;case 38:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,-7,"D")}c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?-1:+1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M")}break;case 40:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,+7,"D")}c=a.ctrlKey||a.metaKey;break;default:c=false}}else{if(a.keyCode==36&&a.ctrlKey){d.datepicker._showDatepicker(this)}else{c=false}}if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==A?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||c<" "||!b||b.indexOf(c)>-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(b){d.datepicker.log(b)}}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 b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(true,true);var c=d.datepicker._get(b,"beforeShow");F(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog){a.value=""}if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return !e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){d.datepicker._datepickerShowing=true;var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f){h()}b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var e=a.dpDiv.find("iframe.ui-datepicker-cover");e.length&&e.css({left:-c[0],top:-c[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(!b._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();c=this._getNumberOfMonths(a);e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(c[0]!=1||c[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 f=a.yearshtml;setTimeout(function(){f===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);f=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));){a=a[b?"previousSibling":"nextSibling"]}a=d(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker"))){if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();if(a=this._get(b,"onClose")){a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b])}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,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c){c.apply(a.input?a.input[0]:null,[b,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 b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},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 b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/86400000)/7)+1},parseDate:function(a,b,c){if(a==null||b==null){throw"Invalid arguments"}b=typeof b=="object"?b.toString():b+"";if(b==""){return null}var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=z+1<a.length&&a.charAt(z+1)==p)&&z++;return p},m=function(p){var v=o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"&&v?4:p=="o"?3:2)+"}");p=b.substring(s).match(p);if(!p){throw"Missing number at position "+s}s+=p[0].length;return parseInt(p[0],10)},n=function(p,v,H){p=o(p)?H:v;for(v=0;v<p.length;v++){if(b.substr(s,p[v].length).toLowerCase()==p[v].toLowerCase()){s+=p[v].length;return v+1}}throw"Unknown name at position "+s},r=function(){if(b.charAt(s)!=a.charAt(z)){throw"Unexpected literal at position "+s}s++},s=0,z=0;z<a.length;z++){if(k){if(a.charAt(z)=="'"&&!o("'")){k=false}else{r()}}else{switch(a.charAt(z)){case"d":l=m("d");break;case"D":n("D",f,h);break;case"o":u=m("o");break;case"m":j=m("m");break;case"M":j=n("M",i,g);break;case"y":c=m("y");break;case"@":var w=new Date(m("@"));c=w.getFullYear();j=w.getMonth()+1;l=w.getDate();break;case"!":w=new Date((m("!")-this._ticksTo1970)/10000);c=w.getFullYear();j=w.getMonth()+1;l=w.getDate();break;case"'":if(o("'")){r()}else{k=true}break;default:r()}}}if(c==-1){c=(new Date).getFullYear()}else{if(c<100){c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100)}}if(u>-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e){break}j++;l-=e}while(1)}w=this._daylightSavingAdjust(new Date(c,j-1,l));if(w.getFullYear()!=c||w.getMonth()+1!=j||w.getDate()!=l){throw"Invalid date"}return w},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))*24*60*60*10000000,formatDate:function(a,b,c){if(!b){return""}var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+1<a.length&&a.charAt(k+1)==o)&&k++;return o},g=function(o,m,n){m=""+m;if(i(o)){for(;m.length<n;){m="0"+m}}return m},j=function(o,m,n,r){return i(o)?r[m]:n[m]},l="",u=false;if(b){for(var k=0;k<a.length;k++){if(u){if(a.charAt(k)=="'"&&!i("'")){u=false}else{l+=a.charAt(k)}}else{switch(a.charAt(k)){case"d":l+=g("d",b.getDate(),2);break;case"D":l+=j("D",b.getDay(),e,f);break;case"o":l+=g("o",(b.getTime()-(new Date(b.getFullYear(),0,0)).getTime())/86400000,3);break;case"m":l+=g("m",b.getMonth()+1,2);break;case"M":l+=j("M",b.getMonth(),h,c);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=b.getTime()*10000+this._ticksTo1970;break;case"'":if(i("'")){l+="'"}else{u=true}break;default:l+=a.charAt(k)}}}}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++){if(c){if(a.charAt(f)=="'"&&!e("'")){c=false}else{b+=a.charAt(f)}}else{switch(a.charAt(f)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":if(e("'")){b+="'"}else{c=true}break;default:b+=a.charAt(f)}}}return b},_get:function(a,b){return a.settings[b]!==A?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,j=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=u.exec(h);k;){switch(k[2]||"d"){case"d":case"D":g+=parseInt(k[1],10);break;case"w":case"W":g+=parseInt(k[1],10)*7;break;case"m":case"M":l+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break;case"y":case"Y":j+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break}k=u.exec(h)}return new Date(j,l,g)};if(b=(b=b==null||b===""?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a){return null}a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c){this._notifyChange(a)}this._adjustInstDate(a);if(a.input){a.input.val(e?"":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 b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&n<k?k:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', -"+j+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var r=this._get(a,"nextText");r=!h?r:this.formatDate(r,this._daylightSavingAdjust(new Date(m,g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._adjustDate('#"+a.id+"', +"+j+", 'M');\" title=\""+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+r+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+r+"</span></a>";j=this._get(a,"currentText");r=this._get(a,"gotoCurrent")&&a.currentDay?u:b;j=!h?j:this.formatDate(j,r,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+y+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,r)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+y+".datepicker._gotoToday('#"+a.id+"');\">"+j+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");r=this._get(a,"dayNames");this._get(a,"dayNamesShort");var s=this._get(a,"dayNamesMin"),z=this._get(a,"monthNames"),w=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),v=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var L=this._getDefaultDate(a),I="",D=0;D<i[0];D++){for(var M="",E=0;E<i[1];E++){var N=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",x="";if(l){x+='<div class="ui-datepicker-group';if(i[1]>1){switch(E){case 0:x+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:x+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:x+=" ui-datepicker-group-middle";t="";break}}x+='">'}x+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&D==0?c?f:n:"")+(/all|right/.test(t)&&D==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,D>0||E>0,z,w)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var B=j?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var q=(t+h)%7;B+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+r[q]+'">'+s[q]+"</span></th>"}x+=B+"</tr></thead><tbody>";B=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth){a.selectedDay=Math.min(a.selectedDay,B)}t=(this._getFirstDayOfMonth(m,g)-h+7)%7;B=l?6:Math.ceil((t+B)/7);q=this._daylightSavingAdjust(new Date(m,g,1-t));for(var O=0;O<B;O++){x+="<tr>";var P=!j?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(q)+"</td>";for(t=0;t<7;t++){var G=p?p.apply(a.input?a.input[0]:null,[q]):[true,""],C=q.getMonth()!=g,J=C&&!H||!G[0]||k&&q<k||o&&q>o;P+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(C?" ui-datepicker-other-month":"")+(q.getTime()==N.getTime()&&g==a.selectedMonth&&a._keyEvent||L.getTime()==q.getTime()&&L.getTime()==N.getTime()?" "+this._dayOverClass:"")+(J?" "+this._unselectableClass+" ui-state-disabled":"")+(C&&!v?"":" "+G[1]+(q.getTime()==u.getTime()?" "+this._currentClass:"")+(q.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!C||v)&&G[2]?' title="'+G[2]+'"':"")+(J?"":' onclick="DP_jQuery_'+y+".datepicker._selectDay('#"+a.id+"',"+q.getMonth()+","+q.getFullYear()+', this);return false;"')+">"+(C&&!v?"&#xa0;":J?'<span class="ui-state-default">'+q.getDate()+"</span>":'<a class="ui-state-default'+(q.getTime()==b.getTime()?" ui-state-highlight":"")+(q.getTime()==u.getTime()?" ui-state-active":"")+(C?" ui-priority-secondary":"")+'" href="#">'+q.getDate()+"</a>")+"</td>";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+=P+"</tr>"}g++;if(g>11){g=0;m++}x+="</tbody></table>"+(l?"</div>"+(i[0]>0&&E==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");M+=x}I+=M}I+=e+(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 I},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='<div class="ui-datepicker-title">',o="";if(h||!j){o+='<span class="ui-datepicker-month">'+i[b]+"</span>"}else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var n=0;n<12;n++){if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth())){o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>"}}o+="</select>"}u||(k+=o+(h||!(j&&l)?"&#xa0;":""));a.yearshtml="";if(h||!l){k+='<span class="ui-datepicker-year">'+c+"</span>"}else{g=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();i=function(s){s=s.match(/c[+-].*/)?c+parseInt(s.substring(1),10):s.match(/[+-].*/)?r+parseInt(s,10):parseInt(s,10);return isNaN(s)?r:s};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+y+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+y+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=g;b++){a.yearshtml+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>"}a.yearshtml+="</select>";if(d.browser.mozilla){k+='<select class="ui-datepicker-year"><option value="'+c+'" selected="selected">'+c+"</option></select>"}else{k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u){k+=(h||!(j&&l)?"&#xa0;":"")+o}k+="</div>";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y"){this._notifyChange(a)}},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b){b.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,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,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 b=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(b))}if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new K;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.11";window["DP_jQuery_"+y]=d})(jQuery);(function(F){F.facebox=function(M,L){F.facebox.loading();if(M.ajax){G(M.ajax)}else{if(M.image){C(M.image)}else{if(M.div){J(M.div)}else{if(F.isFunction(M)){M.call(F)}else{F.facebox.reveal(M,L)}}}}};F.extend(F.facebox,{settings:{opacity:0,overlay:true,loadingImage:"/images/facebox/loading.gif",closeImage:"/images/facebox/closelabel.gif",imageTypes:["png","jpg","jpeg","gif"],faceboxHtml:'    <div id="facebox" style="display:none;">       <div class="popup">         <table>           <tbody>             <tr>               <td class="tl"/><td class="b"/><td class="tr"/>             </tr>             <tr>               <td class="b"/>               <td class="body">                 <div class="content">                 </div>                 <div class="facebox-footer">                   <a href="#" class="close">                     <img src="../../images/facebox/closelabel.gif" title="close" class="close_image" />                   </a>                 </div>               </td>               <td class="b"/>             </tr>             <tr>               <td class="bl"/><td class="b"/><td class="br"/>             </tr>           </tbody>         </table>       </div>     </div>'},loading:function(){K();if(F("#facebox .loading").length==1){return true}E();F("#facebox .content").empty();F("#facebox .body").children().hide().end().append('<div class="loading"><img src="'+F.facebox.settings.loadingImage+'"/></div>');F("#facebox").css({top:H()[1]+(I()/10),left:385.5}).show();F(document).bind("keydown.facebox",function(L){if(L.keyCode==27){F.facebox.close()}return true});F(document).trigger("loading.facebox")},reveal:function(M,L){F(document).trigger("beforeReveal.facebox");if(L){F("#facebox .content").addClass(L)}F("#facebox .content").append(M);F("#facebox .loading").remove();F("#facebox .body").children().fadeIn("normal");F("#facebox").css("left",F(window).width()/2-(F("#facebox table").width()/2));F(document).trigger("reveal.facebox").trigger("afterReveal.facebox")},close:function(){F(document).trigger("close.facebox");return false}});F.fn.facebox=function(L){K(L);function M(){F.facebox.loading(true);var N=this.rel.match(/facebox\[?\.(\w+)\]?/);if(N){N=N[1]}J(this.href,N);return false}return this.click(M)};function K(N){if(F.facebox.settings.inited){return true}else{F.facebox.settings.inited=true}F(document).trigger("init.facebox");D();var L=F.facebox.settings.imageTypes.join("|");F.facebox.settings.imageTypesRegexp=new RegExp("."+L+"$","i");if(N){F.extend(F.facebox.settings,N)}F("body").append(F.facebox.settings.faceboxHtml);var M=[new Image(),new Image()];M[0].src=F.facebox.settings.closeImage;M[1].src=F.facebox.settings.loadingImage;F("#facebox").find(".b:first, .bl, .br, .tl, .tr").each(function(){M.push(new Image());M.slice(-1).src=F(this).css("background-image").replace(/url\((.+)\)/,"$1")});F("#facebox .close").click(F.facebox.close);F("#facebox .close_image").attr("src",F.facebox.settings.closeImage)}function H(){var M,L;if(self.pageYOffset){L=self.pageYOffset;M=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){L=document.documentElement.scrollTop;M=document.documentElement.scrollLeft}else{if(document.body){L=document.body.scrollTop;M=document.body.scrollLeft}}}return new Array(M,L)}function I(){var L;if(self.innerHeight){L=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){L=document.documentElement.clientHeight}else{if(document.body){L=document.body.clientHeight}}}return L}function D(){var L=F.facebox.settings;L.loadingImage=L.loading_image||L.loadingImage;L.closeImage=L.close_image||L.closeImage;L.imageTypes=L.image_types||L.imageTypes;L.faceboxHtml=L.facebox_html||L.faceboxHtml}function J(M,L){if(M.match(/#/)){var N=window.location.href.split("#")[0];var O=M.replace(N,"");F.facebox.reveal(F(O).clone().show(),L)}else{if(M.match(F.facebox.settings.imageTypesRegexp)){C(M,L)}else{G(M,L)}}}function C(M,L){var N=new Image();N.onload=function(){F.facebox.reveal('<div class="image"><img src="'+N.src+'" /></div>',L)};N.src=M}function G(M,L){F.get(M,function(N){F.facebox.reveal(N,L)})}function B(){return F.facebox.settings.overlay==false||F.facebox.settings.opacity===null}function E(){if(B()){return }if(F("facebox_overlay").length==0){F("body").append('<div id="facebox_overlay" class="facebox_hide"></div>')}F("#facebox_overlay").hide().addClass("facebox_overlayBG").css("opacity",F.facebox.settings.opacity).click(function(){F(document).trigger("close.facebox")}).fadeIn(200);return false}function A(){if(B()){return }F("#facebox_overlay").fadeOut(200,function(){F("#facebox_overlay").removeClass("facebox_overlayBG");F("#facebox_overlay").addClass("facebox_hide");F("#facebox_overlay").remove()});return false}F(document).bind("close.facebox",function(){F(document).unbind("keydown.facebox");F("#facebox").fadeOut(function(){F("#facebox .content").removeClass().addClass("content");A();F("#facebox .loading").remove()})})})(jQuery);(function(A){A.f1000box={defaults:{opacity:0.2,overlay:true}};A.fn.f1000box=function(D){var B=A.extend({},A.f1000box.defaults,D);function I(){if(A(".f1000box-selected").length>0){H()}else{E();if(A(this).attr("href").match(/#/)){var J=A(this).attr("href").split("#")[1];A(this).trigger("beforeReveal.f1000box");G(A("#"+J));A(this).trigger("afterReveal.f1000box")}}return false}function G(J){J.hide().addClass("f1000box").fadeIn("normal");J.parent().addClass("f1000box-selected")}function C(){return B.overlay==false||B.opacity===null}function E(){if(C()){return }if(A("#f1000_overlay").length==0){A("body").append('<div id="f1000_overlay"></div>')}A("#f1000_overlay").hide().css("opacity",B.opacity).click(function(){A(document).trigger("close.f1000box")}).fadeIn(200);return false}function F(){if(C()){return }A("#f1000_overlay").fadeOut(300,function(){A("#f1000_overlay").remove()});return false}function H(){A(document).trigger("close.f1000box");return false}A(document).bind("close.f1000box",function(){F();A(".f1000box").fadeOut(200,function(){A(".f1000box").removeClass("f1000box");A(".f1000box-selected").removeClass("f1000box-selected")})});return this.click(I)}})(jQuery);
/* Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Version: 1.0.3
 * Requires jQuery 1.1.3+
 * Docs: http://docs.jquery.com/Plugins/livequery
 */
(function(A){A.extend(A.fn,{livequery:function(F,E,D){var C=this,G;if(A.isFunction(F)){D=E,E=F,F=undefined}A.each(A.livequery.queries,function(H,I){if(C.selector==I.selector&&C.context==I.context&&F==I.type&&(!E||E.$lqguid==I.fn.$lqguid)&&(!D||D.$lqguid==I.fn2.$lqguid)){return(G=I)&&false}});G=G||new A.livequery(this.selector,this.context,F,E,D);G.stopped=false;G.run();return this},expire:function(F,E,D){var C=this;if(A.isFunction(F)){D=E,E=F,F=undefined}A.each(A.livequery.queries,function(G,H){if(C.selector==H.selector&&C.context==H.context&&(!F||F==H.type)&&(!E||E.$lqguid==H.fn.$lqguid)&&(!D||D.$lqguid==H.fn2.$lqguid)&&!this.stopped){A.livequery.stop(H.id)}});return this}});A.livequery=function(C,E,G,F,D){this.selector=C;this.context=E||document;this.type=G;this.fn=F;this.fn2=D;this.elements=[];this.stopped=false;this.id=A.livequery.queries.push(this)-1;F.$lqguid=F.$lqguid||A.livequery.guid++;if(D){D.$lqguid=D.$lqguid||A.livequery.guid++}return this};A.livequery.prototype={stop:function(){var C=this;if(this.type){this.elements.unbind(this.type,this.fn)}else{if(this.fn2){this.elements.each(function(D,E){C.fn2.apply(E)})}}this.elements=[];this.stopped=true},run:function(){if(this.stopped){return }var E=this;var F=this.elements,D=A(this.selector,this.context),C=D.not(F);this.elements=D;if(this.type){C.bind(this.type,this.fn);if(F.length>0){A.each(F,function(G,H){if(A.inArray(H,D)<0){A.event.remove(H,E.type,E.fn)}})}}else{C.each(function(){E.fn.apply(this)});if(this.fn2&&F.length>0){A.each(F,function(G,H){if(A.inArray(H,D)<0){E.fn2.apply(H)}})}}}};A.extend(A.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if(A.livequery.running&&A.livequery.queue.length){var C=A.livequery.queue.length;while(C--){A.livequery.queries[A.livequery.queue.shift()].run()}}},pause:function(){A.livequery.running=false},play:function(){A.livequery.running=true;A.livequery.run()},registerPlugin:function(){A.each(arguments,function(D,E){if(!A.fn[E]){return }var C=A.fn[E];A.fn[E]=function(){var F=C.apply(this,arguments);A.livequery.run();return F}})},run:function(C){if(C!=undefined){if(A.inArray(C,A.livequery.queue)<0){A.livequery.queue.push(C)}}else{A.each(A.livequery.queries,function(D){if(A.inArray(D,A.livequery.queue)<0){A.livequery.queue.push(D)}})}if(A.livequery.timeout){clearTimeout(A.livequery.timeout)}A.livequery.timeout=setTimeout(A.livequery.checkQueue,20)},stop:function(C){if(C!=undefined){A.livequery.queries[C].stop()}else{A.each(A.livequery.queries,function(D){A.livequery.queries[D].stop()})}}});A.livequery.registerPlugin("append","prepend","after","before","wrap","attr","removeAttr","addClass","removeClass","toggleClass","empty","remove");A(function(){A.livequery.play()});var B=A.prototype.init;A.prototype.init=function(C,E){var D=B.apply(this,arguments);if(C&&C.selector){D.context=C.context,D.selector=C.selector}if(typeof C=="string"){D.context=E||document,D.selector=C}return D};A.prototype.init.prototype=A.prototype})(jQuery);
/* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Version 2.1.2
 */
(function(A){A.fn.bgiframe=(A.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)?function(D){D=A.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},D);var C='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+D.src+'"style="display:block;position:absolute;z-index:-1;'+(D.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(D.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":B(D.top))+";left:"+(D.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":B(D.left))+";width:"+(D.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":B(D.width))+";height:"+(D.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":B(D.height))+';"/>';return this.each(function(){if(A(this).children("iframe.bgiframe").length===0){this.insertBefore(document.createElement(C),this.firstChild)}})}:function(){return this});A.fn.bgIframe=A.fn.bgiframe;function B(C){return C&&C.constructor===Number?C+"px":C}})(jQuery);(function($){$.fn.validationEngine=function(settings){if($.validationEngineLanguage){allRules=$.validationEngineLanguage.allRules}else{allRules={required:{regex:"none",alertText:"* This field is required",alertTextCheckboxMultiple:"* Please select an option",alertTextCheckboxe:"* This checkbox is required"},length:{regex:"none",alertText:"* Between ",alertText2:" and ",alertText3:" characters allowed"},maxCheckbox:{regex:"none",alertText:"* Checks allowed Exceeded"},minCheckbox:{regex:"none",alertText:"* Please select ",alertText2:" options"},confirm:{regex:"none",alertText:"* Your field is not matching"},telephone:{regex:"/^[0-9-() ]+$/",alertText:"* Invalid phone number"},email:{regex:"/^[a-zA-Z0-9_.-]+@([a-zA-Z0-9-]+.)+[a-zA-Z0-9]{2,4}$/",alertText:"* Invalid email address"},date:{regex:"/^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$/",alertText:"* Invalid date, must be in YYYY-MM-DD format"},onlyNumber:{regex:"/^[0-9 ]+$/",alertText:"* Numbers only"},noSpecialCaracters:{regex:"/^[0-9a-zA-Z]+$/",alertText:"* No special caracters allowed"},ajaxUser:{file:"validateUser.php",alertTextOk:"* This user is available",alertTextLoad:"* Loading, please wait",alertText:"* This user is already taken"},ajaxName:{file:"validateUser.php",alertText:"* This name is already taken",alertTextOk:"* This name is available",alertTextLoad:"* Loading, please wait"},onlyLetter:{regex:"/^[a-zA-Z ']+$/",alertText:"* Letters only"}}}settings=jQuery.extend({allrules:allRules,inlineValidation:true,ajaxSubmit:false,promptPosition:"topRight",scrollTo:false,success:false,failure:function(){}},settings);$.validationEngine.ajaxValidArray=new Array();$(this).livequery("submit",function(caller){$.validationEngine.onSubmitValid=true;if($.validationEngine.submitValidation(this,settings)==false){if($.validationEngine.submitForm(this,settings)==true){return false}}else{settings.failure&&settings.failure();return false}});if(settings.inlineValidation==true){$(this).find("[class^=validate]").not("[type=checkbox]").bind("blur",function(caller){_inlinEvent(this)});$(this).find("[class^=validate][type=checkbox]").bind("click",function(caller){_inlinEvent(this)});function _inlinEvent(caller){if($.validationEngine.intercept==false||!$.validationEngine.intercept){$.validationEngine.onSubmitValid=false;$.validationEngine.loadValidation(caller,settings)}else{$.validationEngine.intercept=false}}}};$.validationEngine={submitForm:function(caller){if($.validationEngine.settings.ajaxSubmit){$.ajax({type:"POST",url:$.validationEngine.settings.ajaxSubmitFile,async:true,data:$(caller).serialize(),beforeSend:function(){},success:function(data){if(data=="true"){$(caller).css("opacity",1);$(caller).animate({opacity:0,height:0},function(){$(caller).css("display","none");$(caller).before("<div class='ajaxSubmit'>"+$.validationEngine.settings.ajaxSubmitMessage+"</div>");$.validationEngine.closePrompt(".formError",true);$(".ajaxSubmit").show("slow");if($.validationEngine.settings.success){$.validationEngine.settings.success&&$.validationEngine.settings.success();return false}})}else{data=eval("("+data+")");errorNumber=data.jsonValidateReturn.length;for(index=0;index<errorNumber;index++){fieldId=data.jsonValidateReturn[index][0];promptError=data.jsonValidateReturn[index][1];type=data.jsonValidateReturn[index][2];$.validationEngine.buildPrompt(fieldId,promptError,type)}}}});return true}if($.validationEngine.settings.success){$.validationEngine.settings.success&&$.validationEngine.settings.success(caller);return true}return false},buildPrompt:function(caller,promptText,type,ajaxed){var divFormError=document.createElement("div");var formErrorContent=document.createElement("div");linkTofield=$(caller).attr("id")+"formError";linkTofield=linkTofield.replace("[","");linkTofield=linkTofield.replace("]","");$(divFormError).addClass("formError");if(type=="pass"){$(divFormError).addClass("greenPopup")}if(type=="load"){$(divFormError).addClass("blackPopup")}if(ajaxed){$(divFormError).addClass("ajaxed")}$(divFormError).addClass(linkTofield);$(formErrorContent).addClass("formErrorContent");$("body").append(divFormError);$(divFormError).append(formErrorContent);if($.validationEngine.showTriangle!=false){var arrow=document.createElement("div");$(arrow).addClass("formErrorArrow");$(divFormError).append(arrow);if($.validationEngine.settings.promptPosition=="bottomLeft"||$.validationEngine.settings.promptPosition=="bottomRight"){$(arrow).addClass("formErrorArrowBottom");$(arrow).html('<div class="line1"><!-- --></div><div class="line2"><!-- --></div><div class="line3"><!-- --></div><div class="line4"><!-- --></div><div class="line5"><!-- --></div><div class="line6"><!-- --></div><div class="line7"><!-- --></div><div class="line8"><!-- --></div><div class="line9"><!-- --></div><div class="line10"><!-- --></div>')}if($.validationEngine.settings.promptPosition=="topLeft"||$.validationEngine.settings.promptPosition=="topRight"){$(divFormError).append(arrow);$(arrow).html('<div class="line10"><!-- --></div><div class="line9"><!-- --></div><div class="line8"><!-- --></div><div class="line7"><!-- --></div><div class="line6"><!-- --></div><div class="line5"><!-- --></div><div class="line4"><!-- --></div><div class="line3"><!-- --></div><div class="line2"><!-- --></div><div class="line1"><!-- --></div>')}}$(formErrorContent).html(promptText);callerTopPosition=$(caller).offset().top;callerleftPosition=$(caller).offset().left;callerWidth=$(caller).width();inputHeight=$(divFormError).height();if($.validationEngine.settings.promptPosition=="topRight"){callerleftPosition+=callerWidth-30;callerTopPosition+=-inputHeight-10}if($.validationEngine.settings.promptPosition=="topLeft"){callerTopPosition+=-inputHeight-10}if($.validationEngine.settings.promptPosition=="centerRight"){callerleftPosition+=callerWidth+13}if($.validationEngine.settings.promptPosition=="bottomLeft"){callerHeight=$(caller).height();callerleftPosition=callerleftPosition;callerTopPosition=callerTopPosition+callerHeight+15}if($.validationEngine.settings.promptPosition=="bottomRight"){callerHeight=$(caller).height();callerleftPosition+=callerWidth-30;callerTopPosition+=callerHeight+15}$(divFormError).css({top:callerTopPosition,left:callerleftPosition,opacity:0});setTimeout(function(){$.validationEngine.closePrompt(caller)},5000);return $(divFormError).animate({opacity:0.87},function(){return true})},updatePromptText:function(caller,promptText,type,ajaxed){linkTofield=$(caller).attr("id")+"formError";linkTofield=linkTofield.replace("[","");linkTofield=linkTofield.replace("]","");updateThisPrompt="."+linkTofield(type=="pass")?$(updateThisPrompt).addClass("greenPopup"):$(updateThisPrompt).removeClass("greenPopup");(type=="load")?$(updateThisPrompt).addClass("blackPopup"):$(updateThisPrompt).removeClass("blackPopup");(ajaxed)?$(updateThisPrompt).addClass("ajaxed"):$(updateThisPrompt).removeClass("ajaxed");$(updateThisPrompt).find(".formErrorContent").html(promptText);callerTopPosition=$(caller).offset().top;inputHeight=$(updateThisPrompt).height();if($.validationEngine.settings.promptPosition=="bottomLeft"||$.validationEngine.settings.promptPosition=="bottomRight"){callerHeight=$(caller).height();callerTopPosition=callerTopPosition+callerHeight+15}if($.validationEngine.settings.promptPosition=="centerRight"){callerleftPosition+=callerWidth+13}if($.validationEngine.settings.promptPosition=="topLeft"||$.validationEngine.settings.promptPosition=="topRight"){callerTopPosition=callerTopPosition-inputHeight-10}$(updateThisPrompt).animate({top:callerTopPosition})},loadValidation:function(caller,settings){$.validationEngine.settings=settings;rulesParsing=$(caller).attr("class");rulesRegExp=/\[(.*)\]/;getRules=rulesRegExp.exec(rulesParsing);str=getRules[1];pattern=/\W+/;result=str.split(pattern);var validateCalll=$.validationEngine.validateCall(caller,result);return validateCalll},validateCall:function(caller,rules){var promptText="";var prompt=$(caller).attr("id");var caller=caller;ajaxValidate=false;var callerName=$(caller).attr("name");$.validationEngine.isError=false;$.validationEngine.showTriangle=true;callerType=$(caller).attr("type");for(i=0;i<rules.length;i++){switch(rules[i]){case"optional":if(!$(caller).val()){$.validationEngine.closePrompt(caller);return $.validationEngine.isError}break;case"required":_required(caller,rules);break;case"custom":_customRegex(caller,rules,i);break;case"ajax":if(!$.validationEngine.onSubmitValid){_ajax(caller,rules,i)}break;case"length":_length(caller,rules,i);break;case"maxCheckbox":_maxCheckbox(caller,rules,i);groupname=$(caller).attr("name");caller=$("input[name='"+groupname+"']");break;case"minCheckbox":_minCheckbox(caller,rules,i);groupname=$(caller).attr("name");caller=$("input[name='"+groupname+"']");break;case"confirm":_confirm(caller,rules,i);break;default:}}var form=$(caller).closest("form");if($.validationEngine.isError==true){radioHackOpen();if($.validationEngine.isError==true){($("div."+prompt).size()==0)?$.validationEngine.buildPrompt(caller,promptText,"error"):$.validationEngine.updatePromptText(caller,promptText)}}else{radioHackClose();$.validationEngine.closePrompt(caller)}function radioHackOpen(){if($(form).find("input[name="+callerName+"]").size()>1&&callerType=="radio"){caller=$(form).find("input[name="+callerName+"]:first");$.validationEngine.showTriangle=true;var callerId="."+$(caller).attr("id");if($(callerId).size()==0){$.validationEngine.isError=true}else{$.validationEngine.isError=false}}if($(form).find("input[name="+callerName+"]").size()>1&&callerType=="checkbox"){caller=$(form).find("input[name="+callerName+"]:first");$.validationEngine.showTriangle=false;var callerId="div."+$(caller).attr("id");if($(callerId).size()==0){$.validationEngine.isError=true}else{$.validationEngine.isError=false}}}function radioHackClose(){if($(form).find("input[name="+callerName+"]").size()>1&&callerType=="radio"){caller=$(form).find("input[name="+callerName+"]:first")}if($(form).find("input[name="+callerName+"]").size()>1&&callerType=="checkbox"){caller=$(form).find("input[name="+callerName+"]:first")}}function _required(caller,rules){callerType=$(caller).attr("type");if(callerType=="text"||callerType=="password"||callerType=="textarea"){if(!$(caller).val()){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[rules[i]].alertText+"<br />"}}if(callerType=="radio"||callerType=="checkbox"){callerName=$(caller).attr("name");form=$(caller).closest("form");if($(form).find("input[name="+callerName+"]:checked").size()==0){$.validationEngine.isError=true;if($(form).find("input[name="+callerName+"]").size()==1){promptText+=$.validationEngine.settings.allrules[rules[i]].alertTextCheckboxe+"<br />"}else{promptText+=$.validationEngine.settings.allrules[rules[i]].alertTextCheckboxMultiple+"<br />"}}}if(callerType=="select-one"){callerName=$(caller).attr("id");if(!$(form).find("select[name="+callerName+"]").val()){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[rules[i]].alertText+"<br />"}}if(callerType=="select-multiple"){callerName=$(caller).attr("id");if(!$("#"+callerName).val()){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[rules[i]].alertText+"<br />"}}}function _customRegex(caller,rules,position){customRule=rules[position+1];pattern=eval($.validationEngine.settings.allrules[customRule].regex);if(!pattern.test($(caller).attr("value"))){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules[customRule].alertText+"<br />"}}function _ajax(caller,rules,position){customAjaxRule=rules[position+1];postfile=$.validationEngine.settings.allrules[customAjaxRule].file;fieldValue=$(caller).val();ajaxCaller=caller;fieldId=$(caller).attr("id");ajaxValidate=true;ajaxisError=$.validationEngine.isError;if(!ajaxisError){$.ajax({type:"POST",url:postfile,async:true,data:"validateValue="+fieldValue+"&validateId="+fieldId+"&validateError="+customAjaxRule,beforeSend:function(){if($.validationEngine.settings.allrules[customAjaxRule].alertTextLoad){if(!$("div."+fieldId)[0]){return $.validationEngine.buildPrompt(ajaxCaller,$.validationEngine.settings.allrules[customAjaxRule].alertTextLoad,"load")}else{$.validationEngine.updatePromptText(ajaxCaller,$.validationEngine.settings.allrules[customAjaxRule].alertTextLoad,"load")}}},success:function(data){data=eval("("+data+")");ajaxisError=data.jsonValidateReturn[2];customAjaxRule=data.jsonValidateReturn[1];ajaxCaller=$("#"+data.jsonValidateReturn[0])[0];fieldId=ajaxCaller;ajaxErrorLength=$.validationEngine.ajaxValidArray.length;existInarray=false;if(ajaxisError=="false"){_checkInArray(false);if(!existInarray){$.validationEngine.ajaxValidArray[ajaxErrorLength]=new Array(2);$.validationEngine.ajaxValidArray[ajaxErrorLength][0]=fieldId;$.validationEngine.ajaxValidArray[ajaxErrorLength][1]=false;existInarray=false}$.validationEngine.ajaxValid=false;promptText+=$.validationEngine.settings.allrules[customAjaxRule].alertText+"<br />";$.validationEngine.updatePromptText(ajaxCaller,promptText,"",true)}else{_checkInArray(true);$.validationEngine.ajaxValid=true;if($.validationEngine.settings.allrules[customAjaxRule].alertTextOk){$.validationEngine.updatePromptText(ajaxCaller,$.validationEngine.settings.allrules[customAjaxRule].alertTextOk,"pass",true)}else{ajaxValidate=false;$.validationEngine.closePrompt(ajaxCaller)}}function _checkInArray(validate){for(x=0;x<ajaxErrorLength;x++){if($.validationEngine.ajaxValidArray[x][0]==fieldId){$.validationEngine.ajaxValidArray[x][1]=validate;existInarray=true}}}}})}}function _confirm(caller,rules,position){confirmField=rules[position+1];if($(caller).attr("value")!=$("#"+confirmField).attr("value")){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules.confirm.alertText+"<br />"}}function _length(caller,rules,position){startLength=eval(rules[position+1]);endLength=eval(rules[position+2]);feildLength=$(caller).attr("value").length;if(feildLength<startLength||feildLength>endLength){$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules.length.alertText+startLength+$.validationEngine.settings.allrules.length.alertText2+endLength+$.validationEngine.settings.allrules.length.alertText3+"<br />"}}function _maxCheckbox(caller,rules,position){nbCheck=eval(rules[position+1]);groupname=$(caller).attr("name");groupSize=$("input[name='"+groupname+"']:checked").size();if(groupSize>nbCheck){$.validationEngine.showTriangle=false;$.validationEngine.isError=true;promptText+=$.validationEngine.settings.allrules.maxCheckbox.alertText+"<br />"}}function _minCheckbox(caller,rules,position){nbCheck=eval(rules[position+1]);groupname=$(caller).attr("name");groupSize=$(form).find("input[name='"+groupname+"']:checked").size();if(groupSize<nbCheck){$.validationEngine.isError=true;$.validationEngine.showTriangle=false;promptText+=$.validationEngine.settings.allrules.minCheckbox.alertText+" "+nbCheck+" "+$.validationEngine.settings.allrules.minCheckbox.alertText2+"<br />"}}return($.validationEngine.isError)?$.validationEngine.isError:false},closePrompt:function(caller,outside){if(outside){$(caller).fadeTo("fast",0,function(){$(caller).remove()});return false}if(ajaxValidate==undefined||!ajaxValidate){linkTofield=$(caller).attr("id")+"formError";linkTofield=linkTofield.replace("[","");linkTofield=linkTofield.replace("]","");closingPrompt="."+linkTofield;$(closingPrompt).fadeTo("fast",0,function(){$(closingPrompt).remove()})}},submitValidation:function(caller,settings){var stopForm=false;$.validationEngine.settings=settings;$.validationEngine.ajaxValid=true;$(caller).find(".formError").remove();var toValidateSize=$(caller).find("[class^=validate]").size();$(caller).find("[class^=validate]").each(function(){callerId=$(this).attr("id");if(!$("."+callerId).hasClass("ajaxed")){var validationPass=$.validationEngine.loadValidation(this,settings);return(validationPass)?stopForm=true:""}});ajaxErrorLength=$.validationEngine.ajaxValidArray.length;for(x=0;x<ajaxErrorLength;x++){if($.validationEngine.ajaxValidArray[x][1]==false){$.validationEngine.ajaxValid=false}}if(stopForm||!$.validationEngine.ajaxValid){if(settings.scrollTo){destination=$(".formError:not('.greenPopup'):first").offset().top;$("html:not(:animated),body:not(:animated)").animate({scrollTop:destination},1100)}return true}else{return false}}}})(jQuery);(function(E,V){var AC,U=V.location,Y=Array.prototype.slice,R=decodeURIComponent,AI=E.param,AG,Z,K,AH=E.bbq=E.bbq||{},T,L,AB,AE=E.event.special,AF="hashchange",F="querystring",P="fragment",H="elemUrlAttr",AA="href",N="src",I=/^.*\?|#.*$/g,J=/^.*\#/,Q={};function M(A){return typeof A==="string"}function S(A){var B=Y.call(arguments,1);return function(){return A.apply(this,B.concat(Y.call(arguments)))}}function X(A){return A.replace(/^[^#]*#?(.*)$/,"$1")}function W(A){return A.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function AD(d,C,f,c,e){var A,D,a,B,b;if(c!==AC){a=f.match(d?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);b=a[3]||"";if(e===2&&M(c)){D=c.replace(d?J:I,"")}else{B=Z(a[2]);c=M(c)?Z[d?P:F](c):c;D=e===2?c:e===1?E.extend({},c,B):E.extend({},B,c);D=AI(D)}A=a[1]+(d?"#":D||!a[1]?"?":"")+D+b}else{A=C(f!==AC?f:U[AA])}return A}AI[F]=S(AD,0,W);AI[P]=AG=S(AD,1,X);E.deparam=Z=function(A,D){var B={},C={"true":!0,"false":!1,"null":null};E.each(A.replace(/\+/g," ").split("&"),function(g,b){var h=b.split("="),c=R(h[0]),j,d=B,f=0,a=c.split("]["),e=a.length-1;if(/\[/.test(a[0])&&/\]$/.test(a[e])){a[e]=a[e].replace(/\]$/,"");a=a.shift().split("[").concat(a);e=a.length-1}else{e=0}if(h.length===2){j=R(h[1]);if(D){j=j&&!isNaN(j)?+j:j==="undefined"?AC:C[j]!==AC?C[j]:j}if(e){for(;f<=e;f++){c=a[f]===""?d.length:a[f];d=d[c]=f<e?d[c]||(a[f+1]&&isNaN(a[f+1])?{}:[]):j}}else{if(E.isArray(B[c])){B[c].push(j)}else{if(B[c]!==AC){B[c]=[B[c],j]}else{B[c]=j}}}}else{if(c){B[c]=D?AC:""}}});return B};function G(A,C,B){if(C===AC||typeof C==="boolean"){B=C;C=AI[A?P:F]()}else{C=M(C)?C.replace(A?J:I,""):C}return Z(C,B)}Z[F]=S(G,0);Z[P]=K=S(G,1);E[H]||(E[H]=function(A){return E.extend(Q,A)})({a:AA,base:AA,iframe:N,img:N,input:N,form:"action",link:AA,script:N});AB=E[H];function O(A,C,B,D){if(!M(B)&&typeof B!=="object"){D=B;B=C;C=AC}return this.each(function(){var a=E(this),c=C||AB()[(this.nodeName||"").toLowerCase()]||"",b=c&&a.attr(c)||"";a.attr(c,AI[A](b,B,D))})}E.fn[F]=S(O,F);E.fn[P]=S(O,P);AH.pushState=T=function(A,D){if(M(A)&&/^#/.test(A)&&D===AC){D=2}var B=A!==AC,C=AG(U[AA],B?A:{},B?D:2);U[AA]=C+(/#/.test(C)?"":"#")};AH.getState=L=function(B,A){return B===AC||typeof B==="boolean"?K(B):K(A)[B]};AH.removeState=function(B){var A={};if(B!==AC){A=L();E.each(E.isArray(B)?B:arguments,function(C,D){delete A[D]})}T(A,2)};AE[AF]=E.extend(AE[AF],{add:function(C,A,B){return function(D){var a=D[P]=AG();D.getState=function(c,b){return c===AC||typeof c==="boolean"?Z(a,c):Z(a,b)[c]};C.apply(this,arguments)}}})})(jQuery,this);(function(C,D,K){var E=D.location,B,A=C.event.special,J="hashchange",H=C.browser,G=document.documentMode,F=H.msie&&(G===K||G<8),I="on"+J in D&&!F;function L(M){M=M||E.href;return M.replace(/^[^#]*#?(.*)$/,"$1")}C[J+"Delay"]=100;A[J]=C.extend(A[J],{setup:function(){if(I){return false}B.start()},teardown:function(){if(I){return false}B.stop()}});B=(function(){var N={},O,M,R,P;function Q(){R=P=function(S){return S};if(F){M=C('<iframe src="javascript:0"/>').hide().appendTo("body")[0].contentWindow;P=function(){return L(M.document.location.href)};R=function(S,U){if(S!==U){var T=M.document;T.open().close();T.location.hash="#"+S}};R(L())}}N.start=function(){if(O){return }var S=L();R||Q();(function T(){var U=L(),V=P(S);if(U!==S){R(S=U,V);C(D).trigger(J)}else{if(V!==S){E.href=E.href.replace(/#.*/,"")+"#"+V}}O=setTimeout(T,C[J+"Delay"])})()};N.stop=function(){if(!M){O&&clearTimeout(O);O=0}};return N})()})(jQuery,this);(function(D){D.timeago=function(G){if(G instanceof Date){return A(G)}else{if(typeof G=="string"){return A(D.timeago.parse(G))}else{return A(D.timeago.datetime(G))}}};var F=D.timeago;D.extend(D.timeago,{settings:{refreshMillis:60000,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(L){var M=this.settings.strings;var I=M.prefixAgo;var Q=M.suffixAgo;if(this.settings.allowFuture){if(L<0){I=M.prefixFromNow;Q=M.suffixFromNow}L=Math.abs(L)}var O=L/1000;var G=O/60;var N=G/60;var P=N/24;var J=P/365;function H(R,T){var S=D.isFunction(R)?R(T):R;var U=(M.numbers&&M.numbers[T])||T;return S.replace(/%d/i,U)}var K=O<45&&H(M.seconds,Math.round(O))||O<90&&H(M.minute,1)||G<45&&H(M.minutes,Math.round(G))||G<90&&H(M.hour,1)||N<24&&H(M.hours,Math.round(N))||N<48&&H(M.day,1)||P<30&&H(M.days,Math.floor(P))||P<60&&H(M.month,1)||P<365&&H(M.months,Math.floor(P/30))||J<2&&H(M.year,1)||H(M.years,Math.floor(J));return D.trim([I,K,Q].join(" "))},parse:function(H){var G=D.trim(H);G=G.replace(/\.\d\d\d/,"");G=G.replace(/-/,"/").replace(/-/,"/");G=G.replace(/T/," ").replace(/Z/," UTC");G=G.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2");return new Date(G)},datetime:function(H){var I=D(H).get(0).tagName.toLowerCase()=="time";var G=I?D(H).attr("datetime"):D(H).attr("title");return F.parse(G)}});D.fn.timeago=function(){var H=this;H.each(C);var G=F.settings;if(G.refreshMillis>0){setInterval(function(){H.each(C)},G.refreshMillis)}return H};function C(){var G=B(this);if(!isNaN(G.datetime)){D(this).text(A(G.datetime))}return this}function B(G){G=D(G);if(!G.data("timeago")){G.data("timeago",{datetime:F.datetime(G)});var H=D.trim(G.text());if(H.length>0){G.attr("title",H)}}return G.data("timeago")}function A(G){return F.inWords(E(G))}function E(G){return(new Date().getTime()-G.getTime())}document.createElement("abbr");document.createElement("time")})(jQuery);(function(A){A.cookie=A.cookie||function(E,F,C){if(arguments.length>1&&String(F)!=="[object Object]"){C=A.extend({},C);if(F===null||F===undefined){C.expires=-1}if(typeof C.expires==="number"){var H=C.expires,D=C.expires=new Date();D.setDate(D.getDate()+H)}F=String(F);return(document.cookie=[encodeURIComponent(E),"=",C.raw?F:encodeURIComponent(F),C.expires?"; expires="+C.expires.toUTCString():"",C.path?"; path="+C.path:"",C.domain?"; domain="+C.domain:"",C.secure?"; secure":""].join(""))}C=F||{};var B,G=C.raw?function(I){return I}:decodeURIComponent;return(B=new RegExp("(?:^|; )"+encodeURIComponent(E)+"=([^;]*)").exec(document.cookie))?G(B[1]):null}})(jQuery);
/*
 * jQuery Expander Plugin v1.3
 *
 * Date: Sat Sep 17 00:37:34 2011 EDT
 * Requires: jQuery v1.3+
 *
 * Copyright 2011, Karl Swedberg
 * Dual licensed under the MIT and GPL licenses (just like jQuery):
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
*/
(function(A){A.expander={version:"1.3",defaults:{slicePoint:100,slicePointHalf:false,preserveWords:true,preserveParenthesis:false,widow:4,expandText:"read more",expandPrefix:"&hellip; ",summaryClass:"summary",detailClass:"details",moreClass:"read-more",lessClass:"read-less",collapseTimer:0,expandEffect:"fadeIn",expandSpeed:250,collapseEffect:"fadeOut",collapseSpeed:200,userCollapse:true,userCollapseText:"read less",userCollapsePrefix:" ",onSlice:null,beforeExpand:null,afterExpand:null,onCollapse:null}};A.fn.expander=function(P){var B=A.extend({},A.expander.defaults,P),D=/^<(?:area|br|col|embed|hr|img|input|link|meta|param).*>$/i,J=/((?:&(?:[^;]+;)?|[\w\-]+)(?:(?:(?:;|,|\:)\s*)?))$/,M=/(\([^\)]*)$/,I=/<\/?(\w+)[^>]*>/g,F=/<(\w+)[^>]*>/g,K=/<\/(\w+)>/g,L=/^<[^>]+>.?/,N;this.each(function(){var p,n,w,X,s,h,S,y,v,k,q,V=[],f=[],W={},u=this,a=A(this),Y=A([]),m=A.meta?A.extend({},B,a.data()):B,R=!!a.find("."+m.detailClass).length,b=!!a.find("*").filter(function(){var l=A(this).css("display");return(/^block|table|list/).test(l)}).length,U=b?"div":"span",d=U+"."+m.detailClass,j="span."+m.moreClass,Q=m.expandSpeed||0,Z=A.trim(a.html()),c=A.trim(a.text()),z=m.slicePointHalf?Math.min(Math.floor(c.length/2),m.slicePoint):m.slicePoint,e=Z.slice(0,z);if(A.data(this,"expander")){return }A.data(this,"expander",true);A.each(["onSlice","beforeExpand","afterExpand","onCollapse"],function(l,o){W[o]=A.isFunction(m[o])});e=H(e);summTagless=e.replace(I,"").length;while(summTagless<z){newChar=Z.charAt(e.length);if(newChar=="<"){newChar=Z.slice(e.length).match(L)[0]}e+=newChar;summTagless++}do{v=e;e=H(v,m.preserveWords,m.preserveParenthesis)}while(v!=e);s=e.match(F)||[];h=e.match(K)||[];w=[];A.each(s,function(l,o){if(!D.test(o)){w.push(o)}});s=w;n=h.length;for(p=0;p<n;p++){h[p]=h[p].replace(K,"$1")}A.each(s,function(l,AB){var o=AB.replace(F,"$1");var AA=A.inArray(o,h);if(AA===-1){V.push(AB);f.push("</"+o+">")}else{h.splice(AA,1)}});f.reverse();if(!R){y=Z.slice(e.length);if(y.split(/\s+/).length<m.widow&&!R){return }S=f.pop()||"";e+=f.join("");y=V.join("")+y}else{y=a.find(d).remove().html();e=a.html();Z=e+y;S=""}m.moreLabel=a.find(j).length?"":O(m);if(b){y=Z}e+=S;m.summary=e;m.details=y;m.lastCloseTag=S;if(W.onSlice){w=m.onSlice.call(u,m);m=w&&w.details?w:m}var g=E(m,b);a.html(g);k=a.find(d);q=a.find(j);k.hide();q.find("a").unbind("click.expander").bind("click.expander",T);Y=a.find("div."+m.summaryClass);if(m.userCollapse&&!a.find("span."+m.lessClass).length){a.find(d).append('<span class="'+m.lessClass+'">'+m.userCollapsePrefix+'<a href="#">'+m.userCollapseText+"</a></span>")}a.find("span."+m.lessClass+" a").unbind("click.expander").bind("click.expander",function(l){l.preventDefault();clearTimeout(N);var o=A(this).closest(d);C(m,o);if(W.onCollapse){m.onCollapse.call(u,true)}});function T(l){l.preventDefault();q.hide();Y.hide();if(W.beforeExpand){m.beforeExpand.call(u)}k.stop(false,true)[m.expandEffect](Q,function(){k.css({zoom:""});if(W.afterExpand){m.afterExpand.call(u)}G(m,k,u)})}});function E(T,S){var R="span",Q=T.summary;if(S){R="div";Q=Q.replace(/(<\/[^>]+>)\s*$/,T.moreLabel+"$1");Q='<div class="'+T.summaryClass+'">'+Q+"</div>"}else{Q+=T.moreLabel}return[Q,"<",R+' class="'+T.detailClass+'"',">",T.details,"</"+R+">"].join("")}function O(R){var Q='<span class="'+R.moreClass+'">'+R.expandPrefix;Q+='<a href="#">'+R.expandText+"</a></span>";return Q}function H(Q,S,R){if(Q.lastIndexOf("<")>Q.lastIndexOf(">")){Q=Q.slice(0,Q.lastIndexOf("<"))}if(S){Q=Q.replace(J,"")}if(R){Q=Q.replace(M,"")}return Q}function C(R,Q){Q.stop(true,true)[R.collapseEffect](R.collapseSpeed,function(){var S=Q.prev("span."+R.moreClass).show();if(!S.length){Q.parent().children("div."+R.summaryClass).show().find("span."+R.moreClass).show()}})}function G(R,Q,S){if(R.collapseTimer){N=setTimeout(function(){C(R,Q);if(A.isFunction(R.onCollapse)){R.onCollapse.call(S,false)}},R.collapseTimer)}}return this};A.fn.expander.defaults=A.expander.defaults})(jQuery);function hideElement(A){if(A.length<1){return }document.getElementById(A).style.display="none"}function showElement(A){if(A.length<1){return }document.getElementById(A).style.display="block"}function isElementHidden(A){if(A.length<1){return true}if(document.getElementById(A).style.display=="none"){return true}else{return false}}function toggleElement(A){if(A.length<1){return }if(isElementHidden(A)){showElement(A)}else{hideElement(A)}}function setAllCheckboxes(C,B){for(var A=0;A<C.length;A++){if(C[A].type=="checkbox"){C[A].checked=B}}}function areAllCheckboxesUnchecked(B){for(var A=0;A<B.length;A++){if(B[A].type=="checkbox"){if(B[A].checked==true){return false}}}return true}function popUpWindow(B,C,A){window.open(B,"newPopUpWindow","width="+C+",height="+A+",scrollbars=1,location=true,status=true")}function toggleElementBySelect(C,A,D,B){if($("#"+C+" option:selected").val()==D){if(B>0){$("#"+A).slideDown(B)}else{$("#"+A).show()}}else{if(B>0){$("#"+A).slideUp(B)}else{$("#"+A).hide()}}}$(function(){jQuery.subscribe=function(C,D,E){$(window).bind(C,function(){D[E].apply(D,Array.prototype.slice.call(arguments,1))});return jQuery};jQuery.publish=function(C){$(window).trigger(C,Array.prototype.slice.call(arguments,1));return jQuery};$("#combinedSearchForm select").change(function(){var C=$(this).closest("form");var E=$(this).val();C.attr("action",C.attr("action").replace(/search\/.*/,"search/"+E));var D=$(C).find(":input[name=query]");if($.trim(D.val())!=""){C.submit()}});$('#homeSearchForm input[type="radio"]').change(function(){if("input:checked"){var C=$(this).closest("form");var E=$(this).val();C.attr("action",C.attr("action").replace(/search\/.*/,"search/"+E));var D=$(C).find(":input[name=query]");if($.trim(D.val())!=""){C.submit()}}});$("a[rel*=facebox]").livequery(function(){$(this).facebox()});$("a[rel*=f1000box]").not("[data-opacity]").f1000box();$("a[rel*=f1000box]").filter("[data-opacity]").each(function(){var C=$(this).attr("data-opacity");$(this).f1000box({opacity:$(this).attr("data-opacity"),overlay:C==0&&$.browser.msie&&/^7\./.test($.browser.version)?false:true})});$('#email-articles-link[rel="f1000box"]').bind("beforeReveal.f1000box",function(){if($(this).data("input")){$.each($(this).data("input"),function(C,D){$(".emailArticleForm :input[name="+D.name+"]").val(D.value)});$(".emailArticleForm").find(".inputError").remove();if($("img[name=captchaImage]")){new CaptchaHelper().clearInput().setNewChallengeImage()}}else{$(this).data("input",$(".emailArticleForm :input:not([type='hidden']):not(:submit)").serializeArray())}});$(document).bind("reveal.facebox",function(){var C=$("#facebox :input[type!=hidden]");if(C.length>0){C[0].focus()}var D=$("img[name=captchaImage]");if(D){new CaptchaHelper().clearInput().setNewChallengeImage()}});$("#facebox").livequery(function(){$(this).bgiframe()});$(".dropDownNavigator").change(function(E){var G=$(E.target);var C=G.attr("name");var D=G.val();var F=$.deparam.querystring();F[C]=D;window.location=window.location.pathname+"?"+$.param(F)});$(".f1000Expander.initiallyOpen").tabs({collapsible:true});$(".f1000Expander:not(.initiallyOpen)").tabs({collapsible:true,selected:-1});$(".datePicker").datepicker({dateFormat:"dd MM yy",changeYear:true,showAnim:"slideDown"});$(".ui-datepicker").wrap('<div class="ui-blitzer" />');var B=function(){$(this).before('<a class="clearMultiselect">clear</a>')};var A=function(C,D){$("#advancedSearch").load("/advancedsearch/"+C,function(){$("#advancedSearch select[multiple=true]").each(B);if(D){D()}})};$("#advancedSearchLink").click(function(C){var E=$("#combinedSearchForm select option[data-refinable=true]")[0].value;var D=$("#combinedSearchForm select :selected");if(D.attr("data-refinable")=="true"){E=D.val()}var F=function(){$("#advancedSearch").toggle();$("#advancedSearch input[name='query']").val($("#combinedSearchForm input[name='query']").val())};if($("#advancedSearch").is(":empty")){A(E,F)}else{F()}C.preventDefault()});$("#cancelAdvancedSearchLink").live("click",function(C){$("#advancedSearch").toggle();C.preventDefault()});$("#advancedSearchHomeLink").click(function(C){var D=function(){$("#advancedSearch").toggle();$("#advancedSearch input[name='query']").val($("#homeSearchForm input[name='query']").val())};if($("#advancedSearch").is(":empty")){A("evaluations",D)}else{D()}C.preventDefault()});$("#cancelAdvancedSearcTopLink").live("click",function(C){$("#advancedSearch").toggle();C.preventDefault()});$(document).click(function(C){if(!$(C.target).parents().add(C.target).is("#advancedSearch,#advancedSearchLink,#advancedSearchHomeLink")){$("#advancedSearch").hide()}});$("#refineSearch select[multiple=true]").each(B);$(".clearMultiselect").live("click",function(){$(this).siblings("select").children().each(function(){$(this).attr("selected",false)})});$("#advancedSearch .domain").livequery("change",function(){A($(this).attr("value"))});$(".articleFactor").live("click",function(){jQuery.facebox('The F1000 article factor (FFa) is calculated from the highest rating awarded by a Faculty Member (FM) plus an increment for each additional rating from other FMs.<br/>Read more in our <a href="/about/whatis/factors">About section</a>.',"ffaDescription")});$("#print-articles-link").click(function(C){C.preventDefault();window.print()})});$(function(){$("input#jumpToJournalTextbox").autocomplete({source:function(C,B){var D=typeof autocompleteUrl!="undefined"?autocompleteUrl:new Date().getFullYear();$.ajax({url:"/remoting/search/journals/year/"+D,dataType:"json",data:{query:C.term,limit:10},success:function(E){B($.map(E,function(F){return{label:F.name,value:F.abbreviation,id:F.id}}))}})},matchSubset:false});$("#jumpToJournalTextbox").bind("focus",function(){if($(this).val()=="Jump to a Journal"){$(this).val("")}});$("#jumpToJournalTextbox").bind("autocompleteselect",function(D,E){$(this).val(E.item.value);var B=$(this).val();var C=E.item.id;if(C>=0){window.location.href=A(window.location.href)+"?journal="+B+"#"+C}});if($("#jumpToJournalTextbox").length>0){$("#jumpToJournalTextbox").data("autocomplete")._renderItem=function(B,C){if(C.id==-1){$(B).addClass("ui-autocomplete-disabled")}else{$(B).removeClass("ui-autocomplete-disabled")}return $("<li></li>").data("item.autocomplete",C).append("<a>"+C.label+"</a>").appendTo(B)}}function A(C){var B=/\?.+/;return C.replace(B,"")}});function CaptchaHelper(){function B(){$("input[name=captchaUserInput]").attr("value","");return this}function A(){$("img[name=captchaImage]").attr("src","/jcaptcha?currentDate="+new Date().getTime());return this}return{clearInput:B,setNewChallengeImage:A}}function isInteger(A){return !isNaN(A)&&parseInt(A)==A}function CookieTracker(L){var C="track_id",I="JSESSIONID",F="JSESSIONIDuser";var J=$.cookie(C);var K=$.cookie(I);var D=$.cookie(F);function B(N,M){$.cookie(C,N,M);J=$.cookie(C)}function G(N,M){$.cookie(F,N,M);D=$.cookie(F)}function E(){$.ajax({url:"/tracking/getid",dataType:"json",type:"POST",data:{sessionid:K},success:function(M){if(M.status=="success"){B(M.trackingId,{expires:365*10,path:"/"});if(L&&D===null){G(K,{path:"/"});A()}if(typeof ArticleExpander=="object"){ArticleExpander.clearPendingTracking()}H()}}})}function A(){$.ajax({url:"/tracking/associate",dataType:"json",type:"POST",data:{sessionid:K,trackingid:J},success:function(M){if(M.status=="success"){if(M.trackingId!=J){B(M.trackingId,{expires:365*10,path:"/"})}}}})}function H(){var M=window.location.search.match(/(\?|&)emailType=([^&]+)/);if(J!==null&&M){$.ajax({url:"/remote/1.0/tracking/email",type:"GET",data:{emailType:unescape(M[2]),trackingId:J}})}}(function(){if(J===null){E()}else{if(L&&D===null){G(K,{path:"/"});A()}}H()})();return{}}var ArticleTabs=(function(){var L=false;var B;var J=false;var G="#related-articles-content";var O=[];function I(P){if(P&&P.jquery&&P.parent("li").hasClass("tab-selected")){if($(P.attr("href")+"-content:visible").length){return true}else{return false}}else{return false}}function N(P){var P=new Date(P);return P.getDate()+" "+P.getMonthName().substr(0,3)+" "+P.getFullYear()}function A(R,T){var S="";for(var Q in R){S+='<a href="/'+T+"#eval"+R[Q].evaluationId+'">';for(var P in R[Q].coevaluators){S+=(R[Q].coevaluators[P].firstName?R[Q].coevaluators[P].firstName:"")+" ";S+=(R[Q].coevaluators[P].middleInitials?R[Q].coevaluators[P].middleInitials:"")+" ";S+=(R[Q].coevaluators[P].lastName?R[Q].coevaluators[P].lastName:"");if(P==R[Q].coevaluators.length-1){S+=" and "}else{S+=", "}}S+=(R[Q].firstName?R[Q].firstName:"")+" ";S+=(R[Q].middleInitials?R[Q].middleInitials:"")+" ";S+=(R[Q].lastName?R[Q].lastName:"")+"</a> ";if(R[Q].newEvaluation){S+='<span class="new" title="Added in the past 7 days">new</span> '}if(Q==0){S+='<span class="evaluation-date">'+N(R[Q].publishDate)+"</span> "}if(Q!=R.length-1){S+=" | "}}return S}function F(f){$(G+" .loading").fadeOut(300);if(f.length){var P=$("<form>").attr("id","selectedArticlesForm");var T=$("<ol>").addClass("evaluatedArticleSummaryList");for(var c in f){var U=$("<li>");U.append('<div class="articleFactor" title="F1000 Article Factor: &#10;Recommended (6-7), &#10;Must Read (8-9), &#10;Exceptional (10+)">'+f[c].article.factor+"</div>");var R=$("<div>").addClass("articleDetails");R.append('<a class="title" href="/'+f[c].article.id+'">'+f[c].article.title+"</a>");var Y=$("<p>").addClass("authors-publication");var V="";for(var a in f[c].article.authors){V+=f[c].article.authors[a].lastName+" "+f[c].article.authors[a].initials+", "}V='<span class="authors">'+V.substr(0,V.length-2)+".</span> ";Y.append(V);var e=$("<span>").addClass("publication");e.append('<span class="journalname">'+f[c].article.journalTitle+".</span> ");e.append('<span class="pubdate">'+f[c].article.pubDate+"</span>");if(f[c].article.volume||f[c].article.issue){e.append('; <span class="volume">'+f[c].article.volume+"</span>");if(f[c].article.issue){e.append('(<span class="issue">'+f[c].article.issue+"</span>)")}}if(f[c].article.firstPage||f[c].article.lastPage){e.append(':<span class="fpage">'+f[c].article.firstPage+"</span>");if(f[c].article.lastPage){e.append('-<span class="lpage">'+f[c].article.lastPage+"</span>")}}Y.append(e);R.append(Y);var Q=$("<p>").addClass("links");if(f[c].article.pubMedId&&f[c].article.pubMedId!=""){Q.append('<a href="/'+f[c].article.id+'#abstract">Abstract</a>');Q.append(' | <a href="/'+f[c].article.id+'#related-articles" class="related-articles">Related Evaluated Articles</a>')}else{Q.append('<a class="grayedOutLink">Abstract</a>');Q.append(' | <a class="grayedOutLink related-articles">Related Evaluated Articles</a>')}R.append(Q);var X=$("<p>").addClass("evaluators-count");X.append('<a href="/'+f[c].article.id+'#evaluations">'+f[c].evaluators.length+" Evaluation"+(f[c].evaluators.length>1?"s":"")+"</a>");R.append(X);var h=$("<p>").addClass("evaluators");var g=A(f[c].evaluators,f[c].article.id);h.append(g);R.append(h);if(f[c].dissentors.length){var Z=$("<p>").addClass("dissenters-count");Z.append('<a href="/'+f[c].article.id+'#dissents">'+f[c].dissentors.length+" Dissent"+(f[c].dissentors.length>1?"s":"")+"</a>");R.append(Z);var b=$("<p>").addClass("dissenters");var W=A(f[c].dissentors,f[c].article.id);b.append(W);R.append(b)}if(f[c].commentsCount){var d=$("<p>").addClass("evaluators-count");d.append('<a href="/'+f[c].article.id+'#comments">'+f[c].commentsCount+" Dissent"+(f[c].commentsCount>1?"s":"")+"</a>");R.append(d)}var k=$("<div>").addClass("links-classifications");var S="<ul>";for(var a in f[c].article.paperTypes){S+="<li>"+f[c].article.paperTypes[a].toLowerCase().replace(/_/g," ").replace(/(^|\s)([a-z])/g,function(j,n,l){return n+l.toUpperCase()})+"</li>"}S+="</ul>";k.append(S);R.append(k);U.append(R);T.append(U)}P.append(T);$(G).append(P)}else{$(G).append('<p class="noResults">There are currently no Related Evaluated Articles.</p>')}}function M(P){if(J||P!=G){return }J=true;$(G).ajaxSend(function(Q,S,R){if(R.url=="/relatedArticles/"+B){$(this).append("<div class='loading'></div>")}});$.ajax({url:"/relatedArticles/"+B,dataType:"json",type:"GET",success:F,error:function(){$(G+" .loading").fadeOut(300)}})}function H(P){var P=P.attr("href");if(/^#[a-z\-]+$/.test(P)&&$.inArray(P,O)<0){_gaq=_gaq||[];_gaq.push(["_trackEvent","Articles","Tabs",P.replace(/^#/,""),null,true]);O.push(P)}}function E(Q){if(Q&&Q.jquery){var P=Q.attr("href")+"-content";var R=Q.parent("li");R.siblings("li").removeClass("tab-selected");R.addClass("tab-selected");M(P);$("#tabs a").each(function(){$($(this).attr("href")+"-content:visible").fadeOut(200,function(){$(P).fadeIn(200);D()})});H(Q)}}function C(){var Q=window.location.hash;if(/^#comment-(\d+)$/.test(Q)){Q="#comments"}var P=$('#tabs li a[href="'+Q+'"]');if(Q.length&&P.length){$("#tabs li.tab-selected").removeClass("tab-selected");P.parent("li").addClass("tab-selected");H(P)}else{H($("#tabs li.tab-selected a"))}M($("#tabs li.tab-selected a").attr("href")+"-content");$("#tabs li:not(.tab-selected) a").each(function(){$($(this).attr("href")+"-content:visible").hide()})}function D(){var P=$(".aside").outerHeight()-$("#tabs").outerHeight()-$("#article").outerHeight()-$("#breadcrumbs").outerHeight()-50;$("#tabs-content").css("min-height",P)}function K(P){if(L){return }B=P;C();D();$("#tabs a").click(function(Q){if(I($(this))){return }else{E($(this))}});$(window).bind("hashchange",function(){var R=window.location.hash;if(/^#comment-(\d+)$/.test(R)){R="#comments"}else{if(R==""){R="#evaluations"}}var Q=$('#tabs li a[href="'+R+'"]');if(R.length&&Q.length){if(!I(Q)){E(Q)}}});L=true}return{tabs:K,adjustHeight:D}})();var ArticleExpander=(function(){var I=false;var B=false;var H=[];var K=[];var J=null;function D(){$("#evaluations-content").prepend('<div class="expand-hide"><a href="" id="expand-all">Expand All</a><a href="" id="hide-all">Hide All</a></div>');B=true}function F(){if(J!==null){return J}else{return(J=$.cookie("track_id"))}}function C(M,N){if($.inArray(M,N)<0){N.push(M)}}function G(M,N){if($.inArray(M,N)>=0){N.splice($.inArray(M,N),1)}}function E(N){var M=F();if(M!==null){C(N,H);$.ajax({url:"/evaluation/tracking",dataType:"json",type:"POST",data:{evaluationid:N,trackingid:M},success:function(O){if(O=="SUCCESS"){G(N,K)}else{G(N,H);C(N,K)}},error:function(){G(N,H);C(N,K)}})}else{C(N,K)}}function A(){if(K.length){for(var M in K){E(K[M])}}}function L(M){if(I){return }I=true;$(".truncated-evaluation").expander({slicePoint:M,slicePointHalf:true,preserveWords:true,preserveParenthesis:true,expandSpeed:400,collapseSpeed:0,expandText:"Continue reading",userCollapseText:"Hide",onSlice:function(){$(this).siblings(".citeEvaluation").hide().after('<div class="read-less"><a href="#">Hide</a></div>');$(this).siblings("div.read-less").hide().children("a").bind("click",function(N){N.preventDefault();$(this).parent().siblings(".truncated-evaluation").find("span.read-less a").each(function(){$(this).click()})})},beforeExpand:function(){var N=$(this);$(this).children(".summary").show().css({position:"absolute",zIndex:"2"});$(this).siblings(".citeEvaluation").fadeIn(400,function(){N.children(".summary").hide()});$(this).siblings(".read-less").show();var O=$(this).parents(".evaluation").attr("id");if(typeof O!="undefined"){O=O.replace(/^(eval)/,"");if($.inArray(O,H)<0){E(O)}}},onCollapse:function(){$(this).children(".summary").css({position:"relative"});$(this).siblings(".citeEvaluation").hide();$(this).siblings(".read-less").hide()}})}return{init:L,trackEvaluation:E,clearPendingTracking:A}})();$("a#expand-all").live("click",function(A){A.preventDefault();$("span.read-more a").each(function(){$(this).click()})});$("a#hide-all").live("click",function(A){A.preventDefault();$("span.read-less a").each(function(){$(this).click()})});$(function(){var A=$("#article .authors");if(A.length){var F=collapsedText=A.text();var E=collapsedText.split(", ");if(E.length>12){collapsedText="";for(var C in E.slice(0,6)){collapsedText=collapsedText+E[C]+", "}collapsedText=collapsedText+"...";var D=E.slice(-6);for(var B in D){collapsedText=collapsedText+", "+D[B]}A.html("<div class='authors-collapsed'>"+collapsedText+" <a href='#'></a></div><div class='authors-expanded' style='display:none'>"+F+" <a href='#'></a></div>");$(".authors-collapsed a, .authors-expanded a").click(function(G){G.preventDefault();$(".authors-collapsed").toggle();$(".authors-expanded").toggle()})}}});$(function(){if($("#evaluationDetailsPage").length){var D=4000;var A=400;var C=$("#comments-count");var B=$("#competing-interests-count");$("#add-comment-input").keyup(function(){var E=$(this).val().length;if(E<=D){C.html("<strong>"+(D-E)+"</strong> characters")}else{C.html("<span style='color:red'>You have exceeded the character limit (<strong>"+D+"</strong>)</span>")}});$("#competing-interests-input").keyup(function(){var E=$(this).val().length;if(E<=A){B.html("<strong>"+(A-E)+"</strong> characters")}else{B.html("<span style='color:red'>You have exceeded the character limit (<strong>"+A+"</strong>)</span>")}});$("#addCommentForm form").submit(function(){if($("#add-comment-input").val().length>D||$("#competing-interests-input").val().length>A){return false}})}});TwitterHelper=window.TwitterHelper||{prettyDate:function(I){var H=new Date,G=new Date(I);var F=H-G,E=1000,D=E*60,C=D*60,B=C*24,A=B*7;if(isNaN(F)||F<0){return""}if(F<E*2){return"right now"}if(F<D){return Math.floor(F/E)+" seconds ago"}if(F<D*2){return"about 1 minute ago"}if(F<C){return Math.floor(F/D)+" minutes ago"}if(F<C*2){return"about 1 hour ago"}if(F<B){return Math.floor(F/C)+" hours ago"}if(F>B&&F<B*2){return"yesterday"}return F<B*365?Math.floor(F/B)+" days ago":"over a year ago"},linkTool:{link:function(A){return A.replace(/\b(((https*\:\/\/)|www\.)[^\"\']+?)(([!?,.\)]+)?(\s|$))/g,function(C,B,G,F,E){var D=G.match(/w/)?"http://":"";return'<a class="twtr-hyperlink" target="_blank" href="'+D+B+'">'+(B.length>25?B.substr(0,24)+"...":B)+"</a>"+E})},at:function(A){return A.replace(/\B[@@]([a-zA-Z0-9_]{1,20})/g,function(C,B){return'@<a target="_blank" class="twtr-atreply" href="http://twitter.com/intent/user?screen_name='+B+'">'+B+"</a>"})},list:function(A){return A.replace(/\B[@@]([a-zA-Z0-9_]{1,20}\/\w+)/g,function(C,B){return'@<a target="_blank" class="twtr-atreply" href="http://twitter.com/'+B+'">'+B+"</a>"})},hash:function(A){return A.replace(/(^|\s+)#(\w+)/gi,function(C,B,D){return B+'<a target="_blank" class="twtr-hashtag" href="http://twitter.com/search?q=%23'+D+'">#'+D+"</a>"})},clean:function(A){return this.hash(this.at(this.list(this.link(A))))}}};$(function(){var F=window;var I=F.document;var A=F.location.href.replace(/#.*$/,"");$(".twitter_button").click(J);$(".options-linkedin").click(E);$(".options-delicious").click(H);$(".options-digg").click(C);$(".options-stumbleupon").click(B);$(".options-newsvine").click(D);$(".options-reddit").click(L);function G(O,N){var M=F.open(O,N,"width=750,height=500,scrollbars,resizable");M.focus();setTimeout(function(){M.focus()},200)}function K(N,M){_gaq=_gaq||[];_gaq.push(["_trackSocial",N,M])}function J(N){var O=I.title.replace(/\s*\-\s+F1000\s*$/,"");O=(O.length<81?O:O.substr(0,80).replace(/\s+(&(?:[^;]+;)?|\w+)$/,"")+"...")+" evaluated in @F1000 "+A;var M="http://twitter.com/intent/tweet?text="+encodeURIComponent(O);G(M,"twitter");K("Twitter","tweet");N.preventDefault()}function E(N){var P=$('meta[property="og:title"]').attr("content");var O=$('meta[property="og:description"]').attr("content");P=(P)?P.replace(/\s+/g," "):I.title;O=(O)?O.replace(/\s+/g," "):"";var M="http://www.linkedin.com/shareArticle?url="+encodeURIComponent(A)+"&title="+encodeURIComponent(P)+"&summary="+encodeURIComponent(O);G(M,"linkedin");K("Linkedin","share");N.preventDefault()}function H(N){var M="http://delicious.com/post?&url="+encodeURIComponent(A)+"&title="+encodeURIComponent(I.title);G(M,"delicious");K("Delicious","share");N.preventDefault()}function C(N){var M="http://digg.com/submit?&url="+encodeURIComponent(A)+"&title="+encodeURIComponent(I.title);G(M,"digg");K("Digg","share");N.preventDefault()}function B(N){var M="http://www.stumbleupon.com/submit?&url="+encodeURIComponent(A)+"&title="+encodeURIComponent(I.title);G(M,"stumbleupon");K("Stumbleupon","share");N.preventDefault()}function D(N){var M="http://www.newsvine.com/_tools/seed&save?u="+encodeURIComponent(A)+"&h="+encodeURIComponent(I.title);G(M,"newsvine");K("Newsvine","share");N.preventDefault()}function L(N){var M="http://reddit.com/submit?url="+encodeURIComponent(A)+"&title="+encodeURIComponent(I.title);G(M,"reddit");K("Reddit","share");N.preventDefault()}});var overlayNotify=(function(){var B="a_ovrl";function E(){$("body").animate({marginTop:"36px"},"fast","linear")}function D(H){var G=$('<span class="notify-close"><a title="Close this notification">&times;</a></span><span class="notify-text">'+H+"</span>");G.filter(".notify-close").click(function(){A();C()});$("#notify-container").append(G)}function F(){$("#notify-container").fadeIn("slow")}function C(){$("#notify-container").fadeOut("fast",function(){$("body").animate({marginTop:"0px"},"fast","linear")})}function A(){$.cookie(B,"1",{expires:30,path:"/"})}return{init:function(G){if(!$.cookie(B)){if(/linkedin/i.test(G)){E();D('This content is available free of charge as you have clicked a shared link via LinkedIn. If you wish to see further subscription content you will need to <a href="/signin?target='+encodeURIComponent(location.pathname+location.search)+'">sign in/get access</a>.');F()}}}}})();$(function(){$("a[class^='poster-']").click(function(){var A;if(/\/posters\/docs\/\d+$/.test($(this).attr("href"))){if($(this).attr("class")&&(A=$(this).attr("class").match(/poster-(\d+)/))){_gaq=_gaq||[];_gaq.push(["_trackEvent","Downloads","Posters",A[1]+""])}}})});(function(B){function A(E,D){var C=this;E=jQuery(E);var F=jQuery(document.createElement("div")).addClass(D.baseClass).addClass((D.fixed)?D.fixedClass:"").addClass((D.persistent)?D.persistentClass:"").html(D.content).appendTo(E);if(!D.hidden){F.show()}else{F.hide()}if(!D.persistent){E.hover(function(G){C.show(G)},function(){C.hide()});if(!D.fixed){E.mousemove(function(G){if(F.css("display")!=="none"){C.updatePos(G)}})}}else{E.click(function(G){if(G.target===E.get(0)){if(F.css("display")!=="none"){C.hide()}else{C.show()}}});jQuery(window).mousedown(function(H){if(F.css("display")!=="none"){var G=(D.focus)?jQuery(H.target).parents(".tooltip").andSelf().filter(function(){return this===F.get(0)}).length:0;if(G===0){C.hide()}}})}jQuery.extend(C,{getVersion:function(){return[1,2,0]},getParent:function(){return E},getTooltip:function(){return F},getPos:function(){return F.offset()},setPos:function(I,H){var G=E.offset();if(typeof I=="string"){I=parseInt(I)+G.left}if(typeof H=="string"){H=parseInt(H)+G.top}F.css({left:I,top:H});return C},show:function(G){D.onBeforeShow.call(C);C.updatePos((D.fixed)?null:G);switch(D.showEffect){case"fade":F.fadeIn(D.showTime);break;case"slide":F.slideDown(D.showTime,C.updatePos);break;case"custom":D.showCustom.call(F,D.showTime);break;default:case"none":F.show();break}F.addClass(D.activeClass);D.onShow.call(C);return C},hide:function(){D.onBeforeHide.call(C);switch(D.hideEffect){case"fade":F.fadeOut(D.hideTime);break;case"slide":F.slideUp(D.hideTime);break;case"custom":D.hideCustom.call(F,D.hideTime);break;default:case"none":F.hide();break}F.removeClass(D.activeClass);D.onHide.call(C);return C},update:function(G){F.html(G);D.content=G;return C},load:function(G,H){D.beforeContentLoad.call(C);F.load(G,H,function(){D.onContentLoad.call(C)});return C},boundryCheck:function(L,J){var I=L+F.outerWidth();var H=J+F.outerHeight();var G=jQuery(window).width()+jQuery(window).scrollLeft();var K=jQuery(window).height()+jQuery(window).scrollTop();return[(I>=G),(H>=K)]},updatePos:function(I){var N=F.outerWidth();var P=F.outerHeight();if(!I&&D.fixed){if(D.position.constructor==Array){H=parseInt(D.position[0]);G=parseInt(D.position[1])}else{if(jQuery(D.position).attr("nodeType")===1){var M=jQuery(D.position).offset();H=M.left;G=M.top}else{var O=D.relativePosition?E.position():E.offset();var L=E.outerWidth();var J=E.outerHeight();switch(D.position){case"top":var H=O.left-(N/2)+(L/2);var G=O.top-P;break;case"bottom":var H=O.left-(N/2)+(L/2);var G=O.top+J;break;case"left":var H=O.left-N;var G=O.top-(P/2)+(J/2);break;case"right":var H=O.left+L;var G=O.top-(P/2)+(J/2);break;default:case"default":var H=(L/2)+O.left+20;var G=O.top;break}}}}else{var H=I.pageX;var G=I.pageY}if(typeof D.position!="object"){H=H+D.offset[0];G=G+D.offset[1];if(D.boundryCheck){var K=C.boundryCheck(H,G);if(K[0]){H=H-(N/2)-(2*D.offset[0])}if(K[1]){G=G-(P/2)-(2*D.offset[1])}}}else{if(typeof D.position[0]=="string"){H=String(H)}if(typeof D.position[1]=="string"){G=String(G)}}C.setPos(H,G);return C}})}jQuery.fn.simpletip=function(C){var D=jQuery(this).eq(typeof C=="number"?C:0).data("simpletip");if(D){return D}var E={content:"A simple tooltip",persistent:false,focus:false,hidden:true,position:"default",offset:[0,0],boundryCheck:true,fixed:true,relativePosition:false,showEffect:"fade",showTime:150,showCustom:null,hideEffect:"fade",hideTime:150,hideCustom:null,baseClass:"tooltip",activeClass:"active",fixedClass:"fixed",persistentClass:"persistent",focusClass:"focus",onBeforeShow:function(){},onShow:function(){},onBeforeHide:function(){},onHide:function(){},beforeContentLoad:function(){},onContentLoad:function(){}};jQuery.extend(E,C);this.each(function(){var F=new A(jQuery(this),E);jQuery(this).data("simpletip",F)});return this}})();function removeAllOccurrences(C,B){i=C.indexOf(B);var A="";if(i==-1){return C}A+=C.substring(0,i)+removeAllOccurrences(C.substring(i+B.length),B);return A}$(function(){$("#addCommentForm form").validationEngine();$(".reportComment form").validationEngine({success:function(A){$.post(A.action,$(A).serialize(),function(C){var B=$(A).find("input[name=userComment]").val();if(C.success){messenger.addMessage(C.message);$("#comment-"+B+" .commentBody").html("<p><em>Comment is pending review</em></p>");$("#comment-"+B+" .reportComment").fadeOut();$(document).trigger("close.facebox")}else{messenger.addWarning(C.message)}},"json")}});$("#noPapersLink").click(function(){messenger.addWarning($(this).attr("title"))});$("#selectAll").click(function(){var A=$('#selectedArticlesForm :input[type="checkbox"]');for(i=0;i<A.length;i++){if(A[i].checked==false){A[i].click()}}});$("#selectNone").click(function(){var A=$('#selectedArticlesForm :input[type="checkbox"]');for(i=0;i<A.length;i++){if(A[i].checked==true){A[i].click()}}});$(".classificationIconsLink").click(function(A){$(".classificationIconsDropDown").toggleClass("active");$(".classificationIconsDropDown ul").toggle("fast");A.preventDefault()});$(".toggle-mesh").click(function(A){$(this).toggleClass("selected-mesh");$(this).next("ul").toggle("fast");A.preventDefault()})});Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};Date.getMonthNumberFromName=function(B){var E=Date.CultureInfo.monthNames,A=Date.CultureInfo.abbreviatedMonthNames,D=B.toLowerCase();for(var C=0;C<E.length;C++){if(E[C].toLowerCase()==D||A[C].toLowerCase()==D){return C}}return -1};Date.getDayNumberFromName=function(B){var F=Date.CultureInfo.dayNames,A=Date.CultureInfo.abbreviatedDayNames,E=Date.CultureInfo.shortestDayNames,D=B.toLowerCase();for(var C=0;C<F.length;C++){if(F[C].toLowerCase()==D||A[C].toLowerCase()==D){return C}}return -1};Date.isLeapYear=function(A){return(((A%4===0)&&(A%100!==0))||(A%400===0))};Date.getDaysInMonth=function(A,B){return[31,(Date.isLeapYear(A)?29:28),31,30,31,30,31,31,30,31,30,31][B]};Date.getTimezoneOffset=function(A,B){return(B||false)?Date.CultureInfo.abbreviatedTimeZoneDST[A.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[A.toUpperCase()]};Date.getTimezoneAbbreviation=function(B,D){var C=(D||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,A;for(A in C){if(C[A]===B){return A}}return null};Date.prototype.clone=function(){return new Date(this.getTime())};Date.prototype.compareTo=function(A){if(isNaN(this)){throw new Error(this)}if(A instanceof Date&&!isNaN(A)){return(this>A)?1:(this<A)?-1:0}else{throw new TypeError(A)}};Date.prototype.equals=function(A){return(this.compareTo(A)===0)};Date.prototype.between=function(C,A){var B=this.getTime();return B>=C.getTime()&&B<=A.getTime()};Date.prototype.addMilliseconds=function(A){this.setMilliseconds(this.getMilliseconds()+A);return this};Date.prototype.addSeconds=function(A){return this.addMilliseconds(A*1000)};Date.prototype.addMinutes=function(A){return this.addMilliseconds(A*60000)};Date.prototype.addHours=function(A){return this.addMilliseconds(A*3600000)};Date.prototype.addDays=function(A){return this.addMilliseconds(A*86400000)};Date.prototype.addWeeks=function(A){return this.addMilliseconds(A*604800000)};Date.prototype.addMonths=function(A){var B=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+A);this.setDate(Math.min(B,this.getDaysInMonth()));return this};Date.prototype.addYears=function(A){return this.addMonths(A*12)};Date.prototype.add=function(B){if(typeof B=="number"){this._orient=B;return this}var A=B;if(A.millisecond||A.milliseconds){this.addMilliseconds(A.millisecond||A.milliseconds)}if(A.second||A.seconds){this.addSeconds(A.second||A.seconds)}if(A.minute||A.minutes){this.addMinutes(A.minute||A.minutes)}if(A.hour||A.hours){this.addHours(A.hour||A.hours)}if(A.month||A.months){this.addMonths(A.month||A.months)}if(A.year||A.years){this.addYears(A.year||A.years)}if(A.day||A.days){this.addDays(A.day||A.days)}return this};Date._validate=function(D,C,A,B){if(typeof D!="number"){throw new TypeError(D+" is not a Number.")}else{if(D<C||D>A){throw new RangeError(D+" is not a valid value for "+B+".")}}return true};Date.validateMillisecond=function(A){return Date._validate(A,0,999,"milliseconds")};Date.validateSecond=function(A){return Date._validate(A,0,59,"seconds")};Date.validateMinute=function(A){return Date._validate(A,0,59,"minutes")};Date.validateHour=function(A){return Date._validate(A,0,23,"hours")};Date.validateDay=function(C,A,B){return Date._validate(C,1,Date.getDaysInMonth(A,B),"days")};Date.validateMonth=function(A){return Date._validate(A,0,11,"months")};Date.validateYear=function(A){return Date._validate(A,1,9999,"seconds")};Date.prototype.set=function(B){var A=B;if(!A.millisecond&&A.millisecond!==0){A.millisecond=-1}if(!A.second&&A.second!==0){A.second=-1}if(!A.minute&&A.minute!==0){A.minute=-1}if(!A.hour&&A.hour!==0){A.hour=-1}if(!A.day&&A.day!==0){A.day=-1}if(!A.month&&A.month!==0){A.month=-1}if(!A.year&&A.year!==0){A.year=-1}if(A.millisecond!=-1&&Date.validateMillisecond(A.millisecond)){this.addMilliseconds(A.millisecond-this.getMilliseconds())}if(A.second!=-1&&Date.validateSecond(A.second)){this.addSeconds(A.second-this.getSeconds())}if(A.minute!=-1&&Date.validateMinute(A.minute)){this.addMinutes(A.minute-this.getMinutes())}if(A.hour!=-1&&Date.validateHour(A.hour)){this.addHours(A.hour-this.getHours())}if(A.month!==-1&&Date.validateMonth(A.month)){this.addMonths(A.month-this.getMonth())}if(A.year!=-1&&Date.validateYear(A.year)){this.addYears(A.year-this.getFullYear())}if(A.day!=-1&&Date.validateDay(A.day,this.getFullYear(),this.getMonth())){this.addDays(A.day-this.getDate())}if(A.timezone){this.setTimezone(A.timezone)}if(A.timezoneOffset){this.setTimezoneOffset(A.timezoneOffset)}return this};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};Date.prototype.isLeapYear=function(){var A=this.getFullYear();return(((A%4===0)&&(A%100!==0))||(A%400===0))};Date.prototype.isWeekday=function(){return !(this.is().sat()||this.is().sun())};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1})};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()})};Date.prototype.moveToDayOfWeek=function(A,B){var C=(A-this.getDay()+7*(B||+1))%7;return this.addDays((C===0)?C+=7*(B||+1):C)};Date.prototype.moveToMonth=function(C,A){var B=(C-this.getMonth()+12*(A||+1))%12;return this.addMonths((B===0)?B+=12*(A||+1):B)};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000)};Date.prototype.getWeekOfYear=function(A){var G=this.getFullYear(),C=this.getMonth(),E=this.getDate();var I=A||Date.CultureInfo.firstDayOfWeek;var D=7+1-new Date(G,0,1).getDay();if(D==8){D=1}var B=((Date.UTC(G,C,E,0,0,0)-Date.UTC(G,0,1,0,0,0))/86400000)+1;var H=Math.floor((B-D+7)/7);if(H===I){G--;var F=7+1-new Date(G,0,1).getDay();if(F==2||F==8){H=53}else{H=52}}return H};Date.prototype.isDST=function(){console.log("isDST");return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D"};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST())};Date.prototype.setTimezoneOffset=function(B){var A=this.getTimezoneOffset(),C=Number(B)*-6/10;this.addMinutes(C-A);return this};Date.prototype.setTimezone=function(A){return this.setTimezoneOffset(Date.getTimezoneOffset(A))};Date.prototype.getUTCOffset=function(){var B=this.getTimezoneOffset()*-10/6,A;if(B<0){A=(B-10000).toString();return A[0]+A.substr(2)}else{A=(B+10000).toString();return"+"+A.substr(1)}};Date.prototype.getDayName=function(A){return A?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()]};Date.prototype.getMonthName=function(A){return A?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()]};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(C){var A=this;var B=function B(D){return(D.toString().length==1)?"0"+D:D};return C?C.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(D){switch(D){case"hh":return B(A.getHours()<13?A.getHours():(A.getHours()-12));case"h":return A.getHours()<13?A.getHours():(A.getHours()-12);case"HH":return B(A.getHours());case"H":return A.getHours();case"mm":return B(A.getMinutes());case"m":return A.getMinutes();case"ss":return B(A.getSeconds());case"s":return A.getSeconds();case"yyyy":return A.getFullYear();case"yy":return A.getFullYear().toString().substring(2,4);case"dddd":return A.getDayName();case"ddd":return A.getDayName(true);case"dd":return B(A.getDate());case"d":return A.getDate().toString();case"MMMM":return A.getMonthName();case"MMM":return A.getMonthName(true);case"MM":return B((A.getMonth()+1));case"M":return A.getMonth()+1;case"t":return A.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return A.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return""}}):this._toString()};Date.now=function(){return new Date()};Date.today=function(){return Date.now().clearTime()};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var A={};A[this._dateElement]=this;return Date.now().add(A)};Number.prototype.ago=function(){var A={};A[this._dateElement]=this*-1;return Date.now().add(A)};(function(){var G=Date.prototype,A=Number.prototype;var M=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),L=("january february march april may june july august september october november december").split(/\s/),K=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),J;var I=function(N){return function(){if(this._is){this._is=false;return this.getDay()==N}return this.moveToDayOfWeek(N,this._orient)}};for(var F=0;F<M.length;F++){G[M[F]]=G[M[F].substring(0,3)]=I(F)}var H=function(N){return function(){if(this._is){this._is=false;return this.getMonth()===N}return this.moveToMonth(N,this._orient)}};for(var D=0;D<L.length;D++){G[L[D]]=G[L[D].substring(0,3)]=H(D)}var E=function(N){return function(){if(N.substring(N.length-1)!="s"){N+="s"}return this["add"+N](this._orient)}};var B=function(N){return function(){this._dateElement=N;return this}};for(var C=0;C<K.length;C++){J=K[C].toLowerCase();G[J]=G[J+"s"]=E(K[C]);A[J]=A[J+"s"]=B(J)}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ")};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern)};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern)};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern)};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern)};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};(function(){Date.Parsing={Exception:function(I){this.message="Parse error at '"+I.substring(0,10)+" ...'"}};var A=Date.Parsing;var C=A.Operators={rtoken:function(I){return function(J){var K=J.match(I);if(K){return([K[0],J.substring(K[0].length)])}else{throw new A.Exception(J)}}},token:function(I){return function(J){return C.rtoken(new RegExp("^s*"+J+"s*"))(J)}},stoken:function(I){return C.rtoken(new RegExp("^"+I))},until:function(I){return function(J){var K=[],M=null;while(J.length){try{M=I.call(this,J)}catch(L){K.push(M[0]);J=M[1];continue}break}return[K,J]}},many:function(I){return function(J){var M=[],K=null;while(J.length){try{K=I.call(this,J)}catch(L){return[M,J]}M.push(K[0]);J=K[1]}return[M,J]}},optional:function(I){return function(J){var K=null;try{K=I.call(this,J)}catch(L){return[null,J]}return[K[0],K[1]]}},not:function(I){return function(J){try{I.call(this,J)}catch(K){return[null,J]}throw new A.Exception(J)}},ignore:function(I){return I?function(J){var K=null;K=I.call(this,J);return[null,K[1]]}:null},product:function(){var J=arguments[0],K=Array.prototype.slice.call(arguments,1),L=[];for(var I=0;I<J.length;I++){L.push(C.each(J[I],K))}return L},cache:function(K){var I={},J=null;return function(L){try{J=I[L]=(I[L]||K.call(this,L))}catch(M){J=I[L]=M}if(J instanceof A.Exception){throw J}else{return J}}},any:function(){var I=arguments;return function(K){var L=null;for(var J=0;J<I.length;J++){if(I[J]==null){continue}try{L=(I[J].call(this,K))}catch(M){L=null}if(L){return L}}throw new A.Exception(K)}},each:function(){var I=arguments;return function(K){var N=[],L=null;for(var J=0;J<I.length;J++){if(I[J]==null){continue}try{L=(I[J].call(this,K))}catch(M){throw new A.Exception(K)}N.push(L[0]);K=L[1]}return[N,K]}},all:function(){var J=arguments,I=I;return I.each(I.optional(J))},sequence:function(I,J,K){J=J||C.rtoken(/^\s*/);K=K||null;if(I.length==1){return I[0]}return function(O){var P=null,Q=null;var S=[];for(var N=0;N<I.length;N++){try{P=I[N].call(this,O)}catch(R){break}S.push(P[0]);try{Q=J.call(this,P[1])}catch(M){Q=null;break}O=Q[1]}if(!P){throw new A.Exception(O)}if(Q){throw new A.Exception(Q[1])}if(K){try{P=K.call(this,P[1])}catch(L){throw new A.Exception(P[1])}}return[S,(P?P[1]:O)]}},between:function(J,K,I){I=I||J;var L=C.each(C.ignore(J),K,C.ignore(I));return function(M){var N=L.call(this,M);return[[N[0][0],r[0][2]],N[1]]}},list:function(I,J,K){J=J||C.rtoken(/^\s*/);K=K||null;return(I instanceof Array?C.each(C.product(I.slice(0,-1),C.ignore(J)),I.slice(-1),C.ignore(K)):C.each(C.many(C.each(I,C.ignore(J))),px,C.ignore(K)))},set:function(I,J,K){J=J||C.rtoken(/^\s*/);K=K||null;return function(X){var L=null,N=null,M=null,O=null,P=[[],X],W=false;for(var R=0;R<I.length;R++){M=null;N=null;L=null;W=(I.length==1);try{L=I[R].call(this,X)}catch(U){continue}O=[[L[0]],L[1]];if(L[1].length>0&&!W){try{M=J.call(this,L[1])}catch(V){W=true}}else{W=true}if(!W&&M[1].length===0){W=true}if(!W){var S=[];for(var Q=0;Q<I.length;Q++){if(R!=Q){S.push(I[Q])}}N=C.set(S,J).call(this,M[1]);if(N[0].length>0){O[0]=O[0].concat(N[0]);O[1]=N[1]}}if(O[1].length<P[1].length){P=O}if(P[1].length===0){break}}if(P[0].length===0){return P}if(K){try{M=K.call(this,P[1])}catch(T){throw new A.Exception(P[1])}P[1]=M[1]}return P}},forward:function(I,J){return function(K){return I[J].call(this,K)}},replace:function(J,I){return function(K){var L=J.call(this,K);return[I,L[1]]}},process:function(J,I){return function(K){var L=J.call(this,K);return[I.call(this,L[0]),L[1]]}},min:function(I,J){return function(K){var L=J.call(this,K);if(L[0].length<I){throw new A.Exception(K)}return L}}};var H=function(I){return function(){var J=null,M=[];if(arguments.length>1){J=Array.prototype.slice.call(arguments)}else{if(arguments[0] instanceof Array){J=arguments[0]}}if(J){for(var L=0,K=J.shift();L<K.length;L++){J.unshift(K[L]);M.push(I.apply(null,J));J.shift();return M}}else{return I.apply(null,arguments)}}};var G="optional not ignore cache".split(/\s/);for(var D=0;D<G.length;D++){C[G[D]]=H(C[G[D]])}var F=function(I){return function(){if(arguments[0] instanceof Array){return I.apply(null,arguments[0])}else{return I.apply(null,arguments)}}};var E="each any all".split(/\s/);for(var B=0;B<E.length;B++){C[E[B]]=F(C[E[B]])}}());(function(){var F=function(J){var K=[];for(var I=0;I<J.length;I++){if(J[I] instanceof Array){K=K.concat(F(J[I]))}else{if(J[I]){K.push(J[I])}}}return K};Date.Grammar={};Date.Translator={hour:function(I){return function(){this.hour=Number(I)}},minute:function(I){return function(){this.minute=Number(I)}},second:function(I){return function(){this.second=Number(I)}},meridian:function(I){return function(){this.meridian=I.slice(0,1).toLowerCase()}},timezone:function(I){return function(){var J=I.replace(/[^\d\+\-]/g,"");if(J.length){this.timezoneOffset=Number(J)}else{this.timezone=I.toLowerCase()}}},day:function(I){var J=I[0];return function(){this.day=Number(J.match(/\d+/)[0])}},month:function(I){return function(){this.month=((I.length==3)?Date.getMonthNumberFromName(I):(Number(I)-1))}},year:function(I){return function(){var J=Number(I);this.year=((I.length>2)?J:(J+(((J+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)))}},rday:function(I){return function(){switch(I){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break}}},finishExact:function(I){I=(I instanceof Array)?I:[I];var J=new Date();this.year=J.getFullYear();this.month=J.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var K=0;K<I.length;K++){if(I[K]){I[K].call(this)}}this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.")}var L=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){L.set({timezone:this.timezone})}else{if(this.timezoneOffset){L.set({timezoneOffset:this.timezoneOffset})}}return L},finish:function(I){I=(I instanceof Array)?F(I):[I];if(I.length===0){return null}for(var M=0;M<I.length;M++){if(typeof I[M]=="function"){I[M].call(this)}}if(this.now){return new Date()}var J=Date.today();var P=null;var N=!!(this.days!=null||this.orient||this.operator);if(N){var O,L,K;K=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";O=(Date.getDayNumberFromName(this.weekday)-J.getDay());L=7;this.days=O?((O+(K*L))%L):(K*L)}if(this.month){this.unit="month";O=(this.month-J.getMonth());L=12;this.months=O?((O+(K*L))%L):(K*L);this.month=null}if(!this.unit){this.unit="day"}if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1}if(this.unit=="week"){this.unit="day";this.value=this.value*7}this[this.unit+"s"]=this.value*K}return J.add(this)}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour}if(this.weekday&&!this.day){this.day=(J.addDays((Date.getDayNumberFromName(this.weekday)-J.getDay()))).getDate()}if(this.month&&!this.day){this.day=1}return J.set(this)}}};var B=Date.Parsing.Operators,E=Date.Grammar,D=Date.Translator,H;E.datePartDelimiter=B.rtoken(/^([\s\-\.\,\/\x27]+)/);E.timePartDelimiter=B.stoken(":");E.whiteSpace=B.rtoken(/^\s*/);E.generalDelimiter=B.rtoken(/^(([\s\,]|at|on)+)/);var A={};E.ctoken=function(M){var L=A[M];if(!L){var N=Date.CultureInfo.regexPatterns;var K=M.split(/\s+/),J=[];for(var I=0;I<K.length;I++){J.push(B.replace(B.rtoken(N[K[I]]),K[I]))}L=A[M]=B.any.apply(null,J)}return L};E.ctoken2=function(I){return B.rtoken(Date.CultureInfo.regexPatterns[I])};E.h=B.cache(B.process(B.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),D.hour));E.hh=B.cache(B.process(B.rtoken(/^(0[0-9]|1[0-2])/),D.hour));E.H=B.cache(B.process(B.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),D.hour));E.HH=B.cache(B.process(B.rtoken(/^([0-1][0-9]|2[0-3])/),D.hour));E.m=B.cache(B.process(B.rtoken(/^([0-5][0-9]|[0-9])/),D.minute));E.mm=B.cache(B.process(B.rtoken(/^[0-5][0-9]/),D.minute));E.s=B.cache(B.process(B.rtoken(/^([0-5][0-9]|[0-9])/),D.second));E.ss=B.cache(B.process(B.rtoken(/^[0-5][0-9]/),D.second));E.hms=B.cache(B.sequence([E.H,E.mm,E.ss],E.timePartDelimiter));E.t=B.cache(B.process(E.ctoken2("shortMeridian"),D.meridian));E.tt=B.cache(B.process(E.ctoken2("longMeridian"),D.meridian));E.z=B.cache(B.process(B.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),D.timezone));E.zz=B.cache(B.process(B.rtoken(/^(\+|\-)\s*\d\d\d\d/),D.timezone));E.zzz=B.cache(B.process(E.ctoken2("timezone"),D.timezone));E.timeSuffix=B.each(B.ignore(E.whiteSpace),B.set([E.tt,E.zzz]));E.time=B.each(B.optional(B.ignore(B.stoken("T"))),E.hms,E.timeSuffix);E.d=B.cache(B.process(B.each(B.rtoken(/^([0-2]\d|3[0-1]|\d)/),B.optional(E.ctoken2("ordinalSuffix"))),D.day));E.dd=B.cache(B.process(B.each(B.rtoken(/^([0-2]\d|3[0-1])/),B.optional(E.ctoken2("ordinalSuffix"))),D.day));E.ddd=E.dddd=B.cache(B.process(E.ctoken("sun mon tue wed thu fri sat"),function(I){return function(){this.weekday=I}}));E.M=B.cache(B.process(B.rtoken(/^(1[0-2]|0\d|\d)/),D.month));E.MM=B.cache(B.process(B.rtoken(/^(1[0-2]|0\d)/),D.month));E.MMM=E.MMMM=B.cache(B.process(E.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),D.month));E.y=B.cache(B.process(B.rtoken(/^(\d\d?)/),D.year));E.yy=B.cache(B.process(B.rtoken(/^(\d\d)/),D.year));E.yyy=B.cache(B.process(B.rtoken(/^(\d\d?\d?\d?)/),D.year));E.yyyy=B.cache(B.process(B.rtoken(/^(\d\d\d\d)/),D.year));H=function(){return B.each(B.any.apply(null,arguments),B.not(E.ctoken2("timeContext")))};E.day=H(E.d,E.dd);E.month=H(E.M,E.MMM);E.year=H(E.yyyy,E.yy);E.orientation=B.process(E.ctoken("past future"),function(I){return function(){this.orient=I}});E.operator=B.process(E.ctoken("add subtract"),function(I){return function(){this.operator=I}});E.rday=B.process(E.ctoken("yesterday tomorrow today now"),D.rday);E.unit=B.process(E.ctoken("minute hour day week month year"),function(I){return function(){this.unit=I}});E.value=B.process(B.rtoken(/^\d\d?(st|nd|rd|th)?/),function(I){return function(){this.value=I.replace(/\D/g,"")}});E.expression=B.set([E.rday,E.operator,E.value,E.unit,E.orientation,E.ddd,E.MMM]);H=function(){return B.set(arguments,E.datePartDelimiter)};E.mdy=H(E.ddd,E.month,E.day,E.year);E.ymd=H(E.ddd,E.year,E.month,E.day);E.dmy=H(E.ddd,E.day,E.month,E.year);E.date=function(I){return((E[Date.CultureInfo.dateElementOrder]||E.mdy).call(this,I))};E.format=B.process(B.many(B.any(B.process(B.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(I){if(E[I]){return E[I]}else{throw Date.Parsing.Exception(I)}}),B.process(B.rtoken(/^[^dMyhHmstz]+/),function(I){return B.ignore(B.stoken(I))}))),function(I){return B.process(B.each.apply(null,I),D.finishExact)});var G={};var C=function(I){return G[I]=(G[I]||E.format(I)[0])};E.formats=function(J){if(J instanceof Array){var K=[];for(var I=0;I<J.length;I++){K.push(C(J[I]))}return B.any.apply(null,K)}else{return C(J)}};E._formats=E.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);E._start=B.process(B.set([E.date,E.time,E.expression],E.generalDelimiter,E.whiteSpace),D.finish);E.start=function(I){try{var J=E._formats.call({},I);if(J[1].length===0){return J}}catch(K){}return E._start.call({},I)}}());Date._parse=Date.parse;Date.parse=function(A){var B=null;if(!A){return null}try{B=Date.Grammar.start.call({},A)}catch(C){return null}return((B[1].length===0)?B[0]:null)};Date.getParseFunction=function(B){var A=Date.Grammar.formats(B);return function(C){var D=null;try{D=A.call({},C)}catch(E){return null}return((D[1].length===0)?D[0]:null)}};Date.parseExact=function(A,B){return Date.getParseFunction(B)(A)};document.write('<style type="text/css"><!--\n.toggleable{display:none;}\n//--></style>');function toggler(B){if(document.getElementById){var A=B.firstChild;A=B.firstChild.innerHTML?B.firstChild:B.firstChild.nextSibling;A.innerHTML=A.innerHTML=="\u25bc"?"\u25b2":"\u25bc";A=B.parentNode.nextSibling.style?B.parentNode.nextSibling:B.parentNode.nextSibling.nextSibling;A.style.display=A.style.display=="block"?"none":"block"}}if(!document.getElementById){document.write('<style type="text/css"><!--\n.toggleable{display:block;}\n//--></style>')}document.write('<style type="text/css"><!--\n.collapsable{display:block;}\n//--></style>');function collapser(B){if(document.getElementById){var A=B.firstChild;A=B.firstChild.innerHTML?B.firstChild:B.firstChild.nextSibling;A.innerHTML=A.innerHTML=="\uff0b"?"\uff0d":"\uff0b";A=B.parentNode.nextSibling.style?B.parentNode.nextSibling:B.parentNode.nextSibling.nextSibling;A.style.display=A.style.display=="none"?"block":"none"}}if(!document.getElementById){document.write('<style type="text/css"><!--\n.collapsable{display:none;}\n//--></style>')}document.write('<style type="text/css"><!--\n.expandable{display:none;}\n//--></style>');function expander(B){if(document.getElementById){var A=B.firstChild;A=B.firstChild.innerHTML?B.firstChild:B.firstChild.nextSibling;A.innerHTML=A.innerHTML=="\uff0d"?"\uff0b":"\uff0d";A=B.parentNode.nextSibling.style?B.parentNode.nextSibling:B.parentNode.nextSibling.nextSibling;A.style.display=A.style.display=="block"?"none":"block"}}if(!document.getElementById){document.write('<style type="text/css"><!--\n.expandable{display:block;}\n//--></style>')}function initMenus(){if(!document.getElementsByTagName){return }var D=document.getElementsByTagName("LI");for(var B=0;B<D.length;B++){var E=D[B].className;if(E.indexOf("treenode")>-1){var C=D[B].childNodes;for(var A=0;A<C.length;A++){if(C[A].tagName=="A"){C[A].onclick=function(){var F=this.nextSibling;while(1){if(F!=null){if(F.tagName=="UL"){var G=(F.style.display=="none");F.style.display=(G)?"block":"none";this.className=(G)?"treeopen":"treeclosed";return false}F=F.nextSibling}else{return false}}return false};C[A].className=(E.indexOf("open")>-1)?"treeopen":"treeclosed"}if(C[A].tagName=="UL"){C[A].style.display=(E.indexOf("open")>-1)?"block":"none"}}}}}window.onload=initMenus;$(function(){$(".refineSearch-toggler").click(function(){$(".refineSearch-slide").slideToggle("fast");$(".refineSearch-toggler").toggleClass("notClickable");$("#showRefinedCriteria").toggleClass("notClickable");return false});$("#showRefinedCriteria").click(function(){$(".refineSearch-slide").slideDown("fast");$(".refineSearch-toggler").addClass("notClickable");$(this).addClass("notClickable");return false})});function getMonthNameFromNumber(A){var B=new Array(12);B[0]="January";B[1]="February";B[2]="March";B[3]="April";B[4]="May";B[5]="June";B[6]="July";B[7]="August";B[8]="September";B[9]="October";B[10]="November";B[11]="December";return B[A]}$().ready(function(){$("#fm_autocomplete_input").autocomplete({matchSubset:false,source:function(B,A){jQuery.ajax({url:"/json/fmsearch",dataType:"json",data:{q:B.term},success:function(C){A($.map(C,function(D){return{label:D.fullName,value:D.fullName,id:D.id}}))}})},select:function(A,B){$("#fm_autocomplete_chosen").append($("<div>").append('<input type="hidden" name="fmIds" value="'+B.item.id+'"/>').append('<span class="name">'+B.item.value+'</span><img id="'+B.item.id+'" src="/images/icon-remove.png"/>'));$("#"+B.item.id).click(function(){$(this).parents("div:first").slideUp(function(){$(this).remove()})})},close:function(A,B){$("#fm_autocomplete_input").val("")}})});function ArticleToolbox(H,G,E){var B=0.4;var A=false;function C(){var I={types:{articlesIds:[],pubmedIds:[]},length:function(){return this.types.articlesIds.length+this.types.pubmedIds.length}};I.types.articlesIds=$.map($('#selectedArticlesForm :checked[name="articlesIds"]'),function(L){return $(L).val()});I.types.pubmedIds=$.map($('#selectedArticlesForm :checked[name="pubmedIds"]'),function(L){return $(L).val()});var K=I.length()>0;var J=K!=A;if(J){A=K;D();A?$.publish("articleToolbox.enable"):$.publish("articleToolbox.disable")}$.publish("articleToolbox.selectedArticlesChanged",I)}function F(){if(H){A=true}else{$("#toolbox").css("opacity",B)}var J=[new ExportArticles(H),new Myf1000(H,A,G,E),new EmailArticles()];$(J).each(function(){$.subscribe("articleToolbox.selectedArticlesChanged",this,"articlesChanged");$.subscribe("articleToolbox.enable",this,"enable");$.subscribe("articleToolbox.disable",this,"disable")});if(!A){$.publish("articleToolbox.disable")}if(!H){var I='#selectedArticlesForm :checkbox[name="articlesIds"], #selectedArticlesForm :checkbox[name="pubmedIds"]';$(I).click(C);$(window).bind("articleToolbox.articleListingChanged",C)}}function D(){if(A){$("#toolbox").stop().fadeTo("slow",1,function(){$(this).removeAttr("style")})}else{$("#toolbox").stop().fadeTo("slow",B)}}F();return{}}function ExportArticles(G){$(".sendArticleForm").live("submit",F);function D(){$(".link-send").attr("rel","facebox").unbind("click");$(".link-send").replaceWith($(".link-send").clone())}function C(){$(".link-send").attr("rel","").unbind("click");$(".link-send").replaceWith($(".link-send").clone());$(".link-send").click(function(){messenger.addWarning("You must check the articles you wish to export first.")})}function A(H){E(H)}function E(H){var I=$(".send-this form");$.each(H.types,function(K,J){$(I).find('input[name="'+K+'"]').remove();$(J).each(function(){$(I).append('<input type="hidden" name="'+K+'" value="'+this+'"/>')})})}function F(){var I=$(this);var H=I.find("#bibliographyExportOptions option:selected").text();B(H)}function B(H){_gaq=_gaq||[];_gaq.push(["_trackSocial",H,"export"])}return{articlesChanged:A,enable:D,disable:C}}function Myf1000(N,L,E,G){var D=$(".save-this:not(.save-this-teaser)");var C=D.find("form");var O=!E;if(G){$(".myf1000-action-dropdown").click(B)}D.click(J);function M(P){$.each(P.types,function(R,Q){$(C).find('input[name="'+R+'"]').remove();$(Q).each(function(){$(C).append('<input type="hidden" name="'+R+'" value="'+this+'"/>')})})}function H(){L=true}function F(){L=false}var I=function(){messenger.addWarning("An error occured, refresh the page and try again.")};function J(){if(L){var P=C.find("input");$.ajax({type:C.attr("method"),url:C.attr("action"),data:C.serialize(),dataType:"json",success:function(T){if(T){var Q=N?"Article":"Articles";var S=O?"added to":"removed from";messenger.addMessage(Q+" "+S+" MyF1000");if(N){O?K():A();O=!O}else{if(!O){var R=[];$(P).each(function(){var U=$('#selectedArticlesForm input[name="'+$(this).attr("name")+'"][value="'+$(this).val()+'"]');R.push($(U).closest("li")[0])});$(R).fadeOut("slow",function(){$(R).remove();$.publish("articleToolbox.articleListingChanged")})}}}else{I()}},error:I})}else{messenger.addWarning("You must check the articles you wish to add first.")}}function B(Q){var P=$(this);var R=P.attr("data-article-id");$.ajax({type:"post",url:"/my/articles/add",data:"articlesIds="+R,dataType:"json",success:function(S){if(S){messenger.addMessage("Article added to MyF1000");$(document).trigger("close.f1000box")}else{I()}},error:I});Q.preventDefault()}function K(){C.attr("action",C.attr("action").replace("add","remove"));var P=D.find(".myf1000ActionLabel");P.text(P.attr("data-remove-label"))}function A(){C.attr("action",C.attr("action").replace("remove","add"));var P=D.find(".myf1000ActionLabel");P.text(P.attr("data-add-label"))}return{articlesChanged:M,enable:H,disable:F}}function EmailArticles(){$(".emailArticleForm").live("submit",E);function A(F){var G=$(".emailArticleForm");$.each(F.types,function(I,H){$(G).find(':hidden[name="'+I+'"]').remove();$(H).each(function(){$(G).append('<input type="hidden" name="'+I+'" value="'+this+'"/>')})})}function D(){$("#email-articles-link").attr("rel","").unbind("click");$("#email-articles-link").replaceWith($("#email-articles-link").clone());$("#email-articles-link").click(function(){messenger.addWarning("You must check the articles you wish to email first.")})}function C(){$("#email-articles-link").attr("rel","facebox").unbind("click");$("#email-articles-link").replaceWith($("#email-articles-link").clone())}function E(){var F=$(this);F.find(".inputError").remove();F.find(".ticker").show();jQuery.ajax({type:"POST",url:"/emailArticles.json",data:F.serialize(),dataType:"json",success:function(H){if(H.success){messenger.addMessage(H.message);$(document).trigger("close.facebox");$(document).trigger("close.f1000box");F.find(".ticker").hide();B()}else{if(H.errors){F.find(".ticker").hide();var G=$("img[name=captchaImage]");if(G){new CaptchaHelper().clearInput().setNewChallengeImage()}$.each(H.errors,function(K,L){var J=F.find(':input[name="'+K+'"]').parent();var I=$('<div class="inputError"></div>').text(L);J.append(I)})}}},error:function(){messenger.addError("A problem occurred while sending your email, please refresh and try again.");F.find(".ticker").hide()}});return false}function B(){_gaq=_gaq||[];_gaq.push(["_trackSocial","F1000","email article(s)"])}return{articlesChanged:A,enable:C,disable:D}}(function(C){var A=C.scrollTo=function(D,E,F){C(window).scrollTo(D,E,F)};A.defaults={axis:"xy",duration:parseFloat(C.fn.jquery)>=1.3?0:1};A.window=function(D){return C(window)._scrollable()};C.fn._scrollable=function(){return this.map(function(){var D=this,E=!D.nodeName||C.inArray(D.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!E){return D}var F=(D.contentWindow||D).document||D.ownerDocument||D;return C.browser.safari||F.compatMode=="BackCompat"?F.body:F.documentElement})};C.fn.scrollTo=function(F,E,D){if(typeof E=="object"){D=E;E=0}if(typeof D=="function"){D={onAfter:D}}if(F=="max"){F=9000000000}D=C.extend({},A.defaults,D);E=E||D.speed||D.duration;D.queue=D.queue&&D.axis.length>1;if(D.queue){E/=2}D.offset=B(D.offset);D.over=B(D.over);return this._scrollable().each(function(){var M=this,K=C(M),L=F,I,J={},G=K.is("html,body");switch(typeof L){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(L)){L=B(L);break}L=C(L,this);case"object":if(L.is||L.style){I=(L=C(L)).offset()}}C.each(D.axis.split(""),function(P,Q){var S=Q=="x"?"Left":"Top",R=S.toLowerCase(),U="scroll"+S,O=M[U],N=A.max(M,Q);if(I){J[U]=I[R]+(G?0:O-K.offset()[R]);if(D.margin){J[U]-=parseInt(L.css("margin"+S))||0;J[U]-=parseInt(L.css("border"+S+"Width"))||0}J[U]+=D.offset[R]||0;if(D.over[R]){J[U]+=L[Q=="x"?"width":"height"]()*D.over[R]}}else{var T=L[R];J[U]=T.slice&&T.slice(-1)=="%"?parseFloat(T)/100*N:T}if(/^\d+$/.test(J[U])){J[U]=J[U]<=0?0:Math.min(J[U],N)}if(!P&&D.queue){if(O!=J[U]){H(D.onAfterFirst)}delete J[U]}});H(D.onAfter);function H(N){K.animate(J,E,D.easing,N&&function(){N.call(this,F,D)})}}).end()};A.max=function(F,G){var I=G=="x"?"Width":"Height",H="scroll"+I;if(!C(F).is("html,body")){return F[H]-C(F)[I.toLowerCase()]()}var J="client"+I,E=F.ownerDocument.documentElement,D=F.ownerDocument.body;return Math.max(E[H],D[H])-Math.min(E[J],D[J])};function B(D){return typeof D=="object"?D:{top:D,left:D}}})(jQuery);(function(A){A.belowthefold=function(D,C){var B=A(window).height()+A(window).scrollTop();return B<=A(D).offset().top-C.threshold};A.abovethetop=function(B,D){var C=A(window).scrollTop();return C>=A(B).offset().top+A(B).height()-D.threshold};A.rightofscreen=function(D,C){var B=A(window).width()+A(window).scrollLeft();return B<=A(D).offset().left-C.threshold};A.leftofscreen=function(B,D){var C=A(window).scrollLeft();return C>=A(B).offset().left+A(B).width()-D.threshold};A.inviewport=function(B,C){return !A.rightofscreen(B,C)&&!A.leftofscreen(B,C)&&!A.belowthefold(B,C)&&!A.abovethetop(B,C)};A.extend(A.expr[":"],{"below-the-fold":function(D,C,B){return A.belowthefold(D,{threshold:0})},"above-the-top":function(D,C,B){return A.abovethetop(D,{threshold:0})},"left-of-screen":function(D,C,B){return A.leftofscreen(D,{threshold:0})},"right-of-screen":function(D,C,B){return A.rightofscreen(D,{threshold:0})},"in-viewport":function(D,C,B){return A.inviewport(D,{threshold:0})}})})(jQuery);
