text: /*!
   * 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(aR,aP){function af(b){return aL.isWindow(b)?b:b.nodeType===9?b.defaultView||b.parentWindow:!1}function al(e){if(!cn[e]){var d=aL("<"+e+">").appendTo("body"),f=d.css("display");d.remove();if(f==="none"||f===""){f="block"}cn[e]=f}return cn[e]}function an(e,d){var f={};aL.each(ao.concat.apply([],ao.slice(0,d)),function(){f[this]=e});return f}function c2(){try{return new aR.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}function cu(){try{return new aR.XMLHttpRequest}catch(a){}}function cw(){aL(aR).unload(function(){for(var b in cz){cz[b](0,1)}})}function cI(C,B){C.dataFilter&&(B=C.dataFilter(B,C.dataType));var A=C.dataTypes,z={},y,x,w=A.length,v,u=A[0],s,r,q,d,b;for(y=1;y<w;y++){if(y===1){for(x in C.converters){typeof x==="string"&&(z[x.toLowerCase()]=C.converters[x])}}s=u,u=A[y];if(u==="*"){u=s}else{if(s!=="*"&&s!==u){r=s+" "+u,q=z[r]||z["* "+u];if(!q){b=aP;for(d in z){v=d.split(" ");if(v[0]===s||v[0]==="*"){b=z[v[1]+" "+u];if(b){d=z[d],d===!0?q=b:b===!0&&(q=d);break}}}}!q&&!b&&aL.error("No conversion from "+r.replace(" "," to ")),q!==!0&&(B=q?q(B):b(d(B)))}}}return B}function cJ(u,s,r){var q=u.contents,p=u.dataTypes,o=u.responseFields,n,m,l,b;for(m in o){m in r&&(s[o[m]]=r[m])}while(p[0]==="*"){p.shift(),n===aP&&(n=u.mimeType||s.getResponseHeader("content-type"))}if(n){for(m in q){if(q[m]&&q[m].test(n)){p.unshift(m);break}}}if(p[0] in r){l=p[0]}else{for(m in r){if(!p[0]||u.converters[m+" "+p[0]]){l=m;break}b||(b=m)}l=l||b}if(l){l!==p[0]&&p.unshift(l);return r[l]}}function cK(g,d,l,j){if(aL.isArray(d)&&d.length){aL.each(d,function(a,c){l||aQ.test(g)?j(g,c):cK(g+"["+(typeof c==="object"||aL.isArray(c)?a:"")+"]",c,l,j)})}else{if(l||d==null||typeof d!=="object"){j(g,d)}else{if(aL.isArray(d)||aL.isEmptyObject(d)){j(g,"")}else{for(var h in d){cK(g+"["+h+"]",d[h],l,j)}}}}}function cL(w,v,u,s,r,q){r=r||v.dataTypes[0],q=q||{},q[r]=!0;var p=w[r],o=0,n=p?p.length:0,m=w===cR,b;for(;o<n&&(m||!b);o++){b=p[o](v,u,s),typeof b==="string"&&(!m||q[b]?b=aP:(v.dataTypes.unshift(b),b=cL(w,v,u,s,b,q)))}(m||!b)&&!q["*"]&&(b=cL(w,v,u,s,"*",q));return b}function cM(b){return function(a,q){typeof a!=="string"&&(q=a,a="*");if(aL.isFunction(q)){var p=a.toLowerCase().split(cX),o=0,n=p.length,m,l,d;for(;o<n;o++){m=p[o],d=/^\+/.test(m),d&&(m=m.substr(1)||"*"),l=b[m]=b[m]||[],l[d?"unshift":"push"](q)}}}}function aU(g,d,l){var j=d==="width"?a1:aZ,h=d==="width"?g.offsetWidth:g.offsetHeight;if(l==="border"){return h}aL.each(j,function(){l||(h-=parseFloat(aL.css(g,"padding"+this))||0),l==="margin"?h+=parseFloat(aL.css(g,"margin"+this))||0:h-=parseFloat(aL.css(g,"border"+this+"Width"))||0});return h}function b7(d,c){c.src?aL.ajax({url:c.src,async:!1,dataType:"script"}):aL.globalEval(c.text||c.textContent||c.innerHTML||""),c.parentNode&&c.parentNode.removeChild(c)}function b9(b){return"getElementsByTagName" in b?b.getElementsByTagName("*"):"querySelectorAll" in b?b.querySelectorAll("*"):[]}function ck(e,d){if(d.nodeType===1){var f=d.nodeName.toLowerCase();d.clearAttributes(),d.mergeAttributes(e);if(f==="object"){d.outerHTML=e.outerHTML}else{if(f!=="input"||e.type!=="checkbox"&&e.type!=="radio"){if(f==="option"){d.selected=e.defaultSelected}else{if(f==="input"||f==="textarea"){d.defaultValue=e.defaultValue}}}else{e.checked&&(d.defaultChecked=d.checked=e.checked),d.value!==e.value&&(d.value=e.value)}}d.removeAttribute(aL.expando)}}function aT(s,r){if(r.nodeType===1&&aL.hasData(s)){var q=aL.expando,p=aL.data(s),o=aL.data(r,p);if(p=p[q]){var n=p.events;o=o[q]=aL.extend({},p);if(n){delete o.handle,o.events={};for(var m in n){for(var l=0,d=n[m].length;l<d;l++){aL.event.add(r,m+(n[m][l].namespace?".":"")+n[m][l].namespace,n[m][l],n[m][l].data)}}}}}}function c1(d,c){return aL.nodeName(d,"table")?d.getElementsByTagName("tbody")[0]||d.appendChild(d.ownerDocument.createElement("tbody")):d}function b8(f,d,h){if(aL.isFunction(d)){return aL.grep(f,function(b,j){var c=!!d.call(b,j,b);return c===h})}if(d.nodeType){return aL.grep(f,function(b,c){return b===d===h})}if(typeof d==="string"){var g=aL.grep(f,function(b){return b.nodeType===1});if(cp.test(d)){return aL.filter(d,g,!h)}d=aL.filter(d,g)}return aL.grep(f,function(b,c){return aL.inArray(b,d)>=0===h})}function cj(b){return !b||!b.parentNode||b.parentNode.nodeType===11}function ct(d,c){return(d&&d!=="*"?d+".":"")+c.replace(aj,"`").replace(ah,"&")}function cv(J){var I,H,G,F,E,D,C,B,A,z,y,x,w,v=[],u=[],r=aL._data(this,"events");if(J.liveFired!==this&&r&&r.live&&!J.target.disabled&&(!J.button||J.type!=="click")){J.namespace&&(x=new RegExp("(^|\\.)"+J.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),J.liveFired=this;var d=r.live.slice(0);for(C=0;C<d.length;C++){E=d[C],E.origType.replace(am,"")===J.type?u.push(E.selector):d.splice(C--,1)}F=aL(J.target).closest(u,J.currentTarget);for(B=0,A=F.length;B<A;B++){y=F[B];for(C=0;C<d.length;C++){E=d[C];if(y.selector===E.selector&&(!x||x.test(E.namespace))&&!y.elem.disabled){D=y.elem,G=null;if(E.preType==="mouseenter"||E.preType==="mouseleave"){J.type=E.preType,G=aL(J.relatedTarget).closest(E.selector)[0]}(!G||G!==D)&&v.push({elem:D,handleObj:E,level:y.level})}}}for(B=0,A=v.length;B<A;B++){F=v[B];if(H&&F.level>H){break}J.currentTarget=F.elem,J.data=F.handleObj.data,J.handleObj=F.handleObj,w=F.handleObj.origHandler.apply(F.elem,arguments);if(w===!1||J.isPropagationStopped()){H=F.level,w===!1&&(I=!1);if(J.isImmediatePropagationStopped()){break}}}return I}}function cA(b,h,g){var d=aL.extend({},g[0]);d.type=b,d.originalEvent={},d.liveFired=aP,aL.event.handle.call(h,d),d.isDefaultPrevented()&&g[0].preventDefault()}function ab(){return !0}function ac(){return !1}function aB(d){for(var c in d){if(c!=="toJSON"){return !1}}return !0}function aD(b,h,g){if(g===aP&&b.nodeType===1){g=b.getAttribute("data-"+h);if(typeof g==="string"){try{g=g==="true"?!0:g==="false"?!1:g==="null"?null:aL.isNaN(g)?aF.test(g)?aL.parseJSON(g):g:parseFloat(g)}catch(d){}aL.data(b,h,g)}else{g=aP}}return g}var aN=aR.document,aL=function(){function J(){if(!bh.isReady){try{aN.documentElement.doScroll("left")}catch(d){setTimeout(J,1);return}bh.ready()}}var bh=function(e,d){return new bh.fn.init(e,d,be)},bg=aR.jQuery,bf=aR.$,be,bd=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,bc=/\S/,bb=/^\s+/,ba=/\s+$/,Z=/\d/,Y=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,X=/^[\],:{}\s]*$/,W=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,V=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,T=/(?:^|:|,)(?:\s*\[)+/g,R=/(webkit)[ \/]([\w.]+)/,P=/(opera)(?:.*version)?[ \/]([\w.]+)/,N=/(msie) ([\w.]+)/,L=/(mozilla)(?:.*? rv:([\w.]+))?/,I=navigator.userAgent,H,c,b,a=Object.prototype.toString,U=Object.prototype.hasOwnProperty,S=Array.prototype.push,Q=Array.prototype.slice,O=String.prototype.trim,M=Array.prototype.indexOf,K={};bh.fn=bh.prototype={constructor:bh,init:function(d,p,o){var n,m,l,h;if(!d){return this}if(d.nodeType){this.context=this[0]=d,this.length=1;return this}if(d==="body"&&!p&&aN.body){this.context=aN,this[0]=aN.body,this.selector="body",this.length=1;return this}if(typeof d==="string"){n=bd.exec(d);if(!n||!n[1]&&p){return !p||p.jquery?(p||o).find(d):this.constructor(p).find(d)}if(n[1]){p=p instanceof bh?p[0]:p,h=p?p.ownerDocument||p:aN,l=Y.exec(d),l?bh.isPlainObject(p)?(d=[aN.createElement(l[1])],bh.fn.attr.call(d,p,!0)):d=[h.createElement(l[1])]:(l=bh.buildFragment([n[1]],[h]),d=(l.cacheable?bh.clone(l.fragment):l.fragment).childNodes);return bh.merge(this,d)}m=aN.getElementById(n[2]);if(m&&m.parentNode){if(m.id!==n[2]){return o.find(d)}this.length=1,this[0]=m}this.context=aN,this.selector=d;return this}if(bh.isFunction(d)){return o.ready(d)}d.selector!==aP&&(this.selector=d.selector,this.context=d.context);return bh.makeArray(d,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(d){return d==null?this.toArray():d<0?this[this.length+d]:this[d]},pushStack:function(f,d,h){var g=this.constructor();bh.isArray(f)?S.apply(g,f):bh.merge(g,f),g.prevObject=this,g.context=this.context,d==="find"?g.selector=this.selector+(this.selector?" ":"")+h:d&&(g.selector=this.selector+"."+d+"("+h+")");return g},each:function(e,d){return bh.each(this,e,d)},ready:function(d){bh.bindReady(),c.done(d);return this},eq:function(d){return d===-1?this.slice(d):this.slice(d,+d+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(d){return this.pushStack(bh.map(this,function(e,f){return d.call(e,f,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:S,sort:[].sort,splice:[].splice},bh.fn.init.prototype=bh.fn,bh.extend=bh.fn.extend=function(){var v,u,s,r,q,p,o=arguments[0]||{},n=1,m=arguments.length,d=!1;typeof o==="boolean"&&(d=o,o=arguments[1]||{},n=2),typeof o!=="object"&&!bh.isFunction(o)&&(o={}),m===n&&(o=this,--n);for(;n<m;n++){if((v=arguments[n])!=null){for(u in v){s=o[u],r=v[u];if(o===r){continue}d&&r&&(bh.isPlainObject(r)||(q=bh.isArray(r)))?(q?(q=!1,p=s&&bh.isArray(s)?s:[]):p=s&&bh.isPlainObject(s)?s:{},o[u]=bh.extend(d,p,r)):r!==aP&&(o[u]=r)}}}return o},bh.extend({noConflict:function(d){aR.$=bf,d&&(aR.jQuery=bg);return bh},isReady:!1,readyWait:1,ready:function(d){d===!0&&bh.readyWait--;if(!bh.readyWait||d!==!0&&!bh.isReady){if(!aN.body){return setTimeout(bh.ready,1)}bh.isReady=!0;if(d!==!0&&--bh.readyWait>0){return}c.resolveWith(aN,[bh]),bh.fn.trigger&&bh(aN).trigger("ready").unbind("ready")}},bindReady:function(){if(!c){c=bh._Deferred();if(aN.readyState==="complete"){return setTimeout(bh.ready,1)}if(aN.addEventListener){aN.addEventListener("DOMContentLoaded",b,!1),aR.addEventListener("load",bh.ready,!1)}else{if(aN.attachEvent){aN.attachEvent("onreadystatechange",b),aR.attachEvent("onload",bh.ready);var d=!1;try{d=aR.frameElement==null}catch(f){}aN.documentElement.doScroll&&d&&J()}}}},isFunction:function(d){return bh.type(d)==="function"},isArray:Array.isArray||function(d){return bh.type(d)==="array"},isWindow:function(d){return d&&typeof d==="object"&&"setInterval" in d},isNaN:function(d){return d==null||!Z.test(d)||isNaN(d)},type:function(d){return d==null?String(d):K[a.call(d)]||"object"},isPlainObject:function(d){if(!d||bh.type(d)!=="object"||d.nodeType||bh.isWindow(d)){return !1}if(d.constructor&&!U.call(d,"constructor")&&!U.call(d.constructor.prototype,"isPrototypeOf")){return !1}var e;for(e in d){}return e===aP||U.call(d,e)},isEmptyObject:function(e){for(var d in e){return !1}return !0},error:function(d){throw d},parseJSON:function(d){if(typeof d!=="string"||!d){return null}d=bh.trim(d);if(X.test(d.replace(W,"@").replace(V,"]").replace(T,""))){return aR.JSON&&aR.JSON.parse?aR.JSON.parse(d):(new Function("return "+d))()}bh.error("Invalid JSON: "+d)},parseXML:function(d,g,f){aR.DOMParser?(f=new DOMParser,g=f.parseFromString(d,"text/xml")):(g=new ActiveXObject("Microsoft.XMLDOM"),g.async="false",g.loadXML(d)),f=g.documentElement,(!f||!f.nodeName||f.nodeName==="parsererror")&&bh.error("Invalid XML: "+d);return g},noop:function(){},globalEval:function(f){if(f&&bc.test(f)){var d=aN.head||aN.getElementsByTagName("head")[0]||aN.documentElement,g=aN.createElement("script");bh.support.scriptEval()?g.appendChild(aN.createTextNode(f)):g.text=f,d.insertBefore(g,d.firstChild),d.removeChild(g)}},nodeName:function(e,d){return e.nodeName&&e.nodeName.toUpperCase()===d.toUpperCase()},each:function(d,r,q){var p,o=0,n=d.length,m=n===aP||bh.isFunction(d);if(q){if(m){for(p in d){if(r.apply(d[p],q)===!1){break}}}else{for(;o<n;){if(r.apply(d[o++],q)===!1){break}}}}else{if(m){for(p in d){if(r.call(d[p],p,d[p])===!1){break}}}else{for(var l=d[0];o<n&&r.call(l,o,l)!==!1;l=d[++o]){}}}return d},trim:O?function(d){return d==null?"":O.call(d)}:function(d){return d==null?"":(d+"").replace(bb,"").replace(ba,"")},makeArray:function(f,d){var h=d||[];if(f!=null){var g=bh.type(f);f.length==null||g==="string"||g==="function"||g==="regexp"||bh.isWindow(f)?S.call(h,f):bh.merge(h,f)}return h},inArray:function(f,e){if(e.indexOf){return e.indexOf(f)}for(var h=0,g=e.length;h<g;h++){if(e[h]===f){return h}}return -1},merge:function(g,m){var l=g.length,j=0;if(typeof m.length==="number"){for(var h=m.length;j<h;j++){g[l++]=m[j]}}else{while(m[j]!==aP){g[l++]=m[j++]}}g.length=l;return g},grep:function(j,h,p){var o=[],n;p=!!p;for(var m=0,l=j.length;m<l;m++){n=!!h(j[m],m),p!==n&&o.push(j[m])}return o},map:function(j,h,p){var o=[],n;for(var m=0,l=j.length;m<l;m++){n=h(j[m],m,p),n!=null&&(o[o.length]=n)}return o.concat.apply([],o)},guid:1,proxy:function(d,g,f){arguments.length===2&&(typeof g==="string"?(f=d,d=f[g],g=aP):g&&!bh.isFunction(g)&&(f=g,g=aP)),!g&&d&&(g=function(){return d.apply(f||this,arguments)}),d&&(g.guid=d.guid=d.guid||g.guid||bh.guid++);return g},access:function(s,r,q,p,o,n){var m=s.length;if(typeof r==="object"){for(var l in r){bh.access(s,l,r[l],p,o,q)}return s}if(q!==aP){p=!n&&p&&bh.isFunction(q);for(var d=0;d<m;d++){o(s[d],r,p?q.call(s[d],d,o(s[d],r)):q,n)}return s}return m?o(s[0],r):aP},now:function(){return(new Date).getTime()},uaMatch:function(e){e=e.toLowerCase();var d=R.exec(e)||P.exec(e)||N.exec(e)||e.indexOf("compatible")<0&&L.exec(e)||[];return{browser:d[1]||"",version:d[2]||"0"}},sub:function(){function f(e,h){return new f.fn.init(e,h)}bh.extend(!0,f,this),f.superclass=this,f.fn=f.prototype=this(),f.fn.constructor=f,f.subclass=this.subclass,f.fn.init=function d(e,h){h&&h instanceof bh&&!(h instanceof f)&&(h=f(h));return bh.fn.init.call(this,e,h,g)},f.fn.init.prototype=f.fn;var g=f(aN);return f},browser:{}}),bh.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,d){K["[object "+d+"]"]=d.toLowerCase()}),H=bh.uaMatch(I),H.browser&&(bh.browser[H.browser]=!0,bh.browser.version=H.version),bh.browser.webkit&&(bh.browser.safari=!0),M&&(bh.inArray=function(e,d){return M.call(d,e)}),bc.test("Â ")&&(bb=/^[\s\xA0]+/,ba=/[\s\xA0]+$/),be=bh(aN),aN.addEventListener?b=function(){aN.removeEventListener("DOMContentLoaded",b,!1),bh.ready()}:aN.attachEvent&&(b=function(){aN.readyState==="complete"&&(aN.detachEvent("onreadystatechange",b),bh.ready())});return bh}(),aJ="then done fail isResolved isRejected promise".split(" "),aH=[].slice;aL.extend({_Deferred:function(){var g=[],d,l,j,h={done:function(){if(!j){var n=arguments,m,f,e,b,a;d&&(a=d,d=0);for(m=0,f=n.length;m<f;m++){e=n[m],b=aL.type(e),b==="array"?h.done.apply(h,e):b==="function"&&g.push(e)}a&&h.resolveWith(a[0],a[1])}return this},resolveWith:function(b,a){if(!j&&!d&&!l){a=a||[],l=1;try{while(g[0]){g.shift().apply(b,a)}}finally{d=[b,a],l=0}}return this},resolve:function(){h.resolveWith(this,arguments);return this},isResolved:function(){return l||d},cancel:function(){j=1,g=[];return this}};return h},Deferred:function(e){var d=aL._Deferred(),h=aL._Deferred(),g;aL.extend(d,{then:function(b,f){d.done(b).fail(f);return this},fail:h.done,rejectWith:h.resolveWith,reject:h.resolve,isRejected:h.isResolved,promise:function(b){if(b==null){if(g){return g}g=b={}}var f=aJ.length;while(f--){b[aJ[f]]=d[aJ[f]]}return b}}),d.done(h.cancel).fail(d.cancel),delete d.cancel,e&&e.call(d,d);return d},when:function(f){function j(b){return function(a){d[b]=arguments.length>1?aH.call(arguments,0):a,--m||l.resolveWith(l,aH.call(d,0))}}var d=arguments,o=0,n=d.length,m=n,l=n<=1&&f&&aL.isFunction(f.promise)?f:aL.Deferred();if(n>1){for(;o<n;o++){d[o]&&aL.isFunction(d[o].promise)?d[o].promise().then(j(o),l.reject):--m}m||l.resolveWith(l,d)}else{l!==f&&l.resolveWith(l,n?[f]:[])}return l.promise()}}),function(){aL.support={};var w=aN.createElement("div");w.style.display="none",w.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var v=w.getElementsByTagName("*"),u=w.getElementsByTagName("a")[0],s=aN.createElement("select"),r=s.appendChild(aN.createElement("option")),q=w.getElementsByTagName("input")[0];if(v&&v.length&&u){aL.support={leadingWhitespace:w.firstChild.nodeType===3,tbody:!w.getElementsByTagName("tbody").length,htmlSerialize:!!w.getElementsByTagName("link").length,style:/red/.test(u.getAttribute("style")),hrefNormalized:u.getAttribute("href")==="/a",opacity:/^0.55$/.test(u.style.opacity),cssFloat:!!u.style.cssFloat,checkOn:q.value==="on",optSelected:r.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0,reliableMarginRight:!0},q.checked=!0,aL.support.noCloneChecked=q.cloneNode(!0).checked,s.disabled=!0,aL.support.optDisabled=!r.disabled;var p=null;aL.support.scriptEval=function(){if(p===null){var h=aN.documentElement,m=aN.createElement("script"),l="script"+aL.now();try{m.appendChild(aN.createTextNode("window."+l+"=1;"))}catch(j){}h.insertBefore(m,h.firstChild),aR[l]?(p=!0,delete aR[l]):p=!1,h.removeChild(m)}return p};try{delete w.test}catch(o){aL.support.deleteExpando=!1}!w.addEventListener&&w.attachEvent&&w.fireEvent&&(w.attachEvent("onclick",function d(){aL.support.noCloneEvent=!1,w.detachEvent("onclick",d)}),w.cloneNode(!0).fireEvent("onclick")),w=aN.createElement("div"),w.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";var c=aN.createDocumentFragment();c.appendChild(w.firstChild),aL.support.checkClone=c.cloneNode(!0).cloneNode(!0).lastChild.checked,aL(function(){var g=aN.createElement("div"),f=aN.getElementsByTagName("body")[0];if(f){g.style.width=g.style.paddingLeft="1px",f.appendChild(g),aL.boxModel=aL.support.boxModel=g.offsetWidth===2,"zoom" in g.style&&(g.style.display="inline",g.style.zoom=1,aL.support.inlineBlockNeedsLayout=g.offsetWidth===2,g.style.display="",g.innerHTML="<div style='width:4px;'></div>",aL.support.shrinkWrapBlocks=g.offsetWidth!==2),g.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";var h=g.getElementsByTagName("td");aL.support.reliableHiddenOffsets=h[0].offsetHeight===0,h[0].style.display="",h[1].style.display="none",aL.support.reliableHiddenOffsets=aL.support.reliableHiddenOffsets&&h[0].offsetHeight===0,g.innerHTML="",aN.defaultView&&aN.defaultView.getComputedStyle&&(g.style.width="1px",g.style.marginRight="0",aL.support.reliableMarginRight=(parseInt(aN.defaultView.getComputedStyle(g,null).marginRight,10)||0)===0),f.removeChild(g).style.display="none",g=h=null}});var a=function(f){var e=aN.createElement("div");f="on"+f;if(!e.attachEvent){return !0}var g=f in e;g||(e.setAttribute(f,"return;"),g=typeof e[f]==="function");return g};aL.support.submitBubbles=a("submit"),aL.support.changeBubbles=a("change"),w=v=u=null}}();var aF=/^(?:\{.*\}|\[.*\])$/;aL.extend({cache:{},uuid:0,expando:"jQuery"+(aL.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(b){b=b.nodeType?aL.cache[b[aL.expando]]:b[aL.expando];return !!b&&!aB(b)},data:function(u,s,r,q){if(aL.acceptData(u)){var p=aL.expando,o=typeof s==="string",n,m=u.nodeType,d=m?aL.cache:u,b=m?u[aL.expando]:u[aL.expando]&&aL.expando;if((!b||q&&b&&!d[b][p])&&o&&r===aP){return}b||(m?u[aL.expando]=b=++aL.uuid:b=aL.expando),d[b]||(d[b]={},m||(d[b].toJSON=aL.noop));if(typeof s==="object"||typeof s==="function"){q?d[b][p]=aL.extend(d[b][p],s):d[b]=aL.extend(d[b],s)}n=d[b],q&&(n[p]||(n[p]={}),n=n[p]),r!==aP&&(n[s]=r);if(s==="events"&&!n[s]){return n[p]&&n[p].events}return o?n[s]:n}},removeData:function(s,r,q){if(aL.acceptData(s)){var p=aL.expando,o=s.nodeType,n=o?aL.cache:s,m=o?s[aL.expando]:aL.expando;if(!n[m]){return}if(r){var d=q?n[m][p]:n[m];if(d){delete d[r];if(!aB(d)){return}}}if(q){delete n[m][p];if(!aB(n[m])){return}}var a=n[m][p];aL.support.deleteExpando||n!=aR?delete n[m]:n[m]=null,a?(n[m]={},o||(n[m].toJSON=aL.noop),n[m][p]=a):o&&(aL.support.deleteExpando?delete s[aL.expando]:s.removeAttribute?s.removeAttribute(aL.expando):s[aL.expando]=null)}},_data:function(e,d,f){return aL.data(e,d,f,!0)},acceptData:function(d){if(d.nodeName){var c=aL.noData[d.nodeName.toLowerCase()];if(c){return c!==!0&&d.getAttribute("classid")===c}}return !0}}),aL.fn.extend({data:function(b,p){var o=null;if(typeof b==="undefined"){if(this.length){o=aL.data(this[0]);if(this[0].nodeType===1){var n=this[0].attributes,m;for(var l=0,h=n.length;l<h;l++){m=n[l].name,m.indexOf("data-")===0&&(m=m.substr(5),aD(this[0],m,o[m]))}}}return o}if(typeof b==="object"){return this.each(function(){aL.data(this,b)})}var d=b.split(".");d[1]=d[1]?"."+d[1]:"";if(p===aP){o=this.triggerHandler("getData"+d[1]+"!",[d[0]]),o===aP&&this.length&&(o=aL.data(this[0],b),o=aD(this[0],b,o));return o===aP&&d[1]?this.data(d[0]):o}return this.each(function(){var a=aL(this),c=[d[0],p];a.triggerHandler("setData"+d[1]+"!",c),aL.data(this,b,p),a.triggerHandler("changeData"+d[1]+"!",c)})},removeData:function(b){return this.each(function(){aL.removeData(this,b)})}}),aL.extend({queue:function(f,d,h){if(f){d=(d||"fx")+"queue";var g=aL._data(f,d);if(!h){return g||[]}!g||aL.isArray(h)?g=aL._data(f,d,aL.makeArray(h)):g.push(h);return g}},dequeue:function(f,d){d=d||"fx";var h=aL.queue(f,d),g=h.shift();g==="inprogress"&&(g=h.shift()),g&&(d==="fx"&&h.unshift("inprogress"),g.call(f,function(){aL.dequeue(f,d)})),h.length||aL.removeData(f,d+"queue",!0)}}),aL.fn.extend({queue:function(b,d){typeof b!=="string"&&(d=b,b="fx");if(d===aP){return aL.queue(this[0],b)}return this.each(function(a){var c=aL.queue(this,b,d);b==="fx"&&c[0]!=="inprogress"&&aL.dequeue(this,b)})},dequeue:function(b){return this.each(function(){aL.dequeue(this,b)})},delay:function(d,c){d=aL.fx?aL.fx.speeds[d]||d:d,c=c||"fx";return this.queue(c,function(){var a=this;setTimeout(function(){aL.dequeue(a,c)},d)})},clearQueue:function(b){return this.queue(b||"fx",[])}});var aA=/[\n\t\r]/g,az=/\s+/,ay=/\r/g,ax=/^(?:href|src|style)$/,aw=/^(?:button|input)$/i,au=/^(?:button|input|object|select|textarea)$/i,ar=/^a(?:rea)?$/i,ap=/^(?:radio|checkbox)$/i;aL.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"},aL.fn.extend({attr:function(d,c){return aL.access(this,d,c,!0,aL.attr)},removeAttr:function(d,c){return this.each(function(){aL.attr(this,d,""),this.nodeType===1&&this.removeAttribute(d)})},addClass:function(s){if(aL.isFunction(s)){return this.each(function(a){var e=aL(this);e.addClass(s.call(this,a,e.attr("class")))})}if(s&&typeof s==="string"){var r=(s||"").split(az);for(var q=0,p=this.length;q<p;q++){var o=this[q];if(o.nodeType===1){if(o.className){var n=" "+o.className+" ",m=o.className;for(var l=0,d=r.length;l<d;l++){n.indexOf(" "+r[l]+" ")<0&&(m+=" "+r[l])}o.className=aL.trim(m)}else{o.className=s}}}}return this},removeClass:function(d){if(aL.isFunction(d)){return this.each(function(a){var e=aL(this);e.removeClass(d.call(this,a,e.attr("class")))})}if(d&&typeof d==="string"||d===aP){var q=(d||"").split(az);for(var p=0,o=this.length;p<o;p++){var n=this[p];if(n.nodeType===1&&n.className){if(d){var m=(" "+n.className+" ").replace(aA," ");for(var j=0,b=q.length;j<b;j++){m=m.replace(" "+q[j]+" "," ")}n.className=aL.trim(m)}else{n.className=""}}}}return this},toggleClass:function(f,d){var h=typeof f,g=typeof d==="boolean";if(aL.isFunction(f)){return this.each(function(b){var a=aL(this);a.toggleClass(f.call(this,b,a.attr("class"),d),d)})}return this.each(function(){if(h==="string"){var l,e=0,c=aL(this),b=d,a=f.split(az);while(l=a[e++]){b=g?b:!c.hasClass(l),c[b?"addClass":"removeClass"](l)}}else{if(h==="undefined"||h==="boolean"){this.className&&aL._data(this,"__className__",this.className),this.className=this.className||f===!1?"":aL._data(this,"__className__")||""}}})},hasClass:function(f){var e=" "+f+" ";for(var h=0,g=this.length;h<g;h++){if((" "+this[h].className+" ").replace(aA," ").indexOf(e)>-1){return !0}}return !1},val:function(w){if(!arguments.length){var v=this[0];if(v){if(aL.nodeName(v,"option")){var u=v.attributes.value;return !u||u.specified?v.value:v.text}if(aL.nodeName(v,"select")){var s=v.selectedIndex,r=[],q=v.options,p=v.type==="select-one";if(s<0){return null}for(var o=p?s:0,l=p?s+1:q.length;o<l;o++){var d=q[o];if(d.selected&&(aL.support.optDisabled?!d.disabled:d.getAttribute("disabled")===null)&&(!d.parentNode.disabled||!aL.nodeName(d.parentNode,"optgroup"))){w=aL(d).val();if(p){return w}r.push(w)}}if(p&&!r.length&&q.length){return aL(q[s]).val()}return r}if(ap.test(v.type)&&!aL.support.checkOn){return v.getAttribute("value")===null?"on":v.value}return(v.value||"").replace(ay,"")}return aP}var b=aL.isFunction(w);return this.each(function(a){var j=aL(this),h=w;if(this.nodeType===1){b&&(h=w.call(this,a,j.val())),h==null?h="":typeof h==="number"?h+="":aL.isArray(h)&&(h=aL.map(h,function(c){return c==null?"":c+""}));if(aL.isArray(h)&&ap.test(this.type)){this.checked=aL.inArray(j.val(),h)>=0}else{if(aL.nodeName(this,"select")){var g=aL.makeArray(h);aL("option",this).each(function(){this.selected=aL.inArray(aL(this).val(),g)>=0}),g.length||(this.selectedIndex=-1)}else{this.value=h}}}})}}),aL.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(u,s,r,q){if(!u||u.nodeType===3||u.nodeType===8||u.nodeType===2){return aP}if(q&&s in aL.attrFn){return aL(u)[s](r)}var p=u.nodeType!==1||!aL.isXMLDoc(u),o=r!==aP;s=p&&aL.props[s]||s;if(u.nodeType===1){var n=ax.test(s);if(s==="selected"&&!aL.support.optSelected){var m=u.parentNode;m&&(m.selectedIndex,m.parentNode&&m.parentNode.selectedIndex)}if((s in u||u[s]!==aP)&&p&&!n){o&&(s==="type"&&aw.test(u.nodeName)&&u.parentNode&&aL.error("type property can't be changed"),r===null?u.nodeType===1&&u.removeAttribute(s):u[s]=r);if(aL.nodeName(u,"form")&&u.getAttributeNode(s)){return u.getAttributeNode(s).nodeValue}if(s==="tabIndex"){var d=u.getAttributeNode("tabIndex");return d&&d.specified?d.value:au.test(u.nodeName)||ar.test(u.nodeName)&&u.href?0:aP}return u[s]}if(!aL.support.style&&p&&s==="style"){o&&(u.style.cssText=""+r);return u.style.cssText}o&&u.setAttribute(s,""+r);if(!u.attributes[s]&&(u.hasAttribute&&!u.hasAttribute(s))){return aP}var b=!aL.support.hrefNormalized&&p&&n?u.getAttribute(s,2):u.getAttribute(s);return b===null?aP:b}o&&(u[s]=r);return u[s]}});var am=/\.(.*)$/,ak=/^(?:textarea|input|select)$/i,aj=/\./g,ah=/ /g,ae=/[^\w\s.|`]/g,ad=function(b){return b.replace(ae,"\\$&")};aL.event={add:function(E,D,C,B){if(E.nodeType!==3&&E.nodeType!==8){try{aL.isWindow(E)&&(E!==aR&&!E.frameElement)&&(E=aR)}catch(A){}if(C===!1){C=ac}else{if(!C){return}}var z,y;C.handler&&(z=C,C=z.handler),C.guid||(C.guid=aL.guid++);var x=aL._data(E);if(!x){return}var w=x.events,v=x.handle;w||(x.events=w={}),v||(x.handle=v=function(c){return typeof aL!=="undefined"&&aL.event.triggered!==c.type?aL.event.handle.apply(v.elem,arguments):aP}),v.elem=E,D=D.split(" ");var u,s=0,d;while(u=D[s++]){y=z?aL.extend({},z):{handler:C,data:B},u.indexOf(".")>-1?(d=u.split("."),u=d.shift(),y.namespace=d.slice(0).sort().join(".")):(d=[],y.namespace=""),y.type=u,y.guid||(y.guid=C.guid);var b=w[u],a=aL.event.special[u]||{};if(!b){b=w[u]=[];if(!a.setup||a.setup.call(E,B,d,v)===!1){E.addEventListener?E.addEventListener(u,v,!1):E.attachEvent&&E.attachEvent("on"+u,v)}}a.add&&(a.add.call(E,y),y.handler.guid||(y.handler.guid=C.guid)),b.push(y),aL.event.global[u]=!0}E=null}},global:{},remove:function(L,K,J,I){if(L.nodeType!==3&&L.nodeType!==8){J===!1&&(J=ac);var H,G,F,E,D=0,C,B,A,z,y,x,w,v=aL.hasData(L)&&aL._data(L),d=v&&v.events;if(!v||!d){return}K&&K.type&&(J=K.handler,K=K.type);if(!K||typeof K==="string"&&K.charAt(0)==="."){K=K||"";for(G in d){aL.event.remove(L,G+K)}return}K=K.split(" ");while(G=K[D++]){w=G,x=null,C=G.indexOf(".")<0,B=[],C||(B=G.split("."),G=B.shift(),A=new RegExp("(^|\\.)"+aL.map(B.slice(0).sort(),ad).join("\\.(?:.*\\.)?")+"(\\.|$)")),y=d[G];if(!y){continue}if(!J){for(E=0;E<y.length;E++){x=y[E];if(C||A.test(x.namespace)){aL.event.remove(L,w,x.handler,E),y.splice(E--,1)}}continue}z=aL.event.special[G]||{};for(E=I||0;E<y.length;E++){x=y[E];if(J.guid===x.guid){if(C||A.test(x.namespace)){I==null&&y.splice(E--,1),z.remove&&z.remove.call(L,x)}if(I!=null){break}}}if(y.length===0||I!=null&&y.length===1){(!z.teardown||z.teardown.call(L,B)===!1)&&aL.removeEvent(L,G,v.handle),H=null,delete d[G]}}if(aL.isEmptyObject(d)){var b=v.handle;b&&(b.elem=null),delete v.events,delete v.handle,aL.isEmptyObject(v)&&aL.removeData(L,aP,!0)}}},trigger:function(C,B,A){var z=C.type||C,y=arguments[3];if(!y){C=typeof C==="object"?C[aL.expando]?C:aL.extend(aL.Event(z),C):aL.Event(z),z.indexOf("!")>=0&&(C.type=z=z.slice(0,-1),C.exclusive=!0),A||(C.stopPropagation(),aL.event.global[z]&&aL.each(aL.cache,function(){var a=aL.expando,c=this[a];c&&c.events&&c.events[z]&&aL.event.trigger(C,B,c.handle.elem)}));if(!A||A.nodeType===3||A.nodeType===8){return aP}C.result=aP,C.target=A,B=aL.makeArray(B),B.unshift(C)}C.currentTarget=A;var x=aL._data(A,"handle");x&&x.apply(A,B);var w=A.parentNode||A.ownerDocument;try{A&&A.nodeName&&aL.noData[A.nodeName.toLowerCase()]||A["on"+z]&&A["on"+z].apply(A,B)===!1&&(C.result=!1,C.preventDefault())}catch(v){}if(!C.isPropagationStopped()&&w){aL.event.trigger(C,B,w,!0)}else{if(!C.isDefaultPrevented()){var u,s=C.target,r=z.replace(am,""),q=aL.nodeName(s,"a")&&r==="click",d=aL.event.special[r]||{};if((!d._default||d._default.call(A,C)===!1)&&!q&&!(s&&s.nodeName&&aL.noData[s.nodeName.toLowerCase()])){try{s[r]&&(u=s["on"+r],u&&(s["on"+r]=null),aL.event.triggered=C.type,s[r]())}catch(b){}u&&(s["on"+r]=u),aL.event.triggered=aP}}}},handle:function(y){var x,w,v,u,s,r=[],q=aL.makeArray(arguments);y=q[0]=aL.event.fix(y||aR.event),y.currentTarget=this,x=y.type.indexOf(".")<0&&!y.exclusive,x||(v=y.type.split("."),y.type=v.shift(),r=v.slice(0).sort(),u=new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.)?")+"(\\.|$)")),y.namespace=y.namespace||r.join("."),s=aL._data(this,"events"),w=(s||{})[y.type];if(s&&w){w=w.slice(0);for(var p=0,d=w.length;p<d;p++){var b=w[p];if(x||u.test(b.namespace)){y.handler=b.handler,y.data=b.data,y.handleObj=b;var a=b.handler.apply(this,q);a!==aP&&(y.result=a,a===!1&&(y.preventDefault(),y.stopPropagation()));if(y.isImmediatePropagationStopped()){break}}}}return y.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(b){if(b[aL.expando]){return b}var m=b;b=aL.Event(m);for(var l=this.props.length,j;l;){j=this.props[--l],b[j]=m[j]}b.target||(b.target=b.srcElement||aN),b.target.nodeType===3&&(b.target=b.target.parentNode),!b.relatedTarget&&b.fromElement&&(b.relatedTarget=b.fromElement===b.target?b.toElement:b.fromElement);if(b.pageX==null&&b.clientX!=null){var d=aN.documentElement,c=aN.body;b.pageX=b.clientX+(d&&d.scrollLeft||c&&c.scrollLeft||0)-(d&&d.clientLeft||c&&c.clientLeft||0),b.pageY=b.clientY+(d&&d.scrollTop||c&&c.scrollTop||0)-(d&&d.clientTop||c&&c.clientTop||0)}b.which==null&&(b.charCode!=null||b.keyCode!=null)&&(b.which=b.charCode!=null?b.charCode:b.keyCode),!b.metaKey&&b.ctrlKey&&(b.metaKey=b.ctrlKey),!b.which&&b.button!==aP&&(b.which=b.button&1?1:b.button&2?3:b.button&4?2:0);return b},guid:100000000,proxy:aL.proxy,special:{ready:{setup:aL.bindReady,teardown:aL.noop},live:{add:function(b){aL.event.add(this,ct(b.origType,b.selector),aL.extend({},b,{handler:cv,guid:b.handler.guid}))},remove:function(b){aL.event.remove(this,ct(b.origType,b.selector),b)}},beforeunload:{setup:function(e,d,f){aL.isWindow(this)&&(this.onbeforeunload=f)},teardown:function(d,c){this.onbeforeunload===c&&(this.onbeforeunload=null)}}}},aL.removeEvent=aN.removeEventListener?function(e,d,f){e.removeEventListener&&e.removeEventListener(d,f,!1)}:function(e,d,f){e.detachEvent&&e.detachEvent("on"+d,f)},aL.Event=function(b){if(!this.preventDefault){return new aL.Event(b)}b&&b.type?(this.originalEvent=b,this.type=b.type,this.isDefaultPrevented=b.defaultPrevented||b.returnValue===!1||b.getPreventDefault&&b.getPreventDefault()?ab:ac):this.type=b,this.timeStamp=aL.now(),this[aL.expando]=!0},aL.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ab;var b=this.originalEvent;b&&(b.preventDefault?b.preventDefault():b.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=ab;var b=this.originalEvent;b&&(b.stopPropagation&&b.stopPropagation(),b.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ab,this.stopPropagation()},isDefaultPrevented:ac,isPropagationStopped:ac,isImmediatePropagationStopped:ac};var aa=function(d){var c=d.relatedTarget;try{if(c&&c!==aN&&!c.parentNode){return}while(c&&c!==this){c=c.parentNode}c!==this&&(d.type=d.data,aL.event.handle.apply(this,arguments))}catch(f){}},cH=function(b){b.type=b.data,aL.event.handle.apply(this,arguments)};aL.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(d,c){aL.event.special[d]={setup:function(a){aL.event.add(this,c,a&&a.selector?cH:aa,d)},teardown:function(b){aL.event.remove(this,c,b&&b.selector?cH:aa)}}}),aL.support.submitBubbles||(aL.event.special.submit={setup:function(d,c){if(this.nodeName&&this.nodeName.toLowerCase()!=="form"){aL.event.add(this,"click.specialSubmit",function(f){var e=f.target,g=e.type;(g==="submit"||g==="image")&&aL(e).closest("form").length&&cA("submit",this,arguments)}),aL.event.add(this,"keypress.specialSubmit",function(f){var e=f.target,g=e.type;(g==="text"||g==="password")&&aL(e).closest("form").length&&f.keyCode===13&&cA("submit",this,arguments)})}else{return !1}},teardown:function(b){aL.event.remove(this,".specialSubmit")}});if(!aL.support.changeBubbles){var cG,cE=function(e){var d=e.type,f=e.value;d==="radio"||d==="checkbox"?f=e.checked:d==="select-multiple"?f=e.selectedIndex>-1?aL.map(e.options,function(b){return b.selected}).join("-"):"":e.nodeName.toLowerCase()==="select"&&(f=e.selectedIndex);return f},cC=function cC(b){var h=b.target,g,d;if(ak.test(h.nodeName)&&!h.readOnly){g=aL._data(h,"_change_data"),d=cE(h),(b.type!=="focusout"||h.type!=="radio")&&aL._data(h,"_change_data",d);if(g===aP||d===g){return}if(g!=null||d){b.type="change",b.liveFired=aP,aL.event.trigger(b,arguments[1],h)}}};aL.event.special.change={filters:{focusout:cC,beforedeactivate:cC,click:function(e){var d=e.target,f=d.type;(f==="radio"||f==="checkbox"||d.nodeName.toLowerCase()==="select")&&cC.call(this,e)},keydown:function(e){var d=e.target,f=d.type;(e.keyCode===13&&d.nodeName.toLowerCase()!=="textarea"||e.keyCode===32&&(f==="checkbox"||f==="radio")||f==="select-multiple")&&cC.call(this,e)},beforeactivate:function(d){var c=d.target;aL._data(c,"_change_data",cE(c))}},setup:function(e,d){if(this.type==="file"){return !1}for(var f in cG){aL.event.add(this,f+".specialChange",cG[f])}return ak.test(this.nodeName)},teardown:function(b){aL.event.remove(this,".specialChange");return ak.test(this.nodeName)}},cG=aL.event.special.change.filters,cG.focus=cG.beforeactivate}aN.addEventListener&&aL.each({focus:"focusin",blur:"focusout"},function(d,c){function g(b){var e=aL.event.fix(b);e.type=c,e.originalEvent={},aL.event.trigger(e,null,e.target),e.isDefaultPrevented()&&b.preventDefault()}var h=0;aL.event.special[c]={setup:function(){h++===0&&aN.addEventListener(d,g,!0)},teardown:function(){--h===0&&aN.removeEventListener(d,g,!0)}}}),aL.each(["bind","one"],function(b,d){aL.fn[d]=function(c,q,p){if(typeof c==="object"){for(var o in c){this[d](o,q,c[o],p)}return this}if(aL.isFunction(q)||q===!1){p=q,q=aP}var n=d==="one"?aL.proxy(p,function(e){aL(this).unbind(e,n);return p.apply(this,arguments)}):p;if(c==="unload"&&d!=="one"){this.one(c,q,p)}else{for(var m=0,l=this.length;m<l;m++){aL.event.add(this[m],c,n,q)}}return this}}),aL.fn.extend({unbind:function(g,d){if(typeof g!=="object"||g.preventDefault){for(var j=0,h=this.length;j<h;j++){aL.event.remove(this[j],g,d)}}else{for(var l in g){this.unbind(l,g[l])}}return this},delegate:function(f,e,h,g){return this.live(e,h,g,f)},undelegate:function(e,d,f){return arguments.length===0?this.unbind("live"):this.die(d,null,f,e)},trigger:function(d,c){return this.each(function(){aL.event.trigger(d,c,this)})},triggerHandler:function(e,d){if(this[0]){var f=aL.Event(e);f.preventDefault(),f.stopPropagation(),aL.event.trigger(f,d,this[0]);return f.result}},toggle:function(e){var d=arguments,f=1;while(f<d.length){aL.proxy(e,d[f++])}return this.click(aL.proxy(e,function(b){var a=(aL._data(this,"lastToggle"+e.guid)||0)%f;aL._data(this,"lastToggle"+e.guid,a+1),b.preventDefault();return d[a].apply(this,arguments)||!1}))},hover:function(d,c){return this.mouseenter(d).mouseleave(c||d)}});var cy={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};aL.each(["live","die"],function(b,d){aL.fn[d]=function(E,D,C,B){var A,z=0,y,x,w,v=B||this.selector,u=B?this:aL(this.context);if(typeof E==="object"&&!E.preventDefault){for(var s in E){u[d](s,D,E[s],v)}return this}aL.isFunction(D)&&(C=D,D=aP),E=(E||"").split(" ");while((A=E[z++])!=null){y=am.exec(A),x="",y&&(x=y[0],A=A.replace(am,""));if(A==="hover"){E.push("mouseenter"+x,"mouseleave"+x);continue}w=A,A==="focus"||A==="blur"?(E.push(cy[A]+x),A=A+x):A=(cy[A]||A)+x;if(d==="live"){for(var r=0,c=u.length;r<c;r++){aL.event.add(u[r],"live."+ct(A,v),{data:D,selector:v,handler:C,origType:A,origHandler:C,preType:w})}}else{u.unbind("live."+ct(A,v),C)}}return this}}),aL.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(d,c){aL.fn[c]=function(b,e){e==null&&(e=b,b=null);return arguments.length>0?this.bind(c,b,e):this.trigger(c)},aL.attrFn&&(aL.attrFn[c]=!0)}),function(){function c(v,u,s,r,q,p){for(var o=0,n=r.length;o<n;o++){var m=r[o];if(m){var l=!1;m=m[v];while(m){if(m.sizcache===s){l=r[m.sizset];break}if(m.nodeType===1){p||(m.sizcache=s,m.sizset=o);if(typeof u!=="string"){if(m===u){l=!0;break}}else{if(E.filter(u,[m]).length>0){l=m;break}}}m=m[v]}r[o]=l}}}function d(v,u,s,r,q,p){for(var o=0,n=r.length;o<n;o++){var m=r[o];if(m){var l=!1;m=m[v];while(m){if(m.sizcache===s){l=r[m.sizset];break}m.nodeType===1&&!p&&(m.sizcache=s,m.sizset=o);if(m.nodeName.toLowerCase()===u){l=m;break}m=m[v]}r[o]=l}}}var L=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,K=0,J=Object.prototype.toString,I=!1,H=!0,G=/\\/g,F=/\W/;[0,0].sort(function(){H=!1;return 0});var E=function(R,P,O,N){O=O||[],P=P||aN;var M=P;if(P.nodeType!==1&&P.nodeType!==9){return[]}if(!R||typeof R!=="string"){return O}var v,p,m,l,f,a,W,V,U=!0,T=E.isXML(P),S=[],Q=R;do{L.exec(""),v=L.exec(Q);if(v){Q=v[3],S.push(v[1]);if(v[2]){l=v[3];break}}}while(v);if(S.length>1&&C.exec(R)){if(S.length===2&&D.relative[S[0]]){p=b(S[0]+S[1],P)}else{p=D.relative[S[0]]?[P]:E(S.shift(),P);while(S.length){R=S.shift(),D.relative[R]&&(R+=S.shift()),p=b(R,p)}}}else{!N&&S.length>1&&P.nodeType===9&&!T&&D.match.ID.test(S[0])&&!D.match.ID.test(S[S.length-1])&&(f=E.find(S.shift(),P,T),P=f.expr?E.filter(f.expr,f.set)[0]:f.set[0]);if(P){f=N?{expr:S.pop(),set:z(N)}:E.find(S.pop(),S.length===1&&(S[0]==="~"||S[0]==="+")&&P.parentNode?P.parentNode:P,T),p=f.expr?E.filter(f.expr,f.set):f.set,S.length>0?m=z(p):U=!1;while(S.length){a=S.pop(),W=a,D.relative[a]?W=S.pop():a="",W==null&&(W=P),D.relative[a](m,W,T)}}else{m=S=[]}}m||(m=p),m||E.error(a||R);if(J.call(m)==="[object Array]"){if(U){if(P&&P.nodeType===1){for(V=0;m[V]!=null;V++){m[V]&&(m[V]===!0||m[V].nodeType===1&&E.contains(P,m[V]))&&O.push(p[V])}}else{for(V=0;m[V]!=null;V++){m[V]&&m[V].nodeType===1&&O.push(p[V])}}}else{O.push.apply(O,m)}}else{z(m,O)}l&&(E(l,M,O,N),E.uniqueSort(O));return O};E.uniqueSort=function(f){if(x){I=H,f.sort(x);if(I){for(var e=1;e<f.length;e++){f[e]===f[e-1]&&f.splice(e--,1)}}}return f},E.matches=function(f,e){return E(f,null,null,e)},E.matchesSelector=function(f,e){return E(e,null,null,[f]).length>0},E.find=function(u,s,r){var q;if(!u){return[]}for(var p=0,o=D.order.length;p<o;p++){var n,m=D.order[p];if(n=D.leftMatch[m].exec(u)){var l=n[1];n.splice(1,1);if(l.substr(l.length-1)!=="\\"){n[1]=(n[1]||"").replace(G,""),q=D.find[m](n,s,r);if(q!=null){u=u.replace(D.match[m],"");break}}}}q||(q=typeof s.getElementsByTagName!=="undefined"?s.getElementsByTagName("*"):[]);return{set:q,expr:u}},E.filter=function(X,W,V,U){var T,S,R=X,Q=[],P=W,O=W&&W[0]&&E.isXML(W[0]);while(X&&W.length){for(var N in D.filter){if((T=D.leftMatch[N].exec(X))!=null&&T[2]){var M,v,u=D.filter[N],l=T[1];S=!1,T.splice(1,1);if(l.substr(l.length-1)==="\\"){continue}P===Q&&(Q=[]);if(D.preFilter[N]){T=D.preFilter[N](T,P,V,Q,U,O);if(T){if(T===!0){continue}}else{S=M=!0}}if(T){for(var Z=0;(v=P[Z])!=null;Z++){if(v){M=u(v,T,Z,P);var Y=U^!!M;V&&M!=null?Y?S=!0:P[Z]=!1:Y&&(Q.push(v),S=!0)}}}if(M!==aP){V||(P=Q),X=X.replace(D.match[N],"");if(!S){return[]}break}}}if(X===R){if(S==null){E.error(X)}else{break}}R=X}return P},E.error=function(e){throw"Syntax error, unrecognized expression: "+e};var D=E.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(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(l,j){var r=typeof j==="string",q=r&&!F.test(j),p=r&&!q;q&&(j=j.toLowerCase());for(var o=0,n=l.length,m;o<n;o++){if(m=l[o]){while((m=m.previousSibling)&&m.nodeType!==1){}l[o]=p||m&&m.nodeName.toLowerCase()===j?m||!1:m===j}}p&&E.filter(j,l,!0)},">":function(j,h){var p,o=typeof h==="string",n=0,m=j.length;if(o&&!F.test(h)){h=h.toLowerCase();for(;n<m;n++){p=j[n];if(p){var l=p.parentNode;j[n]=l.nodeName.toLowerCase()===h?l:!1}}}else{for(;n<m;n++){p=j[n],p&&(j[n]=o?p.parentNode:p.parentNode===h)}o&&E.filter(h,j,!0)}},"":function(h,e,n){var m,l=K++,j=c;typeof e==="string"&&!F.test(e)&&(e=e.toLowerCase(),m=e,j=d),j("parentNode",e,l,h,m,n)},"~":function(h,e,n){var m,l=K++,j=c;typeof e==="string"&&!F.test(e)&&(e=e.toLowerCase(),m=e,j=d),j("previousSibling",e,l,h,m,n)}},find:{ID:function(f,e,h){if(typeof e.getElementById!=="undefined"&&!h){var g=e.getElementById(f[1]);return g&&g.parentNode?[g]:[]}},NAME:function(h,g){if(typeof g.getElementsByName!=="undefined"){var n=[],m=g.getElementsByName(h[1]);for(var l=0,j=m.length;l<j;l++){m[l].getAttribute("name")===h[1]&&n.push(m[l])}return n.length===0?null:n}},TAG:function(f,e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName(f[1])}}},preFilter:{CLASS:function(l,j,r,q,p,o){l=" "+l[1].replace(G,"")+" ";if(o){return l}for(var n=0,m;(m=j[n])!=null;n++){m&&(p^(m.className&&(" "+m.className+" ").replace(/[\t\n\r]/g," ").indexOf(l)>=0)?r||q.push(m):r&&(j[n]=!1))}return !1},ID:function(e){return e[1].replace(G,"")},TAG:function(f,e){return f[1].replace(G,"").toLowerCase()},CHILD:function(f){if(f[1]==="nth"){f[2]||E.error(f[0]),f[2]=f[2].replace(/^\+|\s*/g,"");var e=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(f[2]==="even"&&"2n"||f[2]==="odd"&&"2n+1"||!/\D/.test(f[2])&&"0n+"+f[2]||f[2]);f[2]=e[1]+(e[2]||1)-0,f[3]=e[3]-0}else{f[2]&&E.error(f[0])}f[0]=K++;return f},ATTR:function(j,h,p,o,n,m){var l=j[1]=j[1].replace(G,"");!m&&D.attrMap[l]&&(j[1]=D.attrMap[l]),j[4]=(j[4]||j[5]||"").replace(G,""),j[2]==="~="&&(j[4]=" "+j[4]+" ");return j},PSEUDO:function(a,n,m,l,j){if(a[1]==="not"){if((L.exec(a[3])||"").length>1||/^\w/.test(a[3])){a[3]=E(a[3],null,null,n)}else{var h=E.filter(a[3],n,m,!0^j);m||l.push.apply(l,h);return !1}}else{if(D.match.POS.test(a[0])||D.match.CHILD.test(a[0])){return !0}}return a},POS:function(e){e.unshift(!0);return e}},filters:{enabled:function(e){return e.disabled===!1&&e.type!=="hidden"},disabled:function(e){return e.disabled===!0},checked:function(e){return e.checked===!0},selected:function(e){e.parentNode&&e.parentNode.selectedIndex;return e.selected===!0},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(f,e,g){return !!E(g[3],f).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(f){var e=f.getAttribute("type"),g=f.type;return"text"===g&&(e===g||e===null)},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)}},setFilters:{first:function(f,e){return e===0},last:function(f,e,h,g){return e===g.length-1},even:function(f,e){return e%2===0},odd:function(f,e){return e%2===1},lt:function(f,e,g){return e<g[3]-0},gt:function(f,e,g){return e>g[3]-0},nth:function(f,e,g){return g[3]-0===e},eq:function(f,e,g){return g[3]-0===e}},filter:{PSEUDO:function(s,r,q,p){var o=r[1],n=D.filters[o];if(n){return n(s,q,r,p)}if(o==="contains"){return(s.textContent||s.innerText||E.getText([s])||"").indexOf(r[3])>=0}if(o==="not"){var m=r[3];for(var l=0,j=m.length;l<j;l++){if(m[l]===s){return !1}}return !0}E.error(o)},CHILD:function(v,u){var s=u[1],r=v;switch(s){case"only":case"first":while(r=r.previousSibling){if(r.nodeType===1){return !1}}if(s==="first"){return !0}r=v;case"last":while(r=r.nextSibling){if(r.nodeType===1){return !1}}return !0;case"nth":var q=u[2],p=u[3];if(q===1&&p===0){return !0}var o=u[0],n=v.parentNode;if(n&&(n.sizcache!==o||!v.nodeIndex)){var m=0;for(r=n.firstChild;r;r=r.nextSibling){r.nodeType===1&&(r.nodeIndex=++m)}n.sizcache=o}var l=v.nodeIndex-p;return q===0?l===0:l%q===0&&l/q>=0}},ID:function(f,e){return f.nodeType===1&&f.getAttribute("id")===e},TAG:function(f,e){return e==="*"&&f.nodeType===1||f.nodeName.toLowerCase()===e},CLASS:function(f,e){return(" "+(f.className||f.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(j,h){var p=h[1],o=D.attrHandle[p]?D.attrHandle[p](j):j[p]!=null?j[p]:j.getAttribute(p),n=o+"",m=h[2],l=h[4];return o==null?m==="!=":m==="="?n===l:m==="*="?n.indexOf(l)>=0:m==="~="?(" "+n+" ").indexOf(l)>=0:l?m==="!="?n!==l:m==="^="?n.indexOf(l)===0:m==="$="?n.substr(n.length-l.length)===l:m==="|="?n===l||n.substr(0,l.length+1)===l+"-":!1:n&&o!==!1},POS:function(h,g,n,m){var l=g[2],j=D.setFilters[l];if(j){return j(h,n,g,m)}}}},C=D.match.POS,B=function(f,e){return"\\"+(e-0+1)};for(var A in D.match){D.match[A]=new RegExp(D.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source),D.leftMatch[A]=new RegExp(/(^(?:.|\r|\n)*?)/.source+D.match[A].source.replace(/\\(\d+)/g,B))}var z=function(f,e){f=Array.prototype.slice.call(f,0);if(e){e.push.apply(e,f);return e}return f};try{Array.prototype.slice.call(aN.documentElement.childNodes,0)[0].nodeType}catch(y){z=function(g,f){var l=0,j=f||[];if(J.call(g)==="[object Array]"){Array.prototype.push.apply(j,g)}else{if(typeof g.length==="number"){for(var h=g.length;l<h;l++){j.push(g[l])}}else{for(;g[l];l++){j.push(g[l])}}}return j}}var x,w;aN.documentElement.compareDocumentPosition?x=function(f,e){if(f===e){I=!0;return 0}if(!f.compareDocumentPosition||!e.compareDocumentPosition){return f.compareDocumentPosition?-1:1}return f.compareDocumentPosition(e)&4?-1:1}:(x=function(u,s){var r,q,p=[],o=[],n=u.parentNode,m=s.parentNode,l=n;if(u===s){I=!0;return 0}if(n===m){return w(u,s)}if(!n){return -1}if(!m){return 1}while(l){p.unshift(l),l=l.parentNode}l=m;while(l){o.unshift(l),l=l.parentNode}r=p.length,q=o.length;for(var g=0;g<r&&g<q;g++){if(p[g]!==o[g]){return w(p[g],o[g])}}return g===r?w(u,o[g],-1):w(p[g],s,1)},w=function(f,e,h){if(f===e){return h}var g=f.nextSibling;while(g){if(g===e){return -1}g=g.nextSibling}return 1}),E.getText=function(f){var e="",h;for(var g=0;f[g];g++){h=f[g],h.nodeType===3||h.nodeType===4?e+=h.nodeValue:h.nodeType!==8&&(e+=E.getText(h.childNodes))}return e},function(){var f=aN.createElement("div"),h="script"+(new Date).getTime(),g=aN.documentElement;f.innerHTML="<a name='"+h+"'/>",g.insertBefore(f,g.firstChild),aN.getElementById(h)&&(D.find.ID=function(j,n,m){if(typeof n.getElementById!=="undefined"&&!m){var l=n.getElementById(j[1]);return l?l.id===j[1]||typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id").nodeValue===j[1]?[l]:aP:[]}},D.filter.ID=function(j,e){var l=typeof j.getAttributeNode!=="undefined"&&j.getAttributeNode("id");return j.nodeType===1&&l&&l.nodeValue===e}),g.removeChild(f),g=f=null}(),function(){var e=aN.createElement("div");e.appendChild(aN.createComment("")),e.getElementsByTagName("*").length>0&&(D.find.TAG=function(g,f){var l=f.getElementsByTagName(g[1]);if(g[1]==="*"){var j=[];for(var h=0;l[h];h++){l[h].nodeType===1&&j.push(l[h])}l=j}return l}),e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"&&(D.attrHandle.href=function(f){return f.getAttribute("href",2)}),e=null}(),aN.querySelectorAll&&function(){var g=E,f=aN.createElement("div"),j="__sizzle__";f.innerHTML="<p class='TEST'></p>";if(!f.querySelectorAll||f.querySelectorAll(".TEST").length!==0){E=function(S,R,Q,P){R=R||aN;if(!P&&!E.isXML(R)){var O=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(S);if(O&&(R.nodeType===1||R.nodeType===9)){if(O[1]){return z(R.getElementsByTagName(S),Q)}if(O[2]&&D.find.CLASS&&R.getElementsByClassName){return z(R.getElementsByClassName(O[2]),Q)}}if(R.nodeType===9){if(S==="body"&&R.body){return z([R.body],Q)}if(O&&O[3]){var N=R.getElementById(O[3]);if(!N||!N.parentNode){return z([],Q)}if(N.id===O[3]){return z([N],Q)}}try{return z(R.querySelectorAll(S),Q)}catch(M){}}else{if(R.nodeType===1&&R.nodeName.toLowerCase()!=="object"){var v=R,u=R.getAttribute("id"),p=u||j,l=R.parentNode,a=/^\s*[+~]/.test(S);u?p=p.replace(/'/g,"\\$&"):R.setAttribute("id",p),a&&l&&(R=R.parentNode);try{if(!a||l){return z(R.querySelectorAll("[id='"+p+"'] "+S),Q)}}catch(T){}finally{u||v.removeAttribute("id")}}}}return g(S,R,Q,P)};for(var h in g){E[h]=g[h]}f=null}}(),function(){var h=aN.documentElement,g=h.matchesSelector||h.mozMatchesSelector||h.webkitMatchesSelector||h.msMatchesSelector;if(g){var m=!g.call(aN.createElement("div"),"div"),l=!1;try{g.call(aN.documentElement,"[test!='']:sizzle")}catch(j){l=!0}E.matchesSelector=function(e,p){p=p.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!E.isXML(e)){try{if(l||!D.match.PSEUDO.test(p)&&!/!=/.test(p)){var o=g.call(e,p);if(o||!m||e.document&&e.document.nodeType!==11){return o}}}catch(n){}}return E(p,null,null,[e]).length>0}}}(),function(){var e=aN.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(e.getElementsByClassName&&e.getElementsByClassName("e").length!==0){e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}D.order.splice(1,0,"CLASS"),D.find.CLASS=function(g,f,h){if(typeof f.getElementsByClassName!=="undefined"&&!h){return f.getElementsByClassName(g[1])}},e=null}}(),aN.documentElement.contains?E.contains=function(f,e){return f!==e&&(f.contains?f.contains(e):!0)}:aN.documentElement.compareDocumentPosition?E.contains=function(f,e){return !!(f.compareDocumentPosition(e)&16)}:E.contains=function(){return !1},E.isXML=function(f){var e=(f?f.ownerDocument||f:0).documentElement;return e?e.nodeName!=="HTML":!1};var b=function(l,j){var r,q=[],p="",o=j.nodeType?[j]:j;while(r=D.match.PSEUDO.exec(l)){p+=r[0],l=l.replace(D.match.PSEUDO,"")}l=D.relative[l]?l+"*":l;for(var n=0,m=o.length;n<m;n++){E(l,o[n],q)}return E.filter(p,q)};aL.find=E,aL.expr=E.selectors,aL.expr[":"]=aL.expr.filters,aL.unique=E.uniqueSort,aL.text=E.getText,aL.isXMLDoc=E.isXML,aL.contains=E.contains}();var cs=/Until$/,cr=/^(?:parents|prevUntil|prevAll)/,cq=/,/,cp=/^.[^:#\[\.,]*$/,co=Array.prototype.slice,cm=aL.expr.match.POS,cl={children:!0,contents:!0,next:!0,prev:!0};aL.fn.extend({find:function(j){var d=this.pushStack("","find",j),p=0;for(var o=0,n=this.length;o<n;o++){p=d.length,aL.find(j,this[o],d);if(o>0){for(var m=p;m<d.length;m++){for(var l=0;l<p;l++){if(d[l]===d[m]){d.splice(m--,1);break}}}}}return d},has:function(d){var c=aL(d);return this.filter(function(){for(var b=0,e=c.length;b<e;b++){if(aL.contains(this,c[b])){return !0}}})},not:function(b){return this.pushStack(b8(this,b,!1),"not",b)},filter:function(b){return this.pushStack(b8(this,b,!0),"filter",b)},is:function(b){return !!b&&aL.filter(b,this).length>0},closest:function(w,v){var u=[],s,r,q=this[0];if(aL.isArray(w)){var p,o,n={},m=1;if(q&&w.length){for(s=0,r=w.length;s<r;s++){o=w[s],n[o]||(n[o]=aL.expr.match.POS.test(o)?aL(o,v||this.context):o)}while(q&&q.ownerDocument&&q!==v){for(o in n){p=n[o],(p.jquery?p.index(q)>-1:aL(q).is(p))&&u.push({selector:o,elem:q,level:m})}q=q.parentNode,m++}}return u}var d=cm.test(w)?aL(w,v||this.context):null;for(s=0,r=this.length;s<r;s++){q=this[s];while(q){if(d?d.index(q)>-1:aL.find.matchesSelector(q,w)){u.push(q);break}q=q.parentNode;if(!q||!q.ownerDocument||q===v){break}}}u=u.length>1?aL.unique(u):u;return this.pushStack(u,"closest",w)},index:function(b){if(!b||typeof b==="string"){return aL.inArray(this[0],b?aL(b):this.parent().children())}return aL.inArray(b.jquery?b[0]:b,this)},add:function(f,d){var h=typeof f==="string"?aL(f,d):aL.makeArray(f),g=aL.merge(this.get(),h);return this.pushStack(cj(h[0])||cj(g[0])?g:aL.unique(g))},andSelf:function(){return this.add(this.prevObject)}}),aL.each({parent:function(d){var c=d.parentNode;return c&&c.nodeType!==11?c:null},parents:function(b){return aL.dir(b,"parentNode")},parentsUntil:function(e,d,f){return aL.dir(e,"parentNode",f)},next:function(b){return aL.nth(b,2,"nextSibling")},prev:function(b){return aL.nth(b,2,"previousSibling")},nextAll:function(b){return aL.dir(b,"nextSibling")},prevAll:function(b){return aL.dir(b,"previousSibling")},nextUntil:function(e,d,f){return aL.dir(e,"nextSibling",f)},prevUntil:function(e,d,f){return aL.dir(e,"previousSibling",f)},siblings:function(b){return aL.sibling(b.parentNode.firstChild,b)},children:function(b){return aL.sibling(b.firstChild)},contents:function(b){return aL.nodeName(b,"iframe")?b.contentDocument||b.contentWindow.document:aL.makeArray(b.childNodes)}},function(d,c){aL.fn[d]=function(j,h){var b=aL.map(this,c,j),a=co.call(arguments);cs.test(d)||(h=j),h&&typeof h==="string"&&(b=aL.filter(h,b)),b=this.length>1&&!cl[d]?aL.unique(b):b,(this.length>1||cq.test(h))&&cr.test(d)&&(b=b.reverse());return this.pushStack(b,d,a.join(","))}}),aL.extend({filter:function(e,d,f){f&&(e=":not("+e+")");return d.length===1?aL.find.matchesSelector(d[0],e)?[d[0]]:[]:aL.find.matches(e,d)},dir:function(b,l,j){var h=[],d=b[l];while(d&&d.nodeType!==9&&(j===aP||d.nodeType!==1||!aL(d).is(j))){d.nodeType===1&&h.push(d),d=d[l]}return h},nth:function(g,f,l,j){f=f||1;var h=0;for(;g;g=g[l]){if(g.nodeType===1&&++h===f){break}}return g},sibling:function(e,d){var f=[];for(;e;e=e.nextSibling){e.nodeType===1&&e!==d&&f.push(e)}return f}});var b6=/ jQuery\d+="(?:\d+|null)"/g,b4=/^\s+/,b2=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,b0=/<([\w:]+)/,a8=/<tbody/i,a6=/<|&#?\w+;/,a4=/<(?:script|object|embed|option|style)/i,a2=/checked\s*(?:[^=]|=\s*.checked.)/i,a0={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,"",""]};a0.optgroup=a0.option,a0.tbody=a0.tfoot=a0.colgroup=a0.caption=a0.thead,a0.th=a0.td,aL.support.htmlSerialize||(a0._default=[1,"div<div>","</div>"]),aL.fn.extend({text:function(b){if(aL.isFunction(b)){return this.each(function(a){var d=aL(this);d.text(b.call(this,a,d.text()))})}if(typeof b!=="object"&&b!==aP){return this.empty().append((this[0]&&this[0].ownerDocument||aN).createTextNode(b))}return aL.text(this)},wrapAll:function(d){if(aL.isFunction(d)){return this.each(function(a){aL(this).wrapAll(d.call(this,a))})}if(this[0]){var c=aL(d,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&c.insertBefore(this[0]),c.map(function(){var b=this;while(b.firstChild&&b.firstChild.nodeType===1){b=b.firstChild}return b}).append(this)}return this},wrapInner:function(b){if(aL.isFunction(b)){return this.each(function(a){aL(this).wrapInner(b.call(this,a))})}return this.each(function(){var a=aL(this),d=a.contents();d.length?d.wrapAll(b):a.append(b)})},wrap:function(b){return this.each(function(){aL(this).wrapAll(b)})},unwrap:function(){return this.parent().each(function(){aL.nodeName(this,"body")||aL(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(b){this.nodeType===1&&this.appendChild(b)})},prepend:function(){return this.domManip(arguments,!0,function(b){this.nodeType===1&&this.insertBefore(b,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,!1,function(c){this.parentNode.insertBefore(c,this)})}if(arguments.length){var b=aL(arguments[0]);b.push.apply(b,this.toArray());return this.pushStack(b,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,!1,function(c){this.parentNode.insertBefore(c,this.nextSibling)})}if(arguments.length){var b=this.pushStack(this,"after",arguments);b.push.apply(b,aL(arguments[0]).toArray());return b}},remove:function(f,d){for(var h=0,g;(g=this[h])!=null;h++){if(!f||aL.filter(f,[g]).length){!d&&g.nodeType===1&&(aL.cleanData(g.getElementsByTagName("*")),aL.cleanData([g])),g.parentNode&&g.parentNode.removeChild(g)}}return this},empty:function(){for(var d=0,c;(c=this[d])!=null;d++){c.nodeType===1&&aL.cleanData(c.getElementsByTagName("*"));while(c.firstChild){c.removeChild(c.firstChild)}}return this},clone:function(d,c){d=d==null?!1:d,c=c==null?d:c;return this.map(function(){return aL.clone(this,d,c)})},html:function(b){if(b===aP){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(b6,""):null}if(typeof b!=="string"||a4.test(b)||!aL.support.leadingWhitespace&&b4.test(b)||a0[(b0.exec(b)||["",""])[1].toLowerCase()]){aL.isFunction(b)?this.each(function(a){var e=aL(this);e.html(b.call(this,a,e.html()))}):this.empty().append(b)}else{b=b.replace(b2,"<$1></$2>");try{for(var h=0,g=this.length;h<g;h++){this[h].nodeType===1&&(aL.cleanData(this[h].getElementsByTagName("*")),this[h].innerHTML=b)}}catch(d){this.empty().append(b)}}return this},replaceWith:function(b){if(this[0]&&this[0].parentNode){if(aL.isFunction(b)){return this.each(function(a){var f=aL(this),d=f.html();f.replaceWith(b.call(this,a,d))})}typeof b!=="string"&&(b=aL(b).detach());return this.each(function(){var a=this.nextSibling,d=this.parentNode;aL(this).remove(),a?aL(a).before(b):aL(d).append(b)})}return this.length?this.pushStack(aL(aL.isFunction(b)?b():b),"replaceWith",b):this},detach:function(b){return this.remove(b,!0)},domManip:function(y,x,w){var v,u,s,r,q=y[0],p=[];if(!aL.support.checkClone&&arguments.length===3&&typeof q==="string"&&a2.test(q)){return this.each(function(){aL(this).domManip(y,x,w,!0)})}if(aL.isFunction(q)){return this.each(function(c){var a=aL(this);y[0]=q.call(this,c,x?a.html():aP),a.domManip(y,x,w)})}if(this[0]){r=q&&q.parentNode,aL.support.parentNode&&r&&r.nodeType===11&&r.childNodes.length===this.length?v={fragment:r}:v=aL.buildFragment(y,this,p),s=v.fragment,s.childNodes.length===1?u=s=s.firstChild:u=s.firstChild;if(u){x=x&&aL.nodeName(u,"tr");for(var o=0,d=this.length,b=d-1;o<d;o++){w.call(x?c1(this[o],u):this[o],v.cacheable||d>1&&o<b?aL.clone(s,!0,!0):s)}}p.length&&aL.each(p,b7)}return this}}),aL.buildFragment=function(d,c,o){var n,m,l,j=c&&c[0]?c[0].ownerDocument||c[0]:aN;d.length===1&&typeof d[0]==="string"&&d[0].length<512&&j===aN&&d[0].charAt(0)==="<"&&!a4.test(d[0])&&(aL.support.checkClone||!a2.test(d[0]))&&(m=!0,l=aL.fragments[d[0]],l&&(l!==1&&(n=l))),n||(n=j.createDocumentFragment(),aL.clean(d,j,n,o)),m&&(aL.fragments[d[0]]=l?n:1);return{fragment:n,cacheable:m}},aL.fragments={},aL.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(d,c){aL.fn[d]=function(p){var o=[],n=aL(p),m=this.length===1&&this[0].parentNode;if(m&&m.nodeType===11&&m.childNodes.length===1&&n.length===1){n[c](this[0]);return this}for(var l=0,b=n.length;l<b;l++){var a=(l>0?this.clone(!0):this).get();aL(n[l])[c](a),o=o.concat(a)}return this.pushStack(o,d,n.selector)}}),aL.extend({clone:function(j,d,p){var o=j.cloneNode(!0),n,m,l;if((!aL.support.noCloneEvent||!aL.support.noCloneChecked)&&(j.nodeType===1||j.nodeType===11)&&!aL.isXMLDoc(j)){ck(j,o),n=b9(j),m=b9(o);for(l=0;n[l];++l){ck(n[l],m[l])}}if(d){aT(j,o);if(p){n=b9(j),m=b9(o);for(l=0;n[l];++l){aT(n[l],m[l])}}}return o},clean:function(C,B,A,z){B=B||aN,typeof B.createElement==="undefined"&&(B=B.ownerDocument||B[0]&&B[0].ownerDocument||aN);var y=[];for(var x=0,w;(w=C[x])!=null;x++){typeof w==="number"&&(w+="");if(!w){continue}if(typeof w!=="string"||a6.test(w)){if(typeof w==="string"){w=w.replace(b2,"<$1></$2>");var v=(b0.exec(w)||["",""])[1].toLowerCase(),u=a0[v]||a0._default,s=u[0],r=B.createElement("div");r.innerHTML=u[1]+w+u[2];while(s--){r=r.lastChild}if(!aL.support.tbody){var q=a8.test(w),d=v==="table"&&!q?r.firstChild&&r.firstChild.childNodes:u[1]==="<table>"&&!q?r.childNodes:[];for(var c=d.length-1;c>=0;--c){aL.nodeName(d[c],"tbody")&&!d[c].childNodes.length&&d[c].parentNode.removeChild(d[c])}}!aL.support.leadingWhitespace&&b4.test(w)&&r.insertBefore(B.createTextNode(b4.exec(w)[0]),r.firstChild),w=r.childNodes}}else{w=B.createTextNode(w)}w.nodeType?y.push(w):y=aL.merge(y,w)}if(A){for(x=0;y[x];x++){!z||!aL.nodeName(y[x],"script")||y[x].type&&y[x].type.toLowerCase()!=="text/javascript"?(y[x].nodeType===1&&y.splice.apply(y,[x+1,0].concat(aL.makeArray(y[x].getElementsByTagName("script")))),A.appendChild(y[x])):z.push(y[x].parentNode?y[x].parentNode.removeChild(y[x]):y[x])}}return y},cleanData:function(u){var s,r,q=aL.cache,p=aL.expando,o=aL.event.special,n=aL.support.deleteExpando;for(var m=0,l;(l=u[m])!=null;m++){if(l.nodeName&&aL.noData[l.nodeName.toLowerCase()]){continue}r=l[aL.expando];if(r){s=q[r]&&q[r][p];if(s&&s.events){for(var d in s.events){o[d]?aL.event.remove(l,d):aL.removeEvent(l,d,s.handle)}s.handle&&(s.handle.elem=null)}n?delete l[aL.expando]:l.removeAttribute&&l.removeAttribute(aL.expando),delete q[r]}}}});var b5=/alpha\([^)]*\)/i,b3=/opacity=([^)]*)/,b1=/-([a-z])/ig,a9=/([A-Z]|^ms)/g,a7=/^-?\d+(?:px)?$/i,a5=/^-?\d/,a3={position:"absolute",visibility:"hidden",display:"block"},a1=["Left","Right"],aZ=["Top","Bottom"],aY,aX,aW,aV=function(d,c){return c.toUpperCase()};aL.fn.css=function(b,d){if(arguments.length===2&&d===aP){return this}return aL.access(this,b,d,!0,function(f,h,g){return g!==aP?aL.style(f,h,g):aL.css(f,h)})},aL.extend({cssHooks:{opacity:{get:function(e,d){if(d){var f=aY(e,"opacity","opacity");return f===""?"1":f}return e.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":aL.support.cssFloat?"cssFloat":"styleFloat"},style:function(r,q,p,o){if(r&&r.nodeType!==3&&r.nodeType!==8&&r.style){var n,m=aL.camelCase(q),l=r.style,d=aL.cssHooks[m];q=aL.cssProps[m]||m;if(p===aP){if(d&&"get" in d&&(n=d.get(r,!1,o))!==aP){return n}return l[q]}if(typeof p==="number"&&isNaN(p)||p==null){return}typeof p==="number"&&!aL.cssNumber[m]&&(p+="px");if(!d||!("set" in d)||(p=d.set(r,p))!==aP){try{l[q]=p}catch(b){}}}},css:function(b,n,m){var l,j=aL.camelCase(n),d=aL.cssHooks[j];n=aL.cssProps[j]||j;if(d&&"get" in d&&(l=d.get(b,!0,m))!==aP){return l}if(aY){return aY(b,n,j)}},swap:function(g,f,l){var j={};for(var h in f){j[h]=g.style[h],g.style[h]=f[h]}l.call(g);for(h in f){g.style[h]=j[h]}},camelCase:function(b){return b.replace(b1,aV)}}),aL.curCSS=aL.css,aL.each(["height","width"],function(d,c){aL.cssHooks[c]={get:function(b,j,h){var g;if(j){b.offsetWidth!==0?g=aU(b,c,h):aL.swap(b,a3,function(){g=aU(b,c,h)});if(g<=0){g=aY(b,c,c),g==="0px"&&aW&&(g=aW(b,c,c));if(g!=null){return g===""||g==="auto"?"0px":g}}if(g<0||g==null){g=b.style[c];return g===""||g==="auto"?"0px":g}return typeof g==="string"?g:g+"px"}},set:function(f,e){if(!a7.test(e)){return e}e=parseFloat(e);if(e>=0){return e+"px"}}}}),aL.support.opacity||(aL.cssHooks.opacity={get:function(d,c){return b3.test((c&&d.currentStyle?d.currentStyle.filter:d.style.filter)||"")?parseFloat(RegExp.$1)/100+"":c?"1":""},set:function(g,d){var l=g.style;l.zoom=1;var j=aL.isNaN(d)?"":"alpha(opacity="+d*100+")",h=l.filter||"";l.filter=b5.test(h)?h.replace(b5,j):l.filter+" "+j}}),aL(function(){aL.support.reliableMarginRight||(aL.cssHooks.marginRight={get:function(e,d){var f;aL.swap(e,{display:"inline-block"},function(){d?f=aY(e,"margin-right","marginRight"):f=e.style.marginRight});return f}})}),aN.defaultView&&aN.defaultView.getComputedStyle&&(aX=function(b,n,m){var l,j,d;m=m.replace(a9,"-$1").toLowerCase();if(!(j=b.ownerDocument.defaultView)){return aP}if(d=j.getComputedStyle(b,null)){l=d.getPropertyValue(m),l===""&&!aL.contains(b.ownerDocument.documentElement,b)&&(l=aL.style(b,m))}return l}),aN.documentElement.currentStyle&&(aW=function(h,g){var n,m=h.currentStyle&&h.currentStyle[g],l=h.runtimeStyle&&h.runtimeStyle[g],j=h.style;!a7.test(m)&&a5.test(m)&&(n=j.left,l&&(h.runtimeStyle.left=h.currentStyle.left),j.left=g==="fontSize"?"1em":m||0,m=j.pixelLeft+"px",j.left=n,l&&(h.runtimeStyle.left=l));return m===""?"auto":m}),aY=aX||aW,aL.expr&&aL.expr.filters&&(aL.expr.filters.hidden=function(e){var d=e.offsetWidth,f=e.offsetHeight;return d===0&&f===0||!aL.support.reliableHiddenOffsets&&(e.style.display||aL.css(e,"display"))==="none"},aL.expr.filters.visible=function(b){return !aL.expr.filters.hidden(b)});var aS=/%20/g,aQ=/\[\]$/,aO=/\r?\n/g,aM=/#.*$/,aK=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,aI=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,aG=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,aE=/^(?:GET|HEAD)$/,aC=/^\/\//,c0=/\?/,cZ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cY=/^(?:select|textarea)/i,cX=/\s+/,cW=/([?&])_=[^&]*/,cV=/(^|\-)([a-z])/g,cU=function(e,d,f){return d+f.toUpperCase()},cT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,cS=aL.fn.load,cR={},cQ={},cP,cO;try{cP=aN.location.href}catch(cN){cP=aN.createElement("a"),cP.href="",cP=cP.href}cO=cT.exec(cP.toLowerCase())||[],aL.fn.extend({load:function(b,o,n){if(typeof b!=="string"&&cS){return cS.apply(this,arguments)}if(!this.length){return this}var m=b.indexOf(" ");if(m>=0){var l=b.slice(m,b.length);b=b.slice(0,m)}var j="GET";o&&(aL.isFunction(o)?(n=o,o=aP):typeof o==="object"&&(o=aL.param(o,aL.ajaxSettings.traditional),j="POST"));var d=this;aL.ajax({url:b,type:j,dataType:"html",data:o,complete:function(f,e,g){g=f.responseText,f.isResolved()&&(f.done(function(c){g=c}),d.html(l?aL("<div>").append(g.replace(cZ,"")).find(l):g)),n&&d.each(n,[g,e,f])}});return this},serialize:function(){return aL.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?aL.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cY.test(this.nodeName)||aI.test(this.type))}).map(function(e,d){var f=aL(this).val();return f==null?null:aL.isArray(f)?aL.map(f,function(b,g){return{name:d.name,value:b.replace(aO,"\r\n")}}):{name:d.name,value:f.replace(aO,"\r\n")}}).get()}}),aL.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(d,c){aL.fn[c]=function(b){return this.bind(c,b)}}),aL.each(["get","post"],function(b,d){aL[d]=function(c,l,j,h){aL.isFunction(l)&&(h=h||j,j=l,l=aP);return aL.ajax({type:d,url:c,data:l,success:j,dataType:h})}}),aL.extend({getScript:function(b,d){return aL.get(b,aP,d,"script")},getJSON:function(e,d,f){return aL.get(e,d,f,"json")},ajaxSetup:function(e,d){d?aL.extend(!0,e,aL.ajaxSettings,d):(d=e,e=aL.extend(!0,aL.ajaxSettings,d));for(var f in {context:1,url:1}){f in d?e[f]=d[f]:f in aL.ajaxSettings&&(e[f]=aL.ajaxSettings[f])}return e},ajaxSettings:{url:cP,isLocal:aG.test(cO[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":aR.String,"text html":!0,"text json":aL.parseJSON,"text xml":aL.parseXML}},ajaxPrefilter:cM(cR),ajaxTransport:cM(cQ),ajax:function(T,S){function A(p,j,g,f){if(E!==2){E=2,G&&clearTimeout(G),H=aP,J=f||"",B.readyState=p?4:0;var e,u,s,r=g?cJ(R,B,g):aP,o,m;if(p>=200&&p<300||p===304){if(R.ifModified){if(o=B.getResponseHeader("Last-Modified")){aL.lastModified[L]=o}if(m=B.getResponseHeader("Etag")){aL.etag[L]=m}}if(p===304){j="notmodified",e=!0}else{try{u=cI(R,r),j="success",e=!0}catch(h){j="parsererror",s=h}}}else{s=j;if(!j||p){j="error",p<0&&(p=0)}}B.status=p,B.statusText=j,e?O.resolveWith(Q,[u,j,B]):O.rejectWith(Q,[B,j,s]),B.statusCode(M),M=aP,D&&P.trigger("ajax"+(e?"Success":"Error"),[B,R,e?u:s]),N.resolveWith(Q,[B,j]),D&&(P.trigger("ajaxComplete",[B,R]),--aL.active||aL.event.trigger("ajaxStop"))}}typeof T==="object"&&(S=T,T=aP),S=S||{};var R=aL.ajaxSetup({},S),Q=R.context||R,P=Q!==R&&(Q.nodeType||Q instanceof aL)?aL(Q):aL.event,O=aL.Deferred(),N=aL._Deferred(),M=R.statusCode||{},L,K={},J,I,H,G,F,E=0,D,C,B={readyState:0,setRequestHeader:function(e,c){E||(K[e.toLowerCase().replace(cV,cU)]=c);return this},getAllResponseHeaders:function(){return E===2?J:null},getResponseHeader:function(e){var f;if(E===2){if(!I){I={};while(f=aK.exec(J)){I[f[1].toLowerCase()]=f[2]}}f=I[e.toLowerCase()]}return f===aP?null:f},overrideMimeType:function(c){E||(R.mimeType=c);return this},abort:function(c){c=c||"abort",H&&H.abort(c),A(0,c);return this}};O.promise(B),B.success=B.done,B.error=B.fail,B.complete=N.done,B.statusCode=function(e){if(e){var c;if(E<2){for(c in e){M[c]=[M[c],e[c]]}}else{c=e[B.status],B.then(c,c)}}return this},R.url=((T||R.url)+"").replace(aM,"").replace(aC,cO[1]+"//"),R.dataTypes=aL.trim(R.dataType||"*").toLowerCase().split(cX),R.crossDomain==null&&(F=cT.exec(R.url.toLowerCase()),R.crossDomain=F&&(F[1]!=cO[1]||F[2]!=cO[2]||(F[3]||(F[1]==="http:"?80:443))!=(cO[3]||(cO[1]==="http:"?80:443)))),R.data&&R.processData&&typeof R.data!=="string"&&(R.data=aL.param(R.data,R.traditional)),cL(cR,R,S,B);if(E===2){return !1}D=R.global,R.type=R.type.toUpperCase(),R.hasContent=!aE.test(R.type),D&&aL.active++===0&&aL.event.trigger("ajaxStart");if(!R.hasContent){R.data&&(R.url+=(c0.test(R.url)?"&":"?")+R.data),L=R.url;if(R.cache===!1){var z=aL.now(),d=R.url.replace(cW,"$1_="+z);R.url=d+(d===R.url?(c0.test(R.url)?"&":"?")+"_="+z:"")}}if(R.data&&R.hasContent&&R.contentType!==!1||S.contentType){K["Content-Type"]=R.contentType}R.ifModified&&(L=L||R.url,aL.lastModified[L]&&(K["If-Modified-Since"]=aL.lastModified[L]),aL.etag[L]&&(K["If-None-Match"]=aL.etag[L])),K.Accept=R.dataTypes[0]&&R.accepts[R.dataTypes[0]]?R.accepts[R.dataTypes[0]]+(R.dataTypes[0]!=="*"?", */*; q=0.01":""):R.accepts["*"];for(C in R.headers){B.setRequestHeader(C,R.headers[C])}if(R.beforeSend&&(R.beforeSend.call(Q,B,R)===!1||E===2)){B.abort();return !1}for(C in {success:1,error:1,complete:1}){B[C](R[C])}H=cL(cQ,R,S,B);if(H){B.readyState=1,D&&P.trigger("ajaxSend",[B,R]),R.async&&R.timeout>0&&(G=setTimeout(function(){B.abort("timeout")},R.timeout));try{E=1,H.send(K,A)}catch(b){status<2?A(-1,b):aL.error(b)}}else{A(-1,"No Transport")}return B},param:function(b,l){var j=[],h=function(e,c){c=aL.isFunction(c)?c():c,j[j.length]=encodeURIComponent(e)+"="+encodeURIComponent(c)};l===aP&&(l=aL.ajaxSettings.traditional);if(aL.isArray(b)||b.jquery&&!aL.isPlainObject(b)){aL.each(b,function(){h(this.name,this.value)})}else{for(var d in b){cK(d,b[d],l,h)}}return j.join("&").replace(aS,"+")}}),aL.extend({active:0,lastModified:{},etag:{}});var cF=aL.now(),cD=/(\=)\?(&|$)|\?\?/i;aL.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return aL.expando+"_"+cF++}}),aL.ajaxPrefilter("json jsonp",function(w,v,u){var s=typeof w.data==="string";if(w.dataTypes[0]==="jsonp"||v.jsonpCallback||v.jsonp!=null||w.jsonp!==!1&&(cD.test(w.url)||s&&cD.test(w.data))){var r,q=w.jsonpCallback=aL.isFunction(w.jsonpCallback)?w.jsonpCallback():w.jsonpCallback,p=aR[q],o=w.url,n=w.data,d="$1"+q+"$2",a=function(){aR[q]=p,r&&aL.isFunction(p)&&aR[q](r[0])};w.jsonp!==!1&&(o=o.replace(cD,d),w.url===o&&(s&&(n=n.replace(cD,d)),w.data===n&&(o+=(/\?/.test(o)?"&":"?")+w.jsonp+"="+q))),w.url=o,w.data=n,aR[q]=function(b){r=[b]},u.then(a,a),w.converters["script json"]=function(){r||aL.error(q+" was not called");return r[0]},w.dataTypes[0]="json";return"script"}}),aL.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(b){aL.globalEval(b);return b}}}),aL.ajaxPrefilter("script",function(b){b.cache===aP&&(b.cache=!1),b.crossDomain&&(b.type="GET",b.global=!1)}),aL.ajaxTransport("script",function(b){if(b.crossDomain){var f,c=aN.head||aN.getElementsByTagName("head")[0]||aN.documentElement;return{send:function(d,a){f=aN.createElement("script"),f.async="async",b.scriptCharset&&(f.charset=b.scriptCharset),f.src=b.url,f.onload=f.onreadystatechange=function(e,g){if(!f.readyState||/loaded|complete/.test(f.readyState)){f.onload=f.onreadystatechange=null,c&&f.parentNode&&c.removeChild(f),f=aP,g||a(200,"success")}},c.insertBefore(f,c.firstChild)},abort:function(){f&&f.onload(0,1)}}}});var cB=aL.now(),cz,cx;aL.ajaxSettings.xhr=aR.ActiveXObject?function(){return !this.isLocal&&cu()||c2()}:cu,cx=aL.ajaxSettings.xhr(),aL.support.ajax=!!cx,aL.support.cors=cx&&"withCredentials" in cx,cx=aP,aL.support.ajax&&aL.ajaxTransport(function(b){if(!b.crossDomain||aL.support.cors){var d;return{send:function(o,n){var m=b.xhr(),l,c;b.username?m.open(b.type,b.url,b.async,b.username,b.password):m.open(b.type,b.url,b.async);if(b.xhrFields){for(c in b.xhrFields){m[c]=b.xhrFields[c]}}b.mimeType&&m.overrideMimeType&&m.overrideMimeType(b.mimeType),!b.crossDomain&&!o["X-Requested-With"]&&(o["X-Requested-With"]="XMLHttpRequest");try{for(c in o){m.setRequestHeader(c,o[c])}}catch(a){}m.send(b.hasContent&&b.data||null),d=function(w,v){var u,s,r,q,h;try{if(d&&(v||m.readyState===4)){d=aP,l&&(m.onreadystatechange=aL.noop,delete cz[l]);if(v){m.readyState!==4&&m.abort()}else{u=m.status,r=m.getAllResponseHeaders(),q={},h=m.responseXML,h&&h.documentElement&&(q.xml=h),q.text=m.responseText;try{s=m.statusText}catch(g){s=""}u||!b.isLocal||b.crossDomain?u===1223&&(u=204):u=q.text?200:404}}}catch(f){v||n(-1,f)}q&&n(u,s,q,r)},b.async&&m.readyState!==4?(cz||(cz={},cw()),l=cB++,m.onreadystatechange=cz[l]=d):d()},abort:function(){d&&d(0,1)}}}});var cn={},av=/^(?:toggle|show|hide)$/,at=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,aq,ao=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];aL.fn.extend({show:function(j,d,p){var o,n;if(j||j===0){return this.animate(an("show",3),j,d,p)}for(var m=0,l=this.length;m<l;m++){o=this[m],n=o.style.display,!aL._data(o,"olddisplay")&&n==="none"&&(n=o.style.display=""),n===""&&aL.css(o,"display")==="none"&&aL._data(o,"olddisplay",al(o.nodeName))}for(m=0;m<l;m++){o=this[m],n=o.style.display;if(n===""||n==="none"){o.style.display=aL._data(o,"olddisplay")||""}}return this},hide:function(h,d,n){if(h||h===0){return this.animate(an("hide",3),h,d,n)}for(var m=0,l=this.length;m<l;m++){var j=aL.css(this[m],"display");j!=="none"&&!aL._data(this[m],"olddisplay")&&aL._data(this[m],"olddisplay",j)}for(m=0;m<l;m++){this[m].style.display="none"}return this},_toggle:aL.fn.toggle,toggle:function(f,d,h){var g=typeof f==="boolean";aL.isFunction(f)&&aL.isFunction(d)?this._toggle.apply(this,arguments):f==null||g?this.each(function(){var a=g?f:aL(this).is(":hidden");aL(this)[a?"show":"hide"]()}):this.animate(an("toggle",3),f,d,h);return this},fadeTo:function(f,e,h,g){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:e},f,h,g)},animate:function(g,d,l,j){var h=aL.speed(d,l,j);if(aL.isEmptyObject(g)){return this.each(h.complete)}return this[h.queue===!1?"each":"queue"](function(){var a=aL.extend({},h),q,p=this.nodeType===1,o=p&&aL(this).is(":hidden"),n=this;for(q in g){var m=aL.camelCase(q);q!==m&&(g[m]=g[q],delete g[q],q=m);if(g[q]==="hide"&&o||g[q]==="show"&&!o){return a.complete.call(this)}if(p&&(q==="height"||q==="width")){a.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(aL.css(this,"display")==="inline"&&aL.css(this,"float")==="none"){if(aL.support.inlineBlockNeedsLayout){var f=al(this.nodeName);f==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)}else{this.style.display="inline-block"}}}aL.isArray(g[q])&&((a.specialEasing=a.specialEasing||{})[q]=g[q][1],g[q]=g[q][0])}a.overflow!=null&&(this.style.overflow="hidden"),a.curAnim=aL.extend({},g),aL.each(g,function(x,w){var v=new aL.fx(n,a,x);if(av.test(w)){v[w==="toggle"?o?"show":"hide":w](g)}else{var u=at.exec(w),s=v.cur();if(u){var r=parseFloat(u[2]),b=u[3]||(aL.cssNumber[x]?"":"px");b!=="px"&&(aL.style(n,x,(r||1)+b),s=(r||1)/v.cur()*s,aL.style(n,x,s+b)),u[1]&&(r=(u[1]==="-="?-1:1)*r+s),v.custom(s,r,b)}else{v.custom(s,w,"")}}});return !0})},stop:function(e,d){var f=aL.timers;e&&this.queue([]),this.each(function(){for(var b=f.length-1;b>=0;b--){f[b].elem===this&&(d&&f[b](!0),f.splice(b,1))}}),d||this.dequeue();return this}}),aL.each({slideDown:an("show",1),slideUp:an("hide",1),slideToggle:an("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(d,c){aL.fn[d]=function(b,f,e){return this.animate(c,b,f,e)}}),aL.extend({speed:function(f,d,h){var g=f&&typeof f==="object"?aL.extend({},f):{complete:h||!h&&d||aL.isFunction(f)&&f,duration:f,easing:h&&d||d&&!aL.isFunction(d)&&d};g.duration=aL.fx.off?0:typeof g.duration==="number"?g.duration:g.duration in aL.fx.speeds?aL.fx.speeds[g.duration]:aL.fx.speeds._default,g.old=g.complete,g.complete=function(){g.queue!==!1&&aL(this).dequeue(),aL.isFunction(g.old)&&g.old.call(this)};return g},easing:{linear:function(f,e,h,g){return h+g*f},swing:function(f,e,h,g){return(-Math.cos(f*Math.PI)/2+0.5)*g+h}},timers:[],fx:function(e,d,f){this.options=d,this.elem=e,this.prop=f,d.orig||(d.orig={})}}),aL.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(aL.fx.step[this.prop]||aL.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var d,c=aL.css(this.elem,this.prop);return isNaN(d=parseFloat(c))?!c||c==="auto"?0:c:d},custom:function(h,d,n){function j(b){return m.step(b)}var m=this,l=aL.fx;this.startTime=aL.now(),this.start=h,this.end=d,this.unit=n||this.unit||(aL.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,j.elem=this.elem,j()&&aL.timers.push(j)&&!aq&&(aq=setInterval(l.tick,l.interval))},show:function(){this.options.orig[this.prop]=aL.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),aL(this.elem).show()},hide:function(){this.options.orig[this.prop]=aL.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(u){var s=aL.now(),r=!0;if(u||s>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var q in this.options.curAnim){this.options.curAnim[q]!==!0&&(r=!1)}if(r){if(this.options.overflow!=null&&!aL.support.shrinkWrapBlocks){var p=this.elem,o=this.options;aL.each(["","X","Y"],function(e,c){p.style["overflow"+c]=o.overflow[e]})}this.options.hide&&aL(this.elem).hide();if(this.options.hide||this.options.show){for(var n in this.options.curAnim){aL.style(this.elem,n,this.options.orig[n])}}this.options.complete.call(this.elem)}return !1}var m=s-this.startTime;this.state=m/this.options.duration;var l=this.options.specialEasing&&this.options.specialEasing[this.prop],d=this.options.easing||(aL.easing.swing?"swing":"linear");this.pos=aL.easing[l||d](this.state,m,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return !0}},aL.extend(aL.fx,{tick:function(){var d=aL.timers;for(var c=0;c<d.length;c++){d[c]()||d.splice(c--,1)}d.length||aL.fx.stop()},interval:13,stop:function(){clearInterval(aq),aq=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(b){aL.style(b.elem,"opacity",b.now)},_default:function(b){b.elem.style&&b.elem.style[b.prop]!=null?b.elem.style[b.prop]=(b.prop==="width"||b.prop==="height"?Math.max(0,b.now):b.now)+b.unit:b.elem[b.prop]=b.now}}}),aL.expr&&aL.expr.filters&&(aL.expr.filters.animated=function(b){return aL.grep(aL.timers,function(a){return b===a.elem}).length});var ai=/^t(?:able|d|h)$/i,ag=/^(?:body|html)$/i;"getBoundingClientRect" in aN.documentElement?aL.fn.offset=function(C){var B=this[0],A;if(C){return this.each(function(a){aL.offset.setOffset(this,C,a)})}if(!B||!B.ownerDocument){return null}if(B===B.ownerDocument.body){return aL.offset.bodyOffset(B)}try{A=B.getBoundingClientRect()}catch(z){}var y=B.ownerDocument,x=y.documentElement;if(!A||!aL.contains(x,B)){return A?{top:A.top,left:A.left}:{top:0,left:0}}var w=y.body,v=af(y),u=x.clientTop||w.clientTop||0,s=x.clientLeft||w.clientLeft||0,r=v.pageYOffset||aL.support.boxModel&&x.scrollTop||w.scrollTop,q=v.pageXOffset||aL.support.boxModel&&x.scrollLeft||w.scrollLeft,p=A.top+r-u,d=A.left+q-s;return{top:p,left:d}}:aL.fn.offset=function(y){var x=this[0];if(y){return this.each(function(a){aL.offset.setOffset(this,y,a)})}if(!x||!x.ownerDocument){return null}if(x===x.ownerDocument.body){return aL.offset.bodyOffset(x)}aL.offset.initialize();var w,v=x.offsetParent,u=x,s=x.ownerDocument,r=s.documentElement,q=s.body,p=s.defaultView,o=p?p.getComputedStyle(x,null):x.currentStyle,n=x.offsetTop,d=x.offsetLeft;while((x=x.parentNode)&&x!==q&&x!==r){if(aL.offset.supportsFixedPosition&&o.position==="fixed"){break}w=p?p.getComputedStyle(x,null):x.currentStyle,n-=x.scrollTop,d-=x.scrollLeft,x===v&&(n+=x.offsetTop,d+=x.offsetLeft,aL.offset.doesNotAddBorder&&(!aL.offset.doesAddBorderForTableAndCells||!ai.test(x.nodeName))&&(n+=parseFloat(w.borderTopWidth)||0,d+=parseFloat(w.borderLeftWidth)||0),u=v,v=x.offsetParent),aL.offset.subtractsBorderForOverflowNotVisible&&w.overflow!=="visible"&&(n+=parseFloat(w.borderTopWidth)||0,d+=parseFloat(w.borderLeftWidth)||0),o=w}if(o.position==="relative"||o.position==="static"){n+=q.offsetTop,d+=q.offsetLeft}aL.offset.supportsFixedPosition&&o.position==="fixed"&&(n+=Math.max(r.scrollTop,q.scrollTop),d+=Math.max(r.scrollLeft,q.scrollLeft));return{top:n,left:d}},aL.offset={initialize:function(){var d=aN.body,c=aN.createElement("div"),q,p,o,n,m=parseFloat(aL.css(d,"marginTop"))||0,l="<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>";aL.extend(c.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),c.innerHTML=l,d.insertBefore(c,d.firstChild),q=c.firstChild,p=q.firstChild,n=q.nextSibling.firstChild.firstChild,this.doesNotAddBorder=p.offsetTop!==5,this.doesAddBorderForTableAndCells=n.offsetTop===5,p.style.position="fixed",p.style.top="20px",this.supportsFixedPosition=p.offsetTop===20||p.offsetTop===15,p.style.position=p.style.top="",q.style.overflow="hidden",q.style.position="relative",this.subtractsBorderForOverflowNotVisible=p.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=d.offsetTop!==m,d.removeChild(c),aL.offset.initialize=aL.noop},bodyOffset:function(e){var d=e.offsetTop,f=e.offsetLeft;aL.offset.initialize(),aL.offset.doesNotIncludeMarginInBodyOffset&&(d+=parseFloat(aL.css(e,"marginTop"))||0,f+=parseFloat(aL.css(e,"marginLeft"))||0);return{top:d,left:f}},setOffset:function(A,z,y){var x=aL.css(A,"position");x==="static"&&(A.style.position="relative");var w=aL(A),v=w.offset(),u=aL.css(A,"top"),s=aL.css(A,"left"),r=(x==="absolute"||x==="fixed")&&aL.inArray("auto",[u,s])>-1,q={},p={},o,d;r&&(p=w.position()),o=r?p.top:parseInt(u,10)||0,d=r?p.left:parseInt(s,10)||0,aL.isFunction(z)&&(z=z.call(A,y,v)),z.top!=null&&(q.top=z.top-v.top+o),z.left!=null&&(q.left=z.left-v.left+d),"using" in z?z.using.call(A,q):w.css(q)}},aL.fn.extend({position:function(){if(!this[0]){return null}var f=this[0],d=this.offsetParent(),h=this.offset(),g=ag.test(d[0].nodeName)?{top:0,left:0}:d.offset();h.top-=parseFloat(aL.css(f,"marginTop"))||0,h.left-=parseFloat(aL.css(f,"marginLeft"))||0,g.top+=parseFloat(aL.css(d[0],"borderTopWidth"))||0,g.left+=parseFloat(aL.css(d[0],"borderLeftWidth"))||0;return{top:h.top-g.top,left:h.left-g.left}},offsetParent:function(){return this.map(function(){var b=this.offsetParent||aN.body;while(b&&(!ag.test(b.nodeName)&&aL.css(b,"position")==="static")){b=b.offsetParent}return b})}}),aL.each(["Left","Top"],function(b,f){var d="scroll"+f;aL.fn[d]=function(h){var e=this[0],a;if(!e){return null}if(h!==aP){return this.each(function(){a=af(this),a?a.scrollTo(b?aL(a).scrollLeft():h,b?h:aL(a).scrollTop()):this[d]=h})}a=af(e);return a?"pageXOffset" in a?a[b?"pageYOffset":"pageXOffset"]:aL.support.boxModel&&a.document.documentElement[d]||a.document.body[d]:e[d]}}),aL.each(["Height","Width"],function(b,f){var d=f.toLowerCase();aL.fn["inner"+f]=function(){return this[0]?parseFloat(aL.css(this[0],d,"padding")):null},aL.fn["outer"+f]=function(c){return this[0]?parseFloat(aL.css(this[0],d,c?"margin":"border")):null},aL.fn[d]=function(c){var m=this[0];if(!m){return c==null?null:this}if(aL.isFunction(c)){return this.each(function(a){var g=aL(this);g[d](c.call(this,a,g[d]()))})}if(aL.isWindow(m)){var l=m.document.documentElement["client"+f];return m.document.compatMode==="CSS1Compat"&&l||m.document.body["client"+f]||l}if(m.nodeType===9){return Math.max(m.documentElement["client"+f],m.body["scroll"+f],m.documentElement["scroll"+f],m.body["offset"+f],m.documentElement["offset"+f])}if(c===aP){var j=aL.css(m,d),e=parseFloat(j);return aL.isNaN(e)?j:e}return this.css(d,typeof c==="string"?c:c+"px")}}),aR.jQuery=aR.$=aL})(window);(function(e){function d(m,h,l){var j=new e.Event(h);m.trigger(j,l);return j.result!==false}function a(m){var o,j,n,h=m.attr("data-type")||(e.ajaxSettings&&e.ajaxSettings.dataType);if(m.is("form")){o=m.attr("method");j=m.attr("action");n=m.serializeArray();var l=m.data("ujs:submit-button");if(l){n.push(l);m.data("ujs:submit-button",null)}}else{o=m.attr("data-method");j=m.attr("href");n=null}e.ajax({url:j,type:o||"GET",data:n,dataType:h,beforeSend:function(q,p){if(p.dataType===undefined){q.setRequestHeader("accept","*/*;q=0.5, "+p.accepts.script)}return d(m,"ajax:beforeSend",[q,p])},success:function(q,p,r){m.trigger("ajax:success",[q,p,r])},complete:function(q,p){m.trigger("ajax:complete",[q,p])},error:function(r,p,q){m.trigger("ajax:error",[r,p,q])}})}function b(n){var j=n.attr("href"),p=n.attr("data-method"),l=e("meta[name=csrf-token]").attr("content"),o=e("meta[name=csrf-param]").attr("content"),m=e('<form method="post" action="'+j+'"></form>'),h='<input name="_method" value="'+p+'" type="hidden" />';if(o!==undefined&&l!==undefined){h+='<input name="'+o+'" value="'+l+'" type="hidden" />'}m.hide().append(h).appendTo("body");m.submit()}function c(h){h.find("input[data-disable-with]").each(function(){var j=e(this);j.data("ujs:enable-with",j.val()).val(j.attr("data-disable-with")).attr("disabled","disabled")})}function g(h){h.find("input[data-disable-with]").each(function(){var j=e(this);j.val(j.data("ujs:enable-with")).removeAttr("disabled")})}function f(h){var j=h.attr("data-confirm");return !j||(d(h,"confirm")&&confirm(j))}e("a[data-confirm], a[data-method], a[data-remote]").live("click.rails",function(j){var h=e(this);if(!f(h)){return false}if(h.attr("data-remote")){a(h);return false}else{if(h.attr("data-method")){b(h);return false}}});e("form").live("submit.rails",function(j){var h=e(this);if(!f(h)){return false}if(h.attr("data-remote")){a(h);return false}else{c(h)}});e("form input[type=submit], form button[type=submit], form button:not([type])").live("click.rails",function(){var j=e(this);if(!f(j)){return false}var h=j.attr("name"),l=h?{name:h,value:j.val()}:null;j.closest("form").data("ujs:submit-button",l)});e("form").live("ajax:beforeSend.rails",function(h){if(this==h.target){c(e(this))}});e("form").live("ajax:complete.rails",function(h){if(this==h.target){g(e(this))}})})(jQuery);function submitForm(){$.validator.addMethod("greaterThan",function(c,b,d){return compare($(d).val(),c)},"Must be greater than start time.");var a=$("#form_post").validate({meta:"validate",rules:{end_time:{greaterThan:"#start_time"},due_date:{greaterThan:"#starts_at"}}});if(a){if($("#kindeditor").length){if(KE.html("kindeditor")==""){$("#kindeditor_error").show()}else{$("#form_post").submit()}}else{$("#form_post").submit()}}else{return false}}function forget_password(){var a=$("#form_forget").validate({meta:"validate"});if(a){$("#form_forget").submit()}}function request_form_submit(){$.validator.addMethod("greaterThan",function(c,b,d){return compare($(d).val(),c)},"Must be greater than start time.");var a=$("#form_post").validate({meta:"validate",rules:{end_time:{greaterThan:"#start_time"},due_date:{greaterThan:"#starts_at"}}});if(a){if($("#kindeditor").length){if(KE.html("kindeditor")==""){$("#kindeditor_error").show()}else{$("#form_post").submit()}}else{$("#form_post").submit()}}else{return false}}function compare(b,a){if(b!=""&&a!=""){return(new Date(a)>new Date(b))}else{return true}}function downloadFile(a){document.location.href=a}function getPostSearchType(a){action="";switch(a){case"Assignments":action="/post_assignments/search";break;case"Tests":action="/post_tests/search";break;case"Projects":action="/post_projects/search";break;case"Exams":action="/post_exams/search";break;case"Lecture Notes":action="/post_lecture_notes/search";break;case"Events":action="/post_events/search";break;case"QAs":action="/post_qas/search";break;case"Education":action="/post_educations/search";break;case"Tutors":action="/post_tutors/search";break;case"Books":action="/post_books/search";break;case"Jobs":action="/post_jobs/search";break;case"Party":action="/post_parties/search";break;case"Student Awareness":action="/post_awarenesses/search";break;case"Housing":action="/post_housings/search";break;case"Team Up":action="/post_teamups/search";break;case"MyX":action="/post_myxes/search";break;case"Food":action="/post_foods";break;case"Schedules":action="/post_exam_schedules";break}$("#action_post_search").attr("action",action)}function load_options(){$("#department").mcDropdown("#department_menu",{width:170,valueAttr:"rel_department",select:option_submit});$("#year").mcDropdown("#year_menu",{width:75,valueAttr:"rel_year",select:option_submit});$("#over").mcDropdown("#over_menu",{width:80,valueAttr:"rel_over",select:option_submit})}function option_submit(){$("#action_option").submit()}function send_comment(b,a){comment=$("#comment").val();anonymous="0";if($("#anonymous")){anonymous=$("#anonymous:checked").val()}if(comment!=""){$.ajax({url:"/posts/create_comment",type:"POST",cache:false,dataType:"html",data:({commentable_id:b,commentable_type:a,comment:comment,anonymous:anonymous}),success:function(c){$("#add_comments").append(c);$("#comment").val("");$("#form_comment").toggle("slow");$("#comment_count").html($("div .AsDcomItem").size())}})}}function send_comment_video(b,a){comment=$("#comment").val();anonymous="0";if($("#anonymous")){anonymous=$("#anonymous:checked").val()}if(comment!=""){$.ajax({url:"/posts/create_comment_video",type:"POST",cache:false,dataType:"html",data:({commentable_id:b,commentable_type:a,comment:comment,anonymous:anonymous}),success:function(c){$("#add_comments").append(c);$("#comment").val("");$("#form_comment").toggle("slow");$("#comment_count").html($("div .AsDcomItem").size())}})}}function formatFirstLinkForPaginationComment(b,c){var a="/posts/comments_list";$("div#comments_list div.assPage").find("a").each(function(){var d=$(this);var e=getUrlVars(d.attr("href"))["page"];d.attr({href:"javascript:;"});d.click(function(){$.ajax({url:a,type:"GET",cache:false,dataType:"html",data:({page:e,class_name:b,id:c}),success:function(f){$("#comments_list").html(f)}})})})}function getUrlVars(a){var c={};var b=a.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(d,e,f){c[e]=f});return c}function formatLinkForPaginationComment(){$("div.assPage").find("a").each(function(){var a=$(this);var b=a.attr("href");a.attr({href:"javascript:;"});a.click(function(){$.ajax({url:b,type:"GET",cache:false,dataType:"html",success:function(c){$("#comments_list").html(c)}})})})}function send_answer(a){comment=KE.html("answereditor");if(comment!=""){$.ajax({url:"/post_qas/create_comment",type:"GET",cache:false,dataType:"html",data:({post_id:a,comment:comment,show:$("#show").val()}),success:function(b){$("#list_comments").html(b);KE.html("answereditor","");$("#form_comment").toggle("slow")}})}}function sendEmail(c,b){var a=$("#form_send_message").validate({meta:"validate"});if(a){$("#form_send_message").submit()}}function sendReportAbuse(){var a=$("#form_send_report").validate({meta:"validate"});if(a){$("#form_send_report").submit()}}function requireRating(a,c){var b=$("input:radio:checked").val();if(b!=""){$.ajax({url:c,type:"GET",cache:false,dataType:"html",data:({rating:b,post_id:a}),success:function(d){$("#require_rating_action").html(d)}})}}function showResult(){$("[rel=rate]").each(function(a){$(this).show()});$("#view_results").hide()}function showCommentForm(b,a){$("#wall_comment_form_"+b+"_"+a).show();$("#wall_comment_"+b+"_"+a).hide();$("#comment_"+b+"_"+a).focus()}function hideCommentForm(a,b){if($("#comment_"+a+"_"+b).val()==""){$("#wall_comment_"+a+"_"+b).show();$("#wall_comment_form_"+a+"_"+b).hide()}}function showListPostComment(a){$("#post_comment_"+a).hide();$("#post_comment_form_"+a).show();$("#post_list_comment_"+a).toggle("slow")}function showPostCommentForm(a){$("#post_comment_form_"+a).toggle("slow");$("#post_comment_"+a).hide();$("#comment_"+a).focus()}function hidePostCommentForm(a){if($("#comment_"+a).val()==""){$("#post_comment_"+a).show();$("#post_comment_form_"+a).hide()}}function goToByScroll(a){$("html,body").animate({scrollTop:$("#"+a).offset().top},"slow")}function resetForm(a){$("#"+a).each(function(){this.reset()})}function hideFlashes(){$("#flash_notice, #flash_warning, #flash_error").fadeOut(1500)}function become_a_fan(a){$.ajax({url:a,type:"GET",dataType:"html",failure:function(b){alert("ajax fail:"+b)},success:function(b){$(".AsDContR .fan").html(b)}})}function invite_chat(a){$.ajax({url:"/student_lounges/invite_chat",type:"GET",cache:false,dataType:"json",data:({user_id:a}),success:function(b){$("#friend_online_"+a).html("Chatting...")},error:function(b){alert("Error connecting to server")}})}function add_users_to_chat(a){obj_form=document.forms["form_"+a];len=obj_form.elements.length;val="";var b=0;for(b=0;b<len;b++){if(obj_form.elements[b].type=="checkbox"&&obj_form.elements[b].checked){val+=obj_form.elements[b].value+";"}}$.ajax({url:"/student_lounges/add_users_to_chat",type:"GET",cache:false,dataType:"html",data:({user_id:val,chanel_name:a})})}function stop_chat(a){$.ajax({url:"/student_lounges/stop_chat",type:"GET",cache:false,dataType:"html",data:({chanel_name:a}),success:function(b){}})}function friends_changed_message(){$.ajax({url:"/student_lounges/friends_changed_message",type:"GET",cache:false,dataType:"html",success:function(a){$("#div_friends_changed_their_message").html(a)}})}function friends_you_invited_chat(){$.ajax({url:"/student_lounges/friends_you_invited_chat",type:"GET",cache:false,dataType:"html",success:function(a){$("#div_friends_you_invited_to_chat").html(a)}})}function friends_want_you_chat(){$.ajax({url:"/student_lounges/friends_want_you_chat",type:"GET",cache:false,dataType:"html",success:function(a){$("#div_friends_want_you_chat").html(a)}})}function friends_online(){$.ajax({url:"/student_lounges/friends_online",type:"GET",cache:false,dataType:"html",success:function(a){$("#div_friends_online").html(a)}})}function insert_text_to_chatcontent(a,b){if($("#"+a)){$("#"+a).before(b);scroll_div("#chat_content_"+a)}}function openChat(c,a){if($("#"+a).length==0){var b=$.customWindow({winId:a,title:c,onopen:function(d,e){$.ajax({url:"/student_lounges/chanel_chat_content",type:"GET",cache:false,dataType:"html",data:({chanel_name:a}),success:function(f){d.html(f)}})},onclose:function(){},onresize:function(d){}})}}function scroll_div(a){$(a).animate({scrollTop:$(a).attr("scrollHeight")},3000)}function searchFriendStories(){var b=$("#friend_stories_search");var a=b.attr("action");var c=b.serialize();$.get(a,c,function(d){$("#friend_stories_list").html(d)})}function searchMyStories(){var b=$("#my_stories_search");var a=b.attr("action");var c=b.serialize();$.get(a,c,function(d){$("#my_stories_list").html(d)})}function formatLinkForPaginationURLFriend(){var b=$("#friend_stories_search");var a=b.attr("action");$("div.friend_stories").find("a").each(function(){var c=$(this);var d=c.attr("href").split("?")[1];c.attr({href:"javascript:;"});c.click(function(){b.attr("action",a+"?"+d);searchFriendStories()})})}function formatLinkForPaginationURLMy(){var b=$("#my_stories_search");var a=b.attr("action");$("div.my_stories").find("a").each(function(){var c=$(this);var d=c.attr("href").split("?")[1];c.attr({href:"javascript:;"});c.click(function(){b.attr("action",a+"?"+d);searchMyStories()})})}function searchFriendPhotos(){var b=$("#friend_photos_search");var a=b.attr("action");var c=b.serialize();$.get(a,c,function(d){$("#friend_photos_list").html(d)})}function searchMyPhotos(){var b=$("#my_photos_search");var a=b.attr("action");var c=b.serialize();$.get(a,c,function(d){$("#my_photos_list").html(d)})}function formatLinkForPaginationURLFriendPhoto(){var b=$("#friend_photos_search");var a=b.attr("action");$("div.friend_photos").find("a").each(function(){var c=$(this);var d=c.attr("href").split("?")[1];c.attr({href:"javascript:;"});c.click(function(){b.attr("action",a+"?"+d);searchFriendPhotos()})})}function formatLinkForPaginationURLMyPhoto(){var b=$("#my_photos_search");var a=b.attr("action");$("div.my_photos").find("a").each(function(){var c=$(this);var d=c.attr("href").split("?")[1];c.attr({href:"javascript:;"});c.click(function(){b.attr("action",a+"?"+d);searchMyPhotos()})})}function searchFriendMusics(){var b=$("#friend_musics_search");var a=b.attr("action");var c=b.serialize();$.get(a,c,function(d){$("#friend_musics_list").html(d)})}function searchMyMusics(){var b=$("#my_musics_search");var a=b.attr("action");var c=b.serialize();$.get(a,c,function(d){$("#my_musics_list").html(d)})}function formatLinkForPaginationURLFriendMusic(){var b=$("#friend_musics_search");var a=b.attr("action");$("div.friend_musics").find("a").each(function(){var c=$(this);var d=c.attr("href").split("?")[1];c.attr({href:"javascript:;"});c.click(function(){b.attr("action",a+"?"+d);searchFriendMusics()})})}function formatLinkForPaginationURLMyMusic(){var b=$("#my_musics_search");var a=b.attr("action");$("div.my_musics").find("a").each(function(){var c=$(this);var d=c.attr("href").split("?")[1];c.attr({href:"javascript:;"});c.click(function(){b.attr("action",a+"?"+d);searchMyMusics()})})}function searchFriendVideos(){var b=$("#friend_videos_search");var a=b.attr("action");var c=b.serialize();$.get(a,c,function(d){$("#friend_videos_list").html(d)})}function searchMyVideos(){var b=$("#my_videos_search");var a=b.attr("action");var c=b.serialize();$.get(a,c,function(d){$("#my_videos_list").html(d)})}function formatLinkForPaginationURLFriendVideo(){var b=$("#friend_videos_search");var a=b.attr("action");$("div.friend_videos").find("a").each(function(){var c=$(this);var d=c.attr("href").split("?")[1];c.attr({href:"javascript:;"});c.click(function(){b.attr("action",a+"?"+d);searchFriendVideos()})})}function formatLinkForPaginationURLMyVideo(){var b=$("#my_videos_search");var a=b.attr("action");$("div.my_videos").find("a").each(function(){var c=$(this);var d=c.attr("href").split("?")[1];c.attr({href:"javascript:;"});c.click(function(){b.attr("action",a+"?"+d);searchMyVideos()})})}$(document).ready(function(){$("#form_post").find("input").each(function(){$(this).bind("keypress",function(a){if(a.keyCode==13){$("#submit_form").click()}})})});var swfobject=function(){var aq="undefined",aD="object",ab="Shockwave Flash",X="ShockwaveFlash.ShockwaveFlash",aE="application/x-shockwave-flash",ac="SWFObjectExprInst",ax="onreadystatechange",af=window,aL=document,aB=navigator,aa=false,Z=[aN],aG=[],ag=[],al=[],aJ,ad,ap,at,ak=false,aU=false,aH,an,aI=true,ah=function(){var a=typeof aL.getElementById!=aq&&typeof aL.getElementsByTagName!=aq&&typeof aL.createElement!=aq,e=aB.userAgent.toLowerCase(),c=aB.platform.toLowerCase(),h=c?/win/.test(c):/win/.test(e),l=c?/mac/.test(c):/mac/.test(e),g=/webkit/.test(e)?parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,d=!+"\v1",f=[0,0,0],m=null;if(typeof aB.plugins!=aq&&typeof aB.plugins[ab]==aD){m=aB.plugins[ab].description;if(m&&!(typeof aB.mimeTypes!=aq&&aB.mimeTypes[aE]&&!aB.mimeTypes[aE].enabledPlugin)){aa=true;d=false;m=m.replace(/^.*\s+(\S+\s+\S+$)/,"$1");f[0]=parseInt(m.replace(/^(.*)\..*$/,"$1"),10);f[1]=parseInt(m.replace(/^.*\.(.*)\s.*$/,"$1"),10);f[2]=/[a-zA-Z]/.test(m)?parseInt(m.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof af.ActiveXObject!=aq){try{var j=new ActiveXObject(X);if(j){m=j.GetVariable("$version");if(m){d=true;m=m.split(" ")[1].split(",");f=[parseInt(m[0],10),parseInt(m[1],10),parseInt(m[2],10)]}}}catch(b){}}}return{w3:a,pv:f,wk:g,ie:d,win:h,mac:l}}(),aK=function(){if(!ah.w3){return}if((typeof aL.readyState!=aq&&aL.readyState=="complete")||(typeof aL.readyState==aq&&(aL.getElementsByTagName("body")[0]||aL.body))){aP()}if(!ak){if(typeof aL.addEventListener!=aq){aL.addEventListener("DOMContentLoaded",aP,false)}if(ah.ie&&ah.win){aL.attachEvent(ax,function(){if(aL.readyState=="complete"){aL.detachEvent(ax,arguments.callee);aP()}});if(af==top){(function(){if(ak){return}try{aL.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}aP()})()}}if(ah.wk){(function(){if(ak){return}if(!/loaded|complete/.test(aL.readyState)){setTimeout(arguments.callee,0);return}aP()})()}aC(aP)}}();function aP(){if(ak){return}try{var b=aL.getElementsByTagName("body")[0].appendChild(ar("span"));b.parentNode.removeChild(b)}catch(a){return}ak=true;var d=Z.length;for(var c=0;c<d;c++){Z[c]()}}function aj(a){if(ak){a()}else{Z[Z.length]=a}}function aC(a){if(typeof af.addEventListener!=aq){af.addEventListener("load",a,false)}else{if(typeof aL.addEventListener!=aq){aL.addEventListener("load",a,false)}else{if(typeof af.attachEvent!=aq){aM(af,"onload",a)}else{if(typeof af.onload=="function"){var b=af.onload;af.onload=function(){b();a()}}else{af.onload=a}}}}}function aN(){if(aa){Y()}else{am()}}function Y(){var d=aL.getElementsByTagName("body")[0];var b=ar(aD);b.setAttribute("type",aE);var a=d.appendChild(b);if(a){var c=0;(function(){if(typeof a.GetVariable!=aq){var e=a.GetVariable("$version");if(e){e=e.split(" ")[1].split(",");ah.pv=[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10)]}}else{if(c<10){c++;setTimeout(arguments.callee,10);return}}d.removeChild(b);a=null;am()})()}else{am()}}function am(){var g=aG.length;if(g>0){for(var h=0;h<g;h++){var c=aG[h].id;var n=aG[h].callbackFn;var a={success:false,id:c};if(ah.pv[0]>0){var j=aS(c);if(j){if(ao(aG[h].swfVersion)&&!(ah.wk&&ah.wk<312)){ay(c,true);if(n){a.success=true;a.ref=av(c);n(a)}}else{if(aG[h].expressInstall&&au()){var e={};e.data=aG[h].expressInstall;e.width=j.getAttribute("width")||"0";e.height=j.getAttribute("height")||"0";if(j.getAttribute("class")){e.styleclass=j.getAttribute("class")}if(j.getAttribute("align")){e.align=j.getAttribute("align")}var f={};var d=j.getElementsByTagName("param");var m=d.length;for(var l=0;l<m;l++){if(d[l].getAttribute("name").toLowerCase()!="movie"){f[d[l].getAttribute("name")]=d[l].getAttribute("value")}}ae(e,f,c,n)}else{aF(j);if(n){n(a)}}}}}else{ay(c,true);if(n){var b=av(c);if(b&&typeof b.SetVariable!=aq){a.success=true;a.ref=b}n(a)}}}}}function av(b){var d=null;var c=aS(b);if(c&&c.nodeName=="OBJECT"){if(typeof c.SetVariable!=aq){d=c}else{var a=c.getElementsByTagName(aD)[0];if(a){d=a}}}return d}function au(){return !aU&&ao("6.0.65")&&(ah.win||ah.mac)&&!(ah.wk&&ah.wk<312)}function ae(f,d,h,e){aU=true;ap=e||null;at={success:false,id:h};var a=aS(h);if(a){if(a.nodeName=="OBJECT"){aJ=aO(a);ad=null}else{aJ=a;ad=h}f.id=ac;if(typeof f.width==aq||(!/%$/.test(f.width)&&parseInt(f.width,10)<310)){f.width="310"}if(typeof f.height==aq||(!/%$/.test(f.height)&&parseInt(f.height,10)<137)){f.height="137"}aL.title=aL.title.slice(0,47)+" - Flash Player Installation";var b=ah.ie&&ah.win?"ActiveX":"PlugIn",c="MMredirectURL="+af.location.toString().replace(/&/g,"%26")+"&MMplayerType="+b+"&MMdoctitle="+aL.title;if(typeof d.flashvars!=aq){d.flashvars+="&"+c}else{d.flashvars=c}if(ah.ie&&ah.win&&a.readyState!=4){var g=ar("div");h+="SWFObjectNew";g.setAttribute("id",h);a.parentNode.insertBefore(g,a);a.style.display="none";(function(){if(a.readyState==4){a.parentNode.removeChild(a)}else{setTimeout(arguments.callee,10)}})()}aA(f,d,h)}}function aF(a){if(ah.ie&&ah.win&&a.readyState!=4){var b=ar("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(aO(a),b);a.style.display="none";(function(){if(a.readyState==4){a.parentNode.removeChild(a)}else{setTimeout(arguments.callee,10)}})()}else{a.parentNode.replaceChild(aO(a),a)}}function aO(b){var d=ar("div");if(ah.win&&ah.ie){d.innerHTML=b.innerHTML}else{var e=b.getElementsByTagName(aD)[0];if(e){var a=e.childNodes;if(a){var f=a.length;for(var c=0;c<f;c++){if(!(a[c].nodeType==1&&a[c].nodeName=="PARAM")&&!(a[c].nodeType==8)){d.appendChild(a[c].cloneNode(true))}}}}}return d}function aA(e,g,c){var d,a=aS(c);if(ah.wk&&ah.wk<312){return d}if(a){if(typeof e.id==aq){e.id=c}if(ah.ie&&ah.win){var f="";for(var j in e){if(e[j]!=Object.prototype[j]){if(j.toLowerCase()=="data"){g.movie=e[j]}else{if(j.toLowerCase()=="styleclass"){f+=' class="'+e[j]+'"'}else{if(j.toLowerCase()!="classid"){f+=" "+j+'="'+e[j]+'"'}}}}}var h="";for(var l in g){if(g[l]!=Object.prototype[l]){h+='<param name="'+l+'" value="'+g[l]+'" />'}}a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+f+">"+h+"</object>";ag[ag.length]=e.id;d=aS(e.id)}else{var b=ar(aD);b.setAttribute("type",aE);for(var m in e){if(e[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){b.setAttribute("class",e[m])}else{if(m.toLowerCase()!="classid"){b.setAttribute(m,e[m])}}}}for(var n in g){if(g[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){aQ(b,n,g[n])}}a.parentNode.replaceChild(b,a);d=b}}return d}function aQ(b,d,c){var a=ar("param");a.setAttribute("name",d);a.setAttribute("value",c);b.appendChild(a)}function aw(a){var b=aS(a);if(b&&b.nodeName=="OBJECT"){if(ah.ie&&ah.win){b.style.display="none";(function(){if(b.readyState==4){aT(a)}else{setTimeout(arguments.callee,10)}})()}else{b.parentNode.removeChild(b)}}}function aT(a){var b=aS(a);if(b){for(var c in b){if(typeof b[c]=="function"){b[c]=null}}b.parentNode.removeChild(b)}}function aS(a){var c=null;try{c=aL.getElementById(a)}catch(b){}return c}function ar(a){return aL.createElement(a)}function aM(a,c,b){a.attachEvent(c,b);al[al.length]=[a,c,b]}function ao(a){var b=ah.pv,c=a.split(".");c[0]=parseInt(c[0],10);c[1]=parseInt(c[1],10)||0;c[2]=parseInt(c[2],10)||0;return(b[0]>c[0]||(b[0]==c[0]&&b[1]>c[1])||(b[0]==c[0]&&b[1]==c[1]&&b[2]>=c[2]))?true:false}function az(b,f,a,c){if(ah.ie&&ah.mac){return}var e=aL.getElementsByTagName("head")[0];if(!e){return}var g=(a&&typeof a=="string")?a:"screen";if(c){aH=null;an=null}if(!aH||an!=g){var d=ar("style");d.setAttribute("type","text/css");d.setAttribute("media",g);aH=e.appendChild(d);if(ah.ie&&ah.win&&typeof aL.styleSheets!=aq&&aL.styleSheets.length>0){aH=aL.styleSheets[aL.styleSheets.length-1]}an=g}if(ah.ie&&ah.win){if(aH&&typeof aH.addRule==aD){aH.addRule(b,f)}}else{if(aH&&typeof aL.createTextNode!=aq){aH.appendChild(aL.createTextNode(b+" {"+f+"}"))}}}function ay(a,c){if(!aI){return}var b=c?"visible":"hidden";if(ak&&aS(a)){aS(a).style.visibility=b}else{az("#"+a,"visibility:"+b)}}function ai(b){var a=/[\\\"<>\.;]/;var c=a.exec(b)!=null;return c&&typeof encodeURIComponent!=aq?encodeURIComponent(b):b}var aR=function(){if(ah.ie&&ah.win){window.attachEvent("onunload",function(){var a=al.length;for(var b=0;b<a;b++){al[b][0].detachEvent(al[b][1],al[b][2])}var d=ag.length;for(var c=0;c<d;c++){aw(ag[c])}for(var e in ah){ah[e]=null}ah=null;for(var f in swfobject){swfobject[f]=null}swfobject=null})}}();return{registerObject:function(a,e,c,b){if(ah.w3&&a&&e){var d={};d.id=a;d.swfVersion=e;d.expressInstall=c;d.callbackFn=b;aG[aG.length]=d;ay(a,false)}else{if(b){b({success:false,id:a})}}},getObjectById:function(a){if(ah.w3){return av(a)}},embedSWF:function(m,e,h,f,c,a,b,j,g,l){var d={success:false,id:e};if(ah.w3&&!(ah.wk&&ah.wk<312)&&m&&e&&h&&f&&c){ay(e,false);aj(function(){h+="";f+="";var s={};if(g&&typeof g===aD){for(var q in g){s[q]=g[q]}}s.data=m;s.width=h;s.height=f;var p={};if(j&&typeof j===aD){for(var r in j){p[r]=j[r]}}if(b&&typeof b===aD){for(var n in b){if(typeof p.flashvars!=aq){p.flashvars+="&"+n+"="+b[n]}else{p.flashvars=n+"="+b[n]}}}if(ao(c)){var o=aA(s,p,e);if(s.id==e){ay(e,true)}d.success=true;d.ref=o}else{if(a&&au()){s.data=a;ae(s,p,e,l);return}else{ay(e,true)}}if(l){l(d)}})}else{if(l){l(d)}}},switchOffAutoHideShow:function(){aI=false},ua:ah,getFlashPlayerVersion:function(){return{major:ah.pv[0],minor:ah.pv[1],release:ah.pv[2]}},hasFlashPlayerVersion:ao,createSWF:function(a,b,c){if(ah.w3){return aA(a,b,c)}else{return undefined}},showExpressInstall:function(b,a,d,c){if(ah.w3&&au()){ae(b,a,d,c)}},removeSWF:function(a){if(ah.w3){aw(a)}},createCSS:function(b,a,c,d){if(ah.w3){az(b,a,c,d)}},addDomLoadEvent:aj,addLoadEvent:aC,getQueryParamValue:function(b){var a=aL.location.search||aL.location.hash;if(a){if(/\?/.test(a)){a=a.split("?")[1]}if(b==null){return ai(a)}var c=a.split("&");for(var d=0;d<c.length;d++){if(c[d].substring(0,c[d].indexOf("="))==b){return ai(c[d].substring((c[d].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(aU){var a=aS(ac);if(a&&aJ){a.parentNode.replaceChild(aJ,a);if(ad){ay(ad,true);if(ah.ie&&ah.win){aJ.style.display="block"}}if(ap){ap(at)}}aU=false}}}}();
  /*!
   * jQuery UI 1.8.9
   *
   * 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(a,c){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.9",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}});a.fn.extend({_focus:a.fn.focus,focus:function(d,e){return typeof d==="number"?this.each(function(){var f=this;setTimeout(function(){a(f).focus();if(e){e.call(f)}},d)}):this._focus.apply(this,arguments)},scrollParent:function(){var d;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){d=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{d=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!d.length?a(document):d},zIndex:function(g){if(g!==c){return this.css("zIndex",g)}if(this.length){var e=a(this[0]),d,f;while(e.length&&e[0]!==document){d=e.css("position");if(d==="absolute"||d==="relative"||d==="fixed"){f=parseInt(e.css("zIndex"),10);if(!isNaN(f)&&f!==0){return f}}e=e.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(d){d.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(f,d){var e=d==="Width"?["Left","Right"]:["Top","Bottom"],g=d.toLowerCase(),j={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function h(n,m,l,o){a.each(e,function(){m-=parseFloat(a.curCSS(n,"padding"+this,true))||0;if(l){m-=parseFloat(a.curCSS(n,"border"+this+"Width",true))||0}if(o){m-=parseFloat(a.curCSS(n,"margin"+this,true))||0}});return m}a.fn["inner"+d]=function(l){if(l===c){return j["inner"+d].call(this)}return this.each(function(){a(this).css(g,h(this,l)+"px")})};a.fn["outer"+d]=function(l,m){if(typeof l!=="number"){return j["outer"+d].call(this,l)}return this.each(function(){a(this).css(g,h(this,l,true,m)+"px")})}});function b(d){return !a(d).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(f,e,d){return !!a.data(f,d[3])},focusable:function(f){var j=f.nodeName.toLowerCase(),d=a.attr(f,"tabindex");if("area"===j){var h=f.parentNode,g=h.name,e;if(!f.href||!g||h.nodeName.toLowerCase()!=="map"){return false}e=a("img[usemap=#"+g+"]")[0];return !!e&&b(e)}return(/input|select|textarea|button|object/.test(j)?!f.disabled:"a"==j?f.href||!isNaN(d):!isNaN(d))&&b(f)},tabbable:function(e){var d=a.attr(e,"tabindex");return(isNaN(d)||d>=0)&&a(e).is(":focusable")}});a(function(){var d=document.body,e=d.appendChild(e=document.createElement("div"));a.extend(e.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=e.offsetHeight===100;a.support.selectstart="onselectstart" in e;d.removeChild(e).style.display="none"});a.extend(a.ui,{plugin:{add:function(e,f,h){var g=a.ui[e].prototype;for(var d in h){g.plugins[d]=g.plugins[d]||[];g.plugins[d].push([f,h[d]])}},call:function(d,f,e){var h=d.plugins[f];if(!h||!d.element[0].parentNode){return}for(var g=0;g<h.length;g++){if(d.options[h[g][0]]){h[g][1].apply(d.element,e)}}}},contains:function(e,d){return document.compareDocumentPosition?e.compareDocumentPosition(d)&16:e!==d&&e.contains(d)},hasScroll:function(g,e){if(a(g).css("overflow")==="hidden"){return false}var d=(e&&e==="left")?"scrollLeft":"scrollTop",f=false;if(g[d]>0){return true}g[d]=1;f=(g[d]>0);g[d]=0;return f},isOverAxis:function(e,d,f){return(e>d)&&(e<(d+f))},isOver:function(j,e,h,g,d,f){return a.ui.isOverAxis(j,h,d)&&a.ui.isOverAxis(e,g,f)}})})(jQuery);
  /*!
   * jQuery UI Widget 1.8.9
   *
   * 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(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(e){for(var f=0,g;(g=e[f])!=null;f++){b(g).triggerHandler("remove")}c(e)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],l;f=f.split(".")[1];l=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][l]=function(m){return !!b.data(m,f)};b[g]=b[g]||{};b[g][f]=function(m,n){if(arguments.length){this._createWidget(m,n)}};var j=new h();j.options=b.extend(true,{},j.options);b[g][f].prototype=b.extend(true,j,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:l},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(j){var g=typeof j==="string",h=Array.prototype.slice.call(arguments,1),l=this;j=!g&&h.length?b.extend.apply(null,[true,j].concat(h)):j;if(g&&j.charAt(0)==="_"){return l}if(g){this.each(function(){var m=b.data(this,f),n=m&&b.isFunction(m[j])?m[j].apply(m,h):m;if(n!==m&&n!==d){l=n;return false}})}else{this.each(function(){var m=b.data(this,f);if(m){m.option(j||{})._init()}else{b.data(this,f,new e(j,this))}})}return l}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});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(f,g,h){var l=this.options[f];g=b.Event(g);g.type=(f===this.widgetEventPrefix?f:this.widgetEventPrefix+f).toLowerCase();h=h||{};if(g.originalEvent){for(var e=b.event.props.length,j;e;){j=b.event.props[--e];g[j]=g.originalEvent[j]}}this.element.trigger(g,h);return !(b.isFunction(l)&&l.call(this.element[0],g,h)===false||g.isDefaultPrevented())}}})(jQuery);
  /*!
   * jQuery UI Mouse 1.8.9
   *
   * 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,b){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var c=this;this.element.bind("mousedown."+this.widgetName,function(d){return c._mouseDown(d)}).bind("click."+this.widgetName,function(d){if(true===a.data(d.target,c.widgetName+".preventClickEvent")){a.removeData(d.target,c.widgetName+".preventClickEvent");d.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(e){e.originalEvent=e.originalEvent||{};if(e.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(e));this._mouseDownEvent=e;var d=this,f=(e.which==1),c=(typeof this.options.cancel=="string"?a(e.target).parents().add(e.target).filter(this.options.cancel).length:false);if(!f||c||!this._mouseCapture(e)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)){this._mouseStarted=(this._mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true}}this._mouseMoveDelegate=function(g){return d._mouseMove(g)};this._mouseUpDelegate=function(g){return d._mouseUp(g)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);e.preventDefault();e.originalEvent.mouseHandled=true;return true},_mouseMove:function(c){if(a.browser.msie&&!(document.documentMode>=9)&&!c.button){return this._mouseUp(c)}if(this._mouseStarted){this._mouseDrag(c);return c.preventDefault()}if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,c)!==false);(this._mouseStarted?this._mouseDrag(c):this._mouseUp(c))}return !this._mouseStarted},_mouseUp:function(c){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(c.target==this._mouseDownEvent.target){a.data(c.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(c)}return false},_mouseDistanceMet:function(c){return(Math.max(Math.abs(this._mouseDownEvent.pageX-c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance)},_mouseDelayMet:function(c){return this.mouseDelayMet},_mouseStart:function(c){},_mouseDrag:function(c){},_mouseStop:function(c){},_mouseCapture:function(c){return true}})})(jQuery);(function(f,g){f.ui=f.ui||{};var d=/left|center|right/,e=/top|center|bottom/,a="center",b=f.fn.position,c=f.fn.offset;f.fn.position=function(j){if(!j||!j.of){return b.apply(this,arguments)}j=f.extend({},j);var o=f(j.of),n=o[0],q=(j.collision||"flip").split(" "),p=j.offset?j.offset.split(" "):[0,0],m,h,l;if(n.nodeType===9){m=o.width();h=o.height();l={top:0,left:0}}else{if(n.setTimeout){m=o.width();h=o.height();l={top:o.scrollTop(),left:o.scrollLeft()}}else{if(n.preventDefault){j.at="left top";m=h=0;l={top:j.of.pageY,left:j.of.pageX}}else{m=o.outerWidth();h=o.outerHeight();l=o.offset()}}}f.each(["my","at"],function(){var r=(j[this]||"").split(" ");if(r.length===1){r=d.test(r[0])?r.concat([a]):e.test(r[0])?[a].concat(r):[a,a]}r[0]=d.test(r[0])?r[0]:a;r[1]=e.test(r[1])?r[1]:a;j[this]=r});if(q.length===1){q[1]=q[0]}p[0]=parseInt(p[0],10)||0;if(p.length===1){p[1]=p[0]}p[1]=parseInt(p[1],10)||0;if(j.at[0]==="right"){l.left+=m}else{if(j.at[0]===a){l.left+=m/2}}if(j.at[1]==="bottom"){l.top+=h}else{if(j.at[1]===a){l.top+=h/2}}l.left+=p[0];l.top+=p[1];return this.each(function(){var v=f(this),x=v.outerWidth(),u=v.outerHeight(),w=parseInt(f.curCSS(this,"marginLeft",true))||0,s=parseInt(f.curCSS(this,"marginTop",true))||0,z=x+w+(parseInt(f.curCSS(this,"marginRight",true))||0),A=u+s+(parseInt(f.curCSS(this,"marginBottom",true))||0),y=f.extend({},l),r;if(j.my[0]==="right"){y.left-=x}else{if(j.my[0]===a){y.left-=x/2}}if(j.my[1]==="bottom"){y.top-=u}else{if(j.my[1]===a){y.top-=u/2}}y.left=Math.round(y.left);y.top=Math.round(y.top);r={left:y.left-w,top:y.top-s};f.each(["left","top"],function(C,B){if(f.ui.position[q[C]]){f.ui.position[q[C]][B](y,{targetWidth:m,targetHeight:h,elemWidth:x,elemHeight:u,collisionPosition:r,collisionWidth:z,collisionHeight:A,offset:p,my:j.my,at:j.at})}});if(f.fn.bgiframe){v.bgiframe()}v.offset(f.extend(y,{using:j.using}))})};f.ui.position={fit:{left:function(h,j){var m=f(window),l=j.collisionPosition.left+j.collisionWidth-m.width()-m.scrollLeft();h.left=l>0?h.left-l:Math.max(h.left-j.collisionPosition.left,h.left)},top:function(h,j){var m=f(window),l=j.collisionPosition.top+j.collisionHeight-m.height()-m.scrollTop();h.top=l>0?h.top-l:Math.max(h.top-j.collisionPosition.top,h.top)}},flip:{left:function(j,m){if(m.at[0]===a){return}var o=f(window),n=m.collisionPosition.left+m.collisionWidth-o.width()-o.scrollLeft(),h=m.my[0]==="left"?-m.elemWidth:m.my[0]==="right"?m.elemWidth:0,l=m.at[0]==="left"?m.targetWidth:-m.targetWidth,p=-2*m.offset[0];j.left+=m.collisionPosition.left<0?h+l+p:n>0?h+l+p:0},top:function(j,m){if(m.at[1]===a){return}var o=f(window),n=m.collisionPosition.top+m.collisionHeight-o.height()-o.scrollTop(),h=m.my[1]==="top"?-m.elemHeight:m.my[1]==="bottom"?m.elemHeight:0,l=m.at[1]==="top"?m.targetHeight:-m.targetHeight,p=-2*m.offset[1];j.top+=m.collisionPosition.top<0?h+l+p:n>0?h+l+p:0}}};if(!f.offset.setOffset){f.offset.setOffset=function(n,j){if(/static/.test(f.curCSS(n,"position"))){n.style.position="relative"}var m=f(n),p=m.offset(),h=parseInt(f.curCSS(n,"top",true),10)||0,o=parseInt(f.curCSS(n,"left",true),10)||0,l={top:(j.top-p.top)+h,left:(j.left-p.left)+o};if("using" in j){j.using.call(n,l)}else{m.css(l)}};f.fn.offset=function(h){var j=this[0];if(!j||!j.ownerDocument){return null}if(h){return this.each(function(){f.offset.setOffset(this,h)})}return c.call(this)}}}(jQuery));(function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this},_mouseCapture:function(c){var d=this.options;if(this.helper||d.disabled||a(c.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(c);if(!this.handle){return false}return true},_mouseStart:function(c){var d=this.options;this.helper=this._createHelper(c);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};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.position=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;(d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt));if(d.containment){this._setContainment()}if(this._trigger("start",c)===false){this._clear();return false}this._cacheHelperProportions();if(a.ui.ddmanager&&!d.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,c)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(c,true);return true},_mouseDrag:function(c,e){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!e){var d=this._uiHash();if(this._trigger("drag",c,d)===false){this._mouseUp({});return false}this.position=d.position}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"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,c)}return false},_mouseStop:function(d){var e=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){e=a.ui.ddmanager.drop(this,d)}if(this.dropped){e=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original"){return false}if((this.options.revert=="invalid"&&!e)||(this.options.revert=="valid"&&e)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,e))){var c=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(c._trigger("stop",d)!==false){c._clear()}})}else{if(this._trigger("stop",d)!==false){this._clear()}}return false},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})}else{this._clear()}return this},_getHandle:function(c){var d=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==c.target){d=true}});return d},_createHelper:function(d){var e=this.options;var c=a.isFunction(e.helper)?a(e.helper.apply(this.element[0],[d])):(e.helper=="clone"?this.element.clone():this.element);if(!c.parents("body").length){c.appendTo((e.appendTo=="parent"?this.element[0].parentNode:e.appendTo))}if(c[0]!=this.element[0]&&!(/(fixed|absolute)/).test(c.css("position"))){c.css("position","absolute")}return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string"){c=c.split(" ")}if(a.isArray(c)){c={left:+c[0],top:+c[1]||0}}if("left" in c){this.offset.click.left=c.left+this.margins.left}if("right" in c){this.offset.click.left=this.helperProportions.width-c.right+this.margins.left}if("top" in c){this.offset.click.top=c.top+this.margins.top}if("bottom" in c){this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){c={top:0,left:0}}return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.element.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f=this.options;if(f.containment=="parent"){f.containment=this.helper[0].parentNode}if(f.containment=="document"||f.containment=="window"){this.containment=[(f.containment=="document"?0:a(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(f.containment=="document"?0:a(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(f.containment=="document"?0:a(window).scrollLeft())+a(f.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(f.containment=="document"?0:a(window).scrollTop())+(a(f.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)&&f.containment.constructor!=Array){var d=a(f.containment)[0];if(!d){return}var e=a(f.containment).offset();var c=(a(d).css("overflow")!="hidden");this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(c?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(c?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(f.containment.constructor==Array){this.containment=f.containment}}},_convertPositionTo:function(g,j){if(!j){j=this.position}var e=g=="absolute"?1:-1;var f=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=(/(html|body)/i).test(c[0].tagName);return{top:(j.top+this.offset.relative.top*e+this.offset.parent.top*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(h?0:c.scrollTop()))*e)),left:(j.left+this.offset.relative.left*e+this.offset.parent.left*e-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:c.scrollLeft())*e))}},_generatePosition:function(f){var j=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,l=(/(html|body)/i).test(c[0].tagName);var e=f.pageX;var d=f.pageY;if(this.originalPosition){if(this.containment){if(f.pageX-this.offset.click.left<this.containment[0]){e=this.containment[0]+this.offset.click.left}if(f.pageY-this.offset.click.top<this.containment[1]){d=this.containment[1]+this.offset.click.top}if(f.pageX-this.offset.click.left>this.containment[2]){e=this.containment[2]+this.offset.click.left}if(f.pageY-this.offset.click.top>this.containment[3]){d=this.containment[3]+this.offset.click.top}}if(j.grid){var h=this.originalPageY+Math.round((d-this.originalPageY)/j.grid[1])*j.grid[1];d=this.containment?(!(h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3])?h:(!(h-this.offset.click.top<this.containment[1])?h-j.grid[1]:h+j.grid[1])):h;var g=this.originalPageX+Math.round((e-this.originalPageX)/j.grid[0])*j.grid[0];e=this.containment?(!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?g:(!(g-this.offset.click.left<this.containment[0])?g-j.grid[0]:g+j.grid[0])):g}}return{top:(d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(l?0:c.scrollTop())))),left:(e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():l?0:c.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(c,d,e){e=e||this._uiHash();a.ui.plugin.call(this,c,[d,e]);if(c=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.Widget.prototype._trigger.call(this,c,d,e)},plugins:{},_uiHash:function(c){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.9"});a.ui.plugin.add("draggable","connectToSortable",{start:function(d,f){var e=a(this).data("draggable"),g=e.options,c=a.extend({},f,{item:e.element});e.sortables=[];a(g.connectToSortable).each(function(){var h=a.data(this,"sortable");if(h&&!h.options.disabled){e.sortables.push({instance:h,shouldRevert:h.options.revert});h._refreshItems();h._trigger("activate",d,c)}})},stop:function(d,f){var e=a(this).data("draggable"),c=a.extend({},f,{item:e.element});a.each(e.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;e.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(d);this.instance.options.helper=this.instance.options._helper;if(e.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",d,c)}})},drag:function(d,g){var f=a(this).data("draggable"),c=this;var e=function(l){var r=this.offset.click.top,q=this.offset.click.left;var h=this.positionAbs.top,n=this.positionAbs.left;var m=l.height,p=l.width;var s=l.top,j=l.left;return a.ui.isOver(h+r,n+q,s,j,m,p)};a.each(f.sortables,function(h){this.instance.positionAbs=f.positionAbs;this.instance.helperProportions=f.helperProportions;this.instance.offset.click=f.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(c).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return g.helper[0]};d.target=this.instance.currentItem[0];this.instance._mouseCapture(d,true);this.instance._mouseStart(d,true,true);this.instance.offset.click.top=f.offset.click.top;this.instance.offset.click.left=f.offset.click.left;this.instance.offset.parent.left-=f.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=f.offset.parent.top-this.instance.offset.parent.top;f._trigger("toSortable",d);f.dropped=this.instance.element;f.currentItem=f.element;this.instance.fromOutside=f}if(this.instance.currentItem){this.instance._mouseDrag(d)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",d,this.instance._uiHash(this.instance));this.instance._mouseStop(d,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}f._trigger("fromSortable",d);f.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(d,e){var c=a("body"),f=a(this).data("draggable").options;if(c.css("cursor")){f._cursor=c.css("cursor")}c.css("cursor",f.cursor)},stop:function(c,d){var e=a(this).data("draggable").options;if(e._cursor){a("body").css("cursor",e._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(c,d){var e=a(this).data("draggable").options;a(e.iframeFix===true?"iframe":e.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(c,d){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(d,e){var c=a(e.helper),f=a(this).data("draggable").options;if(c.css("opacity")){f._opacity=c.css("opacity")}c.css("opacity",f.opacity)},stop:function(c,d){var e=a(this).data("draggable").options;if(e._opacity){a(d.helper).css("opacity",e._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(d,e){var c=a(this).data("draggable");if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){c.overflowOffset=c.scrollParent.offset()}},drag:function(e,f){var d=a(this).data("draggable"),g=d.options,c=false;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!g.axis||g.axis!="x"){if((d.overflowOffset.top+d.scrollParent[0].offsetHeight)-e.pageY<g.scrollSensitivity){d.scrollParent[0].scrollTop=c=d.scrollParent[0].scrollTop+g.scrollSpeed}else{if(e.pageY-d.overflowOffset.top<g.scrollSensitivity){d.scrollParent[0].scrollTop=c=d.scrollParent[0].scrollTop-g.scrollSpeed}}}if(!g.axis||g.axis!="y"){if((d.overflowOffset.left+d.scrollParent[0].offsetWidth)-e.pageX<g.scrollSensitivity){d.scrollParent[0].scrollLeft=c=d.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(e.pageX-d.overflowOffset.left<g.scrollSensitivity){d.scrollParent[0].scrollLeft=c=d.scrollParent[0].scrollLeft-g.scrollSpeed}}}}else{if(!g.axis||g.axis!="x"){if(e.pageY-a(document).scrollTop()<g.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(e.pageY-a(document).scrollTop())<g.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}}if(!g.axis||g.axis!="y"){if(e.pageX-a(document).scrollLeft()<g.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(e.pageX-a(document).scrollLeft())<g.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}}if(c!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(d,e)}}});a.ui.plugin.add("draggable","snap",{start:function(d,e){var c=a(this).data("draggable"),f=c.options;c.snapElements=[];a(f.snap.constructor!=String?(f.snap.items||":data(draggable)"):f.snap).each(function(){var h=a(this);var g=h.offset();if(this!=c.element[0]){c.snapElements.push({item:this,width:h.outerWidth(),height:h.outerHeight(),top:g.top,left:g.left})}})},drag:function(v,q){var g=a(this).data("draggable"),s=g.options;var z=s.snapTolerance;var y=q.offset.left,x=y+g.helperProportions.width,f=q.offset.top,e=f+g.helperProportions.height;for(var w=g.snapElements.length-1;w>=0;w--){var u=g.snapElements[w].left,p=u+g.snapElements[w].width,n=g.snapElements[w].top,B=n+g.snapElements[w].height;if(!((u-z<y&&y<p+z&&n-z<f&&f<B+z)||(u-z<y&&y<p+z&&n-z<e&&e<B+z)||(u-z<x&&x<p+z&&n-z<f&&f<B+z)||(u-z<x&&x<p+z&&n-z<e&&e<B+z))){if(g.snapElements[w].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,v,a.extend(g._uiHash(),{snapItem:g.snapElements[w].item})))}g.snapElements[w].snapping=false;continue}if(s.snapMode!="inner"){var c=Math.abs(n-e)<=z;var A=Math.abs(B-f)<=z;var j=Math.abs(u-x)<=z;var m=Math.abs(p-y)<=z;if(c){q.position.top=g._convertPositionTo("relative",{top:n-g.helperProportions.height,left:0}).top-g.margins.top}if(A){q.position.top=g._convertPositionTo("relative",{top:B,left:0}).top-g.margins.top}if(j){q.position.left=g._convertPositionTo("relative",{top:0,left:u-g.helperProportions.width}).left-g.margins.left}if(m){q.position.left=g._convertPositionTo("relative",{top:0,left:p}).left-g.margins.left}}var h=(c||A||j||m);if(s.snapMode!="outer"){var c=Math.abs(n-f)<=z;var A=Math.abs(B-e)<=z;var j=Math.abs(u-y)<=z;var m=Math.abs(p-x)<=z;if(c){q.position.top=g._convertPositionTo("relative",{top:n,left:0}).top-g.margins.top}if(A){q.position.top=g._convertPositionTo("relative",{top:B-g.helperProportions.height,left:0}).top-g.margins.top}if(j){q.position.left=g._convertPositionTo("relative",{top:0,left:u}).left-g.margins.left}if(m){q.position.left=g._convertPositionTo("relative",{top:0,left:p-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[w].snapping&&(c||A||j||m||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,v,a.extend(g._uiHash(),{snapItem:g.snapElements[w].item})))}g.snapElements[w].snapping=(c||A||j||m||h)}}});a.ui.plugin.add("draggable","stack",{start:function(d,e){var g=a(this).data("draggable").options;var f=a.makeArray(a(g.stack)).sort(function(j,h){return(parseInt(a(j).css("zIndex"),10)||0)-(parseInt(a(h).css("zIndex"),10)||0)});if(!f.length){return}var c=parseInt(f[0].style.zIndex)||0;a(f).each(function(h){this.style.zIndex=c+h});this[0].style.zIndex=c+f.length}});a.ui.plugin.add("draggable","zIndex",{start:function(d,e){var c=a(e.helper),f=a(this).data("draggable").options;if(c.css("zIndex")){f._zIndex=c.css("zIndex")}c.css("zIndex",f.zIndex)},stop:function(c,d){var e=a(this).data("draggable").options;if(e._zIndex){a(d.helper).css("zIndex",e._zIndex)}}})})(jQuery);(function(a,b){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var d=this.options,c=d.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(c)?c:function(e){return e.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[d.scope]=a.ui.ddmanager.droppables[d.scope]||[];a.ui.ddmanager.droppables[d.scope].push(this);(d.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var c=a.ui.ddmanager.droppables[this.options.scope];for(var d=0;d<c.length;d++){if(c[d]==this){c.splice(d,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(c,d){if(c=="accept"){this.accept=a.isFunction(d)?d:function(e){return e.is(d)}}a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(d){var c=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(c&&this._trigger("activate",d,this.ui(c)))},_deactivate:function(d){var c=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(c&&this._trigger("deactivate",d,this.ui(c)))},_over:function(d){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0]){return}if(this.accept.call(this.element[0],(c.currentItem||c.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",d,this.ui(c))}},_out:function(d){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0]){return}if(this.accept.call(this.element[0],(c.currentItem||c.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",d,this.ui(c))}},_drop:function(d,e){var c=e||a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0]){return false}var f=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=a.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],(c.currentItem||c.element))&&a.ui.intersect(c,a.extend(g,{offset:g.element.offset()}),g.options.tolerance)){f=true;return false}});if(f){return false}if(this.accept.call(this.element[0],(c.currentItem||c.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",d,this.ui(c));return this.element}return false},ui:function(d){return{draggable:(d.currentItem||d.element),helper:d.helper,position:d.position,offset:d.positionAbs}}});a.extend(a.ui.droppable,{version:"1.8.9"});a.ui.intersect=function(u,m,q){if(!m.offset){return false}var e=(u.positionAbs||u.position.absolute).left,d=e+u.helperProportions.width,p=(u.positionAbs||u.position.absolute).top,o=p+u.helperProportions.height;var g=m.offset.left,c=g+m.proportions.width,s=m.offset.top,n=s+m.proportions.height;switch(q){case"fit":return(g<=e&&d<=c&&s<=p&&o<=n);break;case"intersect":return(g<e+(u.helperProportions.width/2)&&d-(u.helperProportions.width/2)<c&&s<p+(u.helperProportions.height/2)&&o-(u.helperProportions.height/2)<n);break;case"pointer":var h=((u.positionAbs||u.position.absolute).left+(u.clickOffset||u.offset.click).left),j=((u.positionAbs||u.position.absolute).top+(u.clickOffset||u.offset.click).top),f=a.ui.isOver(j,h,s,g,m.proportions.height,m.proportions.width);return f;break;case"touch":return((p>=s&&p<=n)||(o>=s&&o<=n)||(p<s&&o>n))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(f,h){var c=a.ui.ddmanager.droppables[f.options.scope]||[];var g=h?h.type:null;var l=(f.currentItem||f.element).find(":data(droppable)").andSelf();droppablesLoop:for(var e=0;e<c.length;e++){if(c[e].options.disabled||(f&&!c[e].accept.call(c[e].element[0],(f.currentItem||f.element)))){continue}for(var d=0;d<l.length;d++){if(l[d]==c[e].element[0]){c[e].proportions.height=0;continue droppablesLoop}}c[e].visible=c[e].element.css("display")!="none";if(!c[e].visible){continue}c[e].offset=c[e].element.offset();c[e].proportions={width:c[e].element[0].offsetWidth,height:c[e].element[0].offsetHeight};if(g=="mousedown"){c[e]._activate.call(c[e],h)}}},drop:function(c,d){var e=false;a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(c,this,this.options.tolerance)){e=e||this._drop.call(this,d)}if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],(c.currentItem||c.element))){this.isout=1;this.isover=0;this._deactivate.call(this,d)}});return e},drag:function(c,d){if(c.options.refreshPositions){a.ui.ddmanager.prepareOffsets(c,d)}a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var f=a.ui.intersect(c,this,this.options.tolerance);var h=!f&&this.isover==1?"isout":(f&&this.isover==0?"isover":null);if(!h){return}var g;if(this.options.greedy){var e=this.element.parents(":data(droppable):eq(0)");if(e.length){g=a.data(e[0],"droppable");g.greedyChild=(h=="isover"?1:0)}}if(g&&h=="isover"){g.isover=0;g.isout=1;g._out.call(g,d)}this[h]=1;this[h=="isout"?"isover":"isout"]=0;this[h=="isover"?"_over":"_out"].call(this,d);if(g&&h=="isout"){g.isout=0;g.isover=1;g._over.call(g,d)}})}}})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,l=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(l.aspectRatio),aspectRatio:l.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:l.helper||l.ghost||l.animate?l.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=l.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var m=this.handles.split(",");this.handles={};for(var g=0;g<m.length;g++){var j=c.trim(m[g]),e="ui-resizable-"+j;var h=c('<div class="ui-resizable-handle '+e+'"></div>');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++l.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(r){r=r||this.element;for(var o in this.handles){if(this.handles[o].constructor==String){this.handles[o]=c(this.handles[o],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var p=c(this.handles[o],this.element),q=0;q=/sw|ne|nw|se|n|s/.test(o)?p.outerHeight():p.outerWidth();var n=["padding",/ne|nw|n/.test(o)?"Top":/se|sw|s/.test(o)?"Bottom":/^e$/.test(o)?"Right":"Left"].join("");r.css(n,q);this._proportionallyResize()}if(!c(this.handles[o]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=n&&n[1]?n[1]:"se"}});if(l.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var l=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}if(c.browser.opera&&(/relative/).test(e.css("position"))){e.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var m=b(this.helper.css("left")),h=b(this.helper.css("top"));if(l.containment){m+=c(l.containment).scrollLeft()||0;h+=c(l.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:m,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:m,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof l.aspectRatio=="number")?l.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var j=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",j=="auto"?this.axis+"-resize":j);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,p={},s=this,l=this.originalMousePosition,q=this.axis;var u=(e.pageX-l.left)||0,r=(e.pageY-l.top)||0;var j=this._change[q];if(!j){return false}var n=j.apply(this,[e,u,r]),m=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;if(this._aspectRatio||e.shiftKey){n=this._updateRatio(n,e)}n=this._respectSize(n,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(n);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var j=this.options,p=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:p.sizeDiff.height,m=e?0:p.sizeDiff.width;var q={width:(p.size.width-m),height:(p.size.height-f)},l=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,n=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;if(!j.animate){this.element.css(c.extend(q,{top:n,left:l}))}p.helper.height(p.size.height);p.helper.width(p.size.width);if(this._helper&&!j.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateCache:function(e){var f=this.options;this.offset=this.helper.offset();if(a(e.left)){this.position.left=e.left}if(a(e.top)){this.position.top=e.top}if(a(e.height)){this.size.height=e.height}if(a(e.width)){this.size.width=e.width}},_updateRatio:function(h,g){var j=this.options,l=this.position,f=this.size,e=this.axis;if(h.height){h.width=(f.height*this.aspectRatio)}else{if(h.width){h.height=(f.width/this.aspectRatio)}}if(e=="sw"){h.left=l.left+(f.width-h.width);h.top=null}if(e=="nw"){h.top=l.top+(f.height-h.height);h.left=l.left+(f.width-h.width)}return h},_respectSize:function(n,g){var l=this.helper,j=this.options,u=this._aspectRatio||g.shiftKey,s=this.axis,w=a(n.width)&&j.maxWidth&&(j.maxWidth<n.width),p=a(n.height)&&j.maxHeight&&(j.maxHeight<n.height),h=a(n.width)&&j.minWidth&&(j.minWidth>n.width),v=a(n.height)&&j.minHeight&&(j.minHeight>n.height);if(h){n.width=j.minWidth}if(v){n.height=j.minHeight}if(w){n.width=j.maxWidth}if(p){n.height=j.maxHeight}var f=this.originalPosition.left+this.originalSize.width,r=this.position.top+this.size.height;var m=/sw|nw|w/.test(s),e=/nw|ne|n/.test(s);if(h&&m){n.left=f-j.minWidth}if(w&&m){n.left=f-j.maxWidth}if(v&&e){n.top=r-j.minHeight}if(p&&e){n.top=r-j.maxHeight}var q=!n.width&&!n.height;if(q&&!n.left&&n.top){n.top=null}else{if(q&&!n.top&&n.left){n.left=null}}return n},_proportionallyResize:function(){var l=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f<this._proportionallyResizeElements.length;f++){var h=this._proportionallyResizeElements[f];if(!this.borderDif){var e=[h.css("borderTopWidth"),h.css("borderRightWidth"),h.css("borderBottomWidth"),h.css("borderLeftWidth")],j=[h.css("paddingTop"),h.css("paddingRight"),h.css("paddingBottom"),h.css("paddingLeft")];this.borderDif=c.map(e,function(m,o){var n=parseInt(m,10)||0,p=parseInt(j[o],10)||0;return n+p})}if(c.browser.msie&&!(!(c(g).is(":hidden")||c(g).parents(":hidden").length))){continue}h.css({height:(g.height()-this.borderDif[0]-this.borderDif[2])||0,width:(g.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var f=this.element,j=this.options;this.elementOffset=f.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++j.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var l=this.options,g=this.originalSize,j=this.originalPosition;return{left:j.left+f,width:g.width-f}},n:function(h,f,e){var l=this.options,g=this.originalSize,j=this.originalPosition;return{top:j.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.9"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),j=e.options;var h=function(l){c(l).each(function(){var m=c(this);m.data("resizable-alsoresize",{width:parseInt(m.width(),10),height:parseInt(m.height(),10),left:parseInt(m.css("left"),10),top:parseInt(m.css("top"),10),position:m.css("position")})})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.parentNode){if(j.alsoResize.length){j.alsoResize=j.alsoResize[0];h(j.alsoResize)}else{c.each(j.alsoResize,function(l){h(l)})}}else{h(j.alsoResize)}},resize:function(g,j){var f=c(this).data("resizable"),l=f.options,h=f.originalSize,n=f.originalPosition;var m={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-n.top)||0,left:(f.position.left-n.left)||0},e=function(o,p){c(o).each(function(){var s=c(this),u=c(this).data("resizable-alsoresize"),r={},q=p&&p.length?p:s.parents(j.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(q,function(v,x){var w=(u[x]||0)+(m[x]||0);if(w&&w>=0){r[x]=w||null}});if(c.browser.opera&&/relative/.test(s.css("position"))){f._revertToRelativePosition=true;s.css({position:"absolute",top:"auto",left:"auto"})}s.css(r)})};if(typeof(l.alsoResize)=="object"&&!l.alsoResize.nodeType){c.each(l.alsoResize,function(o,p){e(o,p)})}else{e(l.alsoResize)}},stop:function(g,h){var f=c(this).data("resizable"),j=f.options;var e=function(l){c(l).each(function(){var m=c(this);m.css({position:m.data("resizable-alsoresize").position})})};if(f._revertToRelativePosition){f._revertToRelativePosition=false;if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(l){e(l)})}else{e(j.alsoResize)}}c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(j,q){var r=c(this).data("resizable"),l=r.options;var h=r._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:r.sizeDiff.height,n=e?0:r.sizeDiff.width;var g={width:(r.size.width-n),height:(r.size.height-f)},m=(parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left))||null,p=(parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top))||null;r.element.animate(c.extend(g,p&&m?{top:p,left:m}:{}),{duration:l.animateDuration,easing:l.animateEasing,step:function(){var o={width:parseInt(r.element.css("width"),10),height:parseInt(r.element.css("height"),10),top:parseInt(r.element.css("top"),10),left:parseInt(r.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}r._updateCache(o);r._propagate("resize",j)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,u){var w=c(this).data("resizable"),l=w.options,n=w.element;var g=l.containment,m=(g instanceof c)?g.get(0):(/parent/.test(g))?n.parent().get(0):g;if(!m){return}w.containerElement=c(m);if(/document/.test(g)||g==document){w.containerOffset={left:0,top:0};w.containerPosition={left:0,top:0};w.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var r=c(m),j=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){j[p]=b(r.css("padding"+o))});w.containerOffset=r.offset();w.containerPosition=r.position();w.containerSize={height:(r.innerHeight()-j[3]),width:(r.innerWidth()-j[1])};var s=w.containerOffset,e=w.containerSize.height,q=w.containerSize.width,h=(c.ui.hasScroll(m,"left")?m.scrollWidth:q),v=(c.ui.hasScroll(m)?m.scrollHeight:e);w.parentData={element:m,left:s.left,top:s.top,width:h,height:v}}},resize:function(g,s){var w=c(this).data("resizable"),j=w.options,f=w.containerSize,r=w.containerOffset,p=w.size,q=w.position,u=w._aspectRatio||g.shiftKey,e={top:0,left:0},h=w.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=r}if(q.left<(w._helper?r.left:0)){w.size.width=w.size.width+(w._helper?(w.position.left-r.left):(w.position.left-e.left));if(u){w.size.height=w.size.width/j.aspectRatio}w.position.left=j.helper?r.left:0}if(q.top<(w._helper?r.top:0)){w.size.height=w.size.height+(w._helper?(w.position.top-r.top):w.position.top);if(u){w.size.width=w.size.height*j.aspectRatio}w.position.top=w._helper?r.top:0}w.offset.left=w.parentData.left+w.position.left;w.offset.top=w.parentData.top+w.position.top;var n=Math.abs((w._helper?w.offset.left-e.left:(w.offset.left-e.left))+w.sizeDiff.width),v=Math.abs((w._helper?w.offset.top-e.top:(w.offset.top-r.top))+w.sizeDiff.height);var m=w.containerElement.get(0)==w.element.parent().get(0),l=/relative|absolute/.test(w.containerElement.css("position"));if(m&&l){n-=w.parentData.left}if(n+w.size.width>=w.parentData.width){w.size.width=w.parentData.width-n;if(u){w.size.height=w.size.width/w.aspectRatio}}if(v+w.size.height>=w.parentData.height){w.size.height=w.parentData.height-v;if(u){w.size.width=w.size.height*w.aspectRatio}}},stop:function(f,q){var s=c(this).data("resizable"),g=s.options,n=s.position,p=s.containerOffset,e=s.containerPosition,j=s.containerElement;var l=c(s.helper),u=l.offset(),r=l.outerWidth()-s.sizeDiff.width,m=l.outerHeight()-s.sizeDiff.height;if(s._helper&&!g.animate&&(/relative/).test(j.css("position"))){c(this).css({left:u.left-e.left-p.left,width:r,height:m})}if(s._helper&&!g.animate&&(/static/).test(j.css("position"))){c(this).css({left:u.left-e.left-p.left,width:r,height:m})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),j=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof j.ghost=="string"?j.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,p){var r=c(this).data("resizable"),h=r.options,m=r.size,j=r.originalSize,l=r.originalPosition,q=r.axis,n=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((m.width-j.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((m.height-j.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(q)){r.size.width=j.width+g;r.size.height=j.height+f}else{if(/^(ne)$/.test(q)){r.size.width=j.width+g;r.size.height=j.height+f;r.position.top=l.top-f}else{if(/^(sw)$/.test(q)){r.size.width=j.width+g;r.size.height=j.height+f;r.position.left=l.left-g}else{r.size.width=j.width+g;r.size.height=j.height+f;r.position.top=l.top-f;r.position.left=l.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);(function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var d;this.refresh=function(){d=a(c.options.filter,c.element[0]);d.each(function(){var e=a(this);var f=e.offset();a.data(this,"selectable-item",{element:this,$element:e,left:f.left,top:f.top,right:f.left+e.outerWidth(),bottom:f.top+e.outerHeight(),startselected:false,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})};this.refresh();this.selectees=d.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(e){var c=this;this.opos=[e.pageX,e.pageY];if(this.options.disabled){return}var d=this.options;this.selectees=a(d.filter,this.element[0]);this._trigger("start",e);a(d.appendTo).append(this.helper);this.helper.css({left:e.clientX,top:e.clientY,width:0,height:0});if(d.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var f=a.data(this,"selectable-item");f.startselected=true;if(!e.metaKey){f.$element.removeClass("ui-selected");f.selected=false;f.$element.addClass("ui-unselecting");f.unselecting=true;c._trigger("unselecting",e,{unselecting:f.element})}});a(e.target).parents().andSelf().each(function(){var g=a.data(this,"selectable-item");if(g){var f=!e.metaKey||!g.$element.hasClass("ui-selected");g.$element.removeClass(f?"ui-unselecting":"ui-selected").addClass(f?"ui-selecting":"ui-unselecting");g.unselecting=!f;g.selecting=f;g.selected=f;if(f){c._trigger("selecting",e,{selecting:g.element})}else{c._trigger("unselecting",e,{unselecting:g.element})}return false}})},_mouseDrag:function(l){var d=this;this.dragged=true;if(this.options.disabled){return}var f=this.options;var e=this.opos[0],j=this.opos[1],c=l.pageX,h=l.pageY;if(e>c){var g=c;c=e;e=g}if(j>h){var g=h;h=j;j=g}this.helper.css({left:e,top:j,width:c-e,height:h-j});this.selectees.each(function(){var m=a.data(this,"selectable-item");if(!m||m.element==d.element[0]){return}var n=false;if(f.tolerance=="touch"){n=(!(m.left>c||m.right<e||m.top>h||m.bottom<j))}else{if(f.tolerance=="fit"){n=(m.left>e&&m.right<c&&m.top>j&&m.bottom<h)}}if(n){if(m.selected){m.$element.removeClass("ui-selected");m.selected=false}if(m.unselecting){m.$element.removeClass("ui-unselecting");m.unselecting=false}if(!m.selecting){m.$element.addClass("ui-selecting");m.selecting=true;d._trigger("selecting",l,{selecting:m.element})}}else{if(m.selecting){if(l.metaKey&&m.startselected){m.$element.removeClass("ui-selecting");m.selecting=false;m.$element.addClass("ui-selected");m.selected=true}else{m.$element.removeClass("ui-selecting");m.selecting=false;if(m.startselected){m.$element.addClass("ui-unselecting");m.unselecting=true}d._trigger("unselecting",l,{unselecting:m.element})}}if(m.selected){if(!l.metaKey&&!m.startselected){m.$element.removeClass("ui-selected");m.selected=false;m.$element.addClass("ui-unselecting");m.unselecting=true;d._trigger("unselecting",l,{unselecting:m.element})}}}});return false},_mouseStop:function(e){var c=this;this.dragged=false;var d=this.options;a(".ui-unselecting",this.element[0]).each(function(){var f=a.data(this,"selectable-item");f.$element.removeClass("ui-unselecting");f.unselecting=false;f.startselected=false;c._trigger("unselected",e,{unselected:f.element})});a(".ui-selecting",this.element[0]).each(function(){var f=a.data(this,"selectable-item");f.$element.removeClass("ui-selecting").addClass("ui-selected");f.selecting=false;f.selected=true;f.startselected=true;c._trigger("selected",e,{selected:f.element})});this._trigger("stop",e);this.helper.remove();return false}});a.extend(a.ui.selectable,{version:"1.8.9"})})(jQuery);(function(a,b){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(){var c=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):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 c=this.items.length-1;c>=0;c--){this.items[c].item.removeData("sortable-item")}return this},_setOption:function(c,d){if(c==="disabled"){this.options[c]=d;this.widget()[d?"addClass":"removeClass"]("ui-sortable-disabled")}else{a.Widget.prototype._setOption.apply(this,arguments)}},_mouseCapture:function(f,g){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(f);var e=null,d=this,c=a(f.target).parents().each(function(){if(a.data(this,"sortable-item")==d){e=a(this);return false}});if(a.data(f.target,"sortable-item")==d){e=a(f.target)}if(!e){return false}if(this.options.handle&&!g){var h=false;a(this.options.handle,e).find("*").andSelf().each(function(){if(this==f.target){h=true}});if(!h){return false}}this.currentItem=e;this._removeCurrentsFromItems();return true},_mouseStart:function(f,g,c){var h=this.options,d=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(f);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:f.pageX-this.offset.left,top:f.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(f);this.originalPageX=f.pageX;this.originalPageY=f.pageY;(h.cursorAt&&this._adjustOffsetFromHelper(h.cursorAt));this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(h.containment){this._setContainment()}if(h.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",h.cursor)}if(h.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",h.opacity)}if(h.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",h.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",f,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!c){for(var e=this.containers.length-1;e>=0;e--){this.containers[e]._trigger("activate",f,d._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!h.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(f);return true},_mouseDrag:function(g){this.position=this._generatePosition(g);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var h=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-g.pageY<h.scrollSensitivity){this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop+h.scrollSpeed}else{if(g.pageY-this.overflowOffset.top<h.scrollSensitivity){this.scrollParent[0].scrollTop=c=this.scrollParent[0].scrollTop-h.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-g.pageX<h.scrollSensitivity){this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft+h.scrollSpeed}else{if(g.pageX-this.overflowOffset.left<h.scrollSensitivity){this.scrollParent[0].scrollLeft=c=this.scrollParent[0].scrollLeft-h.scrollSpeed}}}else{if(g.pageY-a(document).scrollTop()<h.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()-h.scrollSpeed)}else{if(a(window).height()-(g.pageY-a(document).scrollTop())<h.scrollSensitivity){c=a(document).scrollTop(a(document).scrollTop()+h.scrollSpeed)}}if(g.pageX-a(document).scrollLeft()<h.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()-h.scrollSpeed)}else{if(a(window).width()-(g.pageX-a(document).scrollLeft())<h.scrollSensitivity){c=a(document).scrollLeft(a(document).scrollLeft()+h.scrollSpeed)}}}if(c!==false&&a.ui.ddmanager&&!h.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,g)}}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(var e=this.items.length-1;e>=0;e--){var f=this.items[e],d=f.item[0],j=this._intersectsWithPointer(f);if(!j){continue}if(d!=this.currentItem[0]&&this.placeholder[j==1?"next":"prev"]()[0]!=d&&!a.ui.contains(this.placeholder[0],d)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],d):true)){this.direction=j==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f)){this._rearrange(g,f)}else{break}this._trigger("change",g,this._uiHash());break}}this._contactContainers(g);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,g)}this._trigger("sort",g,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(d,e){if(!d){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,d)}if(this.options.revert){var c=this;var f=c.placeholder.offset();c.reverting=true;a(this.helper).animate({left:f.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(d)})}else{this._clear(d,e)}return false},cancel:function(){var c=this;if(this.dragging){this._mouseUp({target:null});if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("deactivate",null,c._uiHash(this));if(this.containers[d].containerCache.over){this.containers[d]._trigger("out",null,c._uiHash(this));this.containers[d].containerCache.over=0}}}if(this.placeholder){if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}}return this},serialize:function(e){var c=this._getItemsAsjQuery(e&&e.connected);var d=[];e=e||{};a(c).each(function(){var f=(a(e.item||this).attr(e.attribute||"id")||"").match(e.expression||(/(.+)[-=_](.+)/));if(f){d.push((e.key||f[1]+"[]")+"="+(e.key&&e.expression?f[1]:f[2]))}});if(!d.length&&e.key){d.push(e.key+"=")}return d.join("&")},toArray:function(e){var c=this._getItemsAsjQuery(e&&e.connected);var d=[];e=e||{};c.each(function(){d.push(a(e.item||this).attr(e.attribute||"id")||"")});return d},_intersectsWith:function(o){var e=this.positionAbs.left,d=e+this.helperProportions.width,n=this.positionAbs.top,m=n+this.helperProportions.height;var f=o.left,c=f+o.width,p=o.top,j=p+o.height;var q=this.offset.click.top,h=this.offset.click.left;var g=(n+q)>p&&(n+q)<j&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>o[this.floating?"width":"height"])){return g}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&p<n+(this.helperProportions.height/2)&&m-(this.helperProportions.height/2)<j)}},_intersectsWithPointer:function(e){var f=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),h=f&&d,c=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(!h){return false}return this.floating?(((g&&g=="right")||c=="down")?2:1):(c&&(c=="down"?2:1))},_intersectsWithSides:function(f){var d=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,f.top+(f.height/2),f.height),e=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,f.left+(f.width/2),f.width),c=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(this.floating&&g){return((g=="right"&&e)||(g=="left"&&!e))}else{return c&&((c=="down"&&d)||(c=="up"&&!d))}},_getDragVerticalDirection:function(){var c=this.positionAbs.top-this.lastPositionAbs.top;return c!=0&&(c>0?"down":"up")},_getDragHorizontalDirection:function(){var c=this.positionAbs.left-this.lastPositionAbs.left;return c!=0&&(c>0?"right":"left")},refresh:function(c){this._refreshItems(c);this.refreshPositions();return this},_connectWith:function(){var c=this.options;return c.connectWith.constructor==String?[c.connectWith]:c.connectWith},_getItemsAsjQuery:function(c){var n=this;var h=[];var f=[];var l=this._connectWith();if(l&&c){for(var e=l.length-1;e>=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element):a(g.options.items,g.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),g])}}}}f.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(var e=f.length-1;e>=0;e--){f[e][0].each(function(){h.push(this)})}return a(h)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data(sortable-item)");for(var d=0;d<this.items.length;d++){for(var c=0;c<e.length;c++){if(e[c]==this.items[d].item[0]){this.items.splice(d,1)}}}},_refreshItems:function(c){this.items=[];this.containers=[this];var l=this.items;var r=this;var g=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],c,{item:this.currentItem}):a(this.options.items,this.element),this]];var n=this._connectWith();if(n){for(var f=n.length-1;f>=0;f--){var o=a(n[f]);for(var e=o.length-1;e>=0;e--){var h=a.data(o[e],"sortable");if(h&&h!=this&&!h.options.disabled){g.push([a.isFunction(h.options.items)?h.options.items.call(h.element[0],c,{item:this.currentItem}):a(h.options.items,h.element),h]);this.containers.push(h)}}}}for(var f=g.length-1;f>=0;f--){var m=g[f][1];var d=g[f][0];for(var e=0,p=d.length;e<p;e++){var q=a(d[e]);q.data("sortable-item",m);l.push({item:q,instance:m,width:0,height:0,left:0,top:0})}}},refreshPositions:function(c){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var e=this.items.length-1;e>=0;e--){var f=this.items[e];var d=this.options.toleranceElement?a(this.options.toleranceElement,f.item):f.item;if(!c){f.width=d.outerWidth();f.height=d.outerHeight()}var g=d.offset();f.left=g.left;f.top=g.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var e=this.containers.length-1;e>=0;e--){var g=this.containers[e].element.offset();this.containers[e].containerCache.left=g.left;this.containers[e].containerCache.top=g.top;this.containers[e].containerCache.width=this.containers[e].element.outerWidth();this.containers[e].containerCache.height=this.containers[e].element.outerHeight()}}return this},_createPlaceholder:function(e){var c=e||this,f=c.options;if(!f.placeholder||f.placeholder.constructor==String){var d=f.placeholder;f.placeholder={element:function(){var g=a(document.createElement(c.currentItem[0].nodeName)).addClass(d||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!d){g.style.visibility="hidden"}return g},update:function(g,h){if(d&&!f.forcePlaceholderSize){return}if(!h.height()){h.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10))}if(!h.width()){h.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}}c.placeholder=a(f.placeholder.element.call(c.element,c.currentItem));c.currentItem.after(c.placeholder);f.placeholder.update(c,c.placeholder)},_contactContainers:function(c){var e=null,m=null;for(var g=this.containers.length-1;g>=0;g--){if(a.ui.contains(this.currentItem[0],this.containers[g].element[0])){continue}if(this._intersectsWith(this.containers[g].containerCache)){if(e&&a.ui.contains(this.containers[g].element[0],e.element[0])){continue}e=this.containers[g];m=g}else{if(this.containers[g].containerCache.over){this.containers[g]._trigger("out",c,this._uiHash(this));this.containers[g].containerCache.over=0}}}if(!e){return}if(this.containers.length===1){this.containers[m]._trigger("over",c,this._uiHash(this));this.containers[m].containerCache.over=1}else{if(this.currentContainer!=this.containers[m]){var l=10000;var h=null;var d=this.positionAbs[this.containers[m].floating?"left":"top"];for(var f=this.items.length-1;f>=0;f--){if(!a.ui.contains(this.containers[m].element[0],this.items[f].item[0])){continue}var n=this.items[f][this.containers[m].floating?"left":"top"];if(Math.abs(n-d)<l){l=Math.abs(n-d);h=this.items[f]}}if(!h&&!this.options.dropOnEmpty){return}this.currentContainer=this.containers[m];h?this._rearrange(c,h,null,true):this._rearrange(c,null,this.containers[m].element,true);this._trigger("change",c,this._uiHash());this.containers[m]._trigger("change",c,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[m]._trigger("over",c,this._uiHash(this));this.containers[m].containerCache.over=1}}},_createHelper:function(d){var e=this.options;var c=a.isFunction(e.helper)?a(e.helper.apply(this.element[0],[d,this.currentItem])):(e.helper=="clone"?this.currentItem.clone():this.currentItem);if(!c.parents("body").length){a(e.appendTo!="parent"?e.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==""||e.forceHelperSize){c.width(this.currentItem.width())}if(c[0].style.height==""||e.forceHelperSize){c.height(this.currentItem.height())}return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string"){c=c.split(" ")}if(a.isArray(c)){c={left:+c[0],top:+c[1]||0}}if("left" in c){this.offset.click.left=c.left+this.margins.left}if("right" in c){this.offset.click.left=this.helperProportions.width-c.right+this.margins.left}if("top" in c){this.offset.click.top=c.top+this.margins.top}if("bottom" in c){this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){c={top:0,left:0}}return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.currentItem.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.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 f=this.options;if(f.containment=="parent"){f.containment=this.helper[0].parentNode}if(f.containment=="document"||f.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(f.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(f.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)){var d=a(f.containment)[0];var e=a(f.containment).offset();var c=(a(d).css("overflow")!="hidden");this.containment=[e.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,e.left+(c?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(c?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(g,j){if(!j){j=this.position}var e=g=="absolute"?1:-1;var f=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=(/(html|body)/i).test(c[0].tagName);return{top:(j.top+this.offset.relative.top*e+this.offset.parent.top*e-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(h?0:c.scrollTop()))*e)),left:(j.left+this.offset.relative.left*e+this.offset.parent.left*e-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():h?0:c.scrollLeft())*e))}},_generatePosition:function(f){var j=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,l=(/(html|body)/i).test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var e=f.pageX;var d=f.pageY;if(this.originalPosition){if(this.containment){if(f.pageX-this.offset.click.left<this.containment[0]){e=this.containment[0]+this.offset.click.left}if(f.pageY-this.offset.click.top<this.containment[1]){d=this.containment[1]+this.offset.click.top}if(f.pageX-this.offset.click.left>this.containment[2]){e=this.containment[2]+this.offset.click.left}if(f.pageY-this.offset.click.top>this.containment[3]){d=this.containment[3]+this.offset.click.top}}if(j.grid){var h=this.originalPageY+Math.round((d-this.originalPageY)/j.grid[1])*j.grid[1];d=this.containment?(!(h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3])?h:(!(h-this.offset.click.top<this.containment[1])?h-j.grid[1]:h+j.grid[1])):h;var g=this.originalPageX+Math.round((e-this.originalPageX)/j.grid[0])*j.grid[0];e=this.containment?(!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?g:(!(g-this.offset.click.left<this.containment[0])?g-j.grid[0]:g+j.grid[0])):g}}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():(l?0:c.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():l?0:c.scrollLeft())))}},_rearrange:function(h,g,d,f){d?d[0].appendChild(this.placeholder[0]):g.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?g.item[0]:g.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var e=this,c=this.counter;window.setTimeout(function(){if(c==e.counter){e.refreshPositions(!f)}},0)},_clear:function(e,f){this.reverting=false;var g=[],c=this;if(!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()}if(this.fromOutside&&!f){g.push(function(h){this._trigger("receive",h,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])&&!f){g.push(function(h){this._trigger("update",h,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!f){g.push(function(h){this._trigger("remove",h,this._uiHash())})}for(var d=this.containers.length-1;d>=0;d--){if(a.ui.contains(this.containers[d].element[0],this.currentItem[0])&&!f){g.push((function(h){return function(j){h._trigger("receive",j,this._uiHash(this))}}).call(this,this.containers[d]));g.push((function(h){return function(j){h._trigger("update",j,this._uiHash(this))}}).call(this,this.containers[d]))}}}for(var d=this.containers.length-1;d>=0;d--){if(!f){g.push((function(h){return function(j){h._trigger("deactivate",j,this._uiHash(this))}}).call(this,this.containers[d]))}if(this.containers[d].containerCache.over){g.push((function(h){return function(j){h._trigger("out",j,this._uiHash(this))}}).call(this,this.containers[d]));this.containers[d].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(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(!f){this._trigger("beforeStop",e,this._uiHash());for(var d=0;d<g.length;d++){g[d].call(this,e)}this._trigger("stop",e,this._uiHash())}return false}if(!f){this._trigger("beforeStop",e,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!f){for(var d=0;d<g.length;d++){g[d].call(this,e)}this._trigger("stop",e,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.Widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(d){var c=d||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:d?d.element:null}}});a.extend(a.ui.sortable,{version:"1.8.9"})})(jQuery);(function(a,b){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,d=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(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(d.disabled){return}a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){if(d.disabled){return}a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){if(d.disabled){return}a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){if(d.disabled){return}a(this).removeClass("ui-state-focus")});c.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(d.navigation){var e=c.element.find("a").filter(d.navigationFilter).eq(0);if(e.length){var f=e.closest(".ui-accordion-header");if(f.length){c.active=f}else{c.active=e.closest(".ui-accordion-content").prev()}}}c.active=c._findActive(c.active||d.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(g){return c._keydown(g)}).next().attr("role","tabpanel");c.headers.not(c.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();if(!c.active.length){c.headers.eq(0).attr("tabIndex",0)}else{c.active.attr({"aria-expanded":"true",tabIndex:0})}if(!a.browser.safari){c.headers.find("a").attr("tabIndex",-1)}if(d.event){c.headers.bind(d.event.split(" ").join(".accordion ")+".accordion",function(g){c._clickHandler.call(c,g,this);g.preventDefault()})}},_createIcons:function(){var c=this.options;if(c.icons){a("<span></span>").addClass("ui-icon "+c.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(c.icons.header).toggleClass(c.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("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var d=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){d.css("height","")}return a.Widget.prototype.destroy.call(this)},_setOption:function(c,d){a.Widget.prototype._setOption.apply(this,arguments);if(c=="active"){this.activate(d)}if(c=="icons"){this._destroyIcons();if(d){this._createIcons()}}if(c=="disabled"){this.headers.add(this.headers.next())[d?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")}},_keydown:function(f){if(this.options.disabled||f.altKey||f.ctrlKey){return}var g=a.ui.keyCode,e=this.headers.length,c=this.headers.index(f.target),d=false;switch(f.keyCode){case g.RIGHT:case g.DOWN:d=this.headers[(c+1)%e];break;case g.LEFT:case g.UP:d=this.headers[(c-1+e)%e];break;case g.SPACE:case g.ENTER:this._clickHandler({target:f.target},f.target);f.preventDefault()}if(d){a(f.target).attr("tabIndex",-1);a(d).attr("tabIndex",0);d.focus();return false}return true},resize:function(){var c=this.options,e;if(c.fillSpace){if(a.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}e=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",d)}this.headers.each(function(){e-=a(this).outerHeight(true)});this.headers.next().each(function(){a(this).height(Math.max(0,e-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else{if(c.autoHeight){e=0;this.headers.next().each(function(){e=Math.max(e,a(this).height("").height())}).height(e)}}return this},activate:function(c){this.options.active=c;var d=this._findActive(c)[0];this._clickHandler({target:d},d);return this},_findActive:function(c){return c?typeof c==="number"?this.headers.filter(":eq("+c+")"):this.headers.not(this.headers.not(c)):c===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(c,g){var n=this.options;if(n.disabled){return}if(!c.target){if(!n.collapsible){return}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(n.icons.headerSelected).addClass(n.icons.header);this.active.next().addClass("ui-accordion-content-active");var j=this.active.next(),f={options:n,newHeader:a([]),oldHeader:n.active,newContent:a([]),oldContent:j},d=(this.active=a([]));this._toggle(d,j,f);return}var h=a(c.currentTarget||g),l=h[0]===this.active[0];n.active=n.collapsible&&l?false:this.headers.index(h);if(this.running||(!n.collapsible&&l)){return}var e=this.active,d=h.next(),j=this.active.next(),f={options:n,newHeader:l&&n.collapsible?a([]):h,oldHeader:this.active,newContent:l&&n.collapsible?a([]):d,oldContent:j},m=this.headers.index(this.active[0])>this.headers.index(h[0]);this.active=l?a([]):h;this._toggle(d,j,f,l,m);e.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(n.icons.headerSelected).addClass(n.icons.header);if(!l){h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(n.icons.header).addClass(n.icons.headerSelected);h.next().addClass("ui-accordion-content-active")}return},_toggle:function(c,j,g,l,m){var o=this,p=o.options;o.toShow=c;o.toHide=j;o.data=g;var d=function(){if(!o){return}return o._completed.apply(o,arguments)};o._trigger("changestart",null,o.data);o.running=j.size()===0?c.size():j.size();if(p.animated){var f={};if(p.collapsible&&l){f={toShow:a([]),toHide:j,complete:d,down:m,autoHeight:p.autoHeight||p.fillSpace}}else{f={toShow:c,toHide:j,complete:d,down:m,autoHeight:p.autoHeight||p.fillSpace}}if(!p.proxied){p.proxied=p.animated}if(!p.proxiedDuration){p.proxiedDuration=p.duration}p.animated=a.isFunction(p.proxied)?p.proxied(f):p.proxied;p.duration=a.isFunction(p.proxiedDuration)?p.proxiedDuration(f):p.proxiedDuration;var n=a.ui.accordion.animations,e=p.duration,h=p.animated;if(h&&!n[h]&&!a.easing[h]){h="slide"}if(!n[h]){n[h]=function(q){this.slide(q,{easing:h,duration:e||700})}}n[h](f)}else{if(p.collapsible&&l){c.toggle()}else{j.hide();c.show()}d(true)}j.prev().attr({"aria-expanded":"false",tabIndex:-1}).blur();c.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(c){this.running=c?0:--this.running;if(this.running){return}if(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.9",animations:{slide:function(m,j){m=a.extend({easing:"swing",duration:300},m,j);if(!m.toHide.size()){m.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},m);return}if(!m.toShow.size()){m.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},m);return}var d=m.toShow.css("overflow"),h=0,e={},g={},f=["height","paddingTop","paddingBottom"],c;var l=m.toShow;c=l[0].style.width;l.width(parseInt(l.parent().width(),10)-parseInt(l.css("paddingLeft"),10)-parseInt(l.css("paddingRight"),10)-(parseInt(l.css("borderLeftWidth"),10)||0)-(parseInt(l.css("borderRightWidth"),10)||0));a.each(f,function(n,p){g[p]="hide";var o=(""+a.css(m.toShow[0],p)).match(/^([\d+-.]+)(.*)$/);e[p]={value:o[1],unit:o[2]||"px"}});m.toShow.css({height:0,overflow:"hidden"}).show();m.toHide.filter(":hidden").each(m.complete).end().filter(":visible").animate(g,{step:function(n,o){if(o.prop=="height"){h=(o.end-o.start===0)?0:(o.now-o.start)/(o.end-o.start)}m.toShow[0].style[o.prop]=(h*e[o.prop].value)+e[o.prop].unit},duration:m.duration,easing:m.easing,complete:function(){if(!m.autoHeight){m.toShow.css("height","")}m.toShow.css({width:c,overflow:d});m.complete()}})},bounceslide:function(c){this.slide(c,{easing:c.down?"easeOutBounce":"swing",duration:c.down?1000:200})}}})})(jQuery);(function(a,b){a.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var c=this,e=this.element[0].ownerDocument,d;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(f){if(c.options.disabled||c.element.attr("readonly")){return}d=false;var g=a.ui.keyCode;switch(f.keyCode){case g.PAGE_UP:c._move("previousPage",f);break;case g.PAGE_DOWN:c._move("nextPage",f);break;case g.UP:c._move("previous",f);f.preventDefault();break;case g.DOWN:c._move("next",f);f.preventDefault();break;case g.ENTER:case g.NUMPAD_ENTER:if(c.menu.active){d=true;f.preventDefault()}case g.TAB:if(!c.menu.active){return}c.menu.select(f);break;case g.ESCAPE:c.element.val(c.term);c.close(f);break;default:clearTimeout(c.searching);c.searching=setTimeout(function(){if(c.term!=c.element.val()){c.selectedItem=null;c.search(null,f)}},c.options.delay);break}}).bind("keypress.autocomplete",function(f){if(d){d=false;f.preventDefault()}}).bind("focus.autocomplete",function(){if(c.options.disabled){return}c.selectedItem=null;c.previous=c.element.val()}).bind("blur.autocomplete",function(f){if(c.options.disabled){return}clearTimeout(c.searching);c.closing=setTimeout(function(){c.close(f);c._change(f)},150)});this._initSource();this.response=function(){return c._response.apply(c,arguments)};this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",e)[0]).mousedown(function(f){var g=c.menu.element[0];if(!a(f.target).closest(".ui-menu-item").length){setTimeout(function(){a(document).one("mousedown",function(h){if(h.target!==c.element[0]&&h.target!==g&&!a.ui.contains(g,h.target)){c.close()}})},1)}setTimeout(function(){clearTimeout(c.closing)},13)}).menu({focus:function(g,h){var f=h.item.data("item.autocomplete");if(false!==c._trigger("focus",g,{item:f})){if(/^key/.test(g.originalEvent.type)){c.element.val(f.value)}}},selected:function(h,j){var g=j.item.data("item.autocomplete"),f=c.previous;if(c.element[0]!==e.activeElement){c.element.focus();c.previous=f;setTimeout(function(){c.previous=f;c.selectedItem=g},1)}if(false!==c._trigger("select",h,{item:g})){c.element.val(g.value)}c.term=c.element.val();c.close(h);c.selectedItem=g},blur:function(f,g){if(c.menu.element.is(":visible")&&(c.element.val()!==c.term)){c.element.val(c.term)}}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");if(a.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();a.Widget.prototype.destroy.call(this)},_setOption:function(c,d){a.Widget.prototype._setOption.apply(this,arguments);if(c==="source"){this._initSource()}if(c==="appendTo"){this.menu.element.appendTo(a(d||"body",this.element[0].ownerDocument)[0])}if(c==="disabled"&&d&&this.xhr){this.xhr.abort()}},_initSource:function(){var c=this,e,d;if(a.isArray(this.options.source)){e=this.options.source;this.source=function(g,f){f(a.ui.autocomplete.filter(e,g.term))}}else{if(typeof this.options.source==="string"){d=this.options.source;this.source=function(g,f){if(c.xhr){c.xhr.abort()}c.xhr=a.ajax({url:d,data:g,dataType:"json",success:function(j,h,l){if(l===c.xhr){f(j)}c.xhr=null},error:function(h){if(h===c.xhr){f([])}c.xhr=null}})}}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}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--;if(!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){if(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 a.map(c,function(d){if(typeof d==="string"){return{label:d,value:d}}return a.extend({label:d.label||d.value,value:d.value||d.label},d)})},_suggest:function(c){var d=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(d,c);this.menu.deactivate();this.menu.refresh();d.show();this._resizeMenu();d.position(a.extend({of:this.element},this.options.position))},_resizeMenu:function(){var c=this.menu.element;c.outerWidth(Math.max(c.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(e,d){var c=this;a.each(d,function(f,g){c._renderItem(e,g)})},_renderItem:function(c,d){return a("<li></li>").data("item.autocomplete",d).append(a("<a></a>").text(d.label)).appendTo(c)},_move:function(d,c){if(!this.menu.element.is(":visible")){this.search(null,c);return}if(this.menu.first()&&/^previous/.test(d)||this.menu.last()&&/^next/.test(d)){this.element.val(this.term);this.menu.deactivate();return}this.menu[d](c)},widget:function(){return this.menu.element}});a.extend(a.ui.autocomplete,{escapeRegex:function(c){return c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(e,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(e,function(f){return d.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){return}c.preventDefault();b.select(c)});this.refresh()},refresh:function(){var c=this;var b=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");b.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(d){c.activate(d,a(this).parent())}).mouseleave(function(){c.deactivate()})},activate:function(e,d){this.deactivate();if(this.hasScroll()){var f=d.offset().top-this.element.offset().top,b=this.element.attr("scrollTop"),c=this.element.height();if(f<0){this.element.attr("scrollTop",b+f)}else{if(f>=c){this.element.attr("scrollTop",b+f-c+d.height())}}}this.active=d.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:d})},deactivate:function(){if(!this.active){return}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(e,d,c){if(!this.active){this.activate(c,this.element.children(d));return}var b=this.active[e+"All"](".ui-menu-item").eq(0);if(b.length){this.activate(c,b)}else{this.activate(c,this.element.children(d))}},nextPage:function(d){if(this.hasScroll()){if(!this.active||this.last()){this.activate(d,this.element.children(".ui-menu-item:first"));return}var e=this.active.offset().top,c=this.element.height(),b=this.element.children(".ui-menu-item").filter(function(){var f=a(this).offset().top-e-c+a(this).height();return f<10&&f>-10});if(!b.length){b=this.element.children(".ui-menu-item:last")}this.activate(d,b)}else{this.activate(d,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))}},previousPage:function(c){if(this.hasScroll()){if(!this.active||this.first()){this.activate(c,this.element.children(".ui-menu-item:last"));return}var d=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var e=a(this).offset().top-d+b-a(this).height();return e<10&&e>-10});if(!result.length){result=this.element.children(".ui-menu-item:first")}this.activate(c,result)}else{this.activate(c,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(e,h){var c,b="ui-button ui-widget ui-state-default ui-corner-all",g="ui-state-hover ui-state-active ",f="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",d=function(j){e(":ui-button",j.target.form).each(function(){var l=e(this).data("button");setTimeout(function(){l.refresh()},1)})},a=function(l){var j=l.name,m=l.form,n=e([]);if(j){if(m){n=e(m).find("[name='"+j+"']")}else{n=e("[name='"+j+"']",l.ownerDocument).filter(function(){return !this.form})}}return n};e.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",d);if(typeof this.options.disabled!=="boolean"){this.options.disabled=this.element.attr("disabled")}this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var j=this,m=this.options,n=this.type==="checkbox"||this.type==="radio",o="ui-state-hover"+(!n?" ui-state-active":""),l="ui-state-focus";if(m.label===null){m.label=this.buttonElement.html()}if(this.element.is(":disabled")){m.disabled=true}this.buttonElement.addClass(b).attr("role","button").bind("mouseenter.button",function(){if(m.disabled){return}e(this).addClass("ui-state-hover");if(this===c){e(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){if(m.disabled){return}e(this).removeClass(o)}).bind("focus.button",function(){e(this).addClass(l)}).bind("blur.button",function(){e(this).removeClass(l)});if(n){this.element.bind("change.button",function(){j.refresh()})}if(this.type==="checkbox"){this.buttonElement.bind("click.button",function(){if(m.disabled){return false}e(this).toggleClass("ui-state-active");j.buttonElement.attr("aria-pressed",j.element[0].checked)})}else{if(this.type==="radio"){this.buttonElement.bind("click.button",function(){if(m.disabled){return false}e(this).addClass("ui-state-active");j.buttonElement.attr("aria-pressed",true);var p=j.element[0];a(p).not(p).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)})}else{this.buttonElement.bind("mousedown.button",function(){if(m.disabled){return false}e(this).addClass("ui-state-active");c=this;e(document).one("mouseup",function(){c=null})}).bind("mouseup.button",function(){if(m.disabled){return false}e(this).removeClass("ui-state-active")}).bind("keydown.button",function(p){if(m.disabled){return false}if(p.keyCode==e.ui.keyCode.SPACE||p.keyCode==e.ui.keyCode.ENTER){e(this).addClass("ui-state-active")}}).bind("keyup.button",function(){e(this).removeClass("ui-state-active")});if(this.buttonElement.is("a")){this.buttonElement.keyup(function(p){if(p.keyCode===e.ui.keyCode.SPACE){e(this).click()}})}}}this._setOption("disabled",m.disabled)},_determineButtonType:function(){if(this.element.is(":checkbox")){this.type="checkbox"}else{if(this.element.is(":radio")){this.type="radio"}else{if(this.element.is("input")){this.type="input"}else{this.type="button"}}}if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("label[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var j=this.element.is(":checked");if(j){this.buttonElement.addClass("ui-state-active")}this.buttonElement.attr("aria-pressed",j)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(b+" "+g+" "+f).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());if(!this.hasTitle){this.buttonElement.removeAttr("title")}e.Widget.prototype.destroy.call(this)},_setOption:function(j,l){e.Widget.prototype._setOption.apply(this,arguments);if(j==="disabled"){if(l){this.element.attr("disabled",true)}else{this.element.removeAttr("disabled")}}this._resetButton()},refresh:function(){var j=this.element.is(":disabled");if(j!==this.options.disabled){this._setOption("disabled",j)}if(this.type==="radio"){a(this.element[0]).each(function(){if(e(this).is(":checked")){e(this).button("widget").addClass("ui-state-active").attr("aria-pressed",true)}else{e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)}})}else{if(this.type==="checkbox"){if(this.element.is(":checked")){this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true)}else{this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)}}}},_resetButton:function(){if(this.type==="input"){if(this.options.label){this.element.val(this.options.label)}return}var n=this.buttonElement.removeClass(f),m=e("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(n.empty()).text(),l=this.options.icons,j=l.primary&&l.secondary;if(l.primary||l.secondary){n.addClass("ui-button-text-icon"+(j?"s":(l.primary?"-primary":"-secondary")));if(l.primary){n.prepend("<span class='ui-button-icon-primary ui-icon "+l.primary+"'></span>")}if(l.secondary){n.append("<span class='ui-button-icon-secondary ui-icon "+l.secondary+"'></span>")}if(!this.options.text){n.addClass(j?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");if(!this.hasTitle){n.attr("title",m)}}}else{n.addClass("ui-button-text-only")}}});e.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(j,l){if(j==="disabled"){this.buttons.button("option",j,l)}e.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");e.Widget.prototype.destroy.call(this)}})}(jQuery));(function(d,e){var b="ui-dialog ui-widget ui-widget-content ui-corner-all ",a={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},c={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(g){var f=d(this).css(g).offset().top;if(f<0){d(this).css("top",g.top-f)}}},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 p=this,q=p.options,n=q.title||"&#160;",g=d.ui.dialog.getTitleId(p.element),o=(p.uiDialog=d("<div></div>")).appendTo(document.body).hide().addClass(b+q.dialogClass).css({zIndex:q.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(r){if(q.closeOnEscape&&r.keyCode&&r.keyCode===d.ui.keyCode.ESCAPE){p.close(r);r.preventDefault()}}).attr({role:"dialog","aria-labelledby":g}).mousedown(function(r){p.moveToTop(false,r)}),j=p.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(o),h=(p.uiDialogTitlebar=d("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(o),m=d('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){m.addClass("ui-state-hover")},function(){m.removeClass("ui-state-hover")}).focus(function(){m.addClass("ui-state-focus")}).blur(function(){m.removeClass("ui-state-focus")}).click(function(r){p.close(r);return false}).appendTo(h),l=(p.uiDialogTitlebarCloseText=d("<span></span>")).addClass("ui-icon ui-icon-closethick").text(q.closeText).appendTo(m),f=d("<span></span>").addClass("ui-dialog-title").attr("id",g).html(n).prependTo(h);if(d.isFunction(q.beforeclose)&&!d.isFunction(q.beforeClose)){q.beforeClose=q.beforeclose}h.find("*").add(h).disableSelection();if(q.draggable&&d.fn.draggable){p._makeDraggable()}if(q.resizable&&d.fn.resizable){p._makeResizable()}p._createButtons(q.buttons);p._isOpen=false;if(d.fn.bgiframe){o.bgiframe()}},_init:function(){if(this.options.autoOpen){this.open()}},destroy:function(){var f=this;if(f.overlay){f.overlay.destroy()}f.uiDialog.hide();f.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");f.uiDialog.remove();if(f.originalTitle){f.element.attr("title",f.originalTitle)}return f},widget:function(){return this.uiDialog},close:function(j){var f=this,h,g;if(false===f._trigger("beforeClose",j)){return}if(f.overlay){f.overlay.destroy()}f.uiDialog.unbind("keypress.ui-dialog");f._isOpen=false;if(f.options.hide){f.uiDialog.hide(f.options.hide,function(){f._trigger("close",j)})}else{f.uiDialog.hide();f._trigger("close",j)}d.ui.dialog.overlay.resize();if(f.options.modal){h=0;d(".ui-dialog").each(function(){if(this!==f.uiDialog[0]){g=d(this).css("z-index");if(!isNaN(g)){h=Math.max(h,g)}}});d.ui.dialog.maxZ=h}return f},isOpen:function(){return this._isOpen},moveToTop:function(l,j){var f=this,h=f.options,g;if((h.modal&&!l)||(!h.stack&&!h.modal)){return f._trigger("focus",j)}if(h.zIndex>d.ui.dialog.maxZ){d.ui.dialog.maxZ=h.zIndex}if(f.overlay){d.ui.dialog.maxZ+=1;f.overlay.$el.css("z-index",d.ui.dialog.overlay.maxZ=d.ui.dialog.maxZ)}g={scrollTop:f.element.attr("scrollTop"),scrollLeft:f.element.attr("scrollLeft")};d.ui.dialog.maxZ+=1;f.uiDialog.css("z-index",d.ui.dialog.maxZ);f.element.attr(g);f._trigger("focus",j);return f},open:function(){if(this._isOpen){return}var g=this,h=g.options,f=g.uiDialog;g.overlay=h.modal?new d.ui.dialog.overlay(g):null;g._size();g._position(h.position);f.show(h.show);g.moveToTop(true);if(h.modal){f.bind("keypress.ui-dialog",function(m){if(m.keyCode!==d.ui.keyCode.TAB){return}var l=d(":tabbable",this),n=l.filter(":first"),j=l.filter(":last");if(m.target===j[0]&&!m.shiftKey){n.focus(1);return false}else{if(m.target===n[0]&&m.shiftKey){j.focus(1);return false}}})}d(g.element.find(":tabbable").get().concat(f.find(".ui-dialog-buttonpane :tabbable").get().concat(f.get()))).eq(0).focus();g._isOpen=true;g._trigger("open");return g},_createButtons:function(j){var h=this,f=false,g=d("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),l=d("<div></div>").addClass("ui-dialog-buttonset").appendTo(g);h.uiDialog.find(".ui-dialog-buttonpane").remove();if(typeof j==="object"&&j!==null){d.each(j,function(){return !(f=true)})}if(f){d.each(j,function(m,o){o=d.isFunction(o)?{click:o,text:m}:o;var n=d('<button type="button"></button>').attr(o,true).unbind("click").click(function(){o.click.apply(h.element[0],arguments)}).appendTo(l);if(d.fn.button){n.button()}});g.appendTo(h.uiDialog)}},_makeDraggable:function(){var f=this,j=f.options,l=d(document),h;function g(m){return{position:m.position,offset:m.offset}}f.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(m,n){h=j.height==="auto"?"auto":d(this).height();d(this).height(d(this).height()).addClass("ui-dialog-dragging");f._trigger("dragStart",m,g(n))},drag:function(m,n){f._trigger("drag",m,g(n))},stop:function(m,n){j.position=[n.position.left-l.scrollLeft(),n.position.top-l.scrollTop()];d(this).removeClass("ui-dialog-dragging").height(h);f._trigger("dragStop",m,g(n));d.ui.dialog.overlay.resize()}})},_makeResizable:function(m){m=(m===e?this.options.resizable:m);var g=this,l=g.options,f=g.uiDialog.css("position"),j=(typeof m==="string"?m:"n,e,s,w,se,sw,ne,nw");function h(n){return{originalPosition:n.originalPosition,originalSize:n.originalSize,position:n.position,size:n.size}}g.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:g.element,maxWidth:l.maxWidth,maxHeight:l.maxHeight,minWidth:l.minWidth,minHeight:g._minHeight(),handles:j,start:function(n,o){d(this).addClass("ui-dialog-resizing");g._trigger("resizeStart",n,h(o))},resize:function(n,o){g._trigger("resize",n,h(o))},stop:function(n,o){d(this).removeClass("ui-dialog-resizing");l.height=d(this).height();l.width=d(this).width();g._trigger("resizeStop",n,h(o));d.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var f=this.options;if(f.height==="auto"){return f.minHeight}else{return Math.min(f.minHeight,f.height)}},_position:function(g){var h=[],j=[0,0],f;if(g){if(typeof g==="string"||(typeof g==="object"&&"0" in g)){h=g.split?g.split(" "):[g[0],g[1]];if(h.length===1){h[1]=h[0]}d.each(["left","top"],function(m,l){if(+h[m]===h[m]){j[m]=h[m];h[m]=l}});g={my:h.join(" "),at:h.join(" "),offset:j.join(" ")}}g=d.extend({},d.ui.dialog.prototype.options.position,g)}else{g=d.ui.dialog.prototype.options.position}f=this.uiDialog.is(":visible");if(!f){this.uiDialog.show()}this.uiDialog.css({top:0,left:0}).position(d.extend({of:window},g));if(!f){this.uiDialog.hide()}},_setOptions:function(j){var g=this,f={},h=false;d.each(j,function(l,m){g._setOption(l,m);if(l in a){h=true}if(l in c){f[l]=m}});if(h){this._size()}if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option",f)}},_setOption:function(j,l){var g=this,f=g.uiDialog;switch(j){case"beforeclose":j="beforeClose";break;case"buttons":g._createButtons(l);break;case"closeText":g.uiDialogTitlebarCloseText.text(""+l);break;case"dialogClass":f.removeClass(g.options.dialogClass).addClass(b+l);break;case"disabled":if(l){f.addClass("ui-dialog-disabled")}else{f.removeClass("ui-dialog-disabled")}break;case"draggable":var h=f.is(":data(draggable)");if(h&&!l){f.draggable("destroy")}if(!h&&l){g._makeDraggable()}break;case"position":g._position(l);break;case"resizable":var m=f.is(":data(resizable)");if(m&&!l){f.resizable("destroy")}if(m&&typeof l==="string"){f.resizable("option","handles",l)}if(!m&&l!==false){g._makeResizable(l)}break;case"title":d(".ui-dialog-title",g.uiDialogTitlebar).html(""+(l||"&#160;"));break}d.Widget.prototype._setOption.apply(g,arguments)},_size:function(){var l=this.options,g,j,f=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(l.minWidth>l.width){l.width=l.minWidth}g=this.uiDialog.css({height:"auto",width:l.width}).height();j=Math.max(0,l.minHeight-g);if(l.height==="auto"){if(d.support.minHeight){this.element.css({minHeight:j,height:"auto"})}else{this.uiDialog.show();var h=this.element.css("height","auto").height();if(!f){this.uiDialog.hide()}this.element.height(Math.max(h,j))}}else{this.element.height(Math.max(l.height-g,0))}if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())}}});d.extend(d.ui.dialog,{version:"1.8.9",uuid:0,maxZ:0,getTitleId:function(f){var g=f.attr("id");if(!g){this.uuid+=1;g=this.uuid}return"ui-dialog-title-"+g},overlay:function(f){this.$el=d.ui.dialog.overlay.create(f)}});d.extend(d.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:d.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(f){return f+".dialog-overlay"}).join(" "),create:function(g){if(this.instances.length===0){setTimeout(function(){if(d.ui.dialog.overlay.instances.length){d(document).bind(d.ui.dialog.overlay.events,function(h){if(d(h.target).zIndex()<d.ui.dialog.overlay.maxZ){return false}})}},1);d(document).bind("keydown.dialog-overlay",function(h){if(g.options.closeOnEscape&&h.keyCode&&h.keyCode===d.ui.keyCode.ESCAPE){g.close(h);h.preventDefault()}});d(window).bind("resize.dialog-overlay",d.ui.dialog.overlay.resize)}var f=(this.oldInstances.pop()||d("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});if(d.fn.bgiframe){f.bgiframe()}this.instances.push(f);return f},destroy:function(f){var g=d.inArray(f,this.instances);if(g!=-1){this.oldInstances.push(this.instances.splice(g,1)[0])}if(this.instances.length===0){d([document,window]).unbind(".dialog-overlay")}f.remove();var h=0;d.each(this.instances,function(){h=Math.max(h,this.css("z-index"))});this.maxZ=h},height:function(){var g,f;if(d.browser.msie&&d.browser.version<7){g=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);f=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(g<f){return d(window).height()+"px"}else{return g+"px"}}else{return d(document).height()+"px"}},width:function(){var f,g;if(d.browser.msie&&d.browser.version<7){f=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);g=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(f<g){return d(window).width()+"px"}else{return f+"px"}}else{return d(document).width()+"px"}},resize:function(){var f=d([]);d.each(d.ui.dialog.overlay.instances,function(){f=f.add(this)});f.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(b,c){var a=5;b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var d=this,e=this.options;this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");if(e.disabled){this.element.addClass("ui-slider-disabled ui-disabled")}this.range=b([]);if(e.range){if(e.range===true){this.range=b("<div></div>");if(!e.values){e.values=[this._valueMin(),this._valueMin()]}if(e.values.length&&e.values.length!==2){e.values=[e.values[0],e.values[0]]}}else{this.range=b("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(e.range==="min"||e.range==="max"){this.range.addClass("ui-slider-range-"+e.range)}this.range.addClass("ui-widget-header")}if(b(".ui-slider-handle",this.element).length===0){b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle")}if(e.values&&e.values.length){while(b(".ui-slider-handle",this.element).length<e.values.length){b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle")}}this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(f){f.preventDefault()}).hover(function(){if(!e.disabled){b(this).addClass("ui-state-hover")}},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(!e.disabled){b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}else{b(this).blur()}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(f){b(this).data("index.ui-slider-handle",f)});this.handles.keydown(function(m){var h=true,g=b(this).data("index.ui-slider-handle"),n,j,f,l;if(d.options.disabled){return}switch(m.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:h=false;if(!d._keySliding){d._keySliding=true;b(this).addClass("ui-state-active");n=d._start(m,g);if(n===false){return}}break}l=d.options.step;if(d.options.values&&d.options.values.length){j=f=d.values(g)}else{j=f=d.value()}switch(m.keyCode){case b.ui.keyCode.HOME:f=d._valueMin();break;case b.ui.keyCode.END:f=d._valueMax();break;case b.ui.keyCode.PAGE_UP:f=d._trimAlignValue(j+((d._valueMax()-d._valueMin())/a));break;case b.ui.keyCode.PAGE_DOWN:f=d._trimAlignValue(j-((d._valueMax()-d._valueMin())/a));break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(j===d._valueMax()){return}f=d._trimAlignValue(j+l);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(j===d._valueMin()){return}f=d._trimAlignValue(j-l);break}d._slide(m,g,f);return h}).keyup(function(g){var f=b(this).data("index.ui-slider-handle");if(d._keySliding){d._keySliding=false;d._stop(g,f);d._change(g,f);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(f){var g=this.options,l,n,e,h,q,m,p,j,d;if(g.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();l={x:f.pageX,y:f.pageY};n=this._normValueFromMouse(l);e=this._valueMax()-this._valueMin()+1;q=this;this.handles.each(function(o){var r=Math.abs(n-q.values(o));if(e>r){e=r;h=b(this);m=o}});if(g.range===true&&this.values(1)===g.min){m+=1;h=b(this.handles[m])}p=this._start(f,m);if(p===false){return false}this._mouseSliding=true;q._handleIndex=m;h.addClass("ui-state-active").focus();j=h.offset();d=!b(f.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=d?{left:0,top:0}:{left:f.pageX-j.left-(h.width()/2),top:f.pageY-j.top-(h.height()/2)-(parseInt(h.css("borderTopWidth"),10)||0)-(parseInt(h.css("borderBottomWidth"),10)||0)+(parseInt(h.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(f,m,n)}this._animateOff=true;return true},_mouseStart:function(d){return true},_mouseDrag:function(f){var d={x:f.pageX,y:f.pageY},e=this._normValueFromMouse(d);this._slide(f,this._handleIndex,e);return false},_mouseStop:function(d){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(d,this._handleIndex);this._change(d,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal"},_normValueFromMouse:function(e){var d,h,g,f,j;if(this.orientation==="horizontal"){d=this.elementSize.width;h=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{d=this.elementSize.height;h=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}g=(h/d);if(g>1){g=1}if(g<0){g=0}if(this.orientation==="vertical"){g=1-g}f=this._valueMax()-this._valueMin();j=this._valueMin()+g*f;return this._trimAlignValue(j)},_start:function(f,e){var d={handle:this.handles[e],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(e);d.values=this.values()}return this._trigger("start",f,d)},_slide:function(h,g,f){var d,e,j;if(this.options.values&&this.options.values.length){d=this.values(g?0:1);if((this.options.values.length===2&&this.options.range===true)&&((g===0&&f>d)||(g===1&&f<d))){f=d}if(f!==this.values(g)){e=this.values();e[g]=f;j=this._trigger("slide",h,{handle:this.handles[g],value:f,values:e});d=this.values(g?0:1);if(j!==false){this.values(g,f,true)}}}else{if(f!==this.value()){j=this._trigger("slide",h,{handle:this.handles[g],value:f});if(j!==false){this.value(f)}}}},_stop:function(f,e){var d={handle:this.handles[e],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(e);d.values=this.values()}this._trigger("stop",f,d)},_change:function(f,e){if(!this._keySliding&&!this._mouseSliding){var d={handle:this.handles[e],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(e);d.values=this.values()}this._trigger("change",f,d)}},value:function(d){if(arguments.length){this.options.value=this._trimAlignValue(d);this._refreshValue();this._change(null,0)}return this._value()},values:function(e,h){var g,d,f;if(arguments.length>1){this.options.values[e]=this._trimAlignValue(h);this._refreshValue();this._change(null,e)}if(arguments.length){if(b.isArray(arguments[0])){g=this.options.values;d=arguments[0];for(f=0;f<g.length;f+=1){g[f]=this._trimAlignValue(d[f]);this._change(null,f)}this._refreshValue()}else{if(this.options.values&&this.options.values.length){return this._values(e)}else{return this.value()}}}else{return this._values()}},_setOption:function(e,f){var d,g=0;if(b.isArray(this.options.values)){g=this.options.values.length}b.Widget.prototype._setOption.apply(this,arguments);switch(e){case"disabled":if(f){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(d=0;d<g;d+=1){this._change(null,d)}this._animateOff=false;break}},_value:function(){var d=this.options.value;d=this._trimAlignValue(d);return d},_values:function(d){var g,f,e;if(arguments.length){g=this.options.values[d];g=this._trimAlignValue(g);return g}else{f=this.options.values.slice();for(e=0;e<f.length;e+=1){f[e]=this._trimAlignValue(f[e])}return f}},_trimAlignValue:function(f){if(f<=this._valueMin()){return this._valueMin()}if(f>=this._valueMax()){return this._valueMax()}var d=(this.options.step>0)?this.options.step:1,e=(f-this._valueMin())%d;alignValue=f-e;if(Math.abs(e)*2>=d){alignValue+=(e>0)?d:(-d)}return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var g=this.options.range,f=this.options,p=this,e=(!this._animateOff)?f.animate:false,h,d={},j,m,l,n;if(this.options.values&&this.options.values.length){this.handles.each(function(q,o){h=(p.values(q)-p._valueMin())/(p._valueMax()-p._valueMin())*100;d[p.orientation==="horizontal"?"left":"bottom"]=h+"%";b(this).stop(1,1)[e?"animate":"css"](d,f.animate);if(p.options.range===true){if(p.orientation==="horizontal"){if(q===0){p.range.stop(1,1)[e?"animate":"css"]({left:h+"%"},f.animate)}if(q===1){p.range[e?"animate":"css"]({width:(h-j)+"%"},{queue:false,duration:f.animate})}}else{if(q===0){p.range.stop(1,1)[e?"animate":"css"]({bottom:(h)+"%"},f.animate)}if(q===1){p.range[e?"animate":"css"]({height:(h-j)+"%"},{queue:false,duration:f.animate})}}}j=h})}else{m=this.value();l=this._valueMin();n=this._valueMax();h=(n!==l)?(m-l)/(n-l)*100:0;d[p.orientation==="horizontal"?"left":"bottom"]=h+"%";this.handle.stop(1,1)[e?"animate":"css"](d,f.animate);if(g==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[e?"animate":"css"]({width:h+"%"},f.animate)}if(g==="max"&&this.orientation==="horizontal"){this.range[e?"animate":"css"]({width:(100-h)+"%"},{queue:false,duration:f.animate})}if(g==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[e?"animate":"css"]({height:h+"%"},f.animate)}if(g==="max"&&this.orientation==="vertical"){this.range[e?"animate":"css"]({height:(100-h)+"%"},{queue:false,duration:f.animate})}}}});b.extend(b.ui.slider,{version:"1.8.9"})}(jQuery));(function(d,f){var c=0,b=0;function e(){return ++c}function a(){return ++b}d.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"){if(this.options.collapsible&&h==this.options.selected){return}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+e()},_sanitizeSelector:function(g){return g.replace(/:/g,"\\:")},_cookie:function(){var g=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a());return d.cookie.apply(null,[g].concat(d.makeArray(arguments)))},_ui:function(h,g){return{tab:h,panel:g,index:this.anchors.index(h)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var g=d(this);g.html(g.data("label.tabs")).removeData("label.tabs")})},_tabify:function(v){var w=this,j=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(y,o){var x=d(o).attr("href");var z=x.split("#")[0],A;if(z&&(z===location.toString().split("#")[0]||(A=d("base")[0])&&z===A.href)){x=o.hash;o.href=x}if(h.test(x)){w.panels=w.panels.add(w.element.find(w._sanitizeSelector(x)))}else{if(x&&x!=="#"){d.data(o,"href.tabs",x);d.data(o,"load.tabs",x.replace(/#.*$/,""));var C=w._tabId(o);o.href="#"+C;var B=w.element.find("#"+C);if(!B.length){B=d(j.panelTemplate).attr("id",C).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(w.panels[y-1]||w.list);B.data("destroy.tabs",true)}w.panels=w.panels.add(B)}else{j.disabled.push(y)}}});if(v){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(j.selected===f){if(location.hash){this.anchors.each(function(x,o){if(o.hash==location.hash){j.selected=x;return false}})}if(typeof j.selected!=="number"&&j.cookie){j.selected=parseInt(w._cookie(),10)}if(typeof j.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}j.selected=j.selected||(this.lis.length?0:-1)}else{if(j.selected===null){j.selected=-1}}j.selected=((j.selected>=0&&this.anchors[j.selected])||j.selected<0)?j.selected:0;j.disabled=d.unique(j.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(x,o){return w.lis.index(x)}))).sort();if(d.inArray(j.selected,j.disabled)!=-1){j.disabled.splice(d.inArray(j.selected,j.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(j.selected>=0&&this.anchors.length){w.element.find(w._sanitizeSelector(w.anchors[j.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(j.selected).addClass("ui-tabs-selected ui-state-active");w.element.queue("tabs",function(){w._trigger("show",null,w._ui(w.anchors[j.selected],w.element.find(w._sanitizeSelector(w.anchors[j.selected].hash))[0]))});this.load(j.selected)}d(window).bind("unload",function(){w.lis.add(w.anchors).unbind(".tabs");w.lis=w.anchors=w.panels=null})}else{j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[j.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(j.cookie){this._cookie(j.selected,j.cookie)}for(var n=0,u;(u=this.lis[n]);n++){d(u)[d.inArray(n,j.disabled)!=-1&&!d(u).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(j.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(j.event!=="mouseover"){var m=function(x,o){if(o.is(":not(.ui-state-disabled)")){o.addClass("ui-state-"+x)}};var q=function(x,o){o.removeClass("ui-state-"+x)};this.lis.bind("mouseover.tabs",function(){m("hover",d(this))});this.lis.bind("mouseout.tabs",function(){q("hover",d(this))});this.anchors.bind("focus.tabs",function(){m("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){q("focus",d(this).closest("li"))})}var g,p;if(j.fx){if(d.isArray(j.fx)){g=j.fx[0];p=j.fx[1]}else{g=p=j.fx}}function l(o,x){o.css("display","");if(!d.support.opacity&&x.opacity){o[0].style.removeAttribute("filter")}}var r=p?function(o,x){d(o).closest("li").addClass("ui-tabs-selected ui-state-active");x.hide().removeClass("ui-tabs-hide").animate(p,p.duration||"normal",function(){l(x,p);w._trigger("show",null,w._ui(o,x[0]))})}:function(o,x){d(o).closest("li").addClass("ui-tabs-selected ui-state-active");x.removeClass("ui-tabs-hide");w._trigger("show",null,w._ui(o,x[0]))};var s=g?function(x,o){o.animate(g,g.duration||"normal",function(){w.lis.removeClass("ui-tabs-selected ui-state-active");o.addClass("ui-tabs-hide");l(o,g);w.element.dequeue("tabs")})}:function(x,o,y){w.lis.removeClass("ui-tabs-selected ui-state-active");o.addClass("ui-tabs-hide");w.element.dequeue("tabs")};this.anchors.bind(j.event+".tabs",function(){var x=this,z=d(x).closest("li"),o=w.panels.filter(":not(.ui-tabs-hide)"),y=w.element.find(w._sanitizeSelector(x.hash));if((z.hasClass("ui-tabs-selected")&&!j.collapsible)||z.hasClass("ui-state-disabled")||z.hasClass("ui-state-processing")||w.panels.filter(":animated").length||w._trigger("select",null,w._ui(this,y[0]))===false){this.blur();return false}j.selected=w.anchors.index(this);w.abort();if(j.collapsible){if(z.hasClass("ui-tabs-selected")){j.selected=-1;if(j.cookie){w._cookie(j.selected,j.cookie)}w.element.queue("tabs",function(){s(x,o)}).dequeue("tabs");this.blur();return false}else{if(!o.length){if(j.cookie){w._cookie(j.selected,j.cookie)}w.element.queue("tabs",function(){r(x,y)});w.load(w.anchors.index(this));this.blur();return false}}}if(j.cookie){w._cookie(j.selected,j.cookie)}if(y.length){if(o.length){w.element.queue("tabs",function(){s(x,o)})}w.element.queue("tabs",function(){r(x,y)});w.load(w.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(d.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 h=d.data(this,"href.tabs");if(h){this.href=h}var j=d(this).unbind(".tabs");d.each(["href","load","cache"],function(l,m){j.removeData(m+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(d.data(this,"destroy.tabs")){d(this).remove()}else{d(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"].join(" "))}});if(g.cookie){this._cookie(null,g.cookie)}return this},add:function(l,j,h){if(h===f){h=this.anchors.length}var g=this,n=this.options,q=d(n.tabTemplate.replace(/#\{href\}/g,l).replace(/#\{label\}/g,j)),p=!l.indexOf("#")?l.replace("#",""):this._tabId(d("a",q)[0]);q.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var m=g.element.find("#"+p);if(!m.length){m=d(n.panelTemplate).attr("id",p).data("destroy.tabs",true)}m.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(h>=this.lis.length){q.appendTo(this.list);m.appendTo(this.list[0].parentNode)}else{q.insertBefore(this.lis[h]);m.insertBefore(this.panels[h])}n.disabled=d.map(n.disabled,function(r,o){return r>=h?++r:r});this._tabify();if(this.anchors.length==1){n.selected=0;q.addClass("ui-tabs-selected ui-state-active");m.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){g._trigger("show",null,g._ui(g.anchors[0],g.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 j=this.options,l=this.lis.eq(g).remove(),h=this.panels.eq(g).remove();if(l.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(g+(g+1<this.anchors.length?1:-1))}j.disabled=d.map(d.grep(j.disabled,function(o,m){return o!=g}),function(o,m){return o>=g?--o:o});this._tabify();this._trigger("remove",null,this._ui(l.find("a")[0],h[0]));return this},enable:function(g){g=this._getIndex(g);var h=this.options;if(d.inArray(g,h.disabled)==-1){return}this.lis.eq(g).removeClass("ui-state-disabled");h.disabled=d.grep(h.disabled,function(l,j){return l!=g});this._trigger("enable",null,this._ui(this.anchors[g],this.panels[g]));return this},disable:function(h){h=this._getIndex(h);var g=this,j=this.options;if(h!=j.selected){this.lis.eq(h).addClass("ui-state-disabled");j.disabled.push(h);j.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[h],this.panels[h]))}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(l){l=this._getIndex(l);var h=this,n=this.options,g=this.anchors.eq(l)[0],j=d.data(g,"load.tabs");this.abort();if(!j||this.element.queue("tabs").length!==0&&d.data(g,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(l).addClass("ui-state-processing");if(n.spinner){var m=d("span",g);m.data("label.tabs",m.html()).html(n.spinner)}this.xhr=d.ajax(d.extend({},n.ajaxOptions,{url:j,success:function(p,o){h.element.find(h._sanitizeSelector(g.hash)).html(p);h._cleanup();if(n.cache){d.data(g,"cache.tabs",true)}h._trigger("load",null,h._ui(h.anchors[l],h.panels[l]));try{n.ajaxOptions.success(p,o)}catch(q){}},error:function(q,o,p){h._cleanup();h._trigger("load",null,h._ui(h.anchors[l],h.panels[l]));try{n.ajaxOptions.error(q,o,l,g)}catch(p){}}}));h.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(h,g){this.anchors.eq(h).removeData("cache.tabs").data("load.tabs",g);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.9"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(j,m){var g=this,n=this.options;var h=g._rotate||(g._rotate=function(o){clearTimeout(g.rotation);g.rotation=setTimeout(function(){var p=n.selected;g.select(++p<g.anchors.length?p:0)},j);if(o){o.stopPropagation()}});var l=g._unrotate||(g._unrotate=!m?function(o){if(o.clientX){g.rotate(null)}}:function(o){t=n.selected;h()});if(j){this.element.bind("tabsshow",h);this.anchors.bind(n.event+".tabs",l);h()}else{clearTimeout(g.rotation);this.element.unbind("tabsshow",h);this.anchors.unbind(n.event+".tabs",l);delete this._rotate;delete this._unrotate}return this}})})(jQuery);(function($,undefined){$.extend($.ui,{datepicker:{version:"1.8.9"}});var PROP_NAME="datepicker";var dpuuid=new Date().getTime();function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=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};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){this.uuid+=1;target.id="dp"+this.uuid}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}this._attachments(input,inst);input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});this._autoSize(inst);$.data(target,PROP_NAME,inst)},_attachments:function(input,inst){var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(inst.append){inst.append.remove()}if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}input.unbind("focus",this._showDatepicker);if(inst.trigger){inst.trigger.remove()}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==input[0]){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(input[0])}return false})}},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var date=new Date(2009,12-1,20);var dateFormat=this._get(inst,"dateFormat");if(dateFormat.match(/[DM]/)){var findMax=function(names){var max=0;var maxI=0;for(var i=0;i<names.length;i++){if(names[i].length>max){max=names[i].length;maxI=i}}return maxI};date.setMonth(findMax(this._get(inst,(dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))));date.setDate(findMax(this._get(inst,(dateFormat.match(/DD/)?"dayNames":"dayNamesShort")))+20-date.getDay())}inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst),true);this._updateDatepicker(inst);this._updateAlternate(inst);inst.dpDiv.show()},_dialogDatepicker:function(input,date,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){this.uuid+=1;var id="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+id+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});date=(date&&date.constructor==Date?this._formatDate(inst,date):date);this._dialogInput.val(date);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=document.documentElement.clientWidth;var browserHeight=document.documentElement.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker()}var date=this._getDateDatepicker(target,true);extendRemove(inst.settings,settings);this._attachments($(target),inst);this._autoSize(inst);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date){var inst=this._getInst(target);if(inst){this._setDate(inst,date);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst,noDefault)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker();handled=false;break;case 13:var sel=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker()}return false;break;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||event.metaKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_doKeyUp:function(event){var inst=$.datepicker._getInst(event.target);if(inst.input.val()!=inst.lastVal){try{var date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),(inst.input?inst.input.val():null),$.datepicker._getFormatConfig(inst));if(date){$.datepicker._setDateFromField(inst);$.datepicker._updateAlternate(inst);$.datepicker._updateDatepicker(inst)}}catch(event){$.datepicker.log(event)}}return true},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);if($.datepicker._curInst&&$.datepicker._curInst!=inst){$.datepicker._curInst.dpDiv.stop(true,true)}var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));inst.lastVal=null;$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.dpDiv.empty();inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim");var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;var cover=inst.dpDiv.find("iframe.ui-datepicker-cover");if(!!cover.length){var borders=$.datepicker._getBorders(inst.dpDiv);cover.css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()})}};inst.dpDiv.zIndex($(input).zIndex()+1);if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim||"show"]((showAnim?duration:null),postProcess)}if(!showAnim||!duration){postProcess()}if(inst.input.is(":visible")&&!inst.input.is(":disabled")){inst.input.focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var self=this;var borders=$.datepicker._getBorders(inst.dpDiv);inst.dpDiv.empty().append(this._generateHTML(inst));var cover=inst.dpDiv.find("iframe.ui-datepicker-cover");if(!!cover.length){cover.css({left:-borders[0],top:-borders[1],width:inst.dpDiv.outerWidth(),height:inst.dpDiv.outerHeight()})}inst.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst==$.datepicker._curInst&&$.datepicker._datepickerShowing&&inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")){inst.input.focus()}if(inst.yearshtml){var origyearshtml=inst.yearshtml;setTimeout(function(){if(origyearshtml===inst.yearshtml){inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml)}origyearshtml=inst.yearshtml=null},0)}},_getBorders:function(elem){var convert=function(value){return{thin:1,medium:2,thick:3}[value]||value};return[parseFloat(convert(elem.css("border-left-width"))),parseFloat(convert(elem.css("border-top-width")))]},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=document.documentElement.clientWidth+$(document).scrollLeft();var viewHeight=document.documentElement.clientHeight+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=Math.min(offset.left,(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0);offset.top-=Math.min(offset.top,(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(dpHeight+inputHeight):0);return offset},_findPos:function(obj){var inst=this._getInst(obj);var isRTL=this._get(inst,"isRTL");while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj[isRTL?"previousSibling":"nextSibling"]}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(this._datepickerShowing){var showAnim=this._get(inst,"showAnim");var duration=this._get(inst,"duration");var postProcess=function(){$.datepicker._tidyDialog(inst);this._curInst=null};if($.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide"))]((showAnim?duration:null),postProcess)}if(!showAnim){postProcess()}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if($target[0].id!=$.datepicker._mainDivId&&$target.parents("#"+$.datepicker._mainDivId).length==0&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker()}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear){setTimeout(function(){inst.input.focus()},0)}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{this._hideDatepicker();this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input.focus()}this._lastInput=null}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);var dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getTime());checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));var time=checkDate.getTime();checkDate.setMonth(0);checkDate.setDate(1);return Math.floor(Math.round((time-checkDate)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){var isDoubled=lookAhead(match);var size=(match=="@"?14:(match=="!"?20:(match=="y"&&isDoubled?4:(match=="o"?3:2))));var digits=new RegExp("^\\d{1,"+size+"}");var num=value.substring(iValue).match(digits);if(!num){throw"Missing number at position "+iValue}iValue+=num[0].length;return parseInt(num[0],10)};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);for(var i=0;i<names.length;i++){if(value.substr(iValue,names[i].length).toLowerCase()==names[i].toLowerCase()){iValue+=names[i].length;return i+1}}throw"Unknown name at position "+iValue};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"!":var date=new Date((getNumber("!")-this._ticksTo1970)/10000);year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},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:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":output+=formatNumber("o",(date.getTime()-new Date(date.getFullYear(),0,0).getTime())/86400000,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"!":output+=date.getTime()*10000+this._ticksTo1970;break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst,noDefault){if(inst.input.val()==inst.lastVal){return}var dateFormat=this._get(inst,"dateFormat");var dates=inst.lastVal=inst.input?inst.input.val():null;var date,defaultDate;date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);dates=(noDefault?"":dates)}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date()))},_determineDate:function(inst,date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),offset,$.datepicker._getFormatConfig(inst))}catch(e){}var date=(offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};var newDate=(date==null||date===""?defaultDate:(typeof date=="string"?offsetString(date):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):new Date(date.getTime()))));newDate=(newDate&&newDate.toString()=="Invalid Date"?defaultDate:newDate);if(newDate){newDate.setHours(0);newDate.setMinutes(0);newDate.setSeconds(0);newDate.setMilliseconds(0)}return this._daylightSavingAdjust(newDate)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,noChange){var clear=!date;var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;var newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date()));inst.selectedDay=inst.currentDay=newDate.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear();if((origMonth!=inst.selectedMonth||origYear!=inst.selectedYear)&&!noChange){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-(numMonths[0]*numMonths[1])+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var showWeek=this._get(inst,"showWeek");var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var selectOtherMonths=this._get(inst,"selectOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group';if(numMonths[1]>1){switch(col){case 0:calender+=" ui-datepicker-group-first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle";cornerClass="";break}}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead=(showWeek?'<th class="ui-datepicker-week-col">'+this._get(inst,"weekHeader")+"</th>":"");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody=(!showWeek?"":'<td class="ui-datepicker-week-col">'+this._get(inst,"calculateWeek")(printDate)+"</td>");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=(otherMonth&&!selectOtherMonths)||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()==currentDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+inst.id+"',"+printDate.getMonth()+","+printDate.getFullYear()+', this);return false;"')+">"+(otherMonth&&!showOtherMonths?"&#xa0;":(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()==currentDate.getTime()?" ui-state-active":"")+(otherMonth?" ui-priority-secondary":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span>"}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'M');\" onclick=\"DP_jQuery_"+dpuuid+".datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")}inst.yearshtml="";if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var thisYear=new Date().getFullYear();var determineYear=function(value){var year=(value.match(/c[+-].*/)?drawYear+parseInt(value.substring(1),10):(value.match(/[+-].*/)?thisYear+parseInt(value,10):parseInt(value,10)));return(isNaN(year)?thisYear:year)};var year=determineYear(years[0]);var endYear=Math.max(year,determineYear(years[1]||""));year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);inst.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+dpuuid+".datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){inst.yearshtml+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}inst.yearshtml+="</select>";if(!$.browser.mozilla){html+=inst.yearshtml;inst.yearshtml=null}else{html+='<select class="ui-datepicker-year"><option value="'+drawYear+'" selected="selected">'+drawYear+"</option></select>"}}html+=this._get(inst,"yearSuffix");if(showMonthAfterYear){html+=(secondary||!(changeMonth&&changeYear)?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");var newDate=(minDate&&date<minDate?minDate:date);newDate=(maxDate&&newDate>maxDate?maxDate:newDate);return newDate},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var minDate=this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime()))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate"||options=="widget")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.8.9";window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments)},value:function(c){if(c===b){return this._value()}this._setOption("value",c);return this},_setOption:function(c,d){if(c==="value"){this.options.value=d;this._refreshValue();if(this._value()===this.options.max){this._trigger("complete")}}a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var c=this.options.value;if(typeof c!=="number"){c=0}return Math.min(this.options.max,Math.max(this.min,c))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var d=this.value();var c=this._percentage();if(this.oldValue!==d){this.oldValue=d;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",d===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",d)}});a.extend(a.ui.progressbar,{version:"1.8.9"})})(jQuery);jQuery.effects||(function(h,e){h.effects={};h.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(p,o){h.fx.step[o]=function(q){if(!q.colorInit){q.start=n(q.elem,o);q.end=l(q.end);q.colorInit=true}q.elem.style[o]="rgb("+Math.max(Math.min(parseInt((q.pos*(q.end[0]-q.start[0]))+q.start[0],10),255),0)+","+Math.max(Math.min(parseInt((q.pos*(q.end[1]-q.start[1]))+q.start[1],10),255),0)+","+Math.max(Math.min(parseInt((q.pos*(q.end[2]-q.start[2]))+q.start[2],10),255),0)+")"}});function l(p){var o;if(p&&p.constructor==Array&&p.length==3){return p}if(o=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(p)){return[parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10)]}if(o=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(p)){return[parseFloat(o[1])*2.55,parseFloat(o[2])*2.55,parseFloat(o[3])*2.55]}if(o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(p)){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}if(o=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(p)){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}if(o=/rgba\(0, 0, 0, 0\)/.exec(p)){return a.transparent}return a[h.trim(p).toLowerCase()]}function n(q,o){var p;do{p=h.curCSS(q,o);if(p!=""&&p!="transparent"||h.nodeName(q,"body")){break}o="backgroundColor"}while(q=q.parentNode);return l(p)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};var f=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function g(){var r=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,s={},p,q;if(r&&r.length&&r[0]&&r[r[0]]){var o=r.length;while(o--){p=r[o];if(typeof r[p]=="string"){q=p.replace(/\-(\w)/g,function(u,v){return v.toUpperCase()});s[q]=r[p]}}}else{for(p in r){if(typeof r[p]==="string"){s[p]=r[p]}}}return s}function b(p){var o,q;for(o in p){q=p[o];if(q==null||h.isFunction(q)||o in c||(/scrollbar/).test(o)||(!(/color/i).test(o)&&isNaN(parseFloat(q)))){delete p[o]}}return p}function j(o,q){var r={_:0},p;for(p in q){if(o[p]!=q[p]){r[p]=q[p]}}return r}h.effects.animateClass=function(o,p,r,q){if(h.isFunction(r)){q=r;r=null}return this.queue("fx",function(){var x=h(this),u=x.attr("style")||" ",z=b(g.call(this)),w,v=x.attr("className");h.each(f,function(A,B){if(o[B]){x[B+"Class"](o[B])}});w=b(g.call(this));x.attr("className",v);x.animate(j(z,w),p,r,function(){h.each(f,function(A,B){if(o[B]){x[B+"Class"](o[B])}});if(typeof x.attr("style")=="object"){x.attr("style").cssText="";x.attr("style").cssText=u}else{x.attr("style",u)}if(q){q.apply(this,arguments)}});var s=h.queue(this),y=s.splice(s.length-1,1)[0];s.splice(1,0,y);h.dequeue(this)})};h.fn.extend({_addClass:h.fn.addClass,addClass:function(p,o,r,q){return o?h.effects.animateClass.apply(this,[{add:p},o,r,q]):this._addClass(p)},_removeClass:h.fn.removeClass,removeClass:function(p,o,r,q){return o?h.effects.animateClass.apply(this,[{remove:p},o,r,q]):this._removeClass(p)},_toggleClass:h.fn.toggleClass,toggleClass:function(q,p,o,s,r){if(typeof p=="boolean"||p===e){if(!o){return this._toggleClass(q,p)}else{return h.effects.animateClass.apply(this,[(p?{add:q}:{remove:q}),o,s,r])}}else{return h.effects.animateClass.apply(this,[{toggle:q},p,o,s])}},switchClass:function(o,q,p,s,r){return h.effects.animateClass.apply(this,[{add:q,remove:o},p,s,r])}});h.extend(h.effects,{version:"1.8.9",save:function(p,q){for(var o=0;o<q.length;o++){if(q[o]!==null){p.data("ec.storage."+q[o],p[0].style[q[o]])}}},restore:function(p,q){for(var o=0;o<q.length;o++){if(q[o]!==null){p.css(q[o],p.data("ec.storage."+q[o]))}}},setMode:function(o,p){if(p=="toggle"){p=o.is(":hidden")?"show":"hide"}return p},getBaseline:function(p,q){var r,o;switch(p[0]){case"top":r=0;break;case"middle":r=0.5;break;case"bottom":r=1;break;default:r=p[0]/q.height}switch(p[1]){case"left":o=0;break;case"center":o=0.5;break;case"right":o=1;break;default:o=p[1]/q.width}return{x:o,y:r}},createWrapper:function(o){if(o.parent().is(".ui-effects-wrapper")){return o.parent()}var p={width:o.outerWidth(true),height:o.outerHeight(true),"float":o.css("float")},q=h("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});o.wrap(q);q=o.parent();if(o.css("position")=="static"){q.css({position:"relative"});o.css({position:"relative"})}else{h.extend(p,{position:o.css("position"),zIndex:o.css("z-index")});h.each(["top","left","bottom","right"],function(r,s){p[s]=o.css(s);if(isNaN(parseInt(p[s],10))){p[s]="auto"}});o.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return q.css(p).show()},removeWrapper:function(o){if(o.parent().is(".ui-effects-wrapper")){return o.parent().replaceWith(o)}return o},setTransition:function(p,r,o,q){q=q||{};h.each(r,function(u,s){unit=p.cssUnit(s);if(unit[0]>0){q[s]=unit[0]*o+unit[1]}});return q}});function d(p,o,q,r){if(typeof p=="object"){r=o;q=null;o=p;p=o.effect}if(h.isFunction(o)){r=o;q=null;o={}}if(typeof o=="number"||h.fx.speeds[o]){r=q;q=o;o={}}if(h.isFunction(q)){r=q;q=null}o=o||{};q=q||o.duration;q=h.fx.off?0:typeof q=="number"?q:q in h.fx.speeds?h.fx.speeds[q]:h.fx.speeds._default;r=r||o.complete;return[p,o,q,r]}function m(o){if(!o||typeof o==="number"||h.fx.speeds[o]){return true}if(typeof o==="string"&&!h.effects[o]){return true}return false}h.fn.extend({effect:function(r,q,u,w){var p=d.apply(this,arguments),s={options:p[1],duration:p[2],callback:p[3]},v=s.options.mode,o=h.effects[r];if(h.fx.off||!o){if(v){return this[v](s.duration,s.callback)}else{return this.each(function(){if(s.callback){s.callback.call(this)}})}}return o.call(this,s)},_show:h.fn.show,show:function(p){if(m(p)){return this._show.apply(this,arguments)}else{var o=d.apply(this,arguments);o[1].mode="show";return this.effect.apply(this,o)}},_hide:h.fn.hide,hide:function(p){if(m(p)){return this._hide.apply(this,arguments)}else{var o=d.apply(this,arguments);o[1].mode="hide";return this.effect.apply(this,o)}},__toggle:h.fn.toggle,toggle:function(p){if(m(p)||typeof p==="boolean"||h.isFunction(p)){return this.__toggle.apply(this,arguments)}else{var o=d.apply(this,arguments);o[1].mode="toggle";return this.effect.apply(this,o)}},cssUnit:function(o){var p=this.css(o),q=[];h.each(["em","px","%","pt"],function(r,s){if(p.indexOf(s)>0){q=[parseFloat(p),s]}});return q}});h.easing.jswing=h.easing.swing;h.extend(h.easing,{def:"easeOutQuad",swing:function(p,q,o,s,r){return h.easing[h.easing.def](p,q,o,s,r)},easeInQuad:function(p,q,o,s,r){return s*(q/=r)*q+o},easeOutQuad:function(p,q,o,s,r){return -s*(q/=r)*(q-2)+o},easeInOutQuad:function(p,q,o,s,r){if((q/=r/2)<1){return s/2*q*q+o}return -s/2*((--q)*(q-2)-1)+o},easeInCubic:function(p,q,o,s,r){return s*(q/=r)*q*q+o},easeOutCubic:function(p,q,o,s,r){return s*((q=q/r-1)*q*q+1)+o},easeInOutCubic:function(p,q,o,s,r){if((q/=r/2)<1){return s/2*q*q*q+o}return s/2*((q-=2)*q*q+2)+o},easeInQuart:function(p,q,o,s,r){return s*(q/=r)*q*q*q+o},easeOutQuart:function(p,q,o,s,r){return -s*((q=q/r-1)*q*q*q-1)+o},easeInOutQuart:function(p,q,o,s,r){if((q/=r/2)<1){return s/2*q*q*q*q+o}return -s/2*((q-=2)*q*q*q-2)+o},easeInQuint:function(p,q,o,s,r){return s*(q/=r)*q*q*q*q+o},easeOutQuint:function(p,q,o,s,r){return s*((q=q/r-1)*q*q*q*q+1)+o},easeInOutQuint:function(p,q,o,s,r){if((q/=r/2)<1){return s/2*q*q*q*q*q+o}return s/2*((q-=2)*q*q*q*q+2)+o},easeInSine:function(p,q,o,s,r){return -s*Math.cos(q/r*(Math.PI/2))+s+o},easeOutSine:function(p,q,o,s,r){return s*Math.sin(q/r*(Math.PI/2))+o},easeInOutSine:function(p,q,o,s,r){return -s/2*(Math.cos(Math.PI*q/r)-1)+o},easeInExpo:function(p,q,o,s,r){return(q==0)?o:s*Math.pow(2,10*(q/r-1))+o},easeOutExpo:function(p,q,o,s,r){return(q==r)?o+s:s*(-Math.pow(2,-10*q/r)+1)+o},easeInOutExpo:function(p,q,o,s,r){if(q==0){return o}if(q==r){return o+s}if((q/=r/2)<1){return s/2*Math.pow(2,10*(q-1))+o}return s/2*(-Math.pow(2,-10*--q)+2)+o},easeInCirc:function(p,q,o,s,r){return -s*(Math.sqrt(1-(q/=r)*q)-1)+o},easeOutCirc:function(p,q,o,s,r){return s*Math.sqrt(1-(q=q/r-1)*q)+o},easeInOutCirc:function(p,q,o,s,r){if((q/=r/2)<1){return -s/2*(Math.sqrt(1-q*q)-1)+o}return s/2*(Math.sqrt(1-(q-=2)*q)+1)+o},easeInElastic:function(q,u,o,z,y){var v=1.70158;var w=0;var r=z;if(u==0){return o}if((u/=y)==1){return o+z}if(!w){w=y*0.3}if(r<Math.abs(z)){r=z;var v=w/4}else{var v=w/(2*Math.PI)*Math.asin(z/r)}return -(r*Math.pow(2,10*(u-=1))*Math.sin((u*y-v)*(2*Math.PI)/w))+o},easeOutElastic:function(q,u,o,z,y){var v=1.70158;var w=0;var r=z;if(u==0){return o}if((u/=y)==1){return o+z}if(!w){w=y*0.3}if(r<Math.abs(z)){r=z;var v=w/4}else{var v=w/(2*Math.PI)*Math.asin(z/r)}return r*Math.pow(2,-10*u)*Math.sin((u*y-v)*(2*Math.PI)/w)+z+o},easeInOutElastic:function(q,u,o,z,y){var v=1.70158;var w=0;var r=z;if(u==0){return o}if((u/=y/2)==2){return o+z}if(!w){w=y*(0.3*1.5)}if(r<Math.abs(z)){r=z;var v=w/4}else{var v=w/(2*Math.PI)*Math.asin(z/r)}if(u<1){return -0.5*(r*Math.pow(2,10*(u-=1))*Math.sin((u*y-v)*(2*Math.PI)/w))+o}return r*Math.pow(2,-10*(u-=1))*Math.sin((u*y-v)*(2*Math.PI)/w)*0.5+z+o},easeInBack:function(p,q,o,v,u,r){if(r==e){r=1.70158}return v*(q/=u)*q*((r+1)*q-r)+o},easeOutBack:function(p,q,o,v,u,r){if(r==e){r=1.70158}return v*((q=q/u-1)*q*((r+1)*q+r)+1)+o},easeInOutBack:function(p,q,o,v,u,r){if(r==e){r=1.70158}if((q/=u/2)<1){return v/2*(q*q*(((r*=(1.525))+1)*q-r))+o}return v/2*((q-=2)*q*(((r*=(1.525))+1)*q+r)+2)+o},easeInBounce:function(p,q,o,s,r){return s-h.easing.easeOutBounce(p,r-q,0,s,r)+o},easeOutBounce:function(p,q,o,s,r){if((q/=r)<(1/2.75)){return s*(7.5625*q*q)+o}else{if(q<(2/2.75)){return s*(7.5625*(q-=(1.5/2.75))*q+0.75)+o}else{if(q<(2.5/2.75)){return s*(7.5625*(q-=(2.25/2.75))*q+0.9375)+o}else{return s*(7.5625*(q-=(2.625/2.75))*q+0.984375)+o}}}},easeInOutBounce:function(p,q,o,s,r){if(q<r/2){return h.easing.easeInBounce(p,q*2,0,s,r)*0.5+o}return h.easing.easeOutBounce(p,q*2-r,0,s,r)*0.5+s*0.5+o}})})(jQuery);(function(a,b){a.effects.blind=function(c){return this.queue(function(){var e=a(this),d=["position","top","bottom","left","right"];var j=a.effects.setMode(e,c.options.mode||"hide");var h=c.options.direction||"vertical";a.effects.save(e,d);e.show();var m=a.effects.createWrapper(e).css({overflow:"hidden"});var f=(h=="vertical")?"height":"width";var l=(h=="vertical")?m.height():m.width();if(j=="show"){m.css(f,0)}var g={};g[f]=j=="show"?l:0;m.animate(g,c.duration,c.options.easing,function(){if(j=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(c.callback){c.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);(function(a,b){a.effects.bounce=function(c){return this.queue(function(){var f=a(this),n=["position","top","bottom","left","right"];var m=a.effects.setMode(f,c.options.mode||"effect");var p=c.options.direction||"up";var d=c.options.distance||20;var e=c.options.times||5;var h=c.duration||250;if(/show|hide/.test(m)){n.push("opacity")}a.effects.save(f,n);f.show();a.effects.createWrapper(f);var g=(p=="up"||p=="down")?"top":"left";var r=(p=="up"||p=="left")?"pos":"neg";var d=c.options.distance||(g=="top"?f.outerHeight({margin:true})/3:f.outerWidth({margin:true})/3);if(m=="show"){f.css("opacity",0).css(g,r=="pos"?-d:d)}if(m=="hide"){d=d/(e*2)}if(m!="hide"){e--}if(m=="show"){var j={opacity:1};j[g]=(r=="pos"?"+=":"-=")+d;f.animate(j,h/2,c.options.easing);d=d/2;e--}for(var l=0;l<e;l++){var q={},o={};q[g]=(r=="pos"?"-=":"+=")+d;o[g]=(r=="pos"?"+=":"-=")+d;f.animate(q,h/2,c.options.easing).animate(o,h/2,c.options.easing);d=(m=="hide")?d*2:d/2}if(m=="hide"){var j={opacity:0};j[g]=(r=="pos"?"-=":"+=")+d;f.animate(j,h/2,c.options.easing,function(){f.hide();a.effects.restore(f,n);a.effects.removeWrapper(f);if(c.callback){c.callback.apply(this,arguments)}})}else{var q={},o={};q[g]=(r=="pos"?"-=":"+=")+d;o[g]=(r=="pos"?"+=":"-=")+d;f.animate(q,h/2,c.options.easing).animate(o,h/2,c.options.easing,function(){a.effects.restore(f,n);a.effects.removeWrapper(f);if(c.callback){c.callback.apply(this,arguments)}})}f.queue("fx",function(){f.dequeue()});f.dequeue()})}})(jQuery);(function(a,b){a.effects.clip=function(c){return this.queue(function(){var g=a(this),m=["position","top","bottom","left","right","height","width"];var l=a.effects.setMode(g,c.options.mode||"hide");var n=c.options.direction||"vertical";a.effects.save(g,m);g.show();var d=a.effects.createWrapper(g).css({overflow:"hidden"});var f=g[0].tagName=="IMG"?d:g;var h={size:(n=="vertical")?"height":"width",position:(n=="vertical")?"top":"left"};var e=(n=="vertical")?f.height():f.width();if(l=="show"){f.css(h.size,0);f.css(h.position,e/2)}var j={};j[h.size]=l=="show"?e:0;j[h.position]=l=="show"?0:e/2;f.animate(j,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){if(l=="hide"){g.hide()}a.effects.restore(g,m);a.effects.removeWrapper(g);if(c.callback){c.callback.apply(g[0],arguments)}g.dequeue()}})})}})(jQuery);(function(a,b){a.effects.drop=function(c){return this.queue(function(){var f=a(this),e=["position","top","bottom","left","right","opacity"];var l=a.effects.setMode(f,c.options.mode||"hide");var j=c.options.direction||"left";a.effects.save(f,e);f.show();a.effects.createWrapper(f);var g=(j=="up"||j=="down")?"top":"left";var d=(j=="up"||j=="left")?"pos":"neg";var m=c.options.distance||(g=="top"?f.outerHeight({margin:true})/2:f.outerWidth({margin:true})/2);if(l=="show"){f.css("opacity",0).css(g,d=="pos"?-m:m)}var h={opacity:l=="show"?1:0};h[g]=(l=="show"?(d=="pos"?"+=":"-="):(d=="pos"?"-=":"+="))+m;f.animate(h,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){if(l=="hide"){f.hide()}a.effects.restore(f,e);a.effects.removeWrapper(f);if(c.callback){c.callback.apply(this,arguments)}f.dequeue()}})})}})(jQuery);(function(a,b){a.effects.explode=function(c){return this.queue(function(){var m=c.options.pieces?Math.round(Math.sqrt(c.options.pieces)):3;var f=c.options.pieces?Math.round(Math.sqrt(c.options.pieces)):3;c.options.mode=c.options.mode=="toggle"?(a(this).is(":visible")?"hide":"show"):c.options.mode;var l=a(this).show().css("visibility","hidden");var n=l.offset();n.top-=parseInt(l.css("marginTop"),10)||0;n.left-=parseInt(l.css("marginLeft"),10)||0;var h=l.outerWidth(true);var d=l.outerHeight(true);for(var g=0;g<m;g++){for(var e=0;e<f;e++){l.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-e*(h/f),top:-g*(d/m)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/f,height:d/m,left:n.left+e*(h/f)+(c.options.mode=="show"?(e-Math.floor(f/2))*(h/f):0),top:n.top+g*(d/m)+(c.options.mode=="show"?(g-Math.floor(m/2))*(d/m):0),opacity:c.options.mode=="show"?0:1}).animate({left:n.left+e*(h/f)+(c.options.mode=="show"?0:(e-Math.floor(f/2))*(h/f)),top:n.top+g*(d/m)+(c.options.mode=="show"?0:(g-Math.floor(m/2))*(d/m)),opacity:c.options.mode=="show"?1:0},c.duration||500)}}setTimeout(function(){c.options.mode=="show"?l.css({visibility:"visible"}):l.css({visibility:"visible"}).hide();if(c.callback){c.callback.apply(l[0])}l.dequeue();a("div.ui-effects-explode").remove()},c.duration||500)})}})(jQuery);(function(a,b){a.effects.fade=function(c){return this.queue(function(){var d=a(this),e=a.effects.setMode(d,c.options.mode||"hide");d.animate({opacity:e},{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){(c.callback&&c.callback.apply(this,arguments));d.dequeue()}})})}})(jQuery);(function(a,b){a.effects.fold=function(c){return this.queue(function(){var f=a(this),n=["position","top","bottom","left","right"];var j=a.effects.setMode(f,c.options.mode||"hide");var r=c.options.size||15;var q=!(!c.options.horizFirst);var h=c.duration?c.duration/2:a.fx.speeds._default/2;a.effects.save(f,n);f.show();var e=a.effects.createWrapper(f).css({overflow:"hidden"});var l=((j=="show")!=q);var g=l?["width","height"]:["height","width"];var d=l?[e.width(),e.height()]:[e.height(),e.width()];var m=/([0-9]+)%/.exec(r);if(m){r=parseInt(m[1],10)/100*d[j=="hide"?0:1]}if(j=="show"){e.css(q?{height:0,width:r}:{height:r,width:0})}var p={},o={};p[g[0]]=j=="show"?d[0]:r;o[g[1]]=j=="show"?d[1]:0;e.animate(p,h,c.options.easing).animate(o,h,c.options.easing,function(){if(j=="hide"){f.hide()}a.effects.restore(f,n);a.effects.removeWrapper(f);if(c.callback){c.callback.apply(f[0],arguments)}f.dequeue()})})}})(jQuery);(function(a,b){a.effects.highlight=function(c){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"],g=a.effects.setMode(e,c.options.mode||"show"),f={backgroundColor:e.css("backgroundColor")};if(g=="hide"){f.opacity=0}a.effects.save(e,d);e.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){(g=="hide"&&e.hide());a.effects.restore(e,d);(g=="show"&&!a.support.opacity&&this.style.removeAttribute("filter"));(c.callback&&c.callback.apply(this,arguments));e.dequeue()}})})}})(jQuery);(function(a,b){a.effects.pulsate=function(c){return this.queue(function(){var e=a(this),f=a.effects.setMode(e,c.options.mode||"show");times=((c.options.times||5)*2)-1;duration=c.duration?c.duration/2:a.fx.speeds._default/2,isVisible=e.is(":visible"),animateTo=0;if(!isVisible){e.css("opacity",0).show();animateTo=1}if((f=="hide"&&isVisible)||(f=="show"&&!isVisible)){times--}for(var d=0;d<times;d++){e.animate({opacity:animateTo},duration,c.options.easing);animateTo=(animateTo+1)%2}e.animate({opacity:animateTo},duration,c.options.easing,function(){if(animateTo==0){e.hide()}(c.callback&&c.callback.apply(this,arguments))});e.queue("fx",function(){e.dequeue()}).dequeue()})}})(jQuery);(function(a,b){a.effects.puff=function(c){return this.queue(function(){var g=a(this),h=a.effects.setMode(g,c.options.mode||"hide"),f=parseInt(c.options.percent,10)||150,e=f/100,d={height:g.height(),width:g.width()};a.extend(c.options,{fade:true,mode:h,percent:h=="hide"?f:100,from:h=="hide"?d:{height:d.height*e,width:d.width*e}});g.effect("scale",c.options,c.duration,c.callback);g.dequeue()})};a.effects.scale=function(c){return this.queue(function(){var h=a(this);var e=a.extend(true,{},c.options);var m=a.effects.setMode(h,c.options.mode||"effect");var j=parseInt(c.options.percent,10)||(parseInt(c.options.percent,10)==0?0:(m=="hide"?0:100));var l=c.options.direction||"both";var d=c.options.origin;if(m!="effect"){e.origin=d||["middle","center"];e.restore=true}var g={height:h.height(),width:h.width()};h.from=c.options.from||(m=="show"?{height:0,width:0}:g);var f={y:l!="horizontal"?(j/100):1,x:l!="vertical"?(j/100):1};h.to={height:g.height*f.y,width:g.width*f.x};if(c.options.fade){if(m=="show"){h.from.opacity=0;h.to.opacity=1}if(m=="hide"){h.from.opacity=1;h.to.opacity=0}}e.from=h.from;e.to=h.to;e.mode=m;h.effect("size",e,c.duration,c.callback);h.dequeue()})};a.effects.size=function(c){return this.queue(function(){var d=a(this),q=["position","top","bottom","left","right","width","height","overflow","opacity"];var p=["position","top","bottom","left","right","overflow","opacity"];var m=["width","height","overflow"];var s=["fontSize"];var n=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var g=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var h=a.effects.setMode(d,c.options.mode||"effect");var l=c.options.restore||false;var f=c.options.scale||"both";var r=c.options.origin;var e={height:d.height(),width:d.width()};d.from=c.options.from||e;d.to=c.options.to||e;if(r){var j=a.effects.getBaseline(r,e);d.from.top=(e.height-d.from.height)*j.y;d.from.left=(e.width-d.from.width)*j.x;d.to.top=(e.height-d.to.height)*j.y;d.to.left=(e.width-d.to.width)*j.x}var o={from:{y:d.from.height/e.height,x:d.from.width/e.width},to:{y:d.to.height/e.height,x:d.to.width/e.width}};if(f=="box"||f=="both"){if(o.from.y!=o.to.y){q=q.concat(n);d.from=a.effects.setTransition(d,n,o.from.y,d.from);d.to=a.effects.setTransition(d,n,o.to.y,d.to)}if(o.from.x!=o.to.x){q=q.concat(g);d.from=a.effects.setTransition(d,g,o.from.x,d.from);d.to=a.effects.setTransition(d,g,o.to.x,d.to)}}if(f=="content"||f=="both"){if(o.from.y!=o.to.y){q=q.concat(s);d.from=a.effects.setTransition(d,s,o.from.y,d.from);d.to=a.effects.setTransition(d,s,o.to.y,d.to)}}a.effects.save(d,l?q:p);d.show();a.effects.createWrapper(d);d.css("overflow","hidden").css(d.from);if(f=="content"||f=="both"){n=n.concat(["marginTop","marginBottom"]).concat(s);g=g.concat(["marginLeft","marginRight"]);m=q.concat(n).concat(g);d.find("*[width]").each(function(){child=a(this);if(l){a.effects.save(child,m)}var u={height:child.height(),width:child.width()};child.from={height:u.height*o.from.y,width:u.width*o.from.x};child.to={height:u.height*o.to.y,width:u.width*o.to.x};if(o.from.y!=o.to.y){child.from=a.effects.setTransition(child,n,o.from.y,child.from);child.to=a.effects.setTransition(child,n,o.to.y,child.to)}if(o.from.x!=o.to.x){child.from=a.effects.setTransition(child,g,o.from.x,child.from);child.to=a.effects.setTransition(child,g,o.to.x,child.to)}child.css(child.from);child.animate(child.to,c.duration,c.options.easing,function(){if(l){a.effects.restore(child,m)}})})}d.animate(d.to,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){if(d.to.opacity===0){d.css("opacity",d.from.opacity)}if(h=="hide"){d.hide()}a.effects.restore(d,l?q:p);a.effects.removeWrapper(d);if(c.callback){c.callback.apply(this,arguments)}d.dequeue()}})})}})(jQuery);(function(a,b){a.effects.shake=function(c){return this.queue(function(){var f=a(this),n=["position","top","bottom","left","right"];var m=a.effects.setMode(f,c.options.mode||"effect");var p=c.options.direction||"left";var d=c.options.distance||20;var e=c.options.times||3;var h=c.duration||c.options.duration||140;a.effects.save(f,n);f.show();a.effects.createWrapper(f);var g=(p=="up"||p=="down")?"top":"left";var r=(p=="up"||p=="left")?"pos":"neg";var j={},q={},o={};j[g]=(r=="pos"?"-=":"+=")+d;q[g]=(r=="pos"?"+=":"-=")+d*2;o[g]=(r=="pos"?"-=":"+=")+d*2;f.animate(j,h,c.options.easing);for(var l=1;l<e;l++){f.animate(q,h,c.options.easing).animate(o,h,c.options.easing)}f.animate(q,h,c.options.easing).animate(j,h/2,c.options.easing,function(){a.effects.restore(f,n);a.effects.removeWrapper(f);if(c.callback){c.callback.apply(this,arguments)}});f.queue("fx",function(){f.dequeue()});f.dequeue()})}})(jQuery);(function(a,b){a.effects.slide=function(c){return this.queue(function(){var f=a(this),e=["position","top","bottom","left","right"];var l=a.effects.setMode(f,c.options.mode||"show");var j=c.options.direction||"left";a.effects.save(f,e);f.show();a.effects.createWrapper(f).css({overflow:"hidden"});var g=(j=="up"||j=="down")?"top":"left";var d=(j=="up"||j=="left")?"pos":"neg";var m=c.options.distance||(g=="top"?f.outerHeight({margin:true}):f.outerWidth({margin:true}));if(l=="show"){f.css(g,d=="pos"?(isNaN(m)?"-"+m:-m):m)}var h={};h[g]=(l=="show"?(d=="pos"?"+=":"-="):(d=="pos"?"-=":"+="))+m;f.animate(h,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){if(l=="hide"){f.hide()}a.effects.restore(f,e);a.effects.removeWrapper(f);if(c.callback){c.callback.apply(this,arguments)}f.dequeue()}})})}})(jQuery);(function(a,b){a.effects.transfer=function(c){return this.queue(function(){var g=a(this),j=a(c.options.to),f=j.offset(),h={top:f.top,left:f.left,height:j.innerHeight(),width:j.innerWidth()},e=g.offset(),d=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(c.options.className).css({top:e.top,left:e.left,height:g.innerHeight(),width:g.innerWidth(),position:"absolute"}).animate(h,c.duration,c.options.easing,function(){d.remove();(c.callback&&c.callback.apply(g[0],arguments));g.dequeue()})})}})(jQuery);(function($){$.extend($.ui,{timepicker:{version:"0.9.3"}});function Timepicker(){this.regional=[];this.regional[""]={currentText:"Now",closeText:"Done",ampm:false,timeFormat:"hh:mm tt",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second"};this._defaults={showButtonPanel:true,timeOnly:false,showHour:true,showMinute:true,showSecond:false,showTime:true,stepHour:0.05,stepMinute:0.05,stepSecond:0.05,hour:0,minute:0,second:0,hourMin:0,minuteMin:0,secondMin:0,hourMax:23,minuteMax:59,secondMax:59,minDateTime:null,maxDateTime:null,hourGrid:0,minuteGrid:0,secondGrid:0,alwaysSetTime:true,separator:" ",altFieldTimeOnly:true,showTimepicker:true};$.extend(this._defaults,this.regional[""])}$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,hour:0,minute:0,second:0,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_newInst:function($input,o){var tp_inst=new Timepicker(),inlineSettings={};tp_inst.hour=tp_inst._defaults.hour;tp_inst.minute=tp_inst._defaults.minute;tp_inst.second=tp_inst._defaults.second;tp_inst.ampm="";tp_inst.$input=$input;for(var attrName in this._defaults){var attrValue=$input.attr("time:"+attrName);if(attrValue){try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}tp_inst._defaults=$.extend({},this._defaults,inlineSettings,o,{beforeShow:function(input,dp_inst){if($.isFunction(o.beforeShow)){o.beforeShow(input,dp_inst,tp_inst)}},onChangeMonthYear:function(year,month,dp_inst){tp_inst._updateDateTime(dp_inst);if($.isFunction(o.onChangeMonthYear)){o.onChangeMonthYear(year,month,dp_inst,tp_inst)}},onClose:function(dateText,dp_inst){if(tp_inst.timeDefined===true&&$input.val()!=""){tp_inst._updateDateTime(dp_inst)}if($.isFunction(o.onClose)){o.onClose(dateText,dp_inst,tp_inst)}},timepicker:tp_inst});if(o.altField){tp_inst.$altInput=$(o.altField).css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})}if(tp_inst._defaults.minDate!==undefined&&tp_inst._defaults.minDate instanceof Date){tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())}if(tp_inst._defaults.minDateTime!==undefined&&tp_inst._defaults.minDateTime instanceof Date){tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())}if(tp_inst._defaults.maxDate!==undefined&&tp_inst._defaults.maxDate instanceof Date){tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())}if(tp_inst._defaults.maxDateTime!==undefined&&tp_inst._defaults.maxDateTime instanceof Date){tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())}return tp_inst},_addTimePicker:function(dp_inst){var currDT=(this.$altInput&&this._defaults.altFieldTimeOnly)?this.$input.val()+" "+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(currDT);this._limitMinMaxDateTime(dp_inst,false);this._injectTimePicker()},_parseTime:function(timeString,withDate){var regstr=this._defaults.timeFormat.toString().replace(/h{1,2}/ig,"(\\d?\\d)").replace(/m{1,2}/ig,"(\\d?\\d)").replace(/s{1,2}/ig,"(\\d?\\d)").replace(/t{1,2}/ig,"(am|pm|a|p)?").replace(/\s/g,"\\s?")+"$",order=this._getFormatPositions(),treg;if(!this.inst){this.inst=$.datepicker._getInst(this.$input[0])}if(withDate||!this._defaults.timeOnly){var dp_dateFormat=$.datepicker._get(this.inst,"dateFormat");regstr=".{"+dp_dateFormat.length+",}"+this._defaults.separator+regstr}treg=timeString.match(new RegExp(regstr,"i"));if(treg){if(order.t!==-1){this.ampm=((treg[order.t]===undefined||treg[order.t].length===0)?"":(treg[order.t].charAt(0).toUpperCase()=="A")?"AM":"PM").toUpperCase()}if(order.h!==-1){if(this.ampm=="AM"&&treg[order.h]=="12"){this.hour=0}else{if(this.ampm=="PM"&&treg[order.h]!="12"){this.hour=(parseFloat(treg[order.h])+12).toFixed(0)}else{this.hour=Number(treg[order.h])}}}if(order.m!==-1){this.minute=Number(treg[order.m])}if(order.s!==-1){this.second=Number(treg[order.s])}return true}return false},_getFormatPositions:function(){var finds=this._defaults.timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|t{1,2})/g),orders={h:-1,m:-1,s:-1,t:-1};if(finds){for(var i=0;i<finds.length;i++){if(orders[finds[i].toString().charAt(0)]==-1){orders[finds[i].toString().charAt(0)]=i+1}}}return orders},_injectTimePicker:function(){var $dp=this.inst.dpDiv,o=this._defaults,tp_inst=this,hourMax=(o.hourMax-(o.hourMax%o.stepHour)).toFixed(0),minMax=(o.minuteMax-(o.minuteMax%o.stepMinute)).toFixed(0),secMax=(o.secondMax-(o.secondMax%o.stepSecond)).toFixed(0),dp_id=this.inst.id.toString().replace(/([^A-Za-z0-9_])/g,"");if($dp.find("div#ui-timepicker-div-"+dp_id).length===0&&o.showTimepicker){var noDisplay=' style="display:none;"',html='<div class="ui-timepicker-div" id="ui-timepicker-div-'+dp_id+'"><dl><dt class="ui_tpicker_time_label" id="ui_tpicker_time_label_'+dp_id+'"'+((o.showTime)?"":noDisplay)+">"+o.timeText+'</dt><dd class="ui_tpicker_time" id="ui_tpicker_time_'+dp_id+'"'+((o.showTime)?"":noDisplay)+'></dd><dt class="ui_tpicker_hour_label" id="ui_tpicker_hour_label_'+dp_id+'"'+((o.showHour)?"":noDisplay)+">"+o.hourText+"</dt>",hourGridSize=0,minuteGridSize=0,secondGridSize=0,size;if(o.showHour&&o.hourGrid>0){html+='<dd class="ui_tpicker_hour"><div id="ui_tpicker_hour_'+dp_id+'"'+((o.showHour)?"":noDisplay)+'></div><div style="padding-left: 1px"><table><tr>';for(var h=o.hourMin;h<hourMax;h+=o.hourGrid){hourGridSize++;var tmph=(o.ampm&&h>12)?h-12:h;if(tmph<10){tmph="0"+tmph}if(o.ampm){if(h==0){tmph=12+"a"}else{if(h<12){tmph+="a"}else{tmph+="p"}}}html+="<td>"+tmph+"</td>"}html+="</tr></table></div></dd>"}else{html+='<dd class="ui_tpicker_hour" id="ui_tpicker_hour_'+dp_id+'"'+((o.showHour)?"":noDisplay)+"></dd>"}html+='<dt class="ui_tpicker_minute_label" id="ui_tpicker_minute_label_'+dp_id+'"'+((o.showMinute)?"":noDisplay)+">"+o.minuteText+"</dt>";if(o.showMinute&&o.minuteGrid>0){html+='<dd class="ui_tpicker_minute ui_tpicker_minute_'+o.minuteGrid+'"><div id="ui_tpicker_minute_'+dp_id+'"'+((o.showMinute)?"":noDisplay)+'></div><div style="padding-left: 1px"><table><tr>';for(var m=o.minuteMin;m<minMax;m+=o.minuteGrid){minuteGridSize++;html+="<td>"+((m<10)?"0":"")+m+"</td>"}html+="</tr></table></div></dd>"}else{html+='<dd class="ui_tpicker_minute" id="ui_tpicker_minute_'+dp_id+'"'+((o.showMinute)?"":noDisplay)+"></dd>"}html+='<dt class="ui_tpicker_second_label" id="ui_tpicker_second_label_'+dp_id+'"'+((o.showSecond)?"":noDisplay)+">"+o.secondText+"</dt>";if(o.showSecond&&o.secondGrid>0){html+='<dd class="ui_tpicker_second ui_tpicker_second_'+o.secondGrid+'"><div id="ui_tpicker_second_'+dp_id+'"'+((o.showSecond)?"":noDisplay)+'></div><div style="padding-left: 1px"><table><tr>';for(var s=o.secondMin;s<secMax;s+=o.secondGrid){secondGridSize++;html+="<td>"+((s<10)?"0":"")+s+"</td>"}html+="</tr></table></div></dd>"}else{html+='<dd class="ui_tpicker_second" id="ui_tpicker_second_'+dp_id+'"'+((o.showSecond)?"":noDisplay)+"></dd>"}html+="</dl></div>";$tp=$(html);if(o.timeOnly===true){$tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+o.timeOnlyTitle+"</div></div>");$dp.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()}this.hour_slider=$tp.find("#ui_tpicker_hour_"+dp_id).slider({orientation:"horizontal",value:this.hour,min:o.hourMin,max:hourMax,step:o.stepHour,slide:function(event,ui){tp_inst.hour_slider.slider("option","value",ui.value);tp_inst._onTimeChange()}});this.minute_slider=$tp.find("#ui_tpicker_minute_"+dp_id).slider({orientation:"horizontal",value:this.minute,min:o.minuteMin,max:minMax,step:o.stepMinute,slide:function(event,ui){tp_inst.minute_slider.slider("option","value",ui.value);tp_inst._onTimeChange()}});this.second_slider=$tp.find("#ui_tpicker_second_"+dp_id).slider({orientation:"horizontal",value:this.second,min:o.secondMin,max:secMax,step:o.stepSecond,slide:function(event,ui){tp_inst.second_slider.slider("option","value",ui.value);tp_inst._onTimeChange()}});if(o.showHour&&o.hourGrid>0){size=100*hourGridSize*o.hourGrid/(hourMax-o.hourMin);$tp.find(".ui_tpicker_hour table").css({width:size+"%",marginLeft:(size/(-2*hourGridSize))+"%",borderCollapse:"collapse"}).find("td").each(function(index){$(this).click(function(){var h=$(this).html();if(o.ampm){var ap=h.substring(2).toLowerCase(),aph=parseInt(h.substring(0,2));if(ap=="a"){if(aph==12){h=0}else{h=aph}}else{if(aph==12){h=12}else{h=aph+12}}}tp_inst.hour_slider.slider("option","value",h);tp_inst._onTimeChange()}).css({cursor:"pointer",width:(100/hourGridSize)+"%",textAlign:"center",overflow:"hidden"})})}if(o.showMinute&&o.minuteGrid>0){size=100*minuteGridSize*o.minuteGrid/(minMax-o.minuteMin);$tp.find(".ui_tpicker_minute table").css({width:size+"%",marginLeft:(size/(-2*minuteGridSize))+"%",borderCollapse:"collapse"}).find("td").each(function(index){$(this).click(function(){tp_inst.minute_slider.slider("option","value",$(this).html());tp_inst._onTimeChange()}).css({cursor:"pointer",width:(100/minuteGridSize)+"%",textAlign:"center",overflow:"hidden"})})}if(o.showSecond&&o.secondGrid>0){$tp.find(".ui_tpicker_second table").css({width:size+"%",marginLeft:(size/(-2*secondGridSize))+"%",borderCollapse:"collapse"}).find("td").each(function(index){$(this).click(function(){tp_inst.second_slider.slider("option","value",$(this).html());tp_inst._onTimeChange()}).css({cursor:"pointer",width:(100/secondGridSize)+"%",textAlign:"center",overflow:"hidden"})})}var $buttonPanel=$dp.find(".ui-datepicker-buttonpane");if($buttonPanel.length){$buttonPanel.before($tp)}else{$dp.append($tp)}this.$timeObj=$("#ui_tpicker_time_"+dp_id);if(this.inst!==null){var timeDefined=this.timeDefined;this._onTimeChange();this.timeDefined=timeDefined}var onSelect=tp_inst._defaults.onSelect;if(onSelect){var inputEl=tp_inst.$input?tp_inst.$input[0]:null;var onSelectHandler=function(){onSelect.apply(inputEl,[tp_inst.formattedDateTime,tp_inst])};this.hour_slider.bind("slidestop",onSelectHandler);this.minute_slider.bind("slidestop",onSelectHandler);this.second_slider.bind("slidestop",onSelectHandler)}}},_limitMinMaxDateTime:function(dp_inst,adjustSliders){var o=this._defaults,dp_date=new Date(dp_inst.selectedYear,dp_inst.selectedMonth,dp_inst.selectedDay),tp_date=new Date(dp_inst.selectedYear,dp_inst.selectedMonth,dp_inst.selectedDay,this.hour,this.minute,this.second,0);if(this._defaults.minDateTime!==null&&dp_date){var minDateTime=this._defaults.minDateTime,minDateTimeDate=new Date(minDateTime.getFullYear(),minDateTime.getMonth(),minDateTime.getDate(),0,0,0,0);if(this.hourMinOriginal===null||this.minuteMinOriginal===null||this.secondMinOriginal===null){this.hourMinOriginal=o.hourMin;this.minuteMinOriginal=o.minuteMin;this.secondMinOriginal=o.secondMin}if(minDateTimeDate.getTime()==dp_date.getTime()){this._defaults.hourMin=minDateTime.getHours();this._defaults.minuteMin=minDateTime.getMinutes();this._defaults.secondMin=minDateTime.getSeconds();if(this.hour<this._defaults.hourMin){this.hour=this._defaults.hourMin}if(this.minute<this._defaults.minuteMin){this.minute=this._defaults.minuteMin}if(this.second<this._defaults.secondMin){this.second=this._defaults.secondMin}}else{this._defaults.hourMin=this.hourMinOriginal;this._defaults.minuteMin=this.minuteMinOriginal;this._defaults.secondMin=this.secondMinOriginal}}if(this._defaults.maxDateTime!==null&&dp_date){var maxDateTime=this._defaults.maxDateTime,maxDateTimeDate=new Date(maxDateTime.getFullYear(),maxDateTime.getMonth(),maxDateTime.getDate(),0,0,0,0);if(this.hourMaxOriginal===null||this.minuteMaxOriginal===null||this.secondMaxOriginal===null){this.hourMaxOriginal=o.hourMax;this.minuteMaxOriginal=o.minuteMax;this.secondMaxOriginal=o.secondMax}if(maxDateTimeDate.getTime()==dp_date.getTime()){this._defaults.hourMax=maxDateTime.getHours();this._defaults.minuteMax=maxDateTime.getMinutes();this._defaults.secondMax=maxDateTime.getSeconds();if(this.hour>this._defaults.hourMax){this.hour=this._defaults.hourMax}if(this.minute>this._defaults.minuteMax){this.minute=this._defaults.minuteMax}if(this.second>this._defaults.secondMax){this.second=this._defaults.secondMax}}else{this._defaults.hourMax=this.hourMaxOriginal;this._defaults.minuteMax=this.minuteMaxOriginal;this._defaults.secondMax=this.secondMaxOriginal}}if(adjustSliders!==undefined&&adjustSliders===true){this.hour_slider.slider("option",{min:this._defaults.hourMin,max:this._defaults.hourMax}).slider("value",this.hour);this.minute_slider.slider("option",{min:this._defaults.minuteMin,max:this._defaults.minuteMax}).slider("value",this.minute);this.second_slider.slider("option",{min:this._defaults.secondMin,max:this._defaults.secondMax}).slider("value",this.second)}},_onTimeChange:function(){var hour=(this.hour_slider)?this.hour_slider.slider("value"):false,minute=(this.minute_slider)?this.minute_slider.slider("value"):false,second=(this.second_slider)?this.second_slider.slider("value"):false;if(hour!==false){hour=parseInt(hour,10)}if(minute!==false){minute=parseInt(minute,10)}if(second!==false){second=parseInt(second,10)}var ampm=(hour<12)?"AM":"PM";var hasChanged=(hour!=this.hour||minute!=this.minute||second!=this.second||(this.ampm.length>0&&this.ampm!=ampm));if(hasChanged){if(hour!==false){this.hour=hour}if(minute!==false){this.minute=minute}if(second!==false){this.second=second}}if(this._defaults.ampm){this.ampm=ampm}this._formatTime();if(this.$timeObj){this.$timeObj.text(this.formattedTime)}this.timeDefined=true;if(hasChanged){this._updateDateTime()}},_formatTime:function(time,format,ampm){if(ampm==undefined){ampm=this._defaults.ampm}time=time||{hour:this.hour,minute:this.minute,second:this.second,ampm:this.ampm};var tmptime=format||this._defaults.timeFormat.toString();if(ampm){var hour12=((time.ampm=="AM")?(time.hour):(time.hour%12));hour12=(Number(hour12)===0)?12:hour12;tmptime=tmptime.toString().replace(/hh/g,((hour12<10)?"0":"")+hour12).replace(/h/g,hour12).replace(/mm/g,((time.minute<10)?"0":"")+time.minute).replace(/m/g,time.minute).replace(/ss/g,((time.second<10)?"0":"")+time.second).replace(/s/g,time.second).replace(/TT/g,time.ampm.toUpperCase()).replace(/tt/g,time.ampm.toLowerCase()).replace(/T/g,time.ampm.charAt(0).toUpperCase()).replace(/t/g,time.ampm.charAt(0).toLowerCase())}else{tmptime=tmptime.toString().replace(/hh/g,((time.hour<10)?"0":"")+time.hour).replace(/h/g,time.hour).replace(/mm/g,((time.minute<10)?"0":"")+time.minute).replace(/m/g,time.minute).replace(/ss/g,((time.second<10)?"0":"")+time.second).replace(/s/g,time.second);tmptime=$.trim(tmptime.replace(/t/gi,""))}if(arguments.length){return tmptime}else{this.formattedTime=tmptime}},_updateDateTime:function(dp_inst){dp_inst=this.inst||dp_inst,dt=new Date(dp_inst.selectedYear,dp_inst.selectedMonth,dp_inst.selectedDay),dateFmt=$.datepicker._get(dp_inst,"dateFormat"),formatCfg=$.datepicker._getFormatConfig(dp_inst),timeAvailable=dt!==null&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(dateFmt,(dt===null?new Date():dt),formatCfg);var formattedDateTime=this.formattedDate;if(dp_inst.lastVal!==undefined&&(dp_inst.lastVal.length>0&&this.$input.val().length===0)){return}if(this._defaults.timeOnly===true){formattedDateTime=this.formattedTime}else{if(this._defaults.timeOnly!==true&&(this._defaults.alwaysSetTime||timeAvailable)){formattedDateTime+=this._defaults.separator+this.formattedTime}}this.formattedDateTime=formattedDateTime;if(!this._defaults.showTimepicker){this.$input.val(this.formattedDate)}else{if(this.$altInput&&this._defaults.altFieldTimeOnly===true){this.$altInput.val(this.formattedTime);this.$input.val(this.formattedDate)}else{if(this.$altInput){this.$altInput.val(formattedDateTime);this.$input.val(formattedDateTime)}else{this.$input.val(formattedDateTime)}}}this.$input.trigger("change")}});$.fn.extend({timepicker:function(o){o=o||{};var tmp_args=arguments;if(typeof o=="object"){tmp_args[0]=$.extend(o,{timeOnly:true})}return $(this).each(function(){$.fn.datetimepicker.apply($(this),tmp_args)})},datetimepicker:function(o){o=o||{};var $input=this,tmp_args=arguments;if(typeof(o)=="string"){if(o=="getDate"){return $.fn.datepicker.apply($(this[0]),tmp_args)}else{return this.each(function(){var $t=$(this);$t.datepicker.apply($t,tmp_args)})}}else{return this.each(function(){var $t=$(this);$t.datepicker($.timepicker._newInst($t,o)._defaults)})}}});$.datepicker._base_selectDate=$.datepicker._selectDate;$.datepicker._selectDate=function(id,dateStr){var inst=this._getInst($(id)[0]),tp_inst=this._get(inst,"timepicker");if(tp_inst){tp_inst._limitMinMaxDateTime(inst,true);inst.inline=inst.stay_open=true;this._base_selectDate(id,dateStr+tp_inst._defaults.separator+tp_inst.formattedTime);inst.inline=inst.stay_open=false;this._notifyChange(inst);this._updateDatepicker(inst)}else{this._base_selectDate(id,dateStr)}};$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker;$.datepicker._updateDatepicker=function(inst){if(typeof(inst.stay_open)!=="boolean"||inst.stay_open===false){this._base_updateDatepicker(inst);var tp_inst=this._get(inst,"timepicker");if(tp_inst){tp_inst._addTimePicker(inst)}}};$.datepicker._base_doKeyPress=$.datepicker._doKeyPress;$.datepicker._doKeyPress=function(event){var inst=$.datepicker._getInst(event.target),tp_inst=$.datepicker._get(inst,"timepicker");if(tp_inst){if($.datepicker._get(inst,"constrainInput")){var ampm=tp_inst._defaults.ampm,datetimeChars=tp_inst._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,ampm?"APM":"").replace(/T/g,ampm?"AP":"").replace(/tt/g,ampm?"apm":"").replace(/t/g,ampm?"ap":"")+" "+tp_inst._defaults.separator+$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat")),chr=String.fromCharCode(event.charCode===undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!datetimeChars||datetimeChars.indexOf(chr)>-1)}}return $.datepicker._base_doKeyPress(event)};$.datepicker._base_doKeyUp=$.datepicker._doKeyUp;$.datepicker._doKeyUp=function(event){var inst=$.datepicker._getInst(event.target),tp_inst=$.datepicker._get(inst,"timepicker");if(tp_inst){if(tp_inst._defaults.timeOnly&&(inst.input.val()!=inst.lastVal)){try{$.datepicker._updateDatepicker(inst)}catch(err){$.datepicker.log(err)}}}return $.datepicker._base_doKeyUp(event)};$.datepicker._base_gotoToday=$.datepicker._gotoToday;$.datepicker._gotoToday=function(id){this._base_gotoToday(id);this._setTime(this._getInst($(id)[0]),new Date())};$.datepicker._disableTimepickerDatepicker=function(target,date,withDate){var inst=this._getInst(target),tp_inst=this._get(inst,"timepicker");if(tp_inst){tp_inst._defaults.showTimepicker=false;tp_inst._onTimeChange();tp_inst._updateDateTime(inst)}};$.datepicker._enableTimepickerDatepicker=function(target,date,withDate){var inst=this._getInst(target),tp_inst=this._get(inst,"timepicker");if(tp_inst){tp_inst._defaults.showTimepicker=true;tp_inst._onTimeChange();tp_inst._updateDateTime(inst)}};$.datepicker._setTime=function(inst,date){var tp_inst=this._get(inst,"timepicker");if(tp_inst){var defaults=tp_inst._defaults,hour=date?date.getHours():defaults.hour,minute=date?date.getMinutes():defaults.minute,second=date?date.getSeconds():defaults.second;if((hour<defaults.hourMin||hour>defaults.hourMax)||(minute<defaults.minuteMin||minute>defaults.minuteMax)||(second<defaults.secondMin||second>defaults.secondMax)){hour=defaults.hourMin;minute=defaults.minuteMin;second=defaults.secondMin}if(tp_inst.hour_slider){tp_inst.hour_slider.slider("value",hour)}else{tp_inst.hour=hour}if(tp_inst.minute_slider){tp_inst.minute_slider.slider("value",minute)}else{tp_inst.minute=minute}if(tp_inst.second_slider){tp_inst.second_slider.slider("value",second)}else{tp_inst.second=second}tp_inst._onTimeChange();tp_inst._updateDateTime(inst)}};$.datepicker._setTimeDatepicker=function(target,date,withDate){var inst=this._getInst(target),tp_inst=this._get(inst,"timepicker");if(tp_inst){this._setDateFromField(inst);var tp_date;if(date){if(typeof date=="string"){tp_inst._parseTime(date,withDate);tp_date=new Date();tp_date.setHours(tp_inst.hour,tp_inst.minute,tp_inst.second)}else{tp_date=new Date(date.getTime())}if(tp_date.toString()=="Invalid Date"){tp_date=undefined}}this._setTime(inst,tp_date)}};$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker;$.datepicker._setDateDatepicker=function(target,date){var inst=this._getInst(target),tp_date=(date instanceof Date)?new Date(date.getTime()):date;this._updateDatepicker(inst);this._base_setDateDatepicker.apply(this,arguments);this._setTimeDatepicker(target,tp_date,true)};$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker;$.datepicker._getDateDatepicker=function(target,noDefault){var inst=this._getInst(target),tp_inst=this._get(inst,"timepicker");if(tp_inst){this._setDateFromField(inst,noDefault);var date=this._getDate(inst);if(date&&tp_inst._parseTime($(target).val(),true)){date.setHours(tp_inst.hour,tp_inst.minute,tp_inst.second)}return date}return this._base_getDateDatepicker(target,noDefault)};function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]===null||props[name]===undefined){target[name]=props[name]}}return target}$.timepicker=new Timepicker();$.timepicker.version="0.9.3"})(jQuery);(function(a){
  /*!
   * mcDropdown jQuery Plug-in
   *
   * Copyright 2008 Giva, Inc. (http://www.givainc.com/labs/)
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * 	http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   *
   * Date: 2009-10-29
   * Rev:  1.2.10
   */
  a.fn.mcDropdown=function(f,e){var d;this.each(function(){d=a.data(this,"mcDropdown");if(d){return false}new a.mcDropDownMenu(this,f,e)});return d||this};a.mcDropdown={version:"1.2.10",setDefaults:function(d){a.extend(b,d)}};var b={minRows:8,maxRows:25,targetColumnSize:2,openFx:"slideDown",openSpeed:250,closeFx:"slideUp",closeSpeed:250,hoverOverDelay:200,hoverOutDelay:0,showFx:"show",showSpeed:0,hideFx:"hide",hideSpeed:0,dropShadow:true,autoHeight:true,lineHeight:19,screenPadding:10,allowParentSelect:false,delim:":",showACOnEmptyFocus:false,valueAttr:"rel",click:null,select:null,init:null,width:100};var c=(a.browser.version&&a.browser.version<=6);a.mcDropDownMenu=function(Y,A,D){var r,af=this,J,g,Z,s="",h,K,F,l,z,W=false;r=a(Y);z=r.is(":input");Z=a.extend({},b,D);if(Z.click==null){Z.click=function(ai,aj,ah){aj.setValue(this.attr(ah.valueAttr))}}a(document).bind("click",function(ak){var ah=a(ak.target);var aj=ah.parents().filter(function(){return this===J[0]||(!!F&&F[0]===this)});if(aj.length){var ai=ah.is(".mc_parent");if(ai&&F&&aj[0]===F[0]){clearTimeout(v);E(ah.find("> ul > li:first"),false);ak.stopPropagation();return false}else{if(!Z.allowParentSelect&&ai){return false}}if(ah.not(".mc_root")){ab.apply(ah.parent().parent()[0],[ak])}if(Z.click!=null&&Z.click.apply(ah,[ak,af,Z])==false){return false}}af.closeMenu()});J=(((typeof A=="object")&&!!A.jquery))?A:a(A);J.appendTo("body").css({position:"absolute",top:-10000,left:-10000}).find("ul").andSelf().css("display","block").each(function(){var ah=a(this);ah.data("width",ah[0].clientWidth)}).css({top:0,left:0,display:"none"});J.find("> li").addClass("mc_root");a("li > ul",J).parent().addClass("mc_parent");g=a('<div class="mcdropdown"><a href="#" tabindex="-1"></a><input type="hidden" name="'+(Y.name||Y.id)+'" id="'+(Y.id||Y.name)+'" /></div>').appendTo(a('<div style="position: relative;"></div>')).parent();var O=r.replaceWith(g).attr({id:"",name:""});var y=g.find(":input");g=g.find(".mcdropdown").prepend(O);var H=g.clone().css({position:"absolute",top:-9999999,left:-999999,visibility:"visible"}).show().appendTo("body");var n={width:Z.width,height:H.outerHeight()};H.remove();a.data(y[0],"mcDropdown",af);g.parent().height(n.height);if(a.browser.safari){setTimeout(function(){r.width(g.width()-a("a",g).width())},100)}r.width(n.width).filter(":input").attr("autocomplete","off").bind("keypress",ae).bind("mousedown",function(ah){a(this).triggerHandler("focus");ah.stopPropagation();return false}).bind("contextmenu",function(){return false}).bind("focus",L).bind("blur",x);if(a.browser.msie||a.browser.safari){r.bind("keydown",function(ah){if(",8,9,37,38,39,40,".indexOf(","+ah.keyCode+",")>-1){return ae(ah)}})}a("a",g).bind("click",function(ah){if(W){return false}af.openMenu(ah);return false});this.setValue=function(aj,ai){y.val(aj);var ah=U(aj);if(Z.select!=null&&ai!=true){Z.select.apply(af,[aj,ah])}return r[z?"val":"text"](ah)};if(z){this.setValue(r.attr("defaultValue"),true)}this.getValue=function(ah){return[y.val(),r[z?"val":"text"]()]};this.openMenu=function(ai){if(J.is(":visible")){return(!!ai)?af.closeMenu():false}function ah(){G(J).hide();f(J);o(g.parent(),J,true);J.find(".mc_hover").removeClass("mc_hover");J[Z.openFx](Z.openSpeed,function(){S(J)});if(c&&!!a.fn.bgIframe){J.bgIframe()}}if(ai){ah()}else{setTimeout(ah,1)}};this.closeMenu=function(ah){J.find("ul:visible").parent().each(function(){ab.apply(this)});e(J);J[Z.closeFx](Z.closeSpeed)};this.focus=function(){r.focus()};this.disable=function(ah){W=!!ah;g[W?"addClass":"removeClass"]("mcdropdownDisabled");O.attr("disabled",W?"disabled":"")};function j(ah){return ah.contents()[0]?a.trim(ah.contents()[0].nodeValue):""}function w(ai){if(ai.length==0){return[]}var ah=[j(ai)];ai.parents().each(function(){var aj=a(this);if(this===J[0]){return false}else{if(aj.is("li")){ah.push(j(aj))}}});return ah.reverse()}function ag(ah){return w(M(ah))}function U(ah){return ag(ah).join(Z.delim)}function I(ai){var ah=[],aj=(arguments.length>1)?++arguments[1]:1;a("> li",ai).each(function(){var al=a(this);var ak=a("> ul",this);ah.push({name:j(al),element:this,children:(ak.length)?I(ak,aj):[]})});return ah}function f(ah){e(ah);a("> li",ah).bind("mouseover",V).bind("mouseout",aa)}function e(ah){a("> li",ah).unbind("mouseover",V).unbind("mouseout",aa)}function S(ah){var aj=R(ah,true);var ai=X();if(aj.bottom>ai.y){a("html,body").animate({scrollTop:"+="+((aj.bottom-ai.y)+Z.screenPadding)+"px"})}}function V(ai){var ah=this;var aj=a.data(ah,"timer");if(!isNaN(aj)){clearTimeout(aj)}a(this).addClass("mc_hover");a.data(ah,"timer",setTimeout(function(){Q.apply(ah)},Z.hoverOverDelay))}function aa(ai){var ah=this;var aj=a.data(ah,"timer");if(!isNaN(aj)){clearTimeout(aj)}a(this).removeClass("mc_hover");a.data(ah,"timer",setTimeout(function(){var ak=a(ah);setTimeout(function(){if(ak.parent().find("> li.mc_hover").length==0){ak.parents("li").each(function(){var al=this;clearTimeout(a.data(al,"timer"));ab.apply(al);if(a(this).siblings().filter(".mc_hover").length>0){return false}})}},Z.hoverOverDelay);ab.apply(ah)},Z.hoverOutDelay));if(c){ai.stopPropagation()}}function m(ai){var ah=r.data("shadows");if(!ah){ah={}}if(!ah[ai]){ah[ai]=a('<div class="mcdropdown_shadow"></div>').appendTo("body");if(!!a.fn.bgIframe){ah[ai].bgIframe()}r.data("shadows",ah)}return ah[ai]}function Q(){var ai=this;var aj=a("> ul",this);if(aj.is(":visible")||(aj.length==0)){return false}a(this).parent().find("> li ul:visible").not(aj).parent().each(function(){ab.apply(this)});G(aj);f(aj);var an=aj.parents("ul").length;var am=X();var al=R(a(this));aj.css({top:al.bottom,left:al.marginLeft}).show();var ah=aj.outerHeight()+aj.offset().top;if(ah>am.y){aj.css("top",al.bottom-(ah-am.y)-Z.screenPadding)}var ak=function(){if(Z.dropShadow){var ao=m(an);var ap=R(aj);ao.css({top:ap.top+ap.marginTop,left:ap.left+ap.marginLeft,width:ap.width,height:ap.height}).insertAfter(aj).show();a.data(ai,"shadow",ao)}};if(Z.showSpeed<=0){ak()}else{aj.hide()[Z.showFx](Z.showSpeed,ak)}}function ab(){var ah=a("> ul",this);if(ah.is(":hidden")||(ah.length==0)){return false}if(Z.dropShadow&&a.data(this,"shadow")){a.data(this,"shadow").hide()}if(c){ah.css("visibility","hidden").parent().removeClass("mc_hover")}ah.stop()[Z.hideFx](Z.hideSpeed)}function R(ah,aj){var ai=false;if(ah.is(":hidden")){ai=!!ah.css("visibility","hidden").show()}var ak=a.extend(ah[aj===true?"offset":"position"](),{width:ah.outerWidth(),height:ah.outerHeight(),marginLeft:parseInt(a.curCSS(ah[0],"marginLeft",true),10)||0,marginRight:parseInt(a.curCSS(ah[0],"marginRight",true),10)||0,marginTop:parseInt(a.curCSS(ah[0],"marginTop",true),10)||0,marginBottom:parseInt(a.curCSS(ah[0],"marginBottom",true),10)||0});if(ak.marginTop<0){ak.top+=ak.marginTop}if(ak.marginLeft<0){ak.left+=ak.marginLeft}ak.bottom=ak.top+ak.height;ak.right=ak.left+ak.width;if(ai){ah.hide().css("visibility","visible")}return ak}function o(ai,ah,aj){var ak=R(ai,aj);ah.css({position:"absolute",top:ak.bottom,left:ak.left});return ak.bottom}function X(){var ah={scrollLeft:a(window).scrollLeft(),scrollTop:a(window).scrollTop(),width:a(window).width(),height:a(window).height()};ah.x=ah.scrollLeft+ah.width;ah.y=ah.scrollTop+ah.height;return ah}function p(aj,ai){var ak=ai=="height"?"Top":"Left",ah=ai=="height"?"Bottom":"Right";return(parseInt("0"+a.curCSS(aj,"border"+ak+"Width",true),10)+parseInt("0"+a.curCSS(aj,"border"+ah+"Width",true),10)+parseInt("0"+a.curCSS(aj,"padding"+ak,true),10)+parseInt("0"+a.curCSS(aj,"padding"+ah,true),10)+parseInt("0"+a.curCSS(aj,"margin"+ak,true),10)+parseInt("0"+a.curCSS(aj,"margin"+ah,true),10))}function ac(ah,ak){if(!ah.data("dimensions")){var aj=g.outerWidth();var ai=((ah===J)&&(ah.data("width")*ak<aj))?Math.floor(aj/ak):ah.data("width");ah.data("dimensions",{column:ai,item:ai-p(ah.children().eq(0)[0],"width"),height:ah.height()})}return ah.data("dimensions")}function N(ah){if(Z.autoHeight===false){return Z.lineHeight}if(!ah.data("height")){ah.data("height",ah.outerHeight())}return ah.data("height")}function G(ar){var aq=ar.find("> li");var al=aq.length;var am=Math.ceil(al/Z.maxRows);var ao=!!arguments[1]?arguments[1]:(al<=Z.minRows)?1:(am>Z.targetColumnSize)?am:Z.targetColumnSize;var ai=ac(ar,ao);var ak=0;var an=0;var aj=0;var ap=Math.ceil(al/ao);var ah=ar.parent("li").width();ar.css({visibility:"hidden",display:"block"});aq.each(function(av){var au=av+1;var at=Math.floor((au/al)*ao);var aw=Math.floor((av/al)*ao);var ay=a(this);var ax;if(ak!=aw){ax=(an+1)*-1;an=0}else{ax=0}an+=(N(ay)||Z.lineHeight);ay.css({marginLeft:(ai.column*aw),marginTop:ax,width:ai.item})[((at>aw)||(au==al))?"addClass":"removeClass"]("mc_endcol")[(ax!=0)?"addClass":"removeClass"]("mc_firstrow");if(an>aj){aj=an}ak=aw});if((ar!==J)&&(aj+(Z.screenPadding*2)>=X().height)){return G(ar,ao+1)}ar.css("visibility","visible").height(aj);return ar}function M(ah){return J.find("li["+Z.valueAttr+"='"+ah+"']")}function C(){return M(y.val())}function L(an){var ak=C();var al=r.val().toLowerCase();var ao=al.toLowerCase().split(Z.delim);var ah=ao.pop();var aj=al.lastIndexOf(Z.delim)+1;s=ao.join(Z.delim)+(ao.length>0?Z.delim:"");setTimeout(function(){T(r[0],aj,aj+ah.length)},0);if(!F){F=a('<ul class="mcdropdown_autocomplete"></ul>').appendTo("body");if(c&&!!a.fn.bgIframe){l=a("<div></div>").bgIframe().appendTo("body")}}var am=!(Z.showACOnEmptyFocus&&(s.length==0));var ai=(ak.length==0||ak.hasClass("mc_root"))?J.find("> li"):ak.parent().find("> li");u(ai,am)}var v;function x(ah){v=setTimeout(function(){var ai=C();if(!Z.allowParentSelect&&ai.is(".mc_parent")){var aj=ai.find("li:not('.mc_parent'):first").attr(Z.valueAttr);af.setValue(aj,true)}if(Z.select!=null){Z.select.apply(af,af.getValue())}P()},200)}function u(am,ak){var ai=(am===K),al=ai?F.find("> li").removeClass("mc_hover mc_hover_parent mc_firstrow"):am.clone().removeAttr("style").removeClass("mc_hover mc_hover_parent mc_firstrow mc_endcol").filter(":last").addClass("mc_endcol").end();if(!ai||F.is(":hidden")){F.empty().append(al).width(g.outerWidth()-p(F[0],"width")).css("height","auto");o(g.parent(),F,true);al.hover(function(){F.find("> li").removeClass("mc_hover_parent mc_hover");a(this).addClass("mc_hover")},function(){a(this).removeClass("mc_hover")});al.find("> ul").css("display","none");F.show().css("visibility",(ak===true)?"hidden":"visible");if(c){var aj=parseInt(F.css("max-height"),10)||0;if((aj>0)&&(aj<F.outerHeight())){F.height(aj)}if(!!a.fn.bgIframe){o(g.parent(),l.css({height:F.outerHeight(),width:F.width()},true).show())}}if(ak!==true){S(F)}}if(ak===true){F.css({top:"-10000px",left:"-10000px"});if(c&&!!a.fn.bgIframe){l.css("display","none")}}var ah=F.find("li["+Z.valueAttr+"='"+y.val()+"']");ah.addClass("mc_hover"+(ah.is(".mc_parent")?"_parent":""));if(ah.length>0&&(ak!=true)){d(ah)}K=h=am}function P(){if(c&&!!a.fn.bgIframe&&l){l.hide()}if(F){F.hide()}}function ae(ao){var aq=String.fromCharCode(ao.keyCode||ao.charCode).toLowerCase();var ah=C();var an=(ah.length==0||ah.hasClass("mc_root"))?J.find("> li"):ah.parent().find("> li");var am=s.split(Z.delim);var aj=am.pop();var ai=aj+aq;var ak=q(r[0]).toLowerCase();var ap=r.val().toLowerCase();if(ao.keyCode==38){B(-1);return false}else{if(ao.keyCode==40){B(1);return false}else{if(ao.keyCode==27){s="";af.setValue("");u(J.find("> li"));return false}else{if(ao.keyCode==8||ao.keyCode==37){ai=(ao.keyCode==37)?"":aj.substring(0,aj.length-1);if(ak==aj){aj=""}if(am.length>0&&aj.length==0){E(ah.parent().parent());return false}else{if(ak==ap){s="";af.setValue("");return false}}}else{if(ao.keyCode==9||ao.keyCode==13||ao.keyCode==39||aq==Z.delim){var al=ah.find("> ul > li:first");if(al.length>0){E(al)}else{if(a.browser.msie){T(r[0],0,0)}if(ao.keyCode==9){r.triggerHandler("blur");P();return true}else{r.trigger("blur");P()}}return false}else{if(ak==ap){s="";ai=aq}}}}}}h=ad(an,ai);if(h.length>0){s=am.join(Z.delim)+(am.length>0?Z.delim:"")+ai;E(h.eq(0),true)}else{ai=ai.length?ai.substring(0,ai.length-1):"";h=ad(an,ai);if(h.length>0){u(h)}else{P()}}ao.preventDefault();return false}function B(aj){var ai=C(),ah,ak=0;if(ai.length==0){ai=h.filter(".mc_hover, .mc_hover_parent")}if(ai.length==0||F.is(":hidden")){ai=h.eq(0);aj=0}h.each(function(al){if(this===ai[0]){ak=al;return false}});if(!h||h.length==0||ai.length==0){return false}ak=ak+aj;if(ak<0){ak=h.length-1}else{if(ak>=h.length){ak=0}}ah=h.eq(ak);E(ah,true)}function ad(ah,aj){var ai=a([]);ah.each(function(){var al=a(this),ak=j(al);if(ak.substring(0,aj.length).toLowerCase()==aj){ai=ai.add(al)}});return ai}function E(al,aj){var ai=aj?h:(al.length==0||al.hasClass("mc_root"))?J.find("> li"):al.parent().find("> li");var ak=w(al);var ah=ak.pop().toLowerCase();if(!aj){s=ak.join(Z.delim).toLowerCase()+(ak.length>0?Z.delim:"")}af.setValue(al.attr(Z.valueAttr),true);T(r[0],s.length,ah.length+s.length);ai.filter(".mc_hover,.mc_hover_parent").removeClass("mc_hover mc_hover_parent");al.addClass("mc_hover"+(al.is(".mc_parent")?"_parent":""));u(ai)}function q(ai){var aj="";if(ai.setSelectionRange){aj=ai.value.substring(ai.selectionStart,ai.selectionEnd)}else{if(document.selection){var ah=document.selection.createRange();if(ah.parentElement()==ai){aj=ah.text}}}return aj}function T(aj,ak,ai){if(aj.createTextRange){var ah=aj.createTextRange();ah.collapse(true);ah.moveStart("character",ak);ah.moveEnd("character",ai);ah.select()}else{if(aj.setSelectionRange){aj.setSelectionRange(ak,ai)}else{if(aj.selectionStart){aj.selectionStart=ak;aj.selectionEnd=ai}}}aj.focus()}function d(ai,ah){var ak=ai[0];var al=F[0];var aj={pTop:parseInt(F.css("paddingTop"),10)||0,pBottom:parseInt(F.css("paddingBottom"),10)||0,bTop:parseInt(F.css("borderTopWidth"),10)||0,bBottom:parseInt(F.css("borderBottomWidth"),10)||0};if((ak.offsetTop+ak.offsetHeight)>(al.scrollTop+al.clientHeight)){al.scrollTop=ai.offset().top+(al.scrollTop-F.offset().top)-((al.clientHeight/((ah==true)?2:1))-(ai.outerHeight()+aj.pBottom))}else{if(ak.offsetTop-aj.bTop-aj.bBottom<=(al.scrollTop+aj.pTop+aj.pBottom)){al.scrollTop=ai.offset().top+(al.scrollTop-F.offset().top)-aj.pTop}}}if(Z.init!=null){Z.init.apply(af,[O,y,J])}}})(jQuery);
  /*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
   * Licensed under the MIT License (LICENSE.txt).
   *
   * Version 2.1.3-pre
   */
  (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(a){a.fn.autoSuggest=function(f,c){var j={asHtmlID:false,startText:"Enter Name Here",emptyText:"No Results Found",preFill:{},limitText:"No More Selections Are Allowed",selectedItemProp:"value",selectedValuesProp:"value",searchObjProps:"value",queryParam:"q",retrieveLimit:false,extraParams:"",matchCase:false,minChars:1,keyDelay:400,resultsHighlight:true,neverSubmit:false,selectionLimit:false,showResultList:true,start:function(){},selectionClick:function(l){},selectionAdded:function(l){},selectionRemoved:function(l){l.remove()},formatList:false,beforeRetrieve:function(l){return l},retrieveComplete:function(l){return l},resultClick:function(l){},resultsComplete:function(){}};var e=a.extend(j,c);var d="object";var h=0;if(typeof f=="string"){d="string";var b=f}else{var g=f;for(k in f){if(f.hasOwnProperty(k)){h++}}}if((d=="object"&&h>0)||d=="string"){return this.each(function(A){if(!e.asHtmlID){A=A+""+Math.floor(Math.random()*100);var m="as-input-"+A}else{A=e.asHtmlID;var m=A}e.start.call(this);var C=a(this);C.attr("autocomplete","off").addClass("as-input").attr("id",m).val(e.startText);var G=false;C.wrap('<ul class="as-selections" id="as-selections-'+A+'"></ul>').wrap('<li class="as-original" id="as-original-'+A+'"></li>');var H=a("#as-selections-"+A);var w=a("#as-original-"+A);var o=a('<div class="as-results" id="as-results-'+A+'"></div>').hide();var p=a('<ul class="as-list"></ul>');var K=a('<input type="hidden" class="as-values" name="as_values_'+A+'" id="as-values-'+A+'" />');var v="";if(typeof e.preFill=="string"){var D=e.preFill.split(",");for(var I=0;I<D.length;I++){var n={};n[e.selectedValuesProp]=D[I];if(D[I]!=""){J(n,"000"+I)}}v=e.preFill}else{v="";var L=0;for(k in e.preFill){if(e.preFill.hasOwnProperty(k)){L++}}if(L>0){for(var I=0;I<L;I++){var E=e.preFill[I][e.selectedValuesProp];if(E==undefined){E=""}v=v+E+",";if(E!=""){J(e.preFill[I],"000"+I)}}}}if(v!=""){C.val("");var B=v.substring(v.length-1);if(B!=","){v=v+","}K.val(","+v);a("li.as-selection-item",H).addClass("blur").removeClass("selected")}C.after(K);H.click(function(){G=true;C.focus()}).mousedown(function(){G=false}).after(o);var z=null;var F="";var q=0;var r=false;C.focus(function(){if(a(this).val()==e.startText&&K.val()==""){a(this).val("")}else{if(G){a("li.as-selection-item",H).removeClass("blur");if(a(this).val()!=""){p.css("width",H.outerWidth());o.show()}}}G=true;return true}).blur(function(){if(a(this).val()==""&&K.val()==""&&v==""){a(this).val(e.startText)}else{if(G){a("li.as-selection-item",H).addClass("blur").removeClass("selected");o.hide()}}}).keydown(function(Q){lastKeyPressCode=Q.keyCode;first_focus=false;switch(Q.keyCode){case 38:Q.preventDefault();y("up");break;case 40:Q.preventDefault();y("down");break;case 8:if(C.val()==""){var M=K.val().split(",");M=M[M.length-2];H.children().not(w.prev()).removeClass("selected");if(w.prev().hasClass("selected")){K.val(K.val().replace(","+M+",",","));e.selectionRemoved.call(this,w.prev())}else{e.selectionClick.call(this,w.prev());w.prev().addClass("selected")}}if(C.val().length==1){o.hide();F=""}if(a(":visible",o).length>0){if(z){clearTimeout(z)}z=setTimeout(function(){l()},e.keyDelay)}break;case 9:case 188:r=true;var O=C.val().replace(/(,)/g,"");if(O!=""&&K.val().search(","+O+",")<0&&O.length>=e.minChars){Q.preventDefault();var N={};N[e.selectedItemProp]=O;N[e.selectedValuesProp]=O;var x=a("li",H).length;J(N,"00"+(x+1));C.val("")}case 13:r=false;var P=a("li.active:first",o);if(P.length>0){P.click();o.hide()}if(e.neverSubmit||P.length>0){Q.preventDefault()}break;default:if(e.showResultList){if(e.selectionLimit&&a("li.as-selection-item",H).length>=e.selectionLimit){p.html('<li class="as-message">'+e.limitText+"</li>");o.show()}else{if(z){clearTimeout(z)}z=setTimeout(function(){l()},e.keyDelay)}}break}});function l(){if(lastKeyPressCode==46||(lastKeyPressCode>8&&lastKeyPressCode<32)){return o.hide()}var M=C.val().replace(/[\\]+|[\/]+/g,"");if(M==F){return}F=M;if(M.length>=e.minChars){H.addClass("loading");if(d=="string"){var x="";if(e.retrieveLimit){x="&limit="+encodeURIComponent(e.retrieveLimit)}if(e.beforeRetrieve){M=e.beforeRetrieve.call(this,M)}a.getJSON(b+"?"+e.queryParam+"="+encodeURIComponent(M)+x+e.extraParams,function(O){h=0;var N=e.retrieveComplete.call(this,O);for(k in N){if(N.hasOwnProperty(k)){h++}}s(N,M)})}else{if(e.beforeRetrieve){M=e.beforeRetrieve.call(this,M)}s(g,M)}}else{H.removeClass("loading");o.hide()}}var u=0;function s(O,U){if(!e.matchCase){U=U.toLowerCase()}var W=0;o.html(p.html("")).hide();for(var P=0;P<h;P++){var Q=P;u++;var R=false;if(e.searchObjProps=="value"){var S=O[Q].value}else{var S="";var T=e.searchObjProps.split(",");for(var V=0;V<T.length;V++){var x=a.trim(T[V]);S=S+O[Q][x]+" "}}if(S){if(!e.matchCase){S=S.toLowerCase()}if(S.search(U)!=-1&&K.val().search(","+O[Q][e.selectedValuesProp]+",")==-1){R=true}}if(R){var N=a('<li class="as-result-item" id="as-result-item-'+Q+'"></li>').click(function(){var aa=a(this).data("data");var Y=aa.num;if(a("#as-selection-"+Y,H).length<=0&&!r){var Z=aa.attributes;C.val("").focus();F="";J(Z,Y);e.resultClick.call(this,aa);o.hide()}r=false}).mousedown(function(){G=false}).mouseover(function(){a("li",p).removeClass("active");a(this).addClass("active")}).data("data",{attributes:O[Q],num:u});var X=a.extend({},O[Q]);if(!e.matchCase){var M=new RegExp("(?![^&;]+;)(?!<[^<>]*)("+U+")(?![^<>]*>)(?![^&;]+;)","gi")}else{var M=new RegExp("(?![^&;]+;)(?!<[^<>]*)("+U+")(?![^<>]*>)(?![^&;]+;)","g")}if(e.resultsHighlight){X[e.selectedItemProp]=X[e.selectedItemProp].replace(M,"<em>$1</em>")}if(!e.formatList){N=N.html(X[e.selectedItemProp])}else{N=e.formatList.call(this,X,N)}p.append(N);delete X;W++;if(e.retrieveLimit&&e.retrieveLimit==W){break}}}H.removeClass("loading");if(W<=0){p.html('<li class="as-message">'+e.emptyText+"</li>")}p.css("width",H.outerWidth());o.show();e.resultsComplete.call(this)}function J(N,x){K.val(K.val()+N[e.selectedValuesProp]+",");var M=a('<li class="as-selection-item" id="as-selection-'+x+'"></li>').click(function(){e.selectionClick.call(this,a(this));H.children().removeClass("selected");a(this).addClass("selected")}).mousedown(function(){G=false});var O=a('<a class="as-close">&times;</a>').click(function(){K.val(K.val().replace(","+N[e.selectedValuesProp]+",",","));e.selectionRemoved.call(this,M);G=true;C.focus();return false});w.before(M.html(N[e.selectedItemProp]).prepend(O));e.selectionAdded.call(this,w.prev())}function y(N){if(a(":visible",o).length>0){var x=a("li",o);if(N=="down"){var O=x.eq(0)}else{var O=x.filter(":last")}var M=a("li.active:first",o);if(M.length>0){if(N=="down"){O=M.next()}else{O=M.prev()}}x.removeClass("active");O.addClass("active")}}})}}})(jQuery);(function(a){a.fn.extend({counter:function(c){var d={type:"char",count:"down",goal:140};var c=a.extend({},d,c);var b=false;return this.each(function(){var g;var h=a(this);function e(j){if(typeof c.type!=="string"){}else{switch(c.type){case"char":if(c.count==="down"){g=" character(s) left";return(c.goal-j)}else{if(c.count==="up"){g=" characters ("+c.goal+" max)";return j}}break;case"word":if(c.count==="down"){g=" word(s) left";return(c.goal-j)}else{if(c.count==="up"){g=" words ("+c.goal+" max)";return j}}break;default:}}}var f=a("#"+this.id+"_counter span");h.bind("keyup click blur focus change paste",function(j){switch(c.type){case"char":j=a(h).val().length;break;case"word":if(h.val()===""){j=0}else{j=a.trim(h.val()).replace(/\s+/g," ").split(" ").length}break;default:}switch(c.count){case"up":if(e(j)>=c.goal&&c.type==="char"){a(this).val(a(this).val().substring(0,c.goal));b=true;break}if(e(j)===c.goal&&c.type==="word"){b=true;break}else{if(e(j)>c.goal&&c.type==="word"){a(this).val("");f.text("0");b=true;break}}break;case"down":if(e(j)<=0&&c.type==="char"){a(this).val(a(this).val().substring(0,c.goal));b=true;break}if(e(j)===0&&c.type==="word"){b=true}else{if(e(j)<0&&c.type==="word"){a(this).val("");b=true;break}}break;default:}h.keydown(function(l){if(b){this.focus();if((l.keyCode!==46&&l.keyCode!==8)){if(a(this).val().length>c.goal&&c.type==="char"){a(this).val(a(this).val().substring(0,c.goal));return false}else{if(l.keyCode!==32&&l.keyCode!==8&&c.type==="word"){return true}else{return false}}}else{b=false;return true}}});f.text(e(j))})})}})})(jQuery);if(jQuery){(function($){function renderOption(id,option){var html='<label><input type="checkbox" name="'+id+'[]" value="'+option.value+'"';if(option.selected){html+=' checked="checked"'}html+=" />"+option.text+"</label>";return html}function renderOptions(id,options,o){var html="";for(var i=0;i<options.length;i++){if(options[i].optgroup){html+='<label class="optGroup">';if(o.optGroupSelectable){html+='<input type="checkbox" class="optGroup" />'+options[i].optgroup}else{html+=options[i].optgroup}html+='</label><div class="optGroupContainer">';html+=renderOptions(id,options[i].options,o);html+="</div>"}else{html+=renderOption(id,options[i])}}return html}function buildOptions(options){var multiSelect=$(this);var multiSelectOptions=multiSelect.next(".multiSelectOptions");var o=multiSelect.data("config");var callback=multiSelect.data("callback");multiSelectOptions.html("");var html="";if(o.selectAll){html+='<label class="selectAll"><input type="checkbox" class="selectAll" />'+o.selectAllText+"</label>"}html+=renderOptions(multiSelect.attr("id"),options,o);multiSelectOptions.html(html);var initialWidth=multiSelectOptions.width();var hasScrollbar=false;if(multiSelectOptions.height()>o.listHeight){multiSelectOptions.css("height",o.listHeight+"px");hasScrollbar=true}else{multiSelectOptions.css("height","")}var scrollbarWidth=hasScrollbar&&(initialWidth==multiSelectOptions.width())?17:0;if((multiSelectOptions.width()+scrollbarWidth)<multiSelect.outerWidth()){multiSelectOptions.css("width",multiSelect.outerWidth()-2+"px")}else{multiSelectOptions.css("width",(multiSelectOptions.width()+scrollbarWidth)+"px")}if($.fn.bgiframe){multiSelect.next(".multiSelectOptions").bgiframe({width:multiSelectOptions.width(),height:multiSelectOptions.height()})}if(o.selectAll){multiSelectOptions.find("INPUT.selectAll").click(function(){multiSelectOptions.find("INPUT:checkbox").attr("checked",$(this).attr("checked")).parent("LABEL").toggleClass("checked",$(this).attr("checked"))})}if(o.optGroupSelectable){multiSelectOptions.addClass("optGroupHasCheckboxes");multiSelectOptions.find("INPUT.optGroup").click(function(){$(this).parent().next().find("INPUT:checkbox").attr("checked",$(this).attr("checked")).parent("LABEL").toggleClass("checked",$(this).attr("checked"))})}multiSelectOptions.find("INPUT:checkbox").click(function(){$(this).parent("LABEL").toggleClass("checked",$(this).attr("checked"));updateSelected.call(multiSelect);multiSelect.focus();if($(this).parent().parent().hasClass("optGroupContainer")){updateOptGroup.call(multiSelect,$(this).parent().parent().prev())}if(callback){callback($(this))}});multiSelectOptions.each(function(){$(this).find("INPUT:checked").parent().addClass("checked")});updateSelected.call(multiSelect);if(o.optGroupSelectable){multiSelectOptions.find("LABEL.optGroup").each(function(){updateOptGroup.call(multiSelect,$(this))})}multiSelectOptions.find("LABEL:has(INPUT)").hover(function(){$(this).parent().find("LABEL").removeClass("hover");$(this).addClass("hover")},function(){$(this).parent().find("LABEL").removeClass("hover")});multiSelect.keydown(function(e){var multiSelectOptions=$(this).next(".multiSelectOptions");if(multiSelectOptions.css("visibility")!="hidden"){if(e.keyCode==9){$(this).addClass("focus").trigger("click");$(this).focus().next(":input").focus();return true}if(e.keyCode==27||e.keyCode==37||e.keyCode==39){$(this).addClass("focus").trigger("click")}if(e.keyCode==40||e.keyCode==38){var allOptions=multiSelectOptions.find("LABEL");var oldHoverIndex=allOptions.index(allOptions.filter(".hover"));var newHoverIndex=-1;if(oldHoverIndex<0){multiSelectOptions.find("LABEL:first").addClass("hover")}else{if(e.keyCode==40&&oldHoverIndex<allOptions.length-1){newHoverIndex=oldHoverIndex+1}else{if(e.keyCode==38&&oldHoverIndex>0){newHoverIndex=oldHoverIndex-1}}}if(newHoverIndex>=0){$(allOptions.get(oldHoverIndex)).removeClass("hover");$(allOptions.get(newHoverIndex)).addClass("hover");adjustViewPort(multiSelectOptions)}return false}if(e.keyCode==13||e.keyCode==32){var selectedCheckbox=multiSelectOptions.find("LABEL.hover INPUT:checkbox");selectedCheckbox.attr("checked",!selectedCheckbox.attr("checked")).parent("LABEL").toggleClass("checked",selectedCheckbox.attr("checked"));if(selectedCheckbox.hasClass("selectAll")){multiSelectOptions.find("INPUT:checkbox").attr("checked",selectedCheckbox.attr("checked")).parent("LABEL").addClass("checked").toggleClass("checked",selectedCheckbox.attr("checked"))}updateSelected.call(multiSelect);if(callback){callback($(this))}return false}if(e.keyCode>=33&&e.keyCode<=126){var match=multiSelectOptions.find("LABEL:startsWith("+String.fromCharCode(e.keyCode)+")");var currentHoverIndex=match.index(match.filter("LABEL.hover"));var afterHoverMatch=match.filter(function(index){return index>currentHoverIndex});match=(afterHoverMatch.length>=1?afterHoverMatch:match).filter("LABEL:first");if(match.length==1){multiSelectOptions.find("LABEL.hover").removeClass("hover");match.addClass("hover");adjustViewPort(multiSelectOptions)}}}else{if(e.keyCode==38||e.keyCode==40||e.keyCode==13||e.keyCode==32){$(this).removeClass("focus").trigger("click");multiSelectOptions.find("LABEL:first").addClass("hover");return false}if(e.keyCode==9){multiSelectOptions.next(":input").focus();return true}}if(e.keyCode==13){return false}})}function adjustViewPort(multiSelectOptions){var selectionBottom=multiSelectOptions.find("LABEL.hover").position().top+multiSelectOptions.find("LABEL.hover").outerHeight();if(selectionBottom>multiSelectOptions.innerHeight()){multiSelectOptions.scrollTop(multiSelectOptions.scrollTop()+selectionBottom-multiSelectOptions.innerHeight())}if(multiSelectOptions.find("LABEL.hover").position().top<0){multiSelectOptions.scrollTop(multiSelectOptions.scrollTop()+multiSelectOptions.find("LABEL.hover").position().top)}}function updateOptGroup(optGroup){var multiSelect=$(this);var o=multiSelect.data("config");if(o.optGroupSelectable){var optGroupSelected=true;$(optGroup).next().find("INPUT:checkbox").each(function(){if(!$(this).attr("checked")){optGroupSelected=false;return false}});$(optGroup).find("INPUT.optGroup").attr("checked",optGroupSelected).parent("LABEL").toggleClass("checked",optGroupSelected)}}function updateSelected(){var multiSelect=$(this);var multiSelectOptions=multiSelect.next(".multiSelectOptions");var o=multiSelect.data("config");var i=0;var selectAll=true;var display="";multiSelectOptions.find("INPUT:checkbox").not(".selectAll, .optGroup").each(function(){if($(this).attr("checked")){i++;display=display+$(this).parent().text()+", "}else{selectAll=false}});display=display.replace(/\s*\,\s*$/,"");if(i==0){multiSelect.find("span").html(o.noneSelected)}else{if(o.oneOrMoreSelected=="*"){multiSelect.find("span").html(display);multiSelect.attr("title",display)}else{multiSelect.find("span").html(o.oneOrMoreSelected.replace("%",i))}}if(o.selectAll){multiSelectOptions.find("INPUT.selectAll").attr("checked",selectAll).parent("LABEL").toggleClass("checked",selectAll)}}$.extend($.fn,{multiSelect:function(o,callback){if(!o){o={}}if(o.selectAll==undefined){o.selectAll=true}if(o.selectAllText==undefined){o.selectAllText="Select All"}if(o.noneSelected==undefined){o.noneSelected="Select options"}if(o.oneOrMoreSelected==undefined){o.oneOrMoreSelected="% selected"}if(o.optGroupSelectable==undefined){o.optGroupSelectable=false}if(o.listHeight==undefined){o.listHeight=150}$(this).each(function(){var select=$(this);var html='<a href="javascript:;" class="multiSelect"><span></span></a>';html+='<div class="multiSelectOptions" style="position: absolute; z-index: 99999; visibility: hidden;"></div>';$(select).after(html);var multiSelect=$(select).next(".multiSelect");var multiSelectOptions=multiSelect.next(".multiSelectOptions");multiSelect.find("span").css("width",$(select).width()+"px");multiSelect.data("config",o);multiSelect.data("callback",callback);var options=[];$(select).children().each(function(){if(this.tagName.toUpperCase()=="OPTGROUP"){var suboptions=[];options.push({optgroup:$(this).attr("label"),options:suboptions});$(this).children("OPTION").each(function(){if($(this).val()!=""){suboptions.push({text:$(this).html(),value:$(this).val(),selected:$(this).attr("selected")})}})}else{if(this.tagName.toUpperCase()=="OPTION"){if($(this).val()!=""){options.push({text:$(this).html(),value:$(this).val(),selected:$(this).attr("selected")})}}}});$(select).remove();multiSelect.attr("id",$(select).attr("id"));buildOptions.call(multiSelect,options);multiSelect.hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")}).click(function(){if($(this).hasClass("active")){$(this).multiSelectOptionsHide()}else{$(this).multiSelectOptionsShow()}return false}).focus(function(){$(this).addClass("focus")}).blur(function(){$(this).removeClass("focus")});$(document).click(function(event){if(!($(event.target).parents().andSelf().is(".multiSelectOptions"))){multiSelect.multiSelectOptionsHide()}})})},multiSelectOptionsUpdate:function(options){buildOptions.call($(this),options)},multiSelectOptionsHide:function(){$(this).removeClass("active").removeClass("hover").next(".multiSelectOptions").css("visibility","hidden")},multiSelectOptionsShow:function(){var multiSelect=$(this);var multiSelectOptions=multiSelect.next(".multiSelectOptions");var o=multiSelect.data("config");$(".multiSelect").multiSelectOptionsHide();multiSelectOptions.find("LABEL").removeClass("hover");multiSelect.addClass("active").next(".multiSelectOptions").css("visibility","visible");multiSelect.focus();multiSelect.next(".multiSelectOptions").scrollTop(0);var offset=multiSelect.position();multiSelect.next(".multiSelectOptions").css({top:offset.top+$(this).outerHeight()+"px"});multiSelect.next(".multiSelectOptions").css({left:offset.left+"px"})},selectedValuesString:function(){var selectedValues="";$(this).next(".multiSelectOptions").find("INPUT:checkbox:checked").not(".optGroup, .selectAll").each(function(){selectedValues+=$(this).attr("value")+","});return selectedValues.replace(/\s*\,\s*$/,"")}});$.expr[":"].startsWith=function(el,i,m){var search=m[3];if(!search){return false}return eval("/^[/s]*"+search+"/i").test($(el).text())}})(jQuery)}(function(a){a.fn.document=function(){var c=this.get(0);if(c.nodeName.toLowerCase()=="iframe"){return c.contentWindow.document}return this};a.fn.documentSelection=function(){var c=this.get(0);if(c.contentWindow.document.selection){return c.contentWindow.document.selection.createRange().text}else{return c.contentWindow.getSelection().toString()}};a.fn.wysiwyg=function(d){if(arguments.length>0&&arguments[0].constructor==String){var f=arguments[0].toString();var h=[];for(var e=1;e<arguments.length;e++){h[e-1]=arguments[e]}if(f in b){return this.each(function(){a.data(this,"wysiwyg").designMode();b[f].apply(this,h)})}else{return this}}var c={};if(d&&d.controls){var c=d.controls;delete d.controls}d=a.extend({html:'<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">STYLE_SHEET</head><body style="margin: 0px;">INITIAL_CONTENT</body></html>',css:{},debug:false,autoSave:true,rmUnwantedBr:true,brIE:true,controls:{},messages:{}},d);d.messages=a.extend(true,d.messages,b.MSGS_EN);d.controls=a.extend(true,d.controls,b.TOOLBAR);for(var g in c){if(g in d.controls){a.extend(d.controls[g],c[g])}else{d.controls[g]=c[g]}}return this.each(function(){b(this,d)})};function b(d,c){return this instanceof b?this.init(d,c):new b(d,c)}a.extend(b,{insertImage:function(f,e){var d=a.data(this,"wysiwyg");if(d.constructor==b&&f&&f.length>0){if(a.browser.msie){d.focus()}if(e){d.editorDoc.execCommand("insertImage",false,"#jwysiwyg#");var c=d.getElementByAttributeValue("img","src","#jwysiwyg#");if(c){c.src=f;for(var g in e){c.setAttribute(g,e[g])}}}else{d.editorDoc.execCommand("insertImage",false,f)}}},createLink:function(e){var c=a.data(this,"wysiwyg");if(c.constructor==b&&e&&e.length>0){var d=a(c.editor).documentSelection();if(d.length>0){if(a.browser.msie){c.focus()}c.editorDoc.execCommand("unlink",false,[]);c.editorDoc.execCommand("createLink",false,e)}else{if(c.options.messages.nonSelection){alert(c.options.messages.nonSelection)}}}},insertHtml:function(c){var e=a.data(this,"wysiwyg");if(e.constructor==b&&c&&c.length>0){if(a.browser.msie){e.focus();e.editorDoc.execCommand("insertImage",false,"#jwysiwyg#");var d=e.getElementByAttributeValue("img","src","#jwysiwyg#");if(d){a(d).replaceWith(c)}}else{e.editorDoc.execCommand("insertHTML",false,c)}}},setContent:function(c){var d=a.data(this,"wysiwyg");d.setContent(c);d.saveContent()},clear:function(){var c=a.data(this,"wysiwyg");c.setContent("");c.saveContent()},MSGS_EN:{nonSelection:"select the text you wish to link"},TOOLBAR:{bold:{visible:true,tags:["b","strong"],css:{fontWeight:"bold"},tooltip:"Bold"},italic:{visible:true,tags:["i","em"],css:{fontStyle:"italic"},tooltip:"Italic"},strikeThrough:{visible:true,tags:["s","strike"],css:{textDecoration:"line-through"},tooltip:"Strike-through"},underline:{visible:true,tags:["u"],css:{textDecoration:"underline"},tooltip:"Underline"},separator00:{visible:true,separator:true},justifyLeft:{visible:true,css:{textAlign:"left"},tooltip:"Justify Left"},justifyCenter:{visible:true,tags:["center"],css:{textAlign:"center"},tooltip:"Justify Center"},justifyRight:{visible:true,css:{textAlign:"right"},tooltip:"Justify Right"},justifyFull:{visible:true,css:{textAlign:"justify"},tooltip:"Justify Full"},separator01:{visible:true,separator:true},indent:{visible:true,tooltip:"Indent"},outdent:{visible:true,tooltip:"Outdent"},separator02:{visible:false,separator:true},subscript:{visible:true,tags:["sub"],tooltip:"Subscript"},superscript:{visible:true,tags:["sup"],tooltip:"Superscript"},separator03:{visible:true,separator:true},undo:{visible:true,tooltip:"Undo"},redo:{visible:true,tooltip:"Redo"},separator04:{visible:true,separator:true},insertOrderedList:{visible:true,tags:["ol"],tooltip:"Insert Number List"},insertUnorderedList:{visible:true,tags:["ul"],tooltip:"Insert Bullet List"},insertHorizontalRule:{visible:true,tags:["hr"],tooltip:"Insert Horizontal Rule"},separator05:{separator:true},createLink:{visible:true,exec:function(){var d=a(this.editor).documentSelection();if(d.length>0){if(a.browser.msie){this.focus();this.editorDoc.execCommand("createLink",true,null)}else{var c=prompt("URL","http://");if(c&&c.length>0){this.editorDoc.execCommand("unlink",false,[]);this.editorDoc.execCommand("createLink",false,c)}}}else{if(this.options.messages.nonSelection){alert(this.options.messages.nonSelection)}}},tags:["a"],tooltip:"Create link"},insertImage:{visible:true,exec:function(){if(a.browser.msie){this.focus();this.editorDoc.execCommand("insertImage",true,null)}else{var c=prompt("URL","http://");if(c&&c.length>0){this.editorDoc.execCommand("insertImage",false,c)}}},tags:["img"],tooltip:"Insert image"},separator06:{separator:true},h1mozilla:{visible:true&&a.browser.mozilla,className:"h1",command:"heading",arguments:["h1"],tags:["h1"],tooltip:"Header 1"},h2mozilla:{visible:true&&a.browser.mozilla,className:"h2",command:"heading",arguments:["h2"],tags:["h2"],tooltip:"Header 2"},h3mozilla:{visible:true&&a.browser.mozilla,className:"h3",command:"heading",arguments:["h3"],tags:["h3"],tooltip:"Header 3"},h1:{visible:true&&!(a.browser.mozilla),className:"h1",command:"formatBlock",arguments:["<H1>"],tags:["h1"],tooltip:"Header 1"},h2:{visible:true&&!(a.browser.mozilla),className:"h2",command:"formatBlock",arguments:["<H2>"],tags:["h2"],tooltip:"Header 2"},h3:{visible:true&&!(a.browser.mozilla),className:"h3",command:"formatBlock",arguments:["<H3>"],tags:["h3"],tooltip:"Header 3"},separator07:{visible:false,separator:true},cut:{visible:false,tooltip:"Cut"},copy:{visible:false,tooltip:"Copy"},paste:{visible:false,tooltip:"Paste"},separator08:{separator:false&&!(a.browser.msie)},increaseFontSize:{visible:false&&!(a.browser.msie),tags:["big"],tooltip:"Increase font size"},decreaseFontSize:{visible:false&&!(a.browser.msie),tags:["small"],tooltip:"Decrease font size"},separator09:{separator:true},html:{visible:false,exec:function(){if(this.viewHTML){this.setContent(a(this.original).val());a(this.original).hide()}else{this.saveContent();a(this.original).show()}this.viewHTML=!(this.viewHTML)},tooltip:"View source code"},removeFormat:{visible:true,exec:function(){if(a.browser.msie){this.focus()}this.editorDoc.execCommand("removeFormat",false,[]);this.editorDoc.execCommand("unlink",false,[])},tooltip:"Remove formatting"}}});a.extend(b.prototype,{original:null,options:{},element:null,editor:null,focus:function(){a(this.editorDoc.body).focus()},init:function(f,e){var d=this;this.editor=f;this.options=e||{};a.data(f,"wysiwyg",this);var l=f.width||f.clientWidth;var j=f.height||f.clientHeight;if(f.nodeName.toLowerCase()=="textarea"){this.original=f;if(l==0&&f.cols){l=(f.cols*8)+21}if(j==0&&f.rows){j=(f.rows*16)+16}var g=this.editor=a('<iframe src="javascript:false;"></iframe>').css({minHeight:(j-6).toString()+"px",width:(l-8).toString()+"px"}).attr("id",a(f).attr("id")+"IFrame").attr("frameborder","0");this.editor.attr("tabindex",a(f).attr("tabindex"));if(a.browser.msie){this.editor.css("height",(j).toString()+"px")}}var c=this.panel=a('<ul role="menu" class="panel"></ul>');this.appendControls();this.element=a("<div></div>").css({width:(l>0)?(l).toString()+"px":"100%"}).addClass("wysiwyg").append(c).append(a("<div><!-- --></div>").css({clear:"both"})).append(g);a(f).hide().before(this.element);this.viewHTML=false;this.initialHeight=j-8;this.initialContent=a(f).val();this.initFrame();if(this.initialContent.length==0){this.setContent("")}var h=a(f).closest("form");if(this.options.autoSave){h.submit(function(){d.saveContent()})}h.bind("reset",function(){d.setContent(d.initialContent);d.saveContent()})},initFrame:function(){var c=this;var d="";if(this.options.css&&this.options.css.constructor==String){d='<link rel="stylesheet" type="text/css" media="screen" href="'+this.options.css+'" />'}this.editorDoc=a(this.editor).document();this.editorDoc_designMode=false;try{this.editorDoc.designMode="on";this.editorDoc_designMode=true}catch(f){a(this.editorDoc).focus(function(){c.designMode()})}this.editorDoc.open();this.editorDoc.write(this.options.html.replace(/INITIAL_CONTENT/,function(){return c.initialContent}).replace(/STYLE_SHEET/,function(){return d}));this.editorDoc.close();this.editorDoc.contentEditable="true";if(a.browser.msie){setTimeout(function(){a(c.editorDoc.body).css("border","none")},0)}a(this.editorDoc).click(function(e){c.checkTargets(e.target?e.target:e.srcElement)});a(this.original).focus(function(){if(!a.browser.msie){c.focus()}});if(this.options.autoSave){a(this.editorDoc).keydown(function(){c.saveContent()}).keyup(function(){c.saveContent()}).mousedown(function(){c.saveContent()})}if(this.options.css){setTimeout(function(){if(c.options.css.constructor==String){}else{a(c.editorDoc).find("body").css(c.options.css)}},0)}a(this.editorDoc).keydown(function(g){if(a.browser.msie&&c.options.brIE&&g.keyCode==13){var e=c.getRange();e.pasteHTML("<br />");e.collapse(false);e.select();return false}return true})},designMode:function(){if(!(this.editorDoc_designMode)){try{this.editorDoc.designMode="on";this.editorDoc_designMode=true}catch(c){}}},getSelection:function(){return(window.getSelection)?window.getSelection():document.selection},getRange:function(){var c=this.getSelection();if(!(c)){return null}return(c.rangeCount>0)?c.getRangeAt(0):c.createRange()},getContent:function(){return a(a(this.editor).document()).find("body").html()},setContent:function(c){a(a(this.editor).document()).find("body").html(c)},saveContent:function(){if(this.original){var c=this.getContent();if(this.options.rmUnwantedBr){c=(c.substr(-4)=="<br>")?c.substr(0,c.length-4):c}a(this.original).val(c)}},withoutCss:function(){if(a.browser.mozilla){try{this.editorDoc.execCommand("styleWithCSS",false,false)}catch(c){try{this.editorDoc.execCommand("useCSS",false,true)}catch(c){}}}},appendMenu:function(h,d,f,e,g){var c=this;d=d||[];a("<li></li>").append(a('<a role="menuitem" tabindex="-1" href="javascript:;">'+(f||h)+"</a>").addClass(f||h).attr("title",g)).click(function(){if(e){e.apply(c)}else{c.withoutCss();c.editorDoc.execCommand(h,false,d)}if(c.options.autoSave){c.saveContent()}}).appendTo(this.panel)},appendMenuSeparator:function(){a('<li role="separator" class="separator"></li>').appendTo(this.panel)},appendControls:function(){for(var c in this.options.controls){var d=this.options.controls[c];if(d.separator){if(d.visible!==false){this.appendMenuSeparator()}}else{if(d.visible){this.appendMenu(d.command||c,d.arguments||[],d.className||d.command||c||"empty",d.exec,d.tooltip||d.command||c||"")}}}},checkTargets:function(e){for(var d in this.options.controls){var g=this.options.controls[d];var f=g.className||g.command||d||"empty";a("."+f,this.panel).removeClass("active");if(g.tags){var h=e;do{if(h.nodeType!=1){break}if(a.inArray(h.tagName.toLowerCase(),g.tags)!=-1){a("."+f,this.panel).addClass("active")}}while((h=h.parentNode))}if(g.css){var h=a(e);do{if(h[0].nodeType!=1){break}for(var c in g.css){if(h.css(c).toString().toLowerCase()==g.css[c]){a("."+f,this.panel).addClass("active")}}}while((h=h.parent()))}}},getElementByAttributeValue:function(e,c,f){var h=this.editorDoc.getElementsByTagName(e);for(var d=0;d<h.length;d++){var g=h[d].getAttribute(c);if(a.browser.msie){g=g.substr(g.length-f.length)}if(g==f){return h[d]}}return false}})})(jQuery);if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(o,b,p,e,l,m,g,f,d,n){if(!document.getElementById){return}this.DETECT_KEY=n?n:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(o){this.setAttribute("swf",o)}if(b){this.setAttribute("id",b)}if(p){this.setAttribute("width",p)}if(e){this.setAttribute("height",e)}if(l){this.setAttribute("version",new deconcept.PlayerVersion(l.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(m){this.addParam("bgcolor",m)}var a=g?g:"high";this.addParam("quality",a);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var j=(f)?f:window.location;this.setAttribute("xiRedirectUrl",j);this.setAttribute("redirectUrl","");if(d){this.setAttribute("redirectUrl",d)}};deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"expressinstall.swf":a;this.setAttribute("useExpressInstall",true)},setAttribute:function(a,b){this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]},addParam:function(b,a){this.params[b]=a},getParams:function(){return this.params},addVariable:function(b,a){this.variables[b]=a},getVariable:function(a){return this.variables[a]},getVariables:function(){return this.variables},getVariablePairs:function(){var c=new Array();var b;var a=this.getVariables();for(b in a){c[c.length]=b+"="+a[b]}return c},getSWFHTML:function(){var b="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}b='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';b+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var f=this.getParams();for(var e in f){b+=[e]+'="'+f[e]+'" '}var d=this.getVariablePairs().join("&");if(d.length>0){b+='flashvars="'+d+'"'}b+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}b='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';b+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var c=this.getParams();for(var e in c){b+='<param name="'+e+'" value="'+c[e]+'" />'}var a=this.getVariablePairs().join("&");if(a.length>0){b+='<param name="flashvars" value="'+a+'" />'}b+="</object>"}return b},write:function(b){if(this.getAttribute("useExpressInstall")){var a=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(a)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var c=(typeof b=="string")?document.getElementById(b):b;c.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var f=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];if(a&&a.description){f=new deconcept.PlayerVersion(a.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var b=1;var c=3;while(b){try{c++;b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+c);f=new deconcept.PlayerVersion([c,0,0])}catch(d){b=null}}}else{try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(d){try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");f=new deconcept.PlayerVersion([6,0,21]);b.AllowScriptAccess="always"}catch(d){if(f.major==6){return f}}try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(d){}}if(b!=null){f=new deconcept.PlayerVersion(b.GetVariable("$version").split(" ")[1].split(","))}}}return f};deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major){return false}if(this.major>a.major){return true}if(this.minor<a.minor){return false}if(this.minor>a.minor){return true}if(this.rev<a.rev){return false}return true};deconcept.util={getRequestParameter:function(c){var d=document.location.search||document.location.hash;if(c==null){return d}if(d){var b=d.substring(1).split("&");for(var a=0;a<b.length;a++){if(b[a].substring(0,b[a].indexOf("="))==c){return b[a].substring((b[a].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var b=document.getElementsByTagName("OBJECT");for(var c=b.length-1;c>=0;c--){b[c].style.display="none";for(var a in b[c]){if(typeof b[c][a]=="function"){b[c][a]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(a){return document.all[a]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;var tb_pathToImage="/images/loadingAnimation.gif";
  /*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
  $(document).ready(function(){tb_init("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image();imgLoader.src=tb_pathToImage});function tb_init(a){$(a).click(function(){var c=this.title||this.name||null;var b=this.href||this.alt;var d=this.rel||false;tb_show(c,b,d);this.blur();return false})}function tb_show(l,b,h){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{$("#TB_overlay").addClass("TB_overlayBG")}if(l===null){l=""}$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$("#TB_load").show();var c;if(b.indexOf("?")!==-1){c=b.substr(0,b.indexOf("?"))}else{c=b}var f=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var m=c.toLowerCase().match(f);if(m==".jpg"||m==".jpeg"||m==".png"||m==".gif"||m==".bmp"){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(h){TB_TempArray=$("a[@rel="+h+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var g=TB_TempArray[TB_Counter].href.toLowerCase().match(f);if(!(TB_TempArray[TB_Counter].href==b)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>"}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>"}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length)}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var p=tb_getPageSize();var n=p[0]-150;var s=p[1]-150;var o=imgPreloader.width;var e=imgPreloader.height;if(o>n){e=e*(n/o);o=n;if(e>s){o=o*(s/e);e=s}}else{if(e>s){o=o*(s/e);e=s;if(o>n){e=e*(n/o);o=n}}}TB_WIDTH=o+30;TB_HEIGHT=e+60;$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+b+"' width='"+o+"' height='"+e+"' alt='"+l+"'/></a><div id='TB_caption'>"+l+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'></a></div>");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function r(){if($(document).unbind("click",r)){$(document).unbind("click",r)}$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,h);return false}$("#TB_prev").click(r)}if(!(TB_NextHTML==="")){function q(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,h);return false}$("#TB_next").click(q)}document.onkeydown=function(u){if(u==null){keycode=event.keyCode}else{keycode=u.which}if(keycode==27){tb_remove()}else{if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";q()}}else{if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";r()}}}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"})};imgPreloader.src=b}else{var a=b.replace(/^[^\?]+\??/,"");var d=tb_parseQuery(a);TB_WIDTH=(d.width*1)+30||630;TB_HEIGHT=(d.height*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(b.indexOf("TB_iframe")!=-1){urlNoQuery=b.split("TB_");$("#TB_iframeContent").remove();if(d.modal!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+l+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>")}}else{if($("#TB_window").css("display")!="block"){if(d.modal!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+l+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(l)}}$("#TB_closeWindowButton").click(tb_remove);if(b.indexOf("TB_inline")!=-1){$("#TB_ajaxContent").append($("#"+d.inlineId).children());$("#TB_window").unload(function(){$("#"+d.inlineId).append($("#TB_ajaxContent").children())});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"})}else{if(b.indexOf("TB_iframe")!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"})}}else{$("#TB_ajaxContent").load(b+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"})})}}}if(!d.modal){document.onkeyup=function(n){if(n==null){keycode=event.keyCode}else{keycode=n.which}if(keycode==27){tb_remove()}}}}catch(j){}}function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"})}function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove()});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","")}document.onkeydown="";document.onkeyup="";return false}function tb_position(){$("#TB_window").css({marginLeft:"-"+parseInt((TB_WIDTH/2),10)+"px",width:TB_WIDTH+"px"});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:"-"+parseInt((TB_HEIGHT/2),10)+"px"})}}function tb_parseQuery(d){var e={};if(!d){return e}var a=d.split(/[;&]/);for(var c=0;c<a.length;c++){var g=a[c].split("=");if(!g||g.length!=2){continue}var b=unescape(g[0]);var f=unescape(g[1]);f=f.replace(/\+/g," ");e[b]=f}return e}function tb_getPageSize(){var c=document.documentElement;var a=window.innerWidth||self.innerWidth||(c&&c.clientWidth)||document.body.clientWidth;var b=window.innerHeight||self.innerHeight||(c&&c.clientHeight)||document.body.clientHeight;arrayPageSize=[a,b];return arrayPageSize}function tb_detectMacXFF(){var a=navigator.userAgent.toLowerCase();if(a.indexOf("mac")!=-1&&a.indexOf("firefox")!=-1){return true}}this.vtip=function(){this.xOffset=-10;this.yOffset=10;$(".vtip").unbind().hover(function(a){this.t=this.title;this.title="";this.top=(a.pageY+yOffset);this.left=(a.pageX+xOffset);$("body").append('<p id="vtip" style="max-width: 250px;"><img id="vtipArrow" />'+this.t+"</p>");$("p#vtip #vtipArrow").attr("src","/images/vtip_arrow.png");$("p#vtip").css("top",this.top+"px").css("left",this.left+"px").fadeIn("slow")},function(){this.title=this.t;$("p#vtip").fadeOut("slow").remove()}).mousemove(function(a){this.top=(a.pageY+yOffset);this.left=(a.pageX+xOffset);$("p#vtip").css("top",this.top+"px").css("left",this.left+"px")})};$(document).ready(function(){vtip()});(function($){var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s={array:function(x){var a=["["],b,f,i,l=x.length,v;for(i=0;i<l;i+=1){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){if(b){a[a.length]=","}a[a.length]=v;b=true}}}a[a.length]="]";return a.join("")},"boolean":function(x){return String(x)},"null":function(x){return"null"},number:function(x){return isFinite(x)?String(x):"null"},object:function(x){if(x){if(x instanceof Array){return s.array(x)}var a=["{"],b,f,i,v;for(i in x){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){if(b){a[a.length]=","}a.push(s.string(i),":",v);b=true}}}a[a.length]="}";return a.join("")}return"null"},string:function(x){if(/["\\\x00-\x1f]/.test(x)){x=x.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})}return'"'+x+'"'}};$.toJSON=function(v){var f=isNaN(v)?s[typeof v]:s.number;if(f){return f(v)}};$.parseJSON=function(v,safe){if(safe===undefined){safe=$.parseJSON.safe}if(safe&&!/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(v)){return undefined}return eval("("+v+")")};$.parseJSON.safe=false})(jQuery);(function(b){var d={};var a=0;b.galleriffic={version:"2.0.1",normalizeHash:function(e){return e.replace(/^.*#/,"").replace(/\?.*$/,"")},getImage:function(e){if(!e){return undefined}e=b.galleriffic.normalizeHash(e);return d[e]},gotoImage:function(f){var g=b.galleriffic.getImage(f);if(!g){return false}var e=g.gallery;e.gotoImage(g);return true},removeImageByHash:function(g,f){var h=b.galleriffic.getImage(g);if(!h){return false}var e=h.gallery;if(f&&f!=e){return false}return e.removeImageByIndex(h.index)}};var c={delay:3000,numThumbs:20,preloadAhead:40,enableTopPager:false,enableBottomPager:true,maxPagesToShow:7,imageContainerSel:"",captionContainerSel:"",controlsContainerSel:"",loadingContainerSel:"",renderSSControls:true,renderNavControls:true,playLinkText:"Play",pauseLinkText:"Pause",prevLinkText:"Previous",nextLinkText:"Next",nextPageLinkText:"Next &rsaquo;",prevPageLinkText:"&lsaquo; Prev",enableHistory:false,enableKeyboardNavigation:true,autoStart:false,syncTransitions:false,defaultTransitionDuration:1000,onSlideChange:undefined,onTransitionOut:undefined,onTransitionIn:undefined,onPageTransitionOut:undefined,onPageTransitionIn:undefined,onImageAdded:undefined,onImageRemoved:undefined};b.fn.galleriffic=function(g){b.extend(this,{version:b.galleriffic.version,isSlideshowRunning:false,slideshowTimeout:undefined,clickHandler:function(n,l){this.pause();if(!this.enableHistory){var m=b.galleriffic.normalizeHash(b(l).attr("href"));b.galleriffic.gotoImage(m);n.preventDefault()}},appendImage:function(l){this.addImage(l,false,false);return this},insertImage:function(m,l){this.addImage(m,false,true,l);return this},addImage:function(m,r,w,s){var u=(typeof m==="string")?b(m):m;var n=u.find("a.thumb");var o=n.attr("href");var v=n.attr("title");var q=u.find(".caption").remove();var p=n.attr("name");a++;if(!p||d[""+p]){p=a}if(!w){s=this.data.length}var l={title:v,slideUrl:o,caption:q,hash:p,gallery:this,index:s};if(w){this.data.splice(s,0,l);this.updateIndices(s)}else{this.data.push(l)}var x=this;if(!r){this.updateThumbs(function(){var y=x.find("ul.thumbs");if(w){y.children(":eq("+s+")").before(u)}else{y.append(u)}if(x.onImageAdded){x.onImageAdded(l,u)}})}d[""+p]=l;n.attr("rel","history").attr("href","#"+p).removeAttr("name").click(function(y){x.clickHandler(y,this)});return this},removeImageByIndex:function(l){if(l<0||l>=this.data.length){return false}var m=this.data[l];if(!m){return false}this.removeImage(m);return true},removeImageByHash:function(l){return b.galleriffic.removeImageByHash(l,this)},removeImage:function(m){var l=m.index;this.data.splice(l,1);delete d[""+m.hash];this.updateThumbs(function(){var n=e.find("ul.thumbs").children(":eq("+l+")").remove();if(e.onImageRemoved){e.onImageRemoved(m,n)}});this.updateIndices(l);return this},updateIndices:function(l){for(i=l;i<this.data.length;i++){this.data[i].index=i}return this},initializeThumbs:function(){this.data=[];var l=this;this.find("ul.thumbs > li").each(function(m){l.addImage(b(this),true,false)});return this},isPreloadComplete:false,preloadInit:function(){if(this.preloadAhead==0){return this}this.preloadStartIndex=this.currentImage.index;var l=this.getNextIndex(this.preloadStartIndex);return this.preloadRecursive(this.preloadStartIndex,l)},preloadRelocate:function(l){this.preloadStartIndex=l;return this},preloadRecursive:function(q,n){if(q!=this.preloadStartIndex){var l=this.getNextIndex(this.preloadStartIndex);return this.preloadRecursive(this.preloadStartIndex,l)}var m=this;var o=n-q;if(o<0){o=this.data.length-1-q+n}if(this.preloadAhead>=0&&o>this.preloadAhead){setTimeout(function(){m.preloadRecursive(q,n)},500);return this}var r=this.data[n];if(!r){return this}if(r.image){return this.preloadNext(q,n)}var p=new Image();p.onload=function(){r.image=this;m.preloadNext(q,n)};p.alt=r.title;p.src=r.slideUrl;return this},preloadNext:function(o,n){var l=this.getNextIndex(n);if(l==o){this.isPreloadComplete=true}else{var m=this;setTimeout(function(){m.preloadRecursive(o,l)},100)}return this},getNextIndex:function(m){var l=m+1;if(l>=this.data.length){l=0}return l},getPrevIndex:function(l){var m=l-1;if(m<0){m=this.data.length-1}return m},pause:function(){this.isSlideshowRunning=false;if(this.slideshowTimeout){clearTimeout(this.slideshowTimeout);this.slideshowTimeout=undefined}if(this.$controlsContainer){this.$controlsContainer.find("div.ss-controls a").removeClass().addClass("play").attr("title",this.playLinkText).attr("href","#play").html(this.playLinkText)}return this},play:function(){this.isSlideshowRunning=true;if(this.$controlsContainer){this.$controlsContainer.find("div.ss-controls a").removeClass().addClass("pause").attr("title",this.pauseLinkText).attr("href","#pause").html(this.pauseLinkText)}if(!this.slideshowTimeout){var l=this;this.slideshowTimeout=setTimeout(function(){l.ssAdvance()},this.delay)}return this},toggleSlideshow:function(){if(this.isSlideshowRunning){this.pause()}else{this.play()}return this},ssAdvance:function(){if(this.isSlideshowRunning){this.next(true)}return this},next:function(l,m){this.gotoIndex(this.getNextIndex(this.currentImage.index),l,m);return this},previous:function(l,m){this.gotoIndex(this.getPrevIndex(this.currentImage.index),l,m);return this},nextPage:function(m,q){var o=this.getCurrentPage();var n=this.getNumPages()-1;if(o<n){var p=o*this.numThumbs;var l=p+this.numThumbs;this.gotoIndex(l,m,q)}return this},previousPage:function(l,p){var n=this.getCurrentPage();if(n>0){var o=n*this.numThumbs;var m=o-this.numThumbs;this.gotoIndex(m,l,p)}return this},gotoIndex:function(m,l,n){if(!l){this.pause()}if(m<0){m=0}else{if(m>=this.data.length){m=this.data.length-1}}var o=this.data[m];if(!n&&this.enableHistory){b.historyLoad(String(o.hash))}else{this.gotoImage(o)}return this},gotoImage:function(m){var l=m.index;if(this.onSlideChange){this.onSlideChange(this.currentImage.index,l)}this.currentImage=m;this.preloadRelocate(l);this.refresh();return this},getDefaultTransitionDuration:function(l){if(l){return this.defaultTransitionDuration}return this.defaultTransitionDuration/2},refresh:function(){var l=this.currentImage;if(!l){return this}var p=l.index;if(this.$controlsContainer){this.$controlsContainer.find("div.nav-controls a.prev").attr("href","#"+this.data[this.getPrevIndex(p)].hash).end().find("div.nav-controls a.next").attr("href","#"+this.data[this.getNextIndex(p)].hash)}var s=this.$imageContainer.find("span.current").addClass("previous").removeClass("current");var r=0;if(this.$captionContainer){r=this.$captionContainer.find("span.current").addClass("previous").removeClass("current")}var o=this.syncTransitions&&l.image;var m=true;var u=this;var q=function(){m=false;s.remove();if(r){r.remove()}if(!o){if(l.image&&l.hash==u.data[u.currentImage.index].hash){u.buildImage(l,o)}else{if(u.$loadingContainer){u.$loadingContainer.show()}}}};if(s.length==0){q()}else{if(this.onTransitionOut){this.onTransitionOut(s,r,o,q)}else{s.fadeTo(this.getDefaultTransitionDuration(o),0,q);if(r){r.fadeTo(this.getDefaultTransitionDuration(o),0)}}}if(o){this.buildImage(l,o)}if(!l.image){var n=new Image();n.onload=function(){l.image=this;if(!m&&l.hash==u.data[u.currentImage.index].hash){u.buildImage(l,o)}};n.alt=l.title;n.src=l.slideUrl}this.relocatePreload=true;return this.syncThumbs()},buildImage:function(q,o){var n=this;var l=this.getNextIndex(q.index);var m=this.$imageContainer.append('<span class="image-wrapper current"><a class="advance-link" rel="history" href="#'+this.data[l].hash+'" title="'+q.title+'">&nbsp;</a></span>').find("span.current").css("opacity","0");m.find("a").append(q.image).click(function(r){n.clickHandler(r,this)});var p=0;if(this.$captionContainer){p=this.$captionContainer.append('<span class="image-caption current"></span>').find("span.current").css("opacity","0").append(q.caption)}if(this.$loadingContainer){this.$loadingContainer.hide()}if(this.onTransitionIn){this.onTransitionIn(m,p,o)}else{m.fadeTo(this.getDefaultTransitionDuration(o),1);if(p){p.fadeTo(this.getDefaultTransitionDuration(o),1)}}if(this.isSlideshowRunning){if(this.slideshowTimeout){clearTimeout(this.slideshowTimeout)}this.slideshowTimeout=setTimeout(function(){n.ssAdvance()},this.delay)}return this},getCurrentPage:function(){return Math.floor(this.currentImage.index/this.numThumbs)},syncThumbs:function(){var m=this.getCurrentPage();if(m!=this.displayedPage){this.updateThumbs()}var l=this.find("ul.thumbs").children();l.filter(".selected").removeClass("selected");l.eq(this.currentImage.index).addClass("selected");return this},updateThumbs:function(l){var m=this;var n=function(){if(l){l()}m.rebuildThumbs();if(m.onPageTransitionIn){m.onPageTransitionIn()}else{m.show()}};if(this.onPageTransitionOut){this.onPageTransitionOut(n)}else{this.hide();n()}return this},rebuildThumbs:function(){var n=this.data.length>this.numThumbs;if(this.enableTopPager){var l=this.find("div.top");if(l.length==0){l=this.prepend('<div class="top pagination"></div>').find("div.top")}else{l.empty()}if(n){this.buildPager(l)}}if(this.enableBottomPager){var p=this.find("div.bottom");if(p.length==0){p=this.append('<div class="bottom pagination"></div>').find("div.bottom")}else{p.empty()}if(n){this.buildPager(p)}}var q=this.getCurrentPage();var r=q*this.numThumbs;var m=r+this.numThumbs-1;if(m>=this.data.length){m=this.data.length-1}var o=this.find("ul.thumbs");o.find("li").each(function(s){var u=b(this);if(s>=r&&s<=m){u.show()}else{u.hide()}});this.displayedPage=q;o.removeClass("noscript");return this},getNumPages:function(){return Math.ceil(this.data.length/this.numThumbs)},buildPager:function(n){var w=this;var m=this.getNumPages();var p=this.getCurrentPage();var u=p*this.numThumbs;var l=this.maxPagesToShow-1;var q=p-Math.floor((this.maxPagesToShow-1)/2)+1;if(q>0){var v=m-q;if(v<l){q=q-(l-v)}}if(q<0){q=0}if(p>0){var o=u-this.numThumbs;n.append('<a rel="history" href="#'+this.data[o].hash+'" title="'+this.prevPageLinkText+'">'+this.prevPageLinkText+"</a>")}if(q>0){this.buildPageLink(n,0,m);if(q>1){n.append('<span class="ellipsis">&hellip;</span>')}l--}while(l>0){this.buildPageLink(n,q,m);l--;q++}if(q<m){var s=m-1;if(q<s){n.append('<span class="ellipsis">&hellip;</span>')}this.buildPageLink(n,s,m)}var r=u+this.numThumbs;if(r<this.data.length){n.append('<a rel="history" href="#'+this.data[r].hash+'" title="'+this.nextPageLinkText+'">'+this.nextPageLinkText+"</a>")}n.find("a").click(function(x){w.clickHandler(x,this)});return this},buildPageLink:function(n,q,o){var m=q+1;var p=this.getCurrentPage();if(q==p){n.append('<span class="current">'+m+"</span>")}else{if(q<o){var l=q*this.numThumbs;n.append('<a rel="history" href="#'+this.data[l].hash+'" title="'+m+'">'+m+"</a>")}}return this}});b.extend(this,c,g);if(this.enableHistory&&!b.historyInit){this.enableHistory=false}if(this.imageContainerSel){this.$imageContainer=b(this.imageContainerSel)}if(this.captionContainerSel){this.$captionContainer=b(this.captionContainerSel)}if(this.loadingContainerSel){this.$loadingContainer=b(this.loadingContainerSel)}this.initializeThumbs();if(this.maxPagesToShow<3){this.maxPagesToShow=3}this.displayedPage=-1;this.currentImage=this.data[0];var e=this;if(this.$loadingContainer){this.$loadingContainer.hide()}if(this.controlsContainerSel){this.$controlsContainer=b(this.controlsContainerSel).empty();if(this.renderSSControls){if(this.autoStart){this.$controlsContainer.append('<div class="ss-controls"><a href="#pause" class="pause" title="'+this.pauseLinkText+'">'+this.pauseLinkText+"</a></div>")}else{this.$controlsContainer.append('<div class="ss-controls"><a href="#play" class="play" title="'+this.playLinkText+'">'+this.playLinkText+"</a></div>")}this.$controlsContainer.find("div.ss-controls a").click(function(l){e.toggleSlideshow();l.preventDefault();return false})}if(this.renderNavControls){this.$controlsContainer.append('<div class="nav-controls"><a class="prev" rel="history" title="'+this.prevLinkText+'">'+this.prevLinkText+'</a><a class="next" rel="history" title="'+this.nextLinkText+'">'+this.nextLinkText+"</a></div>").find("div.nav-controls a").click(function(l){e.clickHandler(l,this)})}}var f=!this.enableHistory||!location.hash;if(this.enableHistory&&location.hash){var h=b.galleriffic.normalizeHash(location.hash);var j=d[h];if(!j){f=true}}if(f){this.gotoIndex(0,false,true)}if(this.enableKeyboardNavigation){b(document).keydown(function(m){var l=m.charCode?m.charCode:m.keyCode?m.keyCode:0;switch(l){case 33:e.previousPage();m.preventDefault();break;case 34:e.nextPage();m.preventDefault();break;case 35:e.gotoIndex(e.data.length-1);m.preventDefault();break;case 36:e.gotoIndex(0);m.preventDefault();break;case 37:e.previous();m.preventDefault();break;case 39:e.next();m.preventDefault();break}})}if(this.autoStart){this.play()}setTimeout(function(){e.preloadInit()},1000);return this}})(jQuery);(function(a){var b={mouseOutOpacity:0.67,mouseOverOpacity:1,fadeSpeed:"fast",exemptionSelector:".selected"};a.fn.opacityrollover=function(d){a.extend(this,b,d);var c=this;function e(h,g){var f=a(h);if(c.exemptionSelector){f=f.not(c.exemptionSelector)}f.fadeTo(c.fadeSpeed,g)}this.css("opacity",this.mouseOutOpacity).hover(function(){e(this,c.mouseOverOpacity)},function(){e(this,c.mouseOutOpacity)});return this}})(jQuery);this.boxaction=function(){var a=false;var b;$("#actionsBox").draggable({start:function(d,e){a=true},stop:function(d,e){var f=$("#actionsBox");f.data("distanceTop",parseFloat(f.css("top"),10)-$(document).scrollTop())}});$('#mytable input[type="checkbox"]').bind("click",function(f){var d=$(this);if(d.is(":checked")){d.parents("tr:first").addClass("selected")}else{d.parents("tr:first").removeClass("selected")}c()});function c(){var d=$("#mytable input:checked").length;$("#cntBoxMenu").html(d);var f=$("#acBox");if($("#acBox").length>0){if(d>1){$("#acBox").hide()}else{$("#acBox").show()}}var e=$("#actionsBox");if(d>0){if(!a){e.stop(true).animate({top:parseInt(15+$(document).scrollTop())+"px",opacity:"1"},500)}else{e.stop(true).animate({top:parseInt($(document).scrollTop()+e.data("distanceTop"))+"px",opacity:"1"},500)}}else{e.stop(true).animate({top:parseInt($(document).scrollTop()-50)+"px",opacity:"0"},500,function(){$(this).css("left","50%");a=false;var g=$("#toggleBoxMenu");if(g.hasClass("closed")){g.click()}})}}$(window).scroll(function(){clearTimeout(b);b=setTimeout(c,500)});$("#toggleBoxMenu").toggle(function(d){$(this).addClass("closed").removeClass("open");$("#actionsBox .submenu").stop(true,true).slideDown()},function(d){$(this).addClass("open").removeClass("closed");$("#actionsBox .submenu").stop(true,true).slideUp()});$("#closeBoxMenu").bind("click",function(d){$("#mytable input:checked").attr("checked",false);$("#actionsBox").animate({top:"-50px",opacity:"0"},1000,function(){})})};$(document).ready(function(){boxaction()});$(window).unload(function(){$("div.player").html("")});(function($){function generatePlaylistID(){var i=1;while(true){if($(".playlist"+i).length==0){return"playlist"+i}else{i++}}}function setPlayer(el,url,id,settings){var flashWidth=settings.progressBarWidth+settings.barSpace+settings.volumeBarWidth;var flashHeight=Math.max(settings.volumeSliderHeight,settings.progressSliderHeight);var settingsStr="&amp;autoplay="+settings.autoplay+"&amp;backgroundColor="+settings.backgroundColor+"&amp;volumeBarWidth="+settings.volumeBarWidth+"&amp;progressBarWidth="+settings.progressBarWidth+"&amp;barSpace="+settings.barSpace+"&amp;volumeBarColor="+settings.volumeBarColor+"&amp;volumeBarHeight="+settings.volumeBarHeight+"&amp;volumeSliderWidth="+settings.volumeSliderWidth+"&amp;volumeSliderHeight="+settings.volumeSliderHeight+"&amp;volumeSliderColor="+settings.volumeSliderColor+"&amp;progressBarHeight="+settings.progressBarHeight+"&amp;progressSliderWidth="+settings.progressSliderWidth+"&amp;progressSliderHeight="+settings.progressSliderHeight+"&amp;progressSliderColor="+settings.progressSliderColor+"&amp;progressBarColor="+settings.progressBarColor+"&amp;bufferColor="+settings.bufferColor;$(el).html("<embed wmode=\"transparent\" type='application/x-shockwave-flash' src="+settings.playerurl+" width='"+flashWidth+"' height='"+flashHeight+"' style='undefined' id='player"+id+"' name='player"+id+"' quality='high' swliveconnect='true' allowscriptaccess='sameDomain' flashvars='url="+url+"&amp;id="+id+settingsStr+"'>");$(el).removeClass("inactive")}function getFlashMovie(id){var isIE=navigator.appName.indexOf("Microsoft")!=-1;return(isIE)?document["player"+id]:document["player"+id]}function invokeFlashMethod(id,methodName,arg1,arg2,arg3){var flsh=getFlashMovie(id);var isIE=navigator.appName.indexOf("Microsoft")!=-1;var res=null;if(isIE){var args=[];if(arg1){args.enqueue(arg1)}if(arg2){args.enqueue(arg2)}if(arg3){args.enqueue(arg3)}var xmlArgs=window.self.__flash__argumentsToXML(args,0);var xml='<invoke name="';xml=xml+methodName;xml=xml+'" returntype="javascript">';xml=xml+xmlArgs;xml=xml+"</invoke>";var funcRes=flsh.callFunction(xml);if((funcRes!=null)&&(funcRes!=undefined)){res=eval(funcRes)}}else{if(!arg1){res=flsh[methodName]()}else{if(arg1&&!arg2){res=flsh[methodName](arg1)}else{if(arg1&&arg2&&!arg3){res=flsh[methodName](arg1,arg2)}else{res=flsh[methodName](arg1,arg2,arg3)}}}}return res}function removePlayer(el){$(el).addClass("inactive").empty()}function playTrack(el,id){$(el).addClass("current");var settings=$(el).data("settings");setPlayer($(el).find("div.player"),$(el).attr("href"),id,settings);$.each($(el).find(".btn"),function(){if($(this).hasClass("pause")){$(this).removeClass("pause").addClass("play")}else{if($(this).hasClass("play")){$(this).removeClass("play").addClass("pause")}}})}function pause(el){$(el).each(function(){var id=$(this).data("id");el.find(".current").find(".btn").removeClass("play").removeClass("pause").addClass("play");el.find(".current").addClass("paused");invokeFlashMethod(id,"pause")})}function resume(el){$(el).each(function(){var id=$(this).data("id");el.find(".current").removeClass("paused");el.find(".current").find(".btn").removeClass("play").removeClass("pause").addClass("pause");invokeFlashMethod(id,"play")})}function stop(el){$.each($(el).find(".item"),function(){$(this).removeClass("current").removeClass("paused");removePlayer($(this).find("div.player"));$.each($(this).find(".btn"),function(){$(this).removeClass("pause").addClass("play")})})}var methods={init:function(options){var settings={autoplay:1,backgroundColor:16777215,volumeBarWidth:40,progressBarWidth:320,barSpace:20,volumeBarColor:5592405,volumeBarHeight:1,volumeSliderWidth:10,volumeSliderHeight:5,volumeSliderColor:5592405,progressBarHeight:1,progressSliderWidth:10,progressSliderHeight:5,progressBarColor:10066329,progressSliderColor:5592405,bufferColor:5592405,playerurl:"drplayer.swf"};if(options){$.extend(settings,options)}return this.each(function(){var el=$(this);var id=generatePlaylistID();$(el).data("id",id);$(el).addClass(id);$.each($(el).find(".item"),function(){var item=$(this);$(this).data("settings",settings);if($(el).find(".current").length==0){var tr=$(el).find(".item:first");playTrack(tr,$(el).data("id"))}$(this).find(".btn").click(function(){if($(item).hasClass("paused")){$(item).removeClass("paused");$(this).removeClass("play").addClass("pause");resume(el)}else{if($(item).hasClass("current")){$(this).removeClass("pause").addClass("play");$(item).addClass("paused");pause(el)}else{stop(el);playTrack(item,id)}}})})})},next:function(){return this.each(function(){var el=$(this);var items=el.find(".item");var index=-1;for(var i=0;i<items.length;i++){if($(items[i]).hasClass("current")){index=i}}if(index!=-1){stop(el)}if(index!=-1&&index<items.length-1){var next=$(items[index+1]);playTrack(next,$(el).data("id"))}})},prev:function(){return this.each(function(){var el=$(this);var items=el.find(".item");var index=-1;for(var i=0;i<items.length;i++){if($(items[i]).hasClass("current")){index=i}}if(index!=-1){stop(el)}if(index>0&&index<items.length){var prev=$(items[index-1]);playTrack(prev,$(el).data("id"))}})},pause:function(){return this.each(function(){var el=$(this);pause(el)})},play:function(){return this.each(function(){var el=$(this);if($(el).find(".current").length==0){var tr=$(el).find(".item:first");playTrack(tr,$(el).data("id"))}else{resume(el)}})}};$.fn.playlist=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof method==="object"||!method){return methods.init.apply(this,arguments)}else{$.error("Method "+method+" does not exist")}}}})(jQuery);(function(E){var O,W,T,P,d,o,M,D,R,C,F=0,K={},l=[],e=0,J={},B=[],f=null,q=new Image(),j=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,m=/[^\.]\.(swf)\s*$/i,r,Q=1,h=0,w="",b,c,S=false,v=E.extend(E("<div/>")[0],{prop:0}),V=E.browser.msie&&E.browser.version<7&&!window.XMLHttpRequest,u=function(){W.hide();q.onerror=q.onload=null;if(f){f.abort()}O.empty()},A=function(){if(false===K.onError(l,F,K)){W.hide();S=false;return}K.titleShow=false;K.width="auto";K.height="auto";O.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');p()},z=function(){var ac=l[F],Z,ab,ae,ad,Y,aa;u();K=E.extend({},E.fn.fancybox.defaults,(typeof E(ac).data("fancybox")=="undefined"?K:E(ac).data("fancybox")));aa=K.onStart(l,F,K);if(aa===false){S=false;return}else{if(typeof aa=="object"){K=E.extend(K,aa)}}ae=K.title||(ac.nodeName?E(ac).attr("title"):ac.title)||"";if(ac.nodeName&&!K.orig){K.orig=E(ac).children("img:first").length?E(ac).children("img:first"):E(ac)}if(ae===""&&K.orig&&K.titleFromAlt){ae=K.orig.attr("alt")}Z=K.href||(ac.nodeName?E(ac).attr("href"):ac.href)||null;if((/^(?:javascript)/i).test(Z)||Z=="#"){Z=null}if(K.type){ab=K.type;if(!Z){Z=K.content}}else{if(K.content){ab="html"}else{if(Z){if(Z.match(j)){ab="image"}else{if(Z.match(m)){ab="swf"}else{if(E(ac).hasClass("iframe")){ab="iframe"}else{if(Z.indexOf("#")===0){ab="inline"}else{ab="ajax"}}}}}}}if(!ab){A();return}if(ab=="inline"){ac=Z.substr(Z.indexOf("#"));ab=E(ac).length>0?"inline":"ajax"}K.type=ab;K.href=Z;K.title=ae;if(K.autoDimensions){if(K.type=="html"||K.type=="inline"||K.type=="ajax"){K.width="auto";K.height="auto"}else{K.autoDimensions=false}}if(K.modal){K.overlayShow=true;K.hideOnOverlayClick=false;K.hideOnContentClick=false;K.enableEscapeButton=false;K.showCloseButton=false}K.padding=parseInt(K.padding,10);K.margin=parseInt(K.margin,10);O.css("padding",(K.padding+K.margin));E(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){E(this).replaceWith(o.children())});switch(ab){case"html":O.html(K.content);p();break;case"inline":if(E(ac).parent().is("#fancybox-content")===true){S=false;return}E('<div class="fancybox-inline-tmp" />').hide().insertBefore(E(ac)).bind("fancybox-cleanup",function(){E(this).replaceWith(o.children())}).bind("fancybox-cancel",function(){E(this).replaceWith(O.children())});E(ac).appendTo(O);p();break;case"image":S=false;E.fancybox.showActivity();q=new Image();q.onerror=function(){A()};q.onload=function(){S=true;q.onerror=q.onload=null;I()};q.src=Z;break;case"swf":K.scrolling="no";ad='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+K.width+'" height="'+K.height+'"><param name="movie" value="'+Z+'"></param>';Y="";E.each(K.swf,function(af,ag){ad+='<param name="'+af+'" value="'+ag+'"></param>';Y+=" "+af+'="'+ag+'"'});ad+='<embed src="'+Z+'" type="application/x-shockwave-flash" width="'+K.width+'" height="'+K.height+'"'+Y+"></embed></object>";O.html(ad);p();break;case"ajax":S=false;E.fancybox.showActivity();K.ajax.win=K.ajax.success;f=E.ajax(E.extend({},K.ajax,{url:Z,data:K.ajax.data||{},error:function(af,ah,ag){if(af.status>0){A()}},success:function(ag,ai,af){var ah=typeof af=="object"?af:f;if(ah.status==200){if(typeof K.ajax.win=="function"){aa=K.ajax.win(Z,ag,ai,af);if(aa===false){W.hide();return}else{if(typeof aa=="string"||typeof aa=="object"){ag=aa}}}O.html(ag);p()}}}));break;case"iframe":H();break}},p=function(){var Y=K.width,Z=K.height;if(Y.toString().indexOf("%")>-1){Y=parseInt((E(window).width()-(K.margin*2))*parseFloat(Y)/100,10)+"px"}else{Y=Y=="auto"?"auto":Y+"px"}if(Z.toString().indexOf("%")>-1){Z=parseInt((E(window).height()-(K.margin*2))*parseFloat(Z)/100,10)+"px"}else{Z=Z=="auto"?"auto":Z+"px"}O.wrapInner('<div style="width:'+Y+";height:"+Z+";overflow: "+(K.scrolling=="auto"?"auto":(K.scrolling=="yes"?"scroll":"hidden"))+';position:relative;"></div>');K.width=O.width();K.height=O.height();H()},I=function(){K.width=q.width;K.height=q.height;E("<img />").attr({id:"fancybox-img",src:q.src,alt:K.title}).appendTo(O);H()},H=function(){var Z,Y;W.hide();if(P.is(":visible")&&false===J.onCleanup(B,e,J)){E.event.trigger("fancybox-cancel");S=false;return}S=true;E(o.add(T)).unbind();E(window).unbind("resize.fb scroll.fb");E(document).unbind("keydown.fb");if(P.is(":visible")&&J.titlePosition!=="outside"){P.css("height",P.height())}B=l;e=F;J=K;if(J.overlayShow){T.css({"background-color":J.overlayColor,opacity:J.overlayOpacity,cursor:J.hideOnOverlayClick?"pointer":"auto",height:E(document).height()});if(!T.is(":visible")){if(V){E("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"})}T.show()}}else{T.hide()}c=U();n();if(P.is(":visible")){E(M.add(R).add(C)).hide();Z=P.position(),b={top:Z.top,left:Z.left,width:P.width(),height:P.height()};Y=(b.width==c.width&&b.height==c.height);o.fadeTo(J.changeFade,0.3,function(){var aa=function(){o.html(O.contents()).fadeTo(J.changeFade,1,y)};E.event.trigger("fancybox-change");o.empty().removeAttr("filter").css({"border-width":J.padding,width:c.width-J.padding*2,height:K.autoDimensions?"auto":c.height-h-J.padding*2});if(Y){aa()}else{v.prop=0;E(v).animate({prop:1},{duration:J.changeSpeed,easing:J.easingChange,step:X,complete:aa})}});return}P.removeAttr("style");o.css("border-width",J.padding);if(J.transitionIn=="elastic"){b=L();o.html(O.contents());P.show();if(J.opacity){c.opacity=0}v.prop=0;E(v).animate({prop:1},{duration:J.speedIn,easing:J.easingIn,step:X,complete:y});return}if(J.titlePosition=="inside"&&h>0){D.show()}o.css({width:c.width-J.padding*2,height:K.autoDimensions?"auto":c.height-h-J.padding*2}).html(O.contents());P.css(c).fadeIn(J.transitionIn=="none"?0:J.speedIn,y)},G=function(Y){if(Y&&Y.length){if(J.titlePosition=="float"){return'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+Y+'</td><td id="fancybox-title-float-right"></td></tr></table>'}return'<div id="fancybox-title-'+J.titlePosition+'">'+Y+"</div>"}return false},n=function(){w=J.title||"";h=0;D.empty().removeAttr("style").removeClass();if(J.titleShow===false){D.hide();return}w=E.isFunction(J.titleFormat)?J.titleFormat(w,B,e,J):G(w);if(!w||w===""){D.hide();return}D.addClass("fancybox-title-"+J.titlePosition).html(w).appendTo("body").show();switch(J.titlePosition){case"inside":D.css({width:c.width-(J.padding*2),marginLeft:J.padding,marginRight:J.padding});h=D.outerHeight(true);D.appendTo(d);c.height+=h;break;case"over":D.css({marginLeft:J.padding,width:c.width-(J.padding*2),bottom:J.padding}).appendTo(d);break;case"float":D.css("left",parseInt((D.width()-c.width-40)/2,10)*-1).appendTo(P);break;default:D.css({width:c.width-(J.padding*2),paddingLeft:J.padding,paddingRight:J.padding}).appendTo(P);break}D.hide()},g=function(){if(J.enableEscapeButton||J.enableKeyboardNav){E(document).bind("keydown.fb",function(Y){if(Y.keyCode==27&&J.enableEscapeButton){Y.preventDefault();E.fancybox.close()}else{if((Y.keyCode==37||Y.keyCode==39)&&J.enableKeyboardNav&&Y.target.tagName!=="INPUT"&&Y.target.tagName!=="TEXTAREA"&&Y.target.tagName!=="SELECT"){Y.preventDefault();E.fancybox[Y.keyCode==37?"prev":"next"]()}}})}if(!J.showNavArrows){R.hide();C.hide();return}if((J.cyclic&&B.length>1)||e!==0){R.show()}if((J.cyclic&&B.length>1)||e!=(B.length-1)){C.show()}},y=function(){if(!E.support.opacity){o.get(0).style.removeAttribute("filter");P.get(0).style.removeAttribute("filter")}if(K.autoDimensions){o.css("height","auto")}P.css("height","auto");if(w&&w.length){D.show()}if(J.showCloseButton){M.show()}g();if(J.hideOnContentClick){o.bind("click",E.fancybox.close)}if(J.hideOnOverlayClick){T.bind("click",E.fancybox.close)}E(window).bind("resize.fb",E.fancybox.resize);if(J.centerOnScroll){E(window).bind("scroll.fb",E.fancybox.center)}if(J.type=="iframe"){E('<iframe id="fancybox-frame" name="fancybox-frame'+new Date().getTime()+'" frameborder="0" hspace="0" '+(E.browser.msie?'allowtransparency="true""':"")+' scrolling="'+K.scrolling+'" src="'+J.href+'"></iframe>').appendTo(o)}P.show();S=false;E.fancybox.center();J.onComplete(B,e,J);N()},N=function(){var Y,Z;if((B.length-1)>e){Y=B[e+1].href;if(typeof Y!=="undefined"&&Y.match(j)){Z=new Image();Z.src=Y}}if(e>0){Y=B[e-1].href;if(typeof Y!=="undefined"&&Y.match(j)){Z=new Image();Z.src=Y}}},X=function(Z){var Y={width:parseInt(b.width+(c.width-b.width)*Z,10),height:parseInt(b.height+(c.height-b.height)*Z,10),top:parseInt(b.top+(c.top-b.top)*Z,10),left:parseInt(b.left+(c.left-b.left)*Z,10)};if(typeof c.opacity!=="undefined"){Y.opacity=Z<0.5?0.5:Z}P.css(Y);o.css({width:Y.width-J.padding*2,height:Y.height-(h*Z)-J.padding*2})},x=function(){return[E(window).width()-(J.margin*2),E(window).height()-(J.margin*2),E(document).scrollLeft()+J.margin,E(document).scrollTop()+J.margin]},U=function(){var Y=x(),ac={},Z=J.autoScale,aa=J.padding*2,ab;if(J.width.toString().indexOf("%")>-1){ac.width=parseInt((Y[0]*parseFloat(J.width))/100,10)}else{ac.width=J.width+aa}if(J.height.toString().indexOf("%")>-1){ac.height=parseInt((Y[1]*parseFloat(J.height))/100,10)}else{ac.height=J.height+aa}if(Z&&(ac.width>Y[0]||ac.height>Y[1])){if(K.type=="image"||K.type=="swf"){ab=(J.width)/(J.height);if((ac.width)>Y[0]){ac.width=Y[0];ac.height=parseInt(((ac.width-aa)/ab)+aa,10)}if((ac.height)>Y[1]){ac.height=Y[1];ac.width=parseInt(((ac.height-aa)*ab)+aa,10)}}else{ac.width=Math.min(ac.width,Y[0]);ac.height=Math.min(ac.height,Y[1])}}ac.top=parseInt(Math.max(Y[3]-20,Y[3]+((Y[1]-ac.height-40)*0.5)),10);ac.left=parseInt(Math.max(Y[2]-20,Y[2]+((Y[0]-ac.width-40)*0.5)),10);return ac},s=function(Y){var Z=Y.offset();Z.top+=parseInt(Y.css("paddingTop"),10)||0;Z.left+=parseInt(Y.css("paddingLeft"),10)||0;Z.top+=parseInt(Y.css("border-top-width"),10)||0;Z.left+=parseInt(Y.css("border-left-width"),10)||0;Z.width=Y.width();Z.height=Y.height();return Z},L=function(){var ab=K.orig?E(K.orig):false,aa={},Z,Y;if(ab&&ab.length){Z=s(ab);aa={width:Z.width+(J.padding*2),height:Z.height+(J.padding*2),top:Z.top-J.padding-20,left:Z.left-J.padding-20}}else{Y=x();aa={width:J.padding*2,height:J.padding*2,top:parseInt(Y[3]+Y[1]*0.5,10),left:parseInt(Y[2]+Y[0]*0.5,10)}}return aa},a=function(){if(!W.is(":visible")){clearInterval(r);return}E("div",W).css("top",(Q*-40)+"px");Q=(Q+1)%12};E.fn.fancybox=function(Y){if(!E(this).length){return this}E(this).data("fancybox",E.extend({},Y,(E.metadata?E(this).metadata():{}))).unbind("click.fb").bind("click.fb",function(aa){aa.preventDefault();if(S){return}S=true;E(this).blur();l=[];F=0;var Z=E(this).attr("rel")||"";if(!Z||Z==""||Z==="nofollow"){l.push(this)}else{l=E("a[rel="+Z+"], area[rel="+Z+"]");F=l.index(this)}z();return});return this};E.fancybox=function(ab){var aa;if(S){return}S=true;aa=typeof arguments[1]!=="undefined"?arguments[1]:{};l=[];F=parseInt(aa.index,10)||0;if(E.isArray(ab)){for(var Z=0,Y=ab.length;Z<Y;Z++){if(typeof ab[Z]=="object"){E(ab[Z]).data("fancybox",E.extend({},aa,ab[Z]))}else{ab[Z]=E({}).data("fancybox",E.extend({content:ab[Z]},aa))}}l=jQuery.merge(l,ab)}else{if(typeof ab=="object"){E(ab).data("fancybox",E.extend({},aa,ab))}else{ab=E({}).data("fancybox",E.extend({content:ab},aa))}l.push(ab)}if(F>l.length||F<0){F=0}z()};E.fancybox.showActivity=function(){clearInterval(r);W.show();r=setInterval(a,66)};E.fancybox.hideActivity=function(){W.hide()};E.fancybox.next=function(){return E.fancybox.pos(e+1)};E.fancybox.prev=function(){return E.fancybox.pos(e-1)};E.fancybox.pos=function(Y){if(S){return}Y=parseInt(Y);l=B;if(Y>-1&&Y<B.length){F=Y;z()}else{if(J.cyclic&&B.length>1){F=Y>=B.length?0:B.length-1;z()}}return};E.fancybox.cancel=function(){if(S){return}S=true;E.event.trigger("fancybox-cancel");u();K.onCancel(l,F,K);S=false};E.fancybox.close=function(){if(S||P.is(":hidden")){return}S=true;if(J&&false===J.onCleanup(B,e,J)){S=false;return}u();E(M.add(R).add(C)).hide();E(o.add(T)).unbind();E(window).unbind("resize.fb scroll.fb");E(document).unbind("keydown.fb");o.find("iframe").attr("src",V&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");if(J.titlePosition!=="inside"){D.empty()}P.stop();function Y(){T.fadeOut("fast");D.empty().hide();P.hide();E.event.trigger("fancybox-cleanup");o.empty();J.onClosed(B,e,J);B=K=[];e=F=0;J=K={};S=false}if(J.transitionOut=="elastic"){b=L();var Z=P.position();c={top:Z.top,left:Z.left,width:P.width(),height:P.height()};if(J.opacity){c.opacity=1}D.empty().hide();v.prop=1;E(v).animate({prop:0},{duration:J.speedOut,easing:J.easingOut,step:X,complete:Y})}else{P.fadeOut(J.transitionOut=="none"?0:J.speedOut,Y)}};E.fancybox.resize=function(){if(T.is(":visible")){T.css("height",E(document).height())}E.fancybox.center(true)};E.fancybox.center=function(){var Y,Z;if(S){return}Z=arguments[0]===true?1:0;Y=x();if(!Z&&(P.width()>Y[0]||P.height()>Y[1])){return}P.stop().animate({top:parseInt(Math.max(Y[3]-20,Y[3]+((Y[1]-o.height()-40)*0.5)-J.padding)),left:parseInt(Math.max(Y[2]-20,Y[2]+((Y[0]-o.width()-40)*0.5)-J.padding))},typeof arguments[0]=="number"?arguments[0]:200)};E.fancybox.init=function(){if(E("#fancybox-wrap").length){return}E("body").append(O=E('<div id="fancybox-tmp"></div>'),W=E('<div id="fancybox-loading"><div></div></div>'),T=E('<div id="fancybox-overlay"></div>'),P=E('<div id="fancybox-wrap"></div>'));d=E('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(P);d.append(o=E('<div id="fancybox-content"></div>'),M=E('<a id="fancybox-close"></a>'),D=E('<div id="fancybox-title"></div>'),R=E('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),C=E('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));M.click(E.fancybox.close);W.click(E.fancybox.cancel);R.click(function(Y){Y.preventDefault();E.fancybox.prev()});C.click(function(Y){Y.preventDefault();E.fancybox.next()});if(E.fn.mousewheel){P.bind("mousewheel.fb",function(Y,Z){if(S){Y.preventDefault()}else{if(E(Y.target).get(0).clientHeight==0||E(Y.target).get(0).scrollHeight===E(Y.target).get(0).clientHeight){Y.preventDefault();E.fancybox[Z>0?"prev":"next"]()}}})}if(!E.support.opacity){P.addClass("fancybox-ie")}if(V){W.addClass("fancybox-ie6");P.addClass("fancybox-ie6");E('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(d)}};E.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};E(document).ready(function(){E.fancybox.init()})})(jQuery);(function(g){var c="file_upload",e="undefined",f="function",a,d,b=function(n,m){var j=0,l=[];if(m){if(m.length){l=m}else{l[m-1]=null}}this.complete=function(){j+=1;if(j===l.length){n(l);j=0;l=[]}};this.push=function(o){l.push(o)};this.getList=function(){return l}},h=function(){var j=[];this.push=function(l){j.push(l);if(j.length===1){l()}};this.next=function(){j.shift();if(j.length){j[0]()}}};a=function(L){var J=this,ab,S,V={namespace:c,uploadFormFilter:function(ad){return true},fileInputFilter:function(ad){return true},cssClass:c,dragDropSupport:true,dropZone:L,url:function(ad){return ad.attr("action")},method:function(ad){return ad.attr("method")},fieldName:function(ad){return ad.attr("name")},formData:function(ad){return ad.serializeArray()},requestHeaders:null,multipart:true,multiFileRequest:false,withCredentials:false,forceIframeUpload:false,sequentialUploads:false,maxChunkSize:null},r=new b(function(ad){if(typeof V.onLoadAll===f){V.onLoadAll(ad)}}),Q=new h(),E={},j={},T=/^http(s)?:\/\//,C,o=function(){return typeof XMLHttpRequest!==e&&typeof XMLHttpRequestUpload!==e&&typeof File!==e&&(!V.multipart||typeof FormData!==e||(typeof FileReader!==e&&typeof XMLHttpRequest.prototype.sendAsBinary===f))},p=function(){if(V.dragDropSupport){if(typeof V.onDocumentDragEnter===f){E["dragenter."+V.namespace]=function(ad){V.onDocumentDragEnter(ad)}}if(typeof V.onDocumentDragLeave===f){E["dragleave."+V.namespace]=function(ad){V.onDocumentDragLeave(ad)}}E["dragover."+V.namespace]=J.onDocumentDragOver;E["drop."+V.namespace]=J.onDocumentDrop;g(document).bind(E);if(typeof V.onDragEnter===f){j["dragenter."+V.namespace]=function(ad){V.onDragEnter(ad)}}if(typeof V.onDragLeave===f){j["dragleave."+V.namespace]=function(ad){V.onDragLeave(ad)}}j["dragover."+V.namespace]=J.onDragOver;j["drop."+V.namespace]=J.onDrop;V.dropZone.bind(j)}S.bind("change."+V.namespace,J.onChange)},z=function(){g.each(E,function(ad,ae){g(document).unbind(ad,ae)});g.each(j,function(ad,ae){V.dropZone.unbind(ad,ae)});S.unbind("change."+V.namespace)},P=function(ad){return typeof ad.uploadedBytes!==e},O=function(ad,ae,ag){var af;if(typeof document.createEvent===f&&typeof ProgressEvent!==e){af=document.createEvent("ProgressEvent");af.initProgressEvent("progress",false,false,ad,ae,ag)}else{af={lengthComputable:true,loaded:ae,total:ag}}return af},s=function(ah,ad,af){var ae,ag;if(typeof af.progressTotal===e){if(ah[ad]){ag=ah[ad].size;af.progressTotal=ag?ag:1}else{ag=0;for(ae=0;ae<ah.length;ae+=1){ag+=ah[ae].size}af.progressTotal=ag}}return af.progressTotal},u=function(ae,af,aj,al,ag){var ai,ah,ak=0,ad=0;if(ae.lengthComputable&&typeof ag.onProgressAll===f){ag.progressLoaded=parseInt(ae.loaded/ae.total*s(af,aj,ag),10);ah=r.getList();g.each(ah,function(am,an){ak+=an[3].progressLoaded||0;ad+=s(an[0],an[1],an[3])});ai=O(true,ak,ad);ag.onProgressAll(ai,ah)}},q=function(ah,ag,ae,ai,af){var ad;if(P(af)){af.uploadedBytes=af.uploadedBytes+af.chunkSize;ad=O(true,af.uploadedBytes,ag[ae].size);if(typeof af.onProgress===f){af.onProgress(ad,ag,ae,ai,af)}u(ad,ag,ae,ai,af);if(af.uploadedBytes<ag[ae].size){if(typeof af.resumeUpload===f){af.resumeUpload(ah,ag,ae,ai,af,function(){F(ah,ag,ae,ai,af,true)})}else{F(ah,ag,ae,ai,af,true)}return}}af.progressLoaded=s(ag,ae,af);if(typeof af.onLoad===f){af.onLoad(ah,ag,ae,ai,af)}r.complete();Q.next()},x=function(ah,ag,ae,ai,af){var ad=ah;if(P(af)&&ah.lengthComputable){ad=O(true,af.uploadedBytes+parseInt(ah.loaded/ah.total*af.chunkSize,10),ag[ae].size)}if(typeof af.onProgress===f){af.onProgress(ad,ag,ae,ai,af)}u(ad,ag,ae,ai,af)},R=function(af,ad,ag,ae){if(ag.upload){ag.upload.onprogress=function(ah){x(ah,af,ad,ag,ae)}}ag.onload=function(ah){q(ah,af,ad,ag,ae)};ag.onabort=function(ah){ae.progressTotal=ae.progressLoaded;if(typeof ae.onAbort===f){ae.onAbort(ah,af,ad,ag,ae)}r.complete();Q.next()};ag.onerror=function(ah){ae.progressTotal=ae.progressLoaded;if(typeof ae.onError===f){ae.onError(ah,af,ad,ag,ae)}r.complete();Q.next()}},Y=function(ad){if(typeof ad.url===f){return ad.url(ad.uploadForm||ab)}return ad.url},D=function(ad){if(typeof ad.method===f){return ad.method(ad.uploadForm||ab)}return ad.method},G=function(ad){if(typeof ad.fieldName===f){return ad.fieldName(ad.fileInput||S)}return ad.fieldName},Z=function(ad){var ae;if(typeof ad.formData===f){return ad.formData(ad.uploadForm||ab)}else{if(g.isArray(ad.formData)){return ad.formData}else{if(ad.formData){ae=[];g.each(ad.formData,function(af,ag){ae.push({name:af,value:ag})});return ae}}}return[]},X=function(ag){if(T.test(ag)){var ah=location.host,af=location.protocol.length+2,ae=ag.indexOf(ah,af),ad=ae+ah.length;if((ae===af||ae===ag.indexOf("@",af)+1)&&(ag.length===ad||g.inArray(ag.charAt(ad),["/","?","#"])!==-1)){return true}return false}return true},I=function(ai,af,aj,ah){var ag=ai[af],ae=Y(ah),ad=X(ae);aj.open(D(ah),ae,true);if(ad){aj.setRequestHeader("X-Requested-With","XMLHttpRequest");if(!ah.multipart||P(ah)){aj.setRequestHeader("X-File-Name",ag.name);aj.setRequestHeader("X-File-Type",ag.type);aj.setRequestHeader("X-File-Size",ag.size);if(!P(ah)){aj.setRequestHeader("Content-Type",ag.type)}else{if(!ah.multipart){aj.setRequestHeader("Content-Type","application/octet-stream")}}}}else{if(ah.withCredentials){aj.withCredentials=true}}if(g.isArray(ah.requestHeaders)){g.each(ah.requestHeaders,function(ak,al){aj.setRequestHeader(al.name,al.value)})}else{if(ah.requestHeaders){g.each(ah.requestHeaders,function(ak,al){aj.setRequestHeader(ak,al)})}}},ac=function(af,ah,ae){var ag=new FormData(),ad;g.each(Z(ae),function(ai,aj){ag.append(aj.name,aj.value)});for(ad=0;ad<af.length;ad+=1){ag.append(G(ae),af[ad])}ah.send(ag)},A=function(ae,af){var ad=new FileReader();ad.onload=function(ag){ae.content=ag.target.result;af()};ad.readAsBinaryString(ae)},W=function(ad){return unescape(encodeURIComponent(ad))},N=function(aj,af,ae,ad){var ah="--",ai="\r\n",ag="";g.each(ad,function(ak,al){ag+=ah+aj+ai+'Content-Disposition: form-data; name="'+W(al.name)+'"'+ai+ai+W(al.value)+ai});g.each(af,function(ak,al){ag+=ah+aj+ai+'Content-Disposition: form-data; name="'+W(ae)+'"; filename="'+W(al.name)+'"'+ai+"Content-Type: "+W(al.type)+ai+ai+al.content+ai});ag+=ah+aj+ah+ai;return ag},l=function(ag,ah,af){var ai="----MultiPartFormBoundary"+(new Date()).getTime(),ad,ae;ah.setRequestHeader("Content-Type","multipart/form-data; boundary="+ai);ad=new b(function(){ah.sendAsBinary(N(ai,ag,G(af),Z(af)))},ag.length);for(ae=0;ae<ag.length;ae+=1){A(ag[ae],ad.complete)}},aa=function(af,ag){var ad,ae=ag.uploadedBytes,ah=ag.maxChunkSize;if(af&&typeof af.slice===f&&(ae||(ah&&ah<af.size))){ag.uploadedBytes=ae=ae||0;ad=af.slice(ae,ah||af.size-ae);ag.chunkSize=ad.size;return ad}return af},F=function(ah,ag,ae,aj,af,ad){var ai;if(!ad){if(typeof af.onSend===f&&af.onSend(ah,ag,ae,aj,af)===false){return}r.push(Array.prototype.slice.call(arguments,1))}ai=function(){var ak=aa(ag[ae],af),al;R(ag,ae,aj,af);I(ag,ae,aj,af);if(!af.multipart){if(aj.upload){aj.send(ak)}else{g.error("Browser does not support XHR file uploads")}}else{al=(typeof ae==="number")?[ak]:ag;if(typeof FormData!==e){ac(al,aj,af)}else{if(typeof FileReader!==e&&typeof aj.sendAsBinary===f){l(al,aj,af)}else{g.error("Browser does not support multipart/form-data XHR file uploads")}}}};if(!ad&&af.sequentialUploads){Q.push(ai)}else{ai()}},H=function(ai,ah,ae,ag,af){var aj=new XMLHttpRequest(),ad=g.extend({},V);ad.fileInput=ae;ad.uploadForm=ag;if(typeof ad.initUpload===f){ad.initUpload(ai,ah,af,aj,ad,function(){F(ai,ah,af,aj,ad)})}else{F(ai,ah,af,aj,ad)}},U=function(ah,ag,ad,af){var ae;ag=Array.prototype.slice.call(ag,0);if(V.multiFileRequest&&V.multipart&&ag.length){H(ah,ag,ad,af)}else{for(ae=0;ae<ag.length;ae+=1){H(ah,ag,ad,af,ae)}}},v=function(aj,ai,ae,ag,af){var ah=ai[ae].size?ai[ae].size:1,ad=O(true,ah,ah);af.progressLoaded=ah;u(ad,ai,ae,ag,af)},M=function(ad,af,ae){var ag=Z(ae);af.find(":input").not(":disabled").attr("disabled",true).addClass(ae.namespace+"_disabled");g.each(ag,function(ah,ai){g('<input type="hidden"/>').attr("name",ai.name).val(ai.value).addClass(ae.namespace+"_form_data").appendTo(af)});ad.attr("name",G(ae)).appendTo(af)},K=function(ad,af,ae){ad.detach();af.find("."+ae.namespace+"_disabled").removeAttr("disabled").removeClass(ae.namespace+"_disabled");af.find("."+ae.namespace+"_form_data").remove()},m=function(ai,ah,ad,ag,af,ae){var aj;if(typeof ae.onSend===f&&ae.onSend(ai,ah,0,af,ae)===false){return}r.push([ah,0,af,ae]);aj=function(){var ak=ag.attr("action"),am=ag.attr("method"),al=ag.attr("target");af.unbind("abort").bind("abort",function(an){af.readyState=0;af.unbind("load").attr("src","javascript".concat(":false;"));v(an,ah,0,af,ae);if(typeof ae.onAbort===f){ae.onAbort(an,ah,0,af,ae)}r.complete();Q.next()}).unbind("load").bind("load",function(an){af.readyState=4;v(an,ah,0,af,ae);if(typeof ae.onLoad===f){ae.onLoad(an,ah,0,af,ae)}r.complete();Q.next();g('<iframe src="javascript:false;" style="display:none"></iframe>').appendTo(ag).remove()});ag.attr("action",Y(ae)).attr("method",D(ae)).attr("target",af.attr("name"));M(ad,ag,ae);af.readyState=2;ag.get(0).submit();K(ad,ag,ae);ag.attr("action",ak).attr("method",am).attr("target",al)};if(ae.sequentialUploads){Q.push(aj)}else{aj()}},y=function(ai,ae,ah){var af=g('<iframe src="javascript:false;" style="display:none" name="iframe_'+V.namespace+"_"+(new Date()).getTime()+'"></iframe>'),ad=g.extend({},V),ag=ai.target.files;ag=ag?Array.prototype.slice.call(ag,0):[{name:ae.val(),type:null,size:null}];ad.fileInput=ae;ad.uploadForm=ah;af.readyState=0;af.abort=function(){af.trigger("abort")};af.bind("load",function(){af.unbind("load");if(typeof ad.initUpload===f){ad.initUpload(ai,ag,0,af,ad,function(){m(ai,ag,ae,ah,af,ad)})}else{m(ai,ag,ae,ah,af,ad)}}).appendTo(ah)},w=function(){ab=(L.is("form")?L:L.find("form")).filter(V.uploadFormFilter)},n=function(){S=(ab.length?ab:L).find("input:file").filter(V.fileInputFilter)},B=function(ad){var ae=ad.clone(true);g("<form/>").append(ae).get(0).reset();ad.after(ae).detach();n()};this.onDocumentDragOver=function(ad){if(typeof V.onDocumentDragOver===f&&V.onDocumentDragOver(ad)===false){return false}ad.preventDefault()};this.onDocumentDrop=function(ad){if(typeof V.onDocumentDrop===f&&V.onDocumentDrop(ad)===false){return false}ad.preventDefault()};this.onDragOver=function(ae){if(typeof V.onDragOver===f&&V.onDragOver(ae)===false){return false}var ad=ae.originalEvent.dataTransfer;if(ad&&ad.files){ad.dropEffect=ad.effectAllowed="copy";ae.preventDefault()}};this.onDrop=function(ae){if(typeof V.onDrop===f&&V.onDrop(ae)===false){return false}var ad=ae.originalEvent.dataTransfer;if(ad&&ad.files&&o()){U(ae,ad.files)}ae.preventDefault()};this.onChange=function(af){if(typeof V.onChange===f&&V.onChange(af)===false){return false}var ad=g(af.target),ae=g(af.target.form);if(ae.length===1){ad.data(c+"_form",ae);B(ad)}else{ae=ad.data(c+"_form")}if(!V.forceIframeUpload&&af.target.files&&o()){U(af,af.target.files,ad,ae)}else{y(af,ad,ae)}};this.init=function(ad){if(ad){g.extend(V,ad);C=ad}w();n();if(L.data(V.namespace)){g.error('FileUpload with namespace "'+V.namespace+'" already assigned to this element');return}L.data(V.namespace,J).addClass(V.cssClass);V.dropZone.not(L).addClass(V.cssClass);p()};this.options=function(af){var ah,ae,ag,ad;if(typeof af===e){return g.extend({},V)}if(C){g.extend(C,af)}z();g.each(af,function(ai,aj){switch(ai){case"namespace":g.error("The FileUpload namespace cannot be updated.");return;case"uploadFormFilter":ag=true;ad=true;break;case"fileInputFilter":ad=true;break;case"cssClass":ah=V.cssClass;break;case"dropZone":ae=V.dropZone;break}V[ai]=aj});if(ag){w()}if(ad){n()}if(typeof ah!==e){L.removeClass(ah).addClass(V.cssClass);(ae?ae:V.dropZone).not(L).removeClass(ah);V.dropZone.not(L).addClass(V.cssClass)}else{if(ae){ae.not(L).removeClass(V.cssClass);V.dropZone.not(L).addClass(V.cssClass)}}p()};this.option=function(ae,af){var ad;if(typeof af===e){return V[ae]}ad={};ad[ae]=af;J.options(ad)};this.destroy=function(){z();L.removeData(V.namespace).removeClass(V.cssClass);V.dropZone.not(L).removeClass(V.cssClass)};this.upload=function(ad){if(typeof ad.length===e){ad=[ad]}U(null,ad)}};d={init:function(j){return this.each(function(){(new a(g(this))).init(j)})},option:function(m,n,l){l=l?l:c;var j=g(this).data(l);if(j){if(!m){return j.options()}else{if(typeof m==="string"&&typeof n===e){return j.option(m)}}}else{g.error('No FileUpload with namespace "'+l+'" assigned to this element')}return this.each(function(){var o=g(this).data(l);if(o){if(typeof m==="string"){o.option(m,n)}else{o.options(m)}}else{g.error('No FileUpload with namespace "'+l+'" assigned to this element')}})},destroy:function(j){j=j?j:c;return this.each(function(){var l=g(this).data(j);if(l){l.destroy()}else{g.error('No FileUpload with namespace "'+j+'" assigned to this element')}})},upload:function(l,j){j=j?j:c;return this.each(function(){var m=g(this).data(j);if(m){m.upload(l)}else{g.error('No FileUpload with namespace "'+j+'" assigned to this element')}})}};g.fn.fileUpload=function(j){if(d[j]){return d[j].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof j==="object"||!j){return d.init.apply(this,arguments)}else{g.error('Method "'+j+'" does not exist on jQuery.fileUpload')}}}}(jQuery));(function(f){var c="undefined",d="function",e,b,a=function(j){var g=0,h=[];this.complete=function(){g+=1;if(g===h.length+1){j(h);g=0;h=[]}};this.push=function(l){h.push(l)};this.getList=function(){return h}};e=function(j,m){var h=this,l,n,p=new a(function(q){h.hideProgressBarAll(function(){h.resetProgressBarAll();if(typeof h.onCompleteAll===d){h.onCompleteAll(q)}})}),o=function(q){return typeof q.uploadTable===d?q.uploadTable(q):q.uploadTable},g=function(q){return typeof q.downloadTable===d?q.downloadTable(q):q.downloadTable};this.requestHeaders={Accept:"application/json, text/javascript, */*; q=0.01"};this.dropZone=j;this.imageTypes=/^image\/(gif|jpeg|png)$/;this.previewMaxWidth=this.previewMaxHeight=80;this.previewLoadDelay=100;this.previewAsCanvas=true;this.previewSelector=".file_upload_preview";this.progressSelector=".file_upload_progress div";this.cancelSelector=".file_upload_cancel button";this.cssClassSmall="file_upload_small";this.cssClassLarge="file_upload_large";this.cssClassHighlight="file_upload_highlight";this.dropEffect="highlight";this.uploadTable=this.downloadTable=null;this.buildUploadRow=this.buildDownloadRow=null;this.progressAllNode=null;this.loadImage=function(u,s,y,z,q,x){var w,r,A,v;if(q&&!q.test(u.type)){return null}r=function(B){var C=document.createElement("canvas"),D=Math.min((y||B.width)/B.width,(z||B.height)/B.height);if(D>1){D=1}B.width=parseInt(B.width*D,10);B.height=parseInt(B.height*D,10);if(x||typeof C.getContext!==d){return B}C.width=B.width;C.height=B.height;C.getContext("2d").drawImage(B,0,0,B.width,B.height);return C};w=document.createElement("img");A=typeof URL!==c?URL:typeof webkitURL!==c?webkitURL:null;if(A&&typeof A.createObjectURL===d){w.onload=function(){A.revokeObjectURL(this.src);s(r(w))};w.src=A.createObjectURL(u)}else{if(typeof FileReader!==c&&typeof FileReader.prototype.readAsDataURL===d){w.onload=function(){s(r(w))};v=new FileReader();v.onload=function(B){w.src=B.target.result};v.readAsDataURL(u)}else{s(null)}}};this.addNode=function(q,r,s){if(q&&r){r.css("display","none").appendTo(q).fadeIn(function(){if(typeof s===d){try{s()}catch(u){r.stop();throw u}}})}else{if(typeof s===d){s()}}};this.removeNode=function(q,r){if(q){q.fadeOut(function(){q.remove();if(typeof r===d){try{r()}catch(s){q.stop();throw s}}})}else{if(typeof r===d){r()}}};this.replaceNode=function(s,q,r){if(s&&q){s.fadeOut(function(){q.css("display","none");s.replaceWith(q);q.fadeIn(function(){if(typeof r===d){try{r()}catch(u){s.stop();q.stop();throw u}}})})}else{if(typeof r===d){r()}}};this.resetProgressBarAll=function(){if(h.progressbarAll){h.progressbarAll.progressbar("value",0)}};this.hideProgressBarAll=function(q){if(h.progressbarAll&&!f(o(h)).find(h.progressSelector+":visible:first").length){h.progressbarAll.fadeOut(q)}else{if(typeof q===d){q()}}};this.onAbort=function(u,s,q,v,r){r.removeNode(r.uploadRow,r.hideProgressBarAll)};this.cancelUpload=function(v,u,r,w,s){var q=w.readyState;w.abort();if(typeof q!=="number"||q<2){s.onAbort(v,u,r,w,s)}};this.initProgressBar=function(r,s){if(!r||!r.length){return null}if(typeof r.progressbar===d){return r.progressbar({value:s})}else{var q=f('<progress value="'+s+'" max="100"/>').appendTo(r);q.progressbar=function(u,v){q.attr("value",v)};return q}};this.initUploadProgress=function(r,q){if(!r.upload&&q.progressbar){q.progressbar.progressbar("value",100)}};this.onSend=function(u,s,q,v,r){r.initUploadProgress(v,r)};this.onProgressAll=function(q,r){if(h.progressbarAll&&q.lengthComputable){h.progressbarAll.progressbar("value",parseInt(q.loaded/q.total*100,10))}};this.onProgress=function(u,s,q,v,r){if(r.progressbar&&u.lengthComputable){r.progressbar.progressbar("value",parseInt(u.loaded/u.total*100,10))}};this.onLoadAll=function(q){p.complete()};this.initProgressBarAll=function(){if(!h.progressbarAll){h.progressbarAll=h.initProgressBar((typeof h.progressAllNode===d?h.progressAllNode(h):h.progressAllNode),0)}if(h.progressbarAll&&h.progressbarAll.is(":hidden")){h.progressbarAll.fadeIn()}};this.initUploadRow=function(u,s,q,w,r){var v=r.uploadRow=(typeof r.buildUploadRow===d?r.buildUploadRow(s,q,r):null);if(v){r.progressbar=r.initProgressBar(v.find(r.progressSelector),0);v.find(r.cancelSelector).click(function(x){r.cancelUpload(x,s,q,w,r);return false});v.find(r.previewSelector).each(function(){var x=f(this),y=s[q];if(y){setTimeout(function(){r.loadImage(y,function(z){r.addNode(x,f(z))},r.previewMaxWidth,r.previewMaxHeight,r.imageTypes,!r.previewAsCanvas)},r.previewLoadDelay)}})}};this.initUpload=function(u,s,q,w,r,v){r.initUploadRow(u,s,q,w,r);r.addNode(o(r),r.uploadRow,function(){if(typeof r.beforeSend===d){r.beforeSend(u,s,q,w,r,v)}else{v()}});r.initProgressBarAll()};this.parseResponse=function(q){if(typeof q.responseText!==c){return f.parseJSON(q.responseText)}else{return f.parseJSON(q.contents().text())}};this.initDownloadRow=function(w,v,r,y,u){var s,q;try{s=u.response=u.parseResponse(y);q=u.downloadRow=(typeof u.buildDownloadRow===d?u.buildDownloadRow(s,u):null)}catch(x){if(typeof u.onError===d){u.originalEvent=w;u.onError(x,v,r,y,u)}else{throw x}}};this.onLoad=function(w,v,r,y,s){var q=o(s),u=g(s),x=function(){if(typeof s.onComplete===d){s.onComplete(w,v,r,y,s)}p.complete()};p.push(Array.prototype.slice.call(arguments,1));s.initDownloadRow(w,v,r,y,s);if(q&&(!u||q.get(0)===u.get(0))){s.replaceNode(s.uploadRow,s.downloadRow,x)}else{s.removeNode(s.uploadRow,function(){s.addNode(u,s.downloadRow,x)})}};this.dropZoneEnlarge=function(){if(!n){if(typeof h.dropZone.switchClass===d){h.dropZone.switchClass(h.cssClassSmall,h.cssClassLarge)}else{h.dropZone.addClass(h.cssClassLarge);h.dropZone.removeClass(h.cssClassSmall)}n=true}};this.dropZoneReduce=function(){if(typeof h.dropZone.switchClass===d){h.dropZone.switchClass(h.cssClassLarge,h.cssClassSmall)}else{h.dropZone.addClass(h.cssClassSmall);h.dropZone.removeClass(h.cssClassLarge)}n=false};this.onDocumentDragEnter=function(q){h.dropZoneEnlarge()};this.onDocumentDragOver=function(q){if(l){clearTimeout(l)}l=setTimeout(function(){h.dropZoneReduce()},200)};this.onDragEnter=this.onDragLeave=function(q){h.dropZone.toggleClass(h.cssClassHighlight)};this.onDrop=function(q){if(l){clearTimeout(l)}if(h.dropEffect&&typeof h.dropZone.effect===d){h.dropZone.effect(h.dropEffect,function(){h.dropZone.removeClass(h.cssClassHighlight);h.dropZoneReduce()})}else{h.dropZone.removeClass(h.cssClassHighlight);h.dropZoneReduce()}};f.extend(this,m)};b={init:function(g){return this.each(function(){f(this).fileUpload(new e(f(this),g))})},option:function(h,j,g){if(!h||(typeof h==="string"&&typeof j===c)){return f(this).fileUpload("option",h,j,g)}return this.each(function(){f(this).fileUpload("option",h,j,g)})},destroy:function(g){return this.each(function(){f(this).fileUpload("destroy",g)})},upload:function(h,g){return this.each(function(){f(this).fileUpload("upload",h,g)})}};f.fn.fileUploadUI=function(g){if(b[g]){return b[g].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof g==="object"||!g){return b.init.apply(this,arguments)}else{f.error('Method "'+g+'" does not exist on jQuery.fileUploadUI')}}}}(jQuery));(function(){function log(){if(typeof(console)!="undefined"&&typeof(console.log)=="function"){Array.prototype.unshift.call(arguments,"[Ajax Upload]");console.log(Array.prototype.join.call(arguments," "))}}function addEvent(el,type,fn){if(el.addEventListener){el.addEventListener(type,fn,false)}else{if(el.attachEvent){el.attachEvent("on"+type,function(){fn.call(el)})}else{throw new Error("not supported or DOM not loaded")}}}function addResizeEvent(fn){var timeout;addEvent(window,"resize",function(){if(timeout){clearTimeout(timeout)}timeout=setTimeout(fn,100)})}if(document.documentElement.getBoundingClientRect){var getOffset=function(el){var box=el.getBoundingClientRect();var doc=el.ownerDocument;var body=doc.body;var docElem=doc.documentElement;var clientTop=docElem.clientTop||body.clientTop||0;var clientLeft=docElem.clientLeft||body.clientLeft||0;var zoom=1;if(body.getBoundingClientRect){var bound=body.getBoundingClientRect();zoom=(bound.right-bound.left)/body.clientWidth}if(zoom>1){clientTop=0;clientLeft=0}var top=box.top/zoom+(window.pageYOffset||docElem&&docElem.scrollTop/zoom||body.scrollTop/zoom)-clientTop,left=box.left/zoom+(window.pageXOffset||docElem&&docElem.scrollLeft/zoom||body.scrollLeft/zoom)-clientLeft;return{top:top,left:left}}}else{var getOffset=function(el){var top=0,left=0;do{top+=el.offsetTop||0;left+=el.offsetLeft||0;el=el.offsetParent}while(el);return{left:left,top:top}}}function getBox(el){var left,right,top,bottom;var offset=getOffset(el);left=offset.left;top=offset.top;right=left+el.offsetWidth;bottom=top+el.offsetHeight;return{left:left,right:right,top:top,bottom:bottom}}function addStyles(el,styles){for(var name in styles){if(styles.hasOwnProperty(name)){el.style[name]=styles[name]}}}function copyLayout(from,to){var box=getBox(from);addStyles(to,{position:"absolute",left:box.left+"px",top:box.top+"px",width:from.offsetWidth+"px",height:from.offsetHeight+"px"})}var toElement=(function(){var div=document.createElement("div");return function(html){div.innerHTML=html;var el=div.firstChild;return div.removeChild(el)}})();var getUID=(function(){var id=0;return function(){return"ValumsAjaxUpload"+id++}})();function fileFromPath(file){return file.replace(/.*(\/|\\)/,"")}function getExt(file){return(-1!==file.indexOf("."))?file.replace(/.*[.]/,""):""}function hasClass(el,name){var re=new RegExp("\\b"+name+"\\b");return re.test(el.className)}function addClass(el,name){if(!hasClass(el,name)){el.className+=" "+name}}function removeClass(el,name){var re=new RegExp("\\b"+name+"\\b");el.className=el.className.replace(re,"")}function removeNode(el){el.parentNode.removeChild(el)}window.AjaxUpload=function(button,options){this._settings={action:"upload.php",name:"userfile",data:{},autoSubmit:true,responseType:false,hoverClass:"hover",disabledClass:"disabled",onChange:function(file,extension){},onSubmit:function(file,extension){},onComplete:function(file,response){}};for(var i in options){if(options.hasOwnProperty(i)){this._settings[i]=options[i]}}if(button.jquery){button=button[0]}else{if(typeof button=="string"){if(/^#.*/.test(button)){button=button.slice(1)}button=document.getElementById(button)}}if(!button||button.nodeType!==1){throw new Error("Please make sure that you're passing a valid element")}if(button.nodeName.toUpperCase()=="A"){addEvent(button,"click",function(e){if(e&&e.preventDefault){e.preventDefault()}else{if(window.event){window.event.returnValue=false}}})}this._button=button;this._input=null;this._disabled=false;this.enable();this._rerouteClicks()};AjaxUpload.prototype={setData:function(data){this._settings.data=data},disable:function(){addClass(this._button,this._settings.disabledClass);this._disabled=true;var nodeName=this._button.nodeName.toUpperCase();if(nodeName=="INPUT"||nodeName=="BUTTON"){this._button.setAttribute("disabled","disabled")}if(this._input){this._input.parentNode.style.visibility="hidden"}},enable:function(){removeClass(this._button,this._settings.disabledClass);this._button.removeAttribute("disabled");this._disabled=false},_createInput:function(){var self=this;var input=document.createElement("input");input.setAttribute("type","file");input.setAttribute("name",this._settings.name);addStyles(input,{position:"absolute",right:0,margin:0,padding:0,fontSize:"480px",cursor:"pointer"});var div=document.createElement("div");addStyles(div,{display:"block",position:"absolute",overflow:"hidden",margin:0,padding:0,opacity:0,direction:"ltr",zIndex:2147483583});if(div.style.opacity!=="0"){if(typeof(div.filters)=="undefined"){throw new Error("Opacity not supported by the browser")}div.style.filter="alpha(opacity=0)"}addEvent(input,"change",function(){if(!input||input.value===""){return}var file=fileFromPath(input.value);if(false===self._settings.onChange.call(self,file,getExt(file))){self._clearInput();return}if(self._settings.autoSubmit){self.submit()}});addEvent(input,"mouseover",function(){addClass(self._button,self._settings.hoverClass)});addEvent(input,"mouseout",function(){removeClass(self._button,self._settings.hoverClass);input.parentNode.style.visibility="hidden"});div.appendChild(input);document.body.appendChild(div);this._input=input},_clearInput:function(){if(!this._input){return}removeNode(this._input.parentNode);this._input=null;this._createInput();removeClass(this._button,this._settings.hoverClass)},_rerouteClicks:function(){var self=this;addEvent(self._button,"mouseover",function(){if(self._disabled){return}if(!self._input){self._createInput()}var div=self._input.parentNode;copyLayout(self._button,div);div.style.visibility="visible"})},_createIframe:function(){var id=getUID();var iframe=toElement('<iframe src="javascript:false;" name="'+id+'" />');iframe.setAttribute("id",id);iframe.style.display="none";document.body.appendChild(iframe);return iframe},_createForm:function(iframe){var settings=this._settings;var form=toElement('<form method="post" enctype="multipart/form-data"></form>');form.setAttribute("action",settings.action);form.setAttribute("target",iframe.name);form.style.display="none";document.body.appendChild(form);for(var prop in settings.data){if(settings.data.hasOwnProperty(prop)){var el=document.createElement("input");el.setAttribute("type","hidden");el.setAttribute("name",prop);el.setAttribute("value",settings.data[prop]);form.appendChild(el)}}return form},_getResponse:function(iframe,file){var toDeleteFlag=false,self=this,settings=this._settings;addEvent(iframe,"load",function(){if(iframe.src=="javascript:'%3Chtml%3E%3C/html%3E';"||iframe.src=="javascript:'<html></html>';"){if(toDeleteFlag){setTimeout(function(){removeNode(iframe)},0)}return}var doc=iframe.contentDocument?iframe.contentDocument:window.frames[iframe.id].document;if(doc.readyState&&doc.readyState!="complete"){return}if(doc.body&&doc.body.innerHTML=="false"){return}var response;if(doc.XMLDocument){response=doc.XMLDocument}else{if(doc.body){response=doc.body.innerHTML;if(settings.responseType&&settings.responseType.toLowerCase()=="json"){if(doc.body.firstChild&&doc.body.firstChild.nodeName.toUpperCase()=="PRE"){response=doc.body.firstChild.firstChild.nodeValue}if(response){response=eval("("+response+")")}else{response={}}}}else{response=doc}}settings.onComplete.call(self,file,response);toDeleteFlag=true;iframe.src="javascript:'<html></html>';"})},submit:function(){var self=this,settings=this._settings;if(!this._input||this._input.value===""){return}var file=fileFromPath(this._input.value);if(false===settings.onSubmit.call(this,file,getExt(file))){this._clearInput();return}var iframe=this._createIframe();var form=this._createForm(iframe);removeNode(this._input.parentNode);removeClass(self._button,self._settings.hoverClass);form.appendChild(this._input);form.submit();removeNode(form);form=null;removeNode(this._input);this._input=null;this._getResponse(iframe,file);this._createInput()}}})();(function(d){var j,a;var e;var b;d.extend({pnotify_remove_all:function(){var m=e.data("pnotify");if(m&&m.length){d.each(m,function(){if(this.pnotify_remove){this.pnotify_remove()}})}},pnotify_position_all:function(){if(a){clearTimeout(a)}a=null;var m=e.data("pnotify");if(!m||!m.length){return}d.each(m,function(){var q=this.opts.pnotify_stack;if(!q){return}if(!q.nextpos1){q.nextpos1=q.firstpos1}if(!q.nextpos2){q.nextpos2=q.firstpos2}if(!q.addpos2){q.addpos2=0}if(this.css("display")!="none"){var u,r;var n={};var p;switch(q.dir1){case"down":p="top";break;case"up":p="bottom";break;case"left":p="right";break;case"right":p="left";break}u=parseInt(this.css(p));if(isNaN(u)){u=0}if(typeof q.firstpos1=="undefined"){q.firstpos1=u;q.nextpos1=q.firstpos1}var o;switch(q.dir2){case"down":o="top";break;case"up":o="bottom";break;case"left":o="right";break;case"right":o="left";break}r=parseInt(this.css(o));if(isNaN(r)){r=0}if(typeof q.firstpos2=="undefined"){q.firstpos2=r;q.nextpos2=q.firstpos2}if((q.dir1=="down"&&q.nextpos1+this.height()>b.height())||(q.dir1=="up"&&q.nextpos1+this.height()>b.height())||(q.dir1=="left"&&q.nextpos1+this.width()>b.width())||(q.dir1=="right"&&q.nextpos1+this.width()>b.width())){q.nextpos1=q.firstpos1;q.nextpos2+=q.addpos2+10;q.addpos2=0}if(q.animation&&q.nextpos2<r){switch(q.dir2){case"down":n.top=q.nextpos2+"px";break;case"up":n.bottom=q.nextpos2+"px";break;case"left":n.right=q.nextpos2+"px";break;case"right":n.left=q.nextpos2+"px";break}}else{this.css(o,q.nextpos2+"px")}switch(q.dir2){case"down":case"up":if(this.outerHeight(true)>q.addpos2){q.addpos2=this.height()}break;case"left":case"right":if(this.outerWidth(true)>q.addpos2){q.addpos2=this.width()}break}if(q.nextpos1){if(q.animation&&(u>q.nextpos1||n.top||n.bottom||n.right||n.left)){switch(q.dir1){case"down":n.top=q.nextpos1+"px";break;case"up":n.bottom=q.nextpos1+"px";break;case"left":n.right=q.nextpos1+"px";break;case"right":n.left=q.nextpos1+"px";break}}else{this.css(p,q.nextpos1+"px")}}if(n.top||n.bottom||n.right||n.left){this.animate(n,{duration:500,queue:false})}switch(q.dir1){case"down":case"up":q.nextpos1+=this.height()+10;break;case"left":case"right":q.nextpos1+=this.width()+10;break}}});d.each(m,function(){var n=this.opts.pnotify_stack;if(!n){return}n.nextpos1=n.firstpos1;n.nextpos2=n.firstpos2;n.addpos2=0;n.animation=true})},pnotify:function(u){if(!e){e=d("body")}if(!b){b=d(window)}var v;var m;if(typeof u!="object"){m=d.extend({},d.pnotify.defaults);m.pnotify_text=u}else{m=d.extend({},d.pnotify.defaults,u)}if(m.pnotify_before_init){if(m.pnotify_before_init(m)===false){return null}}var n;var o=function(A,x){q.css("display","none");var w=document.elementFromPoint(A.clientX,A.clientY);q.css("display","block");var z=d(w);var y=z.css("cursor");q.css("cursor",y!="auto"?y:"default");if(!n||n.get(0)!=w){if(n){f.call(n.get(0),"mouseleave",A.originalEvent);f.call(n.get(0),"mouseout",A.originalEvent)}f.call(w,"mouseenter",A.originalEvent);f.call(w,"mouseover",A.originalEvent)}f.call(w,x,A.originalEvent);n=z};var q=d("<div />",{"class":"ui-pnotify "+m.pnotify_addclass,css:{display:"none"},mouseenter:function(w){if(m.pnotify_nonblock){w.stopPropagation()}if(m.pnotify_mouse_reset&&v=="out"){q.stop(true);v="in";q.css("height","auto").animate({width:m.pnotify_width,opacity:m.pnotify_nonblock?m.pnotify_nonblock_opacity:m.pnotify_opacity},"fast")}if(m.pnotify_nonblock){q.animate({opacity:m.pnotify_nonblock_opacity},"fast")}if(m.pnotify_hide&&m.pnotify_mouse_reset){q.pnotify_cancel_remove()}if(m.pnotify_closer&&!m.pnotify_nonblock){q.closer.show()}},mouseleave:function(w){if(m.pnotify_nonblock){w.stopPropagation()}n=null;q.css("cursor","auto");if(m.pnotify_nonblock&&v!="out"){q.animate({opacity:m.pnotify_opacity},"fast")}if(m.pnotify_hide&&m.pnotify_mouse_reset){q.pnotify_queue_remove()}q.closer.hide();d.pnotify_position_all()},mouseover:function(w){if(m.pnotify_nonblock){w.stopPropagation()}},mouseout:function(w){if(m.pnotify_nonblock){w.stopPropagation()}},mousemove:function(w){if(m.pnotify_nonblock){w.stopPropagation();o(w,"onmousemove")}},mousedown:function(w){if(m.pnotify_nonblock){w.stopPropagation();w.preventDefault();o(w,"onmousedown")}},mouseup:function(w){if(m.pnotify_nonblock){w.stopPropagation();w.preventDefault();o(w,"onmouseup")}},click:function(w){if(m.pnotify_nonblock){w.stopPropagation();o(w,"onclick")}},dblclick:function(w){if(m.pnotify_nonblock){w.stopPropagation();o(w,"ondblclick")}}});q.opts=m;if(m.pnotify_shadow&&!d.browser.msie){q.shadow_container=d("<div />",{"class":"ui-widget-shadow ui-corner-all ui-pnotify-shadow"}).prependTo(q)}q.container=d("<div />",{"class":"ui-widget ui-widget-content ui-corner-all ui-pnotify-container "+(m.pnotify_type=="error"?"ui-state-error":"ui-state-highlight")}).appendTo(q);q.pnotify_version="1.0.1";q.pnotify=function(w){var x=m;if(typeof w=="string"){m.pnotify_text=w}else{m=d.extend({},m,w)}q.opts=m;if(m.pnotify_shadow!=x.pnotify_shadow){if(m.pnotify_shadow&&!d.browser.msie){q.shadow_container=d("<div />",{"class":"ui-widget-shadow ui-pnotify-shadow"}).prependTo(q)}else{q.children(".ui-pnotify-shadow").remove()}}if(m.pnotify_addclass===false){q.removeClass(x.pnotify_addclass)}else{if(m.pnotify_addclass!==x.pnotify_addclass){q.removeClass(x.pnotify_addclass).addClass(m.pnotify_addclass)}}if(m.pnotify_title===false){q.title_container.hide("fast")}else{if(m.pnotify_title!==x.pnotify_title){q.title_container.html(m.pnotify_title).show(200)}}if(m.pnotify_text===false){q.text_container.hide("fast")}else{if(m.pnotify_text!==x.pnotify_text){if(m.pnotify_insert_brs){m.pnotify_text=m.pnotify_text.replace(/\n/g,"<br />")}q.text_container.html(m.pnotify_text).show(200)}}q.pnotify_history=m.pnotify_history;if(m.pnotify_type!=x.pnotify_type){q.container.toggleClass("ui-state-error ui-state-highlight")}if((m.pnotify_notice_icon!=x.pnotify_notice_icon&&m.pnotify_type=="notice")||(m.pnotify_error_icon!=x.pnotify_error_icon&&m.pnotify_type=="error")||(m.pnotify_type!=x.pnotify_type)){q.container.find("div.ui-pnotify-icon").remove();if((m.pnotify_error_icon&&m.pnotify_type=="error")||(m.pnotify_notice_icon)){d("<div />",{"class":"ui-pnotify-icon"}).append(d("<span />",{"class":m.pnotify_type=="error"?m.pnotify_error_icon:m.pnotify_notice_icon})).prependTo(q.container)}}if(m.pnotify_width!==x.pnotify_width){q.animate({width:m.pnotify_width})}if(m.pnotify_min_height!==x.pnotify_min_height){q.container.animate({minHeight:m.pnotify_min_height})}if(m.pnotify_opacity!==x.pnotify_opacity){q.fadeTo(m.pnotify_animate_speed,m.pnotify_opacity)}if(!m.pnotify_hide){q.pnotify_cancel_remove()}else{if(!x.pnotify_hide){q.pnotify_queue_remove()}}q.pnotify_queue_position();return q};q.pnotify_queue_position=function(){if(a){clearTimeout(a)}a=setTimeout(d.pnotify_position_all,10)};q.pnotify_display=function(){if(!q.parent().length){q.appendTo(e)}if(m.pnotify_before_open){if(m.pnotify_before_open(q)===false){return}}q.pnotify_queue_position();if(m.pnotify_animation=="fade"||m.pnotify_animation.effect_in=="fade"){q.show().fadeTo(0,0).hide()}else{if(m.pnotify_opacity!=1){q.show().fadeTo(0,m.pnotify_opacity).hide()}}q.animate_in(function(){if(m.pnotify_after_open){m.pnotify_after_open(q)}q.pnotify_queue_position();if(m.pnotify_hide){q.pnotify_queue_remove()}})};q.pnotify_remove=function(){if(q.timer){window.clearTimeout(q.timer);q.timer=null}if(m.pnotify_before_close){if(m.pnotify_before_close(q)===false){return}}q.animate_out(function(){if(m.pnotify_after_close){if(m.pnotify_after_close(q)===false){return}}q.pnotify_queue_position();if(m.pnotify_remove){q.detach()}})};q.animate_in=function(x){v="in";var w;if(typeof m.pnotify_animation.effect_in!="undefined"){w=m.pnotify_animation.effect_in}else{w=m.pnotify_animation}if(w=="none"){q.show();x()}else{if(w=="show"){q.show(m.pnotify_animate_speed,x)}else{if(w=="fade"){q.show().fadeTo(m.pnotify_animate_speed,m.pnotify_opacity,x)}else{if(w=="slide"){q.slideDown(m.pnotify_animate_speed,x)}else{if(typeof w=="function"){w("in",x,q)}else{if(q.effect){q.effect(w,{},m.pnotify_animate_speed,x)}}}}}}};q.animate_out=function(x){v="out";var w;if(typeof m.pnotify_animation.effect_out!="undefined"){w=m.pnotify_animation.effect_out}else{w=m.pnotify_animation}if(w=="none"){q.hide();x()}else{if(w=="show"){q.hide(m.pnotify_animate_speed,x)}else{if(w=="fade"){q.fadeOut(m.pnotify_animate_speed,x)}else{if(w=="slide"){q.slideUp(m.pnotify_animate_speed,x)}else{if(typeof w=="function"){w("out",x,q)}else{if(q.effect){q.effect(w,{},m.pnotify_animate_speed,x)}}}}}}};q.pnotify_cancel_remove=function(){if(q.timer){window.clearTimeout(q.timer)}};q.pnotify_queue_remove=function(){q.pnotify_cancel_remove();q.timer=window.setTimeout(function(){q.pnotify_remove()},(isNaN(m.pnotify_delay)?0:m.pnotify_delay))};q.closer=d("<div />",{"class":"ui-pnotify-closer",css:{cursor:"pointer",display:"none"},click:function(){q.pnotify_remove();q.closer.hide()}}).append(d("<span />",{"class":"ui-icon ui-icon-circle-close"})).appendTo(q.container);if((m.pnotify_error_icon&&m.pnotify_type=="error")||(m.pnotify_notice_icon)){d("<div />",{"class":"ui-pnotify-icon"}).append(d("<span />",{"class":m.pnotify_type=="error"?m.pnotify_error_icon:m.pnotify_notice_icon})).appendTo(q.container)}q.title_container=d("<div />",{"class":"ui-pnotify-title",html:m.pnotify_title}).appendTo(q.container);if(m.pnotify_title===false){q.title_container.hide()}if(m.pnotify_insert_brs&&typeof m.pnotify_text=="string"){m.pnotify_text=m.pnotify_text.replace(/\n/g,"<br />")}q.text_container=d("<div />",{"class":"ui-pnotify-text",html:m.pnotify_text}).appendTo(q.container);if(m.pnotify_text===false){q.text_container.hide()}if(typeof m.pnotify_width=="string"){q.css("width",m.pnotify_width)}if(typeof m.pnotify_min_height=="string"){q.container.css("min-height",m.pnotify_min_height)}q.pnotify_history=m.pnotify_history;var s=e.data("pnotify");if(s==null||typeof s!="object"){s=[]}if(m.pnotify_stack.push=="top"){s=d.merge([q],s)}else{s=d.merge(s,[q])}e.data("pnotify",s);if(m.pnotify_after_init){m.pnotify_after_init(q)}if(m.pnotify_history){var r=e.data("pnotify_history");if(typeof r=="undefined"){r=d("<div />",{"class":"ui-pnotify-history-container ui-state-default ui-corner-bottom",mouseleave:function(){r.animate({top:"-"+j+"px"},{duration:100,queue:false})}}).append(d("<div />",{"class":"ui-pnotify-history-header",text:"Redisplay"})).append(d("<button />",{"class":"ui-pnotify-history-all ui-state-default ui-corner-all",text:"All",mouseenter:function(){d(this).addClass("ui-state-hover")},mouseleave:function(){d(this).removeClass("ui-state-hover")},click:function(){d.each(s,function(){if(this.pnotify_history&&this.pnotify_display){this.pnotify_display()}});return false}})).append(d("<button />",{"class":"ui-pnotify-history-last ui-state-default ui-corner-all",text:"Last",mouseenter:function(){d(this).addClass("ui-state-hover")},mouseleave:function(){d(this).removeClass("ui-state-hover")},click:function(){var w=1;while(!s[s.length-w]||!s[s.length-w].pnotify_history||s[s.length-w].is(":visible")){if(s.length-w===0){return false}w++}var x=s[s.length-w];if(x.pnotify_display){x.pnotify_display()}return false}})).appendTo(e);var p=d("<span />",{"class":"ui-pnotify-history-pulldown ui-icon ui-icon-grip-dotted-horizontal",mouseenter:function(){r.animate({top:"0"},{duration:100,queue:false})}}).appendTo(r);j=p.offset().top+2;r.css({top:"-"+j+"px"});e.data("pnotify_history",r)}}m.pnotify_stack.animation=false;q.pnotify_display();return q}});var l=/^on/;var c=/^(dbl)?click$|^mouse(move|down|up|over|out|enter|leave)$|^contextmenu$/;var h=/^(focus|blur|select|change|reset)$|^key(press|down|up)$/;var g=/^(scroll|resize|(un)?load|abort|error)$/;var f=function(n,m){var o;n=n.toLowerCase();if(document.createEvent&&this.dispatchEvent){n=n.replace(l,"");if(n.match(c)){d(this).offset();o=document.createEvent("MouseEvents");o.initMouseEvent(n,m.bubbles,m.cancelable,m.view,m.detail,m.screenX,m.screenY,m.clientX,m.clientY,m.ctrlKey,m.altKey,m.shiftKey,m.metaKey,m.button,m.relatedTarget)}else{if(n.match(h)){o=document.createEvent("UIEvents");o.initUIEvent(n,m.bubbles,m.cancelable,m.view,m.detail)}else{if(n.match(g)){o=document.createEvent("HTMLEvents");o.initEvent(n,m.bubbles,m.cancelable)}}}if(!o){return}this.dispatchEvent(o)}else{if(!n.match(l)){n="on"+n}o=document.createEventObject(m);this.fireEvent(n,o)}};d.pnotify.defaults={pnotify_title:false,pnotify_text:false,pnotify_addclass:"",pnotify_nonblock:false,pnotify_nonblock_opacity:0.2,pnotify_history:false,pnotify_width:"300px",pnotify_min_height:"16px",pnotify_type:"notice",pnotify_notice_icon:"ui-icon ui-icon-info",pnotify_error_icon:"ui-icon ui-icon-alert",pnotify_animation:"fade",pnotify_animate_speed:"slow",pnotify_opacity:1,pnotify_shadow:false,pnotify_closer:true,pnotify_hide:true,pnotify_delay:20000,pnotify_mouse_reset:true,pnotify_remove:true,pnotify_insert_brs:true,pnotify_stack:{dir1:"down",dir2:"left",push:"bottom"}}})(jQuery);(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var c=a.data(this[0],"validator");if(c){return c}c=new a.validator(b,this[0]);a.data(this[0],"validator",c);if(c.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){c.cancelSubmit=true});if(c.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){c.submitButton=this})}this.submit(function(d){if(c.settings.debug){d.preventDefault()}function e(){if(c.settings.submitHandler){if(c.submitButton){var f=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm)}c.settings.submitHandler.call(c,c.currentForm);if(c.submitButton){f.remove()}return false}return true}if(c.cancelSubmit){c.cancelSubmit=false;return e()}if(c.form()){if(c.pendingRequest){c.formSubmitted=true;return false}return e()}else{c.focusInvalid();return false}})}return c},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var c=true;var b=a(this[0].form).validate();this.each(function(){c&=b.element(this)});return c}},removeAttrs:function(d){var b={},c=this;a.each(d.split(/\s/),function(e,f){b[f]=c.attr(f);c.removeAttr(f)});return b},rules:function(e,b){var g=this[0];if(e){var d=a.data(g.form,"validator").settings;var j=d.rules;var l=a.validator.staticRules(g);switch(e){case"add":a.extend(l,a.validator.normalizeRule(b));j[g.name]=l;if(b.messages){d.messages[g.name]=a.extend(d.messages[g.name],b.messages)}break;case"remove":if(!b){delete j[g.name];return l}var h={};a.each(b.split(/\s/),function(m,n){h[n]=l[n];delete l[n]});return h}}var f=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(g),a.validator.classRules(g),a.validator.attributeRules(g),a.validator.staticRules(g)),g);if(f.required){var c=f.required;delete f.required;f=a.extend({required:c},f)}return f}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(""+b.value)},filled:function(b){return !!a.trim(""+b.value)},unchecked:function(b){return !b.checked}});a.validator=function(b,c){this.settings=a.extend(true,{},a.validator.defaults,b);this.currentForm=c;this.init()};a.validator.format=function(b,c){if(arguments.length==1){return function(){var d=a.makeArray(arguments);d.unshift(b);return a.validator.format.apply(this,d)}}if(arguments.length>2&&c.constructor!=Array){c=a.makeArray(arguments).slice(1)}if(c.constructor!=Array){c=[c]}a.each(c,function(d,e){b=b.replace(new RegExp("\\{"+d+"\\}","g"),e)});return b};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(b)).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)}},onclick:function(b){if(b.name in this.submitted){this.element(b)}else{if(b.parentNode.name in this.submitted){this.element(b.parentNode)}}},highlight:function(d,b,c){a(d).addClass(b).removeClass(c)},unhighlight:function(d,b,c){a(d).removeClass(b).addClass(c)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=(this.groups={});a.each(this.settings.groups,function(e,f){a.each(f.split(/\s/),function(h,g){b[g]=e})});var d=this.settings.rules;a.each(d,function(e,f){d[e]=a.validator.normalizeRule(f)});function c(g){var f=a.data(this[0].form,"validator"),e="on"+g.type.replace(/^validate/,"");f.settings[e]&&f.settings[e].call(f,this[0])}a(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",c).validateDelegate(":radio, :checkbox, select, option","click",c);if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var b=0,c=(this.currentElements=this.elements());c[b];b++){this.check(c[b])}return this.valid()},element:function(c){c=this.clean(c);this.lastElement=c;this.prepareElement(c);this.currentElements=a(c);var b=this.check(c);if(b){delete this.invalid[c.name]}else{this.invalid[c.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return b},showErrors:function(c){if(c){a.extend(this.errorMap,c);this.errorList=[];for(var b in c){this.errorList.push({message:c[b],element:this.findByName(b)[0]})}this.successList=a.grep(this.successList,function(d){return !(d.name in c)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(d){var c=0;for(var b in d){c++}return c},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(c){return c.element.name==b.name}).length==1&&b},elements:function(){var c=this,b={};return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&c.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!c.objectLength(a(this).rules())){return false}b[this.name]=true;return true})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(c){c=this.clean(c);if(this.checkable(c)){c=this.findByName(c.name).not(this.settings.ignore)[0]}var h=a(c).rules();var d=false;for(var j in h){var g={method:j,parameters:h[j]};try{var b=a.validator.methods[j].call(this,c.value.replace(/\r/g,""),c,g.parameters);if(b=="dependency-mismatch"){d=true;continue}d=false;if(b=="pending"){this.toHide=this.toHide.not(this.errorsFor(c));return}if(!b){this.formatAndAdd(c,g);return false}}catch(f){this.settings.debug&&window.console&&console.log("exception occured when checking element "+c.id+", check the '"+g.method+"' method",f);throw f}}if(d){return}if(this.objectLength(h)){this.successList.push(c)}return true},customMetaMessage:function(b,d){if(!a.metadata){return}var c=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return c&&c.messages&&c.messages[d]},customMessage:function(c,d){var b=this.settings.messages[c];return b&&(b.constructor==String?b:b[d])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}return undefined},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customMetaMessage(b,c),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(c,e){var d=this.defaultMessage(c,e.method),b=/\$?\{(\d+)\}/g;if(typeof d=="function"){d=d.call(this,e.parameters,c)}else{if(b.test(d)){d=jQuery.format(d.replace(b,"{$1}"),e.parameters)}}this.errorList.push({message:d,element:c});this.errorMap[c.name]=d;this.submitted[c.name]=d},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))}return b},defaultShowErrors:function(){for(var c=0;this.errorList[c];c++){var b=this.errorList[c];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var c=0;this.successList[c];c++){this.showLabel(this.successList[c])}}if(this.settings.unhighlight){for(var c=0,d=this.validElements();d[c];c++){this.settings.unhighlight.call(this,d[c],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(c,d){var b=this.errorsFor(c);if(b.length){b.removeClass().addClass(this.settings.errorClass);b.attr("generated")&&b.html(d)}else{b=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(c),generated:true}).addClass(this.settings.errorClass).html(d||"");if(this.settings.wrapper){b=b.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(b).length){this.settings.errorPlacement?this.settings.errorPlacement(b,a(c)):b.insertAfter(c)}}if(!d&&this.settings.success){b.text("");typeof this.settings.success=="string"?b.addClass(this.settings.success):this.settings.success(b)}this.toShow=this.toShow.add(b)},errorsFor:function(c){var b=this.idOrName(c);return this.errors().filter(function(){return a(this).attr("for")==b})},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(b){var c=this.currentForm;return a(document.getElementsByName(b)).map(function(d,e){return e.form==c&&e.name==b&&e||null})},getLength:function(c,b){switch(b.nodeName.toLowerCase()){case"select":return a("option:selected",b).length;case"input":if(this.checkable(b)){return this.findByName(b.name).filter(":checked").length}}return c.length},depend:function(c,b){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,b):true},dependTypes:{"boolean":function(c,b){return c},string:function(c,b){return !!a(c,b.form).length},"function":function(c,b){return c(b)}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(b,c){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[b.name];if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit();this.formSubmitted=false}else{if(!c&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,c){b.constructor==String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(c){var d={};var b=a(c).attr("class");b&&a.each(b.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(d,a.validator.classRuleSettings[this])}});return d},attributeRules:function(c){var e={};var b=a(c);for(var f in a.validator.methods){var d=b.attr(f);if(d){e[f]=d}}if(e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)){delete e.maxlength}return e},metadataRules:function(b){if(!a.metadata){return{}}var c=a.data(b.form,"validator").settings.meta;return c?a(b).metadata()[c]:a(b).metadata()},staticRules:function(c){var d={};var b=a.data(c.form,"validator");if(b.settings.rules){d=a.validator.normalizeRule(b.settings.rules[c.name])||{}}return d},normalizeRules:function(c,b){a.each(c,function(f,e){if(e===false){delete c[f];return}if(e.param||e.depends){var d=true;switch(typeof e.depends){case"string":d=!!a(e.depends,b.form).length;break;case"function":d=e.depends.call(b,b);break}if(d){c[f]=e.param!==undefined?e.param:true}else{delete c[f]}}});a.each(c,function(d,e){c[d]=a.isFunction(e)?e(b):e});a.each(["minlength","maxlength","min","max"],function(){if(c[this]){c[this]=Number(c[this])}});a.each(["rangelength","range"],function(){if(c[this]){c[this]=[Number(c[this][0]),Number(c[this][1])]}});if(a.validator.autoCreateRanges){if(c.min&&c.max){c.range=[c.min,c.max];delete c.min;delete c.max}if(c.minlength&&c.maxlength){c.rangelength=[c.minlength,c.maxlength];delete c.minlength;delete c.maxlength}}if(c.messages){delete c.messages}return c},normalizeRule:function(c){if(typeof c=="string"){var b={};a.each(c.split(/\s/),function(){b[this]=true});c=b}return c},addMethod:function(b,d,c){a.validator.methods[b]=d;a.validator.messages[b]=c!=undefined?c:a.validator.messages[b];if(d.length<3){a.validator.addClassRules(b,a.validator.normalizeRule(b))}},methods:{required:function(c,b,e){if(!this.depend(e,b)){return"dependency-mismatch"}switch(b.nodeName.toLowerCase()){case"select":var d=a(b).val();return d&&d.length>0;case"input":if(this.checkable(b)){return this.getLength(c,b)>0}default:return a.trim(c).length>0}},remote:function(f,c,g){if(this.optional(c)){return"dependency-mismatch"}var d=this.previousValue(c);if(!this.settings.messages[c.name]){this.settings.messages[c.name]={}}d.originalMessage=this.settings.messages[c.name].remote;this.settings.messages[c.name].remote=d.message;g=typeof g=="string"&&{url:g}||g;if(this.pending[c.name]){return"pending"}if(d.old===f){return d.valid}d.old=f;var b=this;this.startRequest(c);var e={};e[c.name]=f;a.ajax(a.extend(true,{url:g,mode:"abort",port:"validate"+c.name,dataType:"json",data:e,success:function(j){b.settings.messages[c.name].remote=d.originalMessage;var m=j===true;if(m){var h=b.formSubmitted;b.prepareElement(c);b.formSubmitted=h;b.successList.push(c);b.showErrors()}else{var n={};var l=j||b.defaultMessage(c,"remote");n[c.name]=d.message=a.isFunction(l)?l(f):l;b.showErrors(n)}d.valid=m;b.stopRequest(c,m)}},g));return"pending"},minlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)>=d},maxlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)<=d},rangelength:function(d,b,e){var c=this.getLength(a.trim(d),b);return this.optional(b)||(c>=e[0]&&c<=e[1])},min:function(c,b,d){return this.optional(b)||c>=d},max:function(c,b,d){return this.optional(b)||c<=d},range:function(c,b,d){return this.optional(b)||(c>=d[0]&&c<=d[1])},email:function(c,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(c)},url:function(c,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)},date:function(c,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(c))},dateISO:function(c,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)},number:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(c)},digits:function(c,b){return this.optional(b)||/^\d+$/.test(c)},creditcard:function(f,c){if(this.optional(c)){return"dependency-mismatch"}if(/[^0-9-]+/.test(f)){return false}var g=0,e=0,b=false;f=f.replace(/\D/g,"");for(var h=f.length-1;h>=0;h--){var d=f.charAt(h);var e=parseInt(d,10);if(b){if((e*=2)>9){e-=9}}g+=e;b=!b}return(g%10)==0},accept:function(c,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||c.match(new RegExp(".("+d+")$","i"))},equalTo:function(c,b,e){var d=a(e).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(b).valid()});return c==d.val()}}});a.format=a.validator.format})(jQuery);(function(c){var a={};if(c.ajaxPrefilter){c.ajaxPrefilter(function(f,e,g){var d=f.port;if(f.mode=="abort"){if(a[d]){a[d].abort()}a[d]=g}})}else{var b=c.ajax;c.ajax=function(e){var f=("mode" in e?e:c.ajaxSettings).mode,d=("port" in e?e:c.ajaxSettings).port;if(f=="abort"){if(a[d]){a[d].abort()}return(a[d]=b.apply(this,arguments))}return b.apply(this,arguments)}}})(jQuery);(function(a){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener){a.each({focus:"focusin",blur:"focusout"},function(c,b){a.event.special[b]={setup:function(){this.addEventListener(c,d,true)},teardown:function(){this.removeEventListener(c,d,true)},handler:function(f){arguments[0]=a.event.fix(f);arguments[0].type=b;return a.event.handle.apply(this,arguments)}};function d(f){f=a.event.fix(f);f.type=b;return a.event.handle.call(this,f)}})}a.extend(a.fn,{validateDelegate:function(d,c,b){return this.bind(c,function(e){var f=a(e.target);if(f.is(d)){return b.apply(f,arguments)}})}})})(jQuery);(function($){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(type,name){this.defaults.type=type;this.defaults.name=name},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length){settings.single="metadata"}var data=$.data(elem,settings.single);if(data){return data}data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m){data=m[1]}}else{if(settings.type=="elem"){if(!elem.getElementsByTagName){return undefined}var e=elem.getElementsByTagName(settings.name);if(e.length){data=$.trim(e[0].innerHTML)}}else{if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr){data=attr}}}}if(data.indexOf("{")<0){data="{"+data+"}"}data=eval("("+data+")");$.data(elem,settings.single,data);return data}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts)}})(jQuery);(function(e){var d;var a;var f;var h=false;var j;var o;var c;var g;var l;var m;var n;var b;e.fn.extend({autogeocomplete:function(p){p=e.extend({},e.fn.autogeocomplete.defaults,p);o=p.map_window_id;j=p.map_frame_id;c=p.lat_id;g=p.lng_id;l=p.addr_id;m=p.lat;n=p.lng;b=p.map_zoom;this.initialize();d=new google.maps.Geocoder();this.autocomplete({source:function(s,r){d.geocode({address:s.term},function(w,u){var v=0;var x=[];if(h){e.each(w,function(y){if(w[y].formatted_address.toLowerCase().indexOf(", usa")!==-1){x.push(w[y])}})}else{x=w}q(x[0].geometry.location.lat(),x[0].geometry.location.lng());r(e.map(x,function(A){var B=A.formatted_address.split(",");var y=B[0];var z="";for(i=1;i<B.length;i++){z+=B[i];if(i!==B.length-1){z+=","}}if(v<5){v++;return{label:y,value:A.formatted_address,desc:z,latitude:A.geometry.location.lat(),longitude:A.geometry.location.lng()}}}))})},minLength:4,select:function(r,s){e("#"+c).val(s.item.latitude);e("#"+g).val(s.item.longitude)},open:function(r,s){e("#"+j).css("visibility","visible");e("#"+j).css("z-index","5");e("#"+o).css("z-index","5");e(".ui-autocomplete").css({"z-index":"1"});e(".auto_gmap").css({left:"0"});e(".ui-menu-item").css("width","200px")},close:function(r,s){e("#"+j).css("visibility","hidden")},focus:function(r,s){q(s.item.latitude,s.item.longitude)}}).data("autocomplete")._renderItem=function(r,s){return e("<li></li>").data("item.autocomplete",s).append("<a><strong>"+s.label+"</strong><br>"+s.desc+"</a>").appendTo(r)};function q(s,r){e("#"+c).val(s);e("#"+g).val(r);map_location=new google.maps.LatLng(s,r);f.setPosition(map_location);a.setCenter(map_location)}},initialize:function(){var q=new google.maps.LatLng(m,n);var p={zoom:b,center:q,mapTypeId:google.maps.MapTypeId.ROADMAP,scaleControl:false,mapTypeControl:false};a=new google.maps.Map(document.getElementById(o),p);f=new google.maps.Marker({map:a,draggable:false});google.maps.event.addListener(a,"click",function(v){e("#"+c).val(v.latLng.b);e("#"+g).val(v.latLng.c);var s=v.latLng;var u=new google.maps.Marker({map:a,draggable:false,position:s});var r=new google.maps.Geocoder();r.geocode({latLng:v.latLng},function(x,w){e("#"+l).val(x[0].formatted_address)})})}});e.fn.autogeocomplete.defaults={map_frame_id:"mapframe",map_window_id:"mapwindow",lat_id:"filter_lat",lng_id:"filter_lng",addr_id:"filter_address",lat:"37.7749295",lng:"-122.4194155",map_zoom:13}})(jQuery);eval(function(h,b,j,d,g,f){g=function(a){return(a<b?"":g(parseInt(a/b)))+((a=a%b)>35?String.fromCharCode(a+29):a.toString(36))};if(!"".replace(/^/,String)){while(j--){f[g(j)]=d[j]||g(j)}d=[function(a){return f[a]}];g=function(){return"\\w+"};j=1}while(j--){if(d[j]){h=h.replace(new RegExp("\\b"+g(j)+"\\b","g"),d[j])}}return h}(';(5($){$.r={Q:"G",1f:"1.0.2",M:{z:"H",9:"",D:"X",E:O}};$.8.K({r:5(d,e){6(d&&S(d)!="T"){e=d;d=U}3 f=$.K({},$.r.M,e);3 g={};4.v(5(i){3 a=(!d||d=="")?$(4):$(4).V(d);3 b=f.z=="Z"?""+I.15():(f.9==""?a.P():a.9(f.9));3 c=$(4).L();6(!g[c])g[c]={s:[],n:[]};6(a.7>0)g[c].s.q({s:b,e:$(4),n:i});W g[c].n.q({e:$(4),n:i})});w(3 h J g){3 j=g[h];j.s.16(5 18(a,b){3 x=a.s.t?a.s.t():a.s;3 y=b.s.t?b.s.t():b.s;6(B(a.s)&&B(b.s)){x=F(a.s);y=F(b.s)}u(f.z=="H"?1:-1)*(x<y?-1:(x>y?1:0))})}3 k=[];w(3 h J g){3 j=g[h];3 l=[];3 m=$(4).7;Y(f.D){A"10":$.v(j.s,5(i,a){m=I.11(m,a.n)});C;A"12":$.v(j.s,5(i,a){l.q(a.n)});C;A"13":m=j.n.7;C;14:m=0}3 n=[0,0];w(3 i=0;i<$(4).7;i++){3 o=i>=m&&i<m+j.s.7;6(N(l,i))o=17;3 p=(o?j.s:j.n)[n[o?0:1]].e;p.L().19(p);6(o||!f.E)k.q(p.1a(0));n[o?0:1]++}}u 4.1b(k)}});5 B(n){u/^[\\+-]?\\d*\\.?\\d*$/.1c(n)};5 N(a,n){3 b=O;$.v(a,5(i,m){6(!b)b=m==n});u b};$.8.G=$.8.1d=$.8.1e=$.8.r})(R);',62,78,"|||var|this|function|if|length|fn|attr|||||||||||||||||push|tinysort||toLowerCase|return|each|for|||order|case|isNum|break|place|returns|parseFloat|TinySort|asc|Math|in|extend|parent|defaults|contains|false|text|id|jQuery|typeof|string|null|find|else|start|switch|rand|first|min|org|end|default|random|sort|true|zeSort|append|get|setArray|exec|Tinysort|tsort|version".split("|"),0,{}));var qq=qq||{};qq.extend=function(b,a){for(var c in a){b[c]=a[c]}};qq.indexOf=function(b,c,d){if(b.indexOf){return b.indexOf(c,d)}d=d||0;var a=b.length;if(d<0){d+=a}for(;d<a;d++){if(d in b&&b[d]===c){return d}}return -1};qq.getUniqueId=(function(){var a=0;return function(){return a++}})();qq.attach=function(a,c,b){if(a.addEventListener){a.addEventListener(c,b,false)}else{if(a.attachEvent){a.attachEvent("on"+c,b)}}};qq.detach=function(a,c,b){if(a.removeEventListener){a.removeEventListener(c,b,false)}else{if(a.attachEvent){a.detachEvent("on"+c,b)}}};qq.preventDefault=function(a){if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}};qq.insertBefore=function(d,c){c.parentNode.insertBefore(d,c)};qq.remove=function(a){a.parentNode.removeChild(a)};qq.contains=function(b,a){if(b==a){return true}if(b.contains){return b.contains(a)}else{return !!(a.compareDocumentPosition(b)&8)}};qq.toElement=(function(){var a=document.createElement("div");return function(c){a.innerHTML=c;var b=a.firstChild;a.removeChild(b);return b}})();qq.css=function(a,b){if(b.opacity!=null){if(typeof a.style.opacity!="string"&&typeof(a.filters)!="undefined"){b.filter="alpha(opacity="+Math.round(100*b.opacity)+")"}}qq.extend(a.style,b)};qq.hasClass=function(b,a){var c=new RegExp("(^| )"+a+"( |$)");return c.test(b.className)};qq.addClass=function(b,a){if(!qq.hasClass(b,a)){b.className+=" "+a}};qq.removeClass=function(b,a){var c=new RegExp("(^| )"+a+"( |$)");b.className=b.className.replace(c," ").replace(/^\s+|\s+$/g,"")};qq.setText=function(a,b){a.innerText=b;a.textContent=b};qq.children=function(b){var a=[],c=b.firstChild;while(c){if(c.nodeType==1){a.push(c)}c=c.nextSibling}return a};qq.getByClass=function(d,e){if(d.querySelectorAll){return d.querySelectorAll("."+e)}var b=[];var f=d.getElementsByTagName("*");var a=f.length;for(var c=0;c<a;c++){if(qq.hasClass(f[c],e)){b.push(f[c])}}return b};qq.obj2url=function(f,b,h){var g=[],d="&",e=function(l,j){var m=b?(/\[\]$/.test(b))?b:b+"["+j+"]":j;if((m!="undefined")&&(j!="undefined")){g.push((typeof l==="object")?qq.obj2url(l,m,true):(Object.prototype.toString.call(l)==="[object Function]")?encodeURIComponent(m)+"="+encodeURIComponent(l()):encodeURIComponent(m)+"="+encodeURIComponent(l))}};if(!h&&b){d=(/\?/.test(b))?(/\?$/.test(b))?"":"&":"?";g.push(b);g.push(qq.obj2url(f))}else{if((Object.prototype.toString.call(f)==="[object Array]")&&(typeof f!="undefined")){for(var c=0,a=f.length;c<a;++c){e(f[c],c)}}else{if((typeof f!="undefined")&&(f!==null)&&(typeof f==="object")){for(var c in f){e(f[c],c)}}else{g.push(encodeURIComponent(b)+"="+encodeURIComponent(f))}}}return g.join(d).replace(/^&/,"").replace(/%20/g,"+")};var qq=qq||{};qq.FileUploaderBasic=function(a){this._options={debug:false,action:"/server/upload",params:{},button:null,multiple:true,maxConnections:3,allowedExtensions:[],sizeLimit:0,minSizeLimit:0,onSubmit:function(c,b){},onProgress:function(e,d,b,c){},onComplete:function(d,c,b){},onCancel:function(c,b){},messages:{typeError:"{file} has invalid extension. Only {extensions} are allowed.",sizeError:"{file} is too large, maximum file size is {sizeLimit}.",minSizeError:"{file} is too small, minimum file size is {minSizeLimit}.",emptyError:"{file} is empty, please select files again without it.",onLeave:"The files are being uploaded, if you leave now the upload will be cancelled."},showMessage:function(b){alert(b)}};qq.extend(this._options,a);this._filesInProgress=0;this._handler=this._createUploadHandler();if(this._options.button){this._button=this._createUploadButton(this._options.button)}this._preventLeaveInProgress()};qq.FileUploaderBasic.prototype={setParams:function(a){this._options.params=a},getInProgress:function(){return this._filesInProgress},_createUploadButton:function(b){var a=this;return new qq.UploadButton({element:b,multiple:this._options.multiple&&qq.UploadHandlerXhr.isSupported(),onChange:function(c){a._onInputChange(c)}})},_createUploadHandler:function(){var a=this,c;if(qq.UploadHandlerXhr.isSupported()){c="UploadHandlerXhr"}else{c="UploadHandlerForm"}var b=new qq[c]({debug:this._options.debug,action:this._options.action,maxConnections:this._options.maxConnections,onProgress:function(g,f,d,e){a._onProgress(g,f,d,e);a._options.onProgress(g,f,d,e)},onComplete:function(f,e,d){a._onComplete(f,e,d);a._options.onComplete(f,e,d)},onCancel:function(e,d){a._onCancel(e,d);a._options.onCancel(e,d)}});return b},_preventLeaveInProgress:function(){var a=this;qq.attach(window,"beforeunload",function(b){if(!a._filesInProgress){return}var b=b||window.event;b.returnValue=a._options.messages.onLeave;return a._options.messages.onLeave})},_onSubmit:function(b,a){this._filesInProgress++},_onProgress:function(d,c,a,b){},_onComplete:function(c,b,a){this._filesInProgress--;if(a.error){this._options.showMessage(a.error)}},_onCancel:function(b,a){this._filesInProgress--},_onInputChange:function(a){if(this._handler instanceof qq.UploadHandlerXhr){this._uploadFileList(a.files)}else{if(this._validateFile(a)){this._uploadFile(a)}}this._button.reset()},_uploadFileList:function(b){for(var a=0;a<b.length;a++){if(!this._validateFile(b[a])){return}}for(var a=0;a<b.length;a++){this._uploadFile(b[a])}},_uploadFile:function(a){var c=this._handler.add(a);var b=this._handler.getName(c);if(this._options.onSubmit(c,b)!==false){this._onSubmit(c,b);this._handler.upload(c,this._options.params)}},_validateFile:function(c){var a,b;if(c.value){a=c.value.replace(/.*(\/|\\)/,"")}else{a=c.fileName!=null?c.fileName:c.name;b=c.fileSize!=null?c.fileSize:c.size}if(!this._isAllowedExtension(a)){this._error("typeError",a);return false}else{if(b===0){this._error("emptyError",a);return false}else{if(b&&this._options.sizeLimit&&b>this._options.sizeLimit){this._error("sizeError",a);return false}else{if(b&&b<this._options.minSizeLimit){this._error("minSizeError",a);return false}}}}return true},_error:function(c,d){var b=this._options.messages[c];function a(e,f){b=b.replace(e,f)}a("{file}",this._formatFileName(d));a("{extensions}",this._options.allowedExtensions.join(", "));a("{sizeLimit}",this._formatSize(this._options.sizeLimit));a("{minSizeLimit}",this._formatSize(this._options.minSizeLimit));this._options.showMessage(b)},_formatFileName:function(a){if(a.length>33){a=a.slice(0,19)+"..."+a.slice(-13)}return a},_isAllowedExtension:function(d){var b=(-1!==d.indexOf("."))?d.replace(/.*[.]/,"").toLowerCase():"";var c=this._options.allowedExtensions;if(!c.length){return true}for(var a=0;a<c.length;a++){if(c[a].toLowerCase()==b){return true}}return false},_formatSize:function(a){var b=-1;do{a=a/1024;b++}while(a>99);return Math.max(a,0.1).toFixed(1)+["kB","MB","GB","TB","PB","EB"][b]}};qq.FileUploader=function(a){qq.FileUploaderBasic.apply(this,arguments);qq.extend(this._options,{element:null,listElement:null,template:'<div class="qq-uploader"><div class="qq-upload-drop-area"><span>Drop files here to upload</span></div><div class="qq-upload-button">Upload a file</div><ul class="qq-upload-list"></ul></div>',fileTemplate:'<li><span class="qq-upload-file"></span><span class="qq-upload-spinner"></span><span class="qq-upload-size"></span><a class="qq-upload-cancel" href="#">Cancel</a><span class="qq-upload-failed-text">Failed</span></li>',classes:{button:"qq-upload-button",drop:"qq-upload-drop-area",dropActive:"qq-upload-drop-area-active",list:"qq-upload-list",file:"qq-upload-file",spinner:"qq-upload-spinner",size:"qq-upload-size",cancel:"qq-upload-cancel",success:"qq-upload-success",fail:"qq-upload-fail"}});qq.extend(this._options,a);this._element=this._options.element;this._element.innerHTML=this._options.template;this._listElement=this._options.listElement||this._find(this._element,"list");this._classes=this._options.classes;this._button=this._createUploadButton(this._find(this._element,"button"));this._bindCancelEvent();this._setupDragDrop()};qq.extend(qq.FileUploader.prototype,qq.FileUploaderBasic.prototype);qq.extend(qq.FileUploader.prototype,{_find:function(c,b){var a=qq.getByClass(c,this._options.classes[b])[0];if(!a){throw new Error("element not found "+b)}return a},_setupDragDrop:function(){var b=this,c=this._find(this._element,"drop");var a=new qq.UploadDropZone({element:c,onEnter:function(d){qq.addClass(c,b._classes.dropActive);d.stopPropagation()},onLeave:function(d){d.stopPropagation()},onLeaveNotDescendants:function(d){qq.removeClass(c,b._classes.dropActive)},onDrop:function(d){c.style.display="none";qq.removeClass(c,b._classes.dropActive);b._uploadFileList(d.dataTransfer.files)}});c.style.display="none";qq.attach(document,"dragenter",function(d){if(!a._isValidFileDrag(d)){return}c.style.display="block"});qq.attach(document,"dragleave",function(f){if(!a._isValidFileDrag(f)){return}var d=document.elementFromPoint(f.clientX,f.clientY);if(!d||d.nodeName=="HTML"){c.style.display="none"}})},_onSubmit:function(b,a){qq.FileUploaderBasic.prototype._onSubmit.apply(this,arguments);this._addToList(b,a)},_onProgress:function(g,f,a,d){qq.FileUploaderBasic.prototype._onProgress.apply(this,arguments);var c=this._getItemByFileId(g);var b=this._find(c,"size");b.style.display="inline";var e;if(a!=d){e=Math.round(a/d*100)+"% from "+this._formatSize(d)}else{e=this._formatSize(d)}qq.setText(b,e)},_onComplete:function(d,c,a){qq.FileUploaderBasic.prototype._onComplete.apply(this,arguments);var b=this._getItemByFileId(d);qq.remove(this._find(b,"cancel"));qq.remove(this._find(b,"spinner"));if(a.success){qq.addClass(b,this._classes.success)}else{qq.addClass(b,this._classes.fail)}},_addToList:function(d,c){var a=qq.toElement(this._options.fileTemplate);a.qqFileId=d;var b=this._find(a,"file");qq.setText(b,this._formatFileName(c));this._find(a,"size").style.display="none";this._listElement.appendChild(a)},_getItemByFileId:function(b){var a=this._listElement.firstChild;while(a){if(a.qqFileId==b){return a}a=a.nextSibling}},_bindCancelEvent:function(){var a=this,b=this._listElement;qq.attach(b,"click",function(f){f=f||window.event;var d=f.target||f.srcElement;if(qq.hasClass(d,a._classes.cancel)){qq.preventDefault(f);var c=d.parentNode;a._handler.cancel(c.qqFileId);qq.remove(c)}})}});qq.UploadDropZone=function(a){this._options={element:null,onEnter:function(b){},onLeave:function(b){},onLeaveNotDescendants:function(b){},onDrop:function(b){}};qq.extend(this._options,a);this._element=this._options.element;this._disableDropOutside();this._attachEvents()};qq.UploadDropZone.prototype={_disableDropOutside:function(a){if(!qq.UploadDropZone.dropOutsideDisabled){qq.attach(document,"dragover",function(b){if(b.dataTransfer){b.dataTransfer.dropEffect="none";b.preventDefault()}});qq.UploadDropZone.dropOutsideDisabled=true}},_attachEvents:function(){var a=this;qq.attach(a._element,"dragover",function(c){if(!a._isValidFileDrag(c)){return}var b=c.dataTransfer.effectAllowed;if(b=="move"||b=="linkMove"){c.dataTransfer.dropEffect="move"}else{c.dataTransfer.dropEffect="copy"}c.stopPropagation();c.preventDefault()});qq.attach(a._element,"dragenter",function(b){if(!a._isValidFileDrag(b)){return}a._options.onEnter(b)});qq.attach(a._element,"dragleave",function(c){if(!a._isValidFileDrag(c)){return}a._options.onLeave(c);var b=document.elementFromPoint(c.clientX,c.clientY);if(qq.contains(this,b)){return}a._options.onLeaveNotDescendants(c)});qq.attach(a._element,"drop",function(b){if(!a._isValidFileDrag(b)){return}b.preventDefault();a._options.onDrop(b)})},_isValidFileDrag:function(c){var b=c.dataTransfer,a=navigator.userAgent.indexOf("AppleWebKit")>-1;return b&&b.effectAllowed!="none"&&(b.files||(!a&&b.types.contains&&b.types.contains("Files")))}};qq.UploadButton=function(a){this._options={element:null,multiple:false,name:"file",onChange:function(b){},hoverClass:"qq-upload-button-hover",focusClass:"qq-upload-button-focus"};qq.extend(this._options,a);this._element=this._options.element;qq.css(this._element,{position:"relative",overflow:"hidden",direction:"ltr"});this._input=this._createInput()};qq.UploadButton.prototype={getInput:function(){return this._input},reset:function(){if(this._input.parentNode){qq.remove(this._input)}qq.removeClass(this._element,this._options.focusClass);this._input=this._createInput()},_createInput:function(){var b=document.createElement("input");if(this._options.multiple){b.setAttribute("multiple","multiple")}b.setAttribute("type","file");b.setAttribute("name",this._options.name);qq.css(b,{position:"absolute",right:0,top:0,fontFamily:"Arial",fontSize:"118px",margin:0,padding:0,cursor:"pointer",opacity:0});this._element.appendChild(b);var a=this;qq.attach(b,"change",function(){a._options.onChange(b)});qq.attach(b,"mouseover",function(){qq.addClass(a._element,a._options.hoverClass)});qq.attach(b,"mouseout",function(){qq.removeClass(a._element,a._options.hoverClass)});qq.attach(b,"focus",function(){qq.addClass(a._element,a._options.focusClass)});qq.attach(b,"blur",function(){qq.removeClass(a._element,a._options.focusClass)});if(window.attachEvent){b.setAttribute("tabIndex","-1")}return b}};qq.UploadHandlerAbstract=function(a){this._options={debug:false,action:"/upload.php",maxConnections:999,onProgress:function(e,d,b,c){},onComplete:function(d,c,b){},onCancel:function(c,b){}};qq.extend(this._options,a);this._queue=[];this._params=[]};qq.UploadHandlerAbstract.prototype={log:function(a){if(this._options.debug&&window.console){console.log("[uploader] "+a)}},add:function(a){},upload:function(d,b){var a=this._queue.push(d);var c={};qq.extend(c,b);this._params[d]=c;if(a<=this._options.maxConnections){this._upload(d,this._params[d])}},cancel:function(a){this._cancel(a);this._dequeue(a)},cancelAll:function(){for(var a=0;a<this._queue.length;a++){this._cancel(this._queue[a])}this._queue=[]},getName:function(a){},getSize:function(a){},getQueue:function(){return this._queue},_upload:function(a){},_cancel:function(a){},_dequeue:function(d){var b=qq.indexOf(this._queue,d);this._queue.splice(b,1);var a=this._options.maxConnections;if(this._queue.length>=a&&b<a){var c=this._queue[a-1];this._upload(c,this._params[c])}}};qq.UploadHandlerForm=function(a){qq.UploadHandlerAbstract.apply(this,arguments);this._inputs={}};qq.extend(qq.UploadHandlerForm.prototype,qq.UploadHandlerAbstract.prototype);qq.extend(qq.UploadHandlerForm.prototype,{add:function(a){a.setAttribute("name","qqfile");var b="qq-upload-handler-iframe"+qq.getUniqueId();this._inputs[b]=a;if(a.parentNode){qq.remove(a)}return b},getName:function(a){return this._inputs[a].value.replace(/.*(\/|\\)/,"")},_cancel:function(b){this._options.onCancel(b,this.getName(b));delete this._inputs[b];var a=document.getElementById(b);if(a){a.setAttribute("src","javascript:false;");qq.remove(a)}},_upload:function(g,e){var b=this._inputs[g];if(!b){throw new Error("file with passed id was not added, or already uploaded or cancelled")}var f=this.getName(g);var c=this._createIframe(g);var d=this._createForm(c,e);d.appendChild(b);var a=this;this._attachLoadEvent(c,function(){a.log("iframe loaded");var h=a._getIframeContentJSON(c);a._options.onComplete(g,f,h);a._dequeue(g);delete a._inputs[g];setTimeout(function(){qq.remove(c)},1)});d.submit();qq.remove(d);return g},_attachLoadEvent:function(a,b){qq.attach(a,"load",function(){if(!a.parentNode){return}if(a.contentDocument&&a.contentDocument.body&&a.contentDocument.body.innerHTML=="false"){return}b()})},_getIframeContentJSON:function(iframe){var doc=iframe.contentDocument?iframe.contentDocument:iframe.contentWindow.document,response;this.log("converting iframe's innerHTML to JSON");this.log("innerHTML = "+doc.body.innerHTML);try{response=eval("("+doc.body.innerHTML+")")}catch(err){response={}}return response},_createIframe:function(b){var a=qq.toElement('<iframe src="javascript:false;" name="'+b+'" />');a.setAttribute("id",b);a.style.display="none";document.body.appendChild(a);return a},_createForm:function(a,c){var b=qq.toElement('<form method="post" enctype="multipart/form-data"></form>');var d=qq.obj2url(c,this._options.action);b.setAttribute("action",d);b.setAttribute("target",a.name);b.style.display="none";document.body.appendChild(b);return b}});qq.UploadHandlerXhr=function(a){qq.UploadHandlerAbstract.apply(this,arguments);this._files=[];this._xhrs=[];this._loaded=[]};qq.UploadHandlerXhr.isSupported=function(){var a=document.createElement("input");a.type="file";return("multiple" in a&&typeof File!="undefined"&&typeof(new XMLHttpRequest()).upload!="undefined")};qq.extend(qq.UploadHandlerXhr.prototype,qq.UploadHandlerAbstract.prototype);qq.extend(qq.UploadHandlerXhr.prototype,{add:function(a){if(!(a instanceof File)){throw new Error("Passed obj in not a File (in qq.UploadHandlerXhr)")}return this._files.push(a)-1},getName:function(b){var a=this._files[b];return a.fileName!=null?a.fileName:a.name},getSize:function(b){var a=this._files[b];return a.fileSize!=null?a.fileSize:a.size},getLoaded:function(a){return this._loaded[a]||0},_upload:function(h,f){var d=this._files[h],b=this.getName(h),c=this.getSize(h);this._loaded[h]=0;var e=this._xhrs[h]=new XMLHttpRequest();var a=this;e.upload.onprogress=function(j){if(j.lengthComputable){a._loaded[h]=j.loaded;a._options.onProgress(h,b,j.loaded,j.total)}};e.onreadystatechange=function(){if(e.readyState==4){a._onComplete(h,e)}};f=f||{};f.qqfile=b;var g=qq.obj2url(f,this._options.action);e.open("POST",g,true);e.setRequestHeader("X-Requested-With","XMLHttpRequest");e.setRequestHeader("X-File-Name",encodeURIComponent(b));e.setRequestHeader("Content-Type","application/octet-stream");e.send(d)},_onComplete:function(id,xhr){if(!this._files[id]){return}var name=this.getName(id);var size=this.getSize(id);this._options.onProgress(id,name,size,size);if(xhr.status==200){this.log("xhr - server response received");this.log("responseText = "+xhr.responseText);var response;try{response=eval("("+xhr.responseText+")")}catch(err){response={}}this._options.onComplete(id,name,response)}else{this._options.onComplete(id,name,{})}this._files[id]=null;this._xhrs[id]=null;this._dequeue(id)},_cancel:function(a){this._options.onCancel(a,this.getName(a));this._files[a]=null;if(this._xhrs[a]){this._xhrs[a].abort();this._xhrs[a]=null}}});(function(d){d.TextboxList=function(j,x){var A,s,G,y,q=false,n=[],I,g={};var l=d.extend(true,{prefix:"textboxlist",max:null,unique:false,uniqueInsensitive:true,startEditableBit:true,hideEditableBits:true,inBetweenEditableBits:true,keys:{previous:37,next:39},bitsOptions:{editable:{},box:{}},plugins:{},encode:function(L){return d.grep(d.map(L,function(M){M=(a(M[0])?M[0]:M[1]);return a(M)?M.toString().replace(/,/,""):null}),function(M){return M!=undefined}).join(",")},decode:function(L){return L.split(",")}},x);j=d(j);var w=this;var D=function(){A=j.css("display","none").attr("autocomplete","off").focus(h);s=d('<div class="'+l.prefix+'" />').insertAfter(j).click(function(M){if((M.target==G.get(0)||M.target==s.get(0))&&(!q||(y&&y.toElement().get(0)!=G.find(":last-child").get(0)))){h()}});G=d('<ul class="'+l.prefix+'-bits" />').appendTo(s);for(var L in l.plugins){o(L,l.plugins[L])}F()};var o=function(M,L){w.plugins[M]=new d.TextboxList[c(b(M))](w,L)};var F=function(){r("editable",null,{tabIndex:A.tabIndex}).inject(G);z("bitAdd",p,true);z("bitRemove",p,true);d(document).click(function(M){if(!q){return}if(M.target.className.indexOf(l.prefix)!=-1){if(M.target==d(s).get(0)){return}var L=d(M.target).parents("div."+l.prefix);if(L.get(0)==s.get(0)){return}}B()}).keydown(function(N){if(!q||!y){return}var Q=y.is("editable")?y.getCaret():null;var P=y.getValue()[1];var L=!!d.map(["shift","alt","meta","ctrl"],function(R){return N[R]}).length;var O=L||(y.is("editable")&&y.isSelected());var M=function(){N.stopPropagation();N.preventDefault()};switch(N.which){case 8:if(y.is("box")){M();return y.remove()}case l.keys.previous:if(y.is("box")||((Q==0||!P.length)&&!O)){M();m("prev")}break;case 46:if(y.is("box")){M();return y.remove()}case l.keys.next:if(y.is("box")||(Q==P.length&&!O)){M();m("next")}}});E(l.decode(A.val()))};var r=function(L,N,M){if(L=="box"){if(a(l.max)&&G.children("."+l.prefix+"-bit-box").length+1>l.max){return false}if(l.unique&&d.inArray(u(N),n)!=-1){return false}}return new d.TextboxListBit(L,N,w,d.extend(true,l.bitsOptions[L],M))};var u=function(L){return a(L[0])?L[0]:(l.uniqueInsensitive?L[1].toLowerCase():L[1])};var v=function(N,P,M,O){var L=r("box",[P,N,M]);if(L){if(!O||!O.length){O=G.find("."+l.prefix+"-bit-box").filter(":last")}L.inject(O.length?O:G,O.length?"after":"top")}return w};var m=function(M,O){var N=J(O&&d(O).length?O:y).toElement();var L=J(N[M]());if(L){L.focus()}return w};var h=function(){var L=G.children().filter(":last");if(L){J(L).focus()}return w};var B=function(){if(!q){return w}if(y){y.blur()}q=false;return K("blur")};var J=function(L){return(L.type&&(L.type=="editable"||L.type=="box"))?L:d(L).data("textboxlist:bit")};var f=function(){var L=[];G.children().each(function(){var M=J(this);if(!M.is("editable")){L.push(M.getValue())}});return L};var E=function(L){if(!L){return}d.each(L,function(N,M){if(M){v.apply(w,d.isArray(M)?[M[1],M[0],M[2]]:[M])}})};var p=function(){A.val(l.encode(f()))};var z=function(M,L){if(g[M]==undefined){g[M]=[]}var N=false;d.each(g[M],function(O){if(O===L){N=true;return}});if(!N){g[M].push(L)}return w};var K=function(N,M,L){if(!g||!g[N]){return w}d.each(g[N],function(O,P){(function(){M=(M!=undefined)?e(M):Array.prototype.slice.call(arguments);var Q=function(){return P.apply(w||null,M)};if(L){return setTimeout(Q,L)}return Q()})()});return w};var C=function(N,M){if(g[N]){for(var L=g[N].length;L--;L){if(g[N][L]===M){g[N].splice(L,1)}}}return w};var H=function(L){return d.inArray(u(L),n)};this.onFocus=function(L){if(y){y.blur()}clearTimeout(I);y=L;s.addClass(l.prefix+"-focus");if(!q){q=true;K("focus",L)}};this.onAdd=function(O){if(l.unique&&O.is("box")){n.push(u(O.getValue()))}if(O.is("box")){var M=J(O.toElement().prev());if((M&&M.is("box")&&l.inBetweenEditableBits)||(!M&&l.startEditableBit)){var N=M&&M.toElement().length?M.toElement():false;var L=r("editable").inject(N||G,N?"after":"top");if(l.hideEditableBits){L.hide()}}}};this.onRemove=function(N){if(!q){return}if(l.unique&&N.is("box")){var L=H(N.getValue());if(L!=-1){n=n.splice(L+1,1)}}var M=J(N.toElement().prev());if(M&&M.is("editable")){M.remove()}m("next",N)};this.onBlur=function(M,L){y=null;s.removeClass(l.prefix+"-focus");I=setTimeout(B,L?0:200)};this.setOptions=function(L){l=d.extend(true,l,L)};this.getOptions=function(){return l};this.getContainer=function(){return s};this.isDuplicate=H;this.addEvent=z;this.removeEvent=C;this.fireEvent=K;this.create=r;this.add=v;this.getValues=f;this.plugins=[];D()};d.TextboxListBit=function(h,v,C,u){var f,o,l,p,z,m=false,F=b(h);var x=C.getOptions().prefix+"-bit";var j=x+"-"+h;var g=d.extend(true,h=="box"?{deleteButton:true}:{tabIndex:null,growing:true,growingOptions:{},stopEnter:true,addOnBlur:false,addKeys:[13]},u);this.type=h;this.value=v;var q=this;var y=function(){o=d("<li />").addClass(x).addClass(j).data("textboxlist:bit",q).hover(function(){o.addClass(x+"-hover").addClass(j+"-hover")},function(){o.removeClass(x+"-hover").removeClass(j+"-hover")});if(h=="box"){o.html(a(q.value[2])?q.value[2]:q.value[1]).click(r);if(g.deleteButton){o.addClass(j+"-deletable");p=d('<a href="#" class="'+j+'-deletebutton" />').click(E).appendTo(o)}o.children().click(function(G){G.stopPropagation();G.preventDefault()})}else{f=d('<input type="text" class="'+j+'-input" autocomplete="off" />').val(q.value?q.value[1]:"").appendTo(o);if(a(g.tabIndex)){f.tabIndex=g.tabIndex}if(g.growing){l=new d.GrowingInput(f,g.growingOptions)}f.focus(function(){r(true)}).blur(function(){w(true);if(g.addOnBlur){A()}});if(g.addKeys||g.stopEnter){f.keydown(function(H){if(!m){return}var G=function(){H.stopPropagation();H.preventDefault()};if(g.stopEnter&&H.which===13){G()}if(d.inArray(H.which,e(g.addKeys))!=-1){G();A()}})}}};var s=function(H,G){switch(G||"bottom"){case"top":o.prependTo(H);break;case"bottom":o.appendTo(H);break;case"before":o.insertBefore(H);break;case"after":o.insertAfter(H);break}C.onAdd(q);return B("add")};var r=function(G){if(m){return q}D();m=true;C.onFocus(q);o.addClass(x+"-focus").addClass(x+"-"+h+"-focus");B("focus");if(h=="editable"&&!G){f.focus()}return q};var w=function(G){if(!m){return q}m=false;C.onBlur(q);o.removeClass(x+"-focus").removeClass(x+"-"+h+"-focus");B("blur");if(h=="editable"){if(!G){f.blur()}if(z&&!f.val().length){n()}}return q};var E=function(){w();C.onRemove(q);o.remove();return B("remove")};var D=function(){o.css("display","block");return q};var n=function(){o.css("display","none");z=true;return q};var B=function(G){G=b(G);C.fireEvent("bit"+G,q).fireEvent("bit"+F+G,q);return q};this.is=function(G){return h==G};this.setValue=function(G){if(h=="editable"){f.val(a(G[0])?G[0]:G[1]);if(g.growing){f.data("growing").resize()}}else{v=G}return q};this.getValue=function(){return h=="editable"?[null,f.val(),null]:v};if(h=="editable"){this.getCaret=function(){var G=f.get(0);if(G.createTextRange){var H=document.selection.createRange().duplicate();H.moveEnd("character",G.value.length);if(H.text===""){return G.value.length}return G.value.lastIndexOf(H.text)}else{return G.selectionStart}};this.getCaretEnd=function(){var G=f.get(0);if(G.createTextRange){var H=document.selection.createRange().duplicate();H.moveStart("character",-G.value.length);return H.text.length}else{return G.selectionEnd}};this.isSelected=function(){return m&&(q.getCaret()!==q.getCaretEnd())};var A=function(){var H=q.getValue();var G=C.create("box",H);if(G){G.inject(o,"before");q.setValue([null,"",null]);return G}return null};this.toBox=A}this.toElement=function(){return o};this.getInput=function(){if(h=="editable"){return f}};this.getGrowingHandler=function(){return l};this.focus=r;this.blur=w;this.remove=E;this.inject=s;this.show=D;this.hide=n;this.fireBitEvent=B;y()};var a=function(f){return !!(f||f===0)};var e=function(f){return d.isArray(f)?f:[f]};var c=function(f){return f.replace(/-\D/g,function(g){return g.charAt(1).toUpperCase()})};var b=function(f){return f.replace(/\b[a-z]/g,function(g){return g.toUpperCase()})};d.fn.extend({textboxlist:function(f){return this.each(function(){new d.TextboxList(this,f)})}})})(jQuery);(function(){$.TextboxList.Autocomplete=function(I,x){var n,C,f,u,H,d=[],p=[],z=[],m=false,y,h,E,e,s,j;var g=$.extend(true,{minLength:1,maxResults:10,insensitive:true,highlight:true,highlightSelector:null,mouseInteraction:true,onlyFromValues:false,queryRemote:false,remote:{url:"",param:"search",extraParams:{},loadPlaceholder:"Please wait..."},method:"standard",placeholder:"Type to receive suggestions"},x);var D=function(){I.addEvent("bitEditableAdd",G).addEvent("bitEditableFocus",q).addEvent("bitEditableBlur",r).setOptions({bitsOptions:{editable:{addKeys:false,stopEnter:false}}});if($.browser.msie){I.setOptions({bitsOptions:{editable:{addOnBlur:false}}})}C=I.getOptions().prefix+"-autocomplete";f=$.TextboxList.Autocomplete.Methods[g.method];u=$('<div class="'+C+'" />').width(I.getContainer().width()).appendTo(I.getContainer());if(b(g.placeholder)){m=$('<div class="'+C+'-placeholder" />').html(g.placeholder).appendTo(u)}H=$('<ul class="'+C+'-results" />').appendTo(u).click(function(L){L.stopPropagation();L.preventDefault()})};var G=function(L){L.toElement().keydown(F).keyup(function(){q()})};var q=function(N){if(N){h=N}if(!g.queryRemote&&!d.length){return}var L=$.trim(h.getValue()[1]);if(L.length<g.minLength){K()}if(L==s){return}s=L;H.css("display","none");if(L.length<g.minLength){return}if(g.queryRemote){if(p[L]){d=p[L]}else{var M=g.remote.extraParams;M[g.remote.param]=L;if(j){j.abort()}j=$.ajax({url:g.remote.url,data:M,dataType:"json",success:function(O){p[L]=O;d=O;w(L)}})}}w(L)};var w=function(M){var L=f.filter(d,M,g.insensitive,g.maxResults);if(I.getOptions().unique){L=$.grep(L,function(N){return I.isDuplicate(N)==-1})}o();if(!L.length){return}B();H.empty().css("display","block");$.each(L,function(N,O){c(O,M)});if(g.onlyFromValues){A()}L=L};var c=function(M,N){var L=$('<li class="'+C+'-result" />').html(M[3]?M[3]:M[1]).data("textboxlist:auto:value",M);L.appendTo(H);if(g.highlight){$(g.highlightSelector?L.find(g.highlightSelector):L).each(function(){if($(this).html()){f.highlight($(this),N,g.insensitive,C+"-highlight")}})}if(g.mouseInteraction){L.css("cursor","pointer").hover(function(){v(L)}).mousedown(function(O){O.stopPropagation();O.preventDefault();clearTimeout(E);e=true}).mouseup(function(){if(e){J();h.focus();q();e=false}});if(!g.onlyFromValues){L.mouseleave(function(){if(y&&(y.get(0)==L.get(0))){B()}})}}};var r=function(){E=setTimeout(function(){o();H.css("display","none");s=null},$.browser.msie?150:0)};var K=function(){if(m){m.css("display","block")}};var o=function(){if(m){m.css("display","none")}};var v=function(L){if(!L||!L.length){return}B();y=L.addClass(C+"-result-focus")};var B=function(){if(y&&y.length){y.removeClass(C+"-result-focus");y=null}};var A=function(){return v(H.find(":first"))};var l=function(L){if(!y||!y.length){return self}return v(y[L]())};var J=function(){var M=y.data("textboxlist:auto:value");var L=I.create("box",M.slice(0,3));if(L){L.autoValue=M;if($.isArray(n)){n.push(M)}h.setValue([null,"",null]);L.inject(h.toElement(),"before")}B();return self};var F=function(N){var M=function(){N.stopPropagation();N.preventDefault()};switch(N.which){case 38:M();(!g.onlyFromValues&&y&&y.get(0)===H.find(":first").get(0))?B():l("prev");break;case 40:M();(y&&y.length)?l("next"):A();break;case 13:M();if(y&&y.length){J()}else{if(!g.onlyFromValues){var O=h.getValue();var L=I.create("box",O);if(L){L.inject(h.toElement(),"before");h.setValue([null,"",null])}}}}};this.setValues=function(L){d=L};D()};$.TextboxList.Autocomplete.Methods={standard:{filter:function(e,g,d,c){var j=[],h=new RegExp("\\b"+a(g),d?"i":"");for(var f=0;f<e.length;f++){if(j.length===c){break}if(h.test(e[f][1])){j.push(e[f])}}return j},highlight:function(f,e,d,c){var g=new RegExp("(<[^>]*>)|(\\b"+a(e)+")",d?"ig":"g");return f.html(f.html().replace(g,function(j,h,l){return(j.charAt(0)=="<")?j:'<strong class="'+c+'">'+l+"</strong>"}))}}};var b=function(c){return !!(c||c===0)};var a=function(c){return c.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")}})();(function(d){d.GrowingInput=function(h,o){var l,j,g;o=d.extend({min:0,max:null,startWidth:15,correction:15},o);h=d(h).data("growing",this);var n=this;var m=function(){g=d("<span></span>").css({"float":"left",display:"inline-block",position:"absolute",left:-1000}).insertAfter(h);d.each(["font-size","font-family","padding-left","padding-top","padding-bottom","padding-right","border-left","border-right","border-top","border-bottom","word-spacing","letter-spacing","text-indent","text-transform"],function(q,r){g.css(r,h.css(r))});h.blur(e).keyup(e).keydown(e).keypress(e);e()};var f=function(q){g.text(q);var p=g.width();return(p?p:o.startWidth)+o.correction};var e=function(){j=l;l=h.val();var p=l;if(a(o.min)&&l.length<o.min){if(a(j)&&(j.length<=o.min)){return}p=b(l,o.min,"-")}else{if(a(o.max)&&l.length>o.max){if(a(j)&&(j.length>=o.max)){return}p=l.substr(0,o.max)}}h.width(f(p));return n};this.resize=e;m()};var a=function(e){return !!(e||e===0)};var c=function(f,e){return new Array(e+1).join(f)};var b=function(e,g,j,f){if(e.length>=g){return this}j=j||" ";var h=c(j,g-e.length).substr(0,g-e.length);if(!f||f=="right"){return e+h}if(f=="left"){return h+e}return h.substr(0,(h.length/2).floor())+e+h.substr(0,(h.length/2).ceil())}})(jQuery);(function(f){f.facebox=function(o,n){f.facebox.loading();if(o.ajax){g(o.ajax)}else{if(o.image){c(o.image)}else{if(o.div){l(o.div)}else{if(f.isFunction(o)){o.call(f)}else{f.facebox.reveal(o,n)}}}}};f.extend(f.facebox,{settings:{closeOnClick:false,opacity:0,overlay:true,loadingImage:"/images/loadingAnimation.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>              </td>              <td class="b"/>            </tr>            <tr>             <td class="bl"/><td class="b"/><td class="br"/>           </tr>        </tbody>    </table> </div> </div>'},loading:function(){m();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]+(j()/10),left:(f(window).width()-f("#facebox").width())/2}).show();f(document).bind("keydown.facebox",function(n){if(n.keyCode==27){f.facebox.close()}return true});f(document).trigger("loading.facebox")},reveal:function(o,n){f(document).trigger("beforeReveal.facebox");if(n){f("#facebox .content").addClass(n)}f("#facebox .content").append(o);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(n){m(n);function o(){f.facebox.loading(true);var p=this.rel.match(/facebox\[?\.(\w+)\]?/);if(p){p=p[1]}l(this.href,p);return false}return this.click(o)};function m(p){if(f.facebox.settings.inited){return true}else{f.facebox.settings.inited=true}f(document).trigger("init.facebox");d();var n=f.facebox.settings.imageTypes.join("|");f.facebox.settings.imageTypesRegexp=new RegExp("."+n+"$","i");if(p){f.extend(f.facebox.settings,p)}f("body").append(f.facebox.settings.faceboxHtml);var o=[new Image(),new Image()];o[0].src=f.facebox.settings.closeImage;o[1].src=f.facebox.settings.loadingImage;f("#facebox").find(".b:first, .bl, .br, .tl, .tr").each(function(){o.push(new Image());o.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 o,n;if(self.pageYOffset){n=self.pageYOffset;o=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){n=document.documentElement.scrollTop;o=document.documentElement.scrollLeft}else{if(document.body){n=document.body.scrollTop;o=document.body.scrollLeft}}}return new Array(o,n)}function j(){var n;if(self.innerHeight){n=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){n=document.documentElement.clientHeight}else{if(document.body){n=document.body.clientHeight}}}return n}function d(){var n=f.facebox.settings;n.loadingImage=n.loading_image||n.loadingImage;n.closeImage=n.close_image||n.closeImage;n.imageTypes=n.image_types||n.imageTypes;n.faceboxHtml=n.facebox_html||n.faceboxHtml}function l(o,n){if(o.match(/#/)){var p=window.location.href.split("#")[0];var q=o.replace(p,"");f.facebox.reveal(f(q).clone().show(),n)}else{if(o.match(f.facebox.settings.imageTypesRegexp)){c(o,n)}else{g(o,n)}}}function c(o,n){var p=new Image();p.onload=function(){f.facebox.reveal('<div class="image"><img src="'+p.src+'" /></div>',n)};p.src=o}function g(o,n){f.get(o,function(p){f.facebox.reveal(p,n)})}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.fn.youTubeEmbed=function(c){if(typeof c=="string"){c={video:c}}var f={width:640,progressBar:true};c=a.extend(f,c);var d={originalDIV:this,container:null,control:null,player:null,progress:null,elapsed:null};try{c.videoID=c.video.match(/v=(.{11})/)[1];c.safeID=c.videoID.replace(/[^a-z0-9]/ig,"")}catch(g){return d.originalDIV}var b="http://gdata.youtube.com/feeds/api/videos?v=2&alt=jsonc";a.get(b,{q:c.videoID},function(e){var h=e.data;if(!h.totalItems||h.items[0].accessControl.embed!="allowed"){return d.originalDIV}h=h.items[0];c.ratio=3/4;if(h.aspectRatio=="widescreen"){c.ratio=9/16}c.height=Math.round(c.width*c.ratio);d.container=a("<div>",{className:"flashContainer",css:{width:c.width,height:c.height}}).appendTo(d.originalDIV);d.container.flash({swf:"http://www.youtube.com/apiplayer?enablejsapi=1&version=3",id:"video_"+c.safeID,height:c.height,width:c.width,allowScriptAccess:"always",wmode:"transparent",flashvars:{video_id:c.videoID,playerapiid:c.safeID}});d.player=d.container.flash().get(0);d.control=a("<div>",{className:"controlDiv play"}).appendTo(d.container);if(c.progressBar){d.progress=a("<div>",{className:"progressBar"}).appendTo(d.container);d.elapsed=a("<div>",{className:"elapsed"}).appendTo(d.progress);d.progress.click(function(m){var l=(m.pageX-d.progress.offset().left)/d.progress.outerWidth();d.elapsed.width(l*100+"%");d.player.seekTo(Math.round(h.duration*l),true);return false})}var j=false;window["eventListener_"+c.safeID]=function(l){var m;if(l==-1){if(!j){d.control.click(function(){if(!d.container.hasClass("playing")){d.control.removeClass("play replay").addClass("pause");d.container.addClass("playing");d.player.playVideo();if(c.progressBar){m=window.setInterval(function(){d.elapsed.width(((d.player.getCurrentTime()/h.duration)*100)+"%")},1000)}}else{d.control.removeClass("pause").addClass("play");d.container.removeClass("playing");d.player.pauseVideo();if(c.progressBar){window.clearInterval(m)}}});j=true}else{if(d.container.hasClass("playing")){d.control.click()}}}if(l==0){d.control.removeClass("pause").addClass("replay");d.container.removeClass("playing")}};if(!window.onYouTubePlayerReady){window.onYouTubePlayerReady=function(l){document.getElementById("video_"+l).addEventListener("onStateChange","eventListener_"+l)}}},"jsonp");return d.originalDIV}})(jQuery);(function(x,v,u){function r(f,g){var e=(f[0]||0)-(g[0]||0);return e>0||!e&&f.length>0&&r(f.slice(1),g.slice(1))}function q(f){if(typeof f!=w){return f}var h=[],e="";for(var g in f){e=typeof f[g]==w?q(f[g]):[g,d?encodeURI(f[g]):f[g]].join("=");h.push(e)}return h.join("&")}function c(f){var g=[];for(var e in f){f[e]&&g.push([e,'="',f[e],'"'].join(""))}return g.join(" ")}function b(f){var g=[];for(var e in f){g.push(['<param name="',e,'" value="',q(f[e]),'" />'].join(""))}return g.join("")}var w="object",d=true;try{var s=u.description||function(){return(new u("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(a){s="Unavailable"}var y=s.match(/\d+/g)||[0];x[v]={available:y[0]>0,activeX:u&&!u.name,version:{original:s,array:y,string:y.join("."),major:parseInt(y[0],10)||0,minor:parseInt(y[1],10)||0,release:parseInt(y[2],10)||0},hasVersion:function(e){e=/string|number/.test(typeof e)?e.toString().split("."):/object/.test(typeof e)?[e.major,e.minor]:e||[0,0];return r(y,e)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(e){if(!e.swf||this.expressInstallIsActive||!this.available&&!e.hasVersionFail){return false}if(!this.hasVersion(e.hasVersion||1)){this.expressInstallIsActive=true;if(typeof e.hasVersionFail=="function"){if(!e.hasVersionFail.apply(e)){return false}}e={swf:e.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:e.swf,type:"application/x-shockwave-flash",id:e.id||"flash_"+Math.floor(Math.random()*999999999),width:e.width||320,height:e.height||180,style:e.style||""};d=typeof e.useEncode!=="undefined"?e.useEncode:this.encodeParams;e.movie=e.swf;e.wmode=e.wmode||"opaque";delete e.fallback;delete e.hasVersion;delete e.hasVersionFail;delete e.height;delete e.id;delete e.swf;delete e.useEncode;delete e.width;var f=document.createElement("div");f.innerHTML=["<object ",c(attrs),">",b(e),"</object>"].join("");return f.firstChild}};x.fn[v]=function(e){var f=this.find(w).andSelf().filter(w);/string|object/.test(typeof e)&&this.each(function(){var g=x(this),h;e=typeof e==w?e:{swf:e};e.fallback=this;if(h=x[v].create(e)){g.children().remove();g.html(h)}});typeof e=="function"&&f.each(function(){var g=this;g.jsInteractionTimeoutMs=g.jsInteractionTimeoutMs||0;if(g.jsInteractionTimeoutMs<660){g.clientWidth||g.clientHeight?e.call(g):setTimeout(function(){x(g)[v](e)},g.jsInteractionTimeoutMs+66)}});return f}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);(function(a){a.fn.jTruncate=function(b){var c={length:300,minTrail:20,moreText:"more",lessText:"less",ellipsisText:"...",moreAni:"",lessAni:""};var b=a.extend(c,b);return this.each(function(){obj=a(this);var d=obj.html();if(d.length>b.length+b.minTrail){var h=d.indexOf(" ",b.length);if(h!=-1){var h=d.indexOf(" ",b.length);var g=d.substring(0,h);var f=d.substring(h,d.length-1);obj.html(g+'<span class="truncate_ellipsis">'+b.ellipsisText+'</span><span class="truncate_more">'+f+"</span>");obj.find(".truncate_more").css("display","none");obj.append('<div class="clearboth"><a href="#" class="truncate_more_link">'+b.moreText+"</a></div>");var l=a(".truncate_more_link",obj);var j=a(".truncate_more",obj);var e=a(".truncate_ellipsis",obj);l.click(function(){if(l.text()==b.moreText){j.show(b.moreAni);l.text(b.lessText);e.css("display","none")}else{j.hide(b.lessAni);l.text(b.moreText);e.css("display","inline")}return false})}}})}})(jQuery);
  /*!
   * jQuery corner plugin: simple corner rounding
   * Examples and documentation at: http://jquery.malsup.com/corner/
   * version 2.12 (23-MAY-2011)
   * Requires jQuery v1.3.2 or later
   * Dual licensed under the MIT and GPL licenses:
   * http://www.opensource.org/licenses/mit-license.php
   * http://www.gnu.org/licenses/gpl.html
   * Authors: Dave Methvin and Mike Alsup
   */
  (function(c){var a=document.createElement("div").style,h=a.MozBorderRadius!==undefined,l=a.WebkitBorderRadius!==undefined,e=a.borderRadius!==undefined||a.BorderRadius!==undefined,d=document.documentMode||0,n=c.browser.msie&&((c.browser.version<8&&!d)||d<8),j=c.browser.msie&&(function(){var p=document.createElement("div");try{p.style.setExpression("width","0+0");p.style.removeExpression("width")}catch(o){return false}return true})();c.support=c.support||{};c.support.borderRadius=h||l||e;function g(o,q){return parseInt(c.css(o,q))||0}function m(o){o=parseInt(o).toString(16);return(o.length<2)?"0"+o:o}function b(q){while(q){var o=c.css(q,"backgroundColor"),p;if(o&&o!="transparent"&&o!="rgba(0, 0, 0, 0)"){if(o.indexOf("rgb")>=0){p=o.match(/\d+/g);return"#"+m(p[0])+m(p[1])+m(p[2])}return o}if(q.nodeName.toLowerCase()=="html"){break}q=q.parentNode}return"#ffffff"}function f(q,o,p){switch(q){case"round":return Math.round(p*(1-Math.cos(Math.asin(o/p))));case"cool":return Math.round(p*(1+Math.cos(Math.asin(o/p))));case"sharp":return p-o;case"bite":return Math.round(p*(Math.cos(Math.asin((p-o-1)/p))));case"slide":return Math.round(p*(Math.atan2(o,p/o)));case"jut":return Math.round(p*(Math.atan2(p,(p-o-1))));case"curl":return Math.round(p*(Math.atan(o)));case"tear":return Math.round(p*(Math.cos(o)));case"wicked":return Math.round(p*(Math.tan(o)));case"long":return Math.round(p*(Math.sqrt(o)));case"sculpt":return Math.round(p*(Math.log((p-o-1),p)));case"dogfold":case"dog":return(o&1)?(o+1):p;case"dog2":return(o&2)?(o+1):p;case"dog3":return(o&3)?(o+1):p;case"fray":return(o%2)*p;case"notch":return p;case"bevelfold":case"bevel":return o+1;case"steep":return o/2+1;case"invsteep":return(p-o)/2+1}}c.fn.corner=function(o){if(this.length==0){if(!c.isReady&&this.selector){var p=this.selector,q=this.context;c(function(){c(p,q).corner(o)})}return this}return this.each(function(z){var y=c(this),G=[y.attr(c.fn.corner.defaults.metaAttr)||"",o||""].join(" ").toLowerCase(),N=/keep/.test(G),F=((G.match(/cc:(#[0-9a-f]+)/)||[])[1]),r=((G.match(/sc:(#[0-9a-f]+)/)||[])[1]),J=parseInt((G.match(/(\d+)px/)||[])[1])||10,H=/round|bevelfold|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dogfold|dog|invsteep|steep/,u=((G.match(H)||["round"])[0]),v=/dogfold|bevelfold/.test(G),s={T:0,B:1},C={TL:/top|tl|left/.test(G),TR:/top|tr|right/.test(G),BL:/bottom|bl|left/.test(G),BR:/bottom|br|right/.test(G)},K,Q,I,L,B,R,E,O,M,A,P,S,D,x;if(!C.TL&&!C.TR&&!C.BL&&!C.BR){C={TL:1,TR:1,BL:1,BR:1}}if(c.fn.corner.defaults.useNative&&u=="round"&&(e||h||l)&&!F&&!r){if(C.TL){y.css(e?"border-top-left-radius":h?"-moz-border-radius-topleft":"-webkit-border-top-left-radius",J+"px")}if(C.TR){y.css(e?"border-top-right-radius":h?"-moz-border-radius-topright":"-webkit-border-top-right-radius",J+"px")}if(C.BL){y.css(e?"border-bottom-left-radius":h?"-moz-border-radius-bottomleft":"-webkit-border-bottom-left-radius",J+"px")}if(C.BR){y.css(e?"border-bottom-right-radius":h?"-moz-border-radius-bottomright":"-webkit-border-bottom-right-radius",J+"px")}return}K=document.createElement("div");c(K).css({overflow:"hidden",height:"1px",minHeight:"1px",fontSize:"1px",backgroundColor:r||"transparent",borderStyle:"solid"});Q={T:parseInt(c.css(this,"paddingTop"))||0,R:parseInt(c.css(this,"paddingRight"))||0,B:parseInt(c.css(this,"paddingBottom"))||0,L:parseInt(c.css(this,"paddingLeft"))||0};if(typeof this.style.zoom!=undefined){this.style.zoom=1}if(!N){this.style.border="none"}K.style.borderColor=F||b(this.parentNode);I=c(this).outerHeight();for(L in s){B=s[L];if((B&&(C.BL||C.BR))||(!B&&(C.TL||C.TR))){K.style.borderStyle="none "+(C[L+"R"]?"solid":"none")+" none "+(C[L+"L"]?"solid":"none");R=document.createElement("div");c(R).addClass("jquery-corner");E=R.style;B?this.appendChild(R):this.insertBefore(R,this.firstChild);if(B&&I!="auto"){if(c.css(this,"position")=="static"){this.style.position="relative"}E.position="absolute";E.bottom=E.left=E.padding=E.margin="0";if(j){E.setExpression("width","this.parentNode.offsetWidth")}else{E.width="100%"}}else{if(!B&&c.browser.msie){if(c.css(this,"position")=="static"){this.style.position="relative"}E.position="absolute";E.top=E.left=E.right=E.padding=E.margin="0";if(j){O=g(this,"borderLeftWidth")+g(this,"borderRightWidth");E.setExpression("width","this.parentNode.offsetWidth - "+O+'+ "px"')}else{E.width="100%"}}else{E.position="relative";E.margin=!B?"-"+Q.T+"px -"+Q.R+"px "+(Q.T-J)+"px -"+Q.L+"px":(Q.B-J)+"px -"+Q.R+"px -"+Q.B+"px -"+Q.L+"px"}}for(M=0;M<J;M++){A=Math.max(0,f(u,M,J));P=K.cloneNode(false);P.style.borderWidth="0 "+(C[L+"R"]?A:0)+"px 0 "+(C[L+"L"]?A:0)+"px";B?R.appendChild(P):R.insertBefore(P,R.firstChild)}if(v&&c.support.boxModel){if(B&&n){continue}for(S in C){if(!C[S]){continue}if(B&&(S=="TL"||S=="TR")){continue}if(!B&&(S=="BL"||S=="BR")){continue}D={position:"absolute",border:"none",margin:0,padding:0,overflow:"hidden",backgroundColor:K.style.borderColor};x=c("<div/>").css(D).css({width:J+"px",height:"1px"});switch(S){case"TL":x.css({bottom:0,left:0});break;case"TR":x.css({bottom:0,right:0});break;case"BL":x.css({top:0,left:0});break;case"BR":x.css({top:0,right:0});break}R.appendChild(x[0]);var T=c("<div/>").css(D).css({top:0,bottom:0,width:"1px",height:J+"px"});switch(S){case"TL":T.css({left:J});break;case"TR":T.css({right:J});break;case"BL":T.css({left:J});break;case"BR":T.css({right:J});break}R.appendChild(T[0])}}}}})};c.fn.uncorner=function(){if(e||h||l){this.css(e?"border-radius":h?"-moz-border-radius":"-webkit-border-radius",0)}c("div.jquery-corner",this).remove();return this};c.fn.corner.defaults={useNative:true,metaAttr:"data-corner"}})(jQuery);(function(a){a.fn.imagefit=function(b){var c={all:function(d){d.each(function(){c.one(this)})},one:function(d){a(d).width("100%").each(function(){a(this).height(Math.round(a(this).attr("startheight")*(a(this).width()/a(this).attr("startwidth"))))})}};this.each(function(){var d=this;var e=a("img",d).not(a("table img"));e.each(function(){a(this).attr("startwidth",a(this).width()).attr("startheight",a(this).height()).css("max-width",a(this).attr("startwidth")+"px");c.one(this)});a(window).bind("resize",function(){c.all(e)})});return this}})(jQuery);
  /*!
   * jQuery imagesLoaded plugin v1.0.4
   * http://github.com/desandro/imagesloaded
   *
   * MIT License. by Paul Irish et al.
   */
  (function(a,b){a.fn.imagesLoaded=function(j){var g=this,e=g.find("img").add(g.filter("img")),c=e.length,h="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";function f(){j.call(g,e)}function d(l){if(--c<=0&&l.target.src!==h){setTimeout(f);e.unbind("load error",d)}}if(!c){f()}e.bind("load error",d).each(function(){if(this.complete||typeof this.complete==="undefined"){var l=this.src;this.src=h;this.src=l}});return g}})(jQuery);$.fn.sliderNav=function(b){var f={items:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],debug:false,height:null,arrows:true};var e=$.extend(f,b);var g=$.meta?$.extend({},e,$$.data()):e;var d=$(this);$(d).addClass("slider");$(".slider-content li:first",d).addClass("selected");$(d).append('<div class="slider-nav"><ul></ul></div>');for(var c in g.items){$(".slider-nav ul",d).append("<li><a alt='#"+g.items[c]+"'>"+g.items[c]+"</a></li>")}var a=$(".slider-nav",d).height();if(g.height){a=g.height}$(".slider-content, .slider-nav",d).css("height",a);if(g.debug){$(d).append('<div id="debug">Scroll Offset: <span>0</span></div>')}$(".slider-nav a",d).mouseover(function(m){var o=$(this).attr("alt");var j=$(".slider-content",d).offset().top;var l=$(".slider-content "+o,d).offset().top;var h=$(".slider-nav",d).height();if(g.height){h=g.height}var n=(l-j)-h/8;$(".slider-content li",d).removeClass("selected");$(o).addClass("selected");$(".slider-content",d).stop().animate({scrollTop:"+="+n+"px"});if(g.debug){$("#debug span",d).html(l)}});if(g.arrows){$(".slider-nav",d).css("top","20px");$(d).prepend('<div class="slide-up end"><span class="arrow up"></span></div>');$(d).append('<div class="slide-down"><span class="arrow down"></span></div>');$(".slide-down",d).click(function(){$(".slider-content",d).animate({scrollTop:"+="+a+"px"},500)});$(".slide-up",d).click(function(){$(".slider-content",d).animate({scrollTop:"-="+a+"px"},500)})}};$.fn.sliderNav_option=function(b){var f={items:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],debug:false,height:null,arrows:true};var d=$.extend(f,b);var g=$.meta?$.extend({},d,$$.data()):d;var e=$(this);$(e).addClass("slider_option");$(".slider-content li:first",e).addClass("selected");$(e).append('<div class="slider-nav"><ul></ul></div>');for(var c in g.items){$(".slider-nav ul",e).append("<li><a alt='#"+g.items[c]+"'>"+g.items[c]+"</a></li>")}var a=$(".slider-nav",e).height();if(g.height){a=g.height}$(".slider-content, .slider-nav",e).css("height",a);if(g.debug){$(e).append('<div id="debug">Scroll Offset: <span>0</span></div>')}$(".slider-nav a",e).mouseover(function(m){var o=$(this).attr("alt");var j=$(".slider-content",e).offset().top;var l=$(".slider-content "+o,e).offset().top;var h=$(".slider-nav",e).height();if(g.height){h=g.height}var n=(l-j)-h/8;$(".slider-content li",e).removeClass("selected");$(o).addClass("selected");$(".slider-content",e).stop().animate({scrollTop:"+="+n+"px"});if(g.debug){$("#debug span",e).html(l)}});if(g.arrows){$(".slider-nav",e).css("top","20px");$(e).prepend('<div class="slide-up end"><span class="arrow up"></span></div>');$(e).append('<div class="slide-down"><span class="arrow down"></span></div>');$(".slide-down",e).click(function(){$(".slider-content",e).animate({scrollTop:"+="+a+"px"},500)});$(".slide-up",e).click(function(){$(".slider-content",e).animate({scrollTop:"-="+a+"px"},500)})}};