(function(c,s){function N(){if(!d.isReady){try{m.documentElement.doScroll("left")}catch(a){setTimeout(N,1);return}d.ready()}}function b(a,f){f.src?d.ajax({url:f.src,async:false,dataType:"script"}):d.globalEval(f.text||f.textContent||f.innerHTML||"");f.parentNode&&f.parentNode.removeChild(f)}function h(a,f,j,p,k,C){var P=a.length;if(typeof f==="object"){for(var U in f)h(a,U,f[U],p,k,j);return a}if(j!==s){p=!C&&p&&d.isFunction(j);for(U=0;U<P;U++)k(a[U],f,p?j.call(a[U],U,k(a[U],f)):j,C);return a}return P?
k(a[0],f):null}function n(){return(new Date).getTime()}function x(){return false}function E(){return true}function u(a,f,j){j[0].type=a;return d.event.handle.apply(f,j)}function H(a){var f=true,j=[],p=[],k=arguments,C,P,U,S,W,fa=d.extend({},d.data(this,"events").live);for(S in fa){P=fa[S];if(P.live===a.type||P.altLive&&d.inArray(a.type,P.altLive)>-1){C=P.data;C.beforeFilter&&C.beforeFilter[a.type]&&!C.beforeFilter[a.type](a)||p.push(P.selector)}else delete fa[S]}C=d(a.target).closest(p,a.currentTarget);
W=0;for(l=C.length;W<l;W++)for(S in fa){P=fa[S];U=C[W].elem;p=null;if(C[W].selector===P.selector){if(P.live==="mouseenter"||P.live==="mouseleave")p=d(a.relatedTarget).closest(P.selector)[0];if(!p||p!==U)j.push({elem:U,fn:P})}}W=0;for(l=j.length;W<l;W++){C=j[W];a.currentTarget=C.elem;a.data=C.fn.data;if(C.fn.apply(C.elem,k)===false){f=false;break}}return f}function O(a,f){return["live",a,f.replace(/\./g,"`").replace(/ /g,"&")].join(".")}function I(a){return!a||!a.parentNode||a.parentNode.nodeType===
11}function V(a,f){var j=0;f.each(function(){if(this.nodeName===(a[j]&&a[j].nodeName)){var p=d.data(a[j++]),k=d.data(this,p);if(p=p&&p.events){delete k.handle;k.events={};for(var C in p)for(var P in p[C])d.event.add(this,C,p[C][P],p[C][P].data)}}})}function A(a,f,j){var p,k,C;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0){k=true;if(C=d.fragments[a[0]])if(C!==1)p=C}if(!p){f=f&&f[0]?f[0].ownerDocument||f[0]:m;p=f.createDocumentFragment();d.clean(a,f,p,j)}if(k)d.fragments[a[0]]=
C?p:1;return{fragment:p,cacheable:k}}function M(a){for(var f=0,j,p;(j=a[f])!=null;f++)if(!d.noData[j.nodeName.toLowerCase()]&&(p=j[va]))delete d.cache[p]}function F(a,f){var j={};d.each(G.concat.apply([],G.slice(0,f)),function(){j[this]=a});return j}function K(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var d=function(a,f){return new d.fn.init(a,f)},z=c.jQuery,L=c.$,m=c.document,Q,Z=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,X=/^.[^:#\[\.,]*$/,R=/\S/,ca=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,
ea=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,ra=navigator.userAgent,da=false,ia=[],oa,ta=Object.prototype.toString,xa=Object.prototype.hasOwnProperty,pa=Array.prototype.push,Aa=Array.prototype.slice,Ea=Array.prototype.indexOf;d.fn=d.prototype={init:function(a,f){var j,p;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((j=Z.exec(a))&&(j[1]||!f))if(j[1]){p=f?f.ownerDocument||f:m;if(a=ea.exec(a))if(d.isPlainObject(f)){a=[m.createElement(a[1])];d.fn.attr.call(a,
f,true)}else a=[p.createElement(a[1])];else{a=A([j[1]],[p]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(f=m.getElementById(j[2])){if(f.id!==j[2])return Q.find(a);this.length=1;this[0]=f}this.context=m;this.selector=a;return this}else if(!f&&/^\w+$/.test(a)){this.selector=a;this.context=m;a=m.getElementsByTagName(a)}else return!f||f.jquery?(f||Q).find(a):d(f).find(a);else if(d.isFunction(a))return Q.ready(a);if(a.selector!==s){this.selector=a.selector;this.context=a.context}return d.isArray(a)?
this.setArray(a):d.makeArray(a,this)},selector:"",jquery:"1.4",length:0,size:function(){return this.length},toArray:function(){return Aa.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,f,j){a=d(a||null);a.prevObject=this;a.context=this.context;if(f==="find")a.selector=this.selector+(this.selector?" ":"")+j;else if(f)a.selector=this.selector+"."+f+"("+j+")";return a},setArray:function(a){this.length=0;pa.apply(this,a);return this},each:function(a,
f){return d.each(this,a,f)},ready:function(a){d.bindReady();if(d.isReady)a.call(m,d);else ia&&ia.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Aa.apply(this,arguments),"slice",Aa.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(f,j){return a.call(f,j,f)}))},end:function(){return this.prevObject||d(null)},push:pa,sort:[].sort,
splice:[].splice};d.fn.init.prototype=d.fn;d.extend=d.fn.extend=function(){var a=arguments[0]||{},f=1,j=arguments.length,p=false,k,C,P,U;if(typeof a==="boolean"){p=a;a=arguments[1]||{};f=2}if(typeof a!=="object"&&!d.isFunction(a))a={};if(j===f){a=this;--f}for(;f<j;f++)if((k=arguments[f])!=null)for(C in k){P=a[C];U=k[C];if(a!==U)if(p&&U&&(d.isPlainObject(U)||d.isArray(U))){P=P&&(d.isPlainObject(P)||d.isArray(P))?P:d.isArray(U)?[]:{};a[C]=d.extend(p,P,U)}else if(U!==s)a[C]=U}return a};d.extend({noConflict:function(a){c.$=
L;if(a)c.jQuery=z;return d},isReady:false,ready:function(){if(!d.isReady){if(!m.body)return setTimeout(d.ready,13);d.isReady=true;if(ia){for(var a,f=0;a=ia[f++];)a.call(m,d);ia=null}d.fn.triggerHandler&&d(m).triggerHandler("ready")}},bindReady:function(){if(!da){da=true;if(m.readyState==="complete")return d.ready();if(m.addEventListener){m.addEventListener("DOMContentLoaded",oa,false);c.addEventListener("load",d.ready,false)}else if(m.attachEvent){m.attachEvent("onreadystatechange",oa);c.attachEvent("onload",
d.ready);var a=false;try{a=c.frameElement==null}catch(f){}m.documentElement.doScroll&&a&&N()}}},isFunction:function(a){return ta.call(a)==="[object Function]"},isArray:function(a){return ta.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||ta.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!xa.call(a,"constructor")&&!xa.call(a.constructor.prototype,"isPrototypeOf"))return false;var f;for(f in a);return f===s||xa.call(a,f)},isEmptyObject:function(a){for(var f in a)return false;
return true},noop:function(){},globalEval:function(a){if(a&&R.test(a)){var f=m.getElementsByTagName("head")[0]||m.documentElement,j=m.createElement("script");j.type="text/javascript";if(d.support.scriptEval)j.appendChild(m.createTextNode(a));else j.text=a;f.insertBefore(j,f.firstChild);f.removeChild(j)}},nodeName:function(a,f){return a.nodeName&&a.nodeName.toUpperCase()===f.toUpperCase()},each:function(a,f,j){var p,k=0,C=a.length,P=C===s||d.isFunction(a);if(j)if(P)for(p in a){if(f.apply(a[p],j)===
false)break}else for(;k<C;){if(f.apply(a[k++],j)===false)break}else if(P)for(p in a){if(f.call(a[p],p,a[p])===false)break}else for(j=a[0];k<C&&f.call(j,k,j)!==false;j=a[++k]);return a},trim:function(a){return(a||"").replace(ca,"")},makeArray:function(a,f){f=f||[];if(a!=null)a.length==null||typeof a==="string"||d.isFunction(a)||typeof a!=="function"&&a.setInterval?pa.call(f,a):d.merge(f,a);return f},inArray:function(a,f){if(f.indexOf)return f.indexOf(a);for(var j=0,p=f.length;j<p;j++)if(f[j]===a)return j;
return-1},merge:function(a,f){var j=a.length,p=0;if(typeof f.length==="number")for(var k=f.length;p<k;p++)a[j++]=f[p];else for(;f[p]!==s;)a[j++]=f[p++];a.length=j;return a},grep:function(a,f,j){for(var p=[],k=0,C=a.length;k<C;k++)!j!==!f(a[k],k)&&p.push(a[k]);return p},map:function(a,f,j){for(var p=[],k,C=0,P=a.length;C<P;C++){k=f(a[C],C,j);if(k!=null)p[p.length]=k}return p.concat.apply([],p)},guid:1,proxy:function(a,f,j){if(arguments.length===2)if(typeof f==="string"){j=a;a=j[f];f=s}else if(f&&!d.isFunction(f)){j=
f;f=s}if(!f&&a)f=function(){return a.apply(j||this,arguments)};if(a)f.guid=a.guid=a.guid||f.guid||d.guid++;return f},uaMatch:function(a){var f={browser:""};a=a.toLowerCase();if(/webkit/.test(a))f={browser:"webkit",version:/webkit[\/ ]([\w.]+)/};else if(/opera/.test(a))f={browser:"opera",version:/version/.test(a)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/};else if(/msie/.test(a))f={browser:"msie",version:/msie ([\w.]+)/};else if(/mozilla/.test(a)&&!/compatible/.test(a))f={browser:"mozilla",version:/rv:([\w.]+)/};
f.version=(f.version&&f.version.exec(a)||[0,"0"])[1];return f},browser:{}});ra=d.uaMatch(ra);if(ra.browser){d.browser[ra.browser]=true;d.browser.version=ra.version}if(d.browser.webkit)d.browser.safari=true;if(Ea)d.inArray=function(a,f){return Ea.call(f,a)};Q=d(m);if(m.addEventListener)oa=function(){m.removeEventListener("DOMContentLoaded",oa,false);d.ready()};else if(m.attachEvent)oa=function(){if(m.readyState==="complete"){m.detachEvent("onreadystatechange",oa);d.ready()}};if(Ea)d.inArray=function(a,
f){return Ea.call(f,a)};(function(){d.support={};var a=m.documentElement,f=m.createElement("script"),j=m.createElement("div"),p="script"+n();j.style.display="none";j.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var k=j.getElementsByTagName("*"),C=j.getElementsByTagName("a")[0];if(!(!k||!k.length||!C)){d.support={leadingWhitespace:j.firstChild.nodeType===3,tbody:!j.getElementsByTagName("tbody").length,htmlSerialize:!!j.getElementsByTagName("link").length,
style:/red/.test(C.getAttribute("style")),hrefNormalized:C.getAttribute("href")==="/a",opacity:/^0.55$/.test(C.style.opacity),cssFloat:!!C.style.cssFloat,checkOn:j.getElementsByTagName("input")[0].value==="on",optSelected:m.createElement("select").appendChild(m.createElement("option")).selected,scriptEval:false,noCloneEvent:true,boxModel:null};f.type="text/javascript";try{f.appendChild(m.createTextNode("window."+p+"=1;"))}catch(P){}a.insertBefore(f,a.firstChild);if(c[p]){d.support.scriptEval=true;
delete c[p]}a.removeChild(f);if(j.attachEvent&&j.fireEvent){j.attachEvent("onclick",function U(){d.support.noCloneEvent=false;j.detachEvent("onclick",U)});j.cloneNode(true).fireEvent("onclick")}d(function(){var U=m.createElement("div");U.style.width=U.style.paddingLeft="1px";m.body.appendChild(U);d.boxModel=d.support.boxModel=U.offsetWidth===2;m.body.removeChild(U).style.display="none"});a=function(U){var S=m.createElement("div");U="on"+U;var W=U in S;if(!W){S.setAttribute(U,"return;");W=typeof S[U]===
"function"}return W};d.support.submitBubbles=a("submit");d.support.changeBubbles=a("change");a=f=j=k=C=null}})();d.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var va="jQuery"+n(),Fa=0,Ha={},jb={};d.extend({cache:{},expando:va,noData:{embed:true,object:true,applet:true},data:function(a,f,j){if(!(a.nodeName&&d.noData[a.nodeName.toLowerCase()])){a=
a==c?Ha:a;var p=a[va],k=d.cache;if(!f&&!p)return null;p||(p=++Fa);if(typeof f==="object"){a[va]=p;k=k[p]=d.extend(true,{},f)}else k=k[p]?k[p]:typeof j==="undefined"?jb:(k[p]={});if(j!==s){a[va]=p;k[f]=j}return typeof f==="string"?k[f]:k}},removeData:function(a,f){if(!(a.nodeName&&d.noData[a.nodeName.toLowerCase()])){a=a==c?Ha:a;var j=a[va],p=d.cache,k=p[j];if(f){if(k){delete k[f];d.isEmptyObject(k)&&d.removeData(a)}}else{try{delete a[va]}catch(C){a.removeAttribute&&a.removeAttribute(va)}delete p[j]}}}});
d.fn.extend({data:function(a,f){if(typeof a==="undefined"&&this.length)return d.data(this[0]);else if(typeof a==="object")return this.each(function(){d.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(f===s){var p=this.triggerHandler("getData"+j[1]+"!",[j[0]]);if(p===s&&this.length)p=d.data(this[0],a);return p===s&&j[1]?this.data(j[0]):p}else return this.trigger("setData"+j[1]+"!",[j[0],f]).each(function(){d.data(this,a,f)})},removeData:function(a){return this.each(function(){d.removeData(this,
a)})}});d.extend({queue:function(a,f,j){if(a){f=(f||"fx")+"queue";var p=d.data(a,f);if(!j)return p||[];if(!p||d.isArray(j))p=d.data(a,f,d.makeArray(j));else p.push(j);return p}},dequeue:function(a,f){f=f||"fx";var j=d.queue(a,f),p=j.shift();if(p==="inprogress")p=j.shift();if(p){f==="fx"&&j.unshift("inprogress");p.call(a,function(){d.dequeue(a,f)})}}});d.fn.extend({queue:function(a,f){if(typeof a!=="string"){f=a;a="fx"}if(f===s)return d.queue(this[0],a);return this.each(function(){var j=d.queue(this,
a,f);a==="fx"&&j[0]!=="inprogress"&&d.dequeue(this,a)})},dequeue:function(a){return this.each(function(){d.dequeue(this,a)})},delay:function(a,f){a=d.fx?d.fx.speeds[a]||a:a;f=f||"fx";return this.queue(f,function(){var j=this;setTimeout(function(){d.dequeue(j,f)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Ka=/[\n\t]/g,La=/\s+/,kb=/\r/g,lb=/href|src|style/,Oa=/(button|input)/i,wb=/(button|input|object|select|textarea)/i,Ra=/^(a|area)$/i,Za=/radio|checkbox/;d.fn.extend({attr:function(a,
f){return h(this,a,f,true,d.attr)},removeAttr:function(a){return this.each(function(){d.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(d.isFunction(a))return this.each(function(S){var W=d(this);W.addClass(a.call(this,S,W.attr("class")))});if(a&&typeof a==="string")for(var f=(a||"").split(La),j=0,p=this.length;j<p;j++){var k=this[j];if(k.nodeType===1)if(k.className)for(var C=" "+k.className+" ",P=0,U=f.length;P<U;P++){if(C.indexOf(" "+f[P]+" ")<0)k.className+=
" "+f[P]}else k.className=a}return this},removeClass:function(a){if(d.isFunction(a))return this.each(function(S){var W=d(this);W.removeClass(a.call(this,S,W.attr("class")))});if(a&&typeof a==="string"||a===s)for(var f=(a||"").split(La),j=0,p=this.length;j<p;j++){var k=this[j];if(k.nodeType===1&&k.className)if(a){for(var C=(" "+k.className+" ").replace(Ka," "),P=0,U=f.length;P<U;P++)C=C.replace(" "+f[P]+" "," ");k.className=C.substring(1,C.length-1)}else k.className=""}return this},toggleClass:function(a,
f){var j=typeof a,p=typeof f==="boolean";if(d.isFunction(a))return this.each(function(k){var C=d(this);C.toggleClass(a.call(this,k,C.attr("class"),f),f)});return this.each(function(){if(j==="string")for(var k,C=0,P=d(this),U=f,S=a.split(La);k=S[C++];){U=p?U:!P.hasClass(k);P[U?"addClass":"removeClass"](k)}else if(j==="undefined"||j==="boolean"){this.className&&d.data(this,"__className__",this.className);this.className=this.className||a===false?"":d.data(this,"__className__")||""}})},hasClass:function(a){a=
" "+a+" ";for(var f=0,j=this.length;f<j;f++)if((" "+this[f].className+" ").replace(Ka," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===s){var f=this[0];if(f){if(d.nodeName(f,"option"))return(f.attributes.value||{}).specified?f.value:f.text;if(d.nodeName(f,"select")){var j=f.selectedIndex,p=[],k=f.options;f=f.type==="select-one";if(j<0)return null;var C=f?j:0;for(j=f?j+1:k.length;C<j;C++){var P=k[C];if(P.selected){a=d(P).val();if(f)return a;p.push(a)}}return p}if(Za.test(f.type)&&
!d.support.checkOn)return f.getAttribute("value")===null?"on":f.value;return(f.value||"").replace(kb,"")}return s}var U=d.isFunction(a);return this.each(function(S){var W=d(this),fa=a;if(this.nodeType===1){if(U)fa=a.call(this,S,W.val());if(typeof fa==="number")fa+="";if(d.isArray(fa)&&Za.test(this.type))this.checked=d.inArray(W.val(),fa)>=0;else if(d.nodeName(this,"select")){var ma=d.makeArray(fa);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),ma)>=0});if(!ma.length)this.selectedIndex=
-1}else this.value=fa}})}});d.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,f,j,p){if(!a||a.nodeType===3||a.nodeType===8)return s;if(p&&f in d.attrFn)return d(a)[f](j);p=a.nodeType!==1||!d.isXMLDoc(a);var k=j!==s;f=p&&d.props[f]||f;if(a.nodeType===1){var C=lb.test(f);if(f in a&&p&&!C){if(k){if(f==="type"&&Oa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[f]=j}if(d.nodeName(a,"form")&&a.getAttributeNode(f))return a.getAttributeNode(f).nodeValue;
if(f==="tabIndex")return(f=a.getAttributeNode("tabIndex"))&&f.specified?f.value:wb.test(a.nodeName)||Ra.test(a.nodeName)&&a.href?0:s;return a[f]}if(!d.support.style&&p&&f==="style"){if(k)a.style.cssText=""+j;return a.style.cssText}k&&a.setAttribute(f,""+j);a=!d.support.hrefNormalized&&p&&C?a.getAttribute(f,2):a.getAttribute(f);return a===null?s:a}return d.style(a,f,j)}});var mb=function(a){return a.replace(/[^\w\s\.\|`]/g,function(f){return"\\"+f})};d.event={add:function(a,f,j,p){if(!(a.nodeType===
3||a.nodeType===8)){if(a.setInterval&&a!==c&&!a.frameElement)a=c;if(!j.guid)j.guid=d.guid++;if(p!==s){j=d.proxy(j);j.data=p}var k=d.data(a,"events")||d.data(a,"events",{}),C=d.data(a,"handle"),P;if(!C){P=function(){return typeof d!=="undefined"&&!d.event.triggered?d.event.handle.apply(P.elem,arguments):s};C=d.data(a,"handle",P)}if(C){C.elem=a;f=f.split(/\s+/);for(var U,S=0;U=f[S++];){var W=U.split(".");U=W.shift();j.type=W.slice(0).sort().join(".");var fa=k[U],ma=this.special[U]||{};if(!fa){fa=k[U]=
{};if(!ma.setup||ma.setup.call(a,p,W,j)===false)if(a.addEventListener)a.addEventListener(U,C,false);else a.attachEvent&&a.attachEvent("on"+U,C)}if(ma.add)if((W=ma.add.call(a,j,p,W,fa))&&d.isFunction(W)){W.guid=W.guid||j.guid;j=W}fa[j.guid]=j;this.global[U]=true}a=null}}},global:{},remove:function(a,f,j){if(!(a.nodeType===3||a.nodeType===8)){var p=d.data(a,"events"),k,C,P;if(p){if(f===s||typeof f==="string"&&f.charAt(0)===".")for(C in p)this.remove(a,C+(f||""));else{if(f.type){j=f.handler;f=f.type}f=
f.split(/\s+/);for(var U=0;C=f[U++];){var S=C.split(".");C=S.shift();var W=!S.length,fa=d.map(S.slice(0).sort(),mb);fa=new RegExp("(^|\\.)"+fa.join("\\.(?:.*\\.)?")+"(\\.|$)");var ma=this.special[C]||{};if(p[C]){if(j){P=p[C][j.guid];delete p[C][j.guid]}else for(var qa in p[C])if(W||fa.test(p[C][qa].type))delete p[C][qa];ma.remove&&ma.remove.call(a,S,P);for(k in p[C])break;if(!k){if(!ma.teardown||ma.teardown.call(a,S)===false)if(a.removeEventListener)a.removeEventListener(C,d.data(a,"handle"),false);
else a.detachEvent&&a.detachEvent("on"+C,d.data(a,"handle"));k=null;delete p[C]}}}}for(k in p)break;if(!k){if(qa=d.data(a,"handle"))qa.elem=null;d.removeData(a,"events");d.removeData(a,"handle")}}}},trigger:function(a,f,j,p){var k=a.type||a;if(!p){a=typeof a==="object"?a[va]?a:d.extend(d.Event(k),a):d.Event(k);if(k.indexOf("!")>=0){a.type=k=k.slice(0,-1);a.exclusive=true}if(!j){a.stopPropagation();this.global[k]&&d.each(d.cache,function(){this.events&&this.events[k]&&d.event.trigger(a,f,this.handle.elem)})}if(!j||
j.nodeType===3||j.nodeType===8)return s;a.result=s;a.target=j;f=d.makeArray(f);f.unshift(a)}a.currentTarget=j;var C=d.data(j,"handle");C&&C.apply(j,f);var P,U;try{if(!(j&&j.nodeName&&d.noData[j.nodeName.toLowerCase()])){P=j[k];U=j["on"+k]}}catch(S){}C=d.nodeName(j,"a")&&k==="click";if(!p&&P&&!a.isDefaultPrevented()&&!C){this.triggered=true;try{j[k]()}catch(W){}}else if(U&&j["on"+k].apply(j,f)===false)a.result=false;this.triggered=false;a.isPropagationStopped()||(j=j.parentNode||j.ownerDocument)&&
d.event.trigger(a,f,j,true)},handle:function(a){var f,j;a=arguments[0]=d.event.fix(a||c.event);a.currentTarget=this;j=a.type.split(".");a.type=j.shift();f=!j.length&&!a.exclusive;var p=new RegExp("(^|\\.)"+j.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");j=(d.data(this,"events")||{})[a.type];for(var k in j){var C=j[k];if(f||p.test(C.type)){a.handler=C;a.data=C.data;C=C.apply(this,arguments);if(C!==s){a.result=C;if(C===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.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 originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[va])return a;var f=a;a=d.Event(f);for(var j=this.props.length,p;j;){p=this.props[--j];a[p]=f[p]}if(!a.target)a.target=a.srcElement||
m;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){f=m.documentElement;j=m.body;a.pageX=a.clientX+(f&&f.scrollLeft||j&&j.scrollLeft||0)-(f&&f.clientLeft||j&&j.clientLeft||0);a.pageY=a.clientY+(f&&f.scrollTop||j&&j.scrollTop||0)-(f&&f.clientTop||j&&j.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&
a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==s)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:d.proxy,special:{ready:{setup:d.bindReady,teardown:d.noop},live:{add:function(a,f){d.extend(a,f||{});a.guid+=f.selector+f.live;d.event.add(this,f.live,H,f)},remove:function(a){if(a.length){var f=0,j=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");d.each(d.data(this,"events").live||{},function(){j.test(this.type)&&f++});f<1&&d.event.remove(this,a[0],H)}},special:{}},beforeunload:{setup:function(a,
f,j){if(this.setInterval)this.onbeforeunload=j;return false},teardown:function(a,f){if(this.onbeforeunload===f)this.onbeforeunload=null}}}};d.Event=function(a){if(!this.preventDefault)return new d.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=n();this[va]=true};d.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=
E;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E;this.stopPropagation()},isDefaultPrevented:x,isPropagationStopped:x,isImmediatePropagationStopped:x};var Sa=function(a){for(var f=a.relatedTarget;f&&f!==this;)try{f=f.parentNode}catch(j){break}if(f!==this){a.type=a.data;d.event.handle.apply(this,arguments)}},Ja=function(a){a.type=a.data;d.event.handle.apply(this,arguments)};d.each({mouseenter:"mouseover",
mouseleave:"mouseout"},function(a,f){d.event.special[a]={setup:function(j){d.event.add(this,f,j&&j.selector?Ja:Sa,a)},teardown:function(j){d.event.remove(this,f,j&&j.selector?Ja:Sa)}}});if(!d.support.submitBubbles)d.event.special.submit={setup:function(a,f,j){if(this.nodeName.toLowerCase()!=="form"){d.event.add(this,"click.specialSubmit."+j.guid,function(p){var k=p.target,C=k.type;if((C==="submit"||C==="image")&&d(k).closest("form").length)return u("submit",this,arguments)});d.event.add(this,"keypress.specialSubmit."+
j.guid,function(p){var k=p.target,C=k.type;if((C==="text"||C==="password")&&d(k).closest("form").length&&p.keyCode===13)return u("submit",this,arguments)})}else return false},remove:function(a,f){d.event.remove(this,"click.specialSubmit"+(f?"."+f.guid:""));d.event.remove(this,"keypress.specialSubmit"+(f?"."+f.guid:""))}};if(!d.support.changeBubbles){var Ta=/textarea|input|select/i;function $a(a){var f=a.type,j=a.value;if(f==="radio"||f==="checkbox")j=a.checked;else if(f==="select-multiple")j=a.selectedIndex>
-1?d.map(a.options,function(p){return p.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")j=a.selectedIndex;return j}function Ua(a,f){var j=a.target,p,k;if(!(!Ta.test(j.nodeName)||j.readOnly)){p=d.data(j,"_change_data");k=$a(j);if(k!==p){if(a.type!=="focusout"||j.type!=="radio")d.data(j,"_change_data",k);if(j.type!=="select"&&(p!=null||k)){a.type="change";return d.event.trigger(a,f,this)}}}}d.event.special.change={filters:{focusout:Ua,click:function(a){var f=a.target,j=f.type;if(j===
"radio"||j==="checkbox"||f.nodeName.toLowerCase()==="select")return Ua.call(this,a)},keydown:function(a){var f=a.target,j=f.type;if(a.keyCode===13&&f.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(j==="checkbox"||j==="radio")||j==="select-multiple")return Ua.call(this,a)},beforeactivate:function(a){a=a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&d.data(a,"_change_data",$a(a))}},setup:function(a,f,j){for(var p in Pa)d.event.add(this,p+".specialChange."+j.guid,Pa[p]);return Ta.test(this.nodeName)},
remove:function(a,f){for(var j in Pa)d.event.remove(this,j+".specialChange"+(f?"."+f.guid:""),Pa[j]);return Ta.test(this.nodeName)}};var Pa=d.event.special.change.filters}m.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,f){function j(p){p=d.event.fix(p);p.type=f;return d.event.handle.call(this,p)}d.event.special[f]={setup:function(){this.addEventListener(a,j,true)},teardown:function(){this.removeEventListener(a,j,true)}}});d.each(["bind","one"],function(a,f){d.fn[f]=function(j,
p,k){if(typeof j==="object"){for(var C in j)this[f](C,p,j[C],k);return this}if(d.isFunction(p)){thisObject=k;k=p;p=s}var P=f==="one"?d.proxy(k,function(U){d(this).unbind(U,P);return k.apply(this,arguments)}):k;return j==="unload"&&f!=="one"?this.one(j,p,k,thisObject):this.each(function(){d.event.add(this,j,P,p)})}});d.fn.extend({unbind:function(a,f){if(typeof a==="object"&&!a.preventDefault){for(var j in a)this.unbind(j,a[j]);return this}return this.each(function(){d.event.remove(this,a,f)})},trigger:function(a,
f){return this.each(function(){d.event.trigger(a,f,this)})},triggerHandler:function(a,f){if(this[0]){a=d.Event(a);a.preventDefault();a.stopPropagation();d.event.trigger(a,f,this[0]);return a.result}},toggle:function(a){for(var f=arguments,j=1;j<f.length;)d.proxy(a,f[j++]);return this.click(d.proxy(a,function(p){var k=(d.data(this,"lastToggle"+a.guid)||0)%j;d.data(this,"lastToggle"+a.guid,k+1);p.preventDefault();return f[k].apply(this,arguments)||false}))},hover:function(a,f){return this.mouseenter(a).mouseleave(f||
a)},live:function(a,f,j){if(d.isFunction(f)){j=f;f=s}d(this.context).bind(O(a,this.selector),{data:f,selector:this.selector,live:a},j);return this},die:function(a,f){d(this.context).unbind(O(a,this.selector),f?{guid:f.guid+this.selector+a}:null);return this}});d.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(a,f){d.fn[f]=function(j){return j?
this.bind(f,j):this.trigger(f)};if(d.attrFn)d.attrFn[f]=true});c.attachEvent&&!c.addEventListener&&c.attachEvent("onunload",function(){for(var a in d.cache)if(d.cache[a].handle)try{d.event.remove(d.cache[a].handle.elem)}catch(f){}});(function(){function a(y){for(var J="",T,Y=0;y[Y];Y++){T=y[Y];if(T.nodeType===3||T.nodeType===4)J+=T.nodeValue;else if(T.nodeType!==8)J+=a(T.childNodes)}return J}function f(y,J,T,Y,ba,aa){ba=0;for(var ka=Y.length;ba<ka;ba++){var ha=Y[ba];if(ha){ha=ha[y];for(var na=false;ha;){if(ha.sizcache===
T){na=Y[ha.sizset];break}if(ha.nodeType===1&&!aa){ha.sizcache=T;ha.sizset=ba}if(ha.nodeName.toLowerCase()===J){na=ha;break}ha=ha[y]}Y[ba]=na}}}function j(y,J,T,Y,ba,aa){ba=0;for(var ka=Y.length;ba<ka;ba++){var ha=Y[ba];if(ha){ha=ha[y];for(var na=false;ha;){if(ha.sizcache===T){na=Y[ha.sizset];break}if(ha.nodeType===1){if(!aa){ha.sizcache=T;ha.sizset=ba}if(typeof J!=="string"){if(ha===J){na=true;break}}else if(S.filter(J,[ha]).length>0){na=ha;break}}ha=ha[y]}Y[ba]=na}}}var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
k=0,C=Object.prototype.toString,P=false,U=true;[0,0].sort(function(){U=false;return 0});var S=function(y,J,T,Y){T=T||[];var ba=J=J||m;if(J.nodeType!==1&&J.nodeType!==9)return[];if(!y||typeof y!=="string")return T;for(var aa=[],ka,ha,na,ab,Ma=true,Va=la(J),Na=y;(p.exec(""),ka=p.exec(Na))!==null;){Na=ka[3];aa.push(ka[1]);if(ka[2]){ab=ka[3];break}}if(aa.length>1&&fa.exec(y))if(aa.length===2&&W.relative[aa[0]])ha=xb(aa[0]+aa[1],J);else for(ha=W.relative[aa[0]]?[J]:S(aa.shift(),J);aa.length;){y=aa.shift();
if(W.relative[y])y+=aa.shift();ha=xb(y,ha)}else{if(!Y&&aa.length>1&&J.nodeType===9&&!Va&&W.match.ID.test(aa[0])&&!W.match.ID.test(aa[aa.length-1])){ka=S.find(aa.shift(),J,Va);J=ka.expr?S.filter(ka.expr,ka.set)[0]:ka.set[0]}if(J){ka=Y?{expr:aa.pop(),set:qa(Y)}:S.find(aa.pop(),aa.length===1&&(aa[0]==="~"||aa[0]==="+")&&J.parentNode?J.parentNode:J,Va);ha=ka.expr?S.filter(ka.expr,ka.set):ka.set;if(aa.length>0)na=qa(ha);else Ma=false;for(;aa.length;){var Ba=aa.pop();ka=Ba;if(W.relative[Ba])ka=aa.pop();
else Ba="";if(ka==null)ka=J;W.relative[Ba](na,ka,Va)}}else na=[]}na||(na=ha);if(!na)throw"Syntax error, unrecognized expression: "+(Ba||y);if(C.call(na)==="[object Array]")if(Ma)if(J&&J.nodeType===1)for(y=0;na[y]!=null;y++){if(na[y]&&(na[y]===true||na[y].nodeType===1&&Ca(J,na[y])))T.push(ha[y])}else for(y=0;na[y]!=null;y++)na[y]&&na[y].nodeType===1&&T.push(ha[y]);else T.push.apply(T,na);else qa(na,T);if(ab){S(ab,ba,T,Y);S.uniqueSort(T)}return T};S.uniqueSort=function(y){if(za){P=U;y.sort(za);if(P)for(var J=
1;J<y.length;J++)y[J]===y[J-1]&&y.splice(J--,1)}return y};S.matches=function(y,J){return S(y,null,null,J)};S.find=function(y,J,T){var Y,ba;if(!y)return[];for(var aa=0,ka=W.order.length;aa<ka;aa++){var ha=W.order[aa];if(ba=W.leftMatch[ha].exec(y)){var na=ba[1];ba.splice(1,1);if(na.substr(na.length-1)!=="\\"){ba[1]=(ba[1]||"").replace(/\\/g,"");Y=W.find[ha](ba,J,T);if(Y!=null){y=y.replace(W.match[ha],"");break}}}}Y||(Y=J.getElementsByTagName("*"));return{set:Y,expr:y}};S.filter=function(y,J,T,Y){for(var ba=
y,aa=[],ka=J,ha,na,ab=J&&J[0]&&la(J[0]);y&&J.length;){for(var Ma in W.filter)if((ha=W.leftMatch[Ma].exec(y))!=null&&ha[2]){var Va=W.filter[Ma],Na,Ba;Ba=ha[1];na=false;ha.splice(1,1);if(Ba.substr(Ba.length-1)!=="\\"){if(ka===aa)aa=[];if(W.preFilter[Ma])if(ha=W.preFilter[Ma](ha,ka,T,aa,Y,ab)){if(ha===true)continue}else na=Na=true;if(ha)for(var nb=0;(Ba=ka[nb])!=null;nb++)if(Ba){Na=Va(Ba,ha,nb,ka);var Ab=Y^!!Na;if(T&&Na!=null)if(Ab)na=true;else ka[nb]=false;else if(Ab){aa.push(Ba);na=true}}if(Na!==s){T||
(ka=aa);y=y.replace(W.match[Ma],"");if(!na)return[];break}}}if(y===ba)if(na==null)throw"Syntax error, unrecognized expression: "+y;else break;ba=y}return ka};var W=S.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|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(y){return y.getAttribute("href")}},relative:{"+":function(y,J){var T=typeof J==="string",Y=T&&!/\W/.test(J);T=T&&!Y;if(Y)J=J.toLowerCase();Y=0;for(var ba=y.length,aa;Y<ba;Y++)if(aa=y[Y]){for(;(aa=aa.previousSibling)&&aa.nodeType!==1;);y[Y]=T||aa&&aa.nodeName.toLowerCase()===
J?aa||false:aa===J}T&&S.filter(J,y,true)},">":function(y,J){var T=typeof J==="string";if(T&&!/\W/.test(J)){J=J.toLowerCase();for(var Y=0,ba=y.length;Y<ba;Y++){var aa=y[Y];if(aa){T=aa.parentNode;y[Y]=T.nodeName.toLowerCase()===J?T:false}}}else{Y=0;for(ba=y.length;Y<ba;Y++)if(aa=y[Y])y[Y]=T?aa.parentNode:aa.parentNode===J;T&&S.filter(J,y,true)}},"":function(y,J,T){var Y=k++,ba=j;if(typeof J==="string"&&!/\W/.test(J)){var aa=J=J.toLowerCase();ba=f}ba("parentNode",J,Y,y,aa,T)},"~":function(y,J,T){var Y=
k++,ba=j;if(typeof J==="string"&&!/\W/.test(J)){var aa=J=J.toLowerCase();ba=f}ba("previousSibling",J,Y,y,aa,T)}},find:{ID:function(y,J,T){if(typeof J.getElementById!=="undefined"&&!T)return(y=J.getElementById(y[1]))?[y]:[]},NAME:function(y,J){if(typeof J.getElementsByName!=="undefined"){var T=[];J=J.getElementsByName(y[1]);for(var Y=0,ba=J.length;Y<ba;Y++)J[Y].getAttribute("name")===y[1]&&T.push(J[Y]);return T.length===0?null:T}},TAG:function(y,J){return J.getElementsByTagName(y[1])}},preFilter:{CLASS:function(y,
J,T,Y,ba,aa){y=" "+y[1].replace(/\\/g,"")+" ";if(aa)return y;aa=0;for(var ka;(ka=J[aa])!=null;aa++)if(ka)if(ba^(ka.className&&(" "+ka.className+" ").replace(/[\t\n]/g," ").indexOf(y)>=0))T||Y.push(ka);else if(T)J[aa]=false;return false},ID:function(y){return y[1].replace(/\\/g,"")},TAG:function(y){return y[1].toLowerCase()},CHILD:function(y){if(y[1]==="nth"){var J=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(y[2]==="even"&&"2n"||y[2]==="odd"&&"2n+1"||!/\D/.test(y[2])&&"0n+"+y[2]||y[2]);y[2]=J[1]+(J[2]||1)-0;y[3]=
J[3]-0}y[0]=k++;return y},ATTR:function(y,J,T,Y,ba,aa){J=y[1].replace(/\\/g,"");if(!aa&&W.attrMap[J])y[1]=W.attrMap[J];if(y[2]==="~=")y[4]=" "+y[4]+" ";return y},PSEUDO:function(y,J,T,Y,ba){if(y[1]==="not")if((p.exec(y[3])||"").length>1||/^\w/.test(y[3]))y[3]=S(y[3],null,null,J);else{y=S.filter(y[3],J,T,true^ba);T||Y.push.apply(Y,y);return false}else if(W.match.POS.test(y[0])||W.match.CHILD.test(y[0]))return true;return y},POS:function(y){y.unshift(true);return y}},filters:{enabled:function(y){return y.disabled===
false&&y.type!=="hidden"},disabled:function(y){return y.disabled===true},checked:function(y){return y.checked===true},selected:function(y){return y.selected===true},parent:function(y){return!!y.firstChild},empty:function(y){return!y.firstChild},has:function(y,J,T){return!!S(T[3],y).length},header:function(y){return/h\d/i.test(y.nodeName)},text:function(y){return"text"===y.type},radio:function(y){return"radio"===y.type},checkbox:function(y){return"checkbox"===y.type},file:function(y){return"file"===
y.type},password:function(y){return"password"===y.type},submit:function(y){return"submit"===y.type},image:function(y){return"image"===y.type},reset:function(y){return"reset"===y.type},button:function(y){return"button"===y.type||y.nodeName.toLowerCase()==="button"},input:function(y){return/input|select|textarea|button/i.test(y.nodeName)}},setFilters:{first:function(y,J){return J===0},last:function(y,J,T,Y){return J===Y.length-1},even:function(y,J){return J%2===0},odd:function(y,J){return J%2===1},
lt:function(y,J,T){return J<T[3]-0},gt:function(y,J,T){return J>T[3]-0},nth:function(y,J,T){return T[3]-0===J},eq:function(y,J,T){return T[3]-0===J}},filter:{PSEUDO:function(y,J,T,Y){var ba=J[1],aa=W.filters[ba];if(aa)return aa(y,T,J,Y);else if(ba==="contains")return(y.textContent||y.innerText||a([y])||"").indexOf(J[3])>=0;else if(ba==="not"){J=J[3];T=0;for(Y=J.length;T<Y;T++)if(J[T]===y)return false;return true}else throw"Syntax error, unrecognized expression: "+ba;},CHILD:function(y,J){var T=J[1],
Y=y;switch(T){case "only":case "first":for(;Y=Y.previousSibling;)if(Y.nodeType===1)return false;if(T==="first")return true;Y=y;case "last":for(;Y=Y.nextSibling;)if(Y.nodeType===1)return false;return true;case "nth":T=J[2];var ba=J[3];if(T===1&&ba===0)return true;J=J[0];var aa=y.parentNode;if(aa&&(aa.sizcache!==J||!y.nodeIndex)){var ka=0;for(Y=aa.firstChild;Y;Y=Y.nextSibling)if(Y.nodeType===1)Y.nodeIndex=++ka;aa.sizcache=J}y=y.nodeIndex-ba;return T===0?y===0:y%T===0&&y/T>=0}},ID:function(y,J){return y.nodeType===
1&&y.getAttribute("id")===J},TAG:function(y,J){return J==="*"&&y.nodeType===1||y.nodeName.toLowerCase()===J},CLASS:function(y,J){return(" "+(y.className||y.getAttribute("class"))+" ").indexOf(J)>-1},ATTR:function(y,J){var T=J[1];y=W.attrHandle[T]?W.attrHandle[T](y):y[T]!=null?y[T]:y.getAttribute(T);T=y+"";var Y=J[2];J=J[4];return y==null?Y==="!=":Y==="="?T===J:Y==="*="?T.indexOf(J)>=0:Y==="~="?(" "+T+" ").indexOf(J)>=0:!J?T&&y!==false:Y==="!="?T!==J:Y==="^="?T.indexOf(J)===0:Y==="$="?T.substr(T.length-
J.length)===J:Y==="|="?T===J||T.substr(0,J.length+1)===J+"-":false},POS:function(y,J,T,Y){var ba=W.setFilters[J[2]];if(ba)return ba(y,T,J,Y)}}},fa=W.match.POS;for(var ma in W.match){W.match[ma]=new RegExp(W.match[ma].source+/(?![^\[]*\])(?![^\(]*\))/.source);W.leftMatch[ma]=new RegExp(/(^(?:.|\r|\n)*?)/.source+W.match[ma].source.replace(/\\(\d+)/g,function(y,J){return"\\"+(J-0+1)}))}var qa=function(y,J){y=Array.prototype.slice.call(y,0);if(J){J.push.apply(J,y);return J}return y};try{Array.prototype.slice.call(m.documentElement.childNodes,
0)}catch(wa){qa=function(y,J){J=J||[];if(C.call(y)==="[object Array]")Array.prototype.push.apply(J,y);else if(typeof y.length==="number")for(var T=0,Y=y.length;T<Y;T++)J.push(y[T]);else for(T=0;y[T];T++)J.push(y[T]);return J}}var za;if(m.documentElement.compareDocumentPosition)za=function(y,J){if(!y.compareDocumentPosition||!J.compareDocumentPosition){if(y==J)P=true;return y.compareDocumentPosition?-1:1}y=y.compareDocumentPosition(J)&4?-1:y===J?0:1;if(y===0)P=true;return y};else if("sourceIndex"in
m.documentElement)za=function(y,J){if(!y.sourceIndex||!J.sourceIndex){if(y==J)P=true;return y.sourceIndex?-1:1}y=y.sourceIndex-J.sourceIndex;if(y===0)P=true;return y};else if(m.createRange)za=function(y,J){if(!y.ownerDocument||!J.ownerDocument){if(y==J)P=true;return y.ownerDocument?-1:1}var T=y.ownerDocument.createRange(),Y=J.ownerDocument.createRange();T.setStart(y,0);T.setEnd(y,0);Y.setStart(J,0);Y.setEnd(J,0);y=T.compareBoundaryPoints(Range.START_TO_END,Y);if(y===0)P=true;return y};(function(){var y=
m.createElement("div"),J="script"+(new Date).getTime();y.innerHTML="<a name='"+J+"'/>";var T=m.documentElement;T.insertBefore(y,T.firstChild);if(m.getElementById(J)){W.find.ID=function(Y,ba,aa){if(typeof ba.getElementById!=="undefined"&&!aa)return(ba=ba.getElementById(Y[1]))?ba.id===Y[1]||typeof ba.getAttributeNode!=="undefined"&&ba.getAttributeNode("id").nodeValue===Y[1]?[ba]:s:[]};W.filter.ID=function(Y,ba){var aa=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===
1&&aa&&aa.nodeValue===ba}}T.removeChild(y);T=y=null})();(function(){var y=m.createElement("div");y.appendChild(m.createComment(""));if(y.getElementsByTagName("*").length>0)W.find.TAG=function(J,T){T=T.getElementsByTagName(J[1]);if(J[1]==="*"){J=[];for(var Y=0;T[Y];Y++)T[Y].nodeType===1&&J.push(T[Y]);T=J}return T};y.innerHTML="<a href='#'></a>";if(y.firstChild&&typeof y.firstChild.getAttribute!=="undefined"&&y.firstChild.getAttribute("href")!=="#")W.attrHandle.href=function(J){return J.getAttribute("href",
2)};y=null})();m.querySelectorAll&&function(){var y=S,J=m.createElement("div");J.innerHTML="<p class='TEST'></p>";if(!(J.querySelectorAll&&J.querySelectorAll(".TEST").length===0)){S=function(Y,ba,aa,ka){ba=ba||m;if(!ka&&ba.nodeType===9&&!la(ba))try{return qa(ba.querySelectorAll(Y),aa)}catch(ha){}return y(Y,ba,aa,ka)};for(var T in y)S[T]=y[T];J=null}}();(function(){var y=m.createElement("div");y.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!y.getElementsByClassName||y.getElementsByClassName("e").length===
0)){y.lastChild.className="e";if(y.getElementsByClassName("e").length!==1){W.order.splice(1,0,"CLASS");W.find.CLASS=function(J,T,Y){if(typeof T.getElementsByClassName!=="undefined"&&!Y)return T.getElementsByClassName(J[1])};y=null}}})();var Ca=m.compareDocumentPosition?function(y,J){return y.compareDocumentPosition(J)&16}:function(y,J){return y!==J&&(y.contains?y.contains(J):true)},la=function(y){return(y=(y?y.ownerDocument||y:0).documentElement)?y.nodeName!=="HTML":false},xb=function(y,J){var T=
[],Y="",ba;for(J=J.nodeType?[J]:J;ba=W.match.PSEUDO.exec(y);){Y+=ba[0];y=y.replace(W.match.PSEUDO,"")}y=W.relative[y]?y+"*":y;ba=0;for(var aa=J.length;ba<aa;ba++)S(y,J[ba],T);return S.filter(Y,T)};d.find=S;d.expr=S.selectors;d.expr[":"]=d.expr.filters;d.unique=S.uniqueSort;d.getText=a;d.isXMLDoc=la;d.contains=Ca})();var ob=/Until$/,pb=/^(?:parents|prevUntil|prevAll)/,yb=/,/;Aa=Array.prototype.slice;var ja=function(a,f,j){if(d.isFunction(f))return d.grep(a,function(k,C){return!!f.call(k,C,k)===j});
else if(f.nodeType)return d.grep(a,function(k){return k===f===j});else if(typeof f==="string"){var p=d.grep(a,function(k){return k.nodeType===1});if(X.test(f))return d.filter(f,p,!j);else f=d.filter(f,a)}return d.grep(a,function(k){return d.inArray(k,f)>=0===j})};d.fn.extend({find:function(a){for(var f=this.pushStack("","find",a),j=0,p=0,k=this.length;p<k;p++){j=f.length;d.find(a,this[p],f);if(p>0)for(var C=j;C<f.length;C++)for(var P=0;P<j;P++)if(f[P]===f[C]){f.splice(C--,1);break}}return f},has:function(a){var f=
d(a);return this.filter(function(){for(var j=0,p=f.length;j<p;j++)if(d.contains(this,f[j]))return true})},not:function(a){return this.pushStack(ja(this,a,false),"not",a)},filter:function(a){return this.pushStack(ja(this,a,true),"filter",a)},is:function(a){return!!a&&d.filter(a,this).length>0},closest:function(a,f){if(d.isArray(a)){var j=[],p=this[0],k,C={},P;if(p&&a.length){k=0;for(var U=a.length;k<U;k++){P=a[k];C[P]||(C[P]=d.expr.match.POS.test(P)?d(P,f||this.context):P)}for(;p&&p.ownerDocument&&
p!==f;){for(P in C){k=C[P];if(k.jquery?k.index(p)>-1:d(p).is(k)){j.push({selector:P,elem:p});delete C[P]}}p=p.parentNode}}return j}var S=d.expr.match.POS.test(a)?d(a,f||this.context):null;return this.map(function(W,fa){for(;fa&&fa.ownerDocument&&fa!==f;){if(S?S.index(fa)>-1:d(fa).is(a))return fa;fa=fa.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,f){a=typeof a===
"string"?d(a,f||this.context):d.makeArray(a);f=d.merge(this.get(),a);return this.pushStack(I(a[0])||I(f[0])?f:d.unique(f))},andSelf:function(){return this.add(this.prevObject)}});d.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,f,j){return d.dir(a,"parentNode",j)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,
"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,f,j){return d.dir(a,"nextSibling",j)},prevUntil:function(a,f,j){return d.dir(a,"previousSibling",j)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,f){d.fn[a]=function(j,p){var k=d.map(this,f,j);ob.test(a)||
(p=j);if(p&&typeof p==="string")k=d.filter(p,k);k=this.length>1?d.unique(k):k;if((this.length>1||yb.test(p))&&pb.test(a))k=k.reverse();return this.pushStack(k,a,Aa.call(arguments).join(","))}});d.extend({filter:function(a,f,j){if(j)a=":not("+a+")";return d.find.matches(a,f)},dir:function(a,f,j){var p=[];for(a=a[f];a&&a.nodeType!==9&&(j===s||!d(a).is(j));){a.nodeType===1&&p.push(a);a=a[f]}return p},nth:function(a,f,j){f=f||1;for(var p=0;a;a=a[j])if(a.nodeType===1&&++p===f)break;return a},sibling:function(a,
f){for(var j=[];a;a=a.nextSibling)a.nodeType===1&&a!==f&&j.push(a);return j}});var bb=/ jQuery\d+="(?:\d+|null)"/g,Ia=/^\s+/,cb=/(<([\w:]+)[^>]*?)\/>/g,Da=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,qb=/<([\w:]+)/,ga=/<tbody/i,rb=/<|&\w+;/,sb=function(a,f,j){return Da.test(j)?a:f+"></"+j+">"},ya={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,"",""]};ya.optgroup=ya.option;ya.tbody=ya.tfoot=ya.colgroup=ya.caption=ya.thead;ya.th=ya.td;if(!d.support.htmlSerialize)ya._default=[1,"div<div>","</div>"];d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(f){var j=d(this);return j.text(a.call(this,f,j.text()))});if(typeof a!=="object"&&a!==s)return this.empty().append((this[0]&&this[0].ownerDocument||
m).createTextNode(a));return d.getText(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(j){d(this).wrapAll(a.call(this,j))});if(this[0]){var f=d(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&f.insertBefore(this[0]);f.map(function(){for(var j=this;j.firstChild&&j.firstChild.nodeType===1;)j=j.firstChild;return j}).append(this)}return this},wrapInner:function(a){return this.each(function(){var f=d(this),j=f.contents();j.length?j.wrapAll(a):f.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},
unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(f){this.parentNode.insertBefore(f,this)});else if(arguments.length){var a=
d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(f){this.parentNode.insertBefore(f,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},clone:function(a){var f=this.map(function(){if(!d.support.noCloneEvent&&!d.isXMLDoc(this)){var j=this.outerHTML,p=this.ownerDocument;if(!j){j=
p.createElement("div");j.appendChild(this.cloneNode(true));j=j.innerHTML}return d.clean([j.replace(bb,"").replace(Ia,"")],p)[0]}else return this.cloneNode(true)});if(a===true){V(this,f);V(this.find("*"),f.find("*"))}return f},html:function(a){if(a===s)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(bb,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(d.support.leadingWhitespace||!Ia.test(a))&&!ya[(qb.exec(a)||["",""])[1].toLowerCase()])try{for(var f=0,j=this.length;f<j;f++)if(this[f].nodeType===
1){M(this[f].getElementsByTagName("*"));this[f].innerHTML=a}}catch(p){this.empty().append(a)}else d.isFunction(a)?this.each(function(k){var C=d(this),P=C.html();C.empty().append(function(){return a.call(this,k,P)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){d.isFunction(a)||(a=d(a).detach());return this.each(function(){var f=this.nextSibling,j=this.parentNode;d(this).remove();f?d(f).before(a):d(j).append(a)})}else return this.pushStack(d(d.isFunction(a)?
a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,f,j){function p(fa){return d.nodeName(fa,"table")?fa.getElementsByTagName("tbody")[0]||fa.appendChild(fa.ownerDocument.createElement("tbody")):fa}var k,C,P=a[0],U=[];if(d.isFunction(P))return this.each(function(fa){var ma=d(this);a[0]=P.call(this,fa,f?ma.html():s);return ma.domManip(a,f,j)});if(this[0]){k=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:A(a,this,U);if(C=k.fragment.firstChild){f=
f&&d.nodeName(C,"tr");for(var S=0,W=this.length;S<W;S++)j.call(f?p(this[S],C):this[S],k.cacheable||this.length>1||S>0?k.fragment.cloneNode(true):k.fragment)}U&&d.each(U,b)}return this}});d.fragments={};d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,f){d.fn[a]=function(j){var p=[];j=d(j);for(var k=0,C=j.length;k<C;k++){var P=(k>0?this.clone(true):this).get();d.fn[f].apply(d(j[k]),P);p=p.concat(P)}return this.pushStack(p,
a,j.selector)}});d.each({remove:function(a,f){if(!a||d.filter(a,[this]).length){if(!f&&this.nodeType===1){M(this.getElementsByTagName("*"));M([this])}this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&M(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},function(a,f){d.fn[a]=function(){return this.each(f,arguments)}});d.extend({clean:function(a,f,j,p){f=f||m;if(typeof f.createElement==="undefined")f=f.ownerDocument||f[0]&&
f[0].ownerDocument||m;var k=[];d.each(a,function(C,P){if(typeof P==="number")P+="";if(P){if(typeof P==="string"&&!rb.test(P))P=f.createTextNode(P);else if(typeof P==="string"){P=P.replace(cb,sb);var U=(qb.exec(P)||["",""])[1].toLowerCase(),S=ya[U]||ya._default,W=S[0];C=f.createElement("div");for(C.innerHTML=S[1]+P+S[2];W--;)C=C.lastChild;if(!d.support.tbody){W=ga.test(P);U=U==="table"&&!W?C.firstChild&&C.firstChild.childNodes:S[1]==="<table>"&&!W?C.childNodes:[];for(S=U.length-1;S>=0;--S)d.nodeName(U[S],
"tbody")&&!U[S].childNodes.length&&U[S].parentNode.removeChild(U[S])}!d.support.leadingWhitespace&&Ia.test(P)&&C.insertBefore(f.createTextNode(Ia.exec(P)[0]),C.firstChild);P=d.makeArray(C.childNodes)}if(P.nodeType)k.push(P);else k=d.merge(k,P)}});if(j)for(a=0;k[a];a++)if(p&&d.nodeName(k[a],"script")&&(!k[a].type||k[a].type.toLowerCase()==="text/javascript"))p.push(k[a].parentNode?k[a].parentNode.removeChild(k[a]):k[a]);else{k[a].nodeType===1&&k.splice.apply(k,[a+1,0].concat(d.makeArray(k[a].getElementsByTagName("script"))));
j.appendChild(k[a])}return k}});var tb=/z-?index|font-?weight|opacity|zoom|line-?height/i,db=/alpha\([^)]*\)/,eb=/opacity=([^)]*)/,Qa=/float/i,fb=/-([a-z])/ig,sa=/([A-Z])/g,Bb=/^-?\d+(?:px)?$/i,ub=/^-?\d/,zb={position:"absolute",visibility:"hidden",display:"block"},vb=["Left","Right"],Wa=["Top","Bottom"],gb=m.defaultView&&m.defaultView.getComputedStyle,ua=d.support.cssFloat?"cssFloat":"styleFloat",Xa=function(a,f){return f.toUpperCase()};d.fn.css=function(a,f){return h(this,a,f,true,function(j,p,
k){if(k===s)return d.curCSS(j,p);if(typeof k==="number"&&!tb.test(p))k+="px";d.style(j,p,k)})};d.extend({style:function(a,f,j){if(!a||a.nodeType===3||a.nodeType===8)return s;if((f==="width"||f==="height")&&parseFloat(j)<0)j=s;var p=a.style||a,k=j!==s;if(!d.support.opacity&&f==="opacity"){if(k){p.zoom=1;f=parseInt(j,10)+""==="NaN"?"":"alpha(opacity="+j*100+")";a=p.filter||d.curCSS(a,"filter")||"";p.filter=db.test(a)?a.replace(db,f):f}return p.filter&&p.filter.indexOf("opacity=")>=0?parseFloat(eb.exec(p.filter)[1])/
100+"":""}if(Qa.test(f))f=ua;f=f.replace(fb,Xa);if(k)p[f]=j;return p[f]},css:function(a,f,j,p){if(f==="width"||f==="height"){var k,C=f==="width"?vb:Wa;function P(){k=f==="width"?a.offsetWidth:a.offsetHeight;p!=="border"&&d.each(C,function(){p||(k-=parseFloat(d.curCSS(a,"padding"+this,true))||0);if(p==="margin")k+=parseFloat(d.curCSS(a,"margin"+this,true))||0;else k-=parseFloat(d.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?P():d.swap(a,zb,P);return Math.max(0,Math.round(k))}return d.curCSS(a,
f,j)},curCSS:function(a,f,j){var p,k=a.style;if(!d.support.opacity&&f==="opacity"&&a.currentStyle){p=eb.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return p===""?"1":p}if(Qa.test(f))f=ua;if(!j&&k&&k[f])p=k[f];else if(gb){if(Qa.test(f))f="float";f=f.replace(sa,"-$1").toLowerCase();k=a.ownerDocument.defaultView;if(!k)return null;if(a=k.getComputedStyle(a,null))p=a.getPropertyValue(f);if(f==="opacity"&&p==="")p="1"}else if(a.currentStyle){j=f.replace(fb,Xa);p=a.currentStyle[f]||a.currentStyle[j];
if(!Bb.test(p)&&ub.test(p)){f=k.left;var C=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;k.left=j==="fontSize"?"1em":p||0;p=k.pixelLeft+"px";k.left=f;a.runtimeStyle.left=C}}return p},swap:function(a,f,j){var p={};for(var k in f){p[k]=a.style[k];a.style[k]=f[k]}j.call(a);for(k in f)a.style[k]=p[k]}});if(d.expr&&d.expr.filters){d.expr.filters.hidden=function(a){var f=a.offsetWidth,j=a.offsetHeight,p=a.nodeName.toLowerCase()==="tr";return f===0&&j===0&&!p?true:f>0&&j>0&&!p?false:d.curCSS(a,
"display")==="none"};d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)}}var hb=n(),Ya=/<script(.|\s)*?\/script>/gi,Ga=/select|textarea/i,ib=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,e=/=\?(&|$)/,g=/\?/,o=/(\?|&)_=.*?(&|$)/,r=/^(\w+:)?\/\/([^\/?#]+)/,v=/%20/g;d.fn.extend({_load:d.fn.load,load:function(a,f,j){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var p=a.indexOf(" ");if(p>=0){var k=a.slice(p,
a.length);a=a.slice(0,p)}p="GET";if(f)if(d.isFunction(f)){j=f;f=null}else if(typeof f==="object"){f=d.param(f,d.ajaxSettings.traditional);p="POST"}d.ajax({url:a,type:p,dataType:"html",data:f,context:this,complete:function(C,P){if(P==="success"||P==="notmodified")this.html(k?d("<div />").append(C.responseText.replace(Ya,"")).find(k):C.responseText);j&&this.each(j,[C.responseText,P,C])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?
d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Ga.test(this.nodeName)||ib.test(this.type))}).map(function(a,f){a=d(this).val();return a==null?null:d.isArray(a)?d.map(a,function(j){return{name:f.name,value:j}}):{name:f.name,value:a}}).get()}});d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,f){d.fn[f]=function(j){return this.bind(f,j)}});d.extend({get:function(a,f,j,p){if(d.isFunction(f)){p=p||j;j=f;
f=null}return d.ajax({type:"GET",url:a,data:f,success:j,dataType:p})},getScript:function(a,f){return d.get(a,null,f,"script")},getJSON:function(a,f,j){return d.get(a,f,j,"json")},post:function(a,f,j,p){if(d.isFunction(f)){p=p||j;j=f;f={}}return d.ajax({type:"POST",url:a,data:f,success:j,dataType:p})},ajaxSetup:function(a){d.extend(d.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:c.XMLHttpRequest&&
(c.location.protocol!=="file:"||!c.ActiveXObject)?function(){return new c.XMLHttpRequest}:function(){try{return new c.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function f(){k.success&&k.success.call(S,U,P,la);k.global&&p("ajaxSuccess",[la,k])}function j(){k.complete&&k.complete.call(S,
la,P);k.global&&p("ajaxComplete",[la,k]);k.global&&!--d.active&&d.event.trigger("ajaxStop")}function p(ba,aa){(k.context?d(k.context):d.event).trigger(ba,aa)}var k=d.extend(true,{},d.ajaxSettings,a),C,P,U,S=k.context||k,W=k.type.toUpperCase();if(k.data&&k.processData&&typeof k.data!=="string")k.data=d.param(k.data,k.traditional);if(k.dataType==="jsonp"){if(W==="GET")e.test(k.url)||(k.url+=(g.test(k.url)?"&":"?")+(k.jsonp||"callback")+"=?");else if(!k.data||!e.test(k.data))k.data=(k.data?k.data+"&":
"")+(k.jsonp||"callback")+"=?";k.dataType="json"}if(k.dataType==="json"&&(k.data&&e.test(k.data)||e.test(k.url))){C=k.jsonpCallback||"jsonp"+hb++;if(k.data)k.data=(k.data+"").replace(e,"="+C+"$1");k.url=k.url.replace(e,"="+C+"$1");k.dataType="script";c[C]=c[C]||function(ba){U=ba;f();j();c[C]=s;try{delete c[C]}catch(aa){}qa&&qa.removeChild(wa)}}if(k.dataType==="script"&&k.cache===null)k.cache=false;if(k.cache===false&&W==="GET"){var fa=n(),ma=k.url.replace(o,"$1_="+fa+"$2");k.url=ma+(ma===k.url?(g.test(k.url)?
"&":"?")+"_="+fa:"")}if(k.data&&W==="GET")k.url+=(g.test(k.url)?"&":"?")+k.data;k.global&&!d.active++&&d.event.trigger("ajaxStart");fa=(fa=r.exec(k.url))&&(fa[1]&&fa[1]!==location.protocol||fa[2]!==location.host);if(k.dataType==="script"&&W==="GET"&&fa){var qa=m.getElementsByTagName("head")[0]||m.documentElement,wa=m.createElement("script");wa.src=k.url;if(k.scriptCharset)wa.charset=k.scriptCharset;if(!C){var za=false;wa.onload=wa.onreadystatechange=function(){if(!za&&(!this.readyState||this.readyState===
"loaded"||this.readyState==="complete")){za=true;f();j();wa.onload=wa.onreadystatechange=null;qa&&wa.parentNode&&qa.removeChild(wa)}}}qa.insertBefore(wa,qa.firstChild);return s}var Ca=false,la=k.xhr();if(la){k.username?la.open(W,k.url,k.async,k.username,k.password):la.open(W,k.url,k.async);try{if(k.data||a&&a.contentType)la.setRequestHeader("Content-Type",k.contentType);if(k.ifModified){d.lastModified[k.url]&&la.setRequestHeader("If-Modified-Since",d.lastModified[k.url]);d.etag[k.url]&&la.setRequestHeader("If-None-Match",
d.etag[k.url])}fa||la.setRequestHeader("X-Requested-With","XMLHttpRequest");la.setRequestHeader("Accept",k.dataType&&k.accepts[k.dataType]?k.accepts[k.dataType]+", */*":k.accepts._default)}catch(xb){}if(k.beforeSend&&k.beforeSend.call(S,la,k)===false){k.global&&!--d.active&&d.event.trigger("ajaxStop");la.abort();return false}k.global&&p("ajaxSend",[la,k]);var y=la.onreadystatechange=function(ba){if(!la||la.readyState===0){Ca||j();Ca=true;if(la)la.onreadystatechange=d.noop}else if(!Ca&&la&&(la.readyState===
4||ba==="timeout")){Ca=true;la.onreadystatechange=d.noop;P=ba==="timeout"?"timeout":!d.httpSuccess(la)?"error":k.ifModified&&d.httpNotModified(la,k.url)?"notmodified":"success";if(P==="success")try{U=d.httpData(la,k.dataType,k)}catch(aa){P="parsererror"}if(P==="success"||P==="notmodified")C||f();else d.handleError(k,la,P);j();ba==="timeout"&&la.abort();if(k.async)la=null}};try{var J=la.abort;la.abort=function(){if(la){J.call(la);if(la)la.readyState=0}y()}}catch(T){}k.async&&k.timeout>0&&setTimeout(function(){la&&
!Ca&&y("timeout")},k.timeout);try{la.send(W==="POST"||W==="PUT"||W==="DELETE"?k.data:null)}catch(Y){d.handleError(k,la,null,Y);j()}k.async||y();return la}},handleError:function(a,f,j,p){if(a.error)a.error.call(a.context||c,f,j,p);if(a.global)(a.context?d(a.context):d.event).trigger("ajaxError",[f,a,p])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(f){}return false},httpNotModified:function(a,
f){var j=a.getResponseHeader("Last-Modified"),p=a.getResponseHeader("Etag");if(j)d.lastModified[f]=j;if(p)d.etag[f]=p;return a.status===304||a.status===0},httpData:function(a,f,j){var p=a.getResponseHeader("content-type")||"",k=f==="xml"||!f&&p.indexOf("xml")>=0;a=k?a.responseXML:a.responseText;if(k&&a.documentElement.nodeName==="parsererror")throw"parsererror";if(j&&j.dataFilter)a=j.dataFilter(a,f);if(typeof a==="string")if(f==="json"||!f&&p.indexOf("json")>=0)if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))a=c.JSON&&c.JSON.parse?c.JSON.parse(a):(new Function("return "+a))();else throw"Invalid JSON: "+a;else if(f==="script"||!f&&p.indexOf("javascript")>=0)d.globalEval(a);return a},param:function(a,f){function j(k,C){C=d.isFunction(C)?C():C;p[p.length]=encodeURIComponent(k)+"="+encodeURIComponent(C)}var p=[];if(f===s)f=d.ajaxSettings.traditional;d.isArray(a)||a.jquery?d.each(a,function(){j(this.name,
this.value)}):d.each(a,function k(C,P){if(d.isArray(P))d.each(P,function(U,S){f?j(C,S):k(C+"["+(typeof S==="object"||d.isArray(S)?U:"")+"]",S)});else!f&&P!=null&&typeof P==="object"?d.each(P,function(U,S){k(C+"["+U+"]",S)}):j(C,P)});return p.join("&").replace(v,"+")}});var q={},D=/toggle|show|hide/,w=/^([+-]=)?([\d+-.]+)(.*)$/,B,G=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,
f){if(a!=null)return this.animate(F("show",3),a,f);else{a=0;for(f=this.length;a<f;a++){var j=d.data(this[a],"olddisplay");this[a].style.display=j||"";if(d.css(this[a],"display")==="none"){j=this[a].nodeName;var p;if(q[j])p=q[j];else{var k=d("<"+j+" />").appendTo("body");p=k.css("display");if(p==="none")p="block";k.remove();q[j]=p}d.data(this[a],"olddisplay",p)}}a=0;for(f=this.length;a<f;a++)this[a].style.display=d.data(this[a],"olddisplay")||"";return this}},hide:function(a,f){if(a!=null)return this.animate(F("hide",
3),a,f);else{a=0;for(f=this.length;a<f;a++){var j=d.data(this[a],"olddisplay");!j&&j!=="none"&&d.data(this[a],"olddisplay",d.css(this[a],"display"))}a=0;for(f=this.length;a<f;a++)this[a].style.display="none";return this}},_toggle:d.fn.toggle,toggle:function(a,f){var j=typeof a==="boolean";if(d.isFunction(a)&&d.isFunction(f))this._toggle.apply(this,arguments);else a==null||j?this.each(function(){var p=j?a:d(this).is(":hidden");d(this)[p?"show":"hide"]()}):this.animate(F("toggle",3),a,f);return this},
fadeTo:function(a,f,j){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:f},a,j)},animate:function(a,f,j,p){var k=d.speed(f,j,p);if(d.isEmptyObject(a))return this.each(k.complete);return this[k.queue===false?"each":"queue"](function(){var C=d.extend({},k),P,U=this.nodeType===1&&d(this).is(":hidden"),S=this;for(P in a){var W=P.replace(fb,Xa);if(P!==W){a[W]=a[P];delete a[P];P=W}if(a[P]==="hide"&&U||a[P]==="show"&&!U)return C.complete.call(this);if((P==="height"||P==="width")&&
this.style){C.display=d.css(this,"display");C.overflow=this.style.overflow}if(d.isArray(a[P])){(C.specialEasing=C.specialEasing||{})[P]=a[P][1];a[P]=a[P][0]}}if(C.overflow!=null)this.style.overflow="hidden";C.curAnim=d.extend({},a);d.each(a,function(fa,ma){var qa=new d.fx(S,C,fa);if(D.test(ma))qa[ma==="toggle"?U?"show":"hide":ma](a);else{var wa=w.exec(ma),za=qa.cur(true)||0;if(wa){ma=parseFloat(wa[2]);var Ca=wa[3]||"px";if(Ca!=="px"){S.style[fa]=(ma||1)+Ca;za=(ma||1)/qa.cur(true)*za;S.style[fa]=za+
Ca}if(wa[1])ma=(wa[1]==="-="?-1:1)*ma+za;qa.custom(za,ma,Ca)}else qa.custom(za,ma,"")}});return true})},stop:function(a,f){var j=d.timers;a&&this.queue([]);this.each(function(){for(var p=j.length-1;p>=0;p--)if(j[p].elem===this){f&&j[p](true);j.splice(p,1)}});f||this.dequeue();return this}});d.each({slideDown:F("show",1),slideUp:F("hide",1),slideToggle:F("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,f){d.fn[a]=function(j,p){return this.animate(f,j,p)}});d.extend({speed:function(a,
f,j){var p=a&&typeof a==="object"?a:{complete:j||!j&&f||d.isFunction(a)&&a,duration:a,easing:j&&f||f&&!d.isFunction(f)&&f};p.duration=d.fx.off?0:typeof p.duration==="number"?p.duration:d.fx.speeds[p.duration]||d.fx.speeds._default;p.old=p.complete;p.complete=function(){p.queue!==false&&d(this).dequeue();d.isFunction(p.old)&&p.old.call(this)};return p},easing:{linear:function(a,f,j,p){return j+p*a},swing:function(a,f,j,p){return(-Math.cos(a*Math.PI)/2+0.5)*p+j}},timers:[],fx:function(a,f,j){this.options=
f;this.elem=a;this.prop=j;if(!f.orig)f.orig={}}});d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(d.fx.step[this.prop]||d.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(d.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(d.curCSS(this.elem,
this.prop))||0},custom:function(a,f,j){function p(C){return k.step(C)}this.startTime=n();this.start=a;this.end=f;this.unit=j||this.unit||"px";this.now=this.start;this.pos=this.state=0;var k=this;p.elem=this.elem;if(p()&&d.timers.push(p)&&!B)B=setInterval(d.fx.tick,13)},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());d(this.elem).show()},hide:function(){this.options.orig[this.prop]=
d.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var f=n(),j=true;if(a||f>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var p in this.options.curAnim)if(this.options.curAnim[p]!==true)j=false;if(j){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=d.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(d.css(this.elem,
"display")==="none")this.elem.style.display="block"}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var k in this.options.curAnim)d.style(this.elem,k,this.options.orig[k]);this.options.complete.call(this.elem)}return false}else{k=f-this.startTime;this.state=k/this.options.duration;a=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,k,0,1,this.options.duration);
this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};d.extend(d.fx,{tick:function(){for(var a=d.timers,f=0;f<a.length;f++)a[f]()||a.splice(f--,1);a.length||d.fx.stop()},stop:function(){clearInterval(B);B=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){d.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=
a.now}}});if(d.expr&&d.expr.filters)d.expr.filters.animated=function(a){return d.grep(d.timers,function(f){return a===f.elem}).length};d.fn.offset="getBoundingClientRect"in m.documentElement?function(a){var f=this[0];if(!f||!f.ownerDocument)return null;if(a)return this.each(function(k){d.offset.setOffset(this,a,k)});if(f===f.ownerDocument.body)return d.offset.bodyOffset(f);var j=f.getBoundingClientRect(),p=f.ownerDocument;f=p.body;p=p.documentElement;return{top:j.top+(self.pageYOffset||d.support.boxModel&&
p.scrollTop||f.scrollTop)-(p.clientTop||f.clientTop||0),left:j.left+(self.pageXOffset||d.support.boxModel&&p.scrollLeft||f.scrollLeft)-(p.clientLeft||f.clientLeft||0)}}:function(a){var f=this[0];if(!f||!f.ownerDocument)return null;if(a)return this.each(function(fa){d.offset.setOffset(this,a,fa)});if(f===f.ownerDocument.body)return d.offset.bodyOffset(f);d.offset.initialize();var j=f.offsetParent,p=f,k=f.ownerDocument,C,P=k.documentElement,U=k.body;p=(k=k.defaultView)?k.getComputedStyle(f,null):f.currentStyle;
for(var S=f.offsetTop,W=f.offsetLeft;(f=f.parentNode)&&f!==U&&f!==P;){if(d.offset.supportsFixedPosition&&p.position==="fixed")break;C=k?k.getComputedStyle(f,null):f.currentStyle;S-=f.scrollTop;W-=f.scrollLeft;if(f===j){S+=f.offsetTop;W+=f.offsetLeft;if(d.offset.doesNotAddBorder&&!(d.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(f.nodeName))){S+=parseFloat(C.borderTopWidth)||0;W+=parseFloat(C.borderLeftWidth)||0}p=j;j=f.offsetParent}if(d.offset.subtractsBorderForOverflowNotVisible&&C.overflow!==
"visible"){S+=parseFloat(C.borderTopWidth)||0;W+=parseFloat(C.borderLeftWidth)||0}p=C}if(p.position==="relative"||p.position==="static"){S+=U.offsetTop;W+=U.offsetLeft}if(d.offset.supportsFixedPosition&&p.position==="fixed"){S+=Math.max(P.scrollTop,U.scrollTop);W+=Math.max(P.scrollLeft,U.scrollLeft)}return{top:S,left:W}};d.offset={initialize:function(){var a=m.body,f=m.createElement("div"),j,p,k,C=parseFloat(d.curCSS(a,"marginTop",true))||0;d.extend(f.style,{position:"absolute",top:0,left:0,margin:0,
border:0,width:"1px",height:"1px",visibility:"hidden"});f.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(f,a.firstChild);j=f.firstChild;p=j.firstChild;k=j.nextSibling.firstChild.firstChild;this.doesNotAddBorder=p.offsetTop!==5;this.doesAddBorderForTableAndCells=
k.offsetTop===5;p.style.position="fixed";p.style.top="20px";this.supportsFixedPosition=p.offsetTop===20||p.offsetTop===15;p.style.position=p.style.top="";j.style.overflow="hidden";j.style.position="relative";this.subtractsBorderForOverflowNotVisible=p.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==C;a.removeChild(f);d.offset.initialize=d.noop},bodyOffset:function(a){var f=a.offsetTop,j=a.offsetLeft;d.offset.initialize();if(d.offset.doesNotIncludeMarginInBodyOffset){f+=parseFloat(d.curCSS(a,
"marginTop",true))||0;j+=parseFloat(d.curCSS(a,"marginLeft",true))||0}return{top:f,left:j}},setOffset:function(a,f,j){if(/static/.test(d.curCSS(a,"position")))a.style.position="relative";var p=d(a),k=p.offset(),C=parseInt(d.curCSS(a,"top",true),10)||0,P=parseInt(d.curCSS(a,"left",true),10)||0;if(d.isFunction(f))f=f.call(a,j,k);j={top:f.top-k.top+C,left:f.left-k.left+P};"using"in f?f.using.call(a,j):p.css(j)}};d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],f=this.offsetParent(),
j=this.offset(),p=/^body|html$/i.test(f[0].nodeName)?{top:0,left:0}:f.offset();j.top-=parseFloat(d.curCSS(a,"marginTop",true))||0;j.left-=parseFloat(d.curCSS(a,"marginLeft",true))||0;p.top+=parseFloat(d.curCSS(f[0],"borderTopWidth",true))||0;p.left+=parseFloat(d.curCSS(f[0],"borderLeftWidth",true))||0;return{top:j.top-p.top,left:j.left-p.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||m.body;a&&!/^body|html$/i.test(a.nodeName)&&d.css(a,"position")==="static";)a=
a.offsetParent;return a})}});d.each(["Left","Top"],function(a,f){var j="scroll"+f;d.fn[j]=function(p){var k=this[0],C;if(!k)return null;return p!==s?this.each(function(){if(C=K(this))C.scrollTo(!a?p:d(C).scrollLeft(),a?p:d(C).scrollTop());else this[j]=p}):(C=K(k))?"pageXOffset"in C?C[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&C.document.documentElement[j]||C.document.body[j]:k[j]}});d.each(["Height","Width"],function(a,f){var j=f.toLowerCase();d.fn["inner"+f]=function(){return this[0]?d.css(this[0],
j,false,"padding"):null};d.fn["outer"+f]=function(p){return this[0]?d.css(this[0],j,false,p?"margin":"border"):null};d.fn[j]=function(p){var k=this[0];if(!k)return p==null?null:this;return"scrollTo"in k&&k.document?k.document.compatMode==="CSS1Compat"&&k.document.documentElement["client"+f]||k.document.body["client"+f]:k.nodeType===9?Math.max(k.documentElement["client"+f],k.body["scroll"+f],k.documentElement["scroll"+f],k.body["offset"+f],k.documentElement["offset"+f]):p===s?d.css(k,j):this.css(j,
typeof p==="string"?p:p+"px")}});c.jQuery=c.$=d})(window);
Raphael=function(){function c(e,g,o){function r(){var v=Array[K].slice.call(arguments,0),q=v[M]("\u25ba"),D=r.cache=r.cache||{},w=r.count=r.count||[];if(D[A](q))return o?o(D[q]):D[q];w[F]>=1E3&&delete D[w.shift()];w[R](q);D[q]=e[O](g,v);return o?o(D[q]):D[q]}return r}function s(){return this.x+I+this.y}function N(e){return function(g,o,r,v){var q={back:e};u.is(r,"function")?(v=r):(q.rot=r);g&&g.constructor==ga&&(g=g.attrs.path);g&&(q.along=g);return this.animate(q,o,v)}}var b=/[, ]+/,h=/^(circle|rect|path|ellipse|text|image)$/,
n=document,x=window,E={was:"Raphael"in x,is:x.Raphael},u=function(){if(u.is(arguments[0],"array")){for(var e=arguments[0],g=Qa[O](u,e.splice(0,3+u.is(e[0],Q))),o=g.set(),r=0,v=e[F];r<v;r++){var q=e[r]||{};h.test(q.type)&&o[R](g[q.type]().attr(q))}return o}return Qa[O](u,arguments)},H=function(){},O="apply",I=" ",V="click dblclick mousedown mousemove mouseout mouseover mouseup".split(I),A="hasOwnProperty",M="join",F="length",K="prototype",d=String[K].toLowerCase,z=Math,L=z.max,m=z.min,Q="number",Z=
Object[K].toString,X=z.pow,R="push",ca=/^(?=[\da-f]$)/,ea=/^url\(['"]?([^\)]+)['"]?\)$/i,ra=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i,da=z.round,ia=parseFloat,oa=parseInt,ta=String[K].toUpperCase,xa={"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',
"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},pa={along:"along","clip-rect":"csv",cx:Q,cy:Q,fill:"colour","fill-opacity":Q,
"font-size":Q,height:Q,opacity:Q,path:"path",r:Q,rotation:"csv",rx:Q,ry:Q,scale:"csv",stroke:"colour","stroke-opacity":Q,"stroke-width":Q,translation:"csv",width:Q,x:Q,y:Q};u.version="1.3.1";u.type=x.SVGAngle||n.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(u.type=="VML"){var Aa=document.createElement("div");Aa.innerHTML="<!--[if vml]><br><br><![endif]--\>";if(Aa.childNodes[F]!=2)return null}u.svg=!(u.vml=u.type=="VML");H[K]=u[K];u._id=0;u._oid=
0;u.fn={};u.is=function(e,g){g=d.call(g);return(g=="object"||g=="undefined")&&typeof e==g||e==null&&g=="null"||d.call(Z.call(e).slice(8,-1))==g};u.setWindow=function(e){x=e;n=x.document};var Ea=function(e){if(u.vml){var g=/^\s+|\s+$/g;Ea=c(function(r){var v;r=(r+"").replace(g,"");try{var q=new ActiveXObject("htmlfile");q.write("<body>");q.close();v=q.body}catch(D){v=createPopup().document.body}q=v.createTextRange();try{v.style.color=r;var w=q.queryCommandValue("ForeColor");w=(w&255)<<16|w&65280|(w&
16711680)>>>16;return"#"+("000000"+w.toString(16)).slice(-6)}catch(B){return"none"}})}else{var o=n.createElement("i");o.title="Rapha\u00ebl Colour Picker";o.style.display="none";n.body.appendChild(o);Ea=c(function(r){o.style.color=r;return n.defaultView.getComputedStyle(o,"").getPropertyValue("color")})}return Ea(e)};u.hsb2rgb=c(function(e,g,o){if(u.is(e,"object")&&"h"in e&&"s"in e&&"b"in e){o=e.b;g=e.s;e=e.h}var r;if(o==0)return{r:0,g:0,b:0,hex:"#000"};if(e>1||g>1||o>1){e/=255;g/=255;o/=255}r=~~(e*
6);e=e*6-r;var v=o*(1-g),q=o*(1-g*e),D=o*(1-g*(1-e));e=[o,q,v,v,D,o,o][r];g=[D,o,o,q,v,v,D][r];r=[v,v,D,o,o,q,v][r];e*=255;g*=255;r*=255;o={r:e,g:g,b:r};e=(~~e).toString(16);g=(~~g).toString(16);r=(~~r).toString(16);e=e.replace(ca,"0");g=g.replace(ca,"0");r=r.replace(ca,"0");o.hex="#"+e+g+r;return o},u);u.rgb2hsb=c(function(e,g,o){if(u.is(e,"object")&&"r"in e&&"g"in e&&"b"in e){o=e.b;g=e.g;e=e.r}if(u.is(e,"string")){var r=u.getRGB(e);e=r.r;g=r.g;o=r.b}if(e>1||g>1||o>1){e/=255;g/=255;o/=255}r=L(e,
g,o);var v=m(e,g,o);if(v==r)return{h:0,s:0,b:r};else{var q=r-v;v=q/r;e=e==r?(g-o)/q:g==r?2+(o-e)/q:4+(e-g)/q;e/=6;e<0&&e++;e>1&&e--}return{h:e,s:v,b:r}},u);var va=/,?([achlmqrstvxz]),?/gi;u._path2string=function(){return this.join(",").replace(va,"$1")};u.getRGB=c(function(e){if(!e||(e+="").indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1};if(e=="none")return{r:-1,g:-1,b:-1,hex:"none"};!({hs:1,rg:1}[A](e.substring(0,2))||e.charAt()=="#")&&(e=Ea(e));var g,o,r,v;if(e=e.match(ra)){if(e[2]){r=
oa(e[2].substring(5),16);o=oa(e[2].substring(3,5),16);g=oa(e[2].substring(1,3),16)}if(e[3]){r=oa((v=e[3].charAt(3))+v,16);o=oa((v=e[3].charAt(2))+v,16);g=oa((v=e[3].charAt(1))+v,16)}if(e[4]){e=e[4].split(/\s*,\s*/);g=ia(e[0]);o=ia(e[1]);r=ia(e[2])}if(e[5]){e=e[5].split(/\s*,\s*/);g=ia(e[0])*2.55;o=ia(e[1])*2.55;r=ia(e[2])*2.55}if(e[6]){e=e[6].split(/\s*,\s*/);g=ia(e[0]);o=ia(e[1]);r=ia(e[2]);return u.hsb2rgb(g,o,r)}if(e[7]){e=e[7].split(/\s*,\s*/);g=ia(e[0])*2.55;o=ia(e[1])*2.55;r=ia(e[2])*2.55;return u.hsb2rgb(g,
o,r)}e={r:g,g:o,b:r};g=(~~g).toString(16);o=(~~o).toString(16);r=(~~r).toString(16);g=g.replace(ca,"0");o=o.replace(ca,"0");r=r.replace(ca,"0");e.hex="#"+g+o+r;return e}return{r:-1,g:-1,b:-1,hex:"none",error:1}},u);u.getColor=function(e){e=this.getColor.start=this.getColor.start||{h:0,s:1,b:e||0.75};var g=this.hsb2rgb(e.h,e.s,e.b);e.h+=0.075;if(e.h>1){e.h=0;e.s-=0.2;e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})}return g.hex};u.getColor.reset=function(){delete this.start};u.parsePathString=c(function(e){if(!e)return null;
var g={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},o=[];if(u.is(e,"array")&&u.is(e[0],"array"))o=Ha(e);o[F]||(e+"").replace(/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,function(r,v,q){var D=[];r=d.call(v);for(q.replace(/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,function(w,B){B&&D[R](+B)});D[F]>=g[r];){o[R]([v].concat(D.splice(0,g[r])));if(!g[r])break}});o.toString=u._path2string;return o});u.findDotsAtSegment=function(e,g,o,r,v,q,D,w,B){var G=1-B,a=X(G,3)*e+X(G,2)*3*B*o+G*3*B*B*v+X(B,
3)*D;G=X(G,3)*g+X(G,2)*3*B*r+G*3*B*B*q+X(B,3)*w;var f=e+2*B*(o-e)+B*B*(v-2*o+e),j=g+2*B*(r-g)+B*B*(q-2*r+g),p=o+2*B*(v-o)+B*B*(D-2*v+o),k=r+2*B*(q-r)+B*B*(w-2*q+r);e=(1-B)*e+B*o;g=(1-B)*g+B*r;v=(1-B)*v+B*D;q=(1-B)*q+B*w;w=90-z.atan((f-p)/(j-k))*180/z.PI;(f>p||j<k)&&(w+=180);return{x:a,y:G,m:{x:f,y:j},n:{x:p,y:k},start:{x:e,y:g},end:{x:v,y:q},alpha:w}};var Fa=c(function(e){if(!e)return{x:0,y:0,width:0,height:0};e=Ra(e);for(var g=0,o=0,r=[],v=[],q,D=0,w=e[F];D<w;D++){q=e[D];if(q[0]=="M"){g=q[1];o=q[2];
r[R](g);v[R](o)}else{g=wb(g,o,q[1],q[2],q[3],q[4],q[5],q[6]);r=r.concat(g.min.x,g.max.x);v=v.concat(g.min.y,g.max.y);g=q[5];o=q[6]}}e=m[O](0,r);q=m[O](0,v);return{x:e,y:q,width:L[O](0,r)-e,height:L[O](0,v)-q}}),Ha=function(e){var g=[];if(!u.is(e,"array")||!u.is(e&&e[0],"array"))e=u.parsePathString(e);for(var o=0,r=e[F];o<r;o++){g[o]=[];for(var v=0,q=e[o][F];v<q;v++)g[o][v]=e[o][v]}g.toString=u._path2string;return g},jb=c(function(e){if(!u.is(e,"array")||!u.is(e&&e[0],"array"))e=u.parsePathString(e);
var g=[],o=0,r=0,v=0,q=0,D=0;if(e[0][0]=="M"){o=e[0][1];r=e[0][2];v=o;q=r;D++;g[R](["M",o,r])}D=D;for(var w=e[F];D<w;D++){var B=g[D]=[],G=e[D];if(G[0]!=d.call(G[0])){B[0]=d.call(G[0]);switch(B[0]){case "a":B[1]=G[1];B[2]=G[2];B[3]=G[3];B[4]=G[4];B[5]=G[5];B[6]=+(G[6]-o).toFixed(3);B[7]=+(G[7]-r).toFixed(3);break;case "v":B[1]=+(G[1]-r).toFixed(3);break;case "m":v=G[1];q=G[2];default:for(var a=1,f=G[F];a<f;a++)B[a]=+(G[a]-(a%2?o:r)).toFixed(3)}}else{g[D]=[];if(G[0]=="m"){v=G[1]+o;q=G[2]+r}B=0;for(a=
G[F];B<a;B++)g[D][B]=G[B]}G=g[D][F];switch(g[D][0]){case "z":o=v;r=q;break;case "h":o+=+g[D][G-1];break;case "v":r+=+g[D][G-1];break;default:o+=+g[D][G-2];r+=+g[D][G-1]}}g.toString=u._path2string;return g},0,Ha),Ka=c(function(e){if(!u.is(e,"array")||!u.is(e&&e[0],"array"))e=u.parsePathString(e);var g=[],o=0,r=0,v=0,q=0,D=0;if(e[0][0]=="M"){o=+e[0][1];r=+e[0][2];v=o;q=r;D++;g[0]=["M",o,r]}D=D;for(var w=e[F];D<w;D++){var B=g[D]=[],G=e[D];if(G[0]!=ta.call(G[0])){B[0]=ta.call(G[0]);switch(B[0]){case "A":B[1]=
G[1];B[2]=G[2];B[3]=G[3];B[4]=G[4];B[5]=G[5];B[6]=+(G[6]+o);B[7]=+(G[7]+r);break;case "V":B[1]=+G[1]+r;break;case "H":B[1]=+G[1]+o;break;case "M":v=+G[1]+o;q=+G[2]+r;default:for(var a=1,f=G[F];a<f;a++)B[a]=+G[a]+(a%2?o:r)}}else{a=0;for(f=G[F];a<f;a++)g[D][a]=G[a]}switch(B[0]){case "Z":o=v;r=q;break;case "H":o=B[1];break;case "V":r=B[1];break;default:o=g[D][g[D][F]-2];r=g[D][g[D][F]-1]}}g.toString=u._path2string;return g},null,Ha),La=function(e,g,o,r){return[e,g,o,r,o,r]},kb=function(e,g,o,r,v,q){var D=
1/3,w=2/3;return[D*e+w*o,D*g+w*r,D*v+w*o,D*q+w*r,v,q]},lb=function(e,g,o,r,v,q,D,w,B,G){var a=z.PI,f=a*120/180,j=a/180*(+v||0),p=[],k,C=c(function(W,fa,ma){var qa=W*z.cos(ma)-fa*z.sin(ma);W=W*z.sin(ma)+fa*z.cos(ma);return{x:qa,y:W}});if(G){S=G[0];k=G[1];q=G[2];U=G[3]}else{k=C(e,g,-j);e=k.x;g=k.y;k=C(w,B,-j);w=k.x;B=k.y;z.cos(a/180*v);z.sin(a/180*v);k=(e-w)/2;S=(g-B)/2;o=L(o,z.abs(k));r=L(r,z.abs(S));U=k*k/(o*o)+S*S/(r*r);if(U>1){o=z.sqrt(U)*o;r=z.sqrt(U)*r}U=o*o;var P=r*r;U=(q==D?-1:1)*z.sqrt(z.abs((U*
P-U*S*S-P*k*k)/(U*S*S+P*k*k)));q=U*o*S/r+(e+w)/2;var U=U*-r*k/o+(g+B)/2,S=z.asin(((g-U)/r).toFixed(7));k=z.asin(((B-U)/r).toFixed(7));S=e<q?a-S:S;k=w<q?a-k:k;S<0&&(S=a*2+S);k<0&&(k=a*2+k);if(D&&S>k)S-=a*2;if(!D&&k>S)k-=a*2}a=k-S;if(z.abs(a)>f){p=k;a=w;P=B;k=S+f*(D&&k>S?1:-1);w=q+o*z.cos(k);B=U+r*z.sin(k);p=lb(w,B,o,r,v,0,D,a,P,[k,p,q,U])}a=k-S;v=z.cos(S);f=z.sin(S);D=z.cos(k);k=z.sin(k);a=z.tan(a/4);o=4/3*o*a;a=4/3*r*a;r=[e,g];e=[e+o*f,g-a*v];g=[w+o*k,B-a*D];w=[w,B];e[0]=2*r[0]-e[0];e[1]=2*r[1]-e[1];
if(G)return[e,g,w].concat(p);else{p=[e,g,w].concat(p)[M]().split(",");G=[];w=0;for(B=p[F];w<B;w++)G[w]=w%2?C(p[w-1],p[w],j).y:C(p[w],p[w+1],j).x;return G}},Oa=function(e,g,o,r,v,q,D,w,B){var G=1-B;return{x:X(G,3)*e+X(G,2)*3*B*o+G*3*B*B*v+X(B,3)*D,y:X(G,3)*g+X(G,2)*3*B*r+G*3*B*B*q+X(B,3)*w}},wb=c(function(e,g,o,r,v,q,D,w){var B=v-2*o+e-(D-2*v+o),G=2*(o-e)-2*(v-o),a=e-o,f=(-G+z.sqrt(G*G-4*B*a))/2/B;B=(-G-z.sqrt(G*G-4*B*a))/2/B;var j=[g,w],p=[e,D];z.abs(f)>1E12&&(f=0.5);z.abs(B)>1E12&&(B=0.5);if(f>0&&
f<1){f=Oa(e,g,o,r,v,q,D,w,f);p[R](f.x);j[R](f.y)}if(B>0&&B<1){f=Oa(e,g,o,r,v,q,D,w,B);p[R](f.x);j[R](f.y)}B=q-2*r+g-(w-2*q+r);G=2*(r-g)-2*(q-r);a=g-r;f=(-G+z.sqrt(G*G-4*B*a))/2/B;B=(-G-z.sqrt(G*G-4*B*a))/2/B;z.abs(f)>1E12&&(f=0.5);z.abs(B)>1E12&&(B=0.5);if(f>0&&f<1){f=Oa(e,g,o,r,v,q,D,w,f);p[R](f.x);j[R](f.y)}if(B>0&&B<1){f=Oa(e,g,o,r,v,q,D,w,B);p[R](f.x);j[R](f.y)}return{min:{x:m[O](0,p),y:m[O](0,j)},max:{x:L[O](0,p),y:L[O](0,j)}}}),Ra=c(function(e,g){var o=Ka(e),r=g&&Ka(g);e={x:0,y:0,bx:0,by:0,
X:0,Y:0,qx:null,qy:null};g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};var v=function(p,k){var C;if(!p)return["C",k.x,k.y,k.x,k.y,k.x,k.y];!(p[0]in{T:1,Q:1})&&(k.qx=k.qy=null);switch(p[0]){case "M":k.X=p[1];k.Y=p[2];break;case "A":p=["C"].concat(lb[O](0,[k.x,k.y].concat(p.slice(1))));break;case "S":C=k.x+(k.x-(k.bx||k.x));k=k.y+(k.y-(k.by||k.y));p=["C",C,k].concat(p.slice(1));break;case "T":k.qx=k.x+(k.x-(k.qx||k.x));k.qy=k.y+(k.y-(k.qy||k.y));p=["C"].concat(kb(k.x,k.y,k.qx,k.qy,p[1],p[2]));break;
case "Q":k.qx=p[1];k.qy=p[2];p=["C"].concat(kb(k.x,k.y,p[1],p[2],p[3],p[4]));break;case "L":p=["C"].concat(La(k.x,k.y,p[1],p[2]));break;case "H":p=["C"].concat(La(k.x,k.y,p[1],k.y));break;case "V":p=["C"].concat(La(k.x,k.y,k.x,p[1]));break;case "Z":p=["C"].concat(La(k.x,k.y,k.X,k.Y));break}return p},q=function(p,k){if(p[k][F]>7){p[k].shift();for(var C=p[k];C[F];)p.splice(k++,0,["C"].concat(C.splice(0,6)));p.splice(k,1);B=L(o[F],r&&r[F]||0)}},D=function(p,k,C,P,U){if(p&&k&&p[U][0]=="M"&&k[U][0]!="M"){k.splice(U,
0,["M",P.x,P.y]);C.bx=0;C.by=0;C.x=p[U][1];C.y=p[U][2];B=L(o[F],r&&r[F]||0)}},w=0,B=L(o[F],r&&r[F]||0);for(;w<B;w++){o[w]=v(o[w],e);q(o,w);r&&(r[w]=v(r[w],g));r&&q(r,w);D(o,r,e,g,w);D(r,o,g,e,w);var G=o[w],a=r&&r[w],f=G[F],j=r&&a[F];e.x=G[f-2];e.y=G[f-1];e.bx=ia(G[f-4])||e.x;e.by=ia(G[f-3])||e.y;g.bx=r&&(ia(a[j-4])||g.x);g.by=r&&(ia(a[j-3])||g.y);g.x=r&&a[j-2];g.y=r&&a[j-1]}return r?[o,r]:o},null,Ha),Za=c(function(e){for(var g=[],o=0,r=e[F];o<r;o++){var v={},q=e[o].match(/^([^:]*):?([\d\.]*)/);v.color=
u.getRGB(q[1]);if(v.color.error)return null;v.color=v.color.hex;q[2]&&(v.offset=q[2]+"%");g[R](v)}o=1;for(r=g[F]-1;o<r;o++)if(!g[o].offset){e=ia(g[o-1].offset||0);q=0;for(v=o+1;v<r;v++)if(g[v].offset){q=g[v].offset;break}if(!q){q=100;v=r}q=ia(q);for(q=(q-e)/(v-o+1);o<v;o++){e+=q;g[o].offset=e+"%"}}return g}),mb=function(){var e;if(u.is(arguments[0],"string")||u.is(arguments[0],"object")){e=u.is(arguments[0],"string")?n.getElementById(arguments[0]):arguments[0];if(e.tagName)return arguments[1]==null?
{container:e,width:e.style.pixelWidth||e.offsetWidth,height:e.style.pixelHeight||e.offsetHeight}:{container:e,width:arguments[1],height:arguments[2]}}else if(u.is(arguments[0],Q)&&arguments[F]>3)return{container:1,x:arguments[0],y:arguments[1],width:arguments[2],height:arguments[3]}},Sa=function(e,g){var o=this;for(var r in g)if(g[A](r)&&!(r in e))switch(typeof g[r]){case "function":(function(v){e[r]=e===o?v:function(){return v[O](o,arguments)}})(g[r]);break;case "object":e[r]=e[r]||{};Sa.call(this,
e[r],g[r]);break;default:e[r]=g[r];break}},Ja=function(e,g){e==g.top&&(g.top=e.prev);e==g.bottom&&(g.bottom=e.next);e.next&&(e.next.prev=e.prev);e.prev&&(e.prev.next=e.next)},Ta=function(e,g){if(g.top!==e){Ja(e,g);e.next=null;e.prev=g.top;g.top.next=e;g.top=e}},$a=function(e,g){if(g.bottom!==e){Ja(e,g);e.next=g.bottom;e.prev=null;g.bottom.prev=e;g.bottom=e}},Ua=function(e,g,o){Ja(e,o);g==o.top&&(o.top=e);g.next&&(g.next.prev=e);e.next=g.next;e.prev=g;g.next=e},Pa=function(e,g,o){Ja(e,o);g==o.bottom&&
(o.bottom=e);g.prev&&(g.prev.next=e);e.prev=g.prev;g.prev=e;e.next=g},ob=function(e){return function(){throw new Error("Rapha\u00ebl: you are calling to method \u201c"+e+"\u201d of removed object");}},pb=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/;if(u.svg){H[K].svgns="http://www.w3.org/2000/svg";H[K].xlink="http://www.w3.org/1999/xlink";da=function(e){return+e+(~~e===e)*0.5};var yb=function(e){for(var g=0,o=e[F];g<o;g++)if(d.call(e[g][0])!="a")for(var r=1,v=e[g][F];r<v;r++)e[g][r]=da(e[g][r]);else{e[g][6]=
da(e[g][6]);e[g][7]=da(e[g][7])}return e},ja=function(e,g){if(g)for(var o in g)g[A](o)&&e.setAttribute(o,g[o]);else return n.createElementNS(H[K].svgns,e)};u.toString=function(){return"Your browser supports SVG.\nYou are running Rapha\u00ebl "+this.version};var bb=function(e,g){var o=ja("path");g.canvas&&g.canvas.appendChild(o);g=new ga(o,g);g.type="path";Da(g,{fill:"none",stroke:"#000",path:e});return g},Ia=function(e,g,o){var r="linear",v=0.5,q=0.5,D=e.style;g=(g+"").replace(pb,function(a,f,j){r=
"radial";if(f&&j){v=ia(f);q=ia(j);a=(q>0.5)*2-1;X(v-0.5,2)+X(q-0.5,2)>0.25&&(q=z.sqrt(0.25-X(v-0.5,2))*a+0.5)&&q!=0.5&&(q=q.toFixed(5)-1.0E-5*a)}return""});g=g.split(/\s*\-\s*/);if(r=="linear"){var w=g.shift();w=-ia(w);if(isNaN(w))return null;var B=[0,0,z.cos(w*z.PI/180),z.sin(w*z.PI/180)];w=1/(L(z.abs(B[2]),z.abs(B[3]))||1);B[2]*=w;B[3]*=w;if(B[2]<0){B[0]=-B[2];B[2]=0}if(B[3]<0){B[1]=-B[3];B[3]=0}}g=Za(g);if(!g)return null;w=ja(r+"Gradient");w.id="r"+(u._id++).toString(36);ja(w,r=="radial"?{fx:v,
fy:q}:{x1:B[0],y1:B[1],x2:B[2],y2:B[3]});o.defs.appendChild(w);o=0;for(B=g[F];o<B;o++){var G=ja("stop");ja(G,{offset:g[o].offset?g[o].offset:!o?"0%":"100%","stop-color":g[o].color||"#fff"});w.appendChild(G)}ja(e,{fill:"url(#"+w.id+")",opacity:1,"fill-opacity":1});D.fill="";D.opacity=1;return D.fillOpacity=1},cb=function(e){var g=e.getBBox();ja(e.pattern,{patternTransform:u.format("translate({0},{1})",g.x,g.y)})},Da=function(e,g){var o={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,
1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},r=e.node,v=e.attrs,q=e.rotate(),D=function(k,C){if(C=o[d.call(C)]){var P=k.attrs["stroke-width"]||"1";k={round:P,square:P,butt:0}[k.attrs["stroke-linecap"]||g["stroke-linecap"]]||0;for(var U=[],S=C[F];S--;)U[S]=C[S]*P+(S%2?1:-1)*k;ja(r,{"stroke-dasharray":U[M](",")})}};g[A]("rotation")&&(q=g.rotation);var w=(q+"").split(b);if(w.length-1){w[1]=+w[1];w[2]=+w[2]}else w=null;ia(q)&&e.rotate(0,true);for(var B in g)if(g[A](B))if(xa[A](B)){var G=
g[B];v[B]=G;switch(B){case "rotation":e.rotate(G,true);break;case "href":case "title":case "target":var a=r.parentNode;if(d.call(a.tagName)!="a"){var f=ja("a");a.insertBefore(f,r);f.appendChild(r);a=f}a.setAttributeNS(e.paper.xlink,B,G);break;case "cursor":r.style.cursor=G;break;case "clip-rect":a=(G+"").split(b);if(a[F]==4){e.clip&&e.clip.parentNode.parentNode.removeChild(e.clip.parentNode);var j=ja("clipPath");f=ja("rect");j.id="r"+(u._id++).toString(36);ja(f,{x:a[0],y:a[1],width:a[2],height:a[3]});
j.appendChild(f);e.paper.defs.appendChild(j);ja(r,{"clip-path":"url(#"+j.id+")"});e.clip=f}if(!G){(G=n.getElementById(r.getAttribute("clip-path").replace(/(^url\(#|\)$)/g,"")))&&G.parentNode.removeChild(G);ja(r,{"clip-path":""});delete e.clip}break;case "path":if(G&&e.type=="path"){v.path=yb(Ka(G));ja(r,{d:v.path})}break;case "width":r.setAttribute(B,G);if(v.fx){B="x";G=v.x}else break;case "x":if(v.fx)G=-v.x-(v.width||0);case "rx":if(B=="rx"&&e.type=="rect")break;case "cx":w&&(B=="x"||B=="cx")&&(w[1]+=
G-v[B]);r.setAttribute(B,da(G));e.pattern&&cb(e);break;case "height":r.setAttribute(B,G);if(v.fy){B="y";G=v.y}else break;case "y":if(v.fy)G=-v.y-(v.height||0);case "ry":if(B=="ry"&&e.type=="rect")break;case "cy":w&&(B=="y"||B=="cy")&&(w[2]+=G-v[B]);r.setAttribute(B,da(G));e.pattern&&cb(e);break;case "r":e.type=="rect"?ja(r,{rx:G,ry:G}):r.setAttribute(B,G);break;case "src":e.type=="image"&&r.setAttributeNS(e.paper.xlink,"href",G);break;case "stroke-width":r.style.strokeWidth=G;r.setAttribute(B,G);
v["stroke-dasharray"]&&D(e,v["stroke-dasharray"]);break;case "stroke-dasharray":D(e,G);break;case "translation":G=(G+"").split(b);G[0]=+G[0]||0;G[1]=+G[1]||0;if(w){w[1]+=G[0];w[2]+=G[1]}Ya.call(e,G[0],G[1]);break;case "scale":G=(G+"").split(b);e.scale(+G[0]||1,+G[1]||+G[0]||1,+G[2]||null,+G[3]||null);break;case "fill":if(a=(G+"").match(ea)){j=ja("pattern");var p=ja("image");j.id="r"+(u._id++).toString(36);ja(j,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});ja(p,{x:0,y:0});p.setAttributeNS(e.paper.xlink,
"href",a[1]);j.appendChild(p);G=n.createElement("img");G.style.cssText="position:absolute;left:-9999em;top-9999em";G.onload=function(){ja(j,{width:this.offsetWidth,height:this.offsetHeight});ja(p,{width:this.offsetWidth,height:this.offsetHeight});n.body.removeChild(this);e.paper.safari()};n.body.appendChild(G);G.src=a[1];e.paper.defs.appendChild(j);r.style.fill="url(#"+j.id+")";ja(r,{fill:"url(#"+j.id+")"});e.pattern=j;e.pattern&&cb(e);break}if(u.getRGB(G).error){if(({circle:1,ellipse:1}[A](e.type)||
(G+"").charAt()!="r")&&Ia(r,G,e.paper)){v.gradient=G;v.fill="none";break}}else{delete g.gradient;delete v.gradient;!u.is(v.opacity,"undefined")&&u.is(g.opacity,"undefined")&&ja(r,{opacity:v.opacity});!u.is(v["fill-opacity"],"undefined")&&u.is(g["fill-opacity"],"undefined")&&ja(r,{"fill-opacity":v["fill-opacity"]})}case "stroke":r.setAttribute(B,u.getRGB(G).hex);break;case "gradient":(({circle:1,ellipse:1})[A](e.type)||(G+"").charAt()!="r")&&Ia(r,G,e.paper);break;case "opacity":case "fill-opacity":if(v.gradient){if(a=
n.getElementById(r.getAttribute("fill").replace(/^url\(#|\)$/g,""))){a=a.getElementsByTagName("stop");a[a[F]-1].setAttribute("stop-opacity",G)}break}default:B=="font-size"&&(G=oa(G,10)+"px");a=B.replace(/(\-.)/g,function(k){return ta.call(k.substring(1))});r.style[a]=G;r.setAttribute(B,G);break}}qb(e,g);if(w)e.rotate(w.join(I));else ia(q)&&e.rotate(q,true)},qb=function(e,g){if(!(e.type!="text"||!(g[A]("text")||g[A]("font")||g[A]("font-size")||g[A]("x")||g[A]("y")))){var o=e.attrs,r=e.node,v=r.firstChild?
oa(n.defaultView.getComputedStyle(r.firstChild,"").getPropertyValue("font-size"),10):10;if(g[A]("text")){for(o.text=g.text;r.firstChild;)r.removeChild(r.firstChild);g=(g.text+"").split("\n");for(var q=0,D=g[F];q<D;q++)if(g[q]){var w=ja("tspan");q&&ja(w,{dy:v*1.2,x:o.x});w.appendChild(n.createTextNode(g[q]));r.appendChild(w)}}else{g=r.getElementsByTagName("tspan");q=0;for(D=g[F];q<D;q++)q&&ja(g[q],{dy:v*1.2,x:o.x})}ja(r,{y:o.y});e=e.getBBox();(e=o.y-(e.y+e.height/2))&&isFinite(e)&&ja(r,{y:o.y+e})}},
ga=function(e,g){this[0]=e;this.id=u._oid++;this.node=e;e.raphael=this;this.paper=g;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1};!g.bottom&&(g.bottom=this);(this.prev=g.top)&&(g.top.next=this);g.top=this;this.next=null};ga[K].rotate=function(e,g,o){if(this.removed)return this;if(e==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][M](I);return this._.rt.deg}var r=this.getBBox();e=(e+"").split(b);if(e[F]-1){g=ia(e[1]);o=ia(e[2])}e=
ia(e[0]);if(g!=null)this._.rt.deg=e;else this._.rt.deg+=e;o==null&&(g=null);this._.rt.cx=g;this._.rt.cy=o;g=g==null?r.x+r.width/2:g;o=o==null?r.y+r.height/2:o;if(this._.rt.deg){this.transformations[0]=u.format("rotate({0} {1} {2})",this._.rt.deg,g,o);this.clip&&ja(this.clip,{transform:u.format("rotate({0} {1} {2})",-this._.rt.deg,g,o)})}else{this.transformations[0]="";this.clip&&ja(this.clip,{transform:""})}ja(this.node,{transform:this.transformations[M](I)});return this};ga[K].hide=function(){!this.removed&&
(this.node.style.display="none");return this};ga[K].show=function(){!this.removed&&(this.node.style.display="");return this};ga[K].remove=function(){if(!this.removed){Ja(this,this.paper);this.node.parentNode.removeChild(this.node);for(var e in this)delete this[e];this.removed=true}};ga[K].getBBox=function(){if(this.removed)return this;if(this.type=="path")return Fa(this.attrs.path);if(this.node.style.display=="none"){this.show();var e=true}var g={};try{g=this.node.getBBox()}catch(o){}finally{g=g||
{}}if(this.type=="text"){g={x:g.x,y:Infinity,width:0,height:0};for(var r=0,v=this.node.getNumberOfChars();r<v;r++){var q=this.node.getExtentOfChar(r);q.y<g.y&&(g.y=q.y);q.y+q.height-g.y>g.height&&(g.height=q.y+q.height-g.y);q.x+q.width-g.x>g.width&&(g.width=q.x+q.width-g.x)}}e&&this.hide();return g};ga[K].attr=function(){if(this.removed)return this;if(arguments[F]==0){var e={};for(var g in this.attrs)if(this.attrs[A](g))e[g]=this.attrs[g];this._.rt.deg&&(e.rotation=this.rotate());(this._.sx!=1||this._.sy!=
1)&&(e.scale=this.scale());e.gradient&&e.fill=="none"&&(e.fill=e.gradient)&&delete e.gradient;return e}if(arguments[F]==1&&u.is(arguments[0],"string")){if(arguments[0]=="translation")return Ya.call(this);if(arguments[0]=="rotation")return this.rotate();if(arguments[0]=="scale")return this.scale();if(arguments[0]=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[arguments[0]]}if(arguments[F]==1&&u.is(arguments[0],"array")){g={};for(e in arguments[0])if(arguments[0][A](e))g[arguments[0][e]]=
this.attrs[arguments[0][e]];return g}if(arguments[F]==2){g={};g[arguments[0]]=arguments[1];Da(this,g)}else arguments[F]==1&&u.is(arguments[0],"object")&&Da(this,arguments[0]);return this};ga[K].toFront=function(){if(this.removed)return this;this.node.parentNode.appendChild(this.node);var e=this.paper;e.top!=this&&Ta(this,e);return this};ga[K].toBack=function(){if(this.removed)return this;if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);
$a(this,this.paper)}return this};ga[K].insertAfter=function(e){if(this.removed)return this;var g=e.node;g.nextSibling?g.parentNode.insertBefore(this.node,g.nextSibling):g.parentNode.appendChild(this.node);Ua(this,e,this.paper);return this};ga[K].insertBefore=function(e){if(this.removed)return this;var g=e.node;g.parentNode.insertBefore(this.node,g);Pa(this,e,this.paper);return this};var rb=function(e,g,o,r){g=da(g);o=da(o);var v=ja("circle");e.canvas&&e.canvas.appendChild(v);e=new ga(v,e);e.attrs=
{cx:g,cy:o,r:r,fill:"none",stroke:"#000"};e.type="circle";ja(v,e.attrs);return e},sb=function(e,g,o,r,v,q){g=da(g);o=da(o);var D=ja("rect");e.canvas&&e.canvas.appendChild(D);e=new ga(D,e);e.attrs={x:g,y:o,width:r,height:v,r:q||0,rx:q||0,ry:q||0,fill:"none",stroke:"#000"};e.type="rect";ja(D,e.attrs);return e},ya=function(e,g,o,r,v){g=da(g);o=da(o);var q=ja("ellipse");e.canvas&&e.canvas.appendChild(q);e=new ga(q,e);e.attrs={cx:g,cy:o,rx:r,ry:v,fill:"none",stroke:"#000"};e.type="ellipse";ja(q,e.attrs);
return e},tb=function(e,g,o,r,v,q){var D=ja("image");ja(D,{x:o,y:r,width:v,height:q,preserveAspectRatio:"none"});D.setAttributeNS(e.xlink,"href",g);e.canvas&&e.canvas.appendChild(D);e=new ga(D,e);e.attrs={x:o,y:r,width:v,height:q,src:g};e.type="image";return e},db=function(e,g,o,r){var v=ja("text");ja(v,{x:g,y:o,"text-anchor":"middle"});e.canvas&&e.canvas.appendChild(v);e=new ga(v,e);e.attrs={x:g,y:o,"text-anchor":"middle",text:r,font:xa.font,stroke:"none",fill:"#000"};e.type="text";Da(e,e.attrs);
return e},eb=function(e,g){this.width=e||this.width;this.height=g||this.height;this.canvas.setAttribute("width",this.width);this.canvas.setAttribute("height",this.height);return this},Qa=function(){var e=mb[O](null,arguments),g=e&&e.container,o=e.x,r=e.y,v=e.width;e=e.height;if(!g)throw new Error("SVG container not found.");var q=ja("svg");v=v||512;e=e||342;ja(q,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:v,height:e});if(g==1){q.style.cssText="position:absolute;left:"+o+"px;top:"+r+"px";
n.body.appendChild(q)}else g.firstChild?g.insertBefore(q,g.firstChild):g.appendChild(q);g=new H;g.width=v;g.height=e;g.canvas=q;Sa.call(g,g,u.fn);g.clear();return g};H[K].clear=function(){for(var e=this.canvas;e.firstChild;)e.removeChild(e.firstChild);this.bottom=this.top=null;(this.desc=ja("desc")).appendChild(n.createTextNode("Created with Rapha\u00ebl"));e.appendChild(this.desc);e.appendChild(this.defs=ja("defs"))};H[K].remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);
for(var e in this)this[e]=ob(e)}}if(u.vml){var fb=function(e){var g=/[ahqstv]/ig,o=Ka;(e+"").match(g)&&(o=Ra);g=/[clmz]/g;if(o==Ka&&!(e+"").match(g)){var r={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},v=/-?[^,\s-]+/g;return e=(e+"").replace(/([clmz]),?([^clmz]*)/gi,function(a,f,j){var p=[];j.replace(v,function(k){p[R](da(k))});return r[f]+p})}g=o(e);e=[];for(var q,D=0,w=g[F];D<w;D++){o=g[D];q=d.call(g[D][0]);q=="z"&&(q="x");for(var B=1,G=o[F];B<G;B++)q+=da(o[B])+(B!=G-1?",":"");e[R](q)}return e[M](I)};
u.toString=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\u00ebl "+this.version};bb=function(e,g){var o=sa("group");o.style.cssText="position:absolute;left:0;top:0;width:"+g.width+"px;height:"+g.height+"px";o.coordsize=g.coordsize;o.coordorigin=g.coordorigin;var r=sa("shape"),v=r.style;v.width=g.width+"px";v.height=g.height+"px";r.coordsize=this.coordsize;r.coordorigin=this.coordorigin;o.appendChild(r);r=new ga(r,o,g);r.isAbsolute=true;r.type=
"path";r.path=[];r.Path="";e&&Da(r,{fill:"none",stroke:"#000",path:e});g.canvas.appendChild(o);return r};Da=function(e,g){e.attrs=e.attrs||{};var o=e.node,r=e.attrs,v=o.style,q;for(q in g)if(g[A](q))r[q]=g[q];g.href&&(o.href=g.href);g.title&&(o.title=g.title);g.target&&(o.target=g.target);g.cursor&&(v.cursor=g.cursor);if(g.path&&e.type=="path"){r.path=g.path;o.path=fb(r.path)}g.rotation!=null&&e.rotate(g.rotation,true);if(g.translation){q=(g.translation+"").split(b);Ya.call(e,q[0],q[1]);if(e._.rt.cx!=
null){e._.rt.cx+=+q[0];e._.rt.cy+=+q[1];e.setBox(e.attrs,q[0],q[1])}}if(g.scale){q=(g.scale+"").split(b);e.scale(+q[0]||1,+q[1]||+q[0]||1,+q[2]||null,+q[3]||null)}if("clip-rect"in g){q=(g["clip-rect"]+"").split(b);if(q[F]==4){q[2]=+q[2]+ +q[0];q[3]=+q[3]+ +q[1];var D=o.clipRect||n.createElement("div"),w=D.style,B=o.parentNode;w.clip=u.format("rect({1}px {2}px {3}px {0}px)",q);if(!o.clipRect){w.position="absolute";w.top=0;w.left=0;w.width=e.paper.width+"px";w.height=e.paper.height+"px";B.parentNode.insertBefore(D,
B);D.appendChild(B);o.clipRect=D}}if(!g["clip-rect"])o.clipRect&&(o.clipRect.style.clip="")}if(e.type=="image"&&g.src)o.src=g.src;if(e.type=="image"&&g.opacity){o.filterOpacity=" progid:DXImageTransform.Microsoft.Alpha(opacity="+g.opacity*100+")";v.filter=(o.filterMatrix||"")+(o.filterOpacity||"")}g.font&&(v.font=g.font);g["font-family"]&&(v.fontFamily='"'+g["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,"")+'"');g["font-size"]&&(v.fontSize=g["font-size"]);g["font-weight"]&&(v.fontWeight=g["font-weight"]);
g["font-style"]&&(v.fontStyle=g["font-style"]);if(g.opacity!=null||g["stroke-width"]!=null||g.fill!=null||g.stroke!=null||g["stroke-width"]!=null||g["stroke-opacity"]!=null||g["fill-opacity"]!=null||g["stroke-dasharray"]!=null||g["stroke-miterlimit"]!=null||g["stroke-linejoin"]!=null||g["stroke-linecap"]!=null){o=e.shape||o;q=o.getElementsByTagName("fill")&&o.getElementsByTagName("fill")[0];D=false;!q&&(D=q=sa("fill"));if("fill-opacity"in g||"opacity"in g){v=((+r["fill-opacity"]+1||2)-1)*((+r.opacity+
1||2)-1);v<0&&(v=0);v>1&&(v=1);q.opacity=v}g.fill&&(q.on=true);if(q.on==null||g.fill=="none")q.on=false;if(q.on&&g.fill)if(v=g.fill.match(ea)){q.src=v[1];q.type="tile"}else{q.color=u.getRGB(g.fill).hex;q.src="";q.type="solid";if(u.getRGB(g.fill).error&&(e.type in{circle:1,ellipse:1}||(g.fill+"").charAt()!="r")&&Ia(e,g.fill)){r.fill="none";r.gradient=g.fill}}D&&o.appendChild(q);q=o.getElementsByTagName("stroke")&&o.getElementsByTagName("stroke")[0];D=false;!q&&(D=q=sa("stroke"));if(g.stroke&&g.stroke!=
"none"||g["stroke-width"]||g["stroke-opacity"]!=null||g["stroke-dasharray"]||g["stroke-miterlimit"]||g["stroke-linejoin"]||g["stroke-linecap"])q.on=true;(g.stroke=="none"||q.on==null||g.stroke==0||g["stroke-width"]==0)&&(q.on=false);q.on&&g.stroke&&(q.color=u.getRGB(g.stroke).hex);v=((+r["stroke-opacity"]+1||2)-1)*((+r.opacity+1||2)-1);w=(ia(g["stroke-width"])||1)*0.75;v<0&&(v=0);v>1&&(v=1);g["stroke-width"]==null&&(w=r["stroke-width"]);g["stroke-width"]&&(q.weight=w);w&&w<1&&(v*=w)&&(q.weight=1);
q.opacity=v;g["stroke-linejoin"]&&(q.joinstyle=g["stroke-linejoin"]||"miter");q.miterlimit=g["stroke-miterlimit"]||8;g["stroke-linecap"]&&(q.endcap=g["stroke-linecap"]=="butt"?"flat":g["stroke-linecap"]=="square"?"square":"round");if(g["stroke-dasharray"]){v={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};q.dashstyle=v[A](g["stroke-dasharray"])?v[g["stroke-dasharray"]]:""}D&&
o.appendChild(q)}if(e.type=="text"){v=e.paper.span.style;r.font&&(v.font=r.font);r["font-family"]&&(v.fontFamily=r["font-family"]);r["font-size"]&&(v.fontSize=r["font-size"]);r["font-weight"]&&(v.fontWeight=r["font-weight"]);r["font-style"]&&(v.fontStyle=r["font-style"]);e.node.string&&(e.paper.span.innerHTML=(e.node.string+"").replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));e.W=r.w=e.paper.span.offsetWidth;e.H=r.h=e.paper.span.offsetHeight;e.X=r.x;e.Y=r.y+da(e.H/2);switch(r["text-anchor"]){case "start":e.node.style["v-text-align"]=
"left";e.bbx=da(e.W/2);break;case "end":e.node.style["v-text-align"]="right";e.bbx=-da(e.W/2);break;default:e.node.style["v-text-align"]="center";break}}};Ia=function(e,g){e.attrs=e.attrs||{};var o=e.node.getElementsByTagName("fill"),r="linear",v=".5 .5";e.attrs.gradient=g;g=(g+"").replace(pb,function(B,G,a){r="radial";if(G&&a){G=ia(G);a=ia(a);X(G-0.5,2)+X(a-0.5,2)>0.25&&(a=z.sqrt(0.25-X(G-0.5,2))*((a>0.5)*2-1)+0.5);v=G+I+a}return""});g=g.split(/\s*\-\s*/);if(r=="linear"){var q=g.shift();q=-ia(q);
if(isNaN(q))return null}g=Za(g);if(!g)return null;e=e.shape||e.node;o=o[0]||sa("fill");if(g[F]){o.on=true;o.method="none";o.type=r=="radial"?"gradientradial":"gradient";o.color=g[0].color;o.color2=g[g[F]-1].color;e=[];for(var D=0,w=g[F];D<w;D++)g[D].offset&&e[R](g[D].offset+I+g[D].color);o.colors&&(o.colors.value=e[F]?e[M](","):"0% "+o.color);if(r=="radial"){o.focus="100%";o.focussize=v;o.focusposition=v}else o.angle=(270-q)%360}return 1};ga=function(e,g,o){this[0]=e;this.id=u._oid++;this.node=e;
e.raphael=this;this.Y=this.X=0;this.attrs={};this.Group=g;this.paper=o;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1};!o.bottom&&(o.bottom=this);(this.prev=o.top)&&(o.top.next=this);o.top=this;this.next=null};ga[K].rotate=function(e,g,o){if(this.removed)return this;if(e==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][M](I);return this._.rt.deg}e=(e+"").split(b);if(e[F]-1){g=ia(e[1]);o=ia(e[2])}e=ia(e[0]);if(g!=null)this._.rt.deg=e;else this._.rt.deg+=e;o==null&&(g=null);this._.rt.cx=
g;this._.rt.cy=o;this.setBox(this.attrs,g,o);this.Group.style.rotation=this._.rt.deg;return this};ga[K].setBox=function(e,g,o){if(this.removed)return this;var r=this.Group.style,v=this.shape&&this.shape.style||this.node.style;e=e||{};for(var q in e)if(e[A](q))this.attrs[q]=e[q];g=g||this._.rt.cx;o=o||this._.rt.cy;var D=this.attrs,w,B,G;switch(this.type){case "circle":q=D.cx-D.r;w=D.cy-D.r;B=G=D.r*2;break;case "ellipse":q=D.cx-D.rx;w=D.cy-D.ry;B=D.rx*2;G=D.ry*2;break;case "rect":case "image":q=+D.x;
w=+D.y;B=D.width||0;G=D.height||0;break;case "text":this.textpath.v=["m",da(D.x),", ",da(D.y-2),"l",da(D.x)+1,", ",da(D.y-2)][M]("");q=D.x-da(this.W/2);w=D.y-this.H/2;B=this.W;G=this.H;break;case "path":if(this.attrs.path){G=Fa(this.attrs.path);q=G.x;w=G.y;B=G.width;G=G.height}else{w=q=0;B=this.paper.width;G=this.paper.height}break;default:w=q=0;B=this.paper.width;G=this.paper.height;break}g=g==null?q+B/2:g;o=o==null?w+G/2:o;g=g-this.paper.width/2;o=o-this.paper.height/2;if(this.type=="path"||this.type==
"text"){r.left!=g+"px"&&(r.left=g+"px");r.top!=o+"px"&&(r.top=o+"px");this.X=this.type=="text"?q:-g;this.Y=this.type=="text"?w:-o;this.W=B;this.H=G;v.left!=-g+"px"&&(v.left=-g+"px");v.top!=-o+"px"&&(v.top=-o+"px")}else{r.left!=g+"px"&&(r.left=g+"px");r.top!=o+"px"&&(r.top=o+"px");this.X=q;this.Y=w;this.W=B;this.H=G;r.width!=this.paper.width+"px"&&(r.width=this.paper.width+"px");r.height!=this.paper.height+"px"&&(r.height=this.paper.height+"px");v.left!=q-g+"px"&&(v.left=q-g+"px");v.top!=w-o+"px"&&
(v.top=w-o+"px");v.width!=B+"px"&&(v.width=B+"px");v.height!=G+"px"&&(v.height=G+"px");e=(+e.r||0)/m(B,G);if(this.type=="rect"&&this.arcsize.toFixed(4)!=e.toFixed(4)&&(e||this.arcsize)){r=sa("roundrect");v={};q=0;o=this.events&&this.events[F];r.arcsize=e;r.raphael=this;this.Group.appendChild(r);this.Group.removeChild(this.node);this[0]=this.node=r;this.arcsize=e;for(q in D)v[q]=D[q];delete v.scale;this.attr(v);if(this.events)for(;q<o;q++)this.events[q].unbind=ub(this.node,this.events[q].name,this.events[q].f,
this)}}};ga[K].hide=function(){!this.removed&&(this.Group.style.display="none");return this};ga[K].show=function(){!this.removed&&(this.Group.style.display="block");return this};ga[K].getBBox=function(){if(this.removed)return this;if(this.type=="path")return Fa(this.attrs.path);return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}};ga[K].remove=function(){if(!this.removed){Ja(this,this.paper);this.node.parentNode.removeChild(this.node);this.Group.parentNode.removeChild(this.Group);this.shape&&
this.shape.parentNode.removeChild(this.shape);for(var e in this)delete this[e];this.removed=true}};ga[K].attr=function(){if(this.removed)return this;if(arguments[F]==0){var e={};for(var g in this.attrs)if(this.attrs[A](g))e[g]=this.attrs[g];this._.rt.deg&&(e.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(e.scale=this.scale());e.gradient&&e.fill=="none"&&(e.fill=e.gradient)&&delete e.gradient;return e}if(arguments[F]==1&&u.is(arguments[0],"string")){if(arguments[0]=="translation")return Ya.call(this);
if(arguments[0]=="rotation")return this.rotate();if(arguments[0]=="scale")return this.scale();if(arguments[0]=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[arguments[0]]}if(this.attrs&&arguments[F]==1&&u.is(arguments[0],"array")){e={};g=0;for(var o=arguments[0][F];g<o;g++)e[arguments[0][g]]=this.attrs[arguments[0][g]];return e}if(arguments[F]==2){e={};e[arguments[0]]=arguments[1]}arguments[F]==1&&u.is(arguments[0],"object")&&(e=arguments[0]);if(e){if(e.text&&
this.type=="text")this.node.string=e.text;Da(this,e);if(e.gradient&&({circle:1,ellipse:1}[A](this.type)||(e.gradient+"").charAt()!="r"))Ia(this,e.gradient);(this.type!="path"||this._.rt.deg)&&this.setBox(this.attrs)}return this};ga[K].toFront=function(){!this.removed&&this.Group.parentNode.appendChild(this.Group);this.paper.top!=this&&Ta(this,this.paper);return this};ga[K].toBack=function(){if(this.removed)return this;if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,
this.Group.parentNode.firstChild);$a(this,this.paper)}return this};ga[K].insertAfter=function(e){if(this.removed)return this;e.Group.nextSibling?e.Group.parentNode.insertBefore(this.Group,e.Group.nextSibling):e.Group.parentNode.appendChild(this.Group);Ua(this,e,this.paper);return this};ga[K].insertBefore=function(e){if(this.removed)return this;e.Group.parentNode.insertBefore(this.Group,e.Group);Pa(this,e,this.paper);return this};rb=function(e,g,o,r){var v=sa("group"),q=sa("oval");v.style.cssText=
"position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";v.coordsize=e.coordsize;v.coordorigin=e.coordorigin;v.appendChild(q);q=new ga(q,v,e);q.type="circle";Da(q,{stroke:"#000",fill:"none"});q.attrs.cx=g;q.attrs.cy=o;q.attrs.r=r;q.setBox({x:g-r,y:o-r,width:r*2,height:r*2});e.canvas.appendChild(v);return q};sb=function(e,g,o,r,v,q){var D=sa("group"),w=sa("roundrect"),B=(+q||0)/m(r,v);D.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";D.coordsize=
e.coordsize;D.coordorigin=e.coordorigin;D.appendChild(w);w.arcsize=B;w=new ga(w,D,e);w.type="rect";Da(w,{stroke:"#000"});w.arcsize=B;w.setBox({x:g,y:o,width:r,height:v,r:q});e.canvas.appendChild(D);return w};ya=function(e,g,o,r,v){var q=sa("group"),D=sa("oval");q.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";q.coordsize=e.coordsize;q.coordorigin=e.coordorigin;q.appendChild(D);D=new ga(D,q,e);D.type="ellipse";Da(D,{stroke:"#000"});D.attrs.cx=g;D.attrs.cy=
o;D.attrs.rx=r;D.attrs.ry=v;D.setBox({x:g-r,y:o-v,width:r*2,height:v*2});e.canvas.appendChild(q);return D};tb=function(e,g,o,r,v,q){var D=sa("group"),w=sa("image");D.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";D.coordsize=e.coordsize;D.coordorigin=e.coordorigin;w.src=g;D.appendChild(w);w=new ga(w,D,e);w.type="image";w.attrs.src=g;w.attrs.x=o;w.attrs.y=r;w.attrs.w=v;w.attrs.h=q;w.setBox({x:o,y:r,width:v,height:q});e.canvas.appendChild(D);return w};db=function(e,
g,o,r){var v=sa("group"),q=sa("shape"),D=q.style,w=sa("path"),B=sa("textpath");v.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";v.coordsize=e.coordsize;v.coordorigin=e.coordorigin;w.v=u.format("m{0},{1}l{2},{1}",da(g),da(o),da(g)+1);w.textpathok=true;D.width=e.width;D.height=e.height;B.string=r+"";B.on=true;q.appendChild(B);q.appendChild(w);v.appendChild(q);D=new ga(B,v,e);D.shape=q;D.textpath=w;D.type="text";D.attrs.text=r;D.attrs.x=g;D.attrs.y=o;D.attrs.w=
1;D.attrs.h=1;Da(D,{font:xa.font,stroke:"none",fill:"#000"});D.setBox();e.canvas.appendChild(v);return D};eb=function(e,g){var o=this.canvas.style;e==+e&&(e+="px");g==+g&&(g+="px");o.width=e;o.height=g;o.clip="rect(0 "+e+" "+g+" 0)";return this};var sa;n.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!n.namespaces.rvml&&n.namespaces.add("rvml","urn:schemas-microsoft-com:vml");sa=function(e){return n.createElement("<rvml:"+e+' class="rvml">')}}catch(Bb){sa=function(e){return n.createElement("<"+
e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}Qa=function(){var e=mb[O](null,arguments),g=e.container,o=e.height,r=e.width,v=e.x;e=e.y;if(!g)throw new Error("VML container not found.");var q=new H,D=q.canvas=n.createElement("div"),w=D.style;r=r||512;o=o||342;r==+r&&(r+="px");o==+o&&(o+="px");q.width=1E3;q.height=1E3;q.coordsize="1000 1000";q.coordorigin="0 0";q.span=n.createElement("span");q.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";
D.appendChild(q.span);w.cssText=u.format("width:{0};height:{1};position:absolute;clip:rect(0 {0} {1} 0);overflow:hidden",r,o);if(g==1){n.body.appendChild(D);w.left=v+"px";w.top=e+"px"}else{g.style.width=r;g.style.height=o;g.firstChild?g.insertBefore(D,g.firstChild):g.appendChild(D)}Sa.call(q,q,u.fn);return q};H[K].clear=function(){this.canvas.innerHTML="";this.span=n.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";
this.canvas.appendChild(this.span);this.bottom=this.top=null};H[K].remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]=ob(e)}}H[K].safari=/^Apple|^Google/.test(navigator.vendor)&&!(navigator.userAgent.indexOf("Version/4.0")+1)?function(){var e=this.rect(-99,-99,this.width+99,this.height+99);setTimeout(function(){e.remove()})}:function(){};var ub=function(){if(n.addEventListener)return function(e,g,o,r){var v=function(q){return o.call(r,q)};e.addEventListener(g,
v,false);return function(){e.removeEventListener(g,v,false);return true}};else if(n.attachEvent)return function(e,g,o,r){var v=function(q){return o.call(r,q||x.event)};e.attachEvent("on"+g,v);return function(){e.detachEvent("on"+g,v);return true}}}();for(Aa=V[F];Aa--;)(function(e){ga[K][e]=function(g){if(u.is(g,"function")){this.events=this.events||[];this.events.push({name:e,f:g,unbind:ub(this.shape||this.node,e,g,this)})}return this};ga[K]["un"+e]=function(g){for(var o=this.events,r=o[F];r--;)if(o[r].name==
e&&o[r].f==g){o[r].unbind();o.splice(r,1);!o.length&&delete this.events;return this}return this}})(V[Aa]);ga[K].hover=function(e,g){return this.mouseover(e).mouseout(g)};ga[K].unhover=function(e,g){return this.unmouseover(e).unmouseout(g)};H[K].circle=function(e,g,o){return rb(this,e||0,g||0,o||0)};H[K].rect=function(e,g,o,r,v){return sb(this,e||0,g||0,o||0,r||0,v||0)};H[K].ellipse=function(e,g,o,r){return ya(this,e||0,g||0,o||0,r||0)};H[K].path=function(e){e&&!u.is(e,"string")&&!u.is(e[0],"array")&&
(e+="");return bb(u.format[O](u,arguments),this)};H[K].image=function(e,g,o,r,v){return tb(this,e||"about:blank",g||0,o||0,r||0,v||0)};H[K].text=function(e,g,o){return db(this,e||0,g||0,o||"")};H[K].set=function(e){arguments[F]>1&&(e=Array[K].splice.call(arguments,0,arguments[F]));return new Ga(e)};H[K].setSize=eb;H[K].top=H[K].bottom=null;H[K].raphael=u;ga[K].scale=function(e,g,o,r){if(e==null&&g==null)return{x:this._.sx,y:this._.sy,toString:s};g=g||e;!+g&&(g=e);var v,q,D=this.attrs;if(e!=0){var w=
this.getBBox(),B=w.x+w.width/2,G=w.y+w.height/2;v=e/this._.sx;q=g/this._.sy;o=+o||o==0?o:B;r=+r||r==0?r:G;w=~~(e/z.abs(e));var a=~~(g/z.abs(g)),f=this.node.style,j=o+(B-o)*v;G=r+(G-r)*q;switch(this.type){case "rect":case "image":var p=D.width*w*v,k=D.height*a*q;this.attr({height:k,r:D.r*m(w*v,a*q),width:p,x:j-p/2,y:G-k/2});break;case "circle":case "ellipse":this.attr({rx:D.rx*w*v,ry:D.ry*a*q,r:D.r*m(w*v,a*q),cx:j,cy:G});break;case "path":B=jb(D.path);for(var C=true,P=0,U=B[F];P<U;P++){var S=B[P],
W;W=ta.call(S[0]);if(!(W=="M"&&C)){C=false;if(W=="A"){S[B[P][F]-2]*=v;S[B[P][F]-1]*=q;S[1]*=w*v;S[2]*=a*q;S[5]=+(w+a?!!+S[5]:!+S[5])}else if(W=="H"){W=1;for(jj=S[F];W<jj;W++)S[W]*=v}else if(W=="V"){W=1;for(jj=S[F];W<jj;W++)S[W]*=q}else{W=1;for(jj=S[F];W<jj;W++)S[W]*=W%2?v:q}}}q=Fa(B);v=j-q.x-q.width/2;q=G-q.y-q.height/2;B[0][1]+=v;B[0][2]+=q;this.attr({path:B});break}if(this.type in{text:1,image:1}&&(w!=1||a!=1))if(this.transformations){this.transformations[2]="scale(".concat(w,",",a,")");this.node.setAttribute("transform",
this.transformations[M](I));v=w==-1?-D.x-(p||0):D.x;q=a==-1?-D.y-(k||0):D.y;this.attr({x:v,y:q});D.fx=w-1;D.fy=a-1}else{this.node.filterMatrix=" progid:DXImageTransform.Microsoft.Matrix(M11=".concat(w,", M12=0, M21=0, M22=",a,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");f.filter=(this.node.filterMatrix||"")+(this.node.filterOpacity||"")}else if(this.transformations){this.transformations[2]="";this.node.setAttribute("transform",this.transformations[M](I));D.fx=0;D.fy=0}else{this.node.filterMatrix=
"";f.filter=(this.node.filterMatrix||"")+(this.node.filterOpacity||"")}D.scale=[e,g,o,r][M](I);this._.sx=e;this._.sy=g}return this};ga[K].clone=function(){var e=this.attr();delete e.scale;delete e.translation;return this.paper[this.type]().attr(e)};V=function(e,g){return function(o,r,v){o=Ra(o);for(var q,D,w,B,G="",a={},f=0,j=0,p=o.length;j<p;j++){w=o[j];if(w[0]=="M"){q=+w[1];D=+w[2]}else{B=zb(q,D,w[1],w[2],w[3],w[4],w[5],w[6]);if(f+B>r){if(g&&!a.start){q=u.findDotsAtSegment(q,D,w[1],w[2],w[3],w[4],
w[5],w[6],(r-f)/B);G+=["C",q.start.x,q.start.y,q.m.x,q.m.y,q.x,q.y];if(v)return G;a.start=G;G=["M",q.x,q.y+"C",q.n.x,q.n.y,q.end.x,q.end.y,w[5],w[6]][M]();f+=B;q=+w[5];D=+w[6];continue}if(!e&&!g){q=u.findDotsAtSegment(q,D,w[1],w[2],w[3],w[4],w[5],w[6],(r-f)/B);return{x:q.x,y:q.y,alpha:q.alpha}}}f+=B;q=+w[5];D=+w[6]}G+=w}a.end=G;q=e?f:g?a:u.findDotsAtSegment(q,D,w[1],w[2],w[3],w[4],w[5],w[6],1);q.alpha&&(q={x:q.x,y:q.y,alpha:q.alpha});return q}};var zb=c(function(e,g,o,r,v,q,D,w){for(var B={x:0,y:0},
G=0,a=0;a<1.01;a+=0.01){var f=Oa(e,g,o,r,v,q,D,w,a);a&&(G+=z.sqrt(X(B.x-f.x,2)+X(B.y-f.y,2)));B=f}return G}),vb=V(1),Wa=V(),gb=V(0,1);ga[K].getTotalLength=function(){if(this.type=="path")return vb(this.attrs.path)};ga[K].getPointAtLength=function(e){if(this.type=="path")return Wa(this.attrs.path,e)};ga[K].getSubpath=function(e,g){if(this.type=="path"){if(z.abs(this.getTotalLength()-g)<1.0E-6)return gb(this.attrs.path,e).end;g=gb(this.attrs.path,g,1);return e?gb(g,e).end:g}};u.easing_formulas={linear:function(e){return e},
"<":function(e){return X(e,3)},">":function(e){return X(e-1,3)+1},"<>":function(e){e*=2;if(e<1)return X(e,3)/2;e-=2;return(X(e,3)+2)/2},backIn:function(e){return e*e*(2.70158*e-1.70158)},backOut:function(e){e-=1;return e*e*(2.70158*e+1.70158)+1},elastic:function(e){if(e==0||e==1)return e;return X(2,-10*e)*z.sin((e-0.075)*2*z.PI/0.3)+1},bounce:function(e){if(e<1/2.75)e=7.5625*e*e;else if(e<2/2.75){e-=1.5/2.75;e=7.5625*e*e+0.75}else if(e<2.5/2.75){e-=2.25/2.75;e=7.5625*e*e+0.9375}else{e-=2.625/2.75;
e=7.5625*e*e+0.984375}return e}};var ua={length:0},Xa=function(){var e=+new Date;for(var g in ua)if(g!="length"&&ua[A](g)){var o=ua[g];if(o.stop){delete ua[g];ua[F]--}else{var r=e-o.start,v=o.ms,q=o.easing,D=o.from,w=o.diff,B=o.to,G=o.t,a=o.prev||0,f=o.el,j=o.callback,p={},k;if(r<v){j=u.easing_formulas[q]?u.easing_formulas[q](r/v):r/v;for(var C in D)if(D[A](C)){switch(pa[C]){case "along":k=j*v*w[C];B.back&&(k=B.len-k);q=Wa(B[C],k);f.translate(w.sx-w.x||0,w.sy-w.y||0);w.x=q.x;w.y=q.y;f.translate(q.x-
w.sx,q.y-w.sy);B.rot&&f.rotate(w.r+q.alpha,q.x,q.y);break;case "number":k=+D[C]+j*v*w[C];break;case "colour":k="rgb("+[hb(da(D[C].r+j*v*w[C].r)),hb(da(D[C].g+j*v*w[C].g)),hb(da(D[C].b+j*v*w[C].b))][M](",")+")";break;case "path":k=[];q=0;for(var P=D[C][F];q<P;q++){k[q]=[D[C][q][0]];for(var U=1,S=D[C][q][F];U<S;U++)k[q][U]=+D[C][q][U]+j*v*w[C][q][U];k[q]=k[q][M](I)}k=k[M](I);break;case "csv":switch(C){case "translation":k=w[C][0]*(r-a);q=w[C][1]*(r-a);G.x+=k;G.y+=q;k=k+I+q;break;case "rotation":k=+D[C][0]+
j*v*w[C][0];D[C][1]&&(k+=","+D[C][1]+","+D[C][2]);break;case "scale":k=[+D[C][0]+j*v*w[C][0],+D[C][1]+j*v*w[C][1],2 in B[C]?B[C][2]:"",3 in B[C]?B[C][3]:""][M](I);break;case "clip-rect":k=[];for(q=4;q--;)k[q]=+D[C][q]+j*v*w[C][q];break}break}p[C]=k}f.attr(p);f._run&&f._run.call(f)}else{if(B.along){q=Wa(B.along,B.len*!B.back);f.translate(w.sx-(w.x||0)+q.x-w.sx,w.sy-(w.y||0)+q.y-w.sy);B.rot&&f.rotate(w.r+q.alpha,q.x,q.y)}(G.x||G.y)&&f.translate(-G.x,-G.y);B.scale&&(B.scale+="");f.attr(B);delete ua[g];
ua[F]--;f.in_animation=null;u.is(j,"function")&&j.call(f)}o.prev=r}}u.svg&&f&&f.paper.safari();ua[F]&&setTimeout(Xa)},hb=function(e){return e>255?255:e<0?0:e},Ya=function(e,g){if(e==null)return{x:this._.tx,y:this._.ty,toString:s};this._.tx+=+e;this._.ty+=+g;switch(this.type){case "circle":case "ellipse":this.attr({cx:+e+this.attrs.cx,cy:+g+this.attrs.cy});break;case "rect":case "image":case "text":this.attr({x:+e+this.attrs.x,y:+g+this.attrs.y});break;case "path":var o=jb(this.attrs.path);o[0][1]+=
+e;o[0][2]+=+g;this.attr({path:o});break}return this};ga[K].animateWith=function(e,g,o,r,v){ua[e.id]&&(g.start=ua[e.id].start);return this.animate(g,o,r,v)};ga[K].animateAlong=N();ga[K].animateAlongBack=N(1);ga[K].onAnimation=function(e){this._run=e||0;return this};ga[K].animate=function(e,g,o,r){if(u.is(o,"function")||!o)r=o||null;var v={},q={},D={};for(var w in e)if(e[A](w))if(pa[A](w)){v[w]=this.attr(w);v[w]==null&&(v[w]=xa[w]);q[w]=e[w];switch(pa[w]){case "along":var B=vb(e[w]),G=Wa(e[w],B*!!e.back),
a=this.getBBox();D[w]=B/g;D.tx=a.x;D.ty=a.y;D.sx=G.x;D.sy=G.y;q.rot=e.rot;q.back=e.back;q.len=B;e.rot&&(D.r=ia(this.rotate())||0);break;case "number":D[w]=(q[w]-v[w])/g;break;case "colour":v[w]=u.getRGB(v[w]);B=u.getRGB(q[w]);D[w]={r:(B.r-v[w].r)/g,g:(B.g-v[w].g)/g,b:(B.b-v[w].b)/g};break;case "path":B=Ra(v[w],q[w]);v[w]=B[0];G=B[1];D[w]=[];B=0;for(a=v[w][F];B<a;B++){D[w][B]=[0];for(var f=1,j=v[w][B][F];f<j;f++)D[w][B][f]=(G[B][f]-v[w][B][f])/g}break;case "csv":G=(e[w]+"").split(b);B=(v[w]+"").split(b);
switch(w){case "translation":v[w]=[0,0];D[w]=[G[0]/g,G[1]/g];break;case "rotation":v[w]=B[1]==G[1]&&B[2]==G[2]?B:[0,G[1],G[2]];D[w]=[(G[0]-v[w][0])/g,0,0];break;case "scale":e[w]=G;v[w]=(v[w]+"").split(b);D[w]=[(G[0]-v[w][0])/g,(G[1]-v[w][1])/g,0,0];break;case "clip-rect":v[w]=(v[w]+"").split(b);D[w]=[];for(B=4;B--;)D[w][B]=(G[B]-v[w][B])/g;break}q[w]=G}}this.stop();this.in_animation=1;ua[this.id]={start:e.start||+new Date,ms:g,easing:o,from:v,diff:D,to:q,el:this,callback:r,t:{x:0,y:0}};++ua[F]==
1&&Xa();return this};ga[K].stop=function(){ua[this.id]&&ua[F]--;delete ua[this.id];return this};ga[K].translate=function(e,g){return this.attr({translation:e+" "+g})};ga[K].toString=function(){return"Rapha\u00ebl\u2019s object"};u.ae=ua;var Ga=function(e){this.items=[];this[F]=0;if(e)for(var g=0,o=e[F];g<o;g++)if(e[g]&&(e[g].constructor==ga||e[g].constructor==Ga)){this[this.items[F]]=this.items[this.items[F]]=e[g];this[F]++}};Ga[K][R]=function(){for(var e,g,o=0,r=arguments[F];o<r;o++)if((e=arguments[o])&&
(e.constructor==ga||e.constructor==Ga)){g=this.items[F];this[g]=this.items[g]=e;this[F]++}return this};Ga[K].pop=function(){delete this[this[F]--];return this.items.pop()};for(var ib in ga[K])if(ga[K][A](ib))Ga[K][ib]=function(e){return function(){for(var g=0,o=this.items[F];g<o;g++)this.items[g][e][O](this.items[g],arguments);return this}}(ib);Ga[K].attr=function(e){if(e&&u.is(e,"array")&&u.is(e[0],"object"))for(var g=0,o=e[F];g<o;g++)this.items[g].attr(e[g]);else{g=0;for(o=this.items[F];g<o;g++)this.items[g].attr[O](this.items[g],
arguments)}return this};Ga[K].animate=function(e,g,o,r){(u.is(o,"function")||!o)&&(r=o||null);var v=this.items[F],q=v,D=this,w;r&&(w=function(){!--v&&r.call(D)});for(this.items[--q].animate(e,g,o||w,w);q--;)this.items[q].animateWith(this.items[v-1],e,g,o||w,w);return this};Ga[K].insertAfter=function(e){for(var g=this.items[F];g--;)this.items[g].insertAfter(e);return this};Ga[K].getBBox=function(){for(var e=[],g=[],o=[],r=[],v=this.items[F];v--;){var q=this.items[v].getBBox();e[R](q.x);g[R](q.y);o[R](q.x+
q.width);r[R](q.y+q.height)}e=m[O](0,e);g=m[O](0,g);return{x:e,y:g,width:L[O](0,o)-e,height:L[O](0,r)-g}};u.registerFont=function(e){if(!e.face)return e;this.fonts=this.fonts||{};var g={w:e.w,face:{},glyphs:{}},o=e.face["font-family"];for(var r in e.face)if(e.face[A](r))g.face[r]=e.face[r];if(this.fonts[o])this.fonts[o][R](g);else this.fonts[o]=[g];if(!e.svg){g.face["units-per-em"]=oa(e.face["units-per-em"],10);for(var v in e.glyphs)if(e.glyphs[A](v)){o=e.glyphs[v];g.glyphs[v]={w:o.w,k:{},d:o.d&&
"M"+o.d.replace(/[mlcxtrv]/g,function(D){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[D]||"M"})+"z"};if(o.k)for(var q in o.k)if(o[A](q))g.glyphs[v].k[q]=o.k[q]}}return e};H[K].getFont=function(e,g,o,r){r=r||"normal";o=o||"normal";g=+g||{normal:400,bold:700,lighter:300,bolder:800}[g]||400;var v=u.fonts[e];if(!v){e=new RegExp("(^|\\s)"+e.replace(/[^\w\d\s+!~.:_-]/g,"")+"(\\s|$)","i");for(var q in u.fonts)if(u.fonts[A](q))if(e.test(q)){v=u.fonts[q];break}}var D;if(v){q=0;for(e=v[F];q<e;q++){D=v[q];if(D.face["font-weight"]==
g&&(D.face["font-style"]==o||!D.face["font-style"])&&D.face["font-stretch"]==r)break}}return D};H[K].print=function(e,g,o,r,v,q){q=q||"middle";var D=this.set();o=(o+"").split("");var w=0;u.is(r,"string")&&(r=this.getFont(r));if(r){v=(v||16)/r.face["units-per-em"];var B=r.face.bbox.split(b),G=+B[0];q=+B[1]+(q=="baseline"?B[3]-B[1]+ +r.face.descent:(B[3]-B[1])/2);B=0;for(var a=o[F];B<a;B++){var f=B&&r.glyphs[o[B-1]]||{},j=r.glyphs[o[B]];w+=B?(f.w||r.w)+(f.k&&f.k[o[B]]||0):0;j&&j.d&&D[R](this.path(j.d).attr({fill:"#000",
stroke:"none",translation:[w,0]}))}D.scale(v,v,G,q).translate(e-G,g-q)}return D};u.format=function(e){var g=u.is(arguments[1],"array")?[0].concat(arguments[1]):arguments,o=/\{(\d+)\}/g;e&&u.is(e,"string")&&g[F]-1&&(e=e.replace(o,function(r,v){return g[++v]==null?"":g[v]}));return e||""};u.ninja=function(){var e=Raphael;if(E.was)Raphael=E.is;else delete Raphael;return e};u.el=ga[K];return u}();
jQuery.cookie=function(c,s,N){if(typeof s!="undefined"){N=N||{};if(s===null){s="";N.expires=-1}var b="";if(N.expires&&(typeof N.expires=="number"||N.expires.toUTCString)){if(typeof N.expires=="number"){b=new Date;b.setTime(b.getTime()+N.expires*24*60*60*1E3)}else b=N.expires;b="; expires="+b.toUTCString()}var h=N.path?"; path="+N.path:"",n=N.domain?"; domain="+N.domain:"";N=N.secure?"; secure":"";document.cookie=[c,"=",encodeURIComponent(s),b,h,n,N].join("")}else{s=null;if(document.cookie&&document.cookie!=
""){N=document.cookie.split(";");for(b=0;b<N.length;b++){h=jQuery.trim(N[b]);if(h.substring(0,c.length+1)==c+"="){s=decodeURIComponent(h.substring(c.length+1));break}}}return s}};
jQuery.ui||function(c){function s(u,H,O,I){function V(M){M=c[u][H][M]||[];return typeof M=="string"?M.split(/,?\s+/):M}var A=V("getter");if(I.length==1&&typeof I[0]=="string")A=A.concat(V("getterSetter"));return c.inArray(O,A)!=-1}var N=c.fn.remove,b=c.browser.mozilla&&parseFloat(c.browser.version)<1.9;c.ui={version:"1.7.2",plugin:{add:function(u,H,O){u=c.ui[u].prototype;for(var I in O){u.plugins[I]=u.plugins[I]||[];u.plugins[I].push([H,O[I]])}},call:function(u,H,O){if((H=u.plugins[H])&&u.element[0].parentNode)for(var I=
0;I<H.length;I++)u.options[H[I][0]]&&H[I][1].apply(u.element,O)}},contains:function(u,H){return document.compareDocumentPosition?u.compareDocumentPosition(H)&16:u!==H&&u.contains(H)},hasScroll:function(u,H){if(c(u).css("overflow")=="hidden")return false;H=H&&H=="left"?"scrollLeft":"scrollTop";var O=false;if(u[H]>0)return true;u[H]=1;O=u[H]>0;u[H]=0;return O},isOverAxis:function(u,H,O){return u>H&&u<H+O},isOver:function(u,H,O,I,V,A){return c.ui.isOverAxis(u,O,V)&&c.ui.isOverAxis(H,I,A)},keyCode:{BACKSPACE:8,
CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,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}};if(b){var h=c.attr,n=c.fn.removeAttr,x=/^aria-/,E=/^wairole:/;c.attr=function(u,H,O){var I=O!==undefined;return H=="role"?I?h.call(this,u,H,"wairole:"+O):(h.apply(this,arguments)||"").replace(E,""):x.test(H)?I?u.setAttributeNS("http://www.w3.org/2005/07/aaa",
H.replace(x,"aaa:"),O):h.call(this,u,H.replace(x,"aaa:")):h.apply(this,arguments)};c.fn.removeAttr=function(u){return x.test(u)?this.each(function(){this.removeAttributeNS("http://www.w3.org/2005/07/aaa",u.replace(x,""))}):n.call(this,u)}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return N.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable",
"on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var u;u=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,
"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!u.length?c(document):u}});c.extend(c.expr[":"],{data:function(u,H,O){return!!c.data(u,O[3])},focusable:function(u){var H=u.nodeName.toLowerCase(),O=c.attr(u,"tabindex");return(/input|select|textarea|button|object/.test(H)?!u.disabled:"a"==H||"area"==H?u.href||!isNaN(O):!isNaN(O))&&!c(u)["area"==H?"parents":"closest"](":hidden").length},tabbable:function(u){var H=c.attr(u,"tabindex");
return(isNaN(H)||H>=0)&&c(u).is(":focusable")}});c.widget=function(u,H){var O=u.split(".")[0];u=u.split(".")[1];c.fn[u]=function(I){var V=typeof I=="string",A=Array.prototype.slice.call(arguments,1);if(V&&I.substring(0,1)=="_")return this;if(V&&s(O,u,I,A)){var M=c.data(this[0],u);return M?M[I].apply(M,A):undefined}return this.each(function(){var F=c.data(this,u);!F&&!V&&c.data(this,u,new c[O][u](this,I))._init();F&&V&&c.isFunction(F[I])&&F[I].apply(F,A)})};c[O]=c[O]||{};c[O][u]=function(I,V){var A=
this;this.namespace=O;this.widgetName=u;this.widgetEventPrefix=c[O][u].eventPrefix||u;this.widgetBaseClass=O+"-"+u;this.options=c.extend({},c.widget.defaults,c[O][u].defaults,c.metadata&&c.metadata.get(I)[u],V);this.element=c(I).bind("setData."+u,function(M,F,K){if(M.target==I)return A._setData(F,K)}).bind("getData."+u,function(M,F){if(M.target==I)return A._getData(F)}).bind("remove",function(){return A.destroy()})};c[O][u].prototype=c.extend({},c.widget.prototype,H);c[O][u].getterSetter="option"};
c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(u,H){var O=u,I=this;if(typeof u=="string"){if(H===undefined)return this._getData(u);O={};O[u]=H}c.each(O,function(V,A){I._setData(V,A)})},_getData:function(u){return this.options[u]},_setData:function(u,H){this.options[u]=H;if(u=="disabled")this.element[H?"addClass":"removeClass"](this.widgetBaseClass+
"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",H)},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(u,H,O){var I=this.options[u];u=u==this.widgetEventPrefix?u:this.widgetEventPrefix+u;H=c.Event(H);H.type=u;if(H.originalEvent){u=c.event.props.length;for(var V;u;){V=c.event.props[--u];H[V]=H.originalEvent[V]}}this.element.trigger(H,O);return!(c.isFunction(I)&&I.call(this.element[0],H,O)===false||H.isDefaultPrevented())}};
c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var u=this;this.element.bind("mousedown."+this.widgetName,function(H){return u._mouseDown(H)}).bind("click."+this.widgetName,function(H){if(u._preventClickEvent){u._preventClickEvent=false;H.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);
c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable)},_mouseDown:function(u){u.originalEvent=u.originalEvent||{};if(!u.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(u);this._mouseDownEvent=u;var H=this,O=u.which==1,I=typeof this.options.cancel=="string"?c(u.target).parents().add(u.target).filter(this.options.cancel).length:false;if(!O||I||!this._mouseCapture(u))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){H.mouseDelayMet=
true},this.options.delay);if(this._mouseDistanceMet(u)&&this._mouseDelayMet(u)){this._mouseStarted=this._mouseStart(u)!==false;if(!this._mouseStarted){u.preventDefault();return true}}this._mouseMoveDelegate=function(V){return H._mouseMove(V)};this._mouseUpDelegate=function(V){return H._mouseUp(V)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.browser.safari||u.preventDefault();return u.originalEvent.mouseHandled=true}},
_mouseMove:function(u){if(c.browser.msie&&!u.button)return this._mouseUp(u);if(this._mouseStarted){this._mouseDrag(u);return u.preventDefault()}if(this._mouseDistanceMet(u)&&this._mouseDelayMet(u))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,u)!==false)?this._mouseDrag(u):this._mouseUp(u);return!this._mouseStarted},_mouseUp:function(u){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=
false;this._preventClickEvent=u.target==this._mouseDownEvent.target;this._mouseStop(u)}return false},_mouseDistanceMet:function(u){return Math.max(Math.abs(this._mouseDownEvent.pageX-u.pageX),Math.abs(this._mouseDownEvent.pageY-u.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}}(jQuery);
(function(c){c.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined)this.options.collapsible=this.options.deselectable;this._tabify(true)},_setData:function(s,N){if(s=="selected")this.options.collapsible&&N==this.options.selected||this.select(N);else{this.options[s]=N;if(s=="deselectable")this.options.collapsible=N;this._tabify()}},_tabId:function(s){return s.title&&s.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+c.data(s)},_sanitizeSelector:function(s){return s.replace(/:/g,
"\\:")},_cookie:function(){var s=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+c.data(this.list[0]));return c.cookie.apply(null,[s].concat(c.makeArray(arguments)))},_ui:function(s,N){return{tab:s,panel:N,index:this.anchors.index(s)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var s=c(this);s.html(s.data("label.tabs")).removeData("label.tabs")})},_tabify:function(s){function N(A,M){A.css({display:""});
c.browser.msie&&M.opacity&&A[0].style.removeAttribute("filter")}this.list=this.element.children("ul:first");this.lis=c("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return c("a",this)[0]});this.panels=c([]);var b=this,h=this.options,n=/^#.+/;this.anchors.each(function(A,M){var F=c(M).attr("href"),K=F.split("#")[0],d;if(K&&(K===location.toString().split("#")[0]||(d=c("base")[0])&&K===d.href)){F=M.hash;M.href=F}if(n.test(F))b.panels=b.panels.add(b._sanitizeSelector(F));else if(F!=
"#"){c.data(M,"href.tabs",F);c.data(M,"load.tabs",F.replace(/#.*$/,""));F=b._tabId(M);M.href="#"+F;M=c("#"+F);if(!M.length){M=c(h.panelTemplate).attr("id",F).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(b.panels[A-1]||b.list);M.data("destroy.tabs",true)}b.panels=b.panels.add(M)}else h.disabled.push(A)});if(s){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(h.selected===undefined){location.hash&&this.anchors.each(function(A,M){if(M.hash==location.hash){h.selected=A;return false}});if(typeof h.selected!="number"&&h.cookie)h.selected=parseInt(b._cookie(),10);if(typeof h.selected!="number"&&this.lis.filter(".ui-tabs-selected").length)h.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));h.selected=h.selected||0}else if(h.selected===
null)h.selected=-1;h.selected=h.selected>=0&&this.anchors[h.selected]||h.selected<0?h.selected:0;h.disabled=c.unique(h.disabled.concat(c.map(this.lis.filter(".ui-state-disabled"),function(A){return b.lis.index(A)}))).sort();c.inArray(h.selected,h.disabled)!=-1&&h.disabled.splice(c.inArray(h.selected,h.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(h.selected>=0&&this.anchors.length){this.panels.eq(h.selected).removeClass("ui-tabs-hide");
this.lis.eq(h.selected).addClass("ui-tabs-selected ui-state-active");b.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[h.selected],b.panels[h.selected]))});this.load(h.selected)}c(window).bind("unload",function(){b.lis.add(b.anchors).unbind(".tabs");b.lis=b.anchors=b.panels=null})}else h.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));this.element[h.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");h.cookie&&this._cookie(h.selected,h.cookie);s=0;for(var x;x=
this.lis[s];s++)c(x)[c.inArray(s,h.disabled)!=-1&&!c(x).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");h.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(h.event!="mouseover"){var E=function(A,M){M.is(":not(.ui-state-disabled)")&&M.addClass("ui-state-"+A)},u=function(A,M){M.removeClass("ui-state-"+A)};this.lis.bind("mouseover.tabs",function(){E("hover",c(this))});this.lis.bind("mouseout.tabs",function(){u("hover",c(this))});
this.anchors.bind("focus.tabs",function(){E("focus",c(this).closest("li"))});this.anchors.bind("blur.tabs",function(){u("focus",c(this).closest("li"))})}var H,O;if(h.fx)if(c.isArray(h.fx)){H=h.fx[0];O=h.fx[1]}else H=O=h.fx;var I=O?function(A,M){c(A).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");M.hide().removeClass("ui-tabs-hide").animate(O,O.duration||"normal",function(){N(M,O);b._trigger("show",null,b._ui(A,M[0]))})}:function(A,M){c(A).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");
M.removeClass("ui-tabs-hide");b._trigger("show",null,b._ui(A,M[0]))},V=H?function(A,M){M.animate(H,H.duration||"normal",function(){b.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");M.addClass("ui-tabs-hide");N(M,H);b.element.dequeue("tabs")})}:function(A,M){b.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");M.addClass("ui-tabs-hide");b.element.dequeue("tabs")};this.anchors.bind(h.event+".tabs",function(){var A=this,M=c(this).closest("li"),
F=b.panels.filter(":not(.ui-tabs-hide)"),K=c(b._sanitizeSelector(this.hash));if(M.hasClass("ui-tabs-selected")&&!h.collapsible||M.hasClass("ui-state-disabled")||M.hasClass("ui-state-processing")||b._trigger("select",null,b._ui(this,K[0]))===false){this.blur();return false}h.selected=b.anchors.index(this);b.abort();if(h.collapsible)if(M.hasClass("ui-tabs-selected")){h.selected=-1;h.cookie&&b._cookie(h.selected,h.cookie);b.element.queue("tabs",function(){V(A,F)}).dequeue("tabs");this.blur();return false}else if(!F.length){h.cookie&&
b._cookie(h.selected,h.cookie);b.element.queue("tabs",function(){I(A,K)});b.load(b.anchors.index(this));this.blur();return false}h.cookie&&b._cookie(h.selected,h.cookie);if(K.length){F.length&&b.element.queue("tabs",function(){V(A,F)});b.element.queue("tabs",function(){I(A,K)});b.load(b.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";c.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var s=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 N=c.data(this,"href.tabs");if(N)this.href=N;var b=c(this).unbind(".tabs");c.each(["href","load","cache"],function(h,n){b.removeData(n+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){c.data(this,"destroy.tabs")?
c(this).remove():c(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")});s.cookie&&this._cookie(null,s.cookie)},add:function(s,N,b){if(b===undefined)b=this.anchors.length;var h=this,n=this.options;N=c(n.tabTemplate.replace(/#\{href\}/g,s).replace(/#\{label\}/g,N));s=!s.indexOf("#")?s.replace("#",""):this._tabId(c("a",N)[0]);N.addClass("ui-state-default ui-corner-top").data("destroy.tabs",
true);var x=c("#"+s);x.length||(x=c(n.panelTemplate).attr("id",s).data("destroy.tabs",true));x.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(b>=this.lis.length){N.appendTo(this.list);x.appendTo(this.list[0].parentNode)}else{N.insertBefore(this.lis[b]);x.insertBefore(this.panels[b])}n.disabled=c.map(n.disabled,function(E){return E>=b?++E:E});this._tabify();if(this.anchors.length==1){N.addClass("ui-tabs-selected ui-state-active");x.removeClass("ui-tabs-hide");this.element.queue("tabs",
function(){h._trigger("show",null,h._ui(h.anchors[0],h.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[b],this.panels[b]))},remove:function(s){var N=this.options,b=this.lis.eq(s).remove(),h=this.panels.eq(s).remove();if(b.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(s+(s+1<this.anchors.length?1:-1));N.disabled=c.map(c.grep(N.disabled,function(n){return n!=s}),function(n){return n>=s?--n:n});this._tabify();this._trigger("remove",null,this._ui(b.find("a")[0],
h[0]))},enable:function(s){var N=this.options;if(c.inArray(s,N.disabled)!=-1){this.lis.eq(s).removeClass("ui-state-disabled");N.disabled=c.grep(N.disabled,function(b){return b!=s});this._trigger("enable",null,this._ui(this.anchors[s],this.panels[s]))}},disable:function(s){var N=this.options;if(s!=N.selected){this.lis.eq(s).addClass("ui-state-disabled");N.disabled.push(s);N.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[s],this.panels[s]))}},select:function(s){if(typeof s=="string")s=
this.anchors.index(this.anchors.filter("[href$="+s+"]"));else if(s===null)s=-1;if(s==-1&&this.options.collapsible)s=this.options.selected;this.anchors.eq(s).trigger(this.options.event+".tabs")},load:function(s){var N=this,b=this.options,h=this.anchors.eq(s)[0],n=c.data(h,"load.tabs");this.abort();if(!n||this.element.queue("tabs").length!==0&&c.data(h,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(s).addClass("ui-state-processing");if(b.spinner){var x=c("span",h);x.data("label.tabs",x.html()).html(b.spinner)}this.xhr=
c.ajax(c.extend({},b.ajaxOptions,{url:n,success:function(E,u){c(N._sanitizeSelector(h.hash)).html(E);N._cleanup();b.cache&&c.data(h,"cache.tabs",true);N._trigger("load",null,N._ui(N.anchors[s],N.panels[s]));try{b.ajaxOptions.success(E,u)}catch(H){}N.element.dequeue("tabs")}}))}},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(s,N){this.anchors.eq(s).removeData("cache.tabs").data("load.tabs",N)},length:function(){return this.anchors.length}});
c.extend(c.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});c.extend(c.ui.tabs.prototype,{rotation:null,rotate:function(s,N){var b=this,h=this.options,n=b._rotate||(b._rotate=function(x){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var E=h.selected;
b.select(++E<b.anchors.length?E:0)},s);x&&x.stopPropagation()});N=b._unrotate||(b._unrotate=!N?function(x){x.clientX&&b.rotate(null)}:function(){t=h.selected;n()});if(s){this.element.bind("tabsshow",n);this.anchors.bind(h.event+".tabs",N);n()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",n);this.anchors.unbind(h.event+".tabs",N);delete this._rotate;delete this._unrotate}}})})(jQuery);
(function(c){function s(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
"ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
"Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,
beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};c.extend(this._defaults,this.regional[""]);this.dpDiv=c('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}function N(b,h){c.extend(b,h);for(var n in h)if(h[n]==null||h[n]==undefined)b[n]=h[n];return b}
c.extend(c.ui,{datepicker:{version:"1.7.2"}});c.extend(s.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},setDefaults:function(b){N(this._defaults,b||{});return this},_attachDatepicker:function(b,h){var n=null;for(var x in this._defaults){var E=b.getAttribute("date:"+x);if(E){n=n||{};try{n[x]=eval(E)}catch(u){n[x]=E}}}x=b.nodeName.toLowerCase();E=x=="div"||x=="span";if(!b.id)b.id="dp"+ ++this.uuid;var H=this._newInst(c(b),E);H.settings=c.extend({},
h||{},n||{});if(x=="input")this._connectDatepicker(b,H);else E&&this._inlineDatepicker(b,H)},_newInst:function(b,h){return{id:b[0].id.replace(/([:\[\]\.])/g,"\\\\$1"),input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:h,dpDiv:!h?this.dpDiv:c('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},_connectDatepicker:function(b,h){var n=c(b);h.append=c([]);h.trigger=c([]);if(!n.hasClass(this.markerClassName)){var x=
this._get(h,"appendText"),E=this._get(h,"isRTL");if(x){h.append=c('<span class="'+this._appendClass+'">'+x+"</span>");n[E?"before":"after"](h.append)}x=this._get(h,"showOn");if(x=="focus"||x=="both")n.focus(this._showDatepicker);if(x=="button"||x=="both"){x=this._get(h,"buttonText");var u=this._get(h,"buttonImage");h.trigger=c(this._get(h,"buttonImageOnly")?c("<img/>").addClass(this._triggerClass).attr({src:u,alt:x,title:x}):c('<button type="button"></button>').addClass(this._triggerClass).html(u==
""?x:c("<img/>").attr({src:u,alt:x,title:x})));n[E?"before":"after"](h.trigger);h.trigger.click(function(){c.datepicker._datepickerShowing&&c.datepicker._lastInput==b?c.datepicker._hideDatepicker():c.datepicker._showDatepicker(b);return false})}n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(H,O,I){h.settings[O]=I}).bind("getData.datepicker",function(H,O){return this._get(h,O)});c.data(b,"datepicker",h)}},_inlineDatepicker:function(b,
h){var n=c(b);if(!n.hasClass(this.markerClassName)){n.addClass(this.markerClassName).append(h.dpDiv).bind("setData.datepicker",function(x,E,u){h.settings[E]=u}).bind("getData.datepicker",function(x,E){return this._get(h,E)});c.data(b,"datepicker",h);this._setDate(h,this._getDefaultDate(h));this._updateDatepicker(h);this._updateAlternate(h)}},_dialogDatepicker:function(b,h,n,x,E){b=this._dialogInst;if(!b){b="dp"+ ++this.uuid;this._dialogInput=c('<input type="text" id="'+b+'" size="1" style="position: absolute; top: -100px;"/>');
this._dialogInput.keydown(this._doKeyDown);c("body").append(this._dialogInput);b=this._dialogInst=this._newInst(this._dialogInput,false);b.settings={};c.data(this._dialogInput[0],"datepicker",b)}N(b.settings,x||{});this._dialogInput.val(h);this._pos=E?E.length?E:[E.pageX,E.pageY]:null;if(!this._pos)this._pos=[(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),(window.innerHeight||document.documentElement.clientHeight||
document.body.clientHeight)/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");b.settings.onSelect=n;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);c.blockUI&&c.blockUI(this.dpDiv);c.data(this._dialogInput[0],"datepicker",b);return this},_destroyDatepicker:function(b){var h=c(b),n=c.data(b,"datepicker");if(h.hasClass(this.markerClassName)){var x=b.nodeName.toLowerCase();
c.removeData(b,"datepicker");if(x=="input"){n.append.remove();n.trigger.remove();h.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else if(x=="div"||x=="span")h.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(b){var h=c(b),n=c.data(b,"datepicker");if(h.hasClass(this.markerClassName)){var x=b.nodeName.toLowerCase();if(x=="input"){b.disabled=false;n.trigger.filter("button").each(function(){this.disabled=
false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(x=="div"||x=="span")h.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=c.map(this._disabledInputs,function(E){return E==b?null:E})}},_disableDatepicker:function(b){var h=c(b),n=c.data(b,"datepicker");if(h.hasClass(this.markerClassName)){var x=b.nodeName.toLowerCase();if(x=="input"){b.disabled=true;n.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",
cursor:"default"})}else if(x=="div"||x=="span")h.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=c.map(this._disabledInputs,function(E){return E==b?null:E});this._disabledInputs[this._disabledInputs.length]=b}},_isDisabledDatepicker:function(b){if(!b)return false;for(var h=0;h<this._disabledInputs.length;h++)if(this._disabledInputs[h]==b)return true;return false},_getInst:function(b){try{return c.data(b,"datepicker")}catch(h){throw"Missing instance data for this datepicker";
}},_optionDatepicker:function(b,h,n){var x=this._getInst(b);if(arguments.length==2&&typeof h=="string")return h=="defaults"?c.extend({},c.datepicker._defaults):x?h=="all"?c.extend({},x.settings):this._get(x,h):null;var E=h||{};if(typeof h=="string"){E={};E[h]=n}if(x){this._curInst==x&&this._hideDatepicker(null);var u=this._getDateDatepicker(b);N(x.settings,E);this._setDateDatepicker(b,u);this._updateDatepicker(x)}},_changeDatepicker:function(b,h,n){this._optionDatepicker(b,h,n)},_refreshDatepicker:function(b){(b=
this._getInst(b))&&this._updateDatepicker(b)},_setDateDatepicker:function(b,h,n){if(b=this._getInst(b)){this._setDate(b,h,n);this._updateDatepicker(b);this._updateAlternate(b)}},_getDateDatepicker:function(b){(b=this._getInst(b))&&!b.inline&&this._setDateFromField(b);return b?this._getDate(b):null},_doKeyDown:function(b){var h=c.datepicker._getInst(b.target),n=true,x=h.dpDiv.is(".ui-datepicker-rtl");h._keyEvent=true;if(c.datepicker._datepickerShowing)switch(b.keyCode){case 9:c.datepicker._hideDatepicker(null,
"");break;case 13:n=c("td."+c.datepicker._dayOverClass+", td."+c.datepicker._currentClass,h.dpDiv);n[0]?c.datepicker._selectDay(b.target,h.selectedMonth,h.selectedYear,n[0]):c.datepicker._hideDatepicker(null,c.datepicker._get(h,"duration"));return false;case 27:c.datepicker._hideDatepicker(null,c.datepicker._get(h,"duration"));break;case 33:c.datepicker._adjustDate(b.target,b.ctrlKey?-c.datepicker._get(h,"stepBigMonths"):-c.datepicker._get(h,"stepMonths"),"M");break;case 34:c.datepicker._adjustDate(b.target,
b.ctrlKey?+c.datepicker._get(h,"stepBigMonths"):+c.datepicker._get(h,"stepMonths"),"M");break;case 35:if(b.ctrlKey||b.metaKey)c.datepicker._clearDate(b.target);n=b.ctrlKey||b.metaKey;break;case 36:if(b.ctrlKey||b.metaKey)c.datepicker._gotoToday(b.target);n=b.ctrlKey||b.metaKey;break;case 37:if(b.ctrlKey||b.metaKey)c.datepicker._adjustDate(b.target,x?+1:-1,"D");n=b.ctrlKey||b.metaKey;if(b.originalEvent.altKey)c.datepicker._adjustDate(b.target,b.ctrlKey?-c.datepicker._get(h,"stepBigMonths"):-c.datepicker._get(h,
"stepMonths"),"M");break;case 38:if(b.ctrlKey||b.metaKey)c.datepicker._adjustDate(b.target,-7,"D");n=b.ctrlKey||b.metaKey;break;case 39:if(b.ctrlKey||b.metaKey)c.datepicker._adjustDate(b.target,x?-1:+1,"D");n=b.ctrlKey||b.metaKey;if(b.originalEvent.altKey)c.datepicker._adjustDate(b.target,b.ctrlKey?+c.datepicker._get(h,"stepBigMonths"):+c.datepicker._get(h,"stepMonths"),"M");break;case 40:if(b.ctrlKey||b.metaKey)c.datepicker._adjustDate(b.target,+7,"D");n=b.ctrlKey||b.metaKey;break;default:n=false}else if(b.keyCode==
36&&b.ctrlKey)c.datepicker._showDatepicker(this);else n=false;if(n){b.preventDefault();b.stopPropagation()}},_doKeyPress:function(b){var h=c.datepicker._getInst(b.target);if(c.datepicker._get(h,"constrainInput")){h=c.datepicker._possibleChars(c.datepicker._get(h,"dateFormat"));var n=String.fromCharCode(b.charCode==undefined?b.keyCode:b.charCode);return b.ctrlKey||n<" "||!h||h.indexOf(n)>-1}},_showDatepicker:function(b){b=b.target||b;if(b.nodeName.toLowerCase()!="input")b=c("input",b.parentNode)[0];
if(!(c.datepicker._isDisabledDatepicker(b)||c.datepicker._lastInput==b)){var h=c.datepicker._getInst(b),n=c.datepicker._get(h,"beforeShow");N(h.settings,n?n.apply(b,[b,h]):{});c.datepicker._hideDatepicker(null,"");c.datepicker._lastInput=b;c.datepicker._setDateFromField(h);if(c.datepicker._inDialog)b.value="";if(!c.datepicker._pos){c.datepicker._pos=c.datepicker._findPos(b);c.datepicker._pos[1]+=b.offsetHeight}var x=false;c(b).parents().each(function(){x|=c(this).css("position")=="fixed";return!x});
if(x&&c.browser.opera){c.datepicker._pos[0]-=document.documentElement.scrollLeft;c.datepicker._pos[1]-=document.documentElement.scrollTop}b={left:c.datepicker._pos[0],top:c.datepicker._pos[1]};c.datepicker._pos=null;h.rangeStart=null;h.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});c.datepicker._updateDatepicker(h);b=c.datepicker._checkOffset(h,b,x);h.dpDiv.css({position:c.datepicker._inDialog&&c.blockUI?"static":x?"fixed":"absolute",display:"none",left:b.left+"px",top:b.top+"px"});
if(!h.inline){b=c.datepicker._get(h,"showAnim")||"show";n=c.datepicker._get(h,"duration");var E=function(){c.datepicker._datepickerShowing=true;c.browser.msie&&parseInt(c.browser.version,10)<7&&c("iframe.ui-datepicker-cover").css({width:h.dpDiv.width()+4,height:h.dpDiv.height()+4})};c.effects&&c.effects[b]?h.dpDiv.show(b,c.datepicker._get(h,"showOptions"),n,E):h.dpDiv[b](n,E);n==""&&E();h.input[0].type!="hidden"&&h.input[0].focus();c.datepicker._curInst=h}}},_updateDatepicker:function(b){var h={width:b.dpDiv.width()+
4,height:b.dpDiv.height()+4},n=this;b.dpDiv.empty().append(this._generateHTML(b)).find("iframe.ui-datepicker-cover").css({width:h.width,height:h.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){c(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&c(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&c(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",
function(){if(!n._isDisabledDatepicker(b.inline?b.dpDiv.parent()[0]:b.input[0])){c(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");c(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&c(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&c(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();h=this._getNumberOfMonths(b);var x=h[1];x>
1?b.dpDiv.addClass("ui-datepicker-multi-"+x).css("width",17*x+"em"):b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");b.dpDiv[(h[0]!=1||h[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");b.input&&b.input[0].type!="hidden"&&b==c.datepicker._curInst&&c(b.input[0]).focus()},_checkOffset:function(b,h,n){var x=b.dpDiv.outerWidth(),E=b.dpDiv.outerHeight(),u=b.input?b.input.outerWidth():
0,H=b.input?b.input.outerHeight():0,O=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+c(document).scrollLeft(),I=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+c(document).scrollTop();h.left-=this._get(b,"isRTL")?x-u:0;h.left-=n&&h.left==b.input.offset().left?c(document).scrollLeft():0;h.top-=n&&h.top==b.input.offset().top+H?c(document).scrollTop():0;h.left-=h.left+x>O&&O>x?Math.abs(h.left+x-O):0;h.top-=h.top+E>I&&I>E?Math.abs(h.top+
E+H*2-I):0;return h},_findPos:function(b){for(;b&&(b.type=="hidden"||b.nodeType!=1);)b=b.nextSibling;b=c(b).offset();return[b.left,b.top]},_hideDatepicker:function(b,h){var n=this._curInst;if(!(!n||b&&n!=c.data(b,"datepicker"))){n.stayOpen&&this._selectDate("#"+n.id,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear));n.stayOpen=false;if(this._datepickerShowing){h=h!=null?h:this._get(n,"duration");b=this._get(n,"showAnim");var x=function(){c.datepicker._tidyDialog(n)};h!=""&&c.effects&&
c.effects[b]?n.dpDiv.hide(b,c.datepicker._get(n,"showOptions"),h,x):n.dpDiv[h==""?"hide":b=="slideDown"?"slideUp":b=="fadeIn"?"fadeOut":"hide"](h,x);h==""&&this._tidyDialog(n);if(h=this._get(n,"onClose"))h.apply(n.input?n.input[0]:null,[n.input?n.input.val():"",n]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(c.blockUI){c.unblockUI();c("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null}},
_tidyDialog:function(b){b.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(b){if(c.datepicker._curInst){b=c(b.target);b.parents("#"+c.datepicker._mainDivId).length==0&&!b.hasClass(c.datepicker.markerClassName)&&!b.hasClass(c.datepicker._triggerClass)&&c.datepicker._datepickerShowing&&!(c.datepicker._inDialog&&c.blockUI)&&c.datepicker._hideDatepicker(null,"")}},_adjustDate:function(b,h,n){b=c(b);var x=this._getInst(b[0]);if(!this._isDisabledDatepicker(b[0])){this._adjustInstDate(x,
h+(n=="M"?this._get(x,"showCurrentAtPos"):0),n);this._updateDatepicker(x)}},_gotoToday:function(b){b=c(b);var h=this._getInst(b[0]);if(this._get(h,"gotoCurrent")&&h.currentDay){h.selectedDay=h.currentDay;h.drawMonth=h.selectedMonth=h.currentMonth;h.drawYear=h.selectedYear=h.currentYear}else{var n=new Date;h.selectedDay=n.getDate();h.drawMonth=h.selectedMonth=n.getMonth();h.drawYear=h.selectedYear=n.getFullYear()}this._notifyChange(h);this._adjustDate(b)},_selectMonthYear:function(b,h,n){b=c(b);var x=
this._getInst(b[0]);x._selectingMonthYear=false;x["selected"+(n=="M"?"Month":"Year")]=x["draw"+(n=="M"?"Month":"Year")]=parseInt(h.options[h.selectedIndex].value,10);this._notifyChange(x);this._adjustDate(b)},_clickMonthYear:function(b){b=this._getInst(c(b)[0]);b.input&&b._selectingMonthYear&&!c.browser.msie&&b.input[0].focus();b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(b,h,n,x){var E=c(b);if(!(c(x).hasClass(this._unselectableClass)||this._isDisabledDatepicker(E[0]))){E=this._getInst(E[0]);
E.selectedDay=E.currentDay=c("a",x).html();E.selectedMonth=E.currentMonth=h;E.selectedYear=E.currentYear=n;if(E.stayOpen)E.endDay=E.endMonth=E.endYear=null;this._selectDate(b,this._formatDate(E,E.currentDay,E.currentMonth,E.currentYear));if(E.stayOpen){E.rangeStart=this._daylightSavingAdjust(new Date(E.currentYear,E.currentMonth,E.currentDay));this._updateDatepicker(E)}}},_clearDate:function(b){b=c(b);var h=this._getInst(b[0]);h.stayOpen=false;h.endDay=h.endMonth=h.endYear=h.rangeStart=null;this._selectDate(b,
"")},_selectDate:function(b,h){b=this._getInst(c(b)[0]);h=h!=null?h:this._formatDate(b);b.input&&b.input.val(h);this._updateAlternate(b);var n=this._get(b,"onSelect");if(n)n.apply(b.input?b.input[0]:null,[h,b]);else b.input&&b.input.trigger("change");if(b.inline)this._updateDatepicker(b);else if(!b.stayOpen){this._hideDatepicker(null,this._get(b,"duration"));this._lastInput=b.input[0];typeof b.input[0]!="object"&&b.input[0].focus();this._lastInput=null}},_updateAlternate:function(b){var h=this._get(b,
"altField");if(h){var n=this._get(b,"altFormat")||this._get(b,"dateFormat"),x=this._getDate(b);dateStr=this.formatDate(n,x,this._getFormatConfig(b));c(h).each(function(){c(this).val(dateStr)})}},noWeekends:function(b){b=b.getDay();return[b>0&&b<6,""]},iso8601Week:function(b){b=new Date(b.getFullYear(),b.getMonth(),b.getDate());var h=new Date(b.getFullYear(),0,4),n=h.getDay()||7;h.setDate(h.getDate()+1-n);if(n<4&&b<h){b.setDate(b.getDate()-3);return c.datepicker.iso8601Week(b)}else if(b>new Date(b.getFullYear(),
11,28)){n=(new Date(b.getFullYear()+1,0,4)).getDay()||7;if(n>4&&(b.getDay()||7)<n-3)return 1}return Math.floor((b-h)/864E5/7)+1},parseDate:function(b,h,n){if(b==null||h==null)throw"Invalid arguments";h=typeof h=="object"?h.toString():h+"";if(h=="")return null;for(var x=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,E=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,u=(n?n.dayNames:null)||this._defaults.dayNames,H=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,O=(n?n.monthNames:
null)||this._defaults.monthNames,I=n=-1,V=-1,A=-1,M=false,F=function(Z){(Z=m+1<b.length&&b.charAt(m+1)==Z)&&m++;return Z},K=function(Z){F(Z);for(var X=Z=Z=="@"?14:Z=="y"?4:Z=="o"?3:2,R=0;X>0&&L<h.length&&h.charAt(L)>="0"&&h.charAt(L)<="9";){R=R*10+parseInt(h.charAt(L++),10);X--}if(X==Z)throw"Missing number at position "+L;return R},d=function(Z,X,R){Z=F(Z)?R:X;for(R=X=0;R<Z.length;R++)X=Math.max(X,Z[R].length);R="";for(var ca=L;X>0&&L<h.length;){R+=h.charAt(L++);for(var ea=0;ea<Z.length;ea++)if(R==
Z[ea])return ea+1;X--}throw"Unknown name at position "+ca;},z=function(){if(h.charAt(L)!=b.charAt(m))throw"Unexpected literal at position "+L;L++},L=0,m=0;m<b.length;m++)if(M)if(b.charAt(m)=="'"&&!F("'"))M=false;else z();else switch(b.charAt(m)){case "d":V=K("d");break;case "D":d("D",E,u);break;case "o":A=K("o");break;case "m":I=K("m");break;case "M":I=d("M",H,O);break;case "y":n=K("y");break;case "@":var Q=new Date(K("@"));n=Q.getFullYear();I=Q.getMonth()+1;V=Q.getDate();break;case "'":if(F("'"))z();
else M=true;break;default:z()}if(n==-1)n=(new Date).getFullYear();else if(n<100)n+=(new Date).getFullYear()-(new Date).getFullYear()%100+(n<=x?0:-100);if(A>-1){I=1;V=A;do{x=this._getDaysInMonth(n,I-1);if(V<=x)break;I++;V-=x}while(1)}Q=this._daylightSavingAdjust(new Date(n,I-1,V));if(Q.getFullYear()!=n||Q.getMonth()+1!=I||Q.getDate()!=V)throw"Invalid date";return Q},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",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(b,h,n){if(!h)return"";var x=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,E=(n?n.dayNames:null)||this._defaults.dayNames,u=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort;n=(n?n.monthNames:null)||this._defaults.monthNames;var H=function(d){(d=M+1<b.length&&b.charAt(M+1)==d)&&M++;return d},O=function(d,z,L){z=""+z;if(H(d))for(;z.length<L;)z="0"+z;return z},I=function(d,z,L,m){return H(d)?m[z]:L[z]},
V="",A=false;if(h)for(var M=0;M<b.length;M++)if(A)if(b.charAt(M)=="'"&&!H("'"))A=false;else V+=b.charAt(M);else switch(b.charAt(M)){case "d":V+=O("d",h.getDate(),2);break;case "D":V+=I("D",h.getDay(),x,E);break;case "o":for(var F=h.getDate(),K=h.getMonth()-1;K>=0;K--)F+=this._getDaysInMonth(h.getFullYear(),K);V+=O("o",F,3);break;case "m":V+=O("m",h.getMonth()+1,2);break;case "M":V+=I("M",h.getMonth(),u,n);break;case "y":V+=H("y")?h.getFullYear():(h.getYear()%100<10?"0":"")+h.getYear()%100;break;case "@":V+=
h.getTime();break;case "'":if(H("'"))V+="'";else A=true;break;default:V+=b.charAt(M)}return V},_possibleChars:function(b){for(var h="",n=false,x=0;x<b.length;x++)if(n)if(b.charAt(x)=="'"&&!lookAhead("'"))n=false;else h+=b.charAt(x);else switch(b.charAt(x)){case "d":case "m":case "y":case "@":h+="0123456789";break;case "D":case "M":return null;case "'":if(lookAhead("'"))h+="'";else n=true;break;default:h+=b.charAt(x)}return h},_get:function(b,h){return b.settings[h]!==undefined?b.settings[h]:this._defaults[h]},
_setDateFromField:function(b){var h=this._get(b,"dateFormat"),n=b.input?b.input.val():null;b.endDay=b.endMonth=b.endYear=null;var x=defaultDate=this._getDefaultDate(b),E=this._getFormatConfig(b);try{x=this.parseDate(h,n,E)||defaultDate}catch(u){this.log(u);x=defaultDate}b.selectedDay=x.getDate();b.drawMonth=b.selectedMonth=x.getMonth();b.drawYear=b.selectedYear=x.getFullYear();b.currentDay=n?x.getDate():0;b.currentMonth=n?x.getMonth():0;b.currentYear=n?x.getFullYear():0;this._adjustInstDate(b)},_getDefaultDate:function(b){var h=
this._determineDate(this._get(b,"defaultDate"),new Date),n=this._getMinMaxDate(b,"min",true);b=this._getMinMaxDate(b,"max");h=n&&h<n?n:h;return h=b&&h>b?b:h},_determineDate:function(b,h){var n=function(E){var u=new Date;u.setDate(u.getDate()+E);return u},x=function(E,u){var H=new Date,O=H.getFullYear(),I=H.getMonth();H=H.getDate();for(var V=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,A=V.exec(E);A;){switch(A[2]||"d"){case "d":case "D":H+=parseInt(A[1],10);break;case "w":case "W":H+=parseInt(A[1],10)*7;
break;case "m":case "M":I+=parseInt(A[1],10);H=Math.min(H,u(O,I));break;case "y":case "Y":O+=parseInt(A[1],10);H=Math.min(H,u(O,I));break}A=V.exec(E)}return new Date(O,I,H)};if(b=(b=b==null?h:typeof b=="string"?x(b,this._getDaysInMonth):typeof b=="number"?isNaN(b)?h:n(b):b)&&b.toString()=="Invalid Date"?h:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(b){if(!b)return null;b.setHours(b.getHours()>12?b.getHours()+
2:0);return b},_setDate:function(b,h){var n=!h,x=b.selectedMonth,E=b.selectedYear;h=this._determineDate(h,new Date);b.selectedDay=b.currentDay=h.getDate();b.drawMonth=b.selectedMonth=b.currentMonth=h.getMonth();b.drawYear=b.selectedYear=b.currentYear=h.getFullYear();if(x!=b.selectedMonth||E!=b.selectedYear)this._notifyChange(b);this._adjustInstDate(b);if(b.input)b.input.val(n?"":this._formatDate(b))},_getDate:function(b){return!b.currentYear||b.input&&b.input.val()==""?null:this._daylightSavingAdjust(new Date(b.currentYear,
b.currentMonth,b.currentDay))},_generateHTML:function(b){var h=new Date;h=this._daylightSavingAdjust(new Date(h.getFullYear(),h.getMonth(),h.getDate()));var n=this._get(b,"isRTL"),x=this._get(b,"showButtonPanel"),E=this._get(b,"hideIfNoPrevNext"),u=this._get(b,"navigationAsDateFormat"),H=this._getNumberOfMonths(b),O=this._get(b,"showCurrentAtPos"),I=this._get(b,"stepMonths");this._get(b,"stepBigMonths");var V=H[0]!=1||H[1]!=1,A=this._daylightSavingAdjust(!b.currentDay?new Date(9999,9,9):new Date(b.currentYear,
b.currentMonth,b.currentDay)),M=this._getMinMaxDate(b,"min",true),F=this._getMinMaxDate(b,"max");O=b.drawMonth-O;var K=b.drawYear;if(O<0){O+=12;K--}if(F){var d=this._daylightSavingAdjust(new Date(F.getFullYear(),F.getMonth()-H[1]+1,F.getDate()));for(d=M&&d<M?M:d;this._daylightSavingAdjust(new Date(K,O,1))>d;){O--;if(O<0){O=11;K--}}}b.drawMonth=O;b.drawYear=K;d=this._get(b,"prevText");d=!u?d:this.formatDate(d,this._daylightSavingAdjust(new Date(K,O-I,1)),this._getFormatConfig(b));d=this._canAdjustMonth(b,
-1,K,O)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+b.id+"', -"+I+", 'M');\" title=\""+d+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+d+"</span></a>":E?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+d+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+d+"</span></a>";var z=this._get(b,"nextText");z=!u?z:this.formatDate(z,this._daylightSavingAdjust(new Date(K,O+I,1)),this._getFormatConfig(b));
E=this._canAdjustMonth(b,+1,K,O)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+b.id+"', +"+I+", 'M');\" title=\""+z+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+z+"</span></a>":E?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+z+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+z+"</span></a>";I=this._get(b,"currentText");z=this._get(b,"gotoCurrent")&&b.currentDay?A:h;I=!u?I:this.formatDate(I,
z,this._getFormatConfig(b));u=!b.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(b,"closeText")+"</button>":"";x=x?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(n?u:"")+(this._isInRange(b,z)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+b.id+"');\">"+I+"</button>":
"")+(n?"":u)+"</div>":"";u=parseInt(this._get(b,"firstDay"),10);u=isNaN(u)?0:u;I=this._get(b,"dayNames");this._get(b,"dayNamesShort");z=this._get(b,"dayNamesMin");var L=this._get(b,"monthNames"),m=this._get(b,"monthNamesShort"),Q=this._get(b,"beforeShowDay"),Z=this._get(b,"showOtherMonths");this._get(b,"calculateWeek");for(var X=b.endDay?this._daylightSavingAdjust(new Date(b.endYear,b.endMonth,b.endDay)):A,R=this._getDefaultDate(b),ca="",ea=0;ea<H[0];ea++){for(var ra="",da=0;da<H[1];da++){var ia=
this._daylightSavingAdjust(new Date(K,O,b.selectedDay)),oa=" ui-corner-all",ta="";if(V){ta+='<div class="ui-datepicker-group ui-datepicker-group-';switch(da){case 0:ta+="first";oa=" ui-corner-"+(n?"right":"left");break;case H[1]-1:ta+="last";oa=" ui-corner-"+(n?"left":"right");break;default:ta+="middle";oa="";break}ta+='">'}ta+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+oa+'">'+(/all|left/.test(oa)&&ea==0?n?E:d:"")+(/all|right/.test(oa)&&ea==0?n?d:E:"")+this._generateMonthYearHeader(b,
O,K,M,F,ia,ea>0||da>0,L,m)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var xa="";for(oa=0;oa<7;oa++){var pa=(oa+u)%7;xa+="<th"+((oa+u+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+I[pa]+'">'+z[pa]+"</span></th>"}ta+=xa+"</tr></thead><tbody>";xa=this._getDaysInMonth(K,O);if(K==b.selectedYear&&O==b.selectedMonth)b.selectedDay=Math.min(b.selectedDay,xa);oa=(this._getFirstDayOfMonth(K,O)-u+7)%7;xa=V?6:Math.ceil((oa+xa)/7);pa=this._daylightSavingAdjust(new Date(K,O,1-oa));
for(var Aa=0;Aa<xa;Aa++){ta+="<tr>";var Ea="";for(oa=0;oa<7;oa++){var va=Q?Q.apply(b.input?b.input[0]:null,[pa]):[true,""],Fa=pa.getMonth()!=O,Ha=Fa||!va[0]||M&&pa<M||F&&pa>F;Ea+='<td class="'+((oa+u+6)%7>=5?" ui-datepicker-week-end":"")+(Fa?" ui-datepicker-other-month":"")+(pa.getTime()==ia.getTime()&&O==b.selectedMonth&&b._keyEvent||R.getTime()==pa.getTime()&&R.getTime()==ia.getTime()?" "+this._dayOverClass:"")+(Ha?" "+this._unselectableClass+" ui-state-disabled":"")+(Fa&&!Z?"":" "+va[1]+(pa.getTime()>=
A.getTime()&&pa.getTime()<=X.getTime()?" "+this._currentClass:"")+(pa.getTime()==h.getTime()?" ui-datepicker-today":""))+'"'+((!Fa||Z)&&va[2]?' title="'+va[2]+'"':"")+(Ha?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+b.id+"',"+O+","+K+', this);return false;"')+">"+(Fa?Z?pa.getDate():"&#xa0;":Ha?'<span class="ui-state-default">'+pa.getDate()+"</span>":'<a class="ui-state-default'+(pa.getTime()==h.getTime()?" ui-state-highlight":"")+(pa.getTime()>=A.getTime()&&pa.getTime()<=X.getTime()?" ui-state-active":
"")+'" href="#">'+pa.getDate()+"</a>")+"</td>";pa.setDate(pa.getDate()+1);pa=this._daylightSavingAdjust(pa)}ta+=Ea+"</tr>"}O++;if(O>11){O=0;K++}ta+="</tbody></table>"+(V?"</div>"+(H[0]>0&&da==H[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");ra+=ta}ca+=ra}ca+=x+(c.browser.msie&&parseInt(c.browser.version,10)<7&&!b.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");b._keyEvent=false;return ca},_generateMonthYearHeader:function(b,h,n,x,E,u,
H,O,I){x=b.rangeStart&&x&&u<x?u:x;u=this._get(b,"changeMonth");var V=this._get(b,"changeYear"),A=this._get(b,"showMonthAfterYear"),M='<div class="ui-datepicker-title">',F="";if(H||!u)F+='<span class="ui-datepicker-month">'+O[h]+"</span> ";else{O=x&&x.getFullYear()==n;var K=E&&E.getFullYear()==n;F+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+b.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+b.id+"');\">";for(var d=0;d<12;d++)if((!O||
d>=x.getMonth())&&(!K||d<=E.getMonth()))F+='<option value="'+d+'"'+(d==h?' selected="selected"':"")+">"+I[d]+"</option>";F+="</select>"}A||(M+=F+((H||u||V)&&!(u&&V)?"&#xa0;":""));if(H||!V)M+='<span class="ui-datepicker-year">'+n+"</span>";else{h=this._get(b,"yearRange").split(":");O=I=0;if(h.length!=2){I=n-10;O=n+10}else if(h[0].charAt(0)=="+"||h[0].charAt(0)=="-"){I=n+parseInt(h[0],10);O=n+parseInt(h[1],10)}else{I=parseInt(h[0],10);O=parseInt(h[1],10)}I=x?Math.max(I,x.getFullYear()):I;O=E?Math.min(O,
E.getFullYear()):O;for(M+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+b.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+b.id+"');\">";I<=O;I++)M+='<option value="'+I+'"'+(I==n?' selected="selected"':"")+">"+I+"</option>";M+="</select>"}if(A)M+=(H||u||V?"&#xa0;":"")+F;M+="</div>";return M},_adjustInstDate:function(b,h,n){var x=b.drawYear+(n=="Y"?h:0),E=b.drawMonth+(n=="M"?h:0);h=Math.min(b.selectedDay,this._getDaysInMonth(x,E))+(n==
"D"?h:0);x=this._daylightSavingAdjust(new Date(x,E,h));E=this._getMinMaxDate(b,"min",true);h=this._getMinMaxDate(b,"max");x=E&&x<E?E:x;x=h&&x>h?h:x;b.selectedDay=x.getDate();b.drawMonth=b.selectedMonth=x.getMonth();b.drawYear=b.selectedYear=x.getFullYear();if(n=="M"||n=="Y")this._notifyChange(b)},_notifyChange:function(b){var h=this._get(b,"onChangeMonthYear");if(h)h.apply(b.input?b.input[0]:null,[b.selectedYear,b.selectedMonth+1,b])},_getNumberOfMonths:function(b){b=this._get(b,"numberOfMonths");
return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(b,h,n){h=this._determineDate(this._get(b,h+"Date"),null);return!n||!b.rangeStart?h:!h||b.rangeStart>h?b.rangeStart:h},_getDaysInMonth:function(b,h){return 32-(new Date(b,h,32)).getDate()},_getFirstDayOfMonth:function(b,h){return(new Date(b,h,1)).getDay()},_canAdjustMonth:function(b,h,n,x){var E=this._getNumberOfMonths(b);n=this._daylightSavingAdjust(new Date(n,x+(h<0?h:E[1]),1));h<0&&n.setDate(this._getDaysInMonth(n.getFullYear(),
n.getMonth()));return this._isInRange(b,n)},_isInRange:function(b,h){var n=!b.rangeStart?null:this._daylightSavingAdjust(new Date(b.selectedYear,b.selectedMonth,b.selectedDay));n=(n=n&&b.rangeStart<n?b.rangeStart:n)||this._getMinMaxDate(b,"min");b=this._getMinMaxDate(b,"max");return(!n||h>=n)&&(!b||h<=b)},_getFormatConfig:function(b){var h=this._get(b,"shortYearCutoff");h=typeof h!="string"?h:(new Date).getFullYear()%100+parseInt(h,10);return{shortYearCutoff:h,dayNamesShort:this._get(b,"dayNamesShort"),
dayNames:this._get(b,"dayNames"),monthNamesShort:this._get(b,"monthNamesShort"),monthNames:this._get(b,"monthNames")}},_formatDate:function(b,h,n,x){if(!h){b.currentDay=b.selectedDay;b.currentMonth=b.selectedMonth;b.currentYear=b.selectedYear}h=h?typeof h=="object"?h:this._daylightSavingAdjust(new Date(x,n,h)):this._daylightSavingAdjust(new Date(b.currentYear,b.currentMonth,b.currentDay));return this.formatDate(this._get(b,"dateFormat"),h,this._getFormatConfig(b))}});c.fn.datepicker=function(b){if(!c.datepicker.initialized){c(document).mousedown(c.datepicker._checkExternalClick).find("body").append(c.datepicker.dpDiv);
c.datepicker.initialized=true}var h=Array.prototype.slice.call(arguments,1);if(typeof b=="string"&&(b=="isDisabled"||b=="getDate"))return c.datepicker["_"+b+"Datepicker"].apply(c.datepicker,[this[0]].concat(h));if(b=="option"&&arguments.length==2&&typeof arguments[1]=="string")return c.datepicker["_"+b+"Datepicker"].apply(c.datepicker,[this[0]].concat(h));return this.each(function(){typeof b=="string"?c.datepicker["_"+b+"Datepicker"].apply(c.datepicker,[this].concat(h)):c.datepicker._attachDatepicker(this,
b)})};c.datepicker=new s;c.datepicker.initialized=false;c.datepicker.uuid=(new Date).getTime();c.datepicker.version="1.7.2";window.DP_jQuery=c})(jQuery);
(function(c){function s(I){if(c.facebox.settings.inited)return true;else c.facebox.settings.inited=true;c(document).trigger("init.facebox");h();var V=c.facebox.settings.imageTypes.join("|");c.facebox.settings.imageTypesRegexp=new RegExp("."+V+"$","i");I&&c.extend(c.facebox.settings,I);c("body").append(c.facebox.settings.faceboxHtml);var A=[new Image,new Image];A[0].src=c.facebox.settings.closeImage;A[1].src=c.facebox.settings.loadingImage;c("#facebox").find(".b:first, .bl, .br, .tl, .tr").each(function(){A.push(new Image);
A.slice(-1).src=c(this).css("background-image").replace(/url\((.+)\)/,"$1")});c("#facebox .close").click(c.facebox.close);c("#facebox .close_image").attr("src",c.facebox.settings.closeImage)}function N(){var I,V;if(self.pageYOffset){V=self.pageYOffset;I=self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollTop){V=document.documentElement.scrollTop;I=document.documentElement.scrollLeft}else if(document.body){V=document.body.scrollTop;I=document.body.scrollLeft}return new Array(I,
V)}function b(){var I;if(self.innerHeight)I=self.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)I=document.documentElement.clientHeight;else if(document.body)I=document.body.clientHeight;return I}function h(){var I=c.facebox.settings;I.loadingImage=I.loading_image||I.loadingImage;I.closeImage=I.close_image||I.closeImage;I.imageTypes=I.image_types||I.imageTypes;I.faceboxHtml=I.facebox_html||I.faceboxHtml}function n(I,V){if(I.match(/#/)){var A=window.location.href.split("#")[0];
I=I.replace(A,"");c.facebox.reveal(c(I).clone().show(),V)}else I.match(c.facebox.settings.imageTypesRegexp)?x(I,V):E(I,V)}function x(I,V){var A=new Image;A.onload=function(){c.facebox.reveal('<div class="image"><img src="'+A.src+'" /></div>',V)};A.src=I}function E(I,V){c.get(I,function(A){c.facebox.reveal(A,V)})}function u(){return c.facebox.settings.overlay==false||c.facebox.settings.opacity===null}function H(){if(!u()){c("facebox_overlay").length==0&&c("body").append('<div id="facebox_overlay" class="facebox_hide"></div>');
c("#facebox_overlay").hide().addClass("facebox_overlayBG").css("opacity",c.facebox.settings.opacity).click(function(){c(document).trigger("close.facebox")}).fadeIn(200);return false}}function O(){if(!u()){c("#facebox_overlay").fadeOut(200,function(){c("#facebox_overlay").removeClass("facebox_overlayBG");c("#facebox_overlay").addClass("facebox_hide");c("#facebox_overlay").remove()});return false}}c.facebox=function(I,V){c.facebox.loading();if(I.ajax)E(I.ajax);else if(I.image)x(I.image);else if(I.div)n(I.div);
else c.isFunction(I)?I.call(c):c.facebox.reveal(I,V)};c.extend(c.facebox,{settings:{opacity:0.8,overlay:true,loadingImage:"/facebox/loading.gif",closeImage:"/facebox/closelabel.gif",imageTypes:["png","jpg","jpeg","gif"],faceboxHtml:'    <div id="facebox" style="display:none;">       <div class="popup">         <table>           <tbody>             <tr>               <td class="tl"/><td class="b"/><td class="tr"/>             </tr>             <tr>               <td class="b"/>               <td class="body">                 <div class="content">                 </div>                 <div class="footer">                   <a href="#" class="close">                     <img src="/facebox/closelabel.gif" title="close" class="close_image" />                   </a>                 </div>               </td>               <td class="b"/>             </tr>             <tr>               <td class="bl"/><td class="b"/><td class="br"/>             </tr>           </tbody>         </table>       </div>     </div>'},
loading:function(){s();if(c("#facebox .loading").length==1)return true;H();c("#facebox .content").empty();c("#facebox .body").children().hide().end().append('<div class="loading"><img src="'+c.facebox.settings.loadingImage+'"/></div>');c("#facebox").css({top:N()[1]+b()/10,left:385.5}).show();c(document).bind("keydown.facebox",function(I){I.keyCode==27&&c.facebox.close();return true});c(document).trigger("loading.facebox")},reveal:function(I,V){c(document).trigger("beforeReveal.facebox");V&&c("#facebox .content").addClass(V);
c("#facebox .content").append(I);c("#facebox .loading").remove();c("#facebox .body").children().fadeIn("normal");c("#facebox").css("left",c(window).width()/2-c("#facebox table").width()/2);c(document).trigger("reveal.facebox").trigger("afterReveal.facebox")},close:function(){c(document).trigger("close.facebox");return false}});c.fn.facebox=function(I){function V(){c.facebox.loading(true);var A=this.rel.match(/facebox\[?\.(\w+)\]?/);if(A)A=A[1];n(this.href,A);return false}s(I);return this.click(V)};
c(document).bind("close.facebox",function(){c(document).unbind("keydown.facebox");c("#facebox").fadeOut(0,function(){c("#facebox .content").removeClass().addClass("content");O();c("#facebox .loading").remove()})})})(jQuery);
(function(){function c(A,M,F){if(A.addEventListener)A.addEventListener(M,F,false);else if(A.attachEvent)A.attachEvent("on"+M,function(){F.call(A)});else throw new Error("not supported or DOM not loaded");}function s(A){var M,F;F=O(A);M=F.left;F=F.top;return{left:M,right:M+A.offsetWidth,top:F,bottom:F+A.offsetHeight}}function N(A,M){for(var F in M)if(M.hasOwnProperty(F))A.style[F]=M[F]}function b(A,M){var F=s(A);N(M,{position:"absolute",left:F.left+"px",top:F.top+"px",width:A.offsetWidth+"px",height:A.offsetHeight+
"px"})}function h(A){return A.replace(/.*(\/|\\)/,"")}function n(A){return-1!==A.indexOf(".")?A.replace(/.*[.]/,""):""}function x(A,M){return(new RegExp("\\b"+M+"\\b")).test(A.className)}function E(A,M){x(A,M)||(A.className+=" "+M)}function u(A,M){A.className=A.className.replace(new RegExp("\\b"+M+"\\b"),"")}function H(A){A.parentNode.removeChild(A)}var O=document.documentElement.getBoundingClientRect?function(A){var M=A.getBoundingClientRect(),F=A.ownerDocument;A=F.body;F=F.documentElement;var K=
F.clientTop||A.clientTop||0,d=F.clientLeft||A.clientLeft||0,z=1;if(A.getBoundingClientRect){z=A.getBoundingClientRect();z=(z.right-z.left)/A.clientWidth}if(z>1)d=K=0;return{top:M.top/z+(window.pageYOffset||F&&F.scrollTop/z||A.scrollTop/z)-K,left:M.left/z+(window.pageXOffset||F&&F.scrollLeft/z||A.scrollLeft/z)-d}}:function(A){var M=0,F=0;do{M+=A.offsetTop||0;F+=A.offsetLeft||0;A=A.offsetParent}while(A);return{left:F,top:M}},I=function(){var A=document.createElement("div");return function(M){A.innerHTML=
M;return A.removeChild(A.firstChild)}}(),V=function(){var A=0;return function(){return"ValumsAjaxUpload"+A++}}();window.AjaxUpload=function(A,M){this._settings={action:"upload.php",name:"userfile",data:{},autoSubmit:true,responseType:false,hoverClass:"hover",disabledClass:"disabled",onChange:function(){},onSubmit:function(){},onComplete:function(){}};for(var F in M)if(M.hasOwnProperty(F))this._settings[F]=M[F];if(A.jquery)A=A[0];else if(typeof A=="string"){if(/^#.*/.test(A))A=A.slice(1);A=document.getElementById(A)}if(!A||
A.nodeType!==1)throw new Error("Please make sure that you're passing a valid element");A.nodeName.toUpperCase()=="A"&&c(A,"click",function(K){if(K&&K.preventDefault)K.preventDefault();else if(window.event)window.event.returnValue=false});this._button=A;this._input=null;this._disabled=false;this.enable();this._rerouteClicks()};AjaxUpload.prototype={setData:function(A){this._settings.data=A},disable:function(){E(this._button,this._settings.disabledClass);this._disabled=true;var A=this._button.nodeName.toUpperCase();
if(A=="INPUT"||A=="BUTTON")this._button.setAttribute("disabled","disabled");if(this._input)this._input.parentNode.style.visibility="hidden"},enable:function(){u(this._button,this._settings.disabledClass);this._button.removeAttribute("disabled");this._disabled=false},_createInput:function(){var A=this,M=document.createElement("input");M.setAttribute("type","file");M.setAttribute("name",this._settings.name);N(M,{position:"absolute",right:0,margin:0,padding:0,fontSize:"480px",cursor:"pointer"});var F=
document.createElement("div");N(F,{display:"block",position:"absolute",overflow:"hidden",margin:0,padding:0,opacity:0,direction:"ltr",zIndex:2147483583});if(F.style.opacity!=="0"){if(typeof F.filters=="undefined")throw new Error("Opacity not supported by the browser");F.style.filter="alpha(opacity=0)"}c(M,"change",function(){if(!(!M||M.value==="")){var K=h(M.value);if(false===A._settings.onChange.call(A,K,n(K)))A._clearInput();else A._settings.autoSubmit&&A.submit()}});c(M,"mouseover",function(){E(A._button,
A._settings.hoverClass)});c(M,"mouseout",function(){u(A._button,A._settings.hoverClass);M.parentNode.style.visibility="hidden"});F.appendChild(M);document.body.appendChild(F);this._input=M},_clearInput:function(){if(this._input){H(this._input.parentNode);this._input=null;this._createInput();u(this._button,this._settings.hoverClass)}},_rerouteClicks:function(){var A=this;c(A._button,"mouseover",function(){if(!A._disabled){A._input||A._createInput();var M=A._input.parentNode;b(A._button,M);M.style.visibility=
"visible"}})},_createIframe:function(){var A=V(),M=I('<iframe src="javascript:false;" name="'+A+'" />');M.setAttribute("id",A);M.style.display="none";document.body.appendChild(M);return M},_createForm:function(A){var M=this._settings,F=I('<form method="post" enctype="multipart/form-data"></form>');F.setAttribute("action",M.action);F.setAttribute("target",A.name);F.style.display="none";document.body.appendChild(F);for(var K in M.data)if(M.data.hasOwnProperty(K)){A=document.createElement("input");A.setAttribute("type",
"hidden");A.setAttribute("name",K);A.setAttribute("value",M.data[K]);F.appendChild(A)}return F},_getResponse:function(A,M){var F=false,K=this,d=this._settings;c(A,"load",function(){if(A.src=="javascript:'%3Chtml%3E%3C/html%3E';"||A.src=="javascript:'<html></html>';")F&&setTimeout(function(){H(A)},0);else{var z=A.contentDocument?A.contentDocument:window.frames[A.id].document;if(!(z.readyState&&z.readyState!="complete"))if(!(z.body&&z.body.innerHTML=="false")){var L;if(z.XMLDocument)L=z.XMLDocument;
else if(z.body){L=z.body.innerHTML;if(d.responseType&&d.responseType.toLowerCase()=="json"){if(z.body.firstChild&&z.body.firstChild.nodeName.toUpperCase()=="PRE")L=z.body.firstChild.firstChild.nodeValue;L=L?eval("("+L+")"):{}}}else L=z;d.onComplete.call(K,M,L);F=true;A.src="javascript:'<html></html>';"}}})},submit:function(){var A=this,M=this._settings;if(!(!this._input||this._input.value==="")){var F=h(this._input.value);if(false===M.onSubmit.call(this,F,n(F)))this._clearInput();else{M=this._createIframe();
var K=this._createForm(M);H(this._input.parentNode);u(A._button,A._settings.hoverClass);K.appendChild(this._input);K.submit();H(K);H(this._input);this._input=null;this._getResponse(M,F);this._createInput()}}}}})();
(function(c){function s(){var E=N(this);c(this).text(b(E.datetime));return this}function N(E){E=c(E);if(E.data("timeago")===undefined){E.data("timeago",{datetime:x.datetime(E)});var u=c.trim(E.text());u.length>0&&E.attr("title",u)}return E.data("timeago")}function b(E){return x.inWords(h(E))}function h(E){return(new Date).getTime()-E.getTime()}function n(E,u){return(c.isFunction(E)?E(u):E).replace(/%d/i,u)}c.timeago=function(E){return E instanceof Date?b(E):typeof E=="string"?b(c.timeago.parse(E)):
b(c.timeago.datetime(E))};var x=c.timeago;c.extend(c.timeago,{settings:{refreshMillis:6E4,allowFuture:false,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",ago:null,fromNow:null,seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years"}},inWords:function(E){var u=this.settings.strings,H=u.prefixAgo,
O=u.suffixAgo||u.ago;if(this.settings.allowFuture){if(E<0){H=u.prefixFromNow;O=u.suffixFromNow||u.fromNow}E=Math.abs(E)}E=E/1E3;var I=E/60,V=I/60,A=V/24,M=A/365;u=E<45&&n(u.seconds,Math.round(E))||E<90&&n(u.minute,1)||I<45&&n(u.minutes,Math.round(I))||I<90&&n(u.hour,1)||V<24&&n(u.hours,Math.round(V))||V<48&&n(u.day,1)||A<30&&n(u.days,Math.floor(A))||A<60&&n(u.month,1)||A<365&&n(u.months,Math.floor(A/30))||M<2&&n(u.year,1)||n(u.years,Math.floor(M));return c.trim([H,u,O].join(" "))},parse:function(E){E=
c.trim(E);E=E.replace(/-/,"/").replace(/-/,"/");E=E.replace(/T/," ").replace(/Z/," UTC");E=E.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2");return new Date(E)},datetime:function(E){E=c(E).get(0).tagName.toLowerCase()=="time"?c(E).attr("datetime"):c(E).attr("title");return x.parse(E)}});c.fn.timeago=function(){var E=this;E.each(s);var u=x.settings;u.refreshMillis>0&&setInterval(function(){E.each(s)},u.refreshMillis);return E};document.createElement("abbr");document.createElement("time")})(jQuery);
(function(c){c.fn.editable=function(s,N){if("disable"==s)c(this).data("disabled.editable",true);else if("enable"==s)c(this).data("disabled.editable",false);else if("destroy"==s)c(this).unbind(c(this).data("event.editable")).removeData("disabled.editable").removeData("event.editable");else{var b=c.extend({},c.fn.editable.defaults,{target:s},N),h=c.editable.types[b.type].plugin||function(){},n=c.editable.types[b.type].submit||function(){},x=c.editable.types[b.type].buttons||c.editable.types.defaults.buttons,
E=c.editable.types[b.type].content||c.editable.types.defaults.content,u=c.editable.types[b.type].element||c.editable.types.defaults.element,H=c.editable.types[b.type].reset||c.editable.types.defaults.reset,O=b.callback||function(){},I=b.cancelback||function(){},V=b.onedit||function(){},A=b.onsubmit||function(){},M=b.onreset||function(){},F=b.onerror||H;b.tooltip&&c(this).attr("title",b.tooltip);b.autowidth="auto"==b.width;b.autoheight="auto"==b.height;return this.each(function(){var K=this,d=c(K).width(),
z=c(K).height();c(this).data("event.editable",b.event);c.trim(c(this).html())||c(this).html(b.placeholder);c(this).bind(b.event,function(L){if(true!==c(this).data("disabled.editable"))if(!K.editing)if(false!==V.apply(this,[b,K])){L.preventDefault();L.stopPropagation();b.tooltip&&c(K).removeAttr("title");if(0==c(K).width()){b.width=d;b.height=z}else{if(b.width!="none")b.width=b.autowidth?c(K).width():b.width;if(b.height!="none")b.height=b.autoheight?c(K).height():b.height}c(this).html().toLowerCase().replace(/(;|"|\/)/g,
"")==b.placeholder.toLowerCase().replace(/(;|"|\/)/g,"")&&c(this).html("");K.editing=true;K.revert=c(K).html();c(K).html("");var m=c("<form />");if(b.cssclass)"inherit"==b.cssclass?m.attr("class",c(K).attr("class")):m.attr("class",b.cssclass);if(b.style)if("inherit"==b.style){m.attr("style",c(K).attr("style"));m.css("display",c(K).css("display"))}else m.attr("style",b.style);var Q=u.apply(m,[b,K]),Z;if(b.loadurl){var X=setTimeout(function(){Q.disabled=true;E.apply(m,[b.loadtext,b,K])},100);L={};L[b.id]=
K.id;c.isFunction(b.loaddata)?c.extend(L,b.loaddata.apply(K,[K.revert,b])):c.extend(L,b.loaddata);c.ajax({type:b.loadtype,url:b.loadurl,data:L,async:false,success:function(R){window.clearTimeout(X);Z=R;Q.disabled=false}})}else if(b.data){Z=b.data;if(c.isFunction(b.data))Z=b.data.apply(K,[K.revert,b])}else Z=K.revert;E.apply(m,[Z,b,K]);Q.attr("name",b.name);x.apply(m,[b,K]);c(K).append(m);h.apply(m,[b,K]);c(":input:visible:enabled:first",m).focus();b.select&&Q.select();Q.keydown(function(R){if(R.keyCode==
27){R.preventDefault();H.apply(m,[b,K])}});if("cancel"==b.onblur)Q.blur(function(){X=setTimeout(function(){H.apply(m,[b,K])},500)});else if("submit"==b.onblur)Q.blur(function(){X=setTimeout(function(){m.submit()},200)});else c.isFunction(b.onblur)?Q.blur(function(){b.onblur.apply(K,[Q.val(),b])}):Q.blur(function(){});m.submit(function(R){X&&clearTimeout(X);R.preventDefault();if(false!==A.apply(m,[b,K]))if(false!==n.apply(m,[b,K]))if(c.isFunction(b.target)){R=b.target.apply(K,[Q.val(),b]);c(K).html(R);
K.editing=false;O.apply(K,[K.innerHTML,b]);c.trim(c(K).html())||c(K).html(b.placeholder)}else{R={};R[b.name]=Q.val();R[b.id]=K.id;c.isFunction(b.submitdata)?c.extend(R,b.submitdata.apply(K,[K.revert,b])):c.extend(R,b.submitdata);if("PUT"==b.method)R._method="put";c(K).html(b.indicator);var ca={type:"POST",data:R,dataType:"html",url:b.target,success:function(ea){ca.dataType=="html"&&c(K).html(ea);K.editing=false;O.apply(K,[ea,b]);c.trim(c(K).html())||c(K).html(b.placeholder)},error:function(ea){F.apply(m,
[b,K,ea])}};c.extend(ca,b.ajaxoptions);c.ajax(ca)}c(K).attr("title",b.tooltip);return false})}});this.reset=function(L){if(this.editing)if(false!==M.apply(L,[b,K])){c(K).html(K.revert);K.editing=false;c.trim(c(K).html())||c(K).html(b.placeholder);b.tooltip&&c(K).attr("title",b.tooltip);I.apply(L,[b,K])}}})}};c.editable={types:{defaults:{element:function(){var s=c('<input type="hidden"></input>');c(this).append(s);return s},content:function(s){c(":input:first",this).val(s)},reset:function(s,N){N.reset(this)},
buttons:function(s,N){var b=this;if(s.submit){if(s.submit.match(/>$/))var h=c(s.submit).click(function(){h.attr("type")!="submit"&&b.submit()});else{h=c('<button type="submit" />');h.html(s.submit)}c(this).append(h)}if(s.cancel){if(s.cancel.match(/>$/))var n=c(s.cancel);else{n=c('<button type="cancel" />');n.html(s.cancel)}c(this).append(n);c(n).click(function(){(c.isFunction(c.editable.types[s.type].reset)?c.editable.types[s.type].reset:c.editable.types.defaults.reset).apply(b,[s,N]);return false})}}},
text:{element:function(s){var N=c("<input />");s.width!="none"&&N.width(s.width);s.height!="none"&&N.height(s.height);N.attr("autocomplete","off");c(this).append(N);return N}},textarea:{element:function(s){var N=c("<textarea />");if(s.rows)N.attr("rows",s.rows);else s.height!="none"&&N.height(s.height);if(s.cols)N.attr("cols",s.cols);else s.width!="none"&&N.width(s.width);c(this).append(N);return N}},select:{element:function(){var s=c("<select />");c(this).append(s);return s},content:function(s,N,
b){if(String==s.constructor)eval("var json = "+s);else var h=s;for(var n in h)if(h.hasOwnProperty(n))if("selected"!=n){s=c("<option />").val(n).append(h[n]);c("select",this).append(s)}c("select",this).children().each(function(){if(c(this).val()==h.selected||c(this).text()==c.trim(b.revert))c(this).attr("selected","selected")});if(!N.submit){var x=this;c("select",this).change(function(){x.submit()})}}}},addInputType:function(s,N){c.editable.types[s]=N}};c.fn.editable.defaults={name:"value",id:"id",
type:"text",width:"auto",height:"auto",event:"click.editable",onblur:"cancel",loadtype:"GET",loadtext:"Loading...",placeholder:"Click to edit",loaddata:{},submitdata:{},ajaxoptions:{}}})(jQuery);
(function(c){function s(){this.regional=[];this.regional[""]={labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],timeSeparator:":",isRTL:false};this._defaults={until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:false,description:"",expiryUrl:"",expiryText:"",alwaysExpire:false,onExpiry:null,onTick:null};c.extend(this._defaults,this.regional[""])}function N(b,
h){c.extend(b,h);for(var n in h)if(h[n]==null)b[n]=null;return b}c.extend(s.prototype,{markerClassName:"hasCountdown",_timer:setInterval(function(){c.countdown._updateTargets()},980),_timerTargets:[],setDefaults:function(b){this._resetExtraLabels(this._defaults,b);N(this._defaults,b||{})},UTCDate:function(b,h,n,x,E,u,H,O){if(typeof h=="object"&&h.constructor==Date){O=h.getMilliseconds();H=h.getSeconds();u=h.getMinutes();E=h.getHours();x=h.getDate();n=h.getMonth();h=h.getFullYear()}var I=new Date;
I.setUTCFullYear(h);I.setUTCDate(1);I.setUTCMonth(n||0);I.setUTCDate(x||1);I.setUTCHours(E||0);I.setUTCMinutes((u||0)-(Math.abs(b)<30?b*60:b));I.setUTCSeconds(H||0);I.setUTCMilliseconds(O||0);return I},periodsToSeconds:function(b){return b[0]*31557600+b[1]*2629800+b[2]*604800+b[3]*86400+b[4]*3600+b[5]*60+b[6]},_settingsCountdown:function(b,h){if(!h)return c.countdown._defaults;b=c.data(b,"countdown");return h=="all"?b.options:b.options[h]},_attachCountdown:function(b,h){var n=c(b);if(!n.hasClass(this.markerClassName)){n.addClass(this.markerClassName);
h={options:c.extend({},h),_periods:[0,0,0,0,0,0,0]};c.data(b,"countdown",h);this._changeCountdown(b)}},_addTarget:function(b){this._hasTarget(b)||this._timerTargets.push(b)},_hasTarget:function(b){return c.inArray(b,this._timerTargets)>-1},_removeTarget:function(b){this._timerTargets=c.map(this._timerTargets,function(h){return h==b?null:h})},_updateTargets:function(){for(var b=0;b<this._timerTargets.length;b++)this._updateCountdown(this._timerTargets[b])},_updateCountdown:function(b,h){var n=c(b);
if(h=h||c.data(b,"countdown")){n.html(this._generateHTML(h));n[(this._get(h,"isRTL")?"add":"remove")+"Class"]("countdown_rtl");if(n=this._get(h,"onTick")){var x=h._hold!="lap"?h._periods:this._calculatePeriods(h,h._show,new Date);n.apply(b,[x])}if(h._hold!="pause"&&(h._since?h._now.getTime()<h._since.getTime():h._now.getTime()>=h._until.getTime())&&!h._expiring){h._expiring=true;if(this._hasTarget(b)||this._get(h,"alwaysExpire")){this._removeTarget(b);(n=this._get(h,"onExpiry"))&&n.apply(b,[]);if(n=
this._get(h,"expiryText")){x=this._get(h,"layout");h.options.layout=n;this._updateCountdown(b,h);h.options.layout=x}if(n=this._get(h,"expiryUrl"))window.location=n}h._expiring=false}else h._hold=="pause"&&this._removeTarget(b);c.data(b,"countdown",h)}},_changeCountdown:function(b,h,n){h=h||{};if(typeof h=="string"){var x=h;h={};h[x]=n}if(n=c.data(b,"countdown")){this._resetExtraLabels(n.options,h);N(n.options,h);this._adjustSettings(b,n);c.data(b,"countdown",n);h=new Date;if(n._since&&n._since<h||
n._until&&n._until>h)this._addTarget(b);this._updateCountdown(b,n)}},_resetExtraLabels:function(b,h){var n=false;for(var x in h)if(x.match(/[Ll]abels/)){n=true;break}if(n)for(x in b)if(x.match(/[Ll]abels[0-9]/))b[x]=null},_adjustSettings:function(b,h){var n=this._get(h,"serverSync");n=n?n.apply(b,[]):null;b=new Date;var x=this._get(h,"timezone");x=x==null?-b.getTimezoneOffset():x;h._since=this._get(h,"since");if(h._since!=null){h._since=this.UTCDate(x,this._determineTime(h._since,null));h._since&&
n&&h._since.setMilliseconds(h._since.getMilliseconds()+b.getTime()-n.getTime())}h._until=this.UTCDate(x,this._determineTime(this._get(h,"until"),b));n&&h._until.setMilliseconds(h._until.getMilliseconds()+b.getTime()-n.getTime());h._show=this._determineShow(h)},_destroyCountdown:function(b){var h=c(b);if(h.hasClass(this.markerClassName)){this._removeTarget(b);h.removeClass(this.markerClassName).empty();c.removeData(b,"countdown")}},_pauseCountdown:function(b){this._hold(b,"pause")},_lapCountdown:function(b){this._hold(b,
"lap")},_resumeCountdown:function(b){this._hold(b,null)},_hold:function(b,h){var n=c.data(b,"countdown");if(n){if(n._hold=="pause"&&!h){n._periods=n._savePeriods;var x=n._since?"-":"+";n[n._since?"_since":"_until"]=this._determineTime(x+n._periods[0]+"y"+x+n._periods[1]+"o"+x+n._periods[2]+"w"+x+n._periods[3]+"d"+x+n._periods[4]+"h"+x+n._periods[5]+"m"+x+n._periods[6]+"s");this._addTarget(b)}n._hold=h;n._savePeriods=h=="pause"?n._periods:null;c.data(b,"countdown",n);this._updateCountdown(b,n)}},_getTimesCountdown:function(b){b=
c.data(b,"countdown");return!b?null:!b._hold?b._periods:this._calculatePeriods(b,b._show,new Date)},_get:function(b,h){return b.options[h]!=null?b.options[h]:c.countdown._defaults[h]},_determineTime:function(b,h){var n=function(E){var u=new Date;u.setTime(u.getTime()+E*1E3);return u},x=function(E){E=E.toLowerCase();var u=new Date,H=u.getFullYear(),O=u.getMonth(),I=u.getDate(),V=u.getHours(),A=u.getMinutes();u=u.getSeconds();for(var M=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g,F=M.exec(E);F;){switch(F[2]||
"s"){case "s":u+=parseInt(F[1],10);break;case "m":A+=parseInt(F[1],10);break;case "h":V+=parseInt(F[1],10);break;case "d":I+=parseInt(F[1],10);break;case "w":I+=parseInt(F[1],10)*7;break;case "o":O+=parseInt(F[1],10);I=Math.min(I,c.countdown._getDaysInMonth(H,O));break;case "y":H+=parseInt(F[1],10);I=Math.min(I,c.countdown._getDaysInMonth(H,O));break}F=M.exec(E)}return new Date(H,O,I,V,A,u,0)};(b=b==null?h:typeof b=="string"?x(b):typeof b=="number"?n(b):b)&&b.setMilliseconds(0);return b},_getDaysInMonth:function(b,
h){return 32-(new Date(b,h,32)).getDate()},_generateHTML:function(b){b._periods=periods=b._hold?b._periods:this._calculatePeriods(b,b._show,new Date);for(var h=false,n=0,x=c.extend({},b._show),E=0;E<b._show.length;E++){h|=b._show[E]=="?"&&periods[E]>0;x[E]=b._show[E]=="?"&&!h?null:b._show[E];n+=x[E]?1:0}h=this._get(b,"compact");E=this._get(b,"layout");var u=h?this._get(b,"compactLabels"):this._get(b,"labels"),H=this._get(b,"timeSeparator"),O=this._get(b,"description")||"",I=function(A){var M=c.countdown._get(b,
"compactLabels"+periods[A]);return x[A]?periods[A]+(M?M[A]:u[A])+" ":""},V=function(A){var M=c.countdown._get(b,"labels"+periods[A]);return x[A]?'<span class="countdown_section"><span class="countdown_amount">'+periods[A]+"</span><br/>"+(M?M[A]:u[A])+"</span>":""};return E?this._buildLayout(b,x,E,h):(h?'<span class="countdown_row countdown_amount'+(b._hold?" countdown_holding":"")+'">'+I(0)+I(1)+I(2)+I(3)+(x[4]?this._minDigits(periods[4],2):"")+(x[5]?(x[4]?H:"")+this._minDigits(periods[5],2):"")+
(x[6]?(x[4]||x[5]?H:"")+this._minDigits(periods[6],2):""):'<span class="countdown_row countdown_show'+n+(b._hold?" countdown_holding":"")+'">'+V(0)+V(1)+V(2)+V(3)+V(4)+V(5)+V(6))+"</span>"+(O?'<span class="countdown_row countdown_descr">'+O+"</span>":"")},_buildLayout:function(b,h,n,x){var E=this._get(b,x?"compactLabels":"labels"),u=function(I){return(c.countdown._get(b,(x?"compactLabels":"labels")+b._periods[I])||E)[I]},H=function(I,V){return Math.floor(I/V)%10};u={desc:this._get(b,"description"),
sep:this._get(b,"timeSeparator"),yl:u(0),yn:b._periods[0],ynn:this._minDigits(b._periods[0],2),ynnn:this._minDigits(b._periods[0],3),y1:H(b._periods[0],1),y10:H(b._periods[0],10),y100:H(b._periods[0],100),y1000:H(b._periods[0],1E3),ol:u(1),on:b._periods[1],onn:this._minDigits(b._periods[1],2),onnn:this._minDigits(b._periods[1],3),o1:H(b._periods[1],1),o10:H(b._periods[1],10),o100:H(b._periods[1],100),o1000:H(b._periods[1],1E3),wl:u(2),wn:b._periods[2],wnn:this._minDigits(b._periods[2],2),wnnn:this._minDigits(b._periods[2],
3),w1:H(b._periods[2],1),w10:H(b._periods[2],10),w100:H(b._periods[2],100),w1000:H(b._periods[2],1E3),dl:u(3),dn:b._periods[3],dnn:this._minDigits(b._periods[3],2),dnnn:this._minDigits(b._periods[3],3),d1:H(b._periods[3],1),d10:H(b._periods[3],10),d100:H(b._periods[3],100),d1000:H(b._periods[3],1E3),hl:u(4),hn:b._periods[4],hnn:this._minDigits(b._periods[4],2),hnnn:this._minDigits(b._periods[4],3),h1:H(b._periods[4],1),h10:H(b._periods[4],10),h100:H(b._periods[4],100),h1000:H(b._periods[4],1E3),ml:u(5),
mn:b._periods[5],mnn:this._minDigits(b._periods[5],2),mnnn:this._minDigits(b._periods[5],3),m1:H(b._periods[5],1),m10:H(b._periods[5],10),m100:H(b._periods[5],100),m1000:H(b._periods[5],1E3),sl:u(6),sn:b._periods[6],snn:this._minDigits(b._periods[6],2),snnn:this._minDigits(b._periods[6],3),s1:H(b._periods[6],1),s10:H(b._periods[6],10),s100:H(b._periods[6],100),s1000:H(b._periods[6],1E3)};var O=n;for(n=0;n<7;n++){H="yowdhms".charAt(n);O=O.replace(new RegExp("\\{"+H+"<\\}(.*)\\{"+H+">\\}","g"),h[n]?
"$1":"")}c.each(u,function(I,V){O=O.replace(new RegExp("\\{"+I+"\\}","g"),V)});return O},_minDigits:function(b,h){b=""+b;if(b.length>=h)return b;b="0000000000"+b;return b.substr(b.length-h)},_determineShow:function(b){b=this._get(b,"format");var h=[];h[0]=b.match("y")?"?":b.match("Y")?"!":null;h[1]=b.match("o")?"?":b.match("O")?"!":null;h[2]=b.match("w")?"?":b.match("W")?"!":null;h[3]=b.match("d")?"?":b.match("D")?"!":null;h[4]=b.match("h")?"?":b.match("H")?"!":null;h[5]=b.match("m")?"?":b.match("M")?
"!":null;h[6]=b.match("s")?"?":b.match("S")?"!":null;return h},_calculatePeriods:function(b,h,n){b._now=n;b._now.setMilliseconds(0);var x=new Date(b._now.getTime());if(b._since)if(n.getTime()<b._since.getTime())b._now=n=x;else n=b._since;else{x.setTime(b._until.getTime());if(n.getTime()>b._until.getTime())b._now=n=x}var E=[0,0,0,0,0,0,0];if(h[0]||h[1]){var u=c.countdown._getDaysInMonth(n.getFullYear(),n.getMonth()),H=c.countdown._getDaysInMonth(x.getFullYear(),x.getMonth()),O=x.getDate()==n.getDate()||
x.getDate()>=Math.min(u,H)&&n.getDate()>=Math.min(u,H),I=function(A){return(A.getHours()*60+A.getMinutes())*60+A.getSeconds()};O=Math.max(0,(x.getFullYear()-n.getFullYear())*12+x.getMonth()-n.getMonth()+(x.getDate()<n.getDate()&&!O||O&&I(x)<I(n)?-1:0));E[0]=h[0]?Math.floor(O/12):0;E[1]=h[1]?O-E[0]*12:0;O=function(A,M,F){F=A.getDate()==F;var K=c.countdown._getDaysInMonth(A.getFullYear()+M*E[0],A.getMonth()+M*E[1]);A.getDate()>K&&A.setDate(K);A.setFullYear(A.getFullYear()+M*E[0]);A.setMonth(A.getMonth()+
M*E[1]);F&&A.setDate(K);return A};if(b._since)x=O(x,-1,H);else n=O(new Date(n.getTime()),+1,u)}var V=Math.floor((x.getTime()-n.getTime())/1E3);n=function(A,M){E[A]=h[A]?Math.floor(V/M):0;V-=E[A]*M};n(2,604800);n(3,86400);n(4,3600);n(5,60);n(6,1);if(V>0&&!b._since){b=[1,12,4.3482,7,24,60,60];n=6;x=1;for(u=6;u>=0;u--){if(h[u]){if(E[n]>=x){E[n]=0;V=1}if(V>0){E[u]++;V=0;n=u;x=1}}x*=b[u]}}return E}});c.fn.countdown=function(b){var h=Array.prototype.slice.call(arguments,1);if(b=="getTimes"||b=="settings")return c.countdown["_"+
b+"Countdown"].apply(c.countdown,[this[0]].concat(h));return this.each(function(){typeof b=="string"?c.countdown["_"+b+"Countdown"].apply(c.countdown,[this].concat(h)):c.countdown._attachCountdown(this,b)})};c.countdown=new s})(jQuery);
(function(c){function s(d,z,L){var m=this;m.id=L;m.options=z;m.status={animated:false,rendered:false,disabled:false,focused:false};m.elements={target:d.addClass(m.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};m.cache={mouse:{},position:{},toggle:0};m.timers={};c.extend(m,m.options.api,{show:function(Q){function Z(){m.options.position.type!=="static"&&m.focus();m.onShow.call(m,Q);c.browser.msie&&m.elements.tooltip.get(0).style.removeAttribute("filter")}
var X;if(!m.status.rendered)return c.fn.qtip.log.error.call(m,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"show");if(m.elements.tooltip.css("display")!=="none")return m;m.elements.tooltip.stop(true,false);if(m.beforeShow.call(m,Q)===false)return m;m.cache.toggle=1;m.options.position.type!=="static"&&m.updatePosition(Q,m.options.show.effect.length>0);if(typeof m.options.show.solo=="object")X=c(m.options.show.solo);else if(m.options.show.solo===true)X=c("div.qtip").not(m.elements.tooltip);X&&X.each(function(){c(this).qtip("api").status.rendered===
true&&c(this).qtip("api").hide()});if(typeof m.options.show.effect.type=="function"){m.options.show.effect.type.call(m.elements.tooltip,m.options.show.effect.length);m.elements.tooltip.queue(function(){Z();c(this).dequeue()})}else{switch(m.options.show.effect.type.toLowerCase()){case "fade":m.elements.tooltip.fadeIn(m.options.show.effect.length,Z);break;case "slide":m.elements.tooltip.slideDown(m.options.show.effect.length,function(){Z();m.options.position.type!=="static"&&m.updatePosition(Q,true)});
break;case "grow":m.elements.tooltip.show(m.options.show.effect.length,Z);break;default:m.elements.tooltip.show(null,Z);break}m.elements.tooltip.addClass(m.options.style.classes.active)}return c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.EVENT_SHOWN,"show")},hide:function(Q){function Z(){m.onHide.call(m,Q)}if(m.status.rendered){if(m.elements.tooltip.css("display")==="none")return m}else return c.fn.qtip.log.error.call(m,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"hide");clearTimeout(m.timers.show);
m.elements.tooltip.stop(true,false);if(m.beforeHide.call(m,Q)===false)return m;m.cache.toggle=0;if(typeof m.options.hide.effect.type=="function"){m.options.hide.effect.type.call(m.elements.tooltip,m.options.hide.effect.length);m.elements.tooltip.queue(function(){Z();c(this).dequeue()})}else{switch(m.options.hide.effect.type.toLowerCase()){case "fade":m.elements.tooltip.fadeOut(m.options.hide.effect.length,Z);break;case "slide":m.elements.tooltip.slideUp(m.options.hide.effect.length,Z);break;case "grow":m.elements.tooltip.hide(m.options.hide.effect.length,
Z);break;default:m.elements.tooltip.hide(null,Z);break}m.elements.tooltip.removeClass(m.options.style.classes.active)}return c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.EVENT_HIDDEN,"hide")},updatePosition:function(Q,Z){var X,R,ca,ea,ra,da,ia;if(m.status.rendered){if(m.options.position.type=="static")return c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.CANNOT_POSITION_STATIC,"updatePosition")}else return c.fn.qtip.log.error.call(m,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updatePosition");
R={position:{left:0,top:0},dimensions:{height:0,width:0},corner:m.options.position.corner.target};ca={position:m.getPosition(),dimensions:m.getDimensions(),corner:m.options.position.corner.tooltip};if(m.options.position.target!=="mouse"){if(m.options.position.target.get(0).nodeName.toLowerCase()=="area"){ea=m.options.position.target.attr("coords").split(",");for(X=0;X<ea.length;X++)ea[X]=parseInt(ea[X]);X=m.options.position.target.parent("map").attr("name");ra=c('img[usemap="#'+X+'"]:first').offset();
R.position={left:Math.floor(ra.left+ea[0]),top:Math.floor(ra.top+ea[1])};switch(m.options.position.target.attr("shape").toLowerCase()){case "rect":R.dimensions={width:Math.ceil(Math.abs(ea[2]-ea[0])),height:Math.ceil(Math.abs(ea[3]-ea[1]))};break;case "circle":R.dimensions={width:ea[2]+1,height:ea[2]+1};break;case "poly":R.dimensions={width:ea[0],height:ea[1]};for(X=0;X<ea.length;X++)if(X%2==0){if(ea[X]>R.dimensions.width)R.dimensions.width=ea[X];if(ea[X]<ea[0])R.position.left=Math.floor(ra.left+
ea[X])}else{if(ea[X]>R.dimensions.height)R.dimensions.height=ea[X];if(ea[X]<ea[1])R.position.top=Math.floor(ra.top+ea[X])}R.dimensions.width-=R.position.left-ra.left;R.dimensions.height-=R.position.top-ra.top;break;default:return c.fn.qtip.log.error.call(m,4,c.fn.qtip.constants.INVALID_AREA_SHAPE,"updatePosition")}R.dimensions.width-=2;R.dimensions.height-=2}else if(m.options.position.target.add(document.body).length===1){R.position={left:c(document).scrollLeft(),top:c(document).scrollTop()};R.dimensions=
{height:c(window).height(),width:c(window).width()}}else{R.position=typeof m.options.position.target.attr("qtip")!=="undefined"?m.options.position.target.qtip("api").cache.position:m.options.position.target.offset();R.dimensions={height:m.options.position.target.outerHeight(),width:m.options.position.target.outerWidth()}}da=c.extend({},R.position);if(R.corner.search(/right/i)!==-1)da.left+=R.dimensions.width;if(R.corner.search(/bottom/i)!==-1)da.top+=R.dimensions.height;if(R.corner.search(/((top|bottom)Middle)|center/)!==
-1)da.left+=R.dimensions.width/2;if(R.corner.search(/((left|right)Middle)|center/)!==-1)da.top+=R.dimensions.height/2}else{R.position=da={left:m.cache.mouse.x,top:m.cache.mouse.y};R.dimensions={height:1,width:1}}if(ca.corner.search(/right/i)!==-1)da.left-=ca.dimensions.width;if(ca.corner.search(/bottom/i)!==-1)da.top-=ca.dimensions.height;if(ca.corner.search(/((top|bottom)Middle)|center/)!==-1)da.left-=ca.dimensions.width/2;if(ca.corner.search(/((left|right)Middle)|center/)!==-1)da.top-=ca.dimensions.height/
2;ea=c.browser.msie?1:0;c.browser.msie&&parseInt(c.browser.version.charAt(0));if(m.options.style.border.radius>0){if(ca.corner.search(/Left/)!==-1)da.left-=m.options.style.border.radius;else if(ca.corner.search(/Right/)!==-1)da.left+=m.options.style.border.radius;if(ca.corner.search(/Top/)!==-1)da.top-=m.options.style.border.radius;else if(ca.corner.search(/Bottom/)!==-1)da.top+=m.options.style.border.radius}if(ea){if(ca.corner.search(/top/)!==-1)da.top-=ea;else if(ca.corner.search(/bottom/)!==-1)da.top+=
ea;if(ca.corner.search(/left/)!==-1)da.left-=ea;else if(ca.corner.search(/right/)!==-1)da.left+=ea;if(ca.corner.search(/leftMiddle|rightMiddle/)!==-1)da.top-=1}if(m.options.position.adjust.screen===true)da=O.call(m,da,R,ca);if(m.options.position.target==="mouse"&&m.options.position.adjust.mouse===true){R=m.options.position.adjust.screen===true&&m.elements.tip?m.elements.tip.attr("rel"):m.options.position.corner.tooltip;da.left+=R.search(/right/i)!==-1?-6:6;da.top+=R.search(/bottom/i)!==-1?-6:6}!m.elements.bgiframe&&
c.browser.msie&&parseInt(c.browser.version.charAt(0))==6&&c("select, object").each(function(){ia=c(this).offset();ia.bottom=ia.top+c(this).height();ia.right=ia.left+c(this).width();da.top+ca.dimensions.height>=ia.top&&da.left+ca.dimensions.width>=ia.left&&K.call(m)});da.left+=m.options.position.adjust.x;da.top+=m.options.position.adjust.y;R=m.getPosition();if(da.left!=R.left||da.top!=R.top){R=m.beforePositionUpdate.call(m,Q);if(R===false)return m;m.cache.position=da;if(Z===true){m.status.animated=
true;m.elements.tooltip.animate(da,200,"swing",function(){m.status.animated=false})}else m.elements.tooltip.css(da);m.onPositionUpdate.call(m,Q);typeof Q!=="undefined"&&Q.type&&Q.type!=="mousemove"&&c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.EVENT_POSITION_UPDATED,"updatePosition")}return m},updateWidth:function(Q){var Z;if(m.status.rendered){if(Q&&typeof Q!=="number")return c.fn.qtip.log.error.call(m,2,"newWidth must be of type number","updateWidth")}else return c.fn.qtip.log.error.call(m,
2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateWidth");Z=m.elements.contentWrapper.siblings().add(m.elements.tip).add(m.elements.button);if(!Q)if(typeof m.options.style.width.value=="number")Q=m.options.style.width.value;else{m.elements.tooltip.css({width:"auto"});Z.hide();c.browser.msie&&m.elements.wrapper.add(m.elements.contentWrapper.children()).css({zoom:"normal"});Q=m.getDimensions().width+1;if(!m.options.style.width.value){if(Q>m.options.style.width.max)Q=m.options.style.width.max;if(Q<m.options.style.width.min)Q=
m.options.style.width.min}}if(Q%2!==0)Q-=1;m.elements.tooltip.width(Q);Z.show();m.options.style.border.radius&&m.elements.tooltip.find(".qtip-betweenCorners").each(function(){c(this).width(Q-m.options.style.border.radius*2)});if(c.browser.msie){m.elements.wrapper.add(m.elements.contentWrapper.children()).css({zoom:"1"});m.elements.wrapper.width(Q);m.elements.bgiframe&&m.elements.bgiframe.width(Q).height(m.getDimensions.height)}return c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.EVENT_WIDTH_UPDATED,
"updateWidth")},updateStyle:function(Q){var Z,X,R,ca;if(m.status.rendered){if(typeof Q!=="string"||!c.fn.qtip.styles[Q])return c.fn.qtip.log.error.call(m,2,c.fn.qtip.constants.STYLE_NOT_DEFINED,"updateStyle")}else return c.fn.qtip.log.error.call(m,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateStyle");m.options.style=A.call(m,c.fn.qtip.styles[Q],m.options.user.style);m.elements.content.css(I(m.options.style));m.options.content.title.text!==false&&m.elements.title.css(I(m.options.style.title,true));
m.elements.contentWrapper.css({borderColor:m.options.style.border.color});if(m.options.style.tip.corner!==false)if(c("<canvas>").get(0).getContext){Q=m.elements.tooltip.find(".qtip-tip canvas:first");X=Q.get(0).getContext("2d");X.clearRect(0,0,300,300);R=Q.parent("div[rel]:first").attr("rel");ca=M(R,m.options.style.tip.size.width,m.options.style.tip.size.height);x.call(m,Q,ca,m.options.style.tip.color||m.options.style.border.color)}else if(c.browser.msie){Q=m.elements.tooltip.find('.qtip-tip [nodeName="shape"]');
Q.attr("fillcolor",m.options.style.tip.color||m.options.style.border.color)}if(m.options.style.border.radius>0){m.elements.tooltip.find(".qtip-betweenCorners").css({backgroundColor:m.options.style.border.color});if(c("<canvas>").get(0).getContext){Z=F(m.options.style.border.radius);m.elements.tooltip.find(".qtip-wrapper canvas").each(function(){X=c(this).get(0).getContext("2d");X.clearRect(0,0,300,300);R=c(this).parent("div[rel]:first").attr("rel");h.call(m,c(this),Z[R],m.options.style.border.radius,
m.options.style.border.color)})}else c.browser.msie&&m.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){c(this).attr("fillcolor",m.options.style.border.color)})}return c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.EVENT_STYLE_UPDATED,"updateStyle")},updateContent:function(Q,Z){function X(){m.updateWidth();if(Z!==false){m.options.position.type!=="static"&&m.updatePosition(m.elements.tooltip.is(":visible"),true);m.options.style.tip.corner!==false&&E.call(m)}}var R,ca,ea;if(m.status.rendered){if(!Q)return c.fn.qtip.log.error.call(m,
2,c.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateContent")}else return c.fn.qtip.log.error.call(m,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateContent");R=m.beforeContentUpdate.call(m,Q);if(typeof R=="string")Q=R;else if(R===false)return;c.browser.msie&&m.elements.contentWrapper.children().css({zoom:"normal"});Q.jquery&&Q.length>0?Q.clone(true).appendTo(m.elements.content).show():m.elements.content.html(Q);ca=m.elements.content.find("img[complete=false]");if(ca.length>0){ea=0;ca.each(function(){c('<img src="'+
c(this).attr("src")+'" />').load(function(){++ea==ca.length&&X()})})}else X();m.onContentUpdate.call(m);return c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.EVENT_CONTENT_UPDATED,"loadContent")},loadContent:function(Q,Z,X){function R(ca){m.onContentLoad.call(m);c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.EVENT_CONTENT_LOADED,"loadContent");m.updateContent(ca)}if(!m.status.rendered)return c.fn.qtip.log.error.call(m,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"loadContent");if(m.beforeContentLoad.call(m)===
false)return m;X=="post"?c.post(Q,Z,R):c.get(Q,Z,R);return m},updateTitle:function(Q){if(m.status.rendered){if(!Q)return c.fn.qtip.log.error.call(m,2,c.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateTitle")}else return c.fn.qtip.log.error.call(m,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateTitle");returned=m.beforeTitleUpdate.call(m);if(returned===false)return m;if(m.elements.button)m.elements.button=m.elements.button.clone(true);m.elements.title.html(Q);m.elements.button&&m.elements.title.prepend(m.elements.button);
m.onTitleUpdate.call(m);return c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.EVENT_TITLE_UPDATED,"updateTitle")},focus:function(Q){var Z,X,R;if(m.status.rendered){if(m.options.position.type=="static")return c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.CANNOT_FOCUS_STATIC,"focus")}else return c.fn.qtip.log.error.call(m,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"focus");Z=parseInt(m.elements.tooltip.css("z-index"));X=6E3+c("div.qtip[qtip]").length-1;if(!m.status.focused&&Z!==X){Z=m.beforeFocus.call(m,
Q);if(Z===false)return m;c("div.qtip[qtip]").not(m.elements.tooltip).each(function(){if(c(this).qtip("api").status.rendered===true){R=parseInt(c(this).css("z-index"));typeof R=="number"&&R>-1&&c(this).css({zIndex:parseInt(c(this).css("z-index"))-1});c(this).qtip("api").status.focused=false}});m.elements.tooltip.css({zIndex:X});m.status.focused=true;m.onFocus.call(m,Q);c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.EVENT_FOCUSED,"focus")}return m},disable:function(Q){if(!m.status.rendered)return c.fn.qtip.log.error.call(m,
2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"disable");if(Q)if(m.status.disabled)c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,"disable");else{m.status.disabled=true;c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.EVENT_DISABLED,"disable")}else if(m.status.disabled){m.status.disabled=false;c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.EVENT_ENABLED,"disable")}else c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,"disable");return m},destroy:function(){var Q,
Z;if(m.beforeDestroy.call(m)===false)return m;if(m.status.rendered){m.options.show.when.target.unbind("mousemove.qtip",m.updatePosition);m.options.show.when.target.unbind("mouseout.qtip",m.hide);m.options.show.when.target.unbind(m.options.show.when.event+".qtip");m.options.hide.when.target.unbind(m.options.hide.when.event+".qtip");m.elements.tooltip.unbind(m.options.hide.when.event+".qtip");m.elements.tooltip.unbind("mouseover.qtip",m.focus);m.elements.tooltip.remove()}else m.options.show.when.target.unbind(m.options.show.when.event+
".qtip-create");if(typeof m.elements.target.data("qtip")=="object"){Z=m.elements.target.data("qtip").interfaces;if(typeof Z=="object"&&Z.length>0)for(Q=0;Q<Z.length-1;Q++)Z[Q].id==m.id&&Z.splice(Q,1)}delete c.fn.qtip.interfaces[m.id];if(typeof Z=="object"&&Z.length>0)m.elements.target.data("qtip").current=Z.length-1;else m.elements.target.removeData("qtip");m.onDestroy.call(m);c.fn.qtip.log.error.call(m,1,c.fn.qtip.constants.EVENT_DESTROYED,"destroy");return m.elements.target},getPosition:function(){var Q,
Z;if(!m.status.rendered)return c.fn.qtip.log.error.call(m,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getPosition");(Q=m.elements.tooltip.css("display")!=="none"?false:true)&&m.elements.tooltip.css({visiblity:"hidden"}).show();Z=m.elements.tooltip.offset();Q&&m.elements.tooltip.css({visiblity:"visible"}).hide();return Z},getDimensions:function(){var Q,Z;if(!m.status.rendered)return c.fn.qtip.log.error.call(m,2,c.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getDimensions");(Q=!m.elements.tooltip.is(":visible")?
true:false)&&m.elements.tooltip.css({visiblity:"hidden"}).show();Z={height:m.elements.tooltip.outerHeight(),width:m.elements.tooltip.outerWidth()};Q&&m.elements.tooltip.css({visiblity:"visible"}).hide();return Z}})}function N(){var d,z,L,m;d=this;d.beforeRender.call(d);d.status.rendered=true;d.elements.tooltip='<div qtip="'+d.id+'" class="qtip '+(d.options.style.classes.tooltip||d.options.style)+'"style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;position:'+d.options.position.type+
';">  <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;">    <div class="qtip-contentWrapper" style="overflow:hidden;">       <div class="qtip-content '+d.options.style.classes.content+'"></div></div></div></div>';d.elements.tooltip=c(d.elements.tooltip);d.elements.tooltip.appendTo(d.options.position.container);d.elements.tooltip.data("qtip",{current:0,interfaces:[d]});d.elements.wrapper=d.elements.tooltip.children("div:first");d.elements.contentWrapper=d.elements.wrapper.children("div:first").css({background:d.options.style.background});
d.elements.content=d.elements.contentWrapper.children("div:first").css(I(d.options.style));c.browser.msie&&d.elements.wrapper.add(d.elements.content).css({zoom:1});d.options.hide.when.event=="unfocus"&&d.elements.tooltip.attr("unfocus",true);typeof d.options.style.width.value=="number"&&d.updateWidth();if(c("<canvas>").get(0).getContext||c.browser.msie){d.options.style.border.radius>0?b.call(d):d.elements.contentWrapper.css({border:d.options.style.border.width+"px solid "+d.options.style.border.color});
d.options.style.tip.corner!==false&&n.call(d)}else{d.elements.contentWrapper.css({border:d.options.style.border.width+"px solid "+d.options.style.border.color});d.options.style.border.radius=0;d.options.style.tip.corner=false;c.fn.qtip.log.error.call(d,2,c.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,"render")}if(typeof d.options.content.text=="string"&&d.options.content.text.length>0||d.options.content.text.jquery&&d.options.content.text.length>0)z=d.options.content.text;else if(typeof d.elements.target.attr("title")==
"string"&&d.elements.target.attr("title").length>0){z=d.elements.target.attr("title").replace("\\n","<br />");d.elements.target.attr("title","")}else if(typeof d.elements.target.attr("alt")=="string"&&d.elements.target.attr("alt").length>0){z=d.elements.target.attr("alt").replace("\\n","<br />");d.elements.target.attr("alt","")}else{z=" ";c.fn.qtip.log.error.call(d,1,c.fn.qtip.constants.NO_VALID_CONTENT,"render")}d.options.content.title.text!==false&&u.call(d);d.updateContent(z);H.call(d);d.options.show.ready===
true&&d.show();if(d.options.content.url!==false){z=d.options.content.url;L=d.options.content.data;m=d.options.content.method||"get";d.loadContent(z,L,m)}d.onRender.call(d);c.fn.qtip.log.error.call(d,1,c.fn.qtip.constants.EVENT_RENDERED,"render")}function b(){var d,z,L,m,Q,Z,X,R,ca;d=this;d.elements.wrapper.find(".qtip-borderBottom, .qtip-borderTop").remove();L=d.options.style.border.width;m=d.options.style.border.radius;Q=d.options.style.border.color||d.options.style.tip.color;Z=F(m);X={};for(z in Z){X[z]=
'<div rel="'+z+'" style="'+(z.search(/Left/)!==-1?"left":"right")+":0; position:absolute; height:"+m+"px; width:"+m+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if(c("<canvas>").get(0).getContext)X[z]+='<canvas height="'+m+'" width="'+m+'" style="vertical-align: top"></canvas>';else if(c.browser.msie){R=m*2+3;X[z]+='<v:arc stroked="false" fillcolor="'+Q+'" startangle="'+Z[z][0]+'" endangle="'+Z[z][1]+'" style="width:'+R+"px; height:"+R+"px; margin-top:"+(z.search(/bottom/)!==-1?-2:-1)+
"px; margin-left:"+(z.search(/Right/)!==-1?Z[z][2]-3.5:-1)+'px; vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>'}X[z]+="</div>"}z=d.getDimensions().width-Math.max(L,m)*2;z='<div class="qtip-betweenCorners" style="height:'+m+"px; width:"+z+"px; overflow:hidden; background-color:"+Q+'; line-height:0.1px; font-size:1px;">';d.elements.wrapper.prepend('<div class="qtip-borderTop" dir="ltr" style="height:'+m+"px; margin-left:"+m+'px; line-height:0.1px; font-size:1px; padding:0;">'+
X.topLeft+X.topRight+z);d.elements.wrapper.append('<div class="qtip-borderBottom" dir="ltr" style="height:'+m+"px; margin-left:"+m+'px; line-height:0.1px; font-size:1px; padding:0;">'+X.bottomLeft+X.bottomRight+z);if(c("<canvas>").get(0).getContext)d.elements.wrapper.find("canvas").each(function(){ca=Z[c(this).parent("[rel]:first").attr("rel")];h.call(d,c(this),ca,m,Q)});else c.browser.msie&&d.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>');X=Math.max(m,m+(L-m));
L=Math.max(L-m,0);d.elements.contentWrapper.css({border:"0px solid "+Q,borderWidth:L+"px "+X+"px"})}function h(d,z,L,m){d=d.get(0).getContext("2d");d.fillStyle=m;d.beginPath();d.arc(z[0],z[1],L,0,Math.PI*2,false);d.fill()}function n(d){var z,L,m,Q,Z;z=this;z.elements.tip!==null&&z.elements.tip.remove();L=z.options.style.tip.color||z.options.style.border.color;if(z.options.style.tip.corner!==false){if(!d)d=z.options.style.tip.corner;m=M(d,z.options.style.tip.size.width,z.options.style.tip.size.height);
z.elements.tip='<div class="'+z.options.style.classes.tip+'" dir="ltr" rel="'+d+'" style="position:absolute; height:'+z.options.style.tip.size.height+"px; width:"+z.options.style.tip.size.width+'px; margin:0 auto; line-height:0.1px; font-size:1px;">';if(c("<canvas>").get(0).getContext)z.elements.tip+='<canvas height="'+z.options.style.tip.size.height+'" width="'+z.options.style.tip.size.width+'"></canvas>';else if(c.browser.msie){Q=z.options.style.tip.size.width+","+z.options.style.tip.size.height;
Z="m"+m[0][0]+","+m[0][1];Z+=" l"+m[1][0]+","+m[1][1];Z+=" "+m[2][0]+","+m[2][1];Z+=" xe";z.elements.tip+='<v:shape fillcolor="'+L+'" stroked="false" filled="true" path="'+Z+'" coordsize="'+Q+'" style="width:'+z.options.style.tip.size.width+"px; height:"+z.options.style.tip.size.height+"px; line-height:0.1px; display:inline-block; behavior:url(#default#VML); vertical-align:"+(d.search(/top/)!==-1?"bottom":"top")+'"></v:shape>';z.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';
z.elements.contentWrapper.css("position","relative")}z.elements.tooltip.prepend(z.elements.tip+"</div>");z.elements.tip=z.elements.tooltip.find("."+z.options.style.classes.tip).eq(0);c("<canvas>").get(0).getContext&&x.call(z,z.elements.tip.find("canvas:first"),m,L);d.search(/top/)!==-1&&c.browser.msie&&parseInt(c.browser.version.charAt(0))===6&&z.elements.tip.css({marginTop:-4});E.call(z,d)}}function x(d,z,L){d=d.get(0).getContext("2d");d.fillStyle=L;d.beginPath();d.moveTo(z[0][0],z[0][1]);d.lineTo(z[1][0],
z[1][1]);d.lineTo(z[2][0],z[2][1]);d.fill()}function E(d){var z,L;z=this;if(!(z.options.style.tip.corner===false||!z.elements.tip)){d||(d=z.elements.tip.attr("rel"));L=positionAdjust=c.browser.msie?1:0;z.elements.tip.css(d.match(/left|right|top|bottom/)[0],0);if(d.search(/top|bottom/)!==-1){if(c.browser.msie)positionAdjust=parseInt(c.browser.version.charAt(0))===6?d.search(/top/)!==-1?-3:1:d.search(/top/)!==-1?1:2;if(d.search(/Middle/)!==-1)z.elements.tip.css({left:"50%",marginLeft:-(z.options.style.tip.size.width/
2)});else if(d.search(/Left/)!==-1)z.elements.tip.css({left:z.options.style.border.radius-L});else d.search(/Right/)!==-1&&z.elements.tip.css({right:z.options.style.border.radius+L});d.search(/top/)!==-1?z.elements.tip.css({top:-positionAdjust}):z.elements.tip.css({bottom:positionAdjust})}else if(d.search(/left|right/)!==-1){if(c.browser.msie)positionAdjust=parseInt(c.browser.version.charAt(0))===6?1:d.search(/left/)!==-1?1:2;if(d.search(/Middle/)!==-1)z.elements.tip.css({top:"50%",marginTop:-(z.options.style.tip.size.height/
2)});else if(d.search(/Top/)!==-1)z.elements.tip.css({top:z.options.style.border.radius-L});else d.search(/Bottom/)!==-1&&z.elements.tip.css({bottom:z.options.style.border.radius+L});d.search(/left/)!==-1?z.elements.tip.css({left:-positionAdjust}):z.elements.tip.css({right:positionAdjust})}d="padding-"+d.match(/left|right|top|bottom/)[0];L=z.options.style.tip.size[d.search(/left|right/)!==-1?"width":"height"];z.elements.tooltip.css("padding",0);z.elements.tooltip.css(d,L);if(c.browser.msie&&parseInt(c.browser.version.charAt(0))==
6){d=parseInt(z.elements.tip.css("margin-top"))||0;d+=parseInt(z.elements.content.css("margin-top"))||0;z.elements.tip.css({marginTop:d})}}}function u(){var d=this;d.elements.title!==null&&d.elements.title.remove();d.elements.title=c('<div class="'+d.options.style.classes.title+'">').css(I(d.options.style.title,true)).css({zoom:c.browser.msie?1:0}).prependTo(d.elements.contentWrapper);d.options.content.title.text&&d.updateTitle.call(d,d.options.content.title.text);if(d.options.content.title.button!==
false&&typeof d.options.content.title.button=="string")d.elements.button=c('<a class="'+d.options.style.classes.button+'" style="float:right; position: relative"></a>').css(I(d.options.style.button,true)).html(d.options.content.title.button).prependTo(d.elements.title).click(function(z){d.status.disabled||d.hide(z)})}function H(){function d(R){if(L.status.disabled!==true){if(L.options.hide.when.event=="inactive"){c(Z).each(function(){Q.bind(this+".qtip-inactive",X);L.elements.content.bind(this+".qtip-inactive",
X)});X()}clearTimeout(L.timers.show);clearTimeout(L.timers.hide);L.timers.show=setTimeout(function(){L.show(R)},L.options.show.delay)}}function z(R){if(L.status.disabled!==true){if(L.options.hide.fixed===true&&L.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&c(R.relatedTarget).parents("div.qtip[qtip]").length>0){R.stopPropagation();R.preventDefault();clearTimeout(L.timers.hide);return false}clearTimeout(L.timers.show);clearTimeout(L.timers.hide);L.elements.tooltip.stop(true,true);L.timers.hide=
setTimeout(function(){L.hide(R)},L.options.hide.delay)}}var L,m,Q,Z;L=this;m=L.options.show.when.target;Q=L.options.hide.when.target;if(L.options.hide.fixed)Q=Q.add(L.elements.tooltip);if(L.options.hide.when.event=="inactive"){Z=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"];function X(R){if(L.status.disabled!==true){clearTimeout(L.timers.inactive);L.timers.inactive=setTimeout(function(){c(Z).each(function(){Q.unbind(this+".qtip-inactive");
L.elements.content.unbind(this+".qtip-inactive")});L.hide(R)},L.options.hide.delay)}}}else L.options.hide.fixed===true&&L.elements.tooltip.bind("mouseover.qtip",function(){L.status.disabled!==true&&clearTimeout(L.timers.hide)});if(L.options.show.when.target.add(L.options.hide.when.target).length===1&&L.options.show.when.event==L.options.hide.when.event&&L.options.hide.when.event!=="inactive"||L.options.hide.when.event=="unfocus"){L.cache.toggle=0;m.bind(L.options.show.when.event+".qtip",function(R){L.cache.toggle==
0?d(R):z(R)})}else{m.bind(L.options.show.when.event+".qtip",d);L.options.hide.when.event!=="inactive"&&Q.bind(L.options.hide.when.event+".qtip",z)}L.options.position.type.search(/(fixed|absolute)/)!==-1&&L.elements.tooltip.bind("mouseover.qtip",L.focus);L.options.position.target==="mouse"&&L.options.position.type!=="static"&&m.bind("mousemove.qtip",function(R){L.cache.mouse={x:R.pageX,y:R.pageY};L.status.disabled===false&&L.options.position.adjust.mouse===true&&L.options.position.type!=="static"&&
L.elements.tooltip.css("display")!=="none"&&L.updatePosition(R)})}function O(d,z,L){var m,Q,Z,X;m=this;if(L.corner=="center")return z.position;Q=c.extend({},d);X={x:false,y:false};Z={left:Q.left<c.fn.qtip.cache.screen.scroll.left,right:Q.left+L.dimensions.width+2>=c.fn.qtip.cache.screen.width+c.fn.qtip.cache.screen.scroll.left,top:Q.top<c.fn.qtip.cache.screen.scroll.top,bottom:Q.top+L.dimensions.height+2>=c.fn.qtip.cache.screen.height+c.fn.qtip.cache.screen.scroll.top};Z={left:Z.left&&(L.corner.search(/right/i)!=
-1||L.corner.search(/right/i)==-1&&!Z.right),right:Z.right&&(L.corner.search(/left/i)!=-1||L.corner.search(/left/i)==-1&&!Z.left),top:Z.top&&L.corner.search(/top/i)==-1,bottom:Z.bottom&&L.corner.search(/bottom/i)==-1};if(Z.left){Q.left=m.options.position.target!=="mouse"?z.position.left+z.dimensions.width:m.cache.mouse.x;X.x="Left"}else if(Z.right){Q.left=m.options.position.target!=="mouse"?z.position.left-L.dimensions.width:m.cache.mouse.x-L.dimensions.width;X.x="Right"}if(Z.top){Q.top=m.options.position.target!==
"mouse"?z.position.top+z.dimensions.height:m.cache.mouse.y;X.y="top"}else if(Z.bottom){Q.top=m.options.position.target!=="mouse"?z.position.top-L.dimensions.height:m.cache.mouse.y-L.dimensions.height;X.y="bottom"}if(Q.left<0){Q.left=d.left;X.x=false}if(Q.top<0){Q.top=d.top;X.y=false}if(m.options.style.tip.corner!==false){Q.corner=new String(L.corner);if(X.x!==false)Q.corner=Q.corner.replace(/Left|Right|Middle/,X.x);if(X.y!==false)Q.corner=Q.corner.replace(/top|bottom/,X.y);Q.corner!==m.elements.tip.attr("rel")&&
n.call(m,Q.corner)}return Q}function I(d,z){var L;d=c.extend(true,{},d);for(L in d)if(z===true&&L.search(/(tip|classes)/i)!==-1)delete d[L];else!z&&L.search(/(width|border|tip|title|classes|user)/i)!==-1&&delete d[L];return d}function V(d){if(typeof d.tip!=="object")d.tip={corner:d.tip};if(typeof d.tip.size!=="object")d.tip.size={width:d.tip.size,height:d.tip.size};if(typeof d.border!=="object")d.border={width:d.border};if(typeof d.width!=="object")d.width={value:d.width};if(typeof d.width.max=="string")d.width.max=
parseInt(d.width.max.replace(/([0-9]+)/i,"$1"));if(typeof d.width.min=="string")d.width.min=parseInt(d.width.min.replace(/([0-9]+)/i,"$1"));if(typeof d.tip.size.x=="number"){d.tip.size.width=d.tip.size.x;delete d.tip.size.x}if(typeof d.tip.size.y=="number"){d.tip.size.height=d.tip.size.y;delete d.tip.size.y}return d}function A(){var d,z,L;d=this;L=[true,{}];for(z=0;z<arguments.length;z++)L.push(arguments[z]);for(z=[c.extend.apply(c,L)];typeof z[0].name=="string";)z.unshift(V(c.fn.qtip.styles[z[0].name]));
z.unshift(true,{classes:{tooltip:"qtip-"+(arguments[0].name||"defaults")}},c.fn.qtip.styles.defaults);z=c.extend.apply(c,z);L=c.browser.msie?1:0;z.tip.size.width+=L;z.tip.size.height+=L;if(z.tip.size.width%2>0)z.tip.size.width+=1;if(z.tip.size.height%2>0)z.tip.size.height+=1;if(z.tip.corner===true)z.tip.corner=d.options.position.corner.tooltip==="center"?false:d.options.position.corner.tooltip;return z}function M(d,z,L){z={bottomRight:[[0,0],[z,L],[z,0]],bottomLeft:[[0,0],[z,0],[0,L]],topRight:[[0,
L],[z,0],[z,L]],topLeft:[[0,0],[0,L],[z,L]],topMiddle:[[0,L],[z/2,0],[z,L]],bottomMiddle:[[0,0],[z,0],[z/2,L]],rightMiddle:[[0,0],[z,L/2],[0,L]],leftMiddle:[[z,0],[z,L],[0,L/2]]};z.leftTop=z.bottomRight;z.rightTop=z.bottomLeft;z.leftBottom=z.topRight;z.rightBottom=z.topLeft;return z[d]}function F(d){var z;if(c("<canvas>").get(0).getContext)z={topLeft:[d,d],topRight:[0,d],bottomLeft:[d,0],bottomRight:[0,0]};else if(c.browser.msie)z={topLeft:[-90,90,0],topRight:[-90,90,-d],bottomLeft:[90,270,0],bottomRight:[90,
270,-d]};return z}function K(){var d,z;d=this;z=d.getDimensions();d.elements.bgiframe=d.elements.wrapper.prepend('<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; height:'+z.height+"px; width:"+z.width+'px" />').children(".qtip-bgiframe:first")}c.fn.qtip=function(d,z){var L,m,Q,Z,X,R,ca,ea;if(typeof d=="string"){typeof c(this).data("qtip")!=="object"&&c.fn.qtip.log.error.call(self,
1,c.fn.qtip.constants.NO_TOOLTIP_PRESENT,false);if(d=="api")return c(this).data("qtip").interfaces[c(this).data("qtip").current];else if(d=="interfaces")return c(this).data("qtip").interfaces}else{d||(d={});if(typeof d.content!=="object"||d.content.jquery&&d.content.length>0)d.content={text:d.content};if(typeof d.content.title!=="object")d.content.title={text:d.content.title};if(typeof d.position!=="object")d.position={corner:d.position};if(typeof d.position.corner!=="object")d.position.corner={target:d.position.corner,
tooltip:d.position.corner};if(typeof d.show!=="object")d.show={when:d.show};if(typeof d.show.when!=="object")d.show.when={event:d.show.when};if(typeof d.show.effect!=="object")d.show.effect={type:d.show.effect};if(typeof d.hide!=="object")d.hide={when:d.hide};if(typeof d.hide.when!=="object")d.hide.when={event:d.hide.when};if(typeof d.hide.effect!=="object")d.hide.effect={type:d.hide.effect};if(typeof d.style!=="object")d.style={name:d.style};d.style=V(d.style);Z=c.extend(true,{},c.fn.qtip.defaults,
d);Z.style=A.call({options:Z},Z.style);Z.user=c.extend(true,{},d)}return c(this).each(function(){if(typeof d=="string"){R=d.toLowerCase();Q=c(this).qtip("interfaces");if(typeof Q=="object")if(z===true&&R=="destroy")for(;Q.length>0;)Q[Q.length-1].destroy();else{if(z!==true)Q=[c(this).qtip("api")];for(L=0;L<Q.length;L++)if(R=="destroy")Q[L].destroy();else if(Q[L].status.rendered===true)if(R=="show")Q[L].show();else if(R=="hide")Q[L].hide();else if(R=="focus")Q[L].focus();else if(R=="disable")Q[L].disable(true);
else R=="enable"&&Q[L].disable(false)}}else{ca=c.extend(true,{},Z);ca.hide.effect.length=Z.hide.effect.length;ca.show.effect.length=Z.show.effect.length;if(ca.position.container===false)ca.position.container=c(document.body);if(ca.position.target===false)ca.position.target=c(this);if(ca.show.when.target===false)ca.show.when.target=c(this);if(ca.hide.when.target===false)ca.hide.when.target=c(this);m=c.fn.qtip.interfaces.length;for(L=0;L<m;L++)if(typeof c.fn.qtip.interfaces[L]=="undefined"){m=L;break}X=
new s(c(this),ca,m);c.fn.qtip.interfaces[m]=X;if(typeof c(this).data("qtip")=="object"){if(typeof c(this).attr("qtip")==="undefined")c(this).data("qtip").current=c(this).data("qtip").interfaces.length;c(this).data("qtip").interfaces.push(X)}else c(this).data("qtip",{current:0,interfaces:[X]});if(ca.content.prerender===false&&ca.show.when.event!==false&&ca.show.ready!==true)ca.show.when.target.bind(ca.show.when.event+".qtip-"+m+"-create",{qtip:m},function(ra){ea=c.fn.qtip.interfaces[ra.data.qtip];
ea.options.show.when.target.unbind(ea.options.show.when.event+".qtip-"+ra.data.qtip+"-create");ea.cache.mouse={x:ra.pageX,y:ra.pageY};N.call(ea);ea.options.show.when.target.trigger(ea.options.show.when.event)});else{X.cache.mouse={x:ca.show.when.target.offset().left,y:ca.show.when.target.offset().top};N.call(X)}}})};c(document).ready(function(){c.fn.qtip.cache={screen:{scroll:{left:c(window).scrollLeft(),top:c(window).scrollTop()},width:c(window).width(),height:c(window).height()}};var d;c(window).bind("resize scroll",
function(z){clearTimeout(d);d=setTimeout(function(){if(z.type==="scroll")c.fn.qtip.cache.screen.scroll={left:c(window).scrollLeft(),top:c(window).scrollTop()};else{c.fn.qtip.cache.screen.width=c(window).width();c.fn.qtip.cache.screen.height=c(window).height()}for(i=0;i<c.fn.qtip.interfaces.length;i++){var L=c.fn.qtip.interfaces[i];if(L.status.rendered===true&&(L.options.position.type!=="static"||L.options.position.adjust.scroll&&z.type==="scroll"||L.options.position.adjust.resize&&z.type==="resize"))L.updatePosition(z,
true)}},100)});c(document).bind("mousedown.qtip",function(z){c(z.target).parents("div.qtip").length===0&&c(".qtip[unfocus]").each(function(){var L=c(this).qtip("api");c(this).is(":visible")&&!L.status.disabled&&c(z.target).add(L.elements.target).length>1&&L.hide(z)})})});c.fn.qtip.interfaces=[];c.fn.qtip.log={error:function(){return this}};c.fn.qtip.constants={};c.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:"bottomRight",
tooltip:"topLeft"},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:"absolute",container:false},show:{when:{target:false,event:"mouseover"},effect:{type:"fade",length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:"mouseout"},effect:{type:"fade",length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},
onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};c.fn.qtip.styles={defaults:{background:"white",color:"#111",overflow:"hidden",textAlign:"left",width:{min:0,max:250},padding:"5px 9px",border:{width:1,radius:0,color:"#d3d3d3"},tip:{corner:false,color:false,
size:{width:13,height:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},button:{cursor:"pointer"},classes:{target:"",tip:"qtip-tip",title:"qtip-title",button:"qtip-button",content:"qtip-content",active:"qtip-active"}},cream:{border:{width:3,radius:0,color:"#F9E98E"},title:{background:"#F0DE7D",color:"#A27D35"},background:"#FBF7AA",color:"#A27D35",classes:{tooltip:"qtip-cream"}},light:{border:{width:3,radius:0,color:"#E2E2E2"},title:{background:"#f1f1f1",color:"#454545"},
background:"white",color:"#454545",classes:{tooltip:"qtip-light"}},dark:{border:{width:3,radius:0,color:"#303030"},title:{background:"#404040",color:"#f3f3f3"},background:"#505050",color:"#f3f3f3",classes:{tooltip:"qtip-dark"}},red:{border:{width:3,radius:0,color:"#CE6F6F"},title:{background:"#f28279",color:"#9C2F2F"},background:"#F79992",color:"#9C2F2F",classes:{tooltip:"qtip-red"}},green:{border:{width:3,radius:0,color:"#A9DB66"},title:{background:"#b9db8c",color:"#58792E"},background:"#CDE6AC",
color:"#58792E",classes:{tooltip:"qtip-green"}},blue:{border:{width:3,radius:0,color:"#ADD9ED"},title:{background:"#D0E9F5",color:"#5E99BD"},background:"#E5F6FE",color:"#4D9FBF",classes:{tooltip:"qtip-blue"}}}})(jQuery);
(function(c){c.fn.simpleautogrow=function(){return this.each(function(){new c.simpleautogrow(this)})};c.simpleautogrow=function(s){var N=this,b=this.textarea=c(s).css({overflow:"hidden",display:"block"}).bind("focus",function(){this.timer=window.setInterval(function(){N.checkExpand()},200)}).bind("blur",function(){clearInterval(this.timer)});this.border=b.outerHeight()-b.innerHeight();this.clone=b.clone().css({position:"absolute",visibility:"hidden"}).attr("name","");b.height(s.scrollHeight+this.border).after(this.clone);
this.checkExpand()};c.simpleautogrow.prototype.checkExpand=function(){var s=this.clone[0].scrollHeight+this.border;this.textarea.outerHeight()!=s&&this.textarea.height(s+"px");this.clone.attr("value",this.textarea.attr("value")).height(0)}})(jQuery);
jQuery.url=function(){var c={},s={},N={url:window.location,strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},
b=function(){str=decodeURI(N.url);for(var x=N.parser[N.strictMode?"strict":"loose"].exec(str),E={},u=14;u--;)E[N.key[u]]=x[u]||"";E[N.q.name]={};E[N.key[12]].replace(N.q.parser,function(H,O,I){if(O)E[N.q.name][O]=I});return E},h=function(){s=b();n()},n=function(){var x=s.path;c=[];c=s.path.length==1?{}:(x.charAt(x.length-1)=="/"?x.substring(1,x.length-1):(path=x.substring(1))).split("/")};return{setMode:function(x){strictMode=x=="strict"?true:false;return this},setUrl:function(x){N.url=x===undefined?
window.location:x;h();return this},segment:function(x){s.length||h();if(x===undefined)return c.length;return c[x]===""||c[x]===undefined?null:c[x]},attr:function(x){s.length||h();if(x=="base")return s.port!==null&&s.port!==""?s.protocol+"://"+s.host+":"+s.port+"/":s.protocol+"://"+s.host+"/";return s[x]===""?null:s[x]},param:function(x){s.length||h();return s.queryKey[x]===null?null:s.queryKey[x]}}}();
(function(c){function s(b){return typeof b=="object"?b:{top:b,left:b}}var N=c.scrollTo=function(b,h,n){c(window).scrollTo(b,h,n)};N.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};N.window=function(){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var b=this;if(!(!b.nodeName||c.inArray(b.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1))return b;b=(b.contentWindow||b).document||b.ownerDocument||b;return c.browser.safari||b.compatMode==
"BackCompat"?b.body:b.documentElement})};c.fn.scrollTo=function(b,h,n){if(typeof h=="object"){n=h;h=0}if(typeof n=="function")n={onAfter:n};if(b=="max")b=9E9;n=c.extend({},N.defaults,n);h=h||n.speed||n.duration;n.queue=n.queue&&n.axis.length>1;if(n.queue)h/=2;n.offset=s(n.offset);n.over=s(n.over);return this._scrollable().each(function(){function x(A){u.animate(I,h,n.easing,A&&function(){A.call(this,b,n)})}var E=this,u=c(E),H=b,O,I={},V=u.is("html,body");switch(typeof H){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(H)){H=
s(H);break}H=c(H,this);case "object":if(H.is||H.style)O=(H=c(H)).offset()}c.each(n.axis.split(""),function(A,M){var F=M=="x"?"Left":"Top",K=F.toLowerCase(),d="scroll"+F,z=E[d],L=N.max(E,M);if(O){I[d]=O[K]+(V?0:z-u.offset()[K]);if(n.margin){I[d]-=parseInt(H.css("margin"+F))||0;I[d]-=parseInt(H.css("border"+F+"Width"))||0}I[d]+=n.offset[K]||0;if(n.over[K])I[d]+=H[M=="x"?"width":"height"]()*n.over[K]}else{M=H[K];I[d]=M.slice&&M.slice(-1)=="%"?parseFloat(M)/100*L:M}if(/^\d+$/.test(I[d]))I[d]=I[d]<=0?
0:Math.min(I[d],L);if(!A&&n.queue){z!=I[d]&&x(n.onAfterFirst);delete I[d]}});x(n.onAfter)}).end()};N.max=function(b,h){var n=h=="x"?"Width":"Height";h="scroll"+n;if(!c(b).is("html,body"))return b[h]-c(b)[n.toLowerCase()]();n="client"+n;var x=b.ownerDocument.documentElement;b=b.ownerDocument.body;return Math.max(x[h],b[h])-Math.min(x[n],b[n])}})(jQuery);if(!Array.indexOf)Array.prototype.indexOf=function(c){for(var s=0;s<this.length;s++)if(this[s]==c)return s;return-1};
Array.prototype.max=function(){return Math.max.apply(Math,this)};Array.prototype.min=function(){return Math.min.apply(Math,this)};jQuery.timeago.settings.allowFuture=true;var hijack=[".eventAddButton",".eventReplyToggle","#publishSubmit","#publishComment","#publisherShareLink"];$(function(){$(hijack.join(",")).click(function(c){if($("#userId").length<1&&$("#challengeId").length>0){Challenge.show_signup($("#challengeId").val());c.cancelBubble=true;c.stopPropagation();return false}})});
var Challenge={facebook_permissions:["offline_access","publish_stream"],log:function(){"console"in window&&window.console.log(arguments)},track:function(c,s,N,b){if("_gat"in window){var h=_gat._getTracker("UA-5060041-3");h._initData();h._trackEvent(c,s,N,b)}},show_signup:function(c){$.facebox(function(){$.get("/challenges/"+c+"/signup_alert",function(s){$.facebox(s)})})}};
Challenge.User={showFirstTimeModal:function(){$.facebox(function(){$.get("/users/first_time",function(c){$.facebox(c);$("#firstTimeEmailInput").focus();$(".close_image").hide();$("#firstTimeFinish").click(function(){FB.login(Challenge.PermissionsHandler,{perms:Challenge.facebook_permissions.join(",")})})})})},logout:function(){if(FB)FB.getLoginStatus(function(c){if(c.session)FB.logout(function(){window.location="/logout"});else window.location="/logout"});else window.location="/logout"}};
Challenge.activateChallengeList=function(){$("#challengeNavList").css({top:$(".challengeNav").position().top,left:$(".challengeNav").position().left-180}).show();Challenge.track("Nav","click","challengelist",1)};Challenge.deactivateChallengeList=function(){$("#challengeNavList").hide()};
Challenge.PermissionsHandler=function(c){Challenge.log("The result of facebook permission request is:",c);var s={};$("#firstTimeForm input").each(function(N,b){s[b.name]=$(b).is(":checkbox")?$(b).is(":checked"):$(b).val()});Challenge.log(s);$.post("/users/initial_setup.json",s,function(N){Challenge.log(N);if(typeof N.errors=="undefined")if(N.next=="/friends")window.location="/friends";else $("#firstTimeToaster").hide("slow",function(){$(this).html(N.next).fadeIn("slow")});else{var b=$("#firstTimeToaster").find(".errors");
b.html("");$.each(N.errors,function(h,n){b.append(n.join(" ")+"<br />")})}},"json")};Challenge.sendChallengeInvitation=function(c,s){s=s||$("#challengeId").val();$.post("/users/"+c+"/invite_to_challenge.json",{"challenge[id]":s},function(){$("#challenge-invite-"+c).parent().html("invited!")},"json")};Challenge.FriendSuggest={close:function(){$("#firstTimeToaster").hide("slow")},goToInvite:function(){window.location="/friends"}};
$(function(){$(".target, .target a").live("click",function(){var c=$(this).attr("rel").split("-").pop();Challenge.PublisherTarget.toggle(c);return false});$("#friendFinderInput").focus(function(){$(this).removeClass("unfocused").val("");$(".target").show()});$("#friendFinderInput").keypress(function(){var c=$(this).val();$(".target").show();$('.target:not(.target[name*="'+c+'"])').hide()});$("#targetWrap").find(".publisherAttachmentCancel").click(function(){Challenge.PublisherTarget.cancel();return false});
$("#targetWrap").find(".publisherAttachmentOkayButton").click(function(){Challenge.PublisherTarget.okay();return false});$("#progressWrap").find(".publisherAttachmentCancel").click(function(){Challenge.PublisherProgress.cancel();return false});$("#progressWrap").find(".publisherAttachmentOkayButton").click(function(){Challenge.PublisherProgress.okay();return false});$(".eventAddButton").click(function(){if(!$(this).hasClass("disabled")){var c=$(this).attr("rel");Challenge.Publisher.toggleAttachmentWrap(c);
return false}});$("#publishSubmit").click(function(){$("#publisherSubmitting").show("fast",function(){Challenge.Publisher.submit()});$("#publishActions").hide()});$(".publisherActivateSettings").click(function(){$("#publishActions").toggle();return false});$(".closePublisherSettings").click(function(){$("#publishActions").toggle();return false});$(".visualTemplate").click(function(){$("#challengeId").val();$(this).attr("id").split("-").pop()})});
$(function(){Challenge.Publisher.init();$("#publishComment").focus(function(){$(this).hasClass("unfocused")&&$(this).val("").removeClass("unfocused").focus().trigger("click")}).simpleautogrow();$(".attachmentOverview").click(function(){var c=$(this).attr("rel");Challenge.Publisher.activateAttachment(c);return false});$(".attachmentCancel").click(function(){var c=$(this).attr("rel");Challenge[Challenge.Publisher.attachment_handlers[c]].reset();return false});$("#challengeTabs").bind("tabsselect",function(c,
s){c=$(s.tab).attr("href");if(c=="#activityPanel"||c=="#leaderboardPanel")$("#publisherAndTray").show();else if(c=="#infoPanel"||c=="#adminPanel")$("#publisherAndTray").hide()})});
Challenge.Publisher={attachments:[],attachment_callbacks:{target:function(){Challenge.PublisherTarget.init()},item:function(){Challenge.PublisherItem.init()},media:function(){},progress:function(){}},attachment_handlers:{target:"PublisherTarget",media:"PublisherMedia",item:"PublisherItem",progress:"PublisherProgress"},original_heights:{target:0,media:0,item:0,progress:0},init:function(){$.each(this.original_heights,function(c){Challenge.Publisher.original_heights[c]=$("#"+c+"Wrap").height()})},toggleAttachmentWrap:function(c){Challenge.Publisher.autoOkayAttachments(c);
$(".add-"+c+".selected").length>0?$("#"+c+"Wrap").find(".publisherAttachmentOkayButton").click():Challenge.Publisher.activateAttachment(c)},autoOkayAttachments:function(c){$(".eventAddButton.selected").each(function(){var s=$(this).attr("rel");s!=c&&$("#"+s+"Wrap").find(".publisherAttachmentOkayButton").click()})},activateAttachment:function(c){var s=$("#"+c+"Wrap");if(!s.hasClass("active")){$(".add-"+c).addClass("selected");s.addClass("active").css({height:0}).animate({height:Challenge.Publisher.original_heights[c]});
this.attachment_callbacks[c].call();Challenge.track("Publisher",c,"open",1)}},deactivateAttachment:function(c){$(".add-"+c).removeClass("selected");$("#"+c+"Wrap").hasClass("active")&&$("#"+c+"Wrap").removeClass("active").animate({height:0},function(){$(this).hide()})},cancelAttachment:function(c){Challenge.log("Cancelling event attachment",c);var s=this.attachments.indexOf(c);if(s>=0){$("#"+c+"Wrap").hide("slow");$("#publisher").find(".add-"+c).fadeIn();this.attachments.splice(s,1)}Challenge.track("Publisher",
c,"cancel",1)},showFBPublisher:function(c){FB.Connect.streamPublish(c.message,{name:c.name,description:c.description,media:[{type:"image",src:c.image_path,href:c.url}]},[{text:"Join the Challenge",href:c.url}],null,"Your Challenge Update",null,true,null)},submit:function(){var c=(new Challenge.Update).fromPublisher();if($("#publishComment").hasClass("unfocused"))c["event[comment]"]="";if(!(c["event[comment]"]==""&&typeof c["progress[value]"]=="undefined"))if(Challenge.Publisher.state!="disabled"){Challenge.Publisher.disable();
$.post("/events.json",c,function(s){if(typeof s.errors=="undefined"){s.fbPublisherData!=null&&Challenge.Publisher.showFBPublisher(s.fbPublisherData);Challenge.Publisher.addActivity(s.view);Challenge.Publisher.showRobot(s.robot,s.event.event.id);Challenge.Publisher.reset();s.reload&&window.location.reload(true)}Challenge.Publisher.enable();Challenge.Flasher.show("Your post has been submitted.")},"json");Challenge.track("Publisher","submit")}},addActivity:function(c){$("#challengeTabs").tabs("select",
0);$(".activityList").prepend($(c).hide());$(".activityList").find("li:first").fadeIn("slow").find("abbr.timeago").timeago();$(".activityList").find("li:first").find("a[rel*=facebox]").facebox()},showRobot:function(c){if(c!=null){var s=$(c).find(".title");c=$(c).find(".description");$("#robotWrap").find(".title").html(s.html());$("#robotWrap").find(".description").html(c.html());$("#robotWrap").find(".links").html("");$("#robotWrap").fadeIn()}},addComment:function(c,s){s='<li class="ajax">'+s+"</li>";
$(".event-"+c).find(".eventRepliesList").append(s).find("li:last").fadeIn("slow",function(){}).find("abbr.timeago").timeago();$(".event-"+c).find(".eventCreateReply").hide().find("textarea").val("")},disable:function(){Challenge.Publisher.state="disabled";$("#publishSubmit").val("Publishing...")},enable:function(){Challenge.Publisher.state="enabled";$("#publishSubmit").val("Publish");$("#publisherSubmitting").hide()},reset:function(){Challenge.PublisherMedia.reset();Challenge.PublisherTarget.reset();
Challenge.PublisherProgress.reset();Challenge.PublisherItem.reset();$("#publishComment").val("").addClass("unfocused");$("#attachmentsOverview").hide();Challenge.PublisherSendTo.save()}};
Challenge.PublisherTarget={init:function(){$("#challengeId").val()},toggle:function(c){$("#target-"+c).hasClass("selected")?Challenge.PublisherTarget.deselect(c):Challenge.PublisherTarget.select(c);Challenge.PublisherTarget.updateSelectedCount()},select:function(c){$("#target-"+c).addClass("selected")},deselect:function(c){$("#target-"+c).removeClass("selected")},updateSelectedCount:function(){var c=$(".target.selected").length,s=c>1?"s":"";c>0?$("#friendSelectedCount").html(c+" friend"+s+" selected"):
$("#friendSelectedCount").html("")},okay:function(){var c=$("#challengeId").val(),s=$(".target.selected");c="/challenges/"+c+"/targets?ids=";if(s.length>0){var N=[];s.each(function(b,h){N.push($(h).attr("rel").split("-").pop())});c+=N.join(",");$("#attachmentsOverview").show();$("#targetAttachmentOverviewWrap").show();$("#targetAttachmentOverview").load(c)}Challenge.Publisher.deactivateAttachment("target")},cancel:function(){Challenge.Publisher.deactivateAttachment("target")},reset:function(){$("#targetAttachmentOverview").empty();
$("#targetAttachmentOverviewWrap").hide();$(".target").removeClass("selected");Challenge.Publisher.deactivateAttachment("target");$("#friendSelectedCount").html("")}};
$(function(){$("#itemWrap").find(".publisherAttachmentCancel").click(function(){Challenge.PublisherItem.cancel();return false});$("#itemWrap").find(".publisherAttachmentOkayButton").click(function(){Challenge.PublisherItem.okay();return false});$(".itemIconLink").click(function(){$(".itemIconLink").removeClass("selected");$(this).addClass("selected");return false})});
Challenge.PublisherItem={init:function(){$("#challengeId").val()},okay:function(){var c=$(".itemIconLink.selected");if(c.length>0){var s=c.find(".itemIcon").clone();s.removeClass("itemIcon").attr("id","itemIconSelected");c.attr("title");$("#itemAttachmentOverview").empty().append(s);$("#attachmentsOverview").show();$("#itemAttachmentOverviewWrap").show()}Challenge.Publisher.deactivateAttachment("item")},cancel:function(){Challenge.Publisher.deactivateAttachment("item")},reset:function(){$("#itemAttachmentOverview").empty();
$("#itemAttachmentOverviewWrap").hide();$(".itemIconLink").removeClass("selected");Challenge.Publisher.deactivateAttachment("item")}};
$(function(){$("#mediaWrap").find(".publisherAttachmentCancel").click(function(){Challenge.PublisherMedia.cancel();return false});$("#mediaWrap").find(".publisherAttachmentOkayButton").click(function(){Challenge.PublisherMedia.okay();return false});$("#uploadMediaButton").length>0&&Challenge.PublisherMedia.applyAjaxUpload();$("#mediaReviewClearLink").click(function(){Challenge.PublisherMedia.reset();return false})});
Challenge.PublisherMedia={applyAjaxUpload:function(){new AjaxUpload("uploadMediaButton",{action:"/medias",name:"media[image]",onSubmit:function(c,s){if(!(s&&/^(jpg|png|jpeg|gif)$/i.test(s))){alert("Photos only please.");return false}$("#mediaReviewWrap").show()},onComplete:function(c,s){c=s.split("||");$("#mediaReview").removeClass("loading").html('<img src="'+c[0]+'" />');$("#mediaReviewId").val(c[1])}})},reset:function(){$("#mediaReviewId").val("");$("#mediaReviewWrap").hide();$("#mediaReview").empty().addClass("loading");
$("#mediaAttachmentOverview").empty();$("#mediaAttachmentOverviewWrap").hide();Challenge.Publisher.deactivateAttachment("media")},okay:function(){Challenge.Publisher.deactivateAttachment("media");var c=$("#mediaReviewId").val();if(c!=""){c="/medias/"+c+"/publisher_overview";$("#attachmentsOverview").show();$("#mediaAttachmentOverviewWrap").show();$("#mediaAttachmentOverview").load(c)}},cancel:function(){Challenge.Publisher.deactivateAttachment("media")}};
$(function(){$(".runningProgressDurationInput").focus(function(){$(this).hasClass("unfocused")&&$(this).removeClass("unfocused").val("")})});
Challenge.PublisherProgress={okay:function(){var c=Challenge.PublisherProgress.amount(),s=Challenge.PublisherProgress.duration();if(c>0){$("#progressAmount").html(c);$("#progressDuration").val(s);$("#attachmentsOverview").show();$("#progressAttachmentOverview").show();$("#progressAttachmentOverviewWrap").show()}else Challenge.PublisherProgress.reset();Challenge.Publisher.deactivateAttachment("progress")},amount:function(){var c;if($("#publishProgress").attr("type")=="checkbox")c=$("#publishProgress").is(":checked")?
1:0;else{c=Number($("#publishProgress").val());c=c>0?c:0}return c},duration:function(){var c=Number($("#runningProgressDurationHours").val()),s=Number($("#runningProgressDurationMinutes").val()),N=Number($("#runningProgressDurationSeconds").val()),b=0;if(c>0)b+=c*3600;if(s>0)b+=s*60;if(N>0)b+=N;return b},cancel:function(){Challenge.Publisher.deactivateAttachment("progress")},reset:function(){if($("#publishProgress").attr("type")=="checkbox")$("#publishProgress").attr("checked",false);else{$("#publishProgress").val("");
$(".runningProgressDurationInput").val("")}$("#progressAmount").empty();$("#progressDuration").val("");$("#progressAttachmentOverview").hide();$("#progressAttachmentOverviewWrap").hide();Challenge.Publisher.deactivateAttachment("progress")}};Challenge.Update=function(){};Challenge.Update.remove=function(c){$.post("/events/delete.json",{"event[id]":c},function(){$(".event-"+c).fadeOut(function(){$(this).remove()})},"json");return false};
Challenge.Update.prototype={comment:"",challenge_id:0,fromPublisher:function(){this.comment=$("#publisher").find("#publishComment").val();this.challenge_id=$("#publisher").find("#challengeId").val();var c={"event[comment]":this.comment,"event[challenge_id]":this.challenge_id,"event_action[facebook]":$("#toFacebookCheckbox").is(":checked"),"event_action[twitter]":$("#toTwitterCheckbox").is(":checked"),"event_action[complete]":$("#completeCheckbox").is(":checked"),"event_action[quit]":$("#quitCheckbox").is(":checked")},
s={},N=Challenge.PublisherProgress.amount(),b=Challenge.PublisherProgress.duration();if(N>0){s={"progress[value]":N,"progress[duration]":b};if($("#progressExternalSource").val()!="")s["progress[external_source_id]"]=$("#progressExternalSource").val()}var h={"target[ids]":[]};if($("#targets").length>0){N=$("#targets").val().split(",");$.each(N,function(n,x){Challenge.log("Target:",x);h["target[ids]"].push(x)})}N={};if($("#itemIconSelected").length>0){b=$("#itemIconSelected").attr("rel");N={"event_item[item_id]":b}}b=
{};if($("#mediaReviewId").val()!=""){b=$("#mediaReviewId").val();b={"media[id]":b}}return $.extend({},c,s,h,N,b)}};
$(function(){$("#toFacebookCheckbox").click(function(){$(this).is(":checked")||$.cookie("post_to_facebook",null);Challenge.PublisherSendTo.updateLabel();Challenge.PublisherSendTo.save()});$("#toTwitterCheckbox").click(function(){$(this).is(":checked")||$.cookie("post_to_twitter",null);Challenge.PublisherSendTo.updateLabel();Challenge.PublisherSendTo.save()});$("#publisherShareLink").click(function(){Challenge.PublisherSendTo.toggle();return false})});
Challenge.PublisherSendTo={save:function(){$("#toFacebookCheckbox").is(":checked")?$.cookie("post_to_facebook",1,{expires:30}):$.cookie("post_to_facebook",null);$("#toTwitterCheckbox").is(":checked")?$.cookie("post_to_twitter",1,{expires:30}):$.cookie("post_to_twitter",null)},updateLabel:function(){var c=$("#toTwitterCheckbox").is(":checked"),s=$("#toFacebookCheckbox").is(":checked");if(c&&s)$("#publisherShareLabel").removeClass().empty().addClass("send_to_both");else if(c)$("#publisherShareLabel").removeClass().empty().addClass("send_to_twitter");
else s?$("#publisherShareLabel").removeClass().empty().addClass("send_to_facebook"):$("#publisherShareLabel").removeClass()},toggle:function(){Challenge.log("publisher share link toggling");$("#publisherShareWrap").is(":visible")?this.close():this.open()},open:function(){Challenge.log("publisher share link toggling open");$("#publisherShareWrap").css({height:0}).show().animate({height:61})},close:function(){Challenge.log("publisher share link toggling closed");$("#publisherShareWrap").animate({height:0},
function(){$(this).hide()})}};
$(function(){$("a[rel*=facebox]").facebox();$("abbr.timeago").timeago();$("#nameImageCheckbox").click(function(){$(this).is(":checked")?$("#firstTimeNameImage").hide():$("#firstTimeNameImage").show()});$(".add_friend").live("click",function(){var b=$(this).attr("href").split("/").pop();data={friend_id:b};$.post("/users/friends.json",data,function(h){Challenge.log(h);if(h.success){Challenge.log("removing friend","#friendSuggest"+b);$("#friendSuggest"+b).fadeOut(function(){Challenge.log("Faded out");$(this).remove()})}},
"json");return false});$("#showFBPublisher").length>0&&FB.ensureInit(function(){Challenge.Publisher.showFBPublisher(fbPublisherData);$("#showFBPublisher").remove()});$(".tabs").tabs({select:function(b,h){h.panel&&Challenge.track("Tabs","click",h.panel.id,h.index)}});if($.url.param("tab")){Challenge.current_tab="#"+$.url.param("tab");Challenge.log(Challenge.current_tab);$("a[href="+Challenge.current_tab+"]").click()}if($("#avatar_upload").length>0){var c=$("#userId").val()||"";new AjaxUpload("avatar_upload",
{action:"/users/avatar/"+c,name:"user[avatar]",onComplete:function(b,h){$("#currentAvatar").attr("src",h)}})}$(".inlineChangeAvatar").each(function(){var b=$(this).attr("id").split("-").pop();new AjaxUpload("inline-change-avatar-"+b,{action:"/users/avatar/"+b,name:"user[avatar]",onComplete:function(h,n){$("#inline-avatar-"+b).attr("src",n)}})});$("#notificationsLabel, #notificationsStar").click(function(){var b=$("#notificationsOverlay");b.is(":visible")?b.hide():b.css({top:$("#notifications").position().top}).show();
return false});$(".dismissNotificationLink").click(function(){var b=$(this).attr("rel").split("-").pop(),h="/notifications/"+b+"/dismiss.json";if(b=="")$("#robotWrap").hide("slow");else{$.post(h,{},function(){$("#notification-"+b).fadeOut(function(){$(this).remove();var n=$("#notificationsCount");n.html(parseInt(n.html())-1);n=$(".notificationShortList").find(".notification");if(n.length>0)n.each(function(x,E){x<5?$(E).show():$(E).hide()});else{$("#notificationsStar").removeClass("showNoteStar");
$("#notificationsTab").removeClass("showNoteStar")}})},"json");$(".robot-notification-"+b).fadeOut()}});$(".notificationsCloseLink").click(function(){$("#notificationsOverlay").hide();return false});$(".notificationDismissButton").click(function(){var b=$(this).attr("id").split("-").pop();$.post("/notifications/"+b+"/dismiss.json",{},function(){var h=$("#notification-"+b).fadeOut();h.prependTo($("#readNotifications .notificationList")).fadeIn();h.find(".notificationResponse").remove()},"json")});
$(".followUser").live("click",function(){var b=this,h=$(this).attr("id").split("-").pop();$.post("/users/"+h+"/follow.json",{},function(){$(b).html("Followed!");setTimeout(function(){$(b).hide();$(".unfollowUser").html("Stop Following").show()},2E3)});Challenge.track("Friends","Follow","user",h);return false});$(".unfollowUser").live("click",function(){var b=this,h=$(this).attr("id").split("-").pop();$.post("/users/"+h+"/unfollow.json",{},function(){$(b).html("UnFollowed!");setTimeout(function(){$(b).hide();
$(".followUser").html("Follow").show()},2E3)});Challenge.track("Friends","Unfollow","user",h);return false});$("#showMoreChallengeDescription").click(function(){$("#challengeDescription").toggle();$("#fullChallengeDescription").toggle();return false});$("#challengeImageWrap").mouseenter(function(){$("#challengeImageEdit").show().css({display:"block"})});$("#challengeImageWrap").mouseout(function(){});var s=$("#challengeId").val();$("#editChallengeDescription");if($("#editChallengeTitle").length>0){var N;
$("#editChallengeTitle").live("click",function(){$("#challengeTitle").dblclick();return false});$("#challengeTitle").dblclick(function(){N=$("#editChallengeTitle").remove()}).editable(function(b){$.post("/challenges/"+s+"/update.json",{"challenge[title]":b});return b},{cssclass:"challengeTitleEditor",type:"textarea",cancel:"Cancel",submit:"Save",tooltip:"Double-click to edit this Challenge's Title...",height:"none",width:"none",event:"dblclick",onblur:"ignore",callback:function(){$("#challengeTitle").append(N)},
cancelback:function(){$("#challengeTitle").append(N)}})}$("#challengeImageEdit").length>0&&new AjaxUpload("challengeImageEdit",{action:"/challenges/"+s+"/image",name:"challenge[challenge_image]",onComplete:function(b,h){$("#challengeImage").attr("src",h);$("#challengeImageLink").attr("href",h)}});$("#challengeIntroImageUpload").length>0&&new AjaxUpload("challengeIntroImageUpload",{action:"/challenges/"+s+"/image",name:"challenge[challenge_image]",onComplete:function(b,h){$("#challengeImage").attr("src",
h)}});Challenge.Scroller={context:{},getContext:function(){if($("#challengeId").length>0)this.context={type:"challenge",challenge_id:$("#challengeId").val(),list:$(".activityList:visible"),last_item:$(".activityList:visible").children(".event:last")};return this.context},newContent:function(){if(!this.scrollLock){this.scrollLock=true;var b=Challenge.Scroller.getContext();if(b.type=="challenge"){var h=b.last_item.attr("rel");if(h){h=h.split("-").pop();h="/challenges/"+b.challenge_id+"/events?before="+
h+"&_"+Math.random();b.list.append('<li id="newEventsPlaceholder">Loading...</li>');$.get(h,function(n){var x=$("<div>"+n+"</div>").find(".event").length;$("#newEventsPlaceholder").fadeOut(function(){$(this).remove();if(x>0){b.list.append(n);var E=b.list.find(".event").length;E=b.list.find(".event").slice(E-x);E.find("abbr.timeago").timeago();E.find("a[rel*=facebox]").facebox();Challenge.Scroller.scrollLock=false}else b.list.append('<li id="endOfList">End of activity</li>')})})}}}}};$("#user_sync_facebook_name").click(function(){if($(this).is(":checked")){$("#userName").attr("disabled",
false);$("#userName").val($("#facebook_name").val())}else $("#userName").attr("disabled",false)});$("#countdown").countdown({until:Number($("#countdownEndDate").val()),layout:'<div class="countwrap three"><div class="countdown image{d100}"></div><div class="countdown image{d10}"></div><div class="countdown image{d1}"></div></div><div class="countsep"> : </div><div class="countwrap"><div class="countdown image{h10}"></div><div class="countdown image{h1}"></div></div><div class="countsep"> : </div><div class="countwrap"><div class="countdown image{m10}"></div><div class="countdown image{m1}"></div></div><div class="countsep"> : </div><div class="countwrap"><div class="countdown image{s10}"></div><div class="countdown image{s1}"></div></div>'});
$(".progressTotalFilter").click(function(){var b=$(this).attr("rel");b="/users/"+$("#theirUserId").val()+"/activity?from_challenges="+b;$("#profileTabs").tabs("select",0);$("#activity").find(".section").html("Loading activity...");$.get(b,function(h){$("#activity").find(".section").html(h).find("abbr").timeago()});return false})});
$(function(){$("#challengeTabs").bind("tabsselect",function(c,s){if($(s.tab).attr("href")=="#leaderboardPanel"){c=$("#leaderboardTabs").tabs("option","selected");c=Challenge.Leaderboard.TABS_MAP[c];$("#"+c+"_leaderboard").addClass("loading");Challenge.Leaderboard.newLeaderboard(c)}});$("#leaderboardTabs").bind("tabsselect",function(c,s){c=Challenge.Leaderboard.TABS_MAP[s.index];$("#"+c+"_leaderboard").addClass("loading");Challenge.Leaderboard.newLeaderboard(c)})});
Challenge.Leaderboard=function(c){this.opts=$.extend({},this.defaults,c)};Challenge.Leaderboard.newLeaderboard=function(c){Challenge.Leaderboard.unloadExistingLeaderboards();Challenge.lb=new Challenge.Leaderboard({type:c});Challenge.lb.init();return Challenge.lb};Challenge.Leaderboard.unloadExistingLeaderboards=function(){Challenge.lb=undefined;$.each(Challenge.Leaderboard.TABS_MAP,function(c,s){$("#"+s+"_leaderboard").empty()})};
(function(c){c.STROKE=8;c.STROKE_HL=20;c.STROKE_HL_COLOR="#fceb3f";c.BG_LEFT="#47474e";c.BG_RIGHT="#47474e";c.BG_COLOR="#69696e";c.CV_HEIGHT=60;c.CV_WIDTH=626;c.TABS_MAP=["all","friends","my"];c.HOP_COLORS=["#ffb56a","#ff6a36","#ff0003","#ac0001","#460000"]})(Challenge.Leaderboard);Challenge.Leaderboard.drawLineSegment=function(c,s){s=$.extend({},{color:"#ccc",strokeWidth:1},s);pathCmd="M"+s.x0+","+s.y0;pathCmd+=" L"+s.x1+", "+s.y1;c.path(pathCmd).attr({stroke:s.color,fill:s.color,"stroke-width":s.strokeWidth})};
Challenge.Leaderboard.drawAxis=function(c,s){s=$.extend({},{color:"#ccc"},s);Challenge.Leaderboard.drawLineSegment(c,{x0:s.x,y0:s.y,x1:s.x+s.width,y1:s.y,color:s.color});Challenge.Leaderboard.drawLineSegment(c,{x0:s.x,y0:s.y-3,x1:s.x,y1:s.y+3,color:s.color});Challenge.Leaderboard.drawLineSegment(c,{x0:s.x+s.width-1,y0:s.y-3,x1:s.x+s.width-1,y1:s.y+3,color:s.color})};
Challenge.Leaderboard.drawCircle=function(c,s){opts=$.extend({},{color:"#000",opacity:1},s);return c.circle(opts.x,opts.y,opts.r).attr({fill:opts.color,stroke:opts.color,opacity:opts.opacity})};Challenge.Leaderboard.drawRect=function(c,s){opts=$.extend({},{color:"#000",opacity:1},s);return c.rect(s.x,s.y,s.width,s.height).attr({stroke:opts.color,fill:opts.color,opacity:opts.opacity})};
Challenge.Leaderboard.drawArcSegment=function(c,s){pathCmd="M"+s.x0+","+s.y0;pathCmd+=" Q"+(s.x1+s.x0)/2+","+(s.y0-s.peak*2);pathCmd+=" "+s.x1+","+s.y1;return c.path(pathCmd).attr({stroke:s.color,fill:"none","stroke-width":s.stroke,"stroke-linecap":"round",opacity:s.opacity})};Challenge.Leaderboard.drawImage=function(c,s){return c.image(s.imagePath,s.x,s.y,s.width,s.height)};Challenge.Leaderboard.drawLabel=function(c,s){return c.text(s.x-5,s.y+40,s.name).attr({"font-size":14,"font-family":"Helvetica"})};
Challenge.Leaderboard.prototype={paper:undefined,num_users:0,defaults:{type:"all"},init:function(){var c=this;this.getData(function(){c.drawLeaderboard()})},getData:function(c){var s=this,N="/challenges/"+$("#challengeId").val()+"/leaderboard.json?type="+this.opts.type;$.get(N,function(b){s.data=b;c.apply(s,[b])})},drawLeaderboard:function(){var c=this,s=$("#"+c.opts.type+"_leaderboard");$.each(c.data.sorted,function(N,b){N=b[0];b=c.data.user_hops[N];var h=c.data.user_info[N],n=h.image,x=$('<div id="leaderboardUser-'+
N+'" class="challenger" />').appendTo(s);n=$('<a href="/users/'+N+'" class="challenger-faceplate"><img src="'+n+'" /></a>').appendTo(x);$('<div id="challenger-canvas-'+N+'" class="challenger-canvas" />').appendTo(x);var E='<a href="/users/'+N+'">'+h.name+'</a> - <span class="last-update">';E+=h.lastUpdated==-1?"No progress posted.</span>":'Last Updated: <abbr title="'+h.lastUpdated+'" class="timeago">'+h.lastUpdated+"</abbr></span>";$('<div class="challenger-info" />').appendTo(x).html(E);c.paper=
Raphael("challenger-canvas-"+N,Challenge.Leaderboard.CV_WIDTH,Challenge.Leaderboard.CV_HEIGHT);c.paper.clear();b=c.drawUserWithData({data:b,x:15,y:Challenge.Leaderboard.CV_HEIGHT,width:Challenge.Leaderboard.CV_WIDTH,height:Challenge.Leaderboard.CV_HEIGHT});n.css("left",b);$(n).qtip({content:{url:"/challenges/"+$("#challengeId").val()+"/progress_totals?user_id="+N},position:{target:"mouse",corner:{tooltip:"bottomMiddle",target:"topMiddle"},adjust:{screen:true,mouse:true}},show:{delay:250},style:{name:"dark",
background:"#303030",border:{width:0,radius:8,color:"#303030"},width:250,tip:{corner:"bottomRight"}}})});s.find(".challenger:visible:odd").addClass("odd");s.find("abbr.timeago").timeago();s.removeClass("loading")},colorForEventAt:function(c){if(c<0)c=0;if(c>1)c=1;return"#"+(16711680|Math.floor(255*(1-c))<<8).toString(16)},drawUserWithData:function(c){var s=this,N=c.x-5,b=0,h=c.y-10,n=s.data.sorted[0][1],x=c.width/(s.data.target==-1?n/0.8:s.data.target>n?s.data.target/0.9:n/0.9),E=[];$.each(c.data,
function(u,H){function O(){F.attr({stroke:Challenge.Leaderboard.STROKE_HL_COLOR})}function I(){F.attr({stroke:M})}var V=(c.height-25)*(H.progress/s.data.largest_update);b=N+H.progress*x;var A=Challenge.Leaderboard.HOP_COLORS[u%5],M=$(".challenger").eq(u).css("backgroundColor");Challenge.Leaderboard.drawArcSegment(s.paper,{x0:N,y0:h+1,x1:b,y1:h+1,peak:V,color:"#999",stroke:Challenge.Leaderboard.STROKE});var F=Challenge.Leaderboard.drawArcSegment(s.paper,{x0:N,y0:h,x1:b,y1:h,peak:V,color:M,stroke:Challenge.Leaderboard.STROKE_HL,
opacity:0.3});V=Challenge.Leaderboard.drawArcSegment(s.paper,{x0:N,y0:h,x1:b,y1:h,peak:V,color:A,stroke:Challenge.Leaderboard.STROKE});if(u!=c.data.length-1){u=Challenge.Leaderboard.drawCircle(s.paper,{x:b,y:h,r:9,color:"#ffffff",opacity:0.2});E.push(u)}N=b;$([F.node,V.node]).qtip({content:{url:"/events/tooltip/"+H.event_id},position:{target:"mouse",corner:{tooltip:"bottomMiddle",target:"topMiddle"},adjust:{screen:true,mouse:true}},show:{delay:250},style:{name:"dark",background:"#303030",border:{width:0,
radius:8,color:"#303030"},width:250,tip:{corner:"bottomRight"}}});V.mouseover(O);F.mouseover(O);V.mouseout(I);F.mouseout(I)});$.each(E,function(u,H){H.toFront()});s.data.target>0&&Challenge.Leaderboard.drawImage(s.paper,{imagePath:"/images/goalline.png",name:"Goal",x:s.data.target*x-5,y:0,width:15,height:100}).toBack();return b}};
$(function(){$(".eventRemove").live("click",function(){var c=$(this).attr("rel").split("-").pop();Challenge.Update.remove(c);return false});$(".eventReplyToggle").live("click",function(){var c=$(this).attr("rel").split("-").pop();c=$(".event-"+c).find(".eventCreateReply").toggle();c.is(":visible")&&c.find("textarea").focus();return false});$(".eventReplySubmit").live("click",function(){var c=$(this).attr("rel").split("-"),s=c.pop();c=c.pop();c=$(".reply-input-"+s+"[rel^="+c+"]").val();Challenge.EventRegistry.get_event(s).comment(c);
return false})});Challenge.Event=function(c){this.id=c};Challenge.Event.prototype.comment=function(c){var s=this,N="/events/"+this.id+"/comments";c={"comment[content]":c};if(this.comment_state!="disabled"){this.disableComments();$.post(N,c,function(b){Challenge.Publisher.addComment(s.id,b.view);s.enableComments()},"json")}};Challenge.Event.prototype.disableComments=function(){this.comment_state="disabled";$(".reply-submit-"+this.id).html("...")};
Challenge.Event.prototype.enableComments=function(){this.comment_state="enabled";$(".reply-submit-"+this.id).html("Comment")};Challenge.EventRegistry={events:{},get_event:function(c){var s=this.events[c];if(typeof s!="undefined")return s;s=new Challenge.Event(c);return this.events[c]=s}};
$(function(){if($("#challengeCreate").length>0){Challenge.log("Firing challenge create interactions.");Challenge.TMP=$("#challengeCreate").html();$(".challengeCreateTemplateLink").click(function(){var c=$(this).attr("id").split("-").pop();Challenge.Creator.loadTemplate(c);return false});$(".startingPoint").click(function(){$(this).hasClass("challengeCreateTemplateLink")||$("#challengeCreate").fadeOut("normal");if($(this).hasClass("selected")){$(this).removeClass("selected");$(this).parent().removeClass("selected")}else{$(".challengeCreateTemplateCategory").removeClass("selected");
$(".startingPoint").removeClass("selected");$(this).addClass("selected");$(this).parent().addClass("selected")}return false})}});
Challenge.Creator={init:function(){var c=this;this.setClientTimezone();this.createEndDatepicker();$("#challengeEndDate").focus(function(){c.showEndDatepicker()});$("#challengeEndDateIcon").click(function(){$("#challengeEndDate").focus()});$("#noEndDate").click(function(){c.toggleEndDate()});$("#noGoal").click(function(){c.toggleGoal()});$("#endDateCalendarClose").click(function(){c.hideEndDatepicker()});$("#runningChallengeCheckbox").click(function(){c.toggleRunningChallengeOptions()});$("input[name=running_unit]").live("click",
function(){var s=$(this).val();c.selectRunningUnit(s)});$("#challengeCreateSubmit").click(function(){c.validates()&&$("#new_challenge").submit()})},setClientTimezone:function(){var c=new Date;$("#challengeCreatorTimezone").val(-c.getTimezoneOffset()/60)},createEndDatepicker:function(){$("#endDateCalendar").datepicker({dateFormat:"yy-mm-dd",defaultDate:"+1m",minDate:"+0d",numberOfMonths:1,closeText:"X",showButtonPanel:true,altField:"#challengeEndDate",onSelect:function(c){$("#challengeEndDate").val(c);
$("#endDateCalendarWrap").hide()}})},showEndDatepicker:function(){$("#endDateCalendarWrap").css({left:$("#challengeEndDate").position().left-100,top:$("#challengeEndDate").position().top}).show("normal")},hideEndDatepicker:function(){$("#endDateCalendarWrap").hide("normal")},toggleRunningChallengeOptions:function(){var c=$("#runningChallengeCheckbox").is(":checked");$("#runningChallengeOptions").toggle("normal");$("#trackingFieldWrap").toggle("normal");c&&$("#challengeUnitInput").val("miles")},selectRunningUnit:function(c){$("#challengeUnitInput").val(c)},
toggleEndDate:function(){$("#noEndDate").is(":checked")?$("#challengeEndDate").val("").attr("disabled",true):$("#challengeEndDate").attr("disabled",false);this.hideEndDatepicker()},toggleGoal:function(){$("#noGoal").is(":checked")?$("#challengeTargetInput").val("").attr("disabled",true):$("#challengeTargetInput").attr("disabled",false)},focusInput:function(c){c=$(c);c.hasClass("unfocused")&&c.removeClass("unfocused").val("")},mirrorUnit:function(c){c=$(c);(c.attr("id")=="challengeUnitInput"?$("#challengeUnitMirror"):
$("#challengeUnitInput")).val(c.val())},loadTemplate:function(c){$("#challengeCreate").html("<h3>Loading starting point...</h3>");c=="blank"?$("#challengeCreate").fadeOut("normal",function(){$("#challengeCreate").html(Challenge.TMP).fadeIn();Challenge.Creator.init()}):$.get("/challenges/from_template?template_id="+c,function(s){$("#challengeCreate").fadeOut("normal",function(){$("#challengeCreate").html(s).fadeIn();Challenge.Creator.init()})})},validates:function(){$(".error").hide();var c=$("#challengeTitleInput").val(),
s=$("#challengeTargetInput").val(),N=$("#challengeUnitInput").val(),b=$("#challengeEndDate").val(),h=true;if(c.length<1){$("#titleError").fadeIn();h=false}if(s.length<1&&b.length<1){$("#goalError").fadeIn();h=false}if(s.length>0&&N.length<1){$("#unitError").fadeIn();h=false}return h}};
Challenge.Editor={init:function(){var c=Challenge.Creator;this.createEndDatepicker();$("#challengeEndDate").focus(function(){c.showEndDatepicker()}).change(function(){Challenge.Editor.toggleTrophyOptions()});$("#challengeEndDateIcon").click(function(){$("#challengeEndDate").focus()});$("#noEndDate").click(function(){Challenge.Editor.toggleEndDate()});$("#noGoal").click(function(){Challenge.Editor.toggleGoal()});$("#challengeTargetInput").keyup(function(){Challenge.Editor.toggleGoal()});$("#endDateCalendarClose").click(function(){Challenge.Editor.toggleTrophyOptions();
Challenge.Creator.hideEndDatepicker()});$(".trophyButton").click(function(){Challenge.Editor.selectTrophy(this);Challenge.Editor.toggleTrophyOptions();return false});$(".challengeEditSubmit").click(function(){Challenge.Editor.validates()&&Challenge.Editor.submit()});$("#endNowButton").click(function(){Challenge.Editor.endNow()});this.toggleTrophyOptions()},toggleEndDate:function(){if($("#noEndDate").is(":checked")){$("#challengeEndDate").val("").attr("disabled",true);$("#endNowButton").removeClass("hidden")}else{$("#challengeEndDate").attr("disabled",
false);$("#endNowButton").addClass("hidden")}Challenge.Creator.hideEndDatepicker();Challenge.Editor.toggleTrophyOptions()},toggleGoal:function(){$("#noGoal").is(":checked")?$("#challengeTargetInput").val("").attr("disabled",true):$("#challengeTargetInput").attr("disabled",false);Challenge.Editor.toggleTrophyOptions()},createEndDatepicker:function(){var c=$("#challengeEndDate").val();$("#endDateCalendar").datepicker({dateFormat:"yy-mm-dd",minDate:"+0d",numberOfMonths:1,showButtonPanel:true,altField:"#challengeEndDate",
onSelect:function(s){$("#challengeEndDate").val(s);$("#endDateCalendarWrap").hide();Challenge.Editor.toggleTrophyOptions()}});$("#challengeEndDate").val(c)},selectTrophy:function(c){$(".trophyButton").removeClass("selected");$(c).addClass("selected");$("#challengeTrophyInput").val($(c).attr("id").split("-").pop())},validates:function(){$(".error").hide();var c=$("#challengeTargetInput").val(),s=$("#challengeUnitInput").val(),N=$("#challengeEndDate").val(),b=true;if(c.length<1&&N.length<1){$("#goalError").fadeIn();
b=false}if(c.length>0&&s.length<1){$("#unitError").fadeIn();b=false}return b},toggleTrophyOptions:function(){var c=$("#challengeEndDate").val(),s=$("#challengeTargetInput").val();if($(".trophyButton.selected").length<1){$(".trophyAssignmentRadio").attr("checked",false).attr("disabled",true);$("#trophyOptionsList").find("li").addClass("disabled")}else{if(c.length<1){$("#trophyAllItem").addClass("disabled");$("#trophyAll").attr("disabled",true).attr("checked",false);$("#trophyTopParticipantsItem").addClass("disabled");
$("#trophyTopParticipants").attr("disabled",true).attr("checked",false)}else{$("#trophyAllItem").removeClass("disabled");$("#trophyAll").attr("disabled",false);$("#trophyTopParticipantsItem").removeClass("disabled");$("#trophyTopParticipants").attr("disabled",false)}if(s.length<1){$("#trophyGoalReachedItem").addClass("disabled");$("#trophyGoalReached").attr("disabled",true).attr("checked",false)}else{$("#trophyGoalReachedItem").removeClass("disabled");$("#trophyGoalReached").attr("disabled",false)}$(".trophyAssignmentRadio:checked").length<
1&&$(".trophyAssignmentRadio:enabled:first").attr("checked",true)}},submit:function(){var c=$("#challengeId").val(),s;$("input[name=challenge[trophy_assignment]]").each(function(b,h){if($(h).attr("checked"))s=$(h).val()=="top"?$("#topParticipantsInput").val():$(h).val()});c="/challenges/"+c+"/update.json";var N={"challenge[progress_unit]":$("#challengeUnitInput").val(),"challenge[target]":$("#challengeTargetInput").val(),"trophy[id]":$("#challengeTrophyInput").val(),"challenge[prize]":$("#challengePrizeInput").val(),
"challenge[end_date]":$("#challengeEndDate").val(),"challenge[trophy_assignment]":s};$(".challengeEditSubmit").html("Saving...");$.post(c,N,function(){window.location.reload(true)},"json")},endNow:function(){$("#challengeEndDate").val(-1);this.submit()}};Challenge.Flasher={show:function(c){$("#bd").prepend('<div id="flash" style="display:none;">'+c+"</div>");$("#flash").fadeIn();setTimeout(function(){Challenge.Flasher.remove()},3500)},remove:function(){$("#flash").fadeOut("normal",function(){$("#flash").remove()})}};

