


(function(){this.MooTools={version:"1.4.5",build:"ab8ea8824dc3b24b6666867a2c4ed58ebb762cf0"};var o=this.typeOf=function(i){if(i==null){return"null";}if(i.$family!=null){return i.$family();
}if(i.nodeName){if(i.nodeType==1){return"element";}if(i.nodeType==3){return(/\S/).test(i.nodeValue)?"textnode":"whitespace";}}else{if(typeof i.length=="number"){if(i.callee){return"arguments";
}if("item" in i){return"collection";}}}return typeof i;};var j=this.instanceOf=function(t,i){if(t==null){return false;}var s=t.$constructor||t.constructor;
while(s){if(s===i){return true;}s=s.parent;}if(!t.hasOwnProperty){return false;}return t instanceof i;};var f=this.Function;var p=true;for(var k in {toString:1}){p=null;
}if(p){p=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];}f.prototype.overloadSetter=function(s){var i=this;
return function(u,t){if(u==null){return this;}if(s||typeof u!="string"){for(var v in u){i.call(this,v,u[v]);}if(p){for(var w=p.length;w--;){v=p[w];if(u.hasOwnProperty(v)){i.call(this,v,u[v]);
}}}}else{i.call(this,u,t);}return this;};};f.prototype.overloadGetter=function(s){var i=this;return function(u){var v,t;if(typeof u!="string"){v=u;}else{if(arguments.length>1){v=arguments;
}else{if(s){v=[u];}}}if(v){t={};for(var w=0;w<v.length;w++){t[v[w]]=i.call(this,v[w]);}}else{t=i.call(this,u);}return t;};};f.prototype.extend=function(i,s){this[i]=s;
}.overloadSetter();f.prototype.implement=function(i,s){this.prototype[i]=s;}.overloadSetter();var n=Array.prototype.slice;f.from=function(i){return(o(i)=="function")?i:function(){return i;
};};Array.from=function(i){if(i==null){return[];}return(a.isEnumerable(i)&&typeof i!="string")?(o(i)=="array")?i:n.call(i):[i];};Number.from=function(s){var i=parseFloat(s);
return isFinite(i)?i:null;};String.from=function(i){return i+"";};f.implement({hide:function(){this.$hidden=true;return this;},protect:function(){this.$protected=true;
return this;}});var a=this.Type=function(u,t){if(u){var s=u.toLowerCase();var i=function(v){return(o(v)==s);};a["is"+u]=i;if(t!=null){t.prototype.$family=(function(){return s;
}).hide();}}if(t==null){return null;}t.extend(this);t.$constructor=a;t.prototype.$constructor=t;return t;};var e=Object.prototype.toString;a.isEnumerable=function(i){return(i!=null&&typeof i.length=="number"&&e.call(i)!="[object Function]");
};var q={};var r=function(i){var s=o(i.prototype);return q[s]||(q[s]=[]);};var b=function(t,x){if(x&&x.$hidden){return;}var s=r(this);for(var u=0;u<s.length;
u++){var w=s[u];if(o(w)=="type"){b.call(w,t,x);}else{w.call(this,t,x);}}var v=this.prototype[t];if(v==null||!v.$protected){this.prototype[t]=x;}if(this[t]==null&&o(x)=="function"){m.call(this,t,function(i){return x.apply(i,n.call(arguments,1));
});}};var m=function(i,t){if(t&&t.$hidden){return;}var s=this[i];if(s==null||!s.$protected){this[i]=t;}};a.implement({implement:b.overloadSetter(),extend:m.overloadSetter(),alias:function(i,s){b.call(this,i,this.prototype[s]);
}.overloadSetter(),mirror:function(i){r(this).push(i);return this;}});new a("Type",a);var d=function(s,x,v){var u=(x!=Object),B=x.prototype;if(u){x=new a(s,x);
}for(var y=0,w=v.length;y<w;y++){var C=v[y],A=x[C],z=B[C];if(A){A.protect();}if(u&&z){x.implement(C,z.protect());}}if(u){var t=B.propertyIsEnumerable(v[0]);
x.forEachMethod=function(G){if(!t){for(var F=0,D=v.length;F<D;F++){G.call(B,B[v[F]],v[F]);}}for(var E in B){G.call(B,B[E],E);}};}return d;};d("String",String,["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","quote","replace","search","slice","split","substr","substring","trim","toLowerCase","toUpperCase"])("Array",Array,["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice","indexOf","lastIndexOf","filter","forEach","every","map","some","reduce","reduceRight"])("Number",Number,["toExponential","toFixed","toLocaleString","toPrecision"])("Function",f,["apply","call","bind"])("RegExp",RegExp,["exec","test"])("Object",Object,["create","defineProperty","defineProperties","keys","getPrototypeOf","getOwnPropertyDescriptor","getOwnPropertyNames","preventExtensions","isExtensible","seal","isSealed","freeze","isFrozen"])("Date",Date,["now"]);
Object.extend=m.overloadSetter();Date.extend("now",function(){return +(new Date);});new a("Boolean",Boolean);Number.prototype.$family=function(){return isFinite(this)?"number":"null";
}.hide();Number.extend("random",function(s,i){return Math.floor(Math.random()*(i-s+1)+s);});var g=Object.prototype.hasOwnProperty;Object.extend("forEach",function(i,t,u){for(var s in i){if(g.call(i,s)){t.call(u,i[s],s,i);
}}});Object.each=Object.forEach;Array.implement({forEach:function(u,v){for(var t=0,s=this.length;t<s;t++){if(t in this){u.call(v,this[t],t,this);}}},each:function(i,s){Array.forEach(this,i,s);
return this;}});var l=function(i){switch(o(i)){case"array":return i.clone();case"object":return Object.clone(i);default:return i;}};Array.implement("clone",function(){var s=this.length,t=new Array(s);
while(s--){t[s]=l(this[s]);}return t;});var h=function(s,i,t){switch(o(t)){case"object":if(o(s[i])=="object"){Object.merge(s[i],t);}else{s[i]=Object.clone(t);
}break;case"array":s[i]=t.clone();break;default:s[i]=t;}return s;};Object.extend({merge:function(z,u,t){if(o(u)=="string"){return h(z,u,t);}for(var y=1,s=arguments.length;
y<s;y++){var w=arguments[y];for(var x in w){h(z,x,w[x]);}}return z;},clone:function(i){var t={};for(var s in i){t[s]=l(i[s]);}return t;},append:function(w){for(var v=1,t=arguments.length;
v<t;v++){var s=arguments[v]||{};for(var u in s){w[u]=s[u];}}return w;}});["Object","WhiteSpace","TextNode","Collection","Arguments"].each(function(i){new a(i);
});var c=Date.now();String.extend("uniqueID",function(){return(c++).toString(36);});})();Array.implement({every:function(c,d){for(var b=0,a=this.length>>>0;
b<a;b++){if((b in this)&&!c.call(d,this[b],b,this)){return false;}}return true;},filter:function(d,f){var c=[];for(var e,b=0,a=this.length>>>0;b<a;b++){if(b in this){e=this[b];
if(d.call(f,e,b,this)){c.push(e);}}}return c;},indexOf:function(c,d){var b=this.length>>>0;for(var a=(d<0)?Math.max(0,b+d):d||0;a<b;a++){if(this[a]===c){return a;
}}return -1;},map:function(c,e){var d=this.length>>>0,b=Array(d);for(var a=0;a<d;a++){if(a in this){b[a]=c.call(e,this[a],a,this);}}return b;},some:function(c,d){for(var b=0,a=this.length>>>0;
b<a;b++){if((b in this)&&c.call(d,this[b],b,this)){return true;}}return false;},clean:function(){return this.filter(function(a){return a!=null;});},invoke:function(a){var b=Array.slice(arguments,1);
return this.map(function(c){return c[a].apply(c,b);});},associate:function(c){var d={},b=Math.min(this.length,c.length);for(var a=0;a<b;a++){d[c[a]]=this[a];
}return d;},link:function(c){var a={};for(var e=0,b=this.length;e<b;e++){for(var d in c){if(c[d](this[e])){a[d]=this[e];delete c[d];break;}}}return a;},contains:function(a,b){return this.indexOf(a,b)!=-1;
},append:function(a){this.push.apply(this,a);return this;},getLast:function(){return(this.length)?this[this.length-1]:null;},getRandom:function(){return(this.length)?this[Number.random(0,this.length-1)]:null;
},include:function(a){if(!this.contains(a)){this.push(a);}return this;},combine:function(c){for(var b=0,a=c.length;b<a;b++){this.include(c[b]);}return this;
},erase:function(b){for(var a=this.length;a--;){if(this[a]===b){this.splice(a,1);}}return this;},empty:function(){this.length=0;return this;},flatten:function(){var d=[];
for(var b=0,a=this.length;b<a;b++){var c=typeOf(this[b]);if(c=="null"){continue;}d=d.concat((c=="array"||c=="collection"||c=="arguments"||instanceOf(this[b],Array))?Array.flatten(this[b]):this[b]);
}return d;},pick:function(){for(var b=0,a=this.length;b<a;b++){if(this[b]!=null){return this[b];}}return null;},hexToRgb:function(b){if(this.length!=3){return null;
}var a=this.map(function(c){if(c.length==1){c+=c;}return c.toInt(16);});return(b)?a:"rgb("+a+")";},rgbToHex:function(d){if(this.length<3){return null;}if(this.length==4&&this[3]==0&&!d){return"transparent";
}var b=[];for(var a=0;a<3;a++){var c=(this[a]-0).toString(16);b.push((c.length==1)?"0"+c:c);}return(d)?b:"#"+b.join("");}});String.implement({test:function(a,b){return((typeOf(a)=="regexp")?a:new RegExp(""+a,b)).test(this);
},contains:function(a,b){return(b)?(b+this+b).indexOf(b+a+b)>-1:String(this).indexOf(a)>-1;},trim:function(){return String(this).replace(/^\s+|\s+$/g,"");
},clean:function(){return String(this).replace(/\s+/g," ").trim();},camelCase:function(){return String(this).replace(/-\D/g,function(a){return a.charAt(1).toUpperCase();
});},hyphenate:function(){return String(this).replace(/[A-Z]/g,function(a){return("-"+a.charAt(0).toLowerCase());});},capitalize:function(){return String(this).replace(/\b[a-z]/g,function(a){return a.toUpperCase();
});},escapeRegExp:function(){return String(this).replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1");},toInt:function(a){return parseInt(this,a||10);},toFloat:function(){return parseFloat(this);
},hexToRgb:function(b){var a=String(this).match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(a)?a.slice(1).hexToRgb(b):null;},rgbToHex:function(b){var a=String(this).match(/\d{1,3}/g);
return(a)?a.rgbToHex(b):null;},substitute:function(a,b){return String(this).replace(b||(/\\?\{([^{}]+)\}/g),function(d,c){if(d.charAt(0)=="\\"){return d.slice(1);
}return(a[c]!=null)?a[c]:"";});}});Number.implement({limit:function(b,a){return Math.min(a,Math.max(b,this));},round:function(a){a=Math.pow(10,a||0).toFixed(a<0?-a:0);
return Math.round(this*a)/a;},times:function(b,c){for(var a=0;a<this;a++){b.call(c,a,this);}},toFloat:function(){return parseFloat(this);},toInt:function(a){return parseInt(this,a||10);
}});Number.alias("each","times");(function(b){var a={};b.each(function(c){if(!Number[c]){a[c]=function(){return Math[c].apply(null,[this].concat(Array.from(arguments)));
};}});Number.implement(a);})(["abs","acos","asin","atan","atan2","ceil","cos","exp","floor","log","max","min","pow","sin","sqrt","tan"]);Function.extend({attempt:function(){for(var b=0,a=arguments.length;
b<a;b++){try{return arguments[b]();}catch(c){}}return null;}});Function.implement({attempt:function(a,c){try{return this.apply(c,Array.from(a));}catch(b){}return null;
},bind:function(e){var a=this,b=arguments.length>1?Array.slice(arguments,1):null,d=function(){};var c=function(){var g=e,h=arguments.length;if(this instanceof c){d.prototype=a.prototype;
g=new d;}var f=(!b&&!h)?a.call(g):a.apply(g,b&&h?b.concat(Array.slice(arguments)):b||arguments);return g==e?f:g;};return c;},pass:function(b,c){var a=this;
if(b!=null){b=Array.from(b);}return function(){return a.apply(c,b||arguments);};},delay:function(b,c,a){return setTimeout(this.pass((a==null?[]:a),c),b);
},periodical:function(c,b,a){return setInterval(this.pass((a==null?[]:a),b),c);}});(function(){var a=Object.prototype.hasOwnProperty;Object.extend({subset:function(d,g){var f={};
for(var e=0,b=g.length;e<b;e++){var c=g[e];if(c in d){f[c]=d[c];}}return f;},map:function(b,e,f){var d={};for(var c in b){if(a.call(b,c)){d[c]=e.call(f,b[c],c,b);
}}return d;},filter:function(b,e,g){var d={};for(var c in b){var f=b[c];if(a.call(b,c)&&e.call(g,f,c,b)){d[c]=f;}}return d;},every:function(b,d,e){for(var c in b){if(a.call(b,c)&&!d.call(e,b[c],c)){return false;
}}return true;},some:function(b,d,e){for(var c in b){if(a.call(b,c)&&d.call(e,b[c],c)){return true;}}return false;},keys:function(b){var d=[];for(var c in b){if(a.call(b,c)){d.push(c);
}}return d;},values:function(c){var b=[];for(var d in c){if(a.call(c,d)){b.push(c[d]);}}return b;},getLength:function(b){return Object.keys(b).length;},keyOf:function(b,d){for(var c in b){if(a.call(b,c)&&b[c]===d){return c;
}}return null;},contains:function(b,c){return Object.keyOf(b,c)!=null;},toQueryString:function(b,c){var d=[];Object.each(b,function(h,g){if(c){g=c+"["+g+"]";
}var f;switch(typeOf(h)){case"object":f=Object.toQueryString(h,g);break;case"array":var e={};h.each(function(k,j){e[j]=k;});f=Object.toQueryString(e,g);
break;default:f=g+"="+encodeURIComponent(h);}if(h!=null){d.push(f);}});return d.join("&");}});})();(function(){var j=this.document;var g=j.window=this;
var a=navigator.userAgent.toLowerCase(),b=navigator.platform.toLowerCase(),h=a.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/)||[null,"unknown",0],d=h[1]=="ie"&&j.documentMode;
var n=this.Browser={extend:Function.prototype.extend,name:(h[1]=="version")?h[3]:h[1],version:d||parseFloat((h[1]=="opera"&&h[4])?h[4]:h[2]),Platform:{name:a.match(/ip(?:ad|od|hone)/)?"ios":(a.match(/(?:webos|android)/)||b.match(/mac|win|linux/)||["other"])[0]},Features:{xpath:!!(j.evaluate),air:!!(g.runtime),query:!!(j.querySelector),json:!!(g.JSON)},Plugins:{}};
n[n.name]=true;n[n.name+parseInt(n.version,10)]=true;n.Platform[n.Platform.name]=true;n.Request=(function(){var p=function(){return new XMLHttpRequest();
};var o=function(){return new ActiveXObject("MSXML2.XMLHTTP");};var e=function(){return new ActiveXObject("Microsoft.XMLHTTP");};return Function.attempt(function(){p();
return p;},function(){o();return o;},function(){e();return e;});})();n.Features.xhr=!!(n.Request);var i=(Function.attempt(function(){return navigator.plugins["Shockwave Flash"].description;
},function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version");})||"0 r0").match(/\d+/g);n.Plugins.Flash={version:Number(i[0]||"0."+i[1])||0,build:Number(i[2])||0};
n.exec=function(o){if(!o){return o;}if(g.execScript){g.execScript(o);}else{var e=j.createElement("script");e.setAttribute("type","text/javascript");e.text=o;
j.head.appendChild(e);j.head.removeChild(e);}return o;};String.implement("stripScripts",function(o){var e="";var p=this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi,function(q,r){e+=r+"\n";
return"";});if(o===true){n.exec(e);}else{if(typeOf(o)=="function"){o(e,p);}}return p;});n.extend({Document:this.Document,Window:this.Window,Element:this.Element,Event:this.Event});
this.Window=this.$constructor=new Type("Window",function(){});this.$family=Function.from("window").hide();Window.mirror(function(e,o){g[e]=o;});this.Document=j.$constructor=new Type("Document",function(){});
j.$family=Function.from("document").hide();Document.mirror(function(e,o){j[e]=o;});j.html=j.documentElement;if(!j.head){j.head=j.getElementsByTagName("head")[0];
}if(j.execCommand){try{j.execCommand("BackgroundImageCache",false,true);}catch(f){}}if(this.attachEvent&&!this.addEventListener){var c=function(){this.detachEvent("onunload",c);
j.head=j.html=j.window=null;};this.attachEvent("onunload",c);}var l=Array.from;try{l(j.html.childNodes);}catch(f){Array.from=function(o){if(typeof o!="string"&&Type.isEnumerable(o)&&typeOf(o)!="array"){var e=o.length,p=new Array(e);
while(e--){p[e]=o[e];}return p;}return l(o);};var k=Array.prototype,m=k.slice;["pop","push","reverse","shift","sort","splice","unshift","concat","join","slice"].each(function(e){var o=k[e];
Array[e]=function(p){return o.apply(Array.from(p),m.call(arguments,1));};});}})();(function(){var b={};var a=this.DOMEvent=new Type("DOMEvent",function(c,g){if(!g){g=window;
}c=c||g.event;if(c.$extended){return c;}this.event=c;this.$extended=true;this.shift=c.shiftKey;this.control=c.ctrlKey;this.alt=c.altKey;this.meta=c.metaKey;
var i=this.type=c.type;var h=c.target||c.srcElement;while(h&&h.nodeType==3){h=h.parentNode;}this.target=document.id(h);if(i.indexOf("key")==0){var d=this.code=(c.which||c.keyCode);
this.key=b[d];if(i=="keydown"){if(d>111&&d<124){this.key="f"+(d-111);}else{if(d>95&&d<106){this.key=d-96;}}}if(this.key==null){this.key=String.fromCharCode(d).toLowerCase();
}}else{if(i=="click"||i=="dblclick"||i=="contextmenu"||i=="DOMMouseScroll"||i.indexOf("mouse")==0){var j=g.document;j=(!j.compatMode||j.compatMode=="CSS1Compat")?j.html:j.body;
this.page={x:(c.pageX!=null)?c.pageX:c.clientX+j.scrollLeft,y:(c.pageY!=null)?c.pageY:c.clientY+j.scrollTop};this.client={x:(c.pageX!=null)?c.pageX-g.pageXOffset:c.clientX,y:(c.pageY!=null)?c.pageY-g.pageYOffset:c.clientY};
if(i=="DOMMouseScroll"||i=="mousewheel"){this.wheel=(c.wheelDelta)?c.wheelDelta/120:-(c.detail||0)/3;}this.rightClick=(c.which==3||c.button==2);if(i=="mouseover"||i=="mouseout"){var k=c.relatedTarget||c[(i=="mouseover"?"from":"to")+"Element"];
while(k&&k.nodeType==3){k=k.parentNode;}this.relatedTarget=document.id(k);}}else{if(i.indexOf("touch")==0||i.indexOf("gesture")==0){this.rotation=c.rotation;
this.scale=c.scale;this.targetTouches=c.targetTouches;this.changedTouches=c.changedTouches;var f=this.touches=c.touches;if(f&&f[0]){var e=f[0];this.page={x:e.pageX,y:e.pageY};
this.client={x:e.clientX,y:e.clientY};}}}}if(!this.client){this.client={};}if(!this.page){this.page={};}});a.implement({stop:function(){return this.preventDefault().stopPropagation();
},stopPropagation:function(){if(this.event.stopPropagation){this.event.stopPropagation();}else{this.event.cancelBubble=true;}return this;},preventDefault:function(){if(this.event.preventDefault){this.event.preventDefault();
}else{this.event.returnValue=false;}return this;}});a.defineKey=function(d,c){b[d]=c;return this;};a.defineKeys=a.defineKey.overloadSetter(true);a.defineKeys({"38":"up","40":"down","37":"left","39":"right","27":"esc","32":"space","8":"backspace","9":"tab","46":"delete","13":"enter"});
})();(function(){var a=this.Class=new Type("Class",function(h){if(instanceOf(h,Function)){h={initialize:h};}var g=function(){e(this);if(g.$prototyping){return this;
}this.$caller=null;var i=(this.initialize)?this.initialize.apply(this,arguments):this;this.$caller=this.caller=null;return i;}.extend(this).implement(h);
g.$constructor=a;g.prototype.$constructor=g;g.prototype.parent=c;return g;});var c=function(){if(!this.$caller){throw new Error('The method "parent" cannot be called.');
}var g=this.$caller.$name,h=this.$caller.$owner.parent,i=(h)?h.prototype[g]:null;if(!i){throw new Error('The method "'+g+'" has no parent.');}return i.apply(this,arguments);
};var e=function(g){for(var h in g){var j=g[h];switch(typeOf(j)){case"object":var i=function(){};i.prototype=j;g[h]=e(new i);break;case"array":g[h]=j.clone();
break;}}return g;};var b=function(g,h,j){if(j.$origin){j=j.$origin;}var i=function(){if(j.$protected&&this.$caller==null){throw new Error('The method "'+h+'" cannot be called.');
}var l=this.caller,m=this.$caller;this.caller=m;this.$caller=i;var k=j.apply(this,arguments);this.$caller=m;this.caller=l;return k;}.extend({$owner:g,$origin:j,$name:h});
return i;};var f=function(h,i,g){if(a.Mutators.hasOwnProperty(h)){i=a.Mutators[h].call(this,i);if(i==null){return this;}}if(typeOf(i)=="function"){if(i.$hidden){return this;
}this.prototype[h]=(g)?i:b(this,h,i);}else{Object.merge(this.prototype,h,i);}return this;};var d=function(g){g.$prototyping=true;var h=new g;delete g.$prototyping;
return h;};a.implement("implement",f.overloadSetter());a.Mutators={Extends:function(g){this.parent=g;this.prototype=d(g);},Implements:function(g){Array.from(g).each(function(j){var h=new j;
for(var i in h){f.call(this,i,h[i],true);}},this);}};})();(function(){this.Chain=new Class({$chain:[],chain:function(){this.$chain.append(Array.flatten(arguments));
return this;},callChain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false;},clearChain:function(){this.$chain.empty();
return this;}});var a=function(b){return b.replace(/^on([A-Z])/,function(c,d){return d.toLowerCase();});};this.Events=new Class({$events:{},addEvent:function(d,c,b){d=a(d);
this.$events[d]=(this.$events[d]||[]).include(c);if(b){c.internal=true;}return this;},addEvents:function(b){for(var c in b){this.addEvent(c,b[c]);}return this;
},fireEvent:function(e,c,b){e=a(e);var d=this.$events[e];if(!d){return this;}c=Array.from(c);d.each(function(f){if(b){f.delay(b,this,c);}else{f.apply(this,c);
}},this);return this;},removeEvent:function(e,d){e=a(e);var c=this.$events[e];if(c&&!d.internal){var b=c.indexOf(d);if(b!=-1){delete c[b];}}return this;
},removeEvents:function(d){var e;if(typeOf(d)=="object"){for(e in d){this.removeEvent(e,d[e]);}return this;}if(d){d=a(d);}for(e in this.$events){if(d&&d!=e){continue;
}var c=this.$events[e];for(var b=c.length;b--;){if(b in c){this.removeEvent(e,c[b]);}}}return this;}});this.Options=new Class({setOptions:function(){var b=this.options=Object.merge.apply(null,[{},this.options].append(arguments));
if(this.addEvent){for(var c in b){if(typeOf(b[c])!="function"||!(/^on[A-Z]/).test(c)){continue;}this.addEvent(c,b[c]);delete b[c];}}return this;}});})();
(function(){var k,n,l,g,a={},c={},m=/\\/g;var e=function(q,p){if(q==null){return null;}if(q.Slick===true){return q;}q=(""+q).replace(/^\s+|\s+$/g,"");g=!!p;
var o=(g)?c:a;if(o[q]){return o[q];}k={Slick:true,expressions:[],raw:q,reverse:function(){return e(this.raw,true);}};n=-1;while(q!=(q=q.replace(j,b))){}k.length=k.expressions.length;
return o[k.raw]=(g)?h(k):k;};var i=function(o){if(o==="!"){return" ";}else{if(o===" "){return"!";}else{if((/^!/).test(o)){return o.replace(/^!/,"");}else{return"!"+o;
}}}};var h=function(u){var r=u.expressions;for(var p=0;p<r.length;p++){var t=r[p];var q={parts:[],tag:"*",combinator:i(t[0].combinator)};for(var o=0;o<t.length;
o++){var s=t[o];if(!s.reverseCombinator){s.reverseCombinator=" ";}s.combinator=s.reverseCombinator;delete s.reverseCombinator;}t.reverse().push(q);}return u;
};var f=function(o){return o.replace(/[-[\]{}()*+?.\\^$|,#\s]/g,function(p){return"\\"+p;});};var j=new RegExp("^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(/<combinator>/,"["+f(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])"));
function b(x,s,D,z,r,C,q,B,A,y,u,F,G,v,p,w){if(s||n===-1){k.expressions[++n]=[];l=-1;if(s){return"";}}if(D||z||l===-1){D=D||" ";var t=k.expressions[n];
if(g&&t[l]){t[l].reverseCombinator=i(D);}t[++l]={combinator:D,tag:"*"};}var o=k.expressions[n][l];if(r){o.tag=r.replace(m,"");}else{if(C){o.id=C.replace(m,"");
}else{if(q){q=q.replace(m,"");if(!o.classList){o.classList=[];}if(!o.classes){o.classes=[];}o.classList.push(q);o.classes.push({value:q,regexp:new RegExp("(^|\\s)"+f(q)+"(\\s|$)")});
}else{if(G){w=w||p;w=w?w.replace(m,""):null;if(!o.pseudos){o.pseudos=[];}o.pseudos.push({key:G.replace(m,""),value:w,type:F.length==1?"class":"element"});
}else{if(B){B=B.replace(m,"");u=(u||"").replace(m,"");var E,H;switch(A){case"^=":H=new RegExp("^"+f(u));break;case"$=":H=new RegExp(f(u)+"$");break;case"~=":H=new RegExp("(^|\\s)"+f(u)+"(\\s|$)");
break;case"|=":H=new RegExp("^"+f(u)+"(-|$)");break;case"=":E=function(I){return u==I;};break;case"*=":E=function(I){return I&&I.indexOf(u)>-1;};break;
case"!=":E=function(I){return u!=I;};break;default:E=function(I){return !!I;};}if(u==""&&(/^[*$^]=$/).test(A)){E=function(){return false;};}if(!E){E=function(I){return I&&H.test(I);
};}if(!o.attributes){o.attributes=[];}o.attributes.push({key:B,operator:A,value:u,test:E});}}}}}return"";}var d=(this.Slick||{});d.parse=function(o){return e(o);
};d.escapeRegExp=f;if(!this.Slick){this.Slick=d;}}).apply((typeof exports!="undefined")?exports:this);(function(){var k={},m={},d=Object.prototype.toString;
k.isNativeCode=function(c){return(/\{\s*\[native code\]\s*\}/).test(""+c);};k.isXML=function(c){return(!!c.xmlVersion)||(!!c.xml)||(d.call(c)=="[object XMLDocument]")||(c.nodeType==9&&c.documentElement.nodeName!="HTML");
};k.setDocument=function(w){var p=w.nodeType;if(p==9){}else{if(p){w=w.ownerDocument;}else{if(w.navigator){w=w.document;}else{return;}}}if(this.document===w){return;
}this.document=w;var A=w.documentElement,o=this.getUIDXML(A),s=m[o],r;if(s){for(r in s){this[r]=s[r];}return;}s=m[o]={};s.root=A;s.isXMLDocument=this.isXML(w);
s.brokenStarGEBTN=s.starSelectsClosedQSA=s.idGetsName=s.brokenMixedCaseQSA=s.brokenGEBCN=s.brokenCheckedQSA=s.brokenEmptyAttributeQSA=s.isHTMLDocument=s.nativeMatchesSelector=false;
var q,u,y,z,t;var x,v="slick_uniqueid";var c=w.createElement("div");var n=w.body||w.getElementsByTagName("body")[0]||A;n.appendChild(c);try{c.innerHTML='<a id="'+v+'"></a>';
s.isHTMLDocument=!!w.getElementById(v);}catch(C){}if(s.isHTMLDocument){c.style.display="none";c.appendChild(w.createComment(""));u=(c.getElementsByTagName("*").length>1);
try{c.innerHTML="foo</foo>";x=c.getElementsByTagName("*");q=(x&&!!x.length&&x[0].nodeName.charAt(0)=="/");}catch(C){}s.brokenStarGEBTN=u||q;try{c.innerHTML='<a name="'+v+'"></a><b id="'+v+'"></b>';
s.idGetsName=w.getElementById(v)===c.firstChild;}catch(C){}if(c.getElementsByClassName){try{c.innerHTML='<a class="f"></a><a class="b"></a>';c.getElementsByClassName("b").length;
c.firstChild.className="b";z=(c.getElementsByClassName("b").length!=2);}catch(C){}try{c.innerHTML='<a class="a"></a><a class="f b a"></a>';y=(c.getElementsByClassName("a").length!=2);
}catch(C){}s.brokenGEBCN=z||y;}if(c.querySelectorAll){try{c.innerHTML="foo</foo>";x=c.querySelectorAll("*");s.starSelectsClosedQSA=(x&&!!x.length&&x[0].nodeName.charAt(0)=="/");
}catch(C){}try{c.innerHTML='<a class="MiX"></a>';s.brokenMixedCaseQSA=!c.querySelectorAll(".MiX").length;}catch(C){}try{c.innerHTML='<select><option selected="selected">a</option></select>';
s.brokenCheckedQSA=(c.querySelectorAll(":checked").length==0);}catch(C){}try{c.innerHTML='<a class=""></a>';s.brokenEmptyAttributeQSA=(c.querySelectorAll('[class*=""]').length!=0);
}catch(C){}}try{c.innerHTML='<form action="s"><input id="action"/></form>';t=(c.firstChild.getAttribute("action")!="s");}catch(C){}s.nativeMatchesSelector=A.matchesSelector||A.mozMatchesSelector||A.webkitMatchesSelector;
if(s.nativeMatchesSelector){try{s.nativeMatchesSelector.call(A,":slick");s.nativeMatchesSelector=null;}catch(C){}}}try{A.slick_expando=1;delete A.slick_expando;
s.getUID=this.getUIDHTML;}catch(C){s.getUID=this.getUIDXML;}n.removeChild(c);c=x=n=null;s.getAttribute=(s.isHTMLDocument&&t)?function(G,E){var H=this.attributeGetters[E];
if(H){return H.call(G);}var F=G.getAttributeNode(E);return(F)?F.nodeValue:null;}:function(F,E){var G=this.attributeGetters[E];return(G)?G.call(F):F.getAttribute(E);
};s.hasAttribute=(A&&this.isNativeCode(A.hasAttribute))?function(F,E){return F.hasAttribute(E);}:function(F,E){F=F.getAttributeNode(E);return !!(F&&(F.specified||F.nodeValue));
};var D=A&&this.isNativeCode(A.contains),B=w&&this.isNativeCode(w.contains);s.contains=(D&&B)?function(E,F){return E.contains(F);}:(D&&!B)?function(E,F){return E===F||((E===w)?w.documentElement:E).contains(F);
}:(A&&A.compareDocumentPosition)?function(E,F){return E===F||!!(E.compareDocumentPosition(F)&16);}:function(E,F){if(F){do{if(F===E){return true;}}while((F=F.parentNode));
}return false;};s.documentSorter=(A.compareDocumentPosition)?function(F,E){if(!F.compareDocumentPosition||!E.compareDocumentPosition){return 0;}return F.compareDocumentPosition(E)&4?-1:F===E?0:1;
}:("sourceIndex" in A)?function(F,E){if(!F.sourceIndex||!E.sourceIndex){return 0;}return F.sourceIndex-E.sourceIndex;}:(w.createRange)?function(H,F){if(!H.ownerDocument||!F.ownerDocument){return 0;
}var G=H.ownerDocument.createRange(),E=F.ownerDocument.createRange();G.setStart(H,0);G.setEnd(H,0);E.setStart(F,0);E.setEnd(F,0);return G.compareBoundaryPoints(Range.START_TO_END,E);
}:null;A=null;for(r in s){this[r]=s[r];}};var f=/^([#.]?)((?:[\w-]+|\*))$/,h=/\[.+[*$^]=(?:""|'')?\]/,g={};k.search=function(U,z,H,s){var p=this.found=(s)?null:(H||[]);
if(!U){return p;}else{if(U.navigator){U=U.document;}else{if(!U.nodeType){return p;}}}var F,O,V=this.uniques={},I=!!(H&&H.length),y=(U.nodeType==9);if(this.document!==(y?U:U.ownerDocument)){this.setDocument(U);
}if(I){for(O=p.length;O--;){V[this.getUID(p[O])]=true;}}if(typeof z=="string"){var r=z.match(f);simpleSelectors:if(r){var u=r[1],v=r[2],A,E;if(!u){if(v=="*"&&this.brokenStarGEBTN){break simpleSelectors;
}E=U.getElementsByTagName(v);if(s){return E[0]||null;}for(O=0;A=E[O++];){if(!(I&&V[this.getUID(A)])){p.push(A);}}}else{if(u=="#"){if(!this.isHTMLDocument||!y){break simpleSelectors;
}A=U.getElementById(v);if(!A){return p;}if(this.idGetsName&&A.getAttributeNode("id").nodeValue!=v){break simpleSelectors;}if(s){return A||null;}if(!(I&&V[this.getUID(A)])){p.push(A);
}}else{if(u=="."){if(!this.isHTMLDocument||((!U.getElementsByClassName||this.brokenGEBCN)&&U.querySelectorAll)){break simpleSelectors;}if(U.getElementsByClassName&&!this.brokenGEBCN){E=U.getElementsByClassName(v);
if(s){return E[0]||null;}for(O=0;A=E[O++];){if(!(I&&V[this.getUID(A)])){p.push(A);}}}else{var T=new RegExp("(^|\\s)"+e.escapeRegExp(v)+"(\\s|$)");E=U.getElementsByTagName("*");
for(O=0;A=E[O++];){className=A.className;if(!(className&&T.test(className))){continue;}if(s){return A;}if(!(I&&V[this.getUID(A)])){p.push(A);}}}}}}if(I){this.sort(p);
}return(s)?null:p;}querySelector:if(U.querySelectorAll){if(!this.isHTMLDocument||g[z]||this.brokenMixedCaseQSA||(this.brokenCheckedQSA&&z.indexOf(":checked")>-1)||(this.brokenEmptyAttributeQSA&&h.test(z))||(!y&&z.indexOf(",")>-1)||e.disableQSA){break querySelector;
}var S=z,x=U;if(!y){var C=x.getAttribute("id"),t="slickid__";x.setAttribute("id",t);S="#"+t+" "+S;U=x.parentNode;}try{if(s){return U.querySelector(S)||null;
}else{E=U.querySelectorAll(S);}}catch(Q){g[z]=1;break querySelector;}finally{if(!y){if(C){x.setAttribute("id",C);}else{x.removeAttribute("id");}U=x;}}if(this.starSelectsClosedQSA){for(O=0;
A=E[O++];){if(A.nodeName>"@"&&!(I&&V[this.getUID(A)])){p.push(A);}}}else{for(O=0;A=E[O++];){if(!(I&&V[this.getUID(A)])){p.push(A);}}}if(I){this.sort(p);
}return p;}F=this.Slick.parse(z);if(!F.length){return p;}}else{if(z==null){return p;}else{if(z.Slick){F=z;}else{if(this.contains(U.documentElement||U,z)){(p)?p.push(z):p=z;
return p;}else{return p;}}}}this.posNTH={};this.posNTHLast={};this.posNTHType={};this.posNTHTypeLast={};this.push=(!I&&(s||(F.length==1&&F.expressions[0].length==1)))?this.pushArray:this.pushUID;
if(p==null){p=[];}var M,L,K;var B,J,D,c,q,G,W;var N,P,o,w,R=F.expressions;search:for(O=0;(P=R[O]);O++){for(M=0;(o=P[M]);M++){B="combinator:"+o.combinator;
if(!this[B]){continue search;}J=(this.isXMLDocument)?o.tag:o.tag.toUpperCase();D=o.id;c=o.classList;q=o.classes;G=o.attributes;W=o.pseudos;w=(M===(P.length-1));
this.bitUniques={};if(w){this.uniques=V;this.found=p;}else{this.uniques={};this.found=[];}if(M===0){this[B](U,J,D,q,G,W,c);if(s&&w&&p.length){break search;
}}else{if(s&&w){for(L=0,K=N.length;L<K;L++){this[B](N[L],J,D,q,G,W,c);if(p.length){break search;}}}else{for(L=0,K=N.length;L<K;L++){this[B](N[L],J,D,q,G,W,c);
}}}N=this.found;}}if(I||(F.expressions.length>1)){this.sort(p);}return(s)?(p[0]||null):p;};k.uidx=1;k.uidk="slick-uniqueid";k.getUIDXML=function(n){var c=n.getAttribute(this.uidk);
if(!c){c=this.uidx++;n.setAttribute(this.uidk,c);}return c;};k.getUIDHTML=function(c){return c.uniqueNumber||(c.uniqueNumber=this.uidx++);};k.sort=function(c){if(!this.documentSorter){return c;
}c.sort(this.documentSorter);return c;};k.cacheNTH={};k.matchNTH=/^([+-]?\d*)?([a-z]+)?([+-]\d+)?$/;k.parseNTHArgument=function(q){var o=q.match(this.matchNTH);
if(!o){return false;}var p=o[2]||false;var n=o[1]||1;if(n=="-"){n=-1;}var c=+o[3]||0;o=(p=="n")?{a:n,b:c}:(p=="odd")?{a:2,b:1}:(p=="even")?{a:2,b:0}:{a:0,b:n};
return(this.cacheNTH[q]=o);};k.createNTHPseudo=function(p,n,c,o){return function(s,q){var u=this.getUID(s);if(!this[c][u]){var A=s.parentNode;if(!A){return false;
}var r=A[p],t=1;if(o){var z=s.nodeName;do{if(r.nodeName!=z){continue;}this[c][this.getUID(r)]=t++;}while((r=r[n]));}else{do{if(r.nodeType!=1){continue;
}this[c][this.getUID(r)]=t++;}while((r=r[n]));}}q=q||"n";var v=this.cacheNTH[q]||this.parseNTHArgument(q);if(!v){return false;}var y=v.a,x=v.b,w=this[c][u];
if(y==0){return x==w;}if(y>0){if(w<x){return false;}}else{if(x<w){return false;}}return((w-x)%y)==0;};};k.pushArray=function(p,c,r,o,n,q){if(this.matchSelector(p,c,r,o,n,q)){this.found.push(p);
}};k.pushUID=function(q,c,s,p,n,r){var o=this.getUID(q);if(!this.uniques[o]&&this.matchSelector(q,c,s,p,n,r)){this.uniques[o]=true;this.found.push(q);}};
k.matchNode=function(n,o){if(this.isHTMLDocument&&this.nativeMatchesSelector){try{return this.nativeMatchesSelector.call(n,o.replace(/\[([^=]+)=\s*([^'"\]]+?)\s*\]/g,'[$1="$2"]'));
}catch(u){}}var t=this.Slick.parse(o);if(!t){return true;}var r=t.expressions,s=0,q;for(q=0;(currentExpression=r[q]);q++){if(currentExpression.length==1){var p=currentExpression[0];
if(this.matchSelector(n,(this.isXMLDocument)?p.tag:p.tag.toUpperCase(),p.id,p.classes,p.attributes,p.pseudos)){return true;}s++;}}if(s==t.length){return false;
}var c=this.search(this.document,t),v;for(q=0;v=c[q++];){if(v===n){return true;}}return false;};k.matchPseudo=function(q,c,p){var n="pseudo:"+c;if(this[n]){return this[n](q,p);
}var o=this.getAttribute(q,c);return(p)?p==o:!!o;};k.matchSelector=function(o,v,c,p,q,s){if(v){var t=(this.isXMLDocument)?o.nodeName:o.nodeName.toUpperCase();
if(v=="*"){if(t<"@"){return false;}}else{if(t!=v){return false;}}}if(c&&o.getAttribute("id")!=c){return false;}var r,n,u;if(p){for(r=p.length;r--;){u=this.getAttribute(o,"class");
if(!(u&&p[r].regexp.test(u))){return false;}}}if(q){for(r=q.length;r--;){n=q[r];if(n.operator?!n.test(this.getAttribute(o,n.key)):!this.hasAttribute(o,n.key)){return false;
}}}if(s){for(r=s.length;r--;){n=s[r];if(!this.matchPseudo(o,n.key,n.value)){return false;}}}return true;};var j={" ":function(q,w,n,r,s,u,p){var t,v,o;
if(this.isHTMLDocument){getById:if(n){v=this.document.getElementById(n);if((!v&&q.all)||(this.idGetsName&&v&&v.getAttributeNode("id").nodeValue!=n)){o=q.all[n];
if(!o){return;}if(!o[0]){o=[o];}for(t=0;v=o[t++];){var c=v.getAttributeNode("id");if(c&&c.nodeValue==n){this.push(v,w,null,r,s,u);break;}}return;}if(!v){if(this.contains(this.root,q)){return;
}else{break getById;}}else{if(this.document!==q&&!this.contains(q,v)){return;}}this.push(v,w,null,r,s,u);return;}getByClass:if(r&&q.getElementsByClassName&&!this.brokenGEBCN){o=q.getElementsByClassName(p.join(" "));
if(!(o&&o.length)){break getByClass;}for(t=0;v=o[t++];){this.push(v,w,n,null,s,u);}return;}}getByTag:{o=q.getElementsByTagName(w);if(!(o&&o.length)){break getByTag;
}if(!this.brokenStarGEBTN){w=null;}for(t=0;v=o[t++];){this.push(v,w,n,r,s,u);}}},">":function(p,c,r,o,n,q){if((p=p.firstChild)){do{if(p.nodeType==1){this.push(p,c,r,o,n,q);
}}while((p=p.nextSibling));}},"+":function(p,c,r,o,n,q){while((p=p.nextSibling)){if(p.nodeType==1){this.push(p,c,r,o,n,q);break;}}},"^":function(p,c,r,o,n,q){p=p.firstChild;
if(p){if(p.nodeType==1){this.push(p,c,r,o,n,q);}else{this["combinator:+"](p,c,r,o,n,q);}}},"~":function(q,c,s,p,n,r){while((q=q.nextSibling)){if(q.nodeType!=1){continue;
}var o=this.getUID(q);if(this.bitUniques[o]){break;}this.bitUniques[o]=true;this.push(q,c,s,p,n,r);}},"++":function(p,c,r,o,n,q){this["combinator:+"](p,c,r,o,n,q);
this["combinator:!+"](p,c,r,o,n,q);},"~~":function(p,c,r,o,n,q){this["combinator:~"](p,c,r,o,n,q);this["combinator:!~"](p,c,r,o,n,q);},"!":function(p,c,r,o,n,q){while((p=p.parentNode)){if(p!==this.document){this.push(p,c,r,o,n,q);
}}},"!>":function(p,c,r,o,n,q){p=p.parentNode;if(p!==this.document){this.push(p,c,r,o,n,q);}},"!+":function(p,c,r,o,n,q){while((p=p.previousSibling)){if(p.nodeType==1){this.push(p,c,r,o,n,q);
break;}}},"!^":function(p,c,r,o,n,q){p=p.lastChild;if(p){if(p.nodeType==1){this.push(p,c,r,o,n,q);}else{this["combinator:!+"](p,c,r,o,n,q);}}},"!~":function(q,c,s,p,n,r){while((q=q.previousSibling)){if(q.nodeType!=1){continue;
}var o=this.getUID(q);if(this.bitUniques[o]){break;}this.bitUniques[o]=true;this.push(q,c,s,p,n,r);}}};for(var i in j){k["combinator:"+i]=j[i];}var l={empty:function(c){var n=c.firstChild;
return !(n&&n.nodeType==1)&&!(c.innerText||c.textContent||"").length;},not:function(c,n){return !this.matchNode(c,n);},contains:function(c,n){return(c.innerText||c.textContent||"").indexOf(n)>-1;
},"first-child":function(c){while((c=c.previousSibling)){if(c.nodeType==1){return false;}}return true;},"last-child":function(c){while((c=c.nextSibling)){if(c.nodeType==1){return false;
}}return true;},"only-child":function(o){var n=o;while((n=n.previousSibling)){if(n.nodeType==1){return false;}}var c=o;while((c=c.nextSibling)){if(c.nodeType==1){return false;
}}return true;},"nth-child":k.createNTHPseudo("firstChild","nextSibling","posNTH"),"nth-last-child":k.createNTHPseudo("lastChild","previousSibling","posNTHLast"),"nth-of-type":k.createNTHPseudo("firstChild","nextSibling","posNTHType",true),"nth-last-of-type":k.createNTHPseudo("lastChild","previousSibling","posNTHTypeLast",true),index:function(n,c){return this["pseudo:nth-child"](n,""+(c+1));
},even:function(c){return this["pseudo:nth-child"](c,"2n");},odd:function(c){return this["pseudo:nth-child"](c,"2n+1");},"first-of-type":function(c){var n=c.nodeName;
while((c=c.previousSibling)){if(c.nodeName==n){return false;}}return true;},"last-of-type":function(c){var n=c.nodeName;while((c=c.nextSibling)){if(c.nodeName==n){return false;
}}return true;},"only-of-type":function(o){var n=o,p=o.nodeName;while((n=n.previousSibling)){if(n.nodeName==p){return false;}}var c=o;while((c=c.nextSibling)){if(c.nodeName==p){return false;
}}return true;},enabled:function(c){return !c.disabled;},disabled:function(c){return c.disabled;},checked:function(c){return c.checked||c.selected;},focus:function(c){return this.isHTMLDocument&&this.document.activeElement===c&&(c.href||c.type||this.hasAttribute(c,"tabindex"));
},root:function(c){return(c===this.root);},selected:function(c){return c.selected;}};for(var b in l){k["pseudo:"+b]=l[b];}var a=k.attributeGetters={"for":function(){return("htmlFor" in this)?this.htmlFor:this.getAttribute("for");
},href:function(){return("href" in this)?this.getAttribute("href",2):this.getAttribute("href");},style:function(){return(this.style)?this.style.cssText:this.getAttribute("style");
},tabindex:function(){var c=this.getAttributeNode("tabindex");return(c&&c.specified)?c.nodeValue:null;},type:function(){return this.getAttribute("type");
},maxlength:function(){var c=this.getAttributeNode("maxLength");return(c&&c.specified)?c.nodeValue:null;}};a.MAXLENGTH=a.maxLength=a.maxlength;var e=k.Slick=(this.Slick||{});
e.version="1.1.7";e.search=function(n,o,c){return k.search(n,o,c);};e.find=function(c,n){return k.search(c,n,null,true);};e.contains=function(c,n){k.setDocument(c);
return k.contains(c,n);};e.getAttribute=function(n,c){k.setDocument(n);return k.getAttribute(n,c);};e.hasAttribute=function(n,c){k.setDocument(n);return k.hasAttribute(n,c);
};e.match=function(n,c){if(!(n&&c)){return false;}if(!c||c===n){return true;}k.setDocument(n);return k.matchNode(n,c);};e.defineAttributeGetter=function(c,n){k.attributeGetters[c]=n;
return this;};e.lookupAttributeGetter=function(c){return k.attributeGetters[c];};e.definePseudo=function(c,n){k["pseudo:"+c]=function(p,o){return n.call(p,o);
};return this;};e.lookupPseudo=function(c){var n=k["pseudo:"+c];if(n){return function(o){return n.call(this,o);};}return null;};e.override=function(n,c){k.override(n,c);
return this;};e.isXML=k.isXML;e.uidOf=function(c){return k.getUIDHTML(c);};if(!this.Slick){this.Slick=e;}}).apply((typeof exports!="undefined")?exports:this);
var Element=function(b,g){var h=Element.Constructors[b];if(h){return h(g);}if(typeof b!="string"){return document.id(b).set(g);}if(!g){g={};}if(!(/^[\w-]+$/).test(b)){var e=Slick.parse(b).expressions[0][0];
b=(e.tag=="*")?"div":e.tag;if(e.id&&g.id==null){g.id=e.id;}var d=e.attributes;if(d){for(var a,f=0,c=d.length;f<c;f++){a=d[f];if(g[a.key]!=null){continue;
}if(a.value!=null&&a.operator=="="){g[a.key]=a.value;}else{if(!a.value&&!a.operator){g[a.key]=true;}}}}if(e.classList&&g["class"]==null){g["class"]=e.classList.join(" ");
}}return document.newElement(b,g);};if(Browser.Element){Element.prototype=Browser.Element.prototype;Element.prototype._fireEvent=(function(a){return function(b,c){return a.call(this,b,c);
};})(Element.prototype.fireEvent);}new Type("Element",Element).mirror(function(a){if(Array.prototype[a]){return;}var b={};b[a]=function(){var h=[],e=arguments,j=true;
for(var g=0,d=this.length;g<d;g++){var f=this[g],c=h[g]=f[a].apply(f,e);j=(j&&typeOf(c)=="element");}return(j)?new Elements(h):h;};Elements.implement(b);
});if(!Browser.Element){Element.parent=Object;Element.Prototype={"$constructor":Element,"$family":Function.from("element").hide()};Element.mirror(function(a,b){Element.Prototype[a]=b;
});}Element.Constructors={};var IFrame=new Type("IFrame",function(){var e=Array.link(arguments,{properties:Type.isObject,iframe:function(f){return(f!=null);
}});var c=e.properties||{},b;if(e.iframe){b=document.id(e.iframe);}var d=c.onload||function(){};delete c.onload;c.id=c.name=[c.id,c.name,b?(b.id||b.name):"IFrame_"+String.uniqueID()].pick();
b=new Element(b||"iframe",c);var a=function(){d.call(b.contentWindow);};if(window.frames[c.id]){a();}else{b.addListener("load",a);}return b;});var Elements=this.Elements=function(a){if(a&&a.length){var e={},d;
for(var c=0;d=a[c++];){var b=Slick.uidOf(d);if(!e[b]){e[b]=true;this.push(d);}}}};Elements.prototype={length:0};Elements.parent=Array;new Type("Elements",Elements).implement({filter:function(a,b){if(!a){return this;
}return new Elements(Array.filter(this,(typeOf(a)=="string")?function(c){return c.match(a);}:a,b));}.protect(),push:function(){var d=this.length;for(var b=0,a=arguments.length;
b<a;b++){var c=document.id(arguments[b]);if(c){this[d++]=c;}}return(this.length=d);}.protect(),unshift:function(){var b=[];for(var c=0,a=arguments.length;
c<a;c++){var d=document.id(arguments[c]);if(d){b.push(d);}}return Array.prototype.unshift.apply(this,b);}.protect(),concat:function(){var b=new Elements(this);
for(var c=0,a=arguments.length;c<a;c++){var d=arguments[c];if(Type.isEnumerable(d)){b.append(d);}else{b.push(d);}}return b;}.protect(),append:function(c){for(var b=0,a=c.length;
b<a;b++){this.push(c[b]);}return this;}.protect(),empty:function(){while(this.length){delete this[--this.length];}return this;}.protect()});(function(){var f=Array.prototype.splice,a={"0":0,"1":1,length:2};
f.call(a,1,1);if(a[1]==1){Elements.implement("splice",function(){var g=this.length;var e=f.apply(this,arguments);while(g>=this.length){delete this[g--];
}return e;}.protect());}Array.forEachMethod(function(g,e){Elements.implement(e,g);});Array.mirror(Elements);var d;try{d=(document.createElement("<input name=x>").name=="x");
}catch(b){}var c=function(e){return(""+e).replace(/&/g,"&amp;").replace(/"/g,"&quot;");};Document.implement({newElement:function(e,g){if(g&&g.checked!=null){g.defaultChecked=g.checked;
}if(d&&g){e="<"+e;if(g.name){e+=' name="'+c(g.name)+'"';}if(g.type){e+=' type="'+c(g.type)+'"';}e+=">";delete g.name;delete g.type;}return this.id(this.createElement(e)).set(g);
}});})();(function(){Slick.uidOf(window);Slick.uidOf(document);Document.implement({newTextNode:function(e){return this.createTextNode(e);},getDocument:function(){return this;
},getWindow:function(){return this.window;},id:(function(){var e={string:function(E,D,l){E=Slick.find(l,"#"+E.replace(/(\W)/g,"\\$1"));return(E)?e.element(E,D):null;
},element:function(D,E){Slick.uidOf(D);if(!E&&!D.$family&&!(/^(?:object|embed)$/i).test(D.tagName)){var l=D.fireEvent;D._fireEvent=function(F,G){return l(F,G);
};Object.append(D,Element.Prototype);}return D;},object:function(D,E,l){if(D.toElement){return e.element(D.toElement(l),E);}return null;}};e.textnode=e.whitespace=e.window=e.document=function(l){return l;
};return function(D,F,E){if(D&&D.$family&&D.uniqueNumber){return D;}var l=typeOf(D);return(e[l])?e[l](D,F,E||document):null;};})()});if(window.$==null){Window.implement("$",function(e,l){return document.id(e,l,this.document);
});}Window.implement({getDocument:function(){return this.document;},getWindow:function(){return this;}});[Document,Element].invoke("implement",{getElements:function(e){return Slick.search(this,e,new Elements);
},getElement:function(e){return document.id(Slick.find(this,e));}});var m={contains:function(e){return Slick.contains(this,e);}};if(!document.contains){Document.implement(m);
}if(!document.createElement("div").contains){Element.implement(m);}var r=function(E,D){if(!E){return D;}E=Object.clone(Slick.parse(E));var l=E.expressions;
for(var e=l.length;e--;){l[e][0].combinator=D;}return E;};Object.forEach({getNext:"~",getPrevious:"!~",getParent:"!"},function(e,l){Element.implement(l,function(D){return this.getElement(r(D,e));
});});Object.forEach({getAllNext:"~",getAllPrevious:"!~",getSiblings:"~~",getChildren:">",getParents:"!"},function(e,l){Element.implement(l,function(D){return this.getElements(r(D,e));
});});Element.implement({getFirst:function(e){return document.id(Slick.search(this,r(e,">"))[0]);},getLast:function(e){return document.id(Slick.search(this,r(e,">")).getLast());
},getWindow:function(){return this.ownerDocument.window;},getDocument:function(){return this.ownerDocument;},getElementById:function(e){return document.id(Slick.find(this,"#"+(""+e).replace(/(\W)/g,"\\$1")));
},match:function(e){return !e||Slick.match(this,e);}});if(window.$$==null){Window.implement("$$",function(e){if(arguments.length==1){if(typeof e=="string"){return Slick.search(this.document,e,new Elements);
}else{if(Type.isEnumerable(e)){return new Elements(e);}}}return new Elements(arguments);});}var w={before:function(l,e){var D=e.parentNode;if(D){D.insertBefore(l,e);
}},after:function(l,e){var D=e.parentNode;if(D){D.insertBefore(l,e.nextSibling);}},bottom:function(l,e){e.appendChild(l);},top:function(l,e){e.insertBefore(l,e.firstChild);
}};w.inside=w.bottom;var j={},d={};var k={};Array.forEach(["type","value","defaultValue","accessKey","cellPadding","cellSpacing","colSpan","frameBorder","rowSpan","tabIndex","useMap"],function(e){k[e.toLowerCase()]=e;
});k.html="innerHTML";k.text=(document.createElement("div").textContent==null)?"innerText":"textContent";Object.forEach(k,function(l,e){d[e]=function(D,E){D[l]=E;
};j[e]=function(D){return D[l];};});var x=["compact","nowrap","ismap","declare","noshade","checked","disabled","readOnly","multiple","selected","noresize","defer","defaultChecked","autofocus","controls","autoplay","loop"];
var h={};Array.forEach(x,function(e){var l=e.toLowerCase();h[l]=e;d[l]=function(D,E){D[e]=!!E;};j[l]=function(D){return !!D[e];};});Object.append(d,{"class":function(e,l){("className" in e)?e.className=(l||""):e.setAttribute("class",l);
},"for":function(e,l){("htmlFor" in e)?e.htmlFor=l:e.setAttribute("for",l);},style:function(e,l){(e.style)?e.style.cssText=l:e.setAttribute("style",l);
},value:function(e,l){e.value=(l!=null)?l:"";}});j["class"]=function(e){return("className" in e)?e.className||null:e.getAttribute("class");};var f=document.createElement("button");
try{f.type="button";}catch(z){}if(f.type!="button"){d.type=function(e,l){e.setAttribute("type",l);};}f=null;var p=document.createElement("input");p.value="t";
p.type="submit";if(p.value!="t"){d.type=function(l,e){var D=l.value;l.type=e;l.value=D;};}p=null;var q=(function(e){e.random="attribute";return(e.getAttribute("random")=="attribute");
})(document.createElement("div"));Element.implement({setProperty:function(l,D){var E=d[l.toLowerCase()];if(E){E(this,D);}else{if(q){var e=this.retrieve("$attributeWhiteList",{});
}if(D==null){this.removeAttribute(l);if(q){delete e[l];}}else{this.setAttribute(l,""+D);if(q){e[l]=true;}}}return this;},setProperties:function(e){for(var l in e){this.setProperty(l,e[l]);
}return this;},getProperty:function(F){var D=j[F.toLowerCase()];if(D){return D(this);}if(q){var l=this.getAttributeNode(F),E=this.retrieve("$attributeWhiteList",{});
if(!l){return null;}if(l.expando&&!E[F]){var G=this.outerHTML;if(G.substr(0,G.search(/\/?['"]?>(?![^<]*<['"])/)).indexOf(F)<0){return null;}E[F]=true;}}var e=Slick.getAttribute(this,F);
return(!e&&!Slick.hasAttribute(this,F))?null:e;},getProperties:function(){var e=Array.from(arguments);return e.map(this.getProperty,this).associate(e);
},removeProperty:function(e){return this.setProperty(e,null);},removeProperties:function(){Array.each(arguments,this.removeProperty,this);return this;},set:function(D,l){var e=Element.Properties[D];
(e&&e.set)?e.set.call(this,l):this.setProperty(D,l);}.overloadSetter(),get:function(l){var e=Element.Properties[l];return(e&&e.get)?e.get.apply(this):this.getProperty(l);
}.overloadGetter(),erase:function(l){var e=Element.Properties[l];(e&&e.erase)?e.erase.apply(this):this.removeProperty(l);return this;},hasClass:function(e){return this.className.clean().contains(e," ");
},addClass:function(e){if(!this.hasClass(e)){this.className=(this.className+" "+e).clean();}return this;},removeClass:function(e){this.className=this.className.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)"),"$1");
return this;},toggleClass:function(e,l){if(l==null){l=!this.hasClass(e);}return(l)?this.addClass(e):this.removeClass(e);},adopt:function(){var E=this,e,G=Array.flatten(arguments),F=G.length;
if(F>1){E=e=document.createDocumentFragment();}for(var D=0;D<F;D++){var l=document.id(G[D],true);if(l){E.appendChild(l);}}if(e){this.appendChild(e);}return this;
},appendText:function(l,e){return this.grab(this.getDocument().newTextNode(l),e);},grab:function(l,e){w[e||"bottom"](document.id(l,true),this);return this;
},inject:function(l,e){w[e||"bottom"](this,document.id(l,true));return this;},replaces:function(e){e=document.id(e,true);e.parentNode.replaceChild(this,e);
return this;},wraps:function(l,e){l=document.id(l,true);return this.replaces(l).grab(l,e);},getSelected:function(){this.selectedIndex;return new Elements(Array.from(this.options).filter(function(e){return e.selected;
}));},toQueryString:function(){var e=[];this.getElements("input, select, textarea").each(function(D){var l=D.type;if(!D.name||D.disabled||l=="submit"||l=="reset"||l=="file"||l=="image"){return;
}var E=(D.get("tag")=="select")?D.getSelected().map(function(F){return document.id(F).get("value");}):((l=="radio"||l=="checkbox")&&!D.checked)?null:D.get("value");
Array.from(E).each(function(F){if(typeof F!="undefined"){e.push(encodeURIComponent(D.name)+"="+encodeURIComponent(F));}});});return e.join("&");}});var i={},A={};
var B=function(e){return(A[e]||(A[e]={}));};var v=function(l){var e=l.uniqueNumber;if(l.removeEvents){l.removeEvents();}if(l.clearAttributes){l.clearAttributes();
}if(e!=null){delete i[e];delete A[e];}return l;};var C={input:"checked",option:"selected",textarea:"value"};Element.implement({destroy:function(){var e=v(this).getElementsByTagName("*");
Array.each(e,v);Element.dispose(this);return null;},empty:function(){Array.from(this.childNodes).each(Element.dispose);return this;},dispose:function(){return(this.parentNode)?this.parentNode.removeChild(this):this;
},clone:function(G,E){G=G!==false;var L=this.cloneNode(G),D=[L],F=[this],J;if(G){D.append(Array.from(L.getElementsByTagName("*")));F.append(Array.from(this.getElementsByTagName("*")));
}for(J=D.length;J--;){var H=D[J],K=F[J];if(!E){H.removeAttribute("id");}if(H.clearAttributes){H.clearAttributes();H.mergeAttributes(K);H.removeAttribute("uniqueNumber");
if(H.options){var O=H.options,e=K.options;for(var I=O.length;I--;){O[I].selected=e[I].selected;}}}var l=C[K.tagName.toLowerCase()];if(l&&K[l]){H[l]=K[l];
}}if(Browser.ie){var M=L.getElementsByTagName("object"),N=this.getElementsByTagName("object");for(J=M.length;J--;){M[J].outerHTML=N[J].outerHTML;}}return document.id(L);
}});[Element,Window,Document].invoke("implement",{addListener:function(E,D){if(E=="unload"){var e=D,l=this;D=function(){l.removeListener("unload",D);e();
};}else{i[Slick.uidOf(this)]=this;}if(this.addEventListener){this.addEventListener(E,D,!!arguments[2]);}else{this.attachEvent("on"+E,D);}return this;},removeListener:function(l,e){if(this.removeEventListener){this.removeEventListener(l,e,!!arguments[2]);
}else{this.detachEvent("on"+l,e);}return this;},retrieve:function(l,e){var E=B(Slick.uidOf(this)),D=E[l];if(e!=null&&D==null){D=E[l]=e;}return D!=null?D:null;
},store:function(l,e){var D=B(Slick.uidOf(this));D[l]=e;return this;},eliminate:function(e){var l=B(Slick.uidOf(this));delete l[e];return this;}});if(window.attachEvent&&!window.addEventListener){window.addListener("unload",function(){Object.each(i,v);
if(window.CollectGarbage){CollectGarbage();}});}Element.Properties={};Element.Properties.style={set:function(e){this.style.cssText=e;},get:function(){return this.style.cssText;
},erase:function(){this.style.cssText="";}};Element.Properties.tag={get:function(){return this.tagName.toLowerCase();}};Element.Properties.html={set:function(e){if(e==null){e="";
}else{if(typeOf(e)=="array"){e=e.join("");}}this.innerHTML=e;},erase:function(){this.innerHTML="";}};var t=document.createElement("div");t.innerHTML="<nav></nav>";
var a=(t.childNodes.length==1);if(!a){var s="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),b=document.createDocumentFragment(),u=s.length;
while(u--){b.createElement(s[u]);}}t=null;var g=Function.attempt(function(){var e=document.createElement("table");e.innerHTML="<tr><td></td></tr>";return true;
});var c=document.createElement("tr"),o="<td></td>";c.innerHTML=o;var y=(c.innerHTML==o);c=null;if(!g||!y||!a){Element.Properties.html.set=(function(l){var e={table:[1,"<table>","</table>"],select:[1,"<select>","</select>"],tbody:[2,"<table><tbody>","</tbody></table>"],tr:[3,"<table><tbody><tr>","</tr></tbody></table>"]};
e.thead=e.tfoot=e.tbody;return function(D){var E=e[this.get("tag")];if(!E&&!a){E=[0,"",""];}if(!E){return l.call(this,D);}var H=E[0],G=document.createElement("div"),F=G;
if(!a){b.appendChild(G);}G.innerHTML=[E[1],D,E[2]].flatten().join("");while(H--){F=F.firstChild;}this.empty().adopt(F.childNodes);if(!a){b.removeChild(G);
}G=null;};})(Element.Properties.html.set);}var n=document.createElement("form");n.innerHTML="<select><option>s</option></select>";if(n.firstChild.value!="s"){Element.Properties.value={set:function(G){var l=this.get("tag");
if(l!="select"){return this.setProperty("value",G);}var D=this.getElements("option");for(var E=0;E<D.length;E++){var F=D[E],e=F.getAttributeNode("value"),H=(e&&e.specified)?F.value:F.get("text");
if(H==G){return F.selected=true;}}},get:function(){var D=this,l=D.get("tag");if(l!="select"&&l!="option"){return this.getProperty("value");}if(l=="select"&&!(D=D.getSelected()[0])){return"";
}var e=D.getAttributeNode("value");return(e&&e.specified)?D.value:D.get("text");}};}n=null;if(document.createElement("div").getAttributeNode("id")){Element.Properties.id={set:function(e){this.id=this.getAttributeNode("id").value=e;
},get:function(){return this.id||null;},erase:function(){this.id=this.getAttributeNode("id").value="";}};}})();(function(){var i=document.html;var d=document.createElement("div");
d.style.color="red";d.style.color=null;var c=d.style.color=="red";d=null;Element.Properties.styles={set:function(k){this.setStyles(k);}};var h=(i.style.opacity!=null),e=(i.style.filter!=null),j=/alpha\(opacity=([\d.]+)\)/i;
var a=function(l,k){l.store("$opacity",k);l.style.visibility=k>0||k==null?"visible":"hidden";};var f=(h?function(l,k){l.style.opacity=k;}:(e?function(l,k){var n=l.style;
if(!l.currentStyle||!l.currentStyle.hasLayout){n.zoom=1;}if(k==null||k==1){k="";}else{k="alpha(opacity="+(k*100).limit(0,100).round()+")";}var m=n.filter||l.getComputedStyle("filter")||"";
n.filter=j.test(m)?m.replace(j,k):m+k;if(!n.filter){n.removeAttribute("filter");}}:a));var g=(h?function(l){var k=l.style.opacity||l.getComputedStyle("opacity");
return(k=="")?1:k.toFloat();}:(e?function(l){var m=(l.style.filter||l.getComputedStyle("filter")),k;if(m){k=m.match(j);}return(k==null||m==null)?1:(k[1]/100);
}:function(l){var k=l.retrieve("$opacity");if(k==null){k=(l.style.visibility=="hidden"?0:1);}return k;}));var b=(i.style.cssFloat==null)?"styleFloat":"cssFloat";
Element.implement({getComputedStyle:function(m){if(this.currentStyle){return this.currentStyle[m.camelCase()];}var l=Element.getDocument(this).defaultView,k=l?l.getComputedStyle(this,null):null;
return(k)?k.getPropertyValue((m==b)?"float":m.hyphenate()):null;},setStyle:function(l,k){if(l=="opacity"){if(k!=null){k=parseFloat(k);}f(this,k);return this;
}l=(l=="float"?b:l).camelCase();if(typeOf(k)!="string"){var m=(Element.Styles[l]||"@").split(" ");k=Array.from(k).map(function(o,n){if(!m[n]){return"";
}return(typeOf(o)=="number")?m[n].replace("@",Math.round(o)):o;}).join(" ");}else{if(k==String(Number(k))){k=Math.round(k);}}this.style[l]=k;if((k==""||k==null)&&c&&this.style.removeAttribute){this.style.removeAttribute(l);
}return this;},getStyle:function(q){if(q=="opacity"){return g(this);}q=(q=="float"?b:q).camelCase();var k=this.style[q];if(!k||q=="zIndex"){k=[];for(var p in Element.ShortStyles){if(q!=p){continue;
}for(var o in Element.ShortStyles[p]){k.push(this.getStyle(o));}return k.join(" ");}k=this.getComputedStyle(q);}if(k){k=String(k);var m=k.match(/rgba?\([\d\s,]+\)/);
if(m){k=k.replace(m[0],m[0].rgbToHex());}}if(Browser.opera||Browser.ie){if((/^(height|width)$/).test(q)&&!(/px$/.test(k))){var l=(q=="width")?["left","right"]:["top","bottom"],n=0;
l.each(function(r){n+=this.getStyle("border-"+r+"-width").toInt()+this.getStyle("padding-"+r).toInt();},this);return this["offset"+q.capitalize()]-n+"px";
}if(Browser.ie&&(/^border(.+)Width|margin|padding/).test(q)&&isNaN(parseFloat(k))){return"0px";}}return k;},setStyles:function(l){for(var k in l){this.setStyle(k,l[k]);
}return this;},getStyles:function(){var k={};Array.flatten(arguments).each(function(l){k[l]=this.getStyle(l);},this);return k;}});Element.Styles={left:"@px",top:"@px",bottom:"@px",right:"@px",width:"@px",height:"@px",maxWidth:"@px",maxHeight:"@px",minWidth:"@px",minHeight:"@px",backgroundColor:"rgb(@, @, @)",backgroundPosition:"@px @px",color:"rgb(@, @, @)",fontSize:"@px",letterSpacing:"@px",lineHeight:"@px",clip:"rect(@px @px @px @px)",margin:"@px @px @px @px",padding:"@px @px @px @px",border:"@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)",borderWidth:"@px @px @px @px",borderStyle:"@ @ @ @",borderColor:"rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)",zIndex:"@",zoom:"@",fontWeight:"@",textIndent:"@px",opacity:"@"};
Element.ShortStyles={margin:{},padding:{},border:{},borderWidth:{},borderStyle:{},borderColor:{}};["Top","Right","Bottom","Left"].each(function(q){var p=Element.ShortStyles;
var l=Element.Styles;["margin","padding"].each(function(r){var s=r+q;p[r][s]=l[s]="@px";});var o="border"+q;p.border[o]=l[o]="@px @ rgb(@, @, @)";var n=o+"Width",k=o+"Style",m=o+"Color";
p[o]={};p.borderWidth[n]=p[o][n]=l[n]="@px";p.borderStyle[k]=p[o][k]=l[k]="@";p.borderColor[m]=p[o][m]=l[m]="rgb(@, @, @)";});})();(function(){Element.Properties.events={set:function(b){this.addEvents(b);
}};[Element,Window,Document].invoke("implement",{addEvent:function(f,h){var i=this.retrieve("events",{});if(!i[f]){i[f]={keys:[],values:[]};}if(i[f].keys.contains(h)){return this;
}i[f].keys.push(h);var g=f,b=Element.Events[f],d=h,j=this;if(b){if(b.onAdd){b.onAdd.call(this,h,f);}if(b.condition){d=function(k){if(b.condition.call(this,k,f)){return h.call(this,k);
}return true;};}if(b.base){g=Function.from(b.base).call(this,f);}}var e=function(){return h.call(j);};var c=Element.NativeEvents[g];if(c){if(c==2){e=function(k){k=new DOMEvent(k,j.getWindow());
if(d.call(j,k)===false){k.stop();}};}this.addListener(g,e,arguments[2]);}i[f].values.push(e);return this;},removeEvent:function(e,d){var c=this.retrieve("events");
if(!c||!c[e]){return this;}var h=c[e];var b=h.keys.indexOf(d);if(b==-1){return this;}var g=h.values[b];delete h.keys[b];delete h.values[b];var f=Element.Events[e];
if(f){if(f.onRemove){f.onRemove.call(this,d,e);}if(f.base){e=Function.from(f.base).call(this,e);}}return(Element.NativeEvents[e])?this.removeListener(e,g,arguments[2]):this;
},addEvents:function(b){for(var c in b){this.addEvent(c,b[c]);}return this;},removeEvents:function(b){var d;if(typeOf(b)=="object"){for(d in b){this.removeEvent(d,b[d]);
}return this;}var c=this.retrieve("events");if(!c){return this;}if(!b){for(d in c){this.removeEvents(d);}this.eliminate("events");}else{if(c[b]){c[b].keys.each(function(e){this.removeEvent(b,e);
},this);delete c[b];}}return this;},fireEvent:function(e,c,b){var d=this.retrieve("events");if(!d||!d[e]){return this;}c=Array.from(c);d[e].keys.each(function(f){if(b){f.delay(b,this,c);
}else{f.apply(this,c);}},this);return this;},cloneEvents:function(e,d){e=document.id(e);var c=e.retrieve("events");if(!c){return this;}if(!d){for(var b in c){this.cloneEvents(e,b);
}}else{if(c[d]){c[d].keys.each(function(f){this.addEvent(d,f);},this);}}return this;}});Element.NativeEvents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,DOMMouseScroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,orientationchange:2,touchstart:2,touchmove:2,touchend:2,touchcancel:2,gesturestart:2,gesturechange:2,gestureend:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,paste:2,input:2,load:2,unload:1,beforeunload:2,resize:1,move:1,DOMContentLoaded:1,readystatechange:1,error:1,abort:1,scroll:1};
Element.Events={mousewheel:{base:(Browser.firefox)?"DOMMouseScroll":"mousewheel"}};if("onmouseenter" in document.documentElement){Element.NativeEvents.mouseenter=Element.NativeEvents.mouseleave=2;
}else{var a=function(b){var c=b.relatedTarget;if(c==null){return true;}if(!c){return false;}return(c!=this&&c.prefix!="xul"&&typeOf(this)!="document"&&!this.contains(c));
};Element.Events.mouseenter={base:"mouseover",condition:a};Element.Events.mouseleave={base:"mouseout",condition:a};}if(!window.addEventListener){Element.NativeEvents.propertychange=2;
Element.Events.change={base:function(){var b=this.type;return(this.get("tag")=="input"&&(b=="radio"||b=="checkbox"))?"propertychange":"change";},condition:function(b){return this.type!="radio"||(b.event.propertyName=="checked"&&this.checked);
}};}})();(function(){var c=!!window.addEventListener;Element.NativeEvents.focusin=Element.NativeEvents.focusout=2;var k=function(l,m,n,o,p){while(p&&p!=l){if(m(p,o)){return n.call(p,o,p);
}p=document.id(p.parentNode);}};var a={mouseenter:{base:"mouseover"},mouseleave:{base:"mouseout"},focus:{base:"focus"+(c?"":"in"),capture:true},blur:{base:c?"blur":"focusout",capture:true}};
var b="$delegation:";var i=function(l){return{base:"focusin",remove:function(m,o){var p=m.retrieve(b+l+"listeners",{})[o];if(p&&p.forms){for(var n=p.forms.length;
n--;){p.forms[n].removeEvent(l,p.fns[n]);}}},listen:function(x,r,v,n,t,s){var o=(t.get("tag")=="form")?t:n.target.getParent("form");if(!o){return;}var u=x.retrieve(b+l+"listeners",{}),p=u[s]||{forms:[],fns:[]},m=p.forms,w=p.fns;
if(m.indexOf(o)!=-1){return;}m.push(o);var q=function(y){k(x,r,v,y,t);};o.addEvent(l,q);w.push(q);u[s]=p;x.store(b+l+"listeners",u);}};};var d=function(l){return{base:"focusin",listen:function(m,n,p,q,r){var o={blur:function(){this.removeEvents(o);
}};o[l]=function(s){k(m,n,p,s,r);};q.target.addEvents(o);}};};if(!c){Object.append(a,{submit:i("submit"),reset:i("reset"),change:d("change"),select:d("select")});
}var h=Element.prototype,f=h.addEvent,j=h.removeEvent;var e=function(l,m){return function(r,q,n){if(r.indexOf(":relay")==-1){return l.call(this,r,q,n);
}var o=Slick.parse(r).expressions[0][0];if(o.pseudos[0].key!="relay"){return l.call(this,r,q,n);}var p=o.tag;o.pseudos.slice(1).each(function(s){p+=":"+s.key+(s.value?"("+s.value+")":"");
});l.call(this,r,q);return m.call(this,p,o.pseudos[0].value,q);};};var g={addEvent:function(v,q,x){var t=this.retrieve("$delegates",{}),r=t[v];if(r){for(var y in r){if(r[y].fn==x&&r[y].match==q){return this;
}}}var p=v,u=q,o=x,n=a[v]||{};v=n.base||p;q=function(B){return Slick.match(B,u);};var w=Element.Events[p];if(w&&w.condition){var l=q,m=w.condition;q=function(C,B){return l(C,B)&&m.call(C,B,v);
};}var z=this,s=String.uniqueID();var A=n.listen?function(B,C){if(!C&&B&&B.target){C=B.target;}if(C){n.listen(z,q,x,B,C,s);}}:function(B,C){if(!C&&B&&B.target){C=B.target;
}if(C){k(z,q,x,B,C);}};if(!r){r={};}r[s]={match:u,fn:o,delegator:A};t[p]=r;return f.call(this,v,A,n.capture);},removeEvent:function(r,n,t,u){var q=this.retrieve("$delegates",{}),p=q[r];
if(!p){return this;}if(u){var m=r,w=p[u].delegator,l=a[r]||{};r=l.base||m;if(l.remove){l.remove(this,u);}delete p[u];q[m]=p;return j.call(this,r,w);}var o,v;
if(t){for(o in p){v=p[o];if(v.match==n&&v.fn==t){return g.removeEvent.call(this,r,n,t,o);}}}else{for(o in p){v=p[o];if(v.match==n){g.removeEvent.call(this,r,n,v.fn,o);
}}}return this;}};[Element,Window,Document].invoke("implement",{addEvent:e(f,g.addEvent),removeEvent:e(j,g.removeEvent)});})();(function(){var h=document.createElement("div"),e=document.createElement("div");
h.style.height="0";h.appendChild(e);var d=(e.offsetParent===h);h=e=null;var l=function(m){return k(m,"position")!="static"||a(m);};var i=function(m){return l(m)||(/^(?:table|td|th)$/i).test(m.tagName);
};Element.implement({scrollTo:function(m,n){if(a(this)){this.getWindow().scrollTo(m,n);}else{this.scrollLeft=m;this.scrollTop=n;}return this;},getSize:function(){if(a(this)){return this.getWindow().getSize();
}return{x:this.offsetWidth,y:this.offsetHeight};},getScrollSize:function(){if(a(this)){return this.getWindow().getScrollSize();}return{x:this.scrollWidth,y:this.scrollHeight};
},getScroll:function(){if(a(this)){return this.getWindow().getScroll();}return{x:this.scrollLeft,y:this.scrollTop};},getScrolls:function(){var n=this.parentNode,m={x:0,y:0};
while(n&&!a(n)){m.x+=n.scrollLeft;m.y+=n.scrollTop;n=n.parentNode;}return m;},getOffsetParent:d?function(){var m=this;if(a(m)||k(m,"position")=="fixed"){return null;
}var n=(k(m,"position")=="static")?i:l;while((m=m.parentNode)){if(n(m)){return m;}}return null;}:function(){var m=this;if(a(m)||k(m,"position")=="fixed"){return null;
}try{return m.offsetParent;}catch(n){}return null;},getOffsets:function(){if(this.getBoundingClientRect&&!Browser.Platform.ios){var r=this.getBoundingClientRect(),o=document.id(this.getDocument().documentElement),q=o.getScroll(),t=this.getScrolls(),s=(k(this,"position")=="fixed");
return{x:r.left.toInt()+t.x+((s)?0:q.x)-o.clientLeft,y:r.top.toInt()+t.y+((s)?0:q.y)-o.clientTop};}var n=this,m={x:0,y:0};if(a(this)){return m;}while(n&&!a(n)){m.x+=n.offsetLeft;
m.y+=n.offsetTop;if(Browser.firefox){if(!c(n)){m.x+=b(n);m.y+=g(n);}var p=n.parentNode;if(p&&k(p,"overflow")!="visible"){m.x+=b(p);m.y+=g(p);}}else{if(n!=this&&Browser.safari){m.x+=b(n);
m.y+=g(n);}}n=n.offsetParent;}if(Browser.firefox&&!c(this)){m.x-=b(this);m.y-=g(this);}return m;},getPosition:function(p){var q=this.getOffsets(),n=this.getScrolls();
var m={x:q.x-n.x,y:q.y-n.y};if(p&&(p=document.id(p))){var o=p.getPosition();return{x:m.x-o.x-b(p),y:m.y-o.y-g(p)};}return m;},getCoordinates:function(o){if(a(this)){return this.getWindow().getCoordinates();
}var m=this.getPosition(o),n=this.getSize();var p={left:m.x,top:m.y,width:n.x,height:n.y};p.right=p.left+p.width;p.bottom=p.top+p.height;return p;},computePosition:function(m){return{left:m.x-j(this,"margin-left"),top:m.y-j(this,"margin-top")};
},setPosition:function(m){return this.setStyles(this.computePosition(m));}});[Document,Window].invoke("implement",{getSize:function(){var m=f(this);return{x:m.clientWidth,y:m.clientHeight};
},getScroll:function(){var n=this.getWindow(),m=f(this);return{x:n.pageXOffset||m.scrollLeft,y:n.pageYOffset||m.scrollTop};},getScrollSize:function(){var o=f(this),n=this.getSize(),m=this.getDocument().body;
return{x:Math.max(o.scrollWidth,m.scrollWidth,n.x),y:Math.max(o.scrollHeight,m.scrollHeight,n.y)};},getPosition:function(){return{x:0,y:0};},getCoordinates:function(){var m=this.getSize();
return{top:0,left:0,bottom:m.y,right:m.x,height:m.y,width:m.x};}});var k=Element.getComputedStyle;function j(m,n){return k(m,n).toInt()||0;}function c(m){return k(m,"-moz-box-sizing")=="border-box";
}function g(m){return j(m,"border-top-width");}function b(m){return j(m,"border-left-width");}function a(m){return(/^(?:body|html)$/i).test(m.tagName);
}function f(m){var n=m.getDocument();return(!n.compatMode||n.compatMode=="CSS1Compat")?n.html:n.body;}})();Element.alias({position:"setPosition"});[Window,Document,Element].invoke("implement",{getHeight:function(){return this.getSize().y;
},getWidth:function(){return this.getSize().x;},getScrollTop:function(){return this.getScroll().y;},getScrollLeft:function(){return this.getScroll().x;
},getScrollHeight:function(){return this.getScrollSize().y;},getScrollWidth:function(){return this.getScrollSize().x;},getTop:function(){return this.getPosition().y;
},getLeft:function(){return this.getPosition().x;}});(function(){var f=this.Fx=new Class({Implements:[Chain,Events,Options],options:{fps:60,unit:false,duration:500,frames:null,frameSkip:true,link:"ignore"},initialize:function(g){this.subject=this.subject||this;
this.setOptions(g);},getTransition:function(){return function(g){return -(Math.cos(Math.PI*g)-1)/2;};},step:function(g){if(this.options.frameSkip){var h=(this.time!=null)?(g-this.time):0,i=h/this.frameInterval;
this.time=g;this.frame+=i;}else{this.frame++;}if(this.frame<this.frames){var j=this.transition(this.frame/this.frames);this.set(this.compute(this.from,this.to,j));
}else{this.frame=this.frames;this.set(this.compute(this.from,this.to,1));this.stop();}},set:function(g){return g;},compute:function(i,h,g){return f.compute(i,h,g);
},check:function(){if(!this.isRunning()){return true;}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.pass(arguments,this));
return false;}return false;},start:function(k,j){if(!this.check(k,j)){return this;}this.from=k;this.to=j;this.frame=(this.options.frameSkip)?0:-1;this.time=null;
this.transition=this.getTransition();var i=this.options.frames,h=this.options.fps,g=this.options.duration;this.duration=f.Durations[g]||g.toInt();this.frameInterval=1000/h;
this.frames=i||Math.round(this.duration/this.frameInterval);this.fireEvent("start",this.subject);b.call(this,h);return this;},stop:function(){if(this.isRunning()){this.time=null;
d.call(this,this.options.fps);if(this.frames==this.frame){this.fireEvent("complete",this.subject);if(!this.callChain()){this.fireEvent("chainComplete",this.subject);
}}else{this.fireEvent("stop",this.subject);}}return this;},cancel:function(){if(this.isRunning()){this.time=null;d.call(this,this.options.fps);this.frame=this.frames;
this.fireEvent("cancel",this.subject).clearChain();}return this;},pause:function(){if(this.isRunning()){this.time=null;d.call(this,this.options.fps);}return this;
},resume:function(){if((this.frame<this.frames)&&!this.isRunning()){b.call(this,this.options.fps);}return this;},isRunning:function(){var g=e[this.options.fps];
return g&&g.contains(this);}});f.compute=function(i,h,g){return(h-i)*g+i;};f.Durations={"short":250,normal:500,"long":1000};var e={},c={};var a=function(){var h=Date.now();
for(var j=this.length;j--;){var g=this[j];if(g){g.step(h);}}};var b=function(h){var g=e[h]||(e[h]=[]);g.push(this);if(!c[h]){c[h]=a.periodical(Math.round(1000/h),g);
}};var d=function(h){var g=e[h];if(g){g.erase(this);if(!g.length&&c[h]){delete e[h];c[h]=clearInterval(c[h]);}}};})();Fx.CSS=new Class({Extends:Fx,prepare:function(b,e,a){a=Array.from(a);
var h=a[0],g=a[1];if(g==null){g=h;h=b.getStyle(e);var c=this.options.unit;if(c&&h.slice(-c.length)!=c&&parseFloat(h)!=0){b.setStyle(e,g+c);var d=b.getComputedStyle(e);
if(!(/px$/.test(d))){d=b.style[("pixel-"+e).camelCase()];if(d==null){var f=b.style.left;b.style.left=g+c;d=b.style.pixelLeft;b.style.left=f;}}h=(g||1)/(parseFloat(d)||1)*(parseFloat(h)||0);
b.setStyle(e,h+c);}}return{from:this.parse(h),to:this.parse(g)};},parse:function(a){a=Function.from(a)();a=(typeof a=="string")?a.split(" "):Array.from(a);
return a.map(function(c){c=String(c);var b=false;Object.each(Fx.CSS.Parsers,function(f,e){if(b){return;}var d=f.parse(c);if(d||d===0){b={value:d,parser:f};
}});b=b||{value:c,parser:Fx.CSS.Parsers.String};return b;});},compute:function(d,c,b){var a=[];(Math.min(d.length,c.length)).times(function(e){a.push({value:d[e].parser.compute(d[e].value,c[e].value,b),parser:d[e].parser});
});a.$family=Function.from("fx:css:value");return a;},serve:function(c,b){if(typeOf(c)!="fx:css:value"){c=this.parse(c);}var a=[];c.each(function(d){a=a.concat(d.parser.serve(d.value,b));
});return a;},render:function(a,d,c,b){a.setStyle(d,this.serve(c,b));},search:function(a){if(Fx.CSS.Cache[a]){return Fx.CSS.Cache[a];}var c={},b=new RegExp("^"+a.escapeRegExp()+"$");
Array.each(document.styleSheets,function(f,e){var d=f.href;if(d&&d.contains("://")&&!d.contains(document.domain)){return;}var g=f.rules||f.cssRules;Array.each(g,function(k,h){if(!k.style){return;
}var j=(k.selectorText)?k.selectorText.replace(/^\w+/,function(i){return i.toLowerCase();}):null;if(!j||!b.test(j)){return;}Object.each(Element.Styles,function(l,i){if(!k.style[i]||Element.ShortStyles[i]){return;
}l=String(k.style[i]);c[i]=((/^rgb/).test(l))?l.rgbToHex():l;});});});return Fx.CSS.Cache[a]=c;}});Fx.CSS.Cache={};Fx.CSS.Parsers={Color:{parse:function(a){if(a.match(/^#[0-9a-f]{3,6}$/i)){return a.hexToRgb(true);
}return((a=a.match(/(\d+),\s*(\d+),\s*(\d+)/)))?[a[1],a[2],a[3]]:false;},compute:function(c,b,a){return c.map(function(e,d){return Math.round(Fx.compute(c[d],b[d],a));
});},serve:function(a){return a.map(Number);}},Number:{parse:parseFloat,compute:Fx.compute,serve:function(b,a){return(a)?b+a:b;}},String:{parse:Function.from(false),compute:function(b,a){return a;
},serve:function(a){return a;}}};Fx.Tween=new Class({Extends:Fx.CSS,initialize:function(b,a){this.element=this.subject=document.id(b);this.parent(a);},set:function(b,a){if(arguments.length==1){a=b;
b=this.property||this.options.property;}this.render(this.element,b,a,this.options.unit);return this;},start:function(c,e,d){if(!this.check(c,e,d)){return this;
}var b=Array.flatten(arguments);this.property=this.options.property||b.shift();var a=this.prepare(this.element,this.property,b);return this.parent(a.from,a.to);
}});Element.Properties.tween={set:function(a){this.get("tween").cancel().setOptions(a);return this;},get:function(){var a=this.retrieve("tween");if(!a){a=new Fx.Tween(this,{link:"cancel"});
this.store("tween",a);}return a;}};Element.implement({tween:function(a,c,b){this.get("tween").start(a,c,b);return this;},fade:function(d){var e=this.get("tween"),g,c=["opacity"].append(arguments),a;
if(c[1]==null){c[1]="toggle";}switch(c[1]){case"in":g="start";c[1]=1;break;case"out":g="start";c[1]=0;break;case"show":g="set";c[1]=1;break;case"hide":g="set";
c[1]=0;break;case"toggle":var b=this.retrieve("fade:flag",this.getStyle("opacity")==1);g="start";c[1]=b?0:1;this.store("fade:flag",!b);a=true;break;default:g="start";
}if(!a){this.eliminate("fade:flag");}e[g].apply(e,c);var f=c[c.length-1];if(g=="set"||f!=0){this.setStyle("visibility",f==0?"hidden":"visible");}else{e.chain(function(){this.element.setStyle("visibility","hidden");
this.callChain();});}return this;},highlight:function(c,a){if(!a){a=this.retrieve("highlight:original",this.getStyle("background-color"));a=(a=="transparent")?"#fff":a;
}var b=this.get("tween");b.start("background-color",c||"#ffff88",a).chain(function(){this.setStyle("background-color",this.retrieve("highlight:original"));
b.callChain();}.bind(this));return this;}});Fx.Morph=new Class({Extends:Fx.CSS,initialize:function(b,a){this.element=this.subject=document.id(b);this.parent(a);
},set:function(a){if(typeof a=="string"){a=this.search(a);}for(var b in a){this.render(this.element,b,a[b],this.options.unit);}return this;},compute:function(e,d,c){var a={};
for(var b in e){a[b]=this.parent(e[b],d[b],c);}return a;},start:function(b){if(!this.check(b)){return this;}if(typeof b=="string"){b=this.search(b);}var e={},d={};
for(var c in b){var a=this.prepare(this.element,c,b[c]);e[c]=a.from;d[c]=a.to;}return this.parent(e,d);}});Element.Properties.morph={set:function(a){this.get("morph").cancel().setOptions(a);
return this;},get:function(){var a=this.retrieve("morph");if(!a){a=new Fx.Morph(this,{link:"cancel"});this.store("morph",a);}return a;}};Element.implement({morph:function(a){this.get("morph").start(a);
return this;}});Fx.implement({getTransition:function(){var a=this.options.transition||Fx.Transitions.Sine.easeInOut;if(typeof a=="string"){var b=a.split(":");
a=Fx.Transitions;a=a[b[0]]||a[b[0].capitalize()];if(b[1]){a=a["ease"+b[1].capitalize()+(b[2]?b[2].capitalize():"")];}}return a;}});Fx.Transition=function(c,b){b=Array.from(b);
var a=function(d){return c(d,b);};return Object.append(a,{easeIn:a,easeOut:function(d){return 1-c(1-d,b);},easeInOut:function(d){return(d<=0.5?c(2*d,b):(2-c(2*(1-d),b)))/2;
}});};Fx.Transitions={linear:function(a){return a;}};Fx.Transitions.extend=function(a){for(var b in a){Fx.Transitions[b]=new Fx.Transition(a[b]);}};Fx.Transitions.extend({Pow:function(b,a){return Math.pow(b,a&&a[0]||6);
},Expo:function(a){return Math.pow(2,8*(a-1));},Circ:function(a){return 1-Math.sin(Math.acos(a));},Sine:function(a){return 1-Math.cos(a*Math.PI/2);},Back:function(b,a){a=a&&a[0]||1.618;
return Math.pow(b,2)*((a+1)*b-a);},Bounce:function(f){var e;for(var d=0,c=1;1;d+=c,c/=2){if(f>=(7-4*d)/11){e=c*c-Math.pow((11-6*d-11*f)/4,2);break;}}return e;
},Elastic:function(b,a){return Math.pow(2,10*--b)*Math.cos(20*b*Math.PI*(a&&a[0]||1)/3);}});["Quad","Cubic","Quart","Quint"].each(function(b,a){Fx.Transitions[b]=new Fx.Transition(function(c){return Math.pow(c,a+2);
});});(function(){var d=function(){},a=("onprogress" in new Browser.Request);var c=this.Request=new Class({Implements:[Chain,Events,Options],options:{url:"",data:"",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"text/javascript, text/html, application/xml, text/xml, */*"},async:true,format:false,method:"post",link:"ignore",isSuccess:null,emulation:true,urlEncoded:true,encoding:"utf-8",evalScripts:false,evalResponse:false,timeout:0,noCache:false},initialize:function(e){this.xhr=new Browser.Request();
this.setOptions(e);this.headers=this.options.headers;},onStateChange:function(){var e=this.xhr;if(e.readyState!=4||!this.running){return;}this.running=false;
this.status=0;Function.attempt(function(){var f=e.status;this.status=(f==1223)?204:f;}.bind(this));e.onreadystatechange=d;if(a){e.onprogress=e.onloadstart=d;
}clearTimeout(this.timer);this.response={text:this.xhr.responseText||"",xml:this.xhr.responseXML};if(this.options.isSuccess.call(this,this.status)){this.success(this.response.text,this.response.xml);
}else{this.failure();}},isSuccess:function(){var e=this.status;return(e>=200&&e<300);},isRunning:function(){return !!this.running;},processScripts:function(e){if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader("Content-type"))){return Browser.exec(e);
}return e.stripScripts(this.options.evalScripts);},success:function(f,e){this.onSuccess(this.processScripts(f),e);},onSuccess:function(){this.fireEvent("complete",arguments).fireEvent("success",arguments).callChain();
},failure:function(){this.onFailure();},onFailure:function(){this.fireEvent("complete").fireEvent("failure",this.xhr);},loadstart:function(e){this.fireEvent("loadstart",[e,this.xhr]);
},progress:function(e){this.fireEvent("progress",[e,this.xhr]);},timeout:function(){this.fireEvent("timeout",this.xhr);},setHeader:function(e,f){this.headers[e]=f;
return this;},getHeader:function(e){return Function.attempt(function(){return this.xhr.getResponseHeader(e);}.bind(this));},check:function(){if(!this.running){return true;
}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.caller.pass(arguments,this));return false;}return false;},send:function(o){if(!this.check(o)){return this;
}this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.running=true;var l=typeOf(o);if(l=="string"||l=="element"){o={data:o};}var h=this.options;
o=Object.append({data:h.data,url:h.url,method:h.method},o);var j=o.data,f=String(o.url),e=o.method.toLowerCase();switch(typeOf(j)){case"element":j=document.id(j).toQueryString();
break;case"object":case"hash":j=Object.toQueryString(j);}if(this.options.format){var m="format="+this.options.format;j=(j)?m+"&"+j:m;}if(this.options.emulation&&!["get","post"].contains(e)){var k="_method="+e;
j=(j)?k+"&"+j:k;e="post";}if(this.options.urlEncoded&&["post","put"].contains(e)){var g=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers["Content-type"]="application/x-www-form-urlencoded"+g;
}if(!f){f=document.location.pathname;}var i=f.lastIndexOf("/");if(i>-1&&(i=f.indexOf("#"))>-1){f=f.substr(0,i);}if(this.options.noCache){f+=(f.contains("?")?"&":"?")+String.uniqueID();
}if(j&&e=="get"){f+=(f.contains("?")?"&":"?")+j;j=null;}var n=this.xhr;if(a){n.onloadstart=this.loadstart.bind(this);n.onprogress=this.progress.bind(this);
}n.open(e.toUpperCase(),f,this.options.async,this.options.user,this.options.password);if(this.options.user&&"withCredentials" in n){n.withCredentials=true;
}n.onreadystatechange=this.onStateChange.bind(this);Object.each(this.headers,function(q,p){try{n.setRequestHeader(p,q);}catch(r){this.fireEvent("exception",[p,q]);
}},this);this.fireEvent("request");n.send(j);if(!this.options.async){this.onStateChange();}else{if(this.options.timeout){this.timer=this.timeout.delay(this.options.timeout,this);
}}return this;},cancel:function(){if(!this.running){return this;}this.running=false;var e=this.xhr;e.abort();clearTimeout(this.timer);e.onreadystatechange=d;
if(a){e.onprogress=e.onloadstart=d;}this.xhr=new Browser.Request();this.fireEvent("cancel");return this;}});var b={};["get","post","put","delete","GET","POST","PUT","DELETE"].each(function(e){b[e]=function(g){var f={method:e};
if(g!=null){f.data=g;}return this.send(f);};});c.implement(b);Element.Properties.send={set:function(e){var f=this.get("send").cancel();f.setOptions(e);
return this;},get:function(){var e=this.retrieve("send");if(!e){e=new c({data:this,link:"cancel",method:this.get("method")||"post",url:this.get("action")});
this.store("send",e);}return e;}};Element.implement({send:function(e){var f=this.get("send");f.send({data:this,url:e||f.options.url});return this;}});})();
if(typeof JSON=="undefined"){this.JSON={};}(function(){var special={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var escape=function(chr){return special[chr]||"\\u"+("0000"+chr.charCodeAt(0).toString(16)).slice(-4);
};JSON.validate=function(string){string=string.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"");
return(/^[\],:{}\s]*$/).test(string);};JSON.encode=JSON.stringify?function(obj){return JSON.stringify(obj);}:function(obj){if(obj&&obj.toJSON){obj=obj.toJSON();
}switch(typeOf(obj)){case"string":return'"'+obj.replace(/[\x00-\x1f\\"]/g,escape)+'"';case"array":return"["+obj.map(JSON.encode).clean()+"]";case"object":case"hash":var string=[];
Object.each(obj,function(value,key){var json=JSON.encode(value);if(json){string.push(JSON.encode(key)+":"+json);}});return"{"+string+"}";case"number":case"boolean":return""+obj;
case"null":return"null";}return null;};JSON.decode=function(string,secure){if(!string||typeOf(string)!="string"){return null;}if(secure||JSON.secure){if(JSON.parse){return JSON.parse(string);
}if(!JSON.validate(string)){throw new Error("JSON could not decode the input; security is enabled and the value is not secure.");}}return eval("("+string+")");
};})();Request.JSON=new Class({Extends:Request,options:{secure:true},initialize:function(a){this.parent(a);Object.append(this.headers,{Accept:"application/json","X-Request":"JSON"});
},success:function(c){var b;try{b=this.response.json=JSON.decode(c,this.options.secure);}catch(a){this.fireEvent("error",[c,a]);return;}if(b==null){this.onFailure();
}else{this.onSuccess(b,c);}}});(function(i,k){var l,f,e=[],c,b,d=k.createElement("div");var g=function(){clearTimeout(b);if(l){return;}Browser.loaded=l=true;
k.removeListener("DOMContentLoaded",g).removeListener("readystatechange",a);k.fireEvent("domready");i.fireEvent("domready");};var a=function(){for(var m=e.length;
m--;){if(e[m]()){g();return true;}}return false;};var j=function(){clearTimeout(b);if(!a()){b=setTimeout(j,10);}};k.addListener("DOMContentLoaded",g);var h=function(){try{d.doScroll();
return true;}catch(m){}return false;};if(d.doScroll&&!h()){e.push(h);c=true;}if(k.readyState){e.push(function(){var m=k.readyState;return(m=="loaded"||m=="complete");
});}if("onreadystatechange" in k){k.addListener("readystatechange",a);}else{c=true;}if(c){j();}Element.Events.domready={onAdd:function(m){if(l){m.call(this);
}}};Element.Events.load={base:"load",onAdd:function(m){if(f&&this==i){m.call(this);}},condition:function(){if(this==i){g();delete Element.Events.load;}return true;
}};i.addEvent("load",function(){f=true;});})(window,document);




MooTools.More={version:"1.5.0",build:"73db5e24e6e9c5c87b3a27aebef2248053f7db37"};(function(){Events.Pseudos=function(h,e,f){var d="_monitorEvents:";var c=function(i){return{store:i.store?function(j,k){i.store(d+j,k);
}:function(j,k){(i._monitorEvents||(i._monitorEvents={}))[j]=k;},retrieve:i.retrieve?function(j,k){return i.retrieve(d+j,k);}:function(j,k){if(!i._monitorEvents){return k;
}return i._monitorEvents[j]||k;}};};var g=function(k){if(k.indexOf(":")==-1||!h){return null;}var j=Slick.parse(k).expressions[0][0],p=j.pseudos,i=p.length,o=[];
while(i--){var n=p[i].key,m=h[n];if(m!=null){o.push({event:j.tag,value:p[i].value,pseudo:n,original:k,listener:m});}}return o.length?o:null;};return{addEvent:function(m,p,j){var n=g(m);
if(!n){return e.call(this,m,p,j);}var k=c(this),r=k.retrieve(m,[]),i=n[0].event,l=Array.slice(arguments,2),o=p,q=this;n.each(function(s){var t=s.listener,u=o;
if(t==false){i+=":"+s.pseudo+"("+s.value+")";}else{o=function(){t.call(q,s,u,arguments,o);};}});r.include({type:i,event:p,monitor:o});k.store(m,r);if(m!=i){e.apply(this,[m,p].concat(l));
}return e.apply(this,[i,o].concat(l));},removeEvent:function(m,l){var k=g(m);if(!k){return f.call(this,m,l);}var n=c(this),j=n.retrieve(m);if(!j){return this;
}var i=Array.slice(arguments,2);f.apply(this,[m,l].concat(i));j.each(function(o,p){if(!l||o.event==l){f.apply(this,[o.type,o.monitor].concat(i));}delete j[p];
},this);n.store(m,j);return this;}};};var b={once:function(e,f,d,c){f.apply(this,d);this.removeEvent(e.event,c).removeEvent(e.original,f);},throttle:function(d,e,c){if(!e._throttled){e.apply(this,c);
e._throttled=setTimeout(function(){e._throttled=false;},d.value||250);}},pause:function(d,e,c){clearTimeout(e._pause);e._pause=e.delay(d.value||250,this,c);
}};Events.definePseudo=function(c,d){b[c]=d;return this;};Events.lookupPseudo=function(c){return b[c];};var a=Events.prototype;Events.implement(Events.Pseudos(b,a.addEvent,a.removeEvent));
["Request","Fx"].each(function(c){if(this[c]){this[c].implement(Events.prototype);}});})();Class.refactor=function(b,a){Object.each(a,function(e,d){var c=b.prototype[d];
c=(c&&c.$origin)||c||function(){};b.implement(d,(typeof e=="function")?function(){var f=this.previous;this.previous=c;var g=e.apply(this,arguments);this.previous=f;
return g;}:e);});return b;};Class.Mutators.Binds=function(a){if(!this.prototype.initialize){this.implement("initialize",function(){});}return Array.from(a).concat(this.prototype.Binds||[]);
};Class.Mutators.initialize=function(a){return function(){Array.from(this.Binds).each(function(b){var c=this[b];if(c){this[b]=c.bind(this);}},this);return a.apply(this,arguments);
};};Class.Occlude=new Class({occlude:function(c,b){b=document.id(b||this.element);var a=b.retrieve(c||this.property);if(a&&!this.occluded){return(this.occluded=a);
}this.occluded=false;b.store(c||this.property,this);return this.occluded;}});(function(){var a={wait:function(b){return this.chain(function(){this.callChain.delay(b==null?500:b,this);
return this;}.bind(this));}};Chain.implement(a);if(this.Fx){Fx.implement(a);}if(this.Element&&Element.implement&&this.Fx){Element.implement({chains:function(b){Array.from(b||["tween","morph","reveal"]).each(function(c){c=this.get(c);
if(!c){return;}c.setOptions({link:"chain"});},this);return this;},pauseFx:function(c,b){this.chains(b).get(b||"tween").wait(c);return this;}});}})();(function(){var b=function(c){return c!=null;
};var a=Object.prototype.hasOwnProperty;Object.extend({getFromPath:function(e,f){if(typeof f=="string"){f=f.split(".");}for(var d=0,c=f.length;d<c;d++){if(a.call(e,f[d])){e=e[f[d]];
}else{return null;}}return e;},cleanValues:function(c,e){e=e||b;for(var d in c){if(!e(c[d])){delete c[d];}}return c;},erase:function(c,d){if(a.call(c,d)){delete c[d];
}return c;},run:function(d){var c=Array.slice(arguments,1);for(var e in d){if(d[e].apply){d[e].apply(d,c);}}return d;}});})();(function(){var b=null,a={},d={};
var c=function(f){if(instanceOf(f,e.Set)){return f;}else{return a[f];}};var e=this.Locale={define:function(f,j,h,i){var g;if(instanceOf(f,e.Set)){g=f.name;
if(g){a[g]=f;}}else{g=f;if(!a[g]){a[g]=new e.Set(g);}f=a[g];}if(j){f.define(j,h,i);}if(!b){b=f;}return f;},use:function(f){f=c(f);if(f){b=f;this.fireEvent("change",f);
}return this;},getCurrent:function(){return b;},get:function(g,f){return(b)?b.get(g,f):"";},inherit:function(f,g,h){f=c(f);if(f){f.inherit(g,h);}return this;
},list:function(){return Object.keys(a);}};Object.append(e,new Events);e.Set=new Class({sets:{},inherits:{locales:[],sets:{}},initialize:function(f){this.name=f||"";
},define:function(i,g,h){var f=this.sets[i];if(!f){f={};}if(g){if(typeOf(g)=="object"){f=Object.merge(f,g);}else{f[g]=h;}}this.sets[i]=f;return this;},get:function(r,j,q){var p=Object.getFromPath(this.sets,r);
if(p!=null){var m=typeOf(p);if(m=="function"){p=p.apply(null,Array.from(j));}else{if(m=="object"){p=Object.clone(p);}}return p;}var h=r.indexOf("."),o=h<0?r:r.substr(0,h),k=(this.inherits.sets[o]||[]).combine(this.inherits.locales).include("en-US");
if(!q){q=[];}for(var g=0,f=k.length;g<f;g++){if(q.contains(k[g])){continue;}q.include(k[g]);var n=a[k[g]];if(!n){continue;}p=n.get(r,j,q);if(p!=null){return p;
}}return"";},inherit:function(g,h){g=Array.from(g);if(h&&!this.inherits.sets[h]){this.inherits.sets[h]=[];}var f=g.length;while(f--){(h?this.inherits.sets[h]:this.inherits.locales).unshift(g[f]);
}return this;}});})();Locale.define("en-US","Number",{decimal:".",group:",",currency:{prefix:"$ "}});Number.implement({format:function(q){var n=this;q=q?Object.clone(q):{};
var a=function(i){if(q[i]!=null){return q[i];}return Locale.get("Number."+i);};var f=n<0,h=a("decimal"),k=a("precision"),o=a("group"),c=a("decimals");if(f){var e=a("negative")||{};
if(e.prefix==null&&e.suffix==null){e.prefix="-";}["prefix","suffix"].each(function(i){if(e[i]){q[i]=a(i)+e[i];}});n=-n;}var l=a("prefix"),p=a("suffix");
if(c!==""&&c>=0&&c<=20){n=n.toFixed(c);}if(k>=1&&k<=21){n=(+n).toPrecision(k);}n+="";var m;if(a("scientific")===false&&n.indexOf("e")>-1){var j=n.split("e"),b=+j[1];
n=j[0].replace(".","");if(b<0){b=-b-1;m=j[0].indexOf(".");if(m>-1){b-=m-1;}while(b--){n="0"+n;}n="0."+n;}else{m=j[0].lastIndexOf(".");if(m>-1){b-=j[0].length-m-1;
}while(b--){n+="0";}}}if(h!="."){n=n.replace(".",h);}if(o){m=n.lastIndexOf(h);m=(m>-1)?m:n.length;var d=n.substring(m),g=m;while(g--){if((m-g-1)%3==0&&g!=(m-1)){d=o+d;
}d=n.charAt(g)+d;}n=d;}if(l){n=l+n;}if(p){n+=p;}return n;},formatCurrency:function(b){var a=Locale.get("Number.currency")||{};if(a.scientific==null){a.scientific=false;
}a.decimals=b!=null?b:(a.decimals==null?2:a.decimals);return this.format(a);},formatPercentage:function(b){var a=Locale.get("Number.percentage")||{};if(a.suffix==null){a.suffix="%";
}a.decimals=b!=null?b:(a.decimals==null?2:a.decimals);return this.format(a);}});(function(){var e={a:/[àáâãäåăą]/g,A:/[ÀÁÂÃÄÅĂĄ]/g,c:/[ćčç]/g,C:/[ĆČÇ]/g,d:/[ďđ]/g,D:/[ĎÐ]/g,e:/[èéêëěę]/g,E:/[ÈÉÊËĚĘ]/g,g:/[ğ]/g,G:/[Ğ]/g,i:/[ìíîï]/g,I:/[ÌÍÎÏ]/g,l:/[ĺľł]/g,L:/[ĹĽŁ]/g,n:/[ñňń]/g,N:/[ÑŇŃ]/g,o:/[òóôõöøő]/g,O:/[ÒÓÔÕÖØ]/g,r:/[řŕ]/g,R:/[ŘŔ]/g,s:/[ššş]/g,S:/[ŠŞŚ]/g,t:/[ťţ]/g,T:/[ŤŢ]/g,u:/[ùúûůüµ]/g,U:/[ÙÚÛŮÜ]/g,y:/[ÿý]/g,Y:/[ŸÝ]/g,z:/[žźż]/g,Z:/[ŽŹŻ]/g,th:/[þ]/g,TH:/[Þ]/g,dh:/[ð]/g,DH:/[Ð]/g,ss:/[ß]/g,oe:/[œ]/g,OE:/[Œ]/g,ae:/[æ]/g,AE:/[Æ]/g},d={" ":/[\xa0\u2002\u2003\u2009]/g,"*":/[\xb7]/g,"'":/[\u2018\u2019]/g,'"':/[\u201c\u201d]/g,"...":/[\u2026]/g,"-":/[\u2013]/g,"&raquo;":/[\uFFFD]/g},c={ms:1,s:1000,m:60000,h:3600000},b=/(\d*.?\d+)([msh]+)/;
var a=function(h,j){var g=h,i;for(i in j){g=g.replace(j[i],i);}return g;};var f=function(g,i){g=g||"";var j=i?"<"+g+"(?!\\w)[^>]*>([\\s\\S]*?)</"+g+"(?!\\w)>":"</?"+g+"([^>]+)?>",h=new RegExp(j,"gi");
return h;};String.implement({standardize:function(){return a(this,e);},repeat:function(g){return new Array(g+1).join(this);},pad:function(g,j,i){if(this.length>=g){return this;
}var h=(j==null?" ":""+j).repeat(g-this.length).substr(0,g-this.length);if(!i||i=="right"){return this+h;}if(i=="left"){return h+this;}return h.substr(0,(h.length/2).floor())+this+h.substr(0,(h.length/2).ceil());
},getTags:function(g,h){return this.match(f(g,h))||[];},stripTags:function(g,h){return this.replace(f(g,h),"");},tidy:function(){return a(this,d);},truncate:function(g,h,k){var j=this;
if(h==null&&arguments.length==1){h="…";}if(j.length>g){j=j.substring(0,g);if(k){var i=j.lastIndexOf(k);if(i!=-1){j=j.substr(0,i);}}if(h){j+=h;}}return j;
},ms:function(){var g=b.exec(this);if(g==null){return Number(this);}return Number(g[1])*c[g[2]];}});})();String.implement({parseQueryString:function(d,a){if(d==null){d=true;
}if(a==null){a=true;}var c=this.split(/[&;]/),b={};if(!c.length){return b;}c.each(function(i){var e=i.indexOf("=")+1,g=e?i.substr(e):"",f=e?i.substr(0,e-1).match(/([^\]\[]+|(\B)(?=\]))/g):[i],h=b;
if(!f){return;}if(a){g=decodeURIComponent(g);}f.each(function(k,j){if(d){k=decodeURIComponent(k);}var l=h[k];if(j<f.length-1){h=h[k]=l||{};}else{if(typeOf(l)=="array"){l.push(g);
}else{h[k]=l!=null?[l,g]:g;}}});});return b;},cleanQueryString:function(a){return this.split("&").filter(function(e){var b=e.indexOf("="),c=b<0?"":e.substr(0,b),d=e.substr(b+1);
return a?a.call(null,c,d):(d||d===0);}).join("&");}});(function(){if(this.Hash){return;}var a=this.Hash=new Type("Hash",function(b){if(typeOf(b)=="hash"){b=Object.clone(b.getClean());
}for(var c in b){this[c]=b[c];}return this;});this.$H=function(b){return new a(b);};a.implement({forEach:function(b,c){Object.forEach(this,b,c);},getClean:function(){var c={};
for(var b in this){if(this.hasOwnProperty(b)){c[b]=this[b];}}return c;},getLength:function(){var c=0;for(var b in this){if(this.hasOwnProperty(b)){c++;
}}return c;}});a.alias("each","forEach");a.implement({has:Object.prototype.hasOwnProperty,keyOf:function(b){return Object.keyOf(this,b);},hasValue:function(b){return Object.contains(this,b);
},extend:function(b){a.each(b||{},function(d,c){a.set(this,c,d);},this);return this;},combine:function(b){a.each(b||{},function(d,c){a.include(this,c,d);
},this);return this;},erase:function(b){if(this.hasOwnProperty(b)){delete this[b];}return this;},get:function(b){return(this.hasOwnProperty(b))?this[b]:null;
},set:function(b,c){if(!this[b]||this.hasOwnProperty(b)){this[b]=c;}return this;},empty:function(){a.each(this,function(c,b){delete this[b];},this);return this;
},include:function(b,c){if(this[b]==undefined){this[b]=c;}return this;},map:function(b,c){return new a(Object.map(this,b,c));},filter:function(b,c){return new a(Object.filter(this,b,c));
},every:function(b,c){return Object.every(this,b,c);},some:function(b,c){return Object.some(this,b,c);},getKeys:function(){return Object.keys(this);},getValues:function(){return Object.values(this);
},toQueryString:function(b){return Object.toQueryString(this,b);}});a.alias({indexOf:"keyOf",contains:"hasValue"});})();Element.implement({tidy:function(){this.set("value",this.get("value").tidy());
},getTextInRange:function(b,a){return this.get("value").substring(b,a);},getSelectedText:function(){if(this.setSelectionRange){return this.getTextInRange(this.getSelectionStart(),this.getSelectionEnd());
}return document.selection.createRange().text;},getSelectedRange:function(){if(this.selectionStart!=null){return{start:this.selectionStart,end:this.selectionEnd};
}var e={start:0,end:0};var a=this.getDocument().selection.createRange();if(!a||a.parentElement()!=this){return e;}var c=a.duplicate();if(this.type=="text"){e.start=0-c.moveStart("character",-100000);
e.end=e.start+a.text.length;}else{var b=this.get("value");var d=b.length;c.moveToElementText(this);c.setEndPoint("StartToEnd",a);if(c.text.length){d-=b.match(/[\n\r]*$/)[0].length;
}e.end=d-c.text.length;c.setEndPoint("StartToStart",a);e.start=d-c.text.length;}return e;},getSelectionStart:function(){return this.getSelectedRange().start;
},getSelectionEnd:function(){return this.getSelectedRange().end;},setCaretPosition:function(a){if(a=="end"){a=this.get("value").length;}this.selectRange(a,a);
return this;},getCaretPosition:function(){return this.getSelectedRange().start;},selectRange:function(e,a){if(this.setSelectionRange){this.focus();this.setSelectionRange(e,a);
}else{var c=this.get("value");var d=c.substr(e,a-e).replace(/\r/g,"").length;e=c.substr(0,e).replace(/\r/g,"").length;var b=this.createTextRange();b.collapse(true);
b.moveEnd("character",e+d);b.moveStart("character",e);b.select();}return this;},insertAtCursor:function(b,a){var d=this.getSelectedRange();var c=this.get("value");
this.set("value",c.substring(0,d.start)+b+c.substring(d.end,c.length));if(a!==false){this.selectRange(d.start,d.start+b.length);}else{this.setCaretPosition(d.start+b.length);
}return this;},insertAroundCursor:function(b,a){b=Object.append({before:"",defaultMiddle:"",after:""},b);var c=this.getSelectedText()||b.defaultMiddle;
var g=this.getSelectedRange();var f=this.get("value");if(g.start==g.end){this.set("value",f.substring(0,g.start)+b.before+c+b.after+f.substring(g.end,f.length));
this.selectRange(g.start+b.before.length,g.end+b.before.length+c.length);}else{var d=f.substring(g.start,g.end);this.set("value",f.substring(0,g.start)+b.before+d+b.after+f.substring(g.end,f.length));
var e=g.start+b.before.length;if(a!==false){this.selectRange(e,e+d.length);}else{this.setCaretPosition(e+f.length);}}return this;}});Elements.from=function(e,d){if(d||d==null){e=e.stripScripts();
}var b,c=e.match(/^\s*(?:<!--.*?-->\s*)*<(t[dhr]|tbody|tfoot|thead)/i);if(c){b=new Element("table");var a=c[1].toLowerCase();if(["td","th","tr"].contains(a)){b=new Element("tbody").inject(b);
if(a!="tr"){b=new Element("tr").inject(b);}}}return(b||new Element("div")).set("html",e).getChildren();};(function(){var b=function(e,d){var f=[];Object.each(d,function(g){Object.each(g,function(h){e.each(function(i){f.push(i+"-"+h+(i=="border"?"-width":""));
});});});return f;};var c=function(f,e){var d=0;Object.each(e,function(h,g){if(g.test(f)){d=d+h.toInt();}});return d;};var a=function(d){return !!(!d||d.offsetHeight||d.offsetWidth);
};Element.implement({measure:function(h){if(a(this)){return h.call(this);}var g=this.getParent(),e=[];while(!a(g)&&g!=document.body){e.push(g.expose());
g=g.getParent();}var f=this.expose(),d=h.call(this);f();e.each(function(i){i();});return d;},expose:function(){if(this.getStyle("display")!="none"){return function(){};
}var d=this.style.cssText;this.setStyles({display:"block",position:"absolute",visibility:"hidden"});return function(){this.style.cssText=d;}.bind(this);
},getDimensions:function(d){d=Object.merge({computeSize:false},d);var i={x:0,y:0};var h=function(j,e){return(e.computeSize)?j.getComputedSize(e):j.getSize();
};var f=this.getParent("body");if(f&&this.getStyle("display")=="none"){i=this.measure(function(){return h(this,d);});}else{if(f){try{i=h(this,d);}catch(g){}}}return Object.append(i,(i.x||i.x===0)?{width:i.x,height:i.y}:{x:i.width,y:i.height});
},getComputedSize:function(d){d=Object.merge({styles:["padding","border"],planes:{height:["top","bottom"],width:["left","right"]},mode:"both"},d);var g={},e={width:0,height:0},f;
if(d.mode=="vertical"){delete e.width;delete d.planes.width;}else{if(d.mode=="horizontal"){delete e.height;delete d.planes.height;}}b(d.styles,d.planes).each(function(h){g[h]=this.getStyle(h).toInt();
},this);Object.each(d.planes,function(i,h){var k=h.capitalize(),j=this.getStyle(h);if(j=="auto"&&!f){f=this.getDimensions();}j=g[h]=(j=="auto")?f[h]:j.toInt();
e["total"+k]=j;i.each(function(m){var l=c(m,g);e["computed"+m.capitalize()]=l;e["total"+k]+=l;});},this);return Object.append(e,g);}});})();(function(b){var a=Element.Position={options:{relativeTo:document.body,position:{x:"center",y:"center"},offset:{x:0,y:0}},getOptions:function(d,c){c=Object.merge({},a.options,c);
a.setPositionOption(c);a.setEdgeOption(c);a.setOffsetOption(d,c);a.setDimensionsOption(d,c);return c;},setPositionOption:function(c){c.position=a.getCoordinateFromValue(c.position);
},setEdgeOption:function(d){var c=a.getCoordinateFromValue(d.edge);d.edge=c?c:(d.position.x=="center"&&d.position.y=="center")?{x:"center",y:"center"}:{x:"left",y:"top"};
},setOffsetOption:function(f,d){var c={x:0,y:0};var e={x:0,y:0};var g=f.measure(function(){return document.id(this.getOffsetParent());});if(!g||g==f.getDocument().body){return;
}e=g.getScroll();c=g.measure(function(){var i=this.getPosition();if(this.getStyle("position")=="fixed"){var h=window.getScroll();i.x+=h.x;i.y+=h.y;}return i;
});d.offset={parentPositioned:g!=document.id(d.relativeTo),x:d.offset.x-c.x+e.x,y:d.offset.y-c.y+e.y};},setDimensionsOption:function(d,c){c.dimensions=d.getDimensions({computeSize:true,styles:["padding","border","margin"]});
},getPosition:function(e,d){var c={};d=a.getOptions(e,d);var f=document.id(d.relativeTo)||document.body;a.setPositionCoordinates(d,c,f);if(d.edge){a.toEdge(c,d);
}var g=d.offset;c.left=((c.x>=0||g.parentPositioned||d.allowNegative)?c.x:0).toInt();c.top=((c.y>=0||g.parentPositioned||d.allowNegative)?c.y:0).toInt();
a.toMinMax(c,d);if(d.relFixedPosition||f.getStyle("position")=="fixed"){a.toRelFixedPosition(f,c);}if(d.ignoreScroll){a.toIgnoreScroll(f,c);}if(d.ignoreMargins){a.toIgnoreMargins(c,d);
}c.left=Math.ceil(c.left);c.top=Math.ceil(c.top);delete c.x;delete c.y;return c;},setPositionCoordinates:function(k,g,d){var f=k.offset.y,h=k.offset.x,e=(d==document.body)?window.getScroll():d.getPosition(),j=e.y,c=e.x,i=window.getSize();
switch(k.position.x){case"left":g.x=c+h;break;case"right":g.x=c+h+d.offsetWidth;break;default:g.x=c+((d==document.body?i.x:d.offsetWidth)/2)+h;break;}switch(k.position.y){case"top":g.y=j+f;
break;case"bottom":g.y=j+f+d.offsetHeight;break;default:g.y=j+((d==document.body?i.y:d.offsetHeight)/2)+f;break;}},toMinMax:function(c,d){var f={left:"x",top:"y"},e;
["minimum","maximum"].each(function(g){["left","top"].each(function(h){e=d[g]?d[g][f[h]]:null;if(e!=null&&((g=="minimum")?c[h]<e:c[h]>e)){c[h]=e;}});});
},toRelFixedPosition:function(e,c){var d=window.getScroll();c.top+=d.y;c.left+=d.x;},toIgnoreScroll:function(e,d){var c=e.getScroll();d.top-=c.y;d.left-=c.x;
},toIgnoreMargins:function(c,d){c.left+=d.edge.x=="right"?d.dimensions["margin-right"]:(d.edge.x!="center"?-d.dimensions["margin-left"]:-d.dimensions["margin-left"]+((d.dimensions["margin-right"]+d.dimensions["margin-left"])/2));
c.top+=d.edge.y=="bottom"?d.dimensions["margin-bottom"]:(d.edge.y!="center"?-d.dimensions["margin-top"]:-d.dimensions["margin-top"]+((d.dimensions["margin-bottom"]+d.dimensions["margin-top"])/2));
},toEdge:function(c,d){var e={},g=d.dimensions,f=d.edge;switch(f.x){case"left":e.x=0;break;case"right":e.x=-g.x-g.computedRight-g.computedLeft;break;default:e.x=-(Math.round(g.totalWidth/2));
break;}switch(f.y){case"top":e.y=0;break;case"bottom":e.y=-g.y-g.computedTop-g.computedBottom;break;default:e.y=-(Math.round(g.totalHeight/2));break;}c.x+=e.x;
c.y+=e.y;},getCoordinateFromValue:function(c){if(typeOf(c)!="string"){return c;}c=c.toLowerCase();return{x:c.test("left")?"left":(c.test("right")?"right":"center"),y:c.test(/upper|top/)?"top":(c.test("bottom")?"bottom":"center")};
}};Element.implement({position:function(d){if(d&&(d.x!=null||d.y!=null)){return(b?b.apply(this,arguments):this);}var c=this.setStyle("position","absolute").calculatePosition(d);
return(d&&d.returnPos)?c:this.setStyles(c);},calculatePosition:function(c){return a.getPosition(this,c);}});})(Element.prototype.position);Element.implement({isDisplayed:function(){return this.getStyle("display")!="none";
},isVisible:function(){var a=this.offsetWidth,b=this.offsetHeight;return(a==0&&b==0)?false:(a>0&&b>0)?true:this.style.display!="none";},toggle:function(){return this[this.isDisplayed()?"hide":"show"]();
},hide:function(){var b;try{b=this.getStyle("display");}catch(a){}if(b=="none"){return this;}return this.store("element:_originalDisplay",b||"").setStyle("display","none");
},show:function(a){if(!a&&this.isDisplayed()){return this;}a=a||this.retrieve("element:_originalDisplay")||"block";return this.setStyle("display",(a=="none")?"block":a);
},swapClass:function(a,b){return this.removeClass(a).addClass(b);}});Document.implement({clearSelection:function(){if(window.getSelection){var a=window.getSelection();
if(a&&a.removeAllRanges){a.removeAllRanges();}}else{if(document.selection&&document.selection.empty){try{document.selection.empty();}catch(b){}}}}});Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(b,a){this.elements=this.subject=$$(b);
this.parent(a);},compute:function(g,h,j){var c={};for(var d in g){var a=g[d],e=h[d],f=c[d]={};for(var b in a){f[b]=this.parent(a[b],e[b],j);}}return c;
},set:function(b){for(var c in b){if(!this.elements[c]){continue;}var a=b[c];for(var d in a){this.render(this.elements[c],d,a[d],this.options.unit);}}return this;
},start:function(c){if(!this.check(c)){return this;}var h={},j={};for(var d in c){if(!this.elements[d]){continue;}var f=c[d],a=h[d]={},g=j[d]={};for(var b in f){var e=this.prepare(this.elements[d],b,f[b]);
a[b]=e.from;g[b]=e.to;}}return this.parent(h,j);}});Fx.Accordion=new Class({Extends:Fx.Elements,options:{fixedHeight:false,fixedWidth:false,display:0,show:false,height:true,width:false,opacity:true,alwaysHide:false,trigger:"click",initialDisplayFx:true,resetHeight:true},initialize:function(){var g=function(h){return h!=null;
};var f=Array.link(arguments,{container:Type.isElement,options:Type.isObject,togglers:g,elements:g});this.parent(f.elements,f.options);var b=this.options,e=this.togglers=$$(f.togglers);
this.previous=-1;this.internalChain=new Chain();if(b.alwaysHide){this.options.link="chain";}if(b.show||this.options.show===0){b.display=false;this.previous=b.show;
}if(b.start){b.display=false;b.show=false;}var d=this.effects={};if(b.opacity){d.opacity="fullOpacity";}if(b.width){d.width=b.fixedWidth?"fullWidth":"offsetWidth";
}if(b.height){d.height=b.fixedHeight?"fullHeight":"scrollHeight";}for(var c=0,a=e.length;c<a;c++){this.addSection(e[c],this.elements[c]);}this.elements.each(function(j,h){if(b.show===h){this.fireEvent("active",[e[h],j]);
}else{for(var k in d){j.setStyle(k,0);}}},this);if(b.display||b.display===0||b.initialDisplayFx===false){this.display(b.display,b.initialDisplayFx);}if(b.fixedHeight!==false){b.resetHeight=false;
}this.addEvent("complete",this.internalChain.callChain.bind(this.internalChain));},addSection:function(g,d){g=document.id(g);d=document.id(d);this.togglers.include(g);
this.elements.include(d);var f=this.togglers,c=this.options,h=f.contains(g),a=f.indexOf(g),b=this.display.pass(a,this);g.store("accordion:display",b).addEvent(c.trigger,b);
if(c.height){d.setStyles({"padding-top":0,"border-top":"none","padding-bottom":0,"border-bottom":"none"});}if(c.width){d.setStyles({"padding-left":0,"border-left":"none","padding-right":0,"border-right":"none"});
}d.fullOpacity=1;if(c.fixedWidth){d.fullWidth=c.fixedWidth;}if(c.fixedHeight){d.fullHeight=c.fixedHeight;}d.setStyle("overflow","hidden");if(!h){for(var e in this.effects){d.setStyle(e,0);
}}return this;},removeSection:function(f,b){var e=this.togglers,a=e.indexOf(f),c=this.elements[a];var d=function(){e.erase(f);this.elements.erase(c);this.detach(f);
}.bind(this);if(this.now==a||b!=null){this.display(b!=null?b:(a-1>=0?a-1:0)).chain(d);}else{d();}return this;},detach:function(b){var a=function(c){c.removeEvent(this.options.trigger,c.retrieve("accordion:display"));
}.bind(this);if(!b){this.togglers.each(a);}else{a(b);}return this;},display:function(b,c){if(!this.check(b,c)){return this;}var h={},g=this.elements,a=this.options,f=this.effects;
if(c==null){c=true;}if(typeOf(b)=="element"){b=g.indexOf(b);}if(b==this.current&&!a.alwaysHide){return this;}if(a.resetHeight){var e=g[this.current];if(e&&!this.selfHidden){for(var d in f){e.setStyle(d,e[f[d]]);
}}}if((this.timer&&a.link=="chain")||(b===this.current&&!a.alwaysHide)){return this;}if(this.current!=null){this.previous=this.current;}this.current=b;
this.selfHidden=false;g.each(function(l,k){h[k]={};var j;if(k!=b){j=true;}else{if(a.alwaysHide&&((l.offsetHeight>0&&a.height)||l.offsetWidth>0&&a.width)){j=true;
this.selfHidden=true;}}this.fireEvent(j?"background":"active",[this.togglers[k],l]);for(var m in f){h[k][m]=j?0:l[f[m]];}if(!c&&!j&&a.resetHeight){h[k].height="auto";
}},this);this.internalChain.clearChain();this.internalChain.chain(function(){if(a.resetHeight&&!this.selfHidden){var i=g[b];if(i){i.setStyle("height","auto");
}}}.bind(this));return c?this.start(h):this.set(h).internalChain.callChain();}});(function(){Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(c,b){this.element=this.subject=document.id(c);
this.parent(b);if(typeOf(this.element)!="element"){this.element=document.id(this.element.getDocument().body);}if(this.options.wheelStops){var d=this.element,e=this.cancel.pass(false,this);
this.addEvent("start",function(){d.addEvent("mousewheel",e);},true);this.addEvent("complete",function(){d.removeEvent("mousewheel",e);},true);}},set:function(){var b=Array.flatten(arguments);
this.element.scrollTo(b[0],b[1]);return this;},compute:function(d,c,b){return[0,1].map(function(e){return Fx.compute(d[e],c[e],b);});},start:function(c,d){if(!this.check(c,d)){return this;
}var b=this.element.getScroll();return this.parent([b.x,b.y],[c,d]);},calculateScroll:function(g,f){var d=this.element,b=d.getScrollSize(),h=d.getScroll(),j=d.getSize(),c=this.options.offset,i={x:g,y:f};
for(var e in i){if(!i[e]&&i[e]!==0){i[e]=h[e];}if(typeOf(i[e])!="number"){i[e]=b[e]-j[e];}i[e]+=c[e];}return[i.x,i.y];},toTop:function(){return this.start.apply(this,this.calculateScroll(false,0));
},toLeft:function(){return this.start.apply(this,this.calculateScroll(0,false));},toRight:function(){return this.start.apply(this,this.calculateScroll("right",false));
},toBottom:function(){return this.start.apply(this,this.calculateScroll(false,"bottom"));},toElement:function(d,e){e=e?Array.from(e):["x","y"];var c=a(this.element)?{x:0,y:0}:this.element.getScroll();
var b=Object.map(document.id(d).getPosition(this.element),function(g,f){return e.contains(f)?g+c[f]:false;});return this.start.apply(this,this.calculateScroll(b.x,b.y));
},toElementEdge:function(d,g,e){g=g?Array.from(g):["x","y"];d=document.id(d);var i={},f=d.getPosition(this.element),j=d.getSize(),h=this.element.getScroll(),b=this.element.getSize(),c={x:f.x+j.x,y:f.y+j.y};
["x","y"].each(function(k){if(g.contains(k)){if(c[k]>h[k]+b[k]){i[k]=c[k]-b[k];}if(f[k]<h[k]){i[k]=f[k];}}if(i[k]==null){i[k]=h[k];}if(e&&e[k]){i[k]=i[k]+e[k];
}},this);if(i.x!=h.x||i.y!=h.y){this.start(i.x,i.y);}return this;},toElementCenter:function(e,f,h){f=f?Array.from(f):["x","y"];e=document.id(e);var i={},c=e.getPosition(this.element),d=e.getSize(),b=this.element.getScroll(),g=this.element.getSize();
["x","y"].each(function(j){if(f.contains(j)){i[j]=c[j]-(g[j]-d[j])/2;}if(i[j]==null){i[j]=b[j];}if(h&&h[j]){i[j]=i[j]+h[j];}},this);if(i.x!=b.x||i.y!=b.y){this.start(i.x,i.y);
}return this;}});function a(b){return(/^(?:body|html)$/i).test(b.tagName);}})();Fx.Slide=new Class({Extends:Fx,options:{mode:"vertical",wrapper:false,hideOverflow:true,resetHeight:false},initialize:function(b,a){b=this.element=this.subject=document.id(b);
this.parent(a);a=this.options;var d=b.retrieve("wrapper"),c=b.getStyles("margin","position","overflow");if(a.hideOverflow){c=Object.append(c,{overflow:"hidden"});
}if(a.wrapper){d=document.id(a.wrapper).setStyles(c);}if(!d){d=new Element("div",{styles:c}).wraps(b);}b.store("wrapper",d).setStyle("margin",0);if(b.getStyle("overflow")=="visible"){b.setStyle("overflow","hidden");
}this.now=[];this.open=true;this.wrapper=d;this.addEvent("complete",function(){this.open=(d["offset"+this.layout.capitalize()]!=0);if(this.open&&this.options.resetHeight){d.setStyle("height","");
}},true);},vertical:function(){this.margin="margin-top";this.layout="height";this.offset=this.element.offsetHeight;},horizontal:function(){this.margin="margin-left";
this.layout="width";this.offset=this.element.offsetWidth;},set:function(a){this.element.setStyle(this.margin,a[0]);this.wrapper.setStyle(this.layout,a[1]);
return this;},compute:function(c,b,a){return[0,1].map(function(d){return Fx.compute(c[d],b[d],a);});},start:function(b,e){if(!this.check(b,e)){return this;
}this[e||this.options.mode]();var d=this.element.getStyle(this.margin).toInt(),c=this.wrapper.getStyle(this.layout).toInt(),a=[[d,c],[0,this.offset]],g=[[d,c],[-this.offset,0]],f;
switch(b){case"in":f=a;break;case"out":f=g;break;case"toggle":f=(c==0)?a:g;}return this.parent(f[0],f[1]);},slideIn:function(a){return this.start("in",a);
},slideOut:function(a){return this.start("out",a);},hide:function(a){this[a||this.options.mode]();this.open=false;return this.set([-this.offset,0]);},show:function(a){this[a||this.options.mode]();
this.open=true;return this.set([0,this.offset]);},toggle:function(a){return this.start("toggle",a);}});Element.Properties.slide={set:function(a){this.get("slide").cancel().setOptions(a);
return this;},get:function(){var a=this.retrieve("slide");if(!a){a=new Fx.Slide(this,{link:"cancel"});this.store("slide",a);}return a;}};Element.implement({slide:function(d,e){d=d||"toggle";
var b=this.get("slide"),a;switch(d){case"hide":b.hide(e);break;case"show":b.show(e);break;case"toggle":var c=this.retrieve("slide:flag",b.open);b[c?"slideOut":"slideIn"](e);
this.store("slide:flag",!c);a=true;break;default:b.start(d,e);}if(!a){this.eliminate("slide:flag");}return this;}});var Drag=new Class({Implements:[Events,Options],options:{snap:6,unit:"px",grid:false,style:true,limit:false,handle:false,invert:false,preventDefault:false,stopPropagation:false,modifiers:{x:"left",y:"top"}},initialize:function(){var b=Array.link(arguments,{options:Type.isObject,element:function(c){return c!=null;
}});this.element=document.id(b.element);this.document=this.element.getDocument();this.setOptions(b.options||{});var a=typeOf(this.options.handle);this.handles=((a=="array"||a=="collection")?$$(this.options.handle):document.id(this.options.handle))||this.element;
this.mouse={now:{},pos:{}};this.value={start:{},now:{}};this.selection="selectstart" in document?"selectstart":"mousedown";if("ondragstart" in document&&!("FileReader" in window)&&!Drag.ondragstartFixed){document.ondragstart=Function.from(false);
Drag.ondragstartFixed=true;}this.bound={start:this.start.bind(this),check:this.check.bind(this),drag:this.drag.bind(this),stop:this.stop.bind(this),cancel:this.cancel.bind(this),eventStop:Function.from(false)};
this.attach();},attach:function(){this.handles.addEvent("mousedown",this.bound.start);return this;},detach:function(){this.handles.removeEvent("mousedown",this.bound.start);
return this;},start:function(a){var j=this.options;if(a.rightClick){return;}if(j.preventDefault){a.preventDefault();}if(j.stopPropagation){a.stopPropagation();
}this.mouse.start=a.page;this.fireEvent("beforeStart",this.element);var c=j.limit;this.limit={x:[],y:[]};var e,g;for(e in j.modifiers){if(!j.modifiers[e]){continue;
}var b=this.element.getStyle(j.modifiers[e]);if(b&&!b.match(/px$/)){if(!g){g=this.element.getCoordinates(this.element.getOffsetParent());}b=g[j.modifiers[e]];
}if(j.style){this.value.now[e]=(b||0).toInt();}else{this.value.now[e]=this.element[j.modifiers[e]];}if(j.invert){this.value.now[e]*=-1;}this.mouse.pos[e]=a.page[e]-this.value.now[e];
if(c&&c[e]){var d=2;while(d--){var f=c[e][d];if(f||f===0){this.limit[e][d]=(typeof f=="function")?f():f;}}}}if(typeOf(this.options.grid)=="number"){this.options.grid={x:this.options.grid,y:this.options.grid};
}var h={mousemove:this.bound.check,mouseup:this.bound.cancel};h[this.selection]=this.bound.eventStop;this.document.addEvents(h);},check:function(a){if(this.options.preventDefault){a.preventDefault();
}var b=Math.round(Math.sqrt(Math.pow(a.page.x-this.mouse.start.x,2)+Math.pow(a.page.y-this.mouse.start.y,2)));if(b>this.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});
this.fireEvent("start",[this.element,a]).fireEvent("snap",this.element);}},drag:function(b){var a=this.options;if(a.preventDefault){b.preventDefault();
}this.mouse.now=b.page;for(var c in a.modifiers){if(!a.modifiers[c]){continue;}this.value.now[c]=this.mouse.now[c]-this.mouse.pos[c];if(a.invert){this.value.now[c]*=-1;
}if(a.limit&&this.limit[c]){if((this.limit[c][1]||this.limit[c][1]===0)&&(this.value.now[c]>this.limit[c][1])){this.value.now[c]=this.limit[c][1];}else{if((this.limit[c][0]||this.limit[c][0]===0)&&(this.value.now[c]<this.limit[c][0])){this.value.now[c]=this.limit[c][0];
}}}if(a.grid[c]){this.value.now[c]-=((this.value.now[c]-(this.limit[c][0]||0))%a.grid[c]);}if(a.style){this.element.setStyle(a.modifiers[c],this.value.now[c]+a.unit);
}else{this.element[a.modifiers[c]]=this.value.now[c];}}this.fireEvent("drag",[this.element,b]);},cancel:function(a){this.document.removeEvents({mousemove:this.bound.check,mouseup:this.bound.cancel});
if(a){this.document.removeEvent(this.selection,this.bound.eventStop);this.fireEvent("cancel",this.element);}},stop:function(b){var a={mousemove:this.bound.drag,mouseup:this.bound.stop};
a[this.selection]=this.bound.eventStop;this.document.removeEvents(a);if(b){this.fireEvent("complete",[this.element,b]);}}});Element.implement({makeResizable:function(a){var b=new Drag(this,Object.merge({modifiers:{x:"width",y:"height"}},a));
this.store("resizer",b);return b.addEvent("drag",function(){this.fireEvent("resize",b);}.bind(this));}});Drag.Move=new Class({Extends:Drag,options:{droppables:[],container:false,precalculate:false,includeMargins:true,checkDroppables:true},initialize:function(b,a){this.parent(b,a);
b=this.element;this.droppables=$$(this.options.droppables);this.setContainer(this.options.container);if(this.options.style){if(this.options.modifiers.x=="left"&&this.options.modifiers.y=="top"){var c=b.getOffsetParent(),d=b.getStyles("left","top");
if(c&&(d.left=="auto"||d.top=="auto")){b.setPosition(b.getPosition(c));}}if(b.getStyle("position")=="static"){b.setStyle("position","absolute");}}this.addEvent("start",this.checkDroppables,true);
this.overed=null;},setContainer:function(a){this.container=document.id(a);if(this.container&&typeOf(this.container)!="element"){this.container=document.id(this.container.getDocument().body);
}},start:function(a){if(this.container){this.options.limit=this.calculateLimit();}if(this.options.precalculate){this.positions=this.droppables.map(function(b){return b.getCoordinates();
});}this.parent(a);},calculateLimit:function(){var j=this.element,e=this.container,d=document.id(j.getOffsetParent())||document.body,h=e.getCoordinates(d),c={},b={},k={},g={},m={};
["top","right","bottom","left"].each(function(q){c[q]=j.getStyle("margin-"+q).toInt();b[q]=j.getStyle("border-"+q).toInt();k[q]=e.getStyle("margin-"+q).toInt();
g[q]=e.getStyle("border-"+q).toInt();m[q]=d.getStyle("padding-"+q).toInt();},this);var f=j.offsetWidth+c.left+c.right,p=j.offsetHeight+c.top+c.bottom,i=0,l=0,o=h.right-g.right-f,a=h.bottom-g.bottom-p;
if(this.options.includeMargins){i+=c.left;l+=c.top;}else{o+=c.right;a+=c.bottom;}if(j.getStyle("position")=="relative"){var n=j.getCoordinates(d);n.left-=j.getStyle("left").toInt();
n.top-=j.getStyle("top").toInt();i-=n.left;l-=n.top;if(e.getStyle("position")!="relative"){i+=g.left;l+=g.top;}o+=c.left-n.left;a+=c.top-n.top;if(e!=d){i+=k.left+m.left;
if(!m.left&&i<0){i=0;}l+=d==document.body?0:k.top+m.top;if(!m.top&&l<0){l=0;}}}else{i-=c.left;l-=c.top;if(e!=d){i+=h.left+g.left;l+=h.top+g.top;}}return{x:[i,o],y:[l,a]};
},getDroppableCoordinates:function(c){var b=c.getCoordinates();if(c.getStyle("position")=="fixed"){var a=window.getScroll();b.left+=a.x;b.right+=a.x;b.top+=a.y;
b.bottom+=a.y;}return b;},checkDroppables:function(){var a=this.droppables.filter(function(d,c){d=this.positions?this.positions[c]:this.getDroppableCoordinates(d);
var b=this.mouse.now;return(b.x>d.left&&b.x<d.right&&b.y<d.bottom&&b.y>d.top);},this).getLast();if(this.overed!=a){if(this.overed){this.fireEvent("leave",[this.element,this.overed]);
}if(a){this.fireEvent("enter",[this.element,a]);}this.overed=a;}},drag:function(a){this.parent(a);if(this.options.checkDroppables&&this.droppables.length){this.checkDroppables();
}},stop:function(a){this.checkDroppables();this.fireEvent("drop",[this.element,this.overed,a]);this.overed=null;return this.parent(a);}});Element.implement({makeDraggable:function(a){var b=new Drag.Move(this,a);
this.store("dragger",b);return b;}});var Sortables=new Class({Implements:[Events,Options],options:{opacity:1,clone:false,revert:false,handle:false,dragOptions:{},unDraggableTags:["button","input","a","textarea","select","option"]},initialize:function(a,b){this.setOptions(b);
this.elements=[];this.lists=[];this.idle=true;this.addLists($$(document.id(a)||a));if(!this.options.clone){this.options.revert=false;}if(this.options.revert){this.effect=new Fx.Morph(null,Object.merge({duration:250,link:"cancel"},this.options.revert));
}},attach:function(){this.addLists(this.lists);return this;},detach:function(){this.lists=this.removeLists(this.lists);return this;},addItems:function(){Array.flatten(arguments).each(function(a){this.elements.push(a);
var b=a.retrieve("sortables:start",function(c){this.start.call(this,c,a);}.bind(this));(this.options.handle?a.getElement(this.options.handle)||a:a).addEvent("mousedown",b);
},this);return this;},addLists:function(){Array.flatten(arguments).each(function(a){this.lists.include(a);this.addItems(a.getChildren());},this);return this;
},removeItems:function(){return $$(Array.flatten(arguments).map(function(a){this.elements.erase(a);var b=a.retrieve("sortables:start");(this.options.handle?a.getElement(this.options.handle)||a:a).removeEvent("mousedown",b);
return a;},this));},removeLists:function(){return $$(Array.flatten(arguments).map(function(a){this.lists.erase(a);this.removeItems(a.getChildren());return a;
},this));},getDroppableCoordinates:function(c){var d=c.getOffsetParent();var b=c.getPosition(d);var a={w:window.getScroll(),offsetParent:d.getScroll()};
b.x+=a.offsetParent.x;b.y+=a.offsetParent.y;if(d.getStyle("position")=="fixed"){b.x-=a.w.x;b.y-=a.w.y;}return b;},getClone:function(b,a){if(!this.options.clone){return new Element(a.tagName).inject(document.body);
}if(typeOf(this.options.clone)=="function"){return this.options.clone.call(this,b,a,this.list);}var c=a.clone(true).setStyles({margin:0,position:"absolute",visibility:"hidden",width:a.getStyle("width")}).addEvent("mousedown",function(d){a.fireEvent("mousedown",d);
});if(c.get("html").test("radio")){c.getElements("input[type=radio]").each(function(d,e){d.set("name","clone_"+e);if(d.get("checked")){a.getElements("input[type=radio]")[e].set("checked",true);
}});}return c.inject(this.list).setPosition(this.getDroppableCoordinates(this.element));},getDroppables:function(){var a=this.list.getChildren().erase(this.clone).erase(this.element);
if(!this.options.constrain){a.append(this.lists).erase(this.list);}return a;},insert:function(c,b){var a="inside";if(this.lists.contains(b)){this.list=b;
this.drag.droppables=this.getDroppables();}else{a=this.element.getAllPrevious().contains(b)?"before":"after";}this.element.inject(b,a);this.fireEvent("sort",[this.element,this.clone]);
},start:function(b,a){if(!this.idle||b.rightClick||(!this.options.handle&&this.options.unDraggableTags.contains(b.target.get("tag")))){return;}this.idle=false;
this.element=a;this.opacity=a.getStyle("opacity");this.list=a.getParent();this.clone=this.getClone(b,a);this.drag=new Drag.Move(this.clone,Object.merge({droppables:this.getDroppables()},this.options.dragOptions)).addEvents({onSnap:function(){b.stop();
this.clone.setStyle("visibility","visible");this.element.setStyle("opacity",this.options.opacity||0);this.fireEvent("start",[this.element,this.clone]);
}.bind(this),onEnter:this.insert.bind(this),onCancel:this.end.bind(this),onComplete:this.end.bind(this)});this.clone.inject(this.element,"before");this.drag.start(b);
},end:function(){this.drag.detach();this.element.setStyle("opacity",this.opacity);var a=this;if(this.effect){var c=this.element.getStyles("width","height"),e=this.clone,d=e.computePosition(this.getDroppableCoordinates(e));
var b=function(){this.removeEvent("cancel",b);e.destroy();a.reset();};this.effect.element=e;this.effect.start({top:d.top,left:d.left,width:c.width,height:c.height,opacity:0.25}).addEvent("cancel",b).chain(b);
}else{this.clone.destroy();a.reset();}},reset:function(){this.idle=true;this.fireEvent("complete",this.element);},serialize:function(){var c=Array.link(arguments,{modifier:Type.isFunction,index:function(d){return d!=null;
}});var b=this.lists.map(function(d){return d.getChildren().map(c.modifier||function(e){return e.get("id");},this);},this);var a=c.index;if(this.lists.length==1){a=0;
}return(a||a===0)&&a>=0&&a<this.lists.length?b[a]:b;}});Request.Queue=new Class({Implements:[Options,Events],Binds:["attach","request","complete","cancel","success","failure","exception"],options:{stopOnFailure:true,autoAdvance:true,concurrent:1,requests:{}},initialize:function(a){var b;
if(a){b=a.requests;delete a.requests;}this.setOptions(a);this.requests={};this.queue=[];this.reqBinders={};if(b){this.addRequests(b);}},addRequest:function(a,b){this.requests[a]=b;
this.attach(a,b);return this;},addRequests:function(a){Object.each(a,function(c,b){this.addRequest(b,c);},this);return this;},getName:function(a){return Object.keyOf(this.requests,a);
},attach:function(a,b){if(b._groupSend){return this;}["request","complete","cancel","success","failure","exception"].each(function(c){if(!this.reqBinders[a]){this.reqBinders[a]={};
}this.reqBinders[a][c]=function(){this["on"+c.capitalize()].apply(this,[a,b].append(arguments));}.bind(this);b.addEvent(c,this.reqBinders[a][c]);},this);
b._groupSend=b.send;b.send=function(c){this.send(a,c);return b;}.bind(this);return this;},removeRequest:function(b){var a=typeOf(b)=="object"?this.getName(b):b;
if(!a&&typeOf(a)!="string"){return this;}b=this.requests[a];if(!b){return this;}["request","complete","cancel","success","failure","exception"].each(function(c){b.removeEvent(c,this.reqBinders[a][c]);
},this);b.send=b._groupSend;delete b._groupSend;return this;},getRunning:function(){return Object.filter(this.requests,function(a){return a.running;});
},isRunning:function(){return !!(Object.keys(this.getRunning()).length);},send:function(b,a){var c=function(){this.requests[b]._groupSend(a);this.queue.erase(c);
}.bind(this);c.name=b;if(Object.keys(this.getRunning()).length>=this.options.concurrent||(this.error&&this.options.stopOnFailure)){this.queue.push(c);}else{c();
}return this;},hasNext:function(a){return(!a)?!!this.queue.length:!!this.queue.filter(function(b){return b.name==a;}).length;},resume:function(){this.error=false;
(this.options.concurrent-Object.keys(this.getRunning()).length).times(this.runNext,this);return this;},runNext:function(a){if(!this.queue.length){return this;
}if(!a){this.queue[0]();}else{var b;this.queue.each(function(c){if(!b&&c.name==a){b=true;c();}});}return this;},runAll:function(){this.queue.each(function(a){a();
});return this;},clear:function(a){if(!a){this.queue.empty();}else{this.queue=this.queue.map(function(b){if(b.name!=a){return b;}else{return false;}}).filter(function(b){return b;
});}return this;},cancel:function(a){this.requests[a].cancel();return this;},onRequest:function(){this.fireEvent("request",arguments);},onComplete:function(){this.fireEvent("complete",arguments);
if(!this.queue.length){this.fireEvent("end");}},onCancel:function(){if(this.options.autoAdvance&&!this.error){this.runNext();}this.fireEvent("cancel",arguments);
},onSuccess:function(){if(this.options.autoAdvance&&!this.error){this.runNext();}this.fireEvent("success",arguments);},onFailure:function(){this.error=true;
if(!this.options.stopOnFailure&&this.options.autoAdvance){this.runNext();}this.fireEvent("failure",arguments);},onException:function(){this.error=true;
if(!this.options.stopOnFailure&&this.options.autoAdvance){this.runNext();}this.fireEvent("exception",arguments);}});var Asset={javascript:function(d,b){if(!b){b={};
}var a=new Element("script",{src:d,type:"text/javascript"}),e=b.document||document,c=b.onload||b.onLoad;delete b.onload;delete b.onLoad;delete b.document;
if(c){if(!a.addEventListener){a.addEvent("readystatechange",function(){if(["loaded","complete"].contains(this.readyState)){c.call(this);}});}else{a.addEvent("load",c);
}}return a.set(b).inject(e.head);},css:function(d,a){if(!a){a={};}var b=new Element("link",{rel:"stylesheet",media:"screen",type:"text/css",href:d});var c=a.onload||a.onLoad,e=a.document||document;
delete a.onload;delete a.onLoad;delete a.document;if(c){b.addEvent("load",c);}return b.set(a).inject(e.head);},image:function(c,b){if(!b){b={};}var d=new Image(),a=document.id(d)||new Element("img");
["load","abort","error"].each(function(e){var g="on"+e,f="on"+e.capitalize(),h=b[g]||b[f]||function(){};delete b[f];delete b[g];d[g]=function(){if(!d){return;
}if(!a.parentNode){a.width=d.width;a.height=d.height;}d=d.onload=d.onabort=d.onerror=null;h.delay(1,a,a);a.fireEvent(e,a,1);};});d.src=a.src=c;if(d&&d.complete){d.onload.delay(1);
}return a.set(b);},images:function(c,b){c=Array.from(c);var d=function(){},a=0;b=Object.merge({onComplete:d,onProgress:d,onError:d,properties:{}},b);return new Elements(c.map(function(f,e){return Asset.image(f,Object.append(b.properties,{onload:function(){a++;
b.onProgress.call(this,a,e,f);if(a==c.length){b.onComplete();}},onerror:function(){a++;b.onError.call(this,a,e,f);if(a==c.length){b.onComplete();}}}));
}));}};(function(){var a=this.Color=new Type("Color",function(c,d){if(arguments.length>=3){d="rgb";c=Array.slice(arguments,0,3);}else{if(typeof c=="string"){if(c.match(/rgb/)){c=c.rgbToHex().hexToRgb(true);
}else{if(c.match(/hsb/)){c=c.hsbToRgb();}else{c=c.hexToRgb(true);}}}}d=d||"rgb";switch(d){case"hsb":var b=c;c=c.hsbToRgb();c.hsb=b;break;case"hex":c=c.hexToRgb(true);
break;}c.rgb=c.slice(0,3);c.hsb=c.hsb||c.rgbToHsb();c.hex=c.rgbToHex();return Object.append(c,this);});a.implement({mix:function(){var b=Array.slice(arguments);
var d=(typeOf(b.getLast())=="number")?b.pop():50;var c=this.slice();b.each(function(e){e=new a(e);for(var f=0;f<3;f++){c[f]=Math.round((c[f]/100*(100-d))+(e[f]/100*d));
}});return new a(c,"rgb");},invert:function(){return new a(this.map(function(b){return 255-b;}));},setHue:function(b){return new a([b,this.hsb[1],this.hsb[2]],"hsb");
},setSaturation:function(b){return new a([this.hsb[0],b,this.hsb[2]],"hsb");},setBrightness:function(b){return new a([this.hsb[0],this.hsb[1],b],"hsb");
}});this.$RGB=function(e,d,c){return new a([e,d,c],"rgb");};this.$HSB=function(e,d,c){return new a([e,d,c],"hsb");};this.$HEX=function(b){return new a(b,"hex");
};Array.implement({rgbToHsb:function(){var c=this[0],d=this[1],k=this[2],h=0;var j=Math.max(c,d,k),f=Math.min(c,d,k);var l=j-f;var i=j/255,g=(j!=0)?l/j:0;
if(g!=0){var e=(j-c)/l;var b=(j-d)/l;var m=(j-k)/l;if(c==j){h=m-b;}else{if(d==j){h=2+e-m;}else{h=4+b-e;}}h/=6;if(h<0){h++;}}return[Math.round(h*360),Math.round(g*100),Math.round(i*100)];
},hsbToRgb:function(){var d=Math.round(this[2]/100*255);if(this[1]==0){return[d,d,d];}else{var b=this[0]%360;var g=b%60;var h=Math.round((this[2]*(100-this[1]))/10000*255);
var e=Math.round((this[2]*(6000-this[1]*g))/600000*255);var c=Math.round((this[2]*(6000-this[1]*(60-g)))/600000*255);switch(Math.floor(b/60)){case 0:return[d,c,h];
case 1:return[e,d,h];case 2:return[h,d,c];case 3:return[h,e,d];case 4:return[c,h,d];case 5:return[d,h,e];}}return false;}});String.implement({rgbToHsb:function(){var b=this.match(/\d{1,3}/g);
return(b)?b.rgbToHsb():null;},hsbToRgb:function(){var b=this.match(/\d{1,3}/g);return(b)?b.hsbToRgb():null;}});})();


var tmp = '';
var tmpId = '';
var elem = '';
var windowSize = '';




function insertImg (value, fieldId) {

if (value != '') $(fieldId).insertAtCursor(value, false);

}




function insertTag (fieldId, type) {

var desc = $(fieldId).getSelectedText();
var value = '';

if (type == 'a') {
var url = prompt(lang['toolbar.alink'] ,'http://');
if (url) {
if (desc == '') desc = prompt(lang['toolbar.alink2'] ,'');
value = '<a href=\"'+url+'\">'+desc+'<\/a>';
}
} else if (type == 'em' || type == 'strong' || type == 'u') {
value = (desc) ? '<'+type+'>'+desc+'<\/'+type+'>' : '<'+type+'><\/'+type+'>';
} else if (type == 'blockquote' || type == 'h1' || type == 'p') {
value = (desc) ? '\n<'+type+'>'+desc+'<\/'+type+'>\n' : '\n<'+type+'><\/'+type+'>\n';
} else if (type == 'video') {
var url = prompt(lang['toolbar.videodesc'] ,'http://');
if (url) value = '<video src=\"'+url+'\" />';
} else if (type == 'li') {
value = '\n<ul>\n<li><\/li>\n<li><\/li>\n<\/ul>\n';
}

if (value != '') $(fieldId).insertAtCursor(value, false);
}







function updateElement (id,value) {
$(id).set('html', value);
}





function alignImage (img, item) {

var subtitle = img.getProperty('title');

if (subtitle != null) {

var imageContainer = new Element('span', { 'class': 'config_imageSubtitle_'+item});
imageContainer.setStyle('width', img.offsetWidth).set('text', subtitle).inject(img, 'after');
img.setProperty('title', '');
img.inject(imageContainer, 'top');

}

}






var doLangKey = '';
var doActKey = '';
var doIdKey = '';
var doIdValue = '';
var doForward = '';

function doActivity (langKey, actKey, idKey, idValue, forward) {
doLangKey = langKey;
doActKey = actKey;
doIdKey = idKey;
doIdValue = idValue;
doForward = forward;
if (lang[langKey+'.confirm'] == undefined || lang[langKey+'.confirm'] == '') {
doActivityReal('','','');
} else {
MessageBox.confirm(lang[langKey+'.confirm'],'','','',doActivityReal);
}
}

function doActivityReal (var1,var2,var3) {

new Request.JSON({url: config['fileWeb']+'?'+doIdKey+'='+doIdValue, onComplete: function(response){
if (response.status == "true") {
if (response.forward != '') {
window.location.href = response.forward;
} else if (doForward != '') {
window.location.href = doForward;
} else {
if (response.html != undefined && response.html != '') {

if ($(response.idKey+response.idValue)) $(response.idKey+response.idValue).set('html', response.html);

} else {

if ($(response.idKey+response.idValue)) $(response.idKey+response.idValue).dispose();
if ($(response.idKeyMore+response.idValueMore)) $(response.idKeyMore+response.idValueMore).dispose();

}
}
} else {
if (response.msg != '') {
MessageBox.status(response.msg);
} else if (lang[response.langKey+'.error'] != undefined) {
MessageBox.status(lang[response.langKey+'.error']);
}
}
}}).get({'ajax': doActKey, 'langKey': doLangKey, 'forward': doForward});

}

function doSubmit (langStr, formId, buttonId) {
MessageBox.confirm(langStr,formId,buttonId,'',doSubmitReal);
}

function doSubmitReal (var1,var2,var3) {

$(var2).set('type','submit');
document.forms[var1].submit();

}





function popupResize (x, y) {

if ($('highlights') != undefined) {
var high = $('highlights').getSize();
} else {
var high = [];
high.x = high.y = 0;
}
var size = $('content').getSize();
size.x += high.x;
size.y += high.y;
size.x = (x != '') ? x : size.x + 60;
size.y = (y != '') ? y : size.y + 70;

var docSize = parent.document.getSize();
if (docSize.y-100 < size.y) size.y = docSize.y-100;
if (docSize.x-100 < size.x) size.x = docSize.x-100;

parent.SqueezeBox.asset.setProperties({'width': size.x, 'height': size.y});
parent.SqueezeBox.resize(size);

}





var statusbarCurrent = 0;
var statusbarSteps = 0;
var statusbarStatus = 0;
var statusbarTitle = '';
var statusbarContent = '';

function runStatusbar () {

statusbarCurrent++;

if (statusbarCurrent != statusbarSteps) {

var statusbarPercent = statusbarStatus * statusbarCurrent;

$('statusbarGraphic').setStyle('width', statusbarPercent+'%');
$('statusbarCounter').set('text', statusbarPercent+' %');

} else {

$('statusbarWorking').setStyle('display', 'none');
if ($('statusbarSuccess')) $('statusbarSuccess').setStyle('display', 'block');

}

}






function searchUpdate (key, elem) {

var value = elem.value;
var name = elem.get('name');
var preg = ($(key+'LoadMore') != null) ? $(key+'LoadMore').getProperty('data-preg') : '';

new Request.JSON({url: config["fileWeb"], onComplete: function(response){

if (response.status == "true") {

if ($(key+'List') != null) $(key+'List').set('html', '');
$(key+'SearchErg').set('html', response.erg);
$(key+'SearchReset').removeClass('element_hidden');

if (response.list != '') {

if (preg != '') response.list = response.list.replace(/{urlBase}/g, preg);
var els = Elements.from(response.list);
els.inject($(key+'List'), 'bottom');

if (response.button == "true") {
$(key+'LoadMore').removeClass('element_hidden');
} else {
$(key+'LoadMore').addClass('element_hidden');
}

$$(key+'List .hasstrlen').each(function(el){ spanHiddenStrlen(el); });
if (response.javascript != '') Browser.exec(response.javascript);

}

} else {

if ($(key+'LoadMore') != null) $(key+'LoadMore').addClass('element_hidden');

}

}}).get({'ajax': key+'SearchUpdate', 'key': name, 'value': value});

}






window.addEvent('domready', function() {

$$('.loadmore').each(function(item, index) {

var key = item.getProperty('data-key');
var type = item.getProperty('data-type');
var preg = item.getProperty('data-preg');
var id = '';

$(key+'LoadMoreButton').addEvent('click', function() {

//letzte ID ermitteln
var counter = 0;
if (type == 'table') {
$$('#'+key+'List tr').each(function(item, index) {
counter++;
var idTmp = item.getProperty('data-id');
if (idTmp != '') id = idTmp;
});
} else {

}

//Ajax-Request ermitteln
new Request.JSON({url: config['fileWeb'], onComplete: function(response){

if (response.status == "true") {

if (preg != '') response.html = response.html.replace(/{urlBase}/g, preg);
var els = Elements.from(response.html);
els.inject($(key+'List'), 'bottom');

if ($('loadMoreCount') != null) $('loadMoreCount').set('text', $('loadMoreCount').get('text').toInt()+response.count.toInt());

if (response.end == "true") {
$(key+'LoadMore').addClass('element_hidden');
} else {
$(key+'LoadMore').removeClass('element_hidden');
}

if (response.javascript != '') Browser.exec(response.javascript);

} else {

$(key+'LoadMore').addClass('element_hidden');

}

}}).get({'ajax': key+'LoadMore', 'more': counter, 'id': id});

return false;
});
});
});





function formMultilineAddLine (key, field) {

var jsonRequest = new Request.JSON({url: config['fileWeb'], onComplete: function(response){
if (response.status == "true") {

$(key+'Tmp').set('html', response.html);
$(key+'_'+response.index).inject($(key), 'bottom');
$(field+'_count').value = $(field+'_count').value.toInt()+1;
}
}}).get({'ajax': key+'AddLine', 'index': $(field+'_count').value});

return false;
}






function formMultilineAddLineDetail (index, key, position) {

var jsonRequest = new Request.JSON({url: config['fileWeb'], onComplete: function(response){
if (response.status == "true") {

var els = Elements.from(response.html);

if (index == '') {

els.inject($(key+'List'), position);

} else {

var orientation = (position == "after") ? "after" : "before";
els.inject($(key+'List'+index), orientation);

}
$(key+'Count').value = $(key+'Count').value.toInt()+1;
var elements = '';

//Liste durchlaufen
$$('#'+key+' > .elementsLine').each(function(item) {

if (item.getProperty('data-vita-order') != null) {
if (elements != '') elements += '::';
elements += item.getProperty('data-vita-order');
}

});

//Reihenfolge sichern
$(key+'Order').value = elements;

}
}}).get({'ajax': key+'AddLine', 'index': $(key+'Count').value});

return false;
}





function checkRadioField (field) {

$$('input[type=radio]').each(function(item, index){
if (item.get('name') == field) {
var display = (item.checked == true) ? "list-item" : "none";
$$('li.is_'+item.get('value')).each(function(li, index){
li.setStyle("display", display);
});
}
});

}






function checkCheckboxField (field) {

$$('input[type=checkbox]').each(function(item, index){
if (item.get('name') == field) {
if (item.checked == true) {
$$('.is_'+field).each(function(li, index){ li.removeClass('element_hidden'); });
$$('.isnot_'+field).each(function(li, index){ li.addClass('element_hidden'); });
} else {
$$('.is_'+field).each(function(li, index){ li.addClass('element_hidden'); });
$$('.isnot_'+field).each(function(li, index){ li.removeClass('element_hidden'); });
}
}
});

}









var myAccordion = "";

function createMyAccordion () {

myAccordion = new Fx.Accordion($('accordion'), 'h4.toggler', 'div.element', {
opacity: false,
display: -1,
alwaysHide: true,
onActive: function(toggler, element){
toggler.removeClass('symbol-arrow-right').addClass('symbol-arrow-down');
},
onBackground: function(toggler, element){
toggler.removeClass('symbol-arrow-down').addClass('symbol-arrow-right');
}
});

}






function createSlidebullets (element, auto) {

var id = element.get('id');
var autoplay = (element.hasClass('autoplay')) ? true : false;
var cursor = (element.hasClass('nocursor')) ? false : true;
var delay = element.get('data-slide-delay');
if (delay == null) delay = 4000;
var duration = element.get('data-slide-duration');
if (duration == null) duration = 750;
var style = element.get('data-slide-style');

var slidesShow = new SlideBullets(id+'List', id+'Navi', {
transition: 'fadeThroughBackground',
delay: delay,
duration: duration,
autoplay: autoplay
});

//Navigation fuer Slideshow  erzeugen
var slidesNaviCounter = 0;


//Slideshow mit Buttons anzeigen
if (style == 'buttons') {

//Navigation fuer Slideshow  erzeugen
var slidesNavi = new Element('div').addClass('slidesbuttons btn-group').inject($(id), 'top');
var slideActive = 0;

$$('#'+id+'List li.slide').each(function(element, index){

var size = element.getComputedSize();
var title = element.get('data-slide-title');
if (title == '') title = index+1;
element.set('id', id+'List'+index);

if (slidesNaviCounter <=0) {
$(id).setStyle('height', (size.height+80)+'px');
$(id+'List').setStyle('height', size.height+'px');
}

var slidesNaviElement = new Element('a').addClass('btn symbolblock btn-header').setProperty('id', id+'Navi'+(index+1)).set('text', title).inject(slidesNavi, 'bottom');
if (index == 0) slidesNaviElement.addClass('active');
slidesNaviElement.addEvent('click', function(){
$(id).setStyle('height', (size.height+80)+'px');
$(id+'List').setStyle('height', size.height+'px');
var currentIndex = slidesShow.slides.indexOf(slidesShow.current);
var transition = (currentIndex < index) ? 'pushLeft' : 'pushRight';
slidesShow.show(index, { transition: transition });
});

if (element.hasClass('active')) slideActive = slidesNaviCounter;

slidesNaviCounter++;
});

if (slideActive > 0) slidesShow.show(slideActive, { transition: 'crossFade' });

//Slideshow mit Punkten anzeigen
} else {

//Navigation fuer Slideshow  erzeugen
var slidesNavi = new Element('ul').addClass('slidesnavi').inject($(id), 'bottom');

$$('#'+id+'List li.slide').each(function(element, index){
var slidesNaviElement = new Element('li').setProperty('id', id+'Navi'+(index+1)).set('text', index+1).inject(slidesNavi, 'bottom');
if (index == 0) slidesNaviElement.addClass('active');
slidesNaviElement.addEvent('click', function(){
var currentIndex = slidesShow.slides.indexOf(slidesShow.current);
var transition = (currentIndex < index) ? 'pushLeft' : 'pushRight';
slidesShow.show(index, { transition: transition });
});
slidesNaviCounter++;
});
}

if (slidesNaviCounter <= 1) {
slidesNavi.dispose();
} else {
slidesNavi.addClass('slidescount'+slidesNaviCounter);
}

if (slidesNaviCounter > 1 && cursor) {

var showNext = new Element('span').addClass('shownext').inject(slidesNavi, 'before');
showNext.addEvent('click', function(e){

var currentIndex = slidesShow.slides.indexOf(slidesShow.current);
currentIndex += 1;
if ($(id+'Navi'+(currentIndex+1)) != null) {
slidesShow.show(currentIndex, { transition: 'pushLeft' });
} else {
slidesShow.show(0, { transition: 'pushRight' });
}

});

var showBefore = new Element('span').addClass('showbefore').inject(slidesNavi, 'before');
showBefore.addEvent('click', function(e){

var currentIndex = slidesShow.slides.indexOf(slidesShow.current);
currentIndex -= 1;
if ($(id+'Navi'+(currentIndex+1)) != null) {
slidesShow.show(currentIndex, { transition: 'pushRight' });
} else {
slidesShow.show(slidesNaviCounter-1, { transition: 'pushLeft' });
}

});
}
}








function highlightsFilter (actKey, type, key, value) {

new Request.JSON({url: config['fileWeb'], onRequest: function(instance) { $('filterButton').removeClass('symbol-arrow-up').removeClass('symbol-arrow-down').addClass('symbol-busy').set('text', lang["spinner.working"]); }, onComplete: function(response){
if (response.status == "true") {

if (type == 'open') {

$('filter').addClass('open');
$('filter').set('html', response.code);
var size = $('filterList').getComputedSize();
$$('#filterList li').fade('hide');
$('filterList').setStyles({'height': '0px', 'display': 'block'});
$('filterList').set('tween', { onComplete: function() { $$('#filterList li').fade('show'); } }).tween('height', size.height);

} else {

$('filterList').fade('hide');
$('filterListFrame').set('tween', { onComplete: function() { $('filter').set('html', response.code); } }).tween('height', '0px');

}

}
}}).get({'ajax': actKey, 'type': type, 'key': key, 'value': value});

}







function spanHiddenStrlen (el) {

if (!el.hasClass('donestrlen')) {

el.addClass('donestrlen');

el.getElements('span.hiddenstrlen').each(function(span){

span.setStyle('display', 'none');

var dotted = (span.getProperty('data-dotted') != null) ? span.getProperty('data-dotted') : ' ... ';
var showmore = (span.getProperty('data-more') != null) ? span.getProperty('data-more') : lang['hidden.showmore'];
var showDotted = new Element('span').set('text', dotted).inject(span, 'before');
var showMore = new Element('span').addClass('strlenbutton').set('text', showmore).inject(span, 'before');
showMore.addEvent('click', function(e){

showMore.dispose();
showDotted.dispose();
span.setStyle('display', 'inline');

});
});
}
}








function dateTransfer  (id, date) {

parent.document.getElementById(id).value = date;
parent.SqueezeBox.close();

}






window.addEvent('domready', function() {

var size = window.getSize();
windowSize = size;

//Groesse der Youtube-Videos anpassen
var resizes = [];
if (size.x < 375) {
resizes = [290, 163, 250];
} else if (size.x < 414) {
resizes = [345, 194, 350];
} else if (size.x < 499) {
resizes = [415, 233, 450];
}
if (resizes.length > 1) {
$$('.youtubevideo').each(function(el){
el.set('width', resizes[0]).set('height', resizes[1]);
});

$$('.fblikebox').each(function(el){
el.set('width', resizes[0]).set('height', resizes[2]).setStyles({width: resizes[0]+'px', height: resizes[2]+'px', 'margin-bottom': '15px'});
var href = el.get('src');
href = href.replace(/width=400/g, "width="+resizes[0]);
el.set('src', href);
});
$$('.twitterbox').each(function(el){
el.set('width', resizes[0]).set('height', resizes[2]);
});
}

//Accordion
createMyAccordion();

//Dropdown aktivieren
(function($) {

var activeClass = 'open', showingDropdown, showingMenu, showingParent;

var hideMenu = function() {
if(showingDropdown) {
showingDropdown.removeClass(activeClass);
showingMenu.setStyle('display','none');
}
};

$$('.dropdown-toggle').each(function(dropdown) {

var menu = dropdown.getNext('.dropdown-menu'), parent = dropdown.getParent('div');

var showMenu = function() {
hideMenu();
showingDropdown = dropdown.addClass('open');
showingMenu = menu.setStyle('display','block');
showingParent = parent;
};

dropdown.addEvent('click',function(e) {
if(e) e.stop();
if (dropdown.hasClass(activeClass)) {
hideMenu();
} else {
showMenu();
}
});
});

$(document.body).addEvent('click',function(e) {
if(showingParent && !e.target || !$(e.target).getParents().contains(showingParent)) {
hideMenu();
}
});
})(document.id);

//Text in verkuerzter Form darstellen
$$('.hasstrlen').each(function(el){ spanHiddenStrlen(el); });

//Fullscreen bei iPhone beruecksichtigen
if (("standalone" in window.navigator) && window.navigator.standalone){
var a=document.getElementsByTagName("a");
for(var i=0;i<a.length;i++) {
if(!a[i].onclick && a[i].getAttribute("target") != "_blank") {
a[i].onclick=function() {
window.location=this.getAttribute("href");
return false;
}
}
}
}

//Datum verwalten
$$('input.isdate').each(function(el){

var id = el.get('id');

$(id+'_icon').addEvent('click', function(e){
SqueezeBox.fromElement($('content'), {handler:'iframe',size:{x:375,y:350},url: config["fileWeb"]+'?popup=calendarChoice&id='+id+'&value='+el.value});
});

});

//Verlauf als Highlight anzeigen
if ($('contentHistory') != null) {

if ($('highlightsframe') != null && size.x > 1200) {

if ($('contentHistoryBack') != null) {

var arrow = new Element('a', {'id': 'highlightsArrowLeft', 'class': 'symbolblock symbol-arrow-left', 'href': $('contentHistoryBack').get('href')});
arrow.inject($('highlights'), 'top');

}

if ($('contentHistoryNext') != null) {

var arrow = new Element('a', {'id': 'highlightsArrowRight', 'class': 'symbolblock symbol-arrow-right', 'href': $('contentHistoryNext').get('href')});
arrow.inject($('highlights'), 'top');

}

}

//Navigation per Tastatur erzeugen
$(document).addEvent('keyup', function(event){

if (event.key == 'left') {
window.location=$('contentHistoryBack').get('href');
} else if (event.key == 'right') {
window.location=$('contentHistoryNext').get('href');
}

});

}

//Spinner anzeigen, sobald Button geklickt wurde
$$('.usewaiting').each(function(item){

var btnContainer = new Element('span');
btnContainer.inject(item, 'after');
item.inject(btnContainer, 'top');

btnContainer.addEvent('click', function(e){

if (item.get('tag') == "input") {
item.setProperty('data-label', item.getProperty('value')).addClass('waiting').setProperty('value', lang['spinner.working']).fade(0.7);
} else {
e.stop();
item.set('text', lang['spinner.working']).removeProperty('class').addClass('symbol-busy').addClass('btn');
self.location = item.getProperty('href');
}

});

});

//mobiles Menue anzeigen / verstecken
var mobileHeader = $('mobileHeader');
if (mobileHeader != null) {

mobileHeader.addEvent('click', function(e){

if ($('body').hasClass('show-nav')) {
$('body').removeClass('show-nav');
$('mobileButton').removeClass('symbol-cancel').addClass('symbol-menu');
} else {
$('body').addClass('show-nav');
$('mobileButton').removeClass('symbol-menu').addClass('symbol-cancel');

var box = new Element('div');
box.setStyles({'height': '100%', 'display': 'block', 'width': '100%', 'background': 'rgba(255,255,255,0.3)', 'position': 'absolute', 'top': '0px', 'left': '0px', 'z-index': '100', 'cursor': 'pointer'}).inject($('wrapper'), 'top').addEvent('click', function() {

$('body').removeClass('show-nav');
$('mobileButton').removeClass('symbol-cancel').addClass('symbol-menu');
box.dispose();

});

var scroll = window.getScroll();
$('navi').setStyle('top', scroll.y+'px');
$('theme').setStyle('top', scroll.y+'px');

    window.addEvent('scroll', function() {
var scroll = window.getScroll();
$('navi').setStyle('top', scroll.y+'px');
$('theme').setStyle('top', scroll.y+'px');
});

}

});
}

});



window.addEvent('load', function() {

//Slideshow
$$('.slidebullets').each(function(element, index) {
createSlidebullets(element);
});

// SqueezeBox starten
SqueezeBox.assign($$('a.boxed'));

//Ausrichtung von Bilder ausfuehren
['left', 'center', 'right'].each(function(item, index) {
$$('.align_'+item).each(function(img) { alignImage(img, item); });
});

    // Intensify all images with the 'intense' classname.
    var elements = document.querySelectorAll('.intense');
    if (elements.length > 0) Intense(elements);

});






function createFloatingBlocks () {

windowSize = window.getSize();

var column = 4;
var colHeight = [0,0,0,0];
var min = 0;

if (windowSize.x < 500) {
column = 1;
}

if (column > 1) {

$$('.item').each(function(item, index) {

var smallest = [1000,0];
colHeight.each(function(col, index) {
    if (index < column && col < smallest[0]) smallest = [col, index];
});

var dim = item.getComputedSize();
var height = dim.height+20;

item.setStyle("display", "block");
item.setStyle("position", "absolute");
item.setStyle("left", (smallest[1]*219)+'px');
item.setStyle("top", colHeight[smallest[1]]+'px');
item.addClass("col"+smallest[1]);

colHeight[smallest[1]] += height;

console.log(colHeight[0]+'-'+colHeight[1]+'-'+colHeight[2]);

});

var max = 0;
colHeight.each(function(col, index) {
if (col > max) max = col;
});
max += 20;
$('floatingBlocks').setStyle('height', max+'px');
}

}


window.addEvent('load', function() {
if ($('floatingBlocks') != null) {
createFloatingBlocks();
}
});

var timerEparti;

window.addEvent('resize', function(){

if ($('floatingBlocks') != null) {

clearTimeout(timerEparti);
timerEparti = (function(){

createFloatingBlocks();

}).delay(50);
}
});


var SqueezeBox={presets:{onOpen:Function.from(42),onClose:Function.from(42),onUpdate:Function.from(42),onResize:Function.from(42),onMove:Function.from(42),onShow:Function.from(42),onHide:Function.from(42),size:{x:600,y:450},sizeLoading:{x:200,y:150},marginInner:{x:20,y:20},marginImage:{x:50,y:75},handler:false,target:null,closable:true,closeBtn:true,zIndex:65555,overlayOpacity:.8,classWindow:"",classOverlay:"",overlayFx:{},resizeFx:{},contentFx:{},parse:"data-boxed-details",parseSecure:false,shadow:false,document:null,ajaxOptions:{}},initialize:function(e){if(this.options)return this;this.presets=Object.merge(this.presets,e);this.doc=this.presets.document||document;this.options={};this.setOptions(this.presets).build();this.bound={window:this.reposition.bind(this,[null]),scroll:this.checkTarget.bind(this),close:this.close.bind(this),key:this.onKey.bind(this)};this.isOpen=this.isLoading=false;return this},build:function(){this.overlay=new Element("div",{id:"sbox-overlay",styles:{display:"none",zIndex:this.options.zIndex}});this.win=new Element("div",{id:"sbox-window",styles:{display:"none",zIndex:this.options.zIndex+2}});if(this.options.shadow){if(Browser.Engine.webkit420){this.win.setStyle("-webkit-box-shadow","0 0 10px rgba(0, 0, 0, 0.7)")}else if(!Browser.Engine.trident4){var e=(new Element("div",{"class":"sbox-bg-wrap"})).inject(this.win);var t=function(e){this.overlay.fireEvent("click",[e])}.bind(this);["n","ne","e","se","s","sw","w","nw"].each(function(n){(new Element("div",{"class":"sbox-bg sbox-bg-"+n})).inject(e).addEvent("click",t)})}}this.content=(new Element("div",{id:"sbox-content"})).inject(this.win);this.closeBtn=(new Element("a",{id:"sbox-btn-close",href:"#"})).inject(this.win);this.fx={overlay:(new Fx.Tween(this.overlay,Object.merge({property:"opacity",onStart:Events.prototype.clearChain,duration:250,link:"cancel"},this.options.overlayFx))).set(0),win:new Fx.Morph(this.win,Object.merge({onStart:Events.prototype.clearChain,unit:"px",duration:250,transition:Fx.Transitions.Quint.easeOut,link:"cancel",unit:"px"},this.options.resizeFx)),content:(new Fx.Tween(this.content,Object.merge({property:"opacity",duration:250,link:"cancel"},this.options.contentFx))).set(0)};$(this.doc.body).adopt(this.overlay,this.win)},assign:function(e,t){return($(e)||$$(e)).addEvent("click",function(){return!SqueezeBox.fromElement(this,t)})},open:function(e,t){this.initialize();if(this.element!=null)this.trash();this.element=$(e)||false;this.setOptions(Object.merge(this.presets,t||{}));if(this.element&&this.options.parse){var n=this.element.getProperty(this.options.parse);if(n&&(n=JSON.decode(n,this.options.parseSecure)))this.setOptions(n)}this.url=(this.element?this.element.get("href"):e)||this.options.url||"";this.assignOptions();var r=r||this.options.handler;if(r)return this.setContent(r,this.parsers[r].call(this,true));var i=false;return this.parsers.some(function(e,t){var n=e.call(this);if(n){i=this.setContent(t,n);return true}return false},this)},fromElement:function(e,t){return this.open(e,t)},assignOptions:function(){this.overlay.set("class",this.options.classOverlay);this.win.set("class",this.options.classWindow)},close:function(e){var t=typeOf(e)=="event"||typeOf(e)=="domevent";if(t)e.stop();if(!this.isOpen||t&&!Function.from(this.options.closable).call(this,e))return this;this.fx.overlay.start(0).chain(this.toggleOverlay.bind(this));this.win.setStyle("display","none");this.fireEvent("onClose",[this.content]);this.trash();this.toggleListeners();this.isOpen=false;return this},trash:function(){this.element=this.asset=null;this.content.empty();this.options={};this.removeEvents().setOptions(this.presets).callChain()},onError:function(){this.asset=null;this.setContent("string",this.options.errorMsg||"An error occurred")},setContent:function(e,t){if(!this.handlers[e])return false;this.content.className="sbox-content-"+e;this.applyTimer=this.applyContent.delay(this.fx.overlay.options.duration,this,this.handlers[e].call(this,t));if(this.overlay.retrieve("opacity"))return this;this.toggleOverlay(true);this.fx.overlay.start(this.options.overlayOpacity);return this.reposition()},applyContent:function(e,t){if(!this.isOpen&&!this.applyTimer)return;this.applyTimer=clearTimeout(this.applyTimer);this.hideContent();if(!e){this.toggleLoading(true)}else{if(this.isLoading)this.toggleLoading(false);this.fireEvent("onUpdate",[this.content],20)}if(e){if(["string","array"].contains(typeOf(e)))this.content.set("html",e);else if(!this.content.contains(e))this.content.adopt(e)}this.callChain();if(!this.isOpen){this.toggleListeners(true);this.resize(t,true);this.isOpen=true;this.fireEvent("onOpen",[this.content])}else{this.resize(t)}},resize:function(e,t){this.showTimer=clearTimeout(this.showTimer||null);var n=this.doc.getSize(),r=this.doc.getScroll();this.size=Object.merge(this.isLoading?this.options.sizeLoading:this.options.size,e);var i={width:this.size.x,height:this.size.y,left:(r.x+(n.x-this.size.x-this.options.marginInner.x)/2).toInt(),top:(r.y+(n.y-this.size.y-this.options.marginInner.y)/2).toInt()};this.hideContent();if(!t){this.fx.win.start(i).chain(this.showContent.bind(this))}else{this.win.setStyles(i).setStyle("display","");this.showTimer=this.showContent.delay(50,this)}return this.reposition()},toggleListeners:function(e){var t=e?"addEvent":"removeEvent";this.closeBtn[t]("click",this.bound.close);this.overlay[t]("click",this.bound.close);this.doc[t]("keydown",this.bound.key)[t]("mousewheel",this.bound.scroll);this.doc.getWindow()[t]("resize",this.bound.window)[t]("scroll",this.bound.window)},toggleLoading:function(e){this.isLoading=e;this.win[e?"addClass":"removeClass"]("sbox-loading");if(e)this.fireEvent("onLoading",[this.win])},toggleOverlay:function(e){var t=this.doc.getSize().x;this.overlay.setStyle("display",e?"":"none");this.doc.body[e?"addClass":"removeClass"]("body-overlayed");if(e){this.scrollOffset=this.doc.getWindow().getSize().x-t;this.doc.body.setStyle("margin-right",this.scrollOffset)}else{this.doc.body.setStyle("margin-right","")}},showContent:function(){if(this.content.get("opacity"))this.fireEvent("onShow",[this.win]);this.fx.content.start(1)},hideContent:function(){if(!this.content.get("opacity"))this.fireEvent("onHide",[this.win]);this.fx.content.cancel().set(0)},onKey:function(e){switch(e.key){case"esc":this.close(e);case"up":case"down":return false}},checkTarget:function(e){return this.content.contains(e.target)},reposition:function(){var e=this.doc.getSize(),t=this.doc.getScroll(),n=this.doc.getScrollSize();this.overlay.setStyles({width:n.x+"px",height:n.y+"px"});this.win.setStyles({left:(t.x+(e.x-this.win.offsetWidth)/2-this.scrollOffset).toInt()+"px",top:(t.y+(e.y-this.win.offsetHeight)/2).toInt()+"px"});return this.fireEvent("onMove",[this.overlay,this.win])},removeEvents:function(e){if(!this.$events)return this;if(!e)this.$events=null;else if(this.$events[e])this.$events[e]=null;return this},extend:function(e){return Object.append(this,e)},handlers:new Hash,parsers:new Hash};SqueezeBox.extend(new Events(Function.from(42))).extend(new Options(Function.from(42))).extend(new Chain(Function.from(42)));SqueezeBox.parsers.extend({image:function(e){return e||/\.(?:jpg|png|gif)$/i.test(this.url)?this.url:false},clone:function(e){if($(this.options.target))return $(this.options.target);if(this.element&&!this.element.parentNode)return this.element;var t=this.url.match(/#([\w-]+)$/);return t?$(t[1]):e?this.element:false},ajax:function(e){return e||this.url&&!/^(?:javascript|#)/i.test(this.url)?this.url:false},iframe:function(e){return e||this.url?this.url:false},youtube:function(e){return e||this.url?this.url:false},string:function(e){return true}});SqueezeBox.handlers.extend({image:function(e){var t,n=new Image;this.asset=null;n.onload=n.onabort=n.onerror=function(){n.onload=n.onabort=n.onerror=null;if(!n.width){this.onError.delay(10,this);return}var e=this.doc.getSize();e.x-=this.options.marginImage.x;e.y-=this.options.marginImage.y;t={x:n.width,y:n.height};for(var r=2;r--;){if(t.x>e.x){t.y*=e.x/t.x;t.x=e.x}else if(t.y>e.y){t.x*=e.y/t.y;t.y=e.y}}t.x=t.x.toInt();t.y=t.y.toInt();this.asset=$(n);n=null;this.asset.width=t.x;this.asset.height=t.y;this.applyContent(this.asset,t)}.bind(this);n.src=e;if(this.element.get("title")!=""){var r=new Element("span",{html:this.element.get("title"),id:"sbox-caption"});r.inject($("sbox-content"))}if(n&&n.onload&&n.complete)n.onload();return this.asset?[this.asset,t]:null},clone:function(e){if(e)return e.clone();return this.onError()},adopt:function(e){if(e)return e;return this.onError()},ajax:function(e){var t=this.options.ajaxOptions||{};this.asset=(new Request.HTML(Object.merge({method:"get",evalScripts:false},this.options.ajaxOptions))).addEvents({onSuccess:function(e){this.applyContent(e);if(t.evalScripts!==null&&!t.evalScripts)Browser.exec(this.asset.response.javascript);this.fireEvent("onAjax",[e,this.asset]);this.asset=null}.bind(this),onFailure:this.onError.bind(this)});this.asset.send.delay(10,this.asset,[{url:e}])},iframe:function(e){this.asset=new Element("iframe",Object.merge({src:e,frameBorder:0,width:this.options.size.x,height:this.options.size.y},this.options.iframeOptions));if(this.options.iframePreload){this.asset.addEvent("load",function(){this.applyContent(this.asset.setStyle("display",""))}.bind(this));this.asset.setStyle("display","none").inject(this.content);return false}return this.asset},youtube:function(e){this.options.size.x=880;this.options.size.y=520;this.asset=new Element("iframe",{src:config["fileWeb"]+"?popup=youtubeShow&url="+escape(e),frameBorder:0,width:880,height:500});return this.asset},string:function(e){return e}});SqueezeBox.handlers.url=SqueezeBox.handlers.ajax;SqueezeBox.parsers.url=SqueezeBox.parsers.ajax;SqueezeBox.parsers.adopt=SqueezeBox.parsers.clone


var MessageBox={init:function(a){this.options=Object.extend({resizeTransition:Fx.Transitions.sineInOut,resizeDuration:400,initialWidth:450,initialHeight:100,animateCaption:false},a||{});this.eventPosition=this.position.bind(this);this.over=new Element('div').setProperty('id','lbOverlay').inject(document.body).fade('hide');this.center=new Element('div').setProperty('id','lbCenter').setStyles({width:this.options.initialWidth+'px',height:'auto',marginLeft:'-'+(this.options.initialWidth/2)+'px',display:'none'}).inject(document.body);this.buttons=new Element('div').setProperty('id','lbButtons').inject(this.center);this.over.onclick=this.close.bind(this);this.isOpen=this.isLoading=false},open:function(){this.position();this.setup(true);this.top=window.getScrollTop()+(window.getHeight()/15)+100;this.center.setStyles({top:this.top+'px',display:''});this.over.fade(0.8);this.isOpen=true;return false},position:function(){this.over.setStyles({top:window.getScrollTop()+'px',height:window.getHeight()+'px'})},setup:function(b){var c=Array.from(document.getElementsByTagName('object'));if(window.ie)c.extend(document.getElementsByTagName('select'));c.each(function(a){a.style.visibility=b?'hidden':''});var d=b?'addEvent':'removeEvent';window[d]('scroll',this.eventPosition)[d]('resize',this.eventPosition);this.step=0},confirm:function(a,b,c,d,e){this.buttons.set('html','');this.open();this.confirmText=new Element('p');this.confirmText.set('html',a);this.confirmButtonYes=new Element('input',{'id':'confirmButtonYes','type':'submit','value':lang['tooltip.yes'],'class':'btn btn-large btn-inverse','styles':{'margin-right':'10px'}});this.confirmButtonNo=new Element('input',{'type':'submit','value':lang["tooltip.no"],'class':'btn btn-large'});this.confirmButtonYes.addEvent('click',function(){this.close();e(b,c,d)}.bind(this));this.confirmButtonNo.addEvent('click',function(){this.close();return false}.bind(this));this.confirmText.inject(this.buttons);this.confirmButtonYes.inject(this.buttons);this.confirmButtonNo.inject(this.buttons);$('confirmButtonYes').focus()},status:function(a){this.buttons.set('html','');this.open();this.confirmText=new Element('div');this.confirmText.set('html',a);this.confirmButtonOk=new Element('input',{'id':'confirmButtonOk','type':'submit','value':lang["tooltip.close"],'class':'btn btn-large btn-inverse','styles':{'margin-top':'10px','margin-right':'10px'}});this.confirmButtonOk.addEvent('click',function(){this.close();return false}.bind(this));this.confirmText.inject(this.buttons);this.confirmButtonOk.inject(this.buttons);$('confirmButtonOk').focus()},input:function(a,b,c,d){this.buttons.set('html','');this.open();this.confirmText=new Element('p');this.confirmText.set('html',a);this.messageTextarea=new Element('textarea',{'id':'messageTextarea','class':'text','value':c,'styles':{'display':'block','height':'100px','width':'100%','margin-bottom':'20px'}});this.confirmButtonYes=new Element('input',{'id':'confirmButtonYes','type':'submit','value':b,'class':'btn btn-large btn-inverse','styles':{'margin-right':'10px'}});this.confirmButtonNo=new Element('input',{'type':'submit','value':lang["tooltip.cancel"],'class':'btn btn-large'});this.confirmButtonYes.addEvent('click',function(){this.close();d($('messageTextarea').value)}.bind(this));this.confirmButtonNo.addEvent('click',function(){this.close();return false}.bind(this));this.confirmText.inject(this.buttons);this.messageTextarea.inject(this.buttons);this.confirmButtonYes.inject(this.buttons);this.confirmButtonNo.inject(this.buttons);$('confirmButtonYes').focus()},close:function(e){var a=(typeOf(e)=='event');if(a)e.stop();if(!this.isOpen||(a&&!Function.from(this.options.closable).call(this,e)))return this;this.over.fade('hide');this.center.setStyle('display','none');this.isOpen=false;return this}};window.addEvent('load',MessageBox.init.bind(MessageBox));



var Loop=new Class({loopCount:0,isStopped:true,isLooping:false,loopMethod:function(){},setLoop:function(e,t){if(this.isLooping){this.stopLoop();var n=true}else{var n=false}this.loopMethod=e;this.loopDelay=t||3e3;if(n)this.startLoop();return this},stopLoop:function(){this.isStopped=true;this.isLooping=false;clearTimeout(this.periodical);return this},startLoop:function(e){if(this.isStopped){var e=e?e:this.loopDelay;this.isStopped=false;this.isLooping=true;this.periodical=this.looper.periodical(e,this)}return this},looper:function(){this.loopCount++;this.loopMethod(this.loopCount);return this}})


var SlideBullets=new Class({Implements:[Options,Events,Loop],options:{delay:7e3,transition:"crossFade",duration:"500",autoplay:false},initialize:function(e,t,n){this.setOptions(n);this.setLoop(this.showNext,this.options.delay);this.element=document.id(e);this.slides=this.element.getChildren();this.current=this.slides[0];this.naviKey=t;this.transitioning=false;this.setup();if(this.options.autoplay)this.play()},setup:function(){this.setupElement().setupSlides(true);return this},setupElement:function(){var e=this.element;if(e.getStyle("position")!="absolute"&&e!=document.body)e.setStyle("position","relative");return this},setupSlides:function(e){this.slides.each(function(t,n){this.storeTransition(t).reset(t);if(e&&n!=0)t.setStyle("display","none")},this);return this},storeTransition:function(e){var t=e.get("class");var n=/transition:[a-zA-Z]+/;var r=/duration:[0-9]+/;var i=this.options.transition;var s=this.options.duration;e.store("ssTransition",i).store("ssDuration",s);return this},getTransition:function(e){return e.retrieve("ssTransition")},getDuration:function(e){return e.retrieve("ssDuration")},show:function(e,t){e=typeof e=="number"?this.slides[e]:e;if(e!=this.current&&!this.transitioning){this.transitioning=true;var n=t&&t.transition?t.transition:this.getTransition(e),r=t&&t.duration?t.duration:this.getDuration(e),i=this.current.setStyle("z-index",1),s=this.reset(e);var o={previous:{element:i,index:this.slides.indexOf(i)},next:{element:s,index:this.slides.indexOf(s)}};this.fireEvent("show",o);this.transitions[n](i,s,r,this);(function(){i.setStyle("display","none");this.fireEvent("showComplete",o);this.transitioning=false}).bind(this).delay(r);this.current=s;$(this.naviKey+(o.previous.index.toInt()+1)).removeClass("active");$(this.naviKey+(o.next.index.toInt()+1)).addClass("active");this.position=o.next.index.toInt()}return this},reset:function(e){return e.setStyles({position:"absolute","z-index":0,display:"block",left:0,top:0}).fade("show")},nextSlide:function(){var e=this.current.getNext();return e?e:this.slides[0]},previousSlide:function(){var e=this.current.getPrevious();return e?e:this.slides.getLast()},showNext:function(e){this.show(this.nextSlide(),e);return this},showPrevious:function(e){this.show(this.previousSlide(),e);return this},play:function(){this.startLoop();this.fireEvent("play");return this},pause:function(){this.stopLoop();this.fireEvent("pause");return this},toElement:function(){return this.element}});Element.Properties.slideshow={set:function(e){var t=this.retrieve("slideshow");if(t)t.pause();return this.eliminate("slideshow").store("slideshow:options",e)},get:function(e){if(e||!this.retrieve("slideshow")){if(e||!this.retrieve("slideshow:options"))this.set("slideshow",e);this.store("slideshow",new SlideBullets(this,this.retrieve("slideshow:options")))}return this.retrieve("slideshow")}};SlideBullets.adders={transitions:{},add:function(e,t){this.transitions[e]=t;this.implement({transitions:this.transitions})},addAllThese:function(e){Array.from(e).each(function(e){this.add(e[0],e[1])},this)}};Object.append(SlideBullets,SlideBullets.adders);SlideBullets.implement(SlideBullets.adders);SlideBullets.add("fade",function(e,t,n,r){e.set("tween",{duration:n}).fade("out");return this});SlideBullets.addAllThese([["none",function(e,t,n,r){e.setStyle("display","none");return this}],["crossFade",function(e,t,n,r){e.set("tween",{duration:n}).fade("out");t.set("tween",{duration:n}).fade("in");return this}],["fadeThroughBackground",function(e,t,n,r){var i=n/2;t.set("tween",{duration:i}).fade("hide");e.set("tween",{duration:i,onComplete:function(){t.fade("in")}}).fade("out")}],["pushLeft",function(e,t,n,r){var i=r.element.getSize().x;t.setStyle("left",i);(new Fx.Elements([e,t],{duration:n})).start({0:{left:[-i]},1:{left:[0]}});return this}],["pushRight",function(e,t,n,r){var i=r.element.getSize().x;t.setStyle("left",-i);(new Fx.Elements([e,t],{duration:n})).start({0:{left:[i]},1:{left:[0]}});return this}],["pushUp",function(e,t,n,r){var i=r.element.getSize().y;t.setStyle("top",i);(new Fx.Elements([e,t],{duration:n})).start({0:{top:[-i]},1:{top:[0]}});return this}],["pushDown",function(e,t,n,r){var i=r.element.getSize().y;t.setStyle("top",-i);(new Fx.Elements([e,t],{duration:n})).start({0:{top:[i]},1:{top:[0]}});return this}]]);



(function(){"use strict";var e=this,t=e.Chart,n=function(e){this.canvas=e.canvas,this.ctx=e;this.width=e.canvas.width,this.height=e.canvas.height;return this.aspectRatio=this.width/this.height,r.retinaScale(this),this};n.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},n.types={};var r=n.helpers={},i=r.each=function(e,t,n){var r=Array.prototype.slice.call(arguments,3);if(e)if(e.length===+e.length){var i;for(i=0;i<e.length;i++)t.apply(n,[e[i],i].concat(r))}else for(var s in e)t.apply(n,[e[s],s].concat(r))},s=r.clone=function(e){var t={};return i(e,function(n,r){e.hasOwnProperty(r)&&(t[r]=n)}),t},o=r.extend=function(e){return i(Array.prototype.slice.call(arguments,1),function(t){i(t,function(n,r){t.hasOwnProperty(r)&&(e[r]=n)})}),e},u=r.merge=function(){var e=Array.prototype.slice.call(arguments,0);return e.unshift({}),o.apply(null,e)},a=r.indexOf=function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1},f=r.inherits=function(e){var t=this,n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},r=function(){this.constructor=n};return r.prototype=t.prototype,n.prototype=new r,n.extend=f,e&&o(n.prototype,e),n.__super__=t.prototype,n},l=r.noop=function(){},c=r.uid=function(){var e=0;return function(){return"chart-"+e++}}(),h=r.warn=function(e){window.console&&"function"==typeof window.console.warn&&console.warn(e)},p=r.amd="function"==typeof e.define&&e.define.amd,d=r.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},v=r.max=function(e){return Math.max.apply(Math,e)},m=r.min=function(e){return Math.min.apply(Math,e)},g=(r.cap=function(e,t,n){if(d(t)){if(e>t)return t}else if(d(n)&&n>e)return n;return e},r.getDecimalPlaces=function(e){return e%1!==0&&d(e)?e.toString().split(".")[1].length:0}),y=r.radians=function(e){return e*(Math.PI/180)},b=(r.getAngleFromPoint=function(e,t){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),s=2*Math.PI+Math.atan2(r,n);return 0>n&&0>r&&(s+=2*Math.PI),{angle:s,distance:i}},r.aliasPixel=function(e){return e%2===0?0:.5}),w=(r.splineCurve=function(e,t,n,r){var i=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),s=Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)),o=r*i/(i+s),u=r*s/(i+s);return{inner:{x:t.x-o*(n.x-e.x),y:t.y-o*(n.y-e.y)},outer:{x:t.x+u*(n.x-e.x),y:t.y+u*(n.y-e.y)}}},r.calculateOrderOfMagnitude=function(e){return Math.floor(Math.log(e)/Math.LN10)}),E=(r.calculateScaleRange=function(e,t,n,r,i){var s=2,o=Math.floor(t/(1.5*n)),u=s>=o,a=v(e),f=m(e);a===f&&(a+=.5,f>=.5&&!r?f-=.5:a+=.5);for(var l=Math.abs(a-f),c=w(l),h=Math.ceil(a/(1*Math.pow(10,c)))*Math.pow(10,c),p=r?0:Math.floor(f/(1*Math.pow(10,c)))*Math.pow(10,c),d=h-p,g=Math.pow(10,c),y=Math.round(d/g);(y>o||o>2*y)&&!u;)if(y>o)g*=2,y=Math.round(d/g),y%1!==0&&(u=!0);else if(i&&c>=0){if(g/2%1!==0)break;g/=2,y=Math.round(d/g)}else g/=2,y=Math.round(d/g);return u&&(y=s,g=d/y),{steps:y,stepValue:g,min:p,max:p+y*g}},r.template=function(e,t){function n(e,t){var n=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):r[e]=r[e];return t?n(t):n}if(e instanceof Function)return e(t);var r={};return n(e,t)}),S=(r.generateLabels=function(e,t,n,r){var s=new Array(t);return labelTemplateString&&i(s,function(t,i){s[i]=E(e,{value:n+r*(i+1)})}),s},r.easingEffects={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-1*e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return 1*((e=e/1-1)*e*e+1)},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-1*((e=e/1-1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return 1*(e/=1)*e*e*e*e},easeOutQuint:function(e){return 1*((e=e/1-1)*e*e*e*e+1)},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return-1*Math.cos(e/1*(Math.PI/2))+1},easeOutSine:function(e){return 1*Math.sin(e/1*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e/1)-1)},easeInExpo:function(e){return 0===e?1:1*Math.pow(2,10*(e/1-1))},easeOutExpo:function(e){return 1===e?1:1*(-Math.pow(2,-10*e/1)+1)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(-Math.pow(2,-10*--e)+2)},easeInCirc:function(e){return e>=1?e:-1*(Math.sqrt(1-(e/=1)*e)-1)},easeOutCirc:function(e){return 1*Math.sqrt(1-(e=e/1-1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1==(e/=1)?1:(n||(n=.3),r<Math.abs(1)?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),-(r*Math.pow(2,10*(e-=1))*Math.sin(2*(1*e-t)*Math.PI/n)))},easeOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1==(e/=1)?1:(n||(n=.3),r<Math.abs(1)?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*e)*Math.sin(2*(1*e-t)*Math.PI/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.3*1.5),r<Math.abs(1)?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),1>e?-.5*r*Math.pow(2,10*(e-=1))*Math.sin(2*(1*e-t)*Math.PI/n):r*Math.pow(2,-10*(e-=1))*Math.sin(2*(1*e-t)*Math.PI/n)*.5+1)},easeInBack:function(e){var t=1.70158;return 1*(e/=1)*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return 1*((e=e/1-1)*e*((t+1)*e+t)+1)},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?.5*e*e*(((t*=1.525)+1)*e-t):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:function(e){return 1-S.easeOutBounce(1-e)},easeOutBounce:function(e){return(e/=1)<1/2.75?7.5625*e*e:2/2.75>e?1*(7.5625*(e-=1.5/2.75)*e+.75):2.5/2.75>e?1*(7.5625*(e-=2.25/2.75)*e+.9375):1*(7.5625*(e-=2.625/2.75)*e+.984375)},easeInOutBounce:function(e){return.5>e?.5*S.easeInBounce(2*e):.5*S.easeOutBounce(2*e-1)+.5}}),x=r.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)}}(),T=(r.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return window.clearTimeout(e,1e3/60)}}(),r.animationLoop=function(e,t,n,r,i,s){var o=0,u=S[n]||S.linear,a=function(){o++;var n=o/t,f=u(n);e.call(s,f,n,o),r.call(s,f,n),t>o?s.animationFrame=x(a):i.apply(s)};x(a)},r.getRelativePosition=function(e){var t,n,r=e.originalEvent||e,i=e.currentTarget||e.srcElement,s=i.getBoundingClientRect();return r.touches?(t=r.touches[0].clientX-s.left,n=r.touches[0].clientY-s.top):(t=r.clientX-s.left,n=r.clientY-s.top),{x:t,y:n}},r.addEvent=function(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}),N=r.removeEvent=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=l},C=(r.bindEvents=function(e,t,n){e.events||(e.events={}),i(t,function(t){e.events[t]=function(){n.apply(e,arguments)},T(e.chart.canvas,t,e.events[t])})},r.unbindEvents=function(e,t){i(t,function(t,n){N(e.chart.canvas,n,t)})}),k=r.getMaximumWidth=function(e){var t=e.parentNode;return t.clientWidth},L=r.getMaximumHeight=function(e){var t=e.parentNode;return t.clientHeight},A=(r.getMaximumSize=r.getMaximumWidth,r.retinaScale=function(e){var t=e.ctx,n=e.canvas.width,r=e.canvas.height;window.devicePixelRatio&&(t.canvas.style.width=n+"px",t.canvas.style.height=r+"px",t.canvas.height=r*window.devicePixelRatio,t.canvas.width=n*window.devicePixelRatio,t.scale(window.devicePixelRatio,window.devicePixelRatio))}),O=r.clear=function(e){e.ctx.clearRect(0,0,e.width,e.height)},M=r.fontString=function(e,t,n){return t+" "+e+"px "+n},_=r.longestText=function(e,t,n){e.font=t;var r=0;return i(n,function(t){var n=e.measureText(t).width;r=n>r?n:r}),r},D=r.drawRoundedRectangle=function(e,t,n,r,i,s){e.beginPath(),e.moveTo(t+s,n),e.lineTo(t+r-s,n),e.quadraticCurveTo(t+r,n,t+r,n+s),e.lineTo(t+r,n+i-s),e.quadraticCurveTo(t+r,n+i,t+r-s,n+i),e.lineTo(t+s,n+i),e.quadraticCurveTo(t,n+i,t,n+i-s),e.lineTo(t,n+s),e.quadraticCurveTo(t,n,t+s,n),e.closePath()};n.instances={},n.Type=function(e,t,r){this.options=t,this.chart=r,this.id=c(),n.instances[this.id]=this,t.responsive&&this.resize(),this.initialize.call(this,e)},o(n.Type.prototype,{initialize:function(){return this},clear:function(){return O(this.chart),this},stop:function(){return r.cancelAnimFrame.call(e,this.animationFrame),this},resize:function(e){this.stop();var t=this.chart.canvas,n=k(this.chart.canvas),r=this.options.maintainAspectRatio?n/this.chart.aspectRatio:L(this.chart.canvas);return t.width=this.chart.width=n,t.height=this.chart.height=r,A(this.chart),"function"==typeof e&&e.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:l,render:function(e){return e&&this.reflow(),this.options.animation&&!e?r.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return E(this.options.legendTemplate,this)},destroy:function(){this.clear(),C(this,this.events),delete n.instances[this.id]},showTooltip:function(e,t){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var s=function(e){var t=!1;return e.length!==this.activeElements.length?t=!0:(i(e,function(e,n){e!==this.activeElements[n]&&(t=!0)},this),t)}.call(this,e);if(s||t){if(this.activeElements=e,this.draw(),e.length>0)if(this.datasets&&this.datasets.length>1){for(var o,u,f=this.datasets.length-1;f>=0&&(o=this.datasets[f].points||this.datasets[f].bars||this.datasets[f].segments,u=a(o,e[0]),-1===u);f--);var l=[],c=[],h=function(){var e,t,n,i,s,o=[],a=[],f=[];return r.each(this.datasets,function(t){e=t.points||t.bars||t.segments,e[u]&&o.push(e[u])}),r.each(o,function(e){a.push(e.x),f.push(e.y),l.push(r.template(this.options.multiTooltipTemplate,e)),c.push({fill:e._saved.fillColor||e.fillColor,stroke:e._saved.strokeColor||e.strokeColor})},this),s=m(f),n=v(f),i=m(a),t=v(a),{x:i>this.chart.width/2?i:t,y:(s+n)/2}}.call(this,u);(new n.MultiTooltip({x:h.x,y:h.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:l,legendColors:c,legendColorBackground:this.options.multiTooltipKeyBackground,title:e[0].label,chart:this.chart,ctx:this.chart.ctx})).draw()}else i(e,function(e){var t=e.tooltipPosition();(new n.Tooltip({x:Math.round(t.x),y:Math.round(t.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:E(this.options.tooltipTemplate,e),chart:this.chart})).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),n.Type.extend=function(e){var t=this,r=function(){return t.apply(this,arguments)};if(r.prototype=s(t.prototype),o(r.prototype,e),r.extend=n.Type.extend,e.name||t.prototype.name){var i=e.name||t.prototype.name,a=n.defaults[t.prototype.name]?s(n.defaults[t.prototype.name]):{};n.defaults[i]=o(a,e.defaults),n.types[i]=r,n.prototype[i]=function(e,t){var s=u(n.defaults.global,n.defaults[i],t||{});return new r(e,s,this)}}else h("Name not provided for this chart, so it hasn't been registered");return t},n.Element=function(e){o(this,e),this.initialize.apply(this,arguments),this.save()},o(n.Element.prototype,{initialize:function(){},restore:function(e){return e?i(e,function(e){this[e]=this._saved[e]},this):o(this,this._saved),this},save:function(){return this._saved=s(this),delete this._saved._saved,this},update:function(e){return i(e,function(e,t){this._saved[t]=this[t],this[t]=e},this),this},transition:function(e,t){return i(e,function(e,n){this[n]=(e-this._saved[n])*t+this._saved[n]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}}}),n.Element.extend=f,n.Point=n.Element.extend({display:!0,inRange:function(e,t){var n=this.hitDetectionRadius+this.radius;return Math.pow(e-this.x,2)+Math.pow(t-this.y,2)<Math.pow(n,2)},draw:function(){if(this.display){var e=this.ctx;e.beginPath(),e.arc(this.x,this.y,this.radius,0,2*Math.PI),e.closePath(),e.strokeStyle=this.strokeColor,e.lineWidth=this.strokeWidth,e.fillStyle=this.fillColor,e.fill(),e.stroke()}}}),n.Arc=n.Element.extend({inRange:function(e,t){var n=r.getAngleFromPoint(this,{x:e,y:t}),i=n.angle>=this.startAngle&&n.angle<=this.endAngle,s=n.distance>=this.innerRadius&&n.distance<=this.outerRadius;return i&&s},tooltipPosition:function(){var e=this.startAngle+(this.endAngle-this.startAngle)/2,t=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(e)*t,y:this.y+Math.sin(e)*t}},draw:function(e){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),t.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.lineJoin="bevel",this.showStroke&&t.stroke()}}),n.Rectangle=n.Element.extend({draw:function(){var e=this.ctx,t=this.width/2,n=this.x-t,r=this.x+t,i=this.base-(this.base-this.y),s=this.strokeWidth/2;this.showStroke&&(n+=s,r-=s,i+=s),e.beginPath(),e.fillStyle=this.fillColor,e.strokeStyle=this.strokeColor,e.lineWidth=this.strokeWidth,e.moveTo(n,this.base),e.lineTo(n,i),e.lineTo(r,i),e.lineTo(r,this.base),e.fill(),this.showStroke&&e.stroke()},height:function(){return this.base-this.y},inRange:function(e,t){return e>=this.x-this.width/2&&e<=this.x+this.width/2&&t>=this.y&&t<=this.base}}),n.Tooltip=n.Element.extend({draw:function(){var e=this.chart.ctx;e.font=M(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var t=2,n=e.measureText(this.text).width+2*this.xPadding,r=this.fontSize+2*this.yPadding,i=r+this.caretHeight+t;this.x+n/2>this.chart.width?this.xAlign="left":this.x-n/2<0&&(this.xAlign="right"),this.y-i<0&&(this.yAlign="below");var s=this.x-n/2,o=this.y-i;switch(e.fillStyle=this.fillColor,this.yAlign){case"above":e.beginPath(),e.moveTo(this.x,this.y-t),e.lineTo(this.x+this.caretHeight,this.y-(t+this.caretHeight)),e.lineTo(this.x-this.caretHeight,this.y-(t+this.caretHeight)),e.closePath(),e.fill();break;case"below":o=this.y+t+this.caretHeight,e.beginPath(),e.moveTo(this.x,this.y+t),e.lineTo(this.x+this.caretHeight,this.y+t+this.caretHeight),e.lineTo(this.x-this.caretHeight,this.y+t+this.caretHeight),e.closePath(),e.fill()}switch(this.xAlign){case"left":s=this.x-n+(this.cornerRadius+this.caretHeight);break;case"right":s=this.x-(this.cornerRadius+this.caretHeight)}D(e,s,o,n,r,this.cornerRadius),e.fill(),e.fillStyle=this.textColor,e.textAlign="center",e.textBaseline="middle",e.fillText(this.text,s+n/2,o+r/2)}}),n.MultiTooltip=n.Element.extend({initialize:function(){this.font=M(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=M(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var e=this.ctx.measureText(this.title).width,t=_(this.ctx,this.font,this.labels)+this.fontSize+3,n=v([t,e]);this.width=n+2*this.xPadding;var r=this.height/2;this.y-r<0?this.y=r:this.y+r>this.chart.height&&(this.y=this.chart.height-r),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(e){var t=this.y-this.height/2+this.yPadding,n=e-1;return 0===e?t+this.titleFontSize/2:t+(1.5*this.fontSize*n+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){D(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var e=this.ctx;e.fillStyle=this.fillColor,e.fill(),e.closePath(),e.textAlign="left",e.textBaseline="middle",e.fillStyle=this.titleTextColor,e.font=this.titleFont,e.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),e.font=this.font,r.each(this.labels,function(t,n){e.fillStyle=this.textColor,e.fillText(t,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(n+1)),e.fillStyle=this.legendColorBackground,e.fillRect(this.x+this.xPadding,this.getLineHeight(n+1)-this.fontSize/2,this.fontSize,this.fontSize),e.fillStyle=this.legendColors[n].fill,e.fillRect(this.x+this.xPadding,this.getLineHeight(n+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}),n.Scale=n.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var e=g(this.stepValue),t=0;t<=this.steps;t++)this.yLabels.push(E(this.templateString,{value:(this.min+t*this.stepValue).toFixed(e)}));this.yLabelWidth=this.display&&this.showLabels?_(this.ctx,this.font,this.yLabels):0},addXLabel:function(e){this.xLabels.push(e),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var e,t=this.endPoint-this.startPoint;for(this.calculateYRange(t),this.buildYLabels(),this.calculateXLabelRotation();t>this.endPoint-this.startPoint;)t=this.endPoint-this.startPoint,e=this.yLabelWidth,this.calculateYRange(t),this.buildYLabels(),e<this.yLabelWidth&&this.calculateXLabelRotation()},calculateXLabelRotation:function(){this.ctx.font=this.font;var e,t,n=this.ctx.measureText(this.xLabels[0]).width,r=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=r/2+3,this.xScalePaddingLeft=n/2>this.yLabelWidth+10?n/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var i,s=_(this.ctx,this.font,this.xLabels);this.xLabelWidth=s;for(var o=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>o&&0===this.xLabelRotation||this.xLabelWidth>o&&this.xLabelRotation<=90&&this.xLabelRotation>0;)i=Math.cos(y(this.xLabelRotation)),e=i*n,t=i*r,e+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=e+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=i*s;this.xLabelRotation>0&&(this.endPoint-=Math.sin(y(this.xLabelRotation))*s+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:l,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(e){var t=this.drawingArea()/(this.min-this.max);return this.endPoint-t*(e-this.min)},calculateX:function(e){var t=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),n=t/(this.valuesCount-(this.offsetGridLines?0:1)),r=n*e+this.xScalePaddingLeft;return this.offsetGridLines&&(r+=n/2),Math.round(r)},update:function(e){r.extend(this,e),this.fit()},draw:function(){var e=this.ctx,t=(this.endPoint-this.startPoint)/this.steps,n=Math.round(this.xScalePaddingLeft);this.display&&(e.fillStyle=this.textColor,e.font=this.font,i(this.yLabels,function(i,s){var o=this.endPoint-t*s,u=Math.round(o);e.textAlign="right",e.textBaseline="middle",this.showLabels&&e.fillText(i,n-10,o),e.beginPath(),s>0?(e.lineWidth=this.gridLineWidth,e.strokeStyle=this.gridLineColor):(e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor),u+=r.aliasPixel(e.lineWidth),e.moveTo(n,u),e.lineTo(this.width,u),e.stroke(),e.closePath(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.beginPath(),e.moveTo(n-5,u),e.lineTo(n,u),e.stroke(),e.closePath()},this),i(this.xLabels,function(t,n){var r=this.calculateX(n)+b(this.lineWidth),i=this.calculateX(n-(this.offsetGridLines?.5:0))+b(this.lineWidth),s=this.xLabelRotation>0;e.beginPath(),n>0?(e.lineWidth=this.gridLineWidth,e.strokeStyle=this.gridLineColor):(e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor),e.moveTo(i,this.endPoint),e.lineTo(i,this.startPoint-3),e.stroke(),e.closePath(),e.lineWidth=this.lineWidth,e.strokeStyle=this.lineColor,e.beginPath(),e.moveTo(i,this.endPoint),e.lineTo(i,this.endPoint+5),e.stroke(),e.closePath(),e.save(),e.translate(r,s?this.endPoint+12:this.endPoint+8),e.rotate(-1*y(this.xLabelRotation)),e.font=this.font,e.textAlign=s?"right":"center",e.textBaseline=s?"middle":"top",e.fillText(t,0,0),e.restore()},this))}}),n.RadialScale=n.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(e){var t=this.drawingArea/(this.max-this.min);return(e-this.min)*t},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var e=g(this.stepValue),t=0;t<=this.steps;t++)this.yLabels.push(E(this.templateString,{value:(this.min+t*this.stepValue).toFixed(e)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var e,t,n,r,i,s,o,u,a,f,l,c,h=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,v=0;for(this.ctx.font=M(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t=0;t<this.valuesCount;t++)e=this.getPointPosition(t,h),n=this.ctx.measureText(E(this.templateString,{value:this.labels[t]})).width+5,0===t||t===this.valuesCount/2?(r=n/2,e.x+r>p&&(p=e.x+r,i=t),e.x-r<v&&(v=e.x-r,o=t)):t<this.valuesCount/2?e.x+n>p&&(p=e.x+n,i=t):t>this.valuesCount/2&&e.x-n<v&&(v=e.x-n,o=t);a=v,f=Math.ceil(p-this.width),s=this.getIndexAngle(i),u=this.getIndexAngle(o),l=f/Math.sin(s+Math.PI/2),c=a/Math.sin(u+Math.PI/2),l=d(l)?l:0,c=d(c)?c:0,this.drawingArea=h-(c+l)/2,this.setCenterPoint(c,l)},setCenterPoint:function(e,t){var n=this.width-t-this.drawingArea,r=e+this.drawingArea;this.xCenter=(r+n)/2,this.yCenter=this.height/2},getIndexAngle:function(e){var t=2*Math.PI/this.valuesCount;return e*t-Math.PI/2},getPointPosition:function(e,t){var n=this.getIndexAngle(e);return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter}},draw:function(){if(this.display){var e=this.ctx;if(i(this.yLabels,function(t,n){if(n>0){var r,i=n*(this.drawingArea/this.steps),s=this.yCenter-i;if(this.lineWidth>0)if(e.strokeStyle=this.lineColor,e.lineWidth=this.lineWidth,this.lineArc)e.beginPath(),e.arc(this.xCenter,this.yCenter,i,0,2*Math.PI),e.closePath(),e.stroke();else{e.beginPath();for(var o=0;o<this.valuesCount;o++)r=this.getPointPosition(o,this.calculateCenterOffset(this.min+n*this.stepValue)),0===o?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y);e.closePath(),e.stroke()}if(this.showLabels){if(e.font=M(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var u=e.measureText(t).width;e.fillStyle=this.backdropColor,e.fillRect(this.xCenter-u/2-this.backdropPaddingX,s-this.fontSize/2-this.backdropPaddingY,u+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}e.textAlign="center",e.textBaseline="middle",e.fillStyle=this.fontColor,e.fillText(t,this.xCenter,s)}}},this),!this.lineArc){e.lineWidth=this.angleLineWidth,e.strokeStyle=this.angleLineColor;for(var t=this.valuesCount-1;t>=0;t--){if(this.angleLineWidth>0){var n=this.getPointPosition(t,this.calculateCenterOffset(this.max));e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(n.x,n.y),e.stroke(),e.closePath()}var r=this.getPointPosition(t,this.calculateCenterOffset(this.max)+5);e.font=M(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),e.fillStyle=this.pointLabelFontColor;var s=this.labels.length,o=this.labels.length/2,u=o/2,a=u>t||t>s-u,f=t===u||t===s-u;e.textAlign=0===t?"center":t===o?"center":o>t?"left":"right",e.textBaseline=f?"middle":a?"bottom":"top",e.fillText(this.labels[t],r.x,r.y)}}}}}),r.addEvent(window,"resize",function(){var e;return function(){clearTimeout(e),e=setTimeout(function(){i(n.instances,function(e){e.options.responsive&&e.resize(e.render,!0)})},50)}}()),p?define(function(){return n}):"object"==typeof module&&module.exports&&(module.exports=n),e.Chart=n,n.noConflict=function(){return e.Chart=t,n}}).call(this),function(){"use strict";var e=this,t=e.Chart,n=t.helpers,r={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].fillColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};t.Type.extend({name:"Bar",defaults:r,initialize:function(e){var r=this.options;this.ScaleClass=t.Scale.extend({offsetGridLines:!0,calculateBarX:function(e,t,n){var i=this.calculateBaseWidth(),o=this.calculateX(n)-i/2,u=this.calculateBarWidth(e);return o+u*t+t*r.barDatasetSpacing+u/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*r.barValueSpacing},calculateBarWidth:function(e){var t=this.calculateBaseWidth()-(e-1)*r.barDatasetSpacing;return t/e}}),this.datasets=[],this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(e){var t="mouseout"!==e.type?this.getBarsAtEvent(e):[];this.eachBars(function(e){e.restore(["fillColor","strokeColor"])}),n.each(t,function(e){e.fillColor=e.highlightFill,e.strokeColor=e.highlightStroke}),this.showTooltip(t)}),this.BarClass=t.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),n.each(e.datasets,function(t){var r={label:t.label||null,fillColor:t.fillColor,strokeColor:t.strokeColor,bars:[]};this.datasets.push(r),n.each(t.data,function(o,u){n.isNumber(o)&&r.bars.push(new this.BarClass({value:o,label:e.labels[u],datasetLabel:t.label,strokeColor:t.strokeColor,fillColor:t.fillColor,highlightFill:t.highlightFill||t.fillColor,highlightStroke:t.highlightStroke||t.strokeColor}))},this)},this),this.buildScale(e.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(e,t,r){n.extend(e,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,r,t),y:this.scale.endPoint}),e.save()},this),this.render()},update:function(){this.scale.update(),n.each(this.activeElements,function(e){e.restore(["fillColor","strokeColor"])}),this.eachBars(function(e){e.save()}),this.render()},eachBars:function(e){n.each(this.datasets,function(t,r){n.each(t.bars,e,this,r)},this)},getBarsAtEvent:function(e){for(var t,r=[],i=n.getRelativePosition(e),s=function(e){r.push(e.bars[t])},o=0;o<this.datasets.length;o++)for(t=0;t<this.datasets[o].bars.length;t++)if(this.datasets[o].bars[t].inRange(i.x,i.y))return n.each(this.datasets,s),r;return r},buildScale:function(e){var t=this,r=function(){var e=[];return t.eachBars(function(t){e.push(t.value)}),e},i={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:e.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(e){var t=n.calculateScaleRange(r(),e,this.fontSize,this.beginAtZero,this.integersOnly);n.extend(this,t)},xLabels:e,font:n.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&n.extend(i,{calculateYRange:n.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(i)},addData:function(e,t){n.each(e,function(e,r){n.isNumber(e)&&this.datasets[r].bars.push(new this.BarClass({value:e,label:t,x:this.scale.calculateBarX(this.datasets.length,r,this.scale.valuesCount+1),y:this.scale.endPoint,width:this.scale.calculateBarWidth(this.datasets.length),base:this.scale.endPoint,strokeColor:this.datasets[r].strokeColor,fillColor:this.datasets[r].fillColor}))},this),this.scale.addXLabel(t),this.update()},removeData:function(){this.scale.removeXLabel(),n.each(this.datasets,function(e){e.bars.shift()},this),this.update()},reflow:function(){n.extend(this.BarClass.prototype,{y:this.scale.endPoint,base:this.scale.endPoint});var e=n.extend({height:this.chart.height,width:this.chart.width});this.scale.update(e)},draw:function(e){var t=e||1;this.clear();this.chart.ctx;this.scale.draw(t),n.each(this.datasets,function(e,r){n.each(e.bars,function(e,n){e.base=this.scale.endPoint,e.transition({x:this.scale.calculateBarX(this.datasets.length,r,n),y:this.scale.calculateY(e.value),width:this.scale.calculateBarWidth(this.datasets.length)},t).draw()},this)},this)}})}.call(this),function(){"use strict";var e=this,t=e.Chart,n=t.helpers,r={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};t.Type.extend({name:"Doughnut",defaults:r,initialize:function(e){this.segments=[],this.outerRadius=(n.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=t.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(e){var t="mouseout"!==e.type?this.getSegmentsAtEvent(e):[];n.each(this.segments,function(e){e.restore(["fillColor"])}),n.each(t,function(e){e.fillColor=e.highlightColor}),this.showTooltip(t)}),this.calculateTotal(e),n.each(e,function(e,t){this.addData(e,t,!0)},this),this.render()},getSegmentsAtEvent:function(e){var t=[],r=n.getRelativePosition(e);return n.each(this.segments,function(e){e.inRange(r.x,r.y)&&t.push(e)},this),t},addData:function(e,t,n){var r=t||this.segments.length;this.segments.splice(r,0,new this.SegmentArc({value:e.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:e.color,highlightColor:e.highlight||e.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(e.value),label:e.label})),n||(this.reflow(),this.update())},calculateCircumference:function(e){return 2*Math.PI*(e/this.total)},calculateTotal:function(e){this.total=0,n.each(e,function(e){this.total+=e.value},this)},update:function(){this.calculateTotal(this.segments),n.each(this.activeElements,function(e){e.restore(["fillColor"])}),n.each(this.segments,function(e){e.save()}),this.render()},removeData:function(e){var t=n.isNumber(e)?e:this.segments.length-1;this.segments.splice(t,1),this.reflow(),this.update()},reflow:function(){n.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(n.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,n.each(this.segments,function(e){e.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(e){var t=e?e:1;this.clear(),n.each(this.segments,function(e,n){e.transition({circumference:this.calculateCircumference(e.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},t),e.endAngle=e.startAngle+e.circumference,e.draw(),0===n&&(e.startAngle=1.5*Math.PI),n<this.segments.length-1&&(this.segments[n+1].startAngle=e.endAngle)},this)}}),t.types.Doughnut.extend({name:"Pie",defaults:n.merge(r,{percentageInnerCutout:0})})}.call(this),function(){"use strict";var e=this,t=e.Chart,n=t.helpers,r={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};t.Type.extend({name:"Line",defaults:r,initialize:function(e){this.PointClass=t.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(e){return Math.pow(e-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(e){var t="mouseout"!==e.type?this.getPointsAtEvent(e):[];this.eachPoints(function(e){e.restore(["fillColor","strokeColor"])}),n.each(t,function(e){e.fillColor=e.highlightFill,e.strokeColor=e.highlightStroke}),this.showTooltip(t)}),n.each(e.datasets,function(t){var r={label:t.label||null,fillColor:t.fillColor,strokeColor:t.strokeColor,pointColor:t.pointColor,pointStrokeColor:t.pointStrokeColor,points:[]};this.datasets.push(r),n.each(t.data,function(o,u){n.isNumber(o)&&r.points.push(new this.PointClass({value:o,label:e.labels[u],datasetLabel:t.label,strokeColor:t.pointStrokeColor,fillColor:t.pointColor,highlightFill:t.pointHighlightFill||t.pointColor,highlightStroke:t.pointHighlightStroke||t.pointStrokeColor}))},this),this.buildScale(e.labels),this.eachPoints(function(e,t){n.extend(e,{x:this.scale.calculateX(t),y:this.scale.endPoint}),e.save()},this)},this),this.render()},update:function(){this.scale.update(),n.each(this.activeElements,function(e){e.restore(["fillColor","strokeColor"])}),this.eachPoints(function(e){e.save()}),this.render()},eachPoints:function(e){n.each(this.datasets,function(t){n.each(t.points,e,this)},this)},getPointsAtEvent:function(e){var t=[],r=n.getRelativePosition(e);return n.each(this.datasets,function(e){n.each(e.points,function(e){e.inRange(r.x,r.y)&&t.push(e)})},this),t},buildScale:function(e){var r=this,s=function(){var e=[];return r.eachPoints(function(t){e.push(t.value)}),e},o={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:e.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(e){var t=n.calculateScaleRange(s(),e,this.fontSize,this.beginAtZero,this.integersOnly);n.extend(this,t)},xLabels:e,font:n.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&n.extend(o,{calculateYRange:n.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new t.Scale(o)},addData:function(e,t){n.each(e,function(e,r){n.isNumber(e)&&this.datasets[r].points.push(new this.PointClass({value:e,label:t,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[r].pointStrokeColor,fillColor:this.datasets[r].pointColor}))},this),this.scale.addXLabel(t),this.update()},removeData:function(){this.scale.removeXLabel(),n.each(this.datasets,function(e){e.points.shift()},this),this.update()},reflow:function(){var e=n.extend({height:this.chart.height,width:this.chart.width});this.scale.update(e)},draw:function(e){var t=e||1;this.clear();var r=this.chart.ctx;this.scale.draw(t),n.each(this.datasets,function(e){n.each(e.points,function(e,n){e.transition({y:this.scale.calculateY(e.value),x:this.scale.calculateX(n)},t)},this),this.options.bezierCurve&&n.each(e.points,function(t,r){t.controlPoints=0===r?n.splineCurve(t,t,e.points[r+1],0):r>=e.points.length-1?n.splineCurve(e.points[r-1],t,t,0):n.splineCurve(e.points[r-1],t,e.points[r+1],this.options.bezierCurveTension)},this),r.lineWidth=this.options.datasetStrokeWidth,r.strokeStyle=e.strokeColor,r.beginPath(),n.each(e.points,function(t,n){n>0?this.options.bezierCurve?r.bezierCurveTo(e.points[n-1].controlPoints.outer.x,e.points[n-1].controlPoints.outer.y,t.controlPoints.inner.x,t.controlPoints.inner.y,t.x,t.y):r.lineTo(t.x,t.y):r.moveTo(t.x,t.y)},this),r.stroke(),this.options.datasetFill&&(r.lineTo(e.points[e.points.length-1].x,this.scale.endPoint),r.lineTo(this.scale.calculateX(0),this.scale.endPoint),r.fillStyle=e.fillColor,r.closePath(),r.fill()),n.each(e.points,function(e){e.draw()})},this)}})}.call(this),function(){"use strict";var e=this,t=e.Chart,n=t.helpers,r={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};t.Type.extend({name:"PolarArea",defaults:r,initialize:function(e){this.segments=[],this.SegmentArc=t.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new t.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:e.length}),this.updateScaleRange(e),this.scale.update(),n.each(e,function(e,t){this.addData(e,t,!0)},this),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(e){var t="mouseout"!==e.type?this.getSegmentsAtEvent(e):[];n.each(this.segments,function(e){e.restore(["fillColor"])}),n.each(t,function(e){e.fillColor=e.highlightColor}),this.showTooltip(t)}),this.render()},getSegmentsAtEvent:function(e){var t=[],r=n.getRelativePosition(e);return n.each(this.segments,function(e){e.inRange(r.x,r.y)&&t.push(e)},this),t},addData:function(e,t,n){var r=t||this.segments.length;this.segments.splice(r,0,new this.SegmentArc({fillColor:e.color,highlightColor:e.highlight||e.color,label:e.label,value:e.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(e.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),n||(this.reflow(),this.update())},removeData:function(e){var t=n.isNumber(e)?e:this.segments.length-1;this.segments.splice(t,1),this.reflow(),this.update()},calculateTotal:function(e){this.total=0,n.each(e,function(e){this.total+=e.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(e){var t=[];n.each(e,function(e){t.push(e.value)});var r=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:n.calculateScaleRange(t,n.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);n.extend(this.scale,r,{size:n.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),n.each(this.segments,function(e){e.save()}),this.render()},reflow:function(){n.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),n.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),n.each(this.segments,function(e){e.update({outerRadius:this.scale.calculateCenterOffset(e.value)})},this)},draw:function(e){var t=e||1;this.clear(),n.each(this.segments,function(e,n){e.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(e.value)},t),e.endAngle=e.startAngle+e.circumference,0===n&&(e.startAngle=1.5*Math.PI),n<this.segments.length-1&&(this.segments[n+1].startAngle=e.endAngle),e.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var e=this,t=e.Chart,n=t.helpers;t.Type.extend({name:"Radar",defaults:{scaleShowLine:!0,angleShowLineOut:!0,scaleShowLabels:!1,scaleBeginAtZero:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:10,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'},initialize:function(e){this.PointClass=t.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(e),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(e){var t="mouseout"!==e.type?this.getPointsAtEvent(e):[];this.eachPoints(function(e){e.restore(["fillColor","strokeColor"])}),n.each(t,function(e){e.fillColor=e.highlightFill,e.strokeColor=e.highlightStroke}),this.showTooltip(t)}),n.each(e.datasets,function(t){var r={label:t.label||null,fillColor:t.fillColor,strokeColor:t.strokeColor,pointColor:t.pointColor,pointStrokeColor:t.pointStrokeColor,points:[]};this.datasets.push(r),n.each(t.data,function(o,u){if(n.isNumber(o)){var a;this.scale.animation||(a=this.scale.getPointPosition(u,this.scale.calculateCenterOffset(o))),r.points.push(new this.PointClass({value:o,label:e.labels[u],datasetLabel:t.label,x:this.options.animation?this.scale.xCenter:a.x,y:this.options.animation?this.scale.yCenter:a.y,strokeColor:t.pointStrokeColor,fillColor:t.pointColor,highlightFill:t.pointHighlightFill||t.pointColor,highlightStroke:t.pointHighlightStroke||t.pointStrokeColor}))}},this)},this),this.render()},eachPoints:function(e){n.each(this.datasets,function(t){n.each(t.points,e,this)},this)},getPointsAtEvent:function(e){var t=n.getRelativePosition(e),r=n.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},t),i=2*Math.PI/this.scale.valuesCount,s=Math.round((r.angle-1.5*Math.PI)/i),o=[];return(s>=this.scale.valuesCount||0>s)&&(s=0),r.distance<=this.scale.drawingArea&&n.each(this.datasets,function(e){o.push(e.points[s])}),o},buildScale:function(e){this.scale=new t.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:e.labels,valuesCount:e.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(e.datasets),this.scale.buildYLabels()},updateScaleRange:function(e){var t=function(){var t=[];return n.each(e,function(e){e.data?t=t.concat(e.data):n.each(e.points,function(e){t.push(e.value)})}),t}(),r=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:n.calculateScaleRange(t,n.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);n.extend(this.scale,r)},addData:function(e,t){this.scale.valuesCount++,n.each(e,function(e,r){if(n.isNumber(e)){var s=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(e));this.datasets[r].points.push(new this.PointClass({value:e,label:t,x:s.x,y:s.y,strokeColor:this.datasets[r].pointStrokeColor,fillColor:this.datasets[r].pointColor}))}},this),this.scale.labels.push(t),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),n.each(this.datasets,function(e){e.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(e){e.save()}),this.reflow(),this.render()},reflow:function(){n.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:n.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(e){var t=e||1,r=this.chart.ctx;this.clear(),this.scale.draw(),n.each(this.datasets,function(e){n.each(e.points,function(e,n){e.transition(this.scale.getPointPosition(n,this.scale.calculateCenterOffset(e.value)),t)},this),r.lineWidth=this.options.datasetStrokeWidth,r.strokeStyle=e.strokeColor,r.beginPath(),n.each(e.points,function(e,t){0===t?r.moveTo(e.x,e.y):r.lineTo(e.x,e.y)},this),r.closePath(),r.stroke(),r.fillStyle=e.fillColor,r.fill(),n.each(e.points,function(e){e.draw()})},this)}})}.call(this);


window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}(),window.cancelRequestAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout}();var Intense=function(){"use strict";function e(e,n){for(var t in n)t in e||(e[t]=n[t]);return e}function n(e,n){for(var t in n)e.style[t]=n[t]}function t(e){var n=window.innerHeight/e.h;if(e.w*n>window.innerWidth)return{w:e.w*n,h:e.h*n,fit:!0};var t=window.innerWidth/e.w;return{w:e.w*t,h:e.h*t,fit:!1}}function i(e){var n;if(e.length)for(n=0;n<e.length;n++)o(e[n]);else o(e)}function o(e){(e.getAttribute("data-image")||e.src)&&e.addEventListener("click",function(){p(this)},!1)}function r(){d()}function a(){cancelRequestAnimFrame(y)}function d(){y=requestAnimFrame(d),b()}function c(){I=document.body.style.overflow,document.body.style.overflow="hidden"}function u(){document.body.style.overflow=I}function w(e,t){var i={backgroundColor:"rgba(0,0,0,0.8)",width:"100%",height:"100%",position:"fixed",top:"0px",left:"0px",overflow:"hidden",zIndex:"999999",margin:"0px",webkitTransition:"opacity 150ms cubic-bezier( 0, 0, .26, 1 )",MozTransition:"opacity 150ms cubic-bezier( 0, 0, .26, 1 )",transition:"opacity 150ms cubic-bezier( 0, 0, .26, 1 )",opacity:"0"};Z=document.createElement("figure"),Z.appendChild(E),n(Z,i);var o={cursor:'url( "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo3Q0IyNDI3M0FFMkYxMUUzOEQzQUQ5NTMxMDAwQjJGRCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo3Q0IyNDI3NEFFMkYxMUUzOEQzQUQ5NTMxMDAwQjJGRCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjdDQjI0MjcxQUUyRjExRTM4RDNBRDk1MzEwMDBCMkZEIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjdDQjI0MjcyQUUyRjExRTM4RDNBRDk1MzEwMDBCMkZEIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+soZ1WgAABp5JREFUeNrcWn9MlVUY/u4dogIapV0gQ0SUO4WAXdT8B5ULc6uFgK3MLFxzFrQFZMtaed0oKTPj1x8EbbZZK5fNCdLWcvxQ+EOHyAQlBgiIVFxAJuUF7YrQ81zOtU+8F+Pe78K1d3s5537f+fE8nPec7z3vOSpJIRkbGwtEEgtdBdVCl0AXQr2hKqgJeg16BdoCrYNWqVSqbif7VQT8YqgB2jTmuDSJNoIcJUJVOVg5EsmH0Oehaj4bGRkZ6uvra2xvb29oamrqbGxs7K2vrx/s7Oy8yffBwcFzdTqdb0REhF9YWFhwSEhIpEajifDw8PAWzY5Cj0GzMUoNUx0R1RQJaJAcgKaw7ujo6O2urq7qysrKioyMjHNDQ0OjU2nP29tbnZ+fv1qv18cFBQWtU6vVs9gN9BvobhDqU5wIKryA5CuoLwj83dzc/NOePXuOlpSUXFNijiUlJS3ct2/fiytWrHgOhGbj0SD0dZD5UREiKOiJJA+axt9Go7F2165deUeOHOmVXCBbt271y8nJyfD3939aPCqCZoCQ2WEiKOQj7HYjzejUqVNFcXFxJdI0SEVFRdKGDRtShbmd5HwEGZM9IupJSHiJBjaazebr2dnZmdNFgsK+2Cf7JgZiEZhsimoSc/oZqh8eHjamp6fvPnTo0O/SDMiOHTsWFRQUHPDy8vLnQEGflZvZpKaFl4WcE7du3epPTU19+/Dhwz3SDMr27dsDioqKcufMmfM45wyIpD3QtPBiC0lgTowcPHgwa6ZJUIiBWIgJP1OB8aVJTQsFnkDSxCUWk60gPj6+VHIjKS8vT8TcSRdLcxhG5g+bpoWH3yF5ube3tw7L33uSGwqW/8/8/Pzoz30PItvuMy080HEZx/CZDQZDgeSmQmzESKwC870jgodcWhPhJx0LDw8vlNxYLl269Cb8Nfp5NP2kuyMiPM8EfvTodkhuLsQoJn4C/VG5ab3CfHd3d41SvpMrhRiBtVrgf01OZBv/nIRID4nIsG6xzBGxs7vK/YSvr2/SVF3xiYL55bVgwYJZp0+f/nOycuvXr38E+xczvOibjvTDLcDg4OBx7GfoD4ZwRPR8gUYbnCUBF3wuHMtPy8rKcmJjY33tleM7lqmpqdnPOo70RazAfNHapFrssaWOjo6Lzg43vj2zPT09febNm7ektLT0C1tk+IzvWIZlWcfR/oC5UWSjSCSUudbW1qvOEqmqqhrcvHnzOzdu3Lhii4ycBMuwLOs42t/ly5etmLUkEsJcbW3tbwq5ETbJ2CLBss70dfbsWSvmpZzsnJTzo6KiEhoaGoaVWlXkwE0mkyXk4+PjE6gUCUpMTMz86urq48gOkIjFWYHfEqf0EkkyJ06cyCMB/iah5OTkTCVIUDQajQf8wl+QNaune/2/c+eOS9olkb+YiYyM9FJ6NGhaHA2OBJV5e6uZI6LVaq2YTSTSz9zatWsfc8X84JzYtGlTJtXeauaorFy5cr7IXieRdubWrFnzpCtIJCYmWpZYKvNKksE/34q5g0RamQsNDV3sKhLy74ySZJYtW2bF3EIidZaFeOnSp5wl0t/fb4aYbJGwRYZlWcfR/mSYL8idRhOcxuTpdBoHBgZuY5Pk0LfrPqdRnE8080Fubm60Aru34QeRoLCMoyQoxCpItFnnCIVBB2kj5GHZj8iw/iDfWJHIaGBgYAyj4u5OghiBdZ00fqby9V0iMK8rSMoYMGZo392JECOwehAztHNipPFjxiGw0UnYuXPnInclQWzEKI0fCH1kL9JoCdAZjcZzAQEB77sjkZ6env3YjK22G6AT8i7DkSzI8KS7kSAmQWJQYL3HabwrjKVK4mQKX9w0g8EQ6i4k9u7dqyUm8TNNYJVsmpbMxL5EkuouxwopKSn+xcXFeeJYoRgkUmVYJyXirgc9ldBnbB302NxYiYJcGc6wgcLCwvysrCztTJgT+xYkzhCTvUPR//9hqBgZkxiZYjao1+vf4vLH4XalKbEP9iVIFIuRME2K9b92MOHCAEOdZS66MJAAAp5iiX0DBI4+ANfUiIhKvMLxOfRVSXaFA2ZQnpmZWefIFY68vLxVMNf4CVc4vuV3wiVXOCZUjkLygXTvpRoTL9Uw9NrS0tJVX1/fc/78+ettbW2WIPXy5cvnRkdHP6rT6QK0Wm0QNkXhGo0mUrjikvTvpZpPQODCFLA4bw6ya06/OnHNqXnGrjnZIyWNXzyjC0GPYIk0fvHM+h+XXzxjnOCcNH7x7KqT/VrSfwQYAOAcX9HTDttYAAAAAElFTkSuQmCC" ) 25 25, no-drop'};n(E,o);var r={fontFamily:'Georgia, Times, "Times New Roman", serif',position:"fixed",bottom:"0px",left:"0px",padding:"20px",color:"#fff",wordSpacing:"0.2px",webkitFontSmoothing:"antialiased",textShadow:"-1px 0px 1px rgba(0,0,0,0.4)"},a=document.createElement("figcaption");if(n(a,r),e){var d={margin:"0px",padding:"0px",fontWeight:"normal",fontSize:"40px",letterSpacing:"0.5px",lineHeight:"35px",textAlign:"left"},c=document.createElement("h1");n(c,d),c.innerHTML=e,a.appendChild(c)}if(t){var u={margin:"0px",padding:"0px",fontWeight:"normal",fontSize:"20px",letterSpacing:"0.1px",maxWidth:"500px",textAlign:"left",background:"none",marginTop:"5px"},w=document.createElement("h2");n(w,u),w.innerHTML=t,a.appendChild(w)}Z.appendChild(a),s(),M.xCurr=M.xDest=window.innerWidth/2,M.yCurr=M.yDest=window.innerHeight/2,document.body.appendChild(Z),setTimeout(function(){Z.style.opacity="1"},10)}function m(){u(),f(),a(),document.body.removeChild(Z)}function s(){var e=t(C);E.width=e.w,E.height=e.h,j=e.fit,F={w:E.width,h:E.height},S={w:window.innerWidth,h:window.innerHeight},k={x:S.w-F.w,y:S.h-F.h}}function p(e){var n=e.getAttribute("data-image")||e.src,t=e.getAttribute("data-title"),i=e.getAttribute("data-caption"),o=new Image;o.onload=function(){C={w:o.width,h:o.height},E=this,w(t,i),c(),l(),d()},o.src=n}function l(){Z.addEventListener("mousemove",x,!1),Z.addEventListener("touchmove",h,!1),window.addEventListener("resize",s,!1),window.addEventListener("keyup",v,!1),E.addEventListener("click",m,!1)}function f(){Z.removeEventListener("mousemove",x,!1),Z.removeEventListener("touchmove",h,!1),window.removeEventListener("resize",s,!1),window.removeEventListener("keyup",v,!1),E.removeEventListener("click",m,!1)}function x(e){M.xDest=e.clientX,M.yDest=e.clientY}function h(e){e.preventDefault(),M.xDest=e.touches[0].clientX,M.yDest=e.touches[0].clientY}function v(e){e.preventDefault(),e.keyCode===D&&m()}function b(){if(M.xCurr+=.05*(M.xDest-M.xCurr),M.yCurr+=.05*(M.yDest-M.yCurr),j===!0){if(R+=M.xCurr-R,M.xCurr!==A){var e=parseFloat(R/S.w);e=k.x*e,E.style.webkitTransform="translate3d("+e+"px, 0px, 0px)",E.style.MozTransform="translate3d("+e+"px, 0px, 0px)",E.style.msTransform="translate3d("+e+"px, 0px, 0px)",A=M.xCurr}}else if(j===!1&&(R+=M.yCurr-R,M.yCurr!==A)){var e=parseFloat(R/S.h);e=k.y*e,E.style.webkitTransform="translate3d( 0px, "+e+"px, 0px)",E.style.MozTransform="translate3d( 0px, "+e+"px, 0px)",E.style.msTransform="translate3d( 0px, "+e+"px, 0px)",A=M.yCurr}}function g(e){if(!e)throw"You need to pass an element!";i(e)}var y,A,C,E,Z,I,D=27,M={xCurr:0,yCurr:0,xDest:0,yDest:0},j=!0,R=0,F={w:0,h:0},S={w:0,h:0},k={x:0,y:0};return e(g,{resize:s,start:r,stop:a})}();



window.addEvent('domready', function() {

$$('#configlist li h3').each(function(item) {

var id = item.getProperty('id');

if (id != null) {

item.setProperty('style', 'cursor:pointer;');

$(id+'Form').setStyle('height','auto');
var elemShowFx = new Fx.Slide(id+'Form', {duration: 500, onComplete: function(response){ window.fireEvent('resize');}}).hide();
if ($(id+'Form').hasClass('show')) {
elemShowFx.show();
item.addClass('symbol-arrow-down');
} else {
item.addClass('symbol-arrow-right');
}

item.addEvent('click', function(e) {

var buf = ($(id+'Form').hasClass('show')) ? '0' : '1';
new Request.JSON({url: config['fileWeb']}).get({'ajax': 'updateSessionValue', 'key': 'configlist', 'value': id, 'buf': buf});
item.toggleClass('symbol-arrow-down').toggleClass('symbol-arrow-right');
$(id+'Form').toggleClass('show');
elemShowFx.toggle();

});

item.addEvent('resize', function(e) {
elemShowFx.show();
});
}
});
});







function pluginsConfigRefresh () {
MessageBox.confirm(lang['admin.pluginsrefresh.confirm'],'', '', '', pluginsConfigRefreshReal);
}

function pluginsConfigRefreshReal (var1, var2, var3) {

var jsonRequest = new Request.JSON({url: config['fileWeb'], onRequest: function(instance) { $('adminPluginsRefreshBtn').addClass('disabled'); }, onComplete: function(response){
if (response.status == "true") {
$('adminPluginsRefreshBtn').removeClass('disabled');
} else {
alert(lang['admin.pluginsrefresh.error']);
}
}}).get({'ajax': 'pluginsConfigRefresh'});

}






function pluginsStatus (id) {
MessageBox.confirm(lang['admin.plugins.confirm'],id, '', '', pluginsStatusCheck);
}

function pluginsStatusCheck (id, var2, var3) {

var jsonRequest = new Request.JSON({url: config['fileWeb'], onComplete: function(response){
if (response.status == 'true') {

$$('#plugin_'+id+' td.icon32').each(function(it, i) {
it.set('html', response.icon);
});

} else {
MessageBox.status(lang['admin.plugins.error']);
}
}}).get({'ajax': 'pluginsStatus', 'plugin': id});

}







window.addEvent('domready', function() {

var mySortables = new Sortables($('naviSort'), {
handles: $$('#naviSort li span img.icon'),
onComplete: function() {
var string = mySortables.serialize(0, function(element, index){
return element.getProperty('id').replace('navikey_','')
}).join(':');
$('naviElementsHidden').value = string;
}
});

});




function pluginsLangRefresh () {

MessageBox.confirm(lang['admin.langrefresh.confirm'], '', '', '', pluginsLangRefreshReal);

}


function pluginsLangRefreshReal (var1, var2, var3) {

var jsonRequest = new Request.JSON({url: config['fileWeb'], onComplete: function(response){
if (response.status != "true") alert(lang['admin.langrefresh.error']);
}}).get({'ajax': 'pluginsLangRefresh'});

}






function pluginsLangUpdate (code, id) {

new Request.JSON({url: config['fileWeb']+'?ajax=pluginsLangUpdate', onComplete: function(response){
if (response.status == "true") {
$('reset.'+code+'.'+id).setStyle('display', 'inline');
}
}}).post({'lang_code': code, 'lang_id': id, 'lang_value': $(code+'.'+id).value});

}







function pluginsLangReset (code, id) {

new Request.JSON({url: config['fileWeb'], onComplete: function(response){
if (response.status == "true") {
$(code+'.'+id).value = response.value;
$('reset.'+code+'.'+response.id).setStyle('display', 'none');
if (code == "us") $('translate.'+code+'.'+response.id).setStyle('display', 'inline');
}
}}).get({'ajax': 'pluginsLangReset', 'lang_code': code, 'lang_id': id});

}




function footerIndividualAddLine (key) {

var jsonRequest = new Request.JSON({url: config['fileWeb'], onComplete: function(response){
if (response.status == "true") {
$('footerIndividual'+key+'Tmp').set('html', response.html);
$('footerIndividual'+key+'_'+response.index).inject($('footerIndividual'+key), 'bottom');
$('footer_individual'+key+'_count').value = $('footer_individual'+key+'_count').value.toInt()+1;
$('configCssFooter').fireEvent('resize');
}
}}).get({'ajax': 'footerIndividualAddLine', 'index': $('footer_individual'+key+'_count').value, 'key': key});

}






window.addEvent('domready', function() {

//Ausrichtung von Bilder ausfuehren
$$('input.color').each(function(item, index) {

item.addEvent('click', function(e){
var value = item.value;
value = value.replace(/#/g, '');
SqueezeBox.fromElement($('content'), {handler:'iframe',size:{x:350,y:350},url: config["fileWeb"]+'?popup=selectColor&id='+item.id+'&value='+value});
});
});

});




function colorTransfer (id, transparent) {

var item = parent.document.getElementById(id);
var color = (!transparent) ? $('current').value : 'transparent';

item.value = color;
if (!transparent) {
item.setStyles({'background': color, 'color': color});
} else {
item.setStyles({'background': '#FFFFFF', 'color': '#4d4d4d'});
}
parent.SqueezeBox.close();

}




window.addEvent('domready', function() {

if ($('loadMoreContentButton') != null) {

$('loadMoreContentButton').addEvent('click', function() {

var contentDetails = '';
var year = '';
 var tag = '';
var ajax = '';
var search = '';
var category = '';
var category_id = 0;
var usetypes = '0';
var topic = '';
var params = $('loadMoreContentButton').getProperty('href').replace(/#/, '').parseQueryString();
if (params.year) year = params.year;
if (params.ajax) ajax = params.ajax;
if (params.search) search = params.search;
if (params.category) category = params.category;
if (params.category_id) category_id = params.category_id;
if (params.topic) topic = params.topic;
if (params.usetypes) usetypes = params.usetypes;

//letzte ID ermitteln
$$('#contentList article').each(function(item, index) {
contentDetails = item.get('id');
});
contentDetails = contentDetails.split('-');

//Ajax-Request ermitteln
new Request.JSON({url: config['fileWeb'], onRequest: function(instance) {  }, onComplete: function(response){

if (response.status == "true") {

var els = Elements.from(response.html);
els.inject($('contentList'), 'bottom');

if ($('loadMoreCount') != null) $('loadMoreCount').set('text', $('loadMoreCount').get('text').toInt()+response.count.toInt());

if (response.end == "true") $('loadMoreContent').dispose();

} else {

$('loadMoreContent').dispose();

}

}}).get({'ajax': ajax, 'id': contentDetails[1], 'timestamp': contentDetails[2], 'year': year, 'search': search, 'category': category, 'category_id': category_id, 'usetypes': usetypes, 'topic': topic});

return false;
});
}
});






function contentFutureLoad () {

//Ajax-Request ermitteln
new Request.JSON({url: config['fileWeb'], onRequest: function(instance) {  }, onComplete: function(response){

if (response.status == "true") {

var els = Elements.from(response.html);
els.inject($('contentList'), 'top');

}

$('contentFuture').dispose();

}}).get({'ajax': 'contentFutureLoad'});

}




function documentsSelector (type, fieldId, documentPath, documentId, documentType, documentSize, documentTitle, previewId) {

var insert = '';

if (type == 'complete') {

insert = '<a href="' + documentPath + '" class="symbol-pdf">' + documentTitle + '</a>';

parent.insertImg(insert, fieldId);

} else {

insert = '<a href="' + documentPath + '" class="symbol-pdf">' + documentTitle + ' ('+documentSize+' KB)</a>';

parent.documentSelectorPreview(previewId, insert, documentId, documentTitle, documentType, documentPath, documentSize);

}

parent.SqueezeBox.close();
}




function documentSelectorPreview (previewId, documentPreview, documentId, documentTitle, documentType, documentPath, documentSize) {

$(previewId+'_document_preview').set('html', documentPreview);
$(previewId+'_document_preview').setStyle('display', 'inline');
$(previewId+'_document_delete').setStyle('display', 'inline');
$(previewId+'_document').value = documentId;
$(previewId+'_document_title').value = documentTitle;
$(previewId+'_document_type').value = documentType;
$(previewId+'_document_path').value = documentPath;
$(previewId+'_document_size').value = documentSize;

}




var documentsSortable = '';

window.addEvent('load', function() {

if ($('contentDocumentsListView') != null) documentsSortableInit();

});


function documentsSortableInit () {

documentsSortable = new Sortables($('contentDocumentsListView'), {
constrain: true,
opacity: 0.5,
handle: 'span img.move',
onComplete: function(response){

//Variablen initialisieren
var elements = '';

//Sidebar durchlaufen
$$('#contentDocumentsListView > tbody').each(function(item) {

if (item.getProperty('id') != null) {
if (elements != '') elements += '::';
elements += item.getProperty('id').replace(/document_id/g, "");
}

});

//Request senden
new Request.JSON({url: config['fileWeb']+'?ajax=documentsSortableSave', onComplete: function(response){
if (response.status == "false") {
alert("Die neue Reihenfolge der Bilder konnte nicht gespeichert werden!");
}
}}).post({'elements': elements});

}
});

}








function documentsSearchUpdate (elem) {

var value = elem.value;
var key = elem.get('name');

new Request.JSON({url: config["fileWeb"], onComplete: function(response){

if (response.status == "true") {

$('documentsSearchList').set('html', '');
$('documentsSearchErg').set('html', response.erg);
$('documentsSearchReset').removeClass('element_hidden');
response.list = response.list.replace(/{urlBase}/g, documentUrlBase);

var els = Elements.from(response.list);
els.inject($('documentsSearchList'), 'bottom');

if (response.button == "true") {
$('loadMoreDocuments').removeClass('element_hidden');
} else {
$('loadMoreDocuments').addClass('element_hidden');
}

}
}}).get({'ajax': 'documentsSearchUpdate', 'key': key, 'value': value});

}






window.addEvent('domready', function() {

if ($('loadMoreDocumentsButton') != null) {

$('loadMoreDocumentsButton').addEvent('click', function() {

//letzte ID ermitteln
var counter = 0;
$$('#documentsSearchList tr').each(function(item, index) { counter++; });

//Ajax-Request ermitteln
new Request.JSON({url: config['fileWeb'], onComplete: function(response){

if (response.status == "true") {

response.html = response.html.replace(/{urlBase}/g, documentUrlBase);
var els = Elements.from(response.html);
els.inject($('documentsSearchList'), 'bottom');

if (response.end == "true") {
$('loadMoreDocuments').addClass('element_hidden');
} else {
$('loadMoreDocuments').removeClass('element_hidden');
}

} else {

$('loadMoreDocuments').addClass('element_hidden');

}

}}).get({'ajax': 'loadMoreDocuments', 'more': counter});

return false;
});
}
});


var map = '';



function googleMapInitialize (id, lat, lng, level, visible) {

if (level == '') level = 6;
if (visible == '') visible = false;

var latlng = new google.maps.LatLng(lat, lng);
var myOptions = {
  zoom: level,
  center: latlng,
  mapTypeId: google.maps.MapTypeId.ROADMAP
};

map = new google.maps.Map(document.getElementById(id), myOptions);

if (visible) {
var marker = new google.maps.Marker({
map: map,
position: latlng
});
}

}




function googleMapGeodata (address) {

var geocoder = new google.maps.Geocoder();

geocoder.geocode( { 'address': address}, function(results, status) {

if (status == google.maps.GeocoderStatus.OK) {

if ($('geoDataLat') != null) $('geoDataLat').value = results[0].geometry.location.lat();
if ($('geoDataLon') != null) $('geoDataLon').value = results[0].geometry.location.lng();



$('geoDataBtnGet').addClass('element_hidden');
$('geoDataBtnDelete').removeClass('element_hidden');
$('geoDataBtnShow').removeClass('element_hidden').set('href', config['fileWeb']+'?popup=geoShow&lat='+results[0].geometry.location.lat()+'&lon='+results[0].geometry.location.lng());

} else {

alert("Geocode was not successful for the following reason: " + status);

}

$('geoDataBtnGet').toggleClass('symbol-search').toggleClass('symbol-busy');

});
}



function googleMapGeoFromForm (key) {

var address = '';
if ($(key+'Street') != null) address += $(key+'Street').value+' ';
if ($(key+'Plz') != null) address += $(key+'Plz').value+' ';
if ($(key+'City') != null) address += $(key+'City').value+' ';

googleMapGeodata(address);

}







window.addEvent('domready', function() {

if ($('geoDataBtnGet') != null) {

var key = $('geoDataBtnGet').get('data-form-key');

$('geoDataBtnGet').addEvent('click', function(e){

$('geoDataBtnGet').toggleClass('symbol-search').toggleClass('symbol-busy');
googleMapGeoFromForm(key);

});

$('geoDataBtnDelete').addEvent('click', function(e){

$('geoDataBtnGet').toggleClass('element_hidden');
$('geoDataBtnDelete').toggleClass('element_hidden');
$('geoDataBtnShow').toggleClass('element_hidden');

$('geoDataLat').value = '';
$('geoDataLon').value = '';

});

}

});




var imagesSortable = '';

window.addEvent('load', function() {

if ($('contentImagesListView') != null) imagesSortableInit();

});


function imagesSortableInit () {

imagesSortable = new Sortables($('contentImagesListView'), {
constrain: true,
opacity: 0.5,
handle: 'tr img.move',
onComplete: function(response){

//Variablen initialisieren
var elements = '';
var contentId = 0;
var contentType = '';

//zugehoerigen Inhalt ermitteln
if ($('contentImagesListView').getProperty('data-content-id') != '') {

var tmp = $('contentImagesListView').getProperty('data-content-id').split('_');
contentId = tmp[1];
contentType = tmp[2];

}

//Sidebar durchlaufen
$$('#contentImagesListView > tbody').each(function(item) {

if (item.getProperty('id') != null) {
if (elements != '') elements += '::';
elements += item.getProperty('id').replace(/image_id/g, "");
}

});

//Request senden
new Request.JSON({url: config['fileWeb']+'?ajax=imagesSortableSave&content_id='+contentId+'&content_type='+contentType, onComplete: function(response){
if (response.status == "false") {
alert("Die neue Reihenfolge der Bilder konnte nicht gespeichert werden!");
}
}}).post({'elements': elements});

}
});

}








function imageSelector (type, fieldId, imagePath, imageType, imagePreview, previewId, imageId, api, javastring) {

var formElements = document.forms['imagesselect'].elements;
var insert = '';
var className = '';
var source = '';

if (type == 'complete') {

//Bildausrichtung
if (formElements['image_align'][1].checked == true) {
className = ' class="align_left"';
} else if (formElements['image_align'][2].checked == true) {
className = ' class="align_center"';
} else if (formElements['image_align'][3].checked == true) {
className = ' class="align_right"';
}

//Bildvariante
if (formElements['image_size'].value != "") source = '.'+formElements['image_size'].value;

if (formElements['image_url'].value != '') insert = insert + '<a href="' + formElements['image_url'].value + '"' + className + '>';
var re = new RegExp('.'+imageType,"g");
insert = insert + '<img src="' + imagePath.replace(re, source+'.'+imageType) + '" ';
if (formElements['image_url'].value == '') insert = insert + className;
if (formElements['image_title'].value != '') insert = insert + ' title="' + formElements['image_title'].value + '" ';
insert = insert + ' alt="" />';
if (formElements['image_url'].value != '') insert = insert + '</a>';

parent.insertImg(insert, fieldId);

} else {

//Bildvariante
if (formElements['image_size'].value != "") source = '.'+formElements['image_size'].value;

var re = new RegExp('.'+imageType,"g");
parent.imageSelectorThumb(previewId, imagePreview, imagePath.replace(re, source+'.'+imageType), imageId, api);

if (javastring != '') eval('parent.'+javastring+'();');

}

parent.SqueezeBox.close();
}




function imageSelectorThumb (previewId, imagePreview, imagePath, imageId, api) {

if ($(previewId+'ImagePreview') != null) $(previewId+'ImagePreview').set('src', imagePreview);
if ($(previewId+'ImageSource') != null) $(previewId+'ImageSource').value = imagePath;
if ($(previewId+'ImageId') != null) $(previewId+'ImageId').value = imageId;
if ($(previewId+'Image') != null) $(previewId+'Image').set('src',  imagePath);

//Bild per Api speichern
if (api != '') imageChangeApi(imagePath, api);

}






function imageChangeApi (imagePath, api) {

new Request.JSON({url: config['fileWeb'], onComplete: function(response){

if (response.status == "true") {
if (response.javascript != '') Browser.exec(response.javascript);
}

}}).get({'ajax': api, 'image': imagePath});
}





var imageCropper=new Class({Implements:[Events,Options],options:{maskOpacity:.5,left:0,top:0,maskClassName:"cropperMask",moverClassName:"cropperMove",resizerClassName:"cropperResize",wrapperClassName:"cropperWrapper",mini:{x:80,y:80},onComplete:function(){},resizerWidth:8,ratio:0,resizable:true,keepRatio:true},initialize:function(e,t){window.addEvent("domready",function(){this.target=$(e);if(this.target.get("tag")!="img"){return false}this.setOptions(t);this.mini={};this.mini.x=this.options.mini.x.toInt();this.mini.y=this.options.mini.y.toInt();if(!this.options.resizable){this.options.resizerWidth=0}this.runonce=false;new Asset.image(this.target.get("src"),{onload:function(){if(this.runonce){return}this.runonce=true;this.buildCropper();this.buildMask();this.drag=new Drag.Move(this.resizer,{container:this.target,handle:this.dragger,snap:5,onComplete:function(){this.fireEvent("onComplete",[this.top,this.left,this.width,this.height])}.bind(this),onDrag:function(){this.updateMask();this.top=((this.rezr_coord.top-this.target_coord.top)*this.scaleRatio).toInt();this.left=((this.rezr_coord.left-this.target_coord.left)*this.scaleRatio).toInt();this.width=Math.max((this.rezr_coord.width*this.scaleRatio).toInt(),120);this.height=Math.max((this.rezr_coord.height*this.scaleRatio).toInt(),120)}.bind(this)});if(this.options.resizable){if(this.options.keepRatio){this.ratio=this.mini.x/this.mini.y}this.resize=this.resizer.makeResizable({snap:5,limit:{x:[(this.mini.x/this.scaleRatio).toInt()-this.margin],y:[(this.mini.y/this.scaleRatio).toInt()-this.margin]},onComplete:function(){this.drag.fireEvent("onComplete")}.bind(this),onDrag:function(){this.rezr_coord=this.resizer.getCoordinates(this.wrapper);if(this.options.keepRatio){this.resizer.setStyle("width",(this.rezr_coord.height*this.ratio-this.margin).toInt()+"px");this.rezr_coord=this.resizer.getCoordinates(this.wrapper);if(this.rezr_coord.bottom>this.target_coord.bottom){var e=this.target_coord.bottom-this.rezr_coord.top;this.resizer.setStyles({width:(e*this.ratio).toInt()-this.margin+"px",height:e-this.margin+"px"});this.rezr_coord=this.resizer.getCoordinates(this.wrapper)}if(this.rezr_coord.right>this.target_coord.right){var e=this.target_coord.right-this.rezr_coord.left;this.resizer.setStyles({width:e-this.margin+"px",height:(e/this.ratio).toInt()-this.margin+"px"})}}else{if(this.rezr_coord.right>this.target_coord.right){var e=this.target_coord.right-this.rezr_coord.left-this.margin+"px";this.resizer.setStyle("width",e);this.rezr_coord=this.resizer.getCoordinates(this.wrapper)}if(this.rezr_coord.bottom>this.target_coord.bottom){var e=this.target_coord.bottom-this.rezr_coord.top-this.margin+"px";this.resizer.setStyle("height",e)}}this.drag.fireEvent("onDrag")}.bind(this)})}this.drag.fireEvent("onDrag");this.drag.fireEvent("onComplete");this.show()}.bind(this)})}.bind(this))},buildCropper:function(){this.wrapper=(new Element("div",{"class":this.options.wrapperClassName,styles:{position:"relative",width:this.target.getSize().x,height:this.target.getSize().y,overflow:"hidden"}})).wraps(this.target);this.border=this.target.getStyle("border-left");this.target.setStyles({margin:0,border:0,"float":"none"});this.target_coord=this.target.getCoordinates(this.wrapper);new Asset.image(this.target.get("src"),{onload:function(e){this.scaleRatio=e.get("width")/this.target_coord.width;if(this.resize){if(this.scaleRatio<1){this.resizer.setStyles({width:(this.mini.x/this.scaleRatio).toInt()-this.margin,height:(this.mini.y/this.scaleRatio).toInt()-this.margin})}this.resize.options.limit={x:[175-this.margin],y:[175-this.margin]};this.drag.fireEvent("onDrag");this.drag.fireEvent("onComplete")}}.bind(this)});if(this.target_coord.width<this.mini.x){this.mini.y=this.target_coord.width*this.mini.y/this.mini.x;this.mini.x=this.target_coord.width}if(this.target_coord.height<this.mini.y){this.mini.x=this.target_coord.height*this.mini.x/this.mini.y;this.mini.y=this.target_coord.height}var e=this.options.left;var t=this.options.top;this.resizer=(new Element("div",{"class":this.options.resizerClassName,styles:{position:"absolute",display:"block",margin:0,opacity:0,width:this.mini.x,height:this.mini.y,left:e,top:t,padding:"0 "+this.options.resizerWidth.toInt()+"px "+this.options.resizerWidth.toInt()+"px 0","z-index":5}})).inject(this.target,"after");this.margin=2*this.resizer.getStyle("border-width").toInt()+this.options.resizerWidth.toInt();this.resizer.setStyles({width:this.mini.x-this.margin+"px",height:this.mini.y-this.margin+"px"});this.dragger=(new Element("div",{"class":this.options.moverClassName,styles:{display:"block",position:"relative",width:"100%",height:"100%",margin:0,"font-size":0,"line-height":0},events:{mousedown:function(e){e.stop()}}})).inject(this.resizer)},buildMask:function(){this.innermask=this.target.clone();this.innermask.setStyles({position:"absolute",padding:0,margin:0,top:0,left:0,"z-index":4,opacity:0}).inject(this.wrapper);this.outtermask=(new Element("div",{"class":this.options.maskClassName,styles:{position:"absolute",padding:0,margin:0,top:0,left:0,width:"100%",height:this.target_coord.height,"z-index":3,opacity:0},events:{click:this.moveToClick.bind(this)}})).inject(this.wrapper);this.slide=new Fx.Elements($$(this.resizer,this.innermask),{onComplete:function(){this.updateMask();this.drag.fireEvent("onDrag");this.drag.fireEvent("onComplete")}.bind(this)})},updateMask:function(){this.rezr_coord=this.resizer.getCoordinates(this.wrapper);this.innermask.setStyle("clip","rect("+this.rezr_coord.top+"px "+this.rezr_coord.right+"px "+this.rezr_coord.bottom+"px "+this.rezr_coord.left+"px)")},moveToClick:function(e){var t=e.page.x;var n=e.page.y;var r=this.wrapper.getPosition();var i=t-r.x;var s=n-r.y;var o=(s-(this.rezr_coord.height/2).toInt()).limit(0,this.target_coord.height-this.rezr_coord.height);var u=(i-(this.rezr_coord.width/2).toInt()).limit(0,this.target_coord.width-this.rezr_coord.width);var a=u+this.rezr_coord.width;var f=o+this.rezr_coord.height;var l={0:{top:o,left:u},1:{clip:[[this.rezr_coord.top,this.rezr_coord.right,this.rezr_coord.bottom,this.rezr_coord.left],[o,a,f,u]]}};this.slide.start(l)},hide:function(){$$(this.resizer,this.innermask,this.outtermask).fade("out")},show:function(){$$(this.resizer,this.innermask).fade("in");this.outtermask.fade(this.options.maskOpacity)},toggle:function(){if(this.resizer.getStyle("opacity")==1){this.hide()}else{this.show()}},destroy:function(){this.hide();this.target.setStyle("border",this.border);(function(){this.target.replaces(this.wrapper)}).delay(600,this)}})

window.addEvent('load',function() {

if ($('cropImage') != null) {

var portraitCropper = new imageCropper('cropImage',{
maskOpacity:0.5,
mini:{
x:$('cropWidth').get('value'),
y:$('cropHeight').get('value')
},
left: $('cropX').get('value').toInt(),
top: $('cropY').get('value').toInt(),
ratio: $('cropRatio').get('value').toInt(),
onComplete:function(top,left,width,height){
$('cropY').set('value',top);
$('cropX').set('value',left);
$('cropWidth').set('value',width);
$('cropHeight').set('value',height);
}
});

}

});




var siteSortable = '';

window.addEvent('load', function() {

if ($('siteSortable') != null) siteSortableReal($('siteSortable').get('data-sort-ajax'));

});

function siteSortableInit () {
siteSortableReal('siteElementsStructure');
}

function siteSortableReal (ajax) {

siteSortable = new Sortables($('siteSortable'), {
constrain: true,
opacity: 0.5,
handle: 'span.move',
onComplete: function(response){

//Variablen initialisieren
var elements = '';

//Seite durchlaufen
$$('#siteSortable > .elementFrame').each(function(item) {

if (item.getProperty('data-element-key') != null) {
if (elements != '') elements += '::';
elements += item.getProperty('data-element-key');
}

});

//Request senden
new Request.JSON({url: config['fileWeb']+'?ajax='+ajax, onComplete: function(response){
if (response.status == "false") {
alert("Die neue Reihenfolge der Elemente konnte nicht gespeichert werden!");
}
}}).post({'key': config["act"], 'file': config["file"], 'elements': elements});

}

});

}







function changeNaviType (item) {

if (item.value == 'link') {

$('dropdown_li').addClass('element_hidden');
$('url_li').removeClass('element_hidden');

} else {

$('url_li').addClass('element_hidden');
$('dropdown_li').removeClass('element_hidden');

}

}




window.addEvent("load", function(){

//Slider fuer erste Navigationsebene
if ($('navi') && $('navislider') && $('navi').hasClass('edit')) naviSliderInit('navi');

});


function naviSliderInit (type) {

var naviWidth = 20;
var naviCount = 0;
var naviPosition = 0;
var naviCurrent = 0;
var naviElements = [];

$$('#'+type+'list li').each(function(item) {
naviWidth += item.getComputedSize().totalWidth + 2;
naviElements.push(item.getProperty('id'));
naviCount++;
});

if (naviWidth > $(type+'list').getComputedSize().totalWidth) {

$(type+'slider').setStyle('width', $(type+'list').getStyle('width'));
$(type+'list').setStyle('width', naviWidth+'px');
naviPosition = $(naviElements[0]).getPosition('#'+type+'slider').x;

var myFx = new Fx.Scroll(type+'slider', { duration: 500, wait: true });

var iconSliderRight = new Element('span', {
'id': type+'SliderRight',
'class': 'sliderright symbolblock symbol-arrow-right'
});
var iconSliderLeft = new Element('span', {
'id': type+'SliderLeft',
'class': 'element_hidden sliderleft symbolblock symbol-arrow-left'
});

iconSliderRight.addEvent('click', function(event){

naviCurrent++;
myFx.toElement(naviElements[naviCurrent]);
(function(){
if (naviWidth - naviPosition + $(naviElements[0]).getPosition('#'+type+'slider').x - 25 < $(type+'slider').getComputedSize().totalWidth) {
iconSliderRight.addClass('element_hidden');
iconSliderLeft.removeClass('element_hidden');
} else {
iconSliderLeft.removeClass('element_hidden');
}
}).delay(550);

});

iconSliderLeft.addEvent('click', function(event){

naviCurrent--;
if (naviCurrent == 0) {
myFx.toLeft();
iconSliderLeft.addClass('element_hidden');
} else {
myFx.toElement(naviElements[naviCurrent]);
iconSliderRight.removeClass('element_hidden');
}
});

iconSliderRight.inject($(type));
iconSliderLeft.inject($(type));

} else {

if ($(type+'SliderLeft') != null) $(type+'SliderLeft').destroy();
if ($(type+'SliderRight') != null) $(type+'SliderRight').destroy();

}
}









window.addEvent('load', function() {

//Sortierung fuer erste Navigationsebene
if ($('navilist') != null && $('navilist').getProperty('rel') == 'pageedit') sortableNavigation('navi');

});

function sortableNavigation (type) {

var naviSortable = new Sortables($(type.toLowerCase()+'list'), {
constrain: true,
opacity: 0.5,
handle: '.move',
onComplete: function(response){

//Variablen initialisieren
var elements = '';

//Navigation durchlaufen
$$('#'+type.toLowerCase()+'list > li').each(function(item) {

if (item.getProperty('rel') != null) {
if (elements != '') elements += '::';
elements += item.getProperty('rel');
}

});

//Request senden
new Request.JSON({url: config['fileWeb']+'?ajax=sortableNavigation', onComplete: function(response) {

if (response.status == "false") alert("Die neue Reihenfolge der Navigation konnte nicht gespeichert werden!");

}}).post({'key': config["act"], 'type': type, 'elements': elements});

}
});

}



/**
 * Element in einer beliebigen Navigation loeschen
 */
function deleteNavigation (type, elementId) {

new Request.JSON({url: config['fileWeb'], onComplete: function(response){

if (response.status == "true") {

$(type+'Element_'+elementId).dispose();
naviSliderInit(type.toLowerCase());

} else {

if (response.msg != '') alert(response.msg);

}

}}).get({'ajax': 'deleteNavigation', 'type': type, 'key': elementId});

}











window.addEvent('domready', function() {

if ($('siteElementsChoice')) {

var pageType = $('siteElementsChoice').get('data-page-type');

$$('#siteElementsChoice a').each(function(elem){

var type = elem.get('data-element-type');
elem.addEvent('click', function(e) {

if(e) e.stop();

var options = (pageType == 'site') ? {'ajax': 'pagesElementAdd', 'type': type, 'page_id': $('siteElementsChoice').get("data-page-id"), 'page_act': $('siteElementsChoice').get("data-page-act")} : homepagesSitesElementAdd(type);

new Request.JSON({url: config["fileWeb"], onComplete: function(response){
if (response.status == "true") {
var els = Elements.from(response.html);
els.inject($('siteElementsNew'), 'before');
if (response.javascript != '') Browser.exec(response.javascript);

}
}}).get(options);
});
});
}

return false;
});




/**
 * Element im Inhaltsbereich aendern
 */

function elementsEdit (elem, type, activitiy, elementId) {

var ajax = (activitiy == 'cancel') ? 'pagesElementsCancel' : 'pagesElementsEdit';

elementsEditReal('site', elementId, {'ajax': ajax, 'type': type, 'key': elementId, 'edit': '1'});

return false;
}


function elementsEditReal (base, elementId, options) {

new Request.JSON({url: config['fileWeb'], evalScripts: true, onComplete: function(response){

if (response.status == "true") {

if (response.code != '') $('siteElementContent_'+elementId).set('html', response.code);
if (response.javascript != '') Browser.exec(response.javascript);
if (response.icons != '') $('siteElementIcons_'+elementId).set('html', response.icons);

window[base+'SortableInit']();

} else {

if (response.msg != '') MessageBox.status(response.msg);

}
}}).get(options);
}




/**
 * Element im Inhaltsbereich nach dem Aendern speichern
 */

function elementsSave (type, elementId) {

var path = config['fileWeb']+'?ajax=pagesElementsSave&key='+elementId+'&type='+type+'&edit=';

elementsSaveReal('site', path, elementId);

return false;
}



function elementsSaveReal (base, path, elementId) {

var requestSave = new Request.JSON({method: 'post', url: path, onComplete: function(response){

if (response.status == "true") {

if (response.code != '') $('siteElementContent_'+elementId).set('html', response.code);
if (response.javascript != '') Browser.exec(response.javascript);
if (response.icons != '') $('siteElementIcons_'+elementId).set('html', response.icons);

window[base+'SortableInit']();

} else {

if (response.msg != '') MessageBox.status(response.msg);

}
}});

requestSave.send($(elementId+'Form').toQueryString());
}




/**
 * Element im Inhaltsbereich loeschen
 */

function elementsDelete (elementId) {

elementsDeleteReal('pagesElementsDelete', elementId);

}

function elementsDeleteReal (ajax, elementId) {

new Request.JSON({url: config['fileWeb'], evalScripts: true, onComplete: function(response){
if (response.status == "true") {

var myFx = new Fx.Tween('siteElement_'+elementId, { onComplete: function() { $('siteElement_'+elementId).destroy();  }});
myFx.start('opacity', '0');
if ($('siteElementIcons_'+elementId) != null) $('siteElementIcons_'+elementId).destroy();
if ($('siteElementHeader_'+elementId) != null) $('siteElementHeader_'+elementId).destroy();
if (response.javascript != '') Browser.exec(response.javascript);

} else {

if (response.msg != '') MessageBox.status(response.msg);

}

}}).get({'ajax': ajax, 'key': elementId});
}







function naviDropdownElementAdd () {

//Request senden
new Request.JSON({url: config['fileWeb'], onComplete: function(response){
if (response.status == "true") {

var els = Elements.from(response.html);
els.inject($('dropdownCount'), 'before');
$('dropdownCount').value = $('dropdownCount').value.toInt()+1;
var elements = '';

}
}}).get({'ajax': 'naviDropdownElementAdd', 'index': $('dropdownCount').value});

}


/**
 * Zeilen bei Accordion sortieren
 */

function elementsAccordionLineOrder (id) {

var siteSortable = new Sortables($(id+'Accordion'), {
constrain: true,
opacity: 0.5,
handle: '.move',
onComplete: function(response){

//Variablen initialisieren
var elements = '';

//Liste durchlaufen
$$('#'+id+'Accordion > .elementsLine').each(function(item) {

if (item.getProperty('data-accordion-order') != null) {
if (elements != '') elements += '::';
elements += item.getProperty('data-accordion-order');
}

});

//Reihenfolge sichern
$(id+'AccordionOrder').value = elements;

}

});

}










function elementsAccordionAddLine (id) {

new Request.JSON({url: config['fileWeb'], onComplete: function(response){

if (response.status == "true") {

var els = Elements.from(response.html);
els.inject($(id+'Accordion'), 'bottom');

$(id+'AccordionCount').value = $(id+'AccordionCount').value.toInt()+1;

if (response.javascript != '') Browser.exec(response.javascript);
}

}}).get({'ajax': 'elementsAccordionAddLine', 'id': id, 'index': $(id+'AccordionCount').value});

return false;
}


/**
 * Zeilen bei Kontakten sortieren
 */

function elementsContactsLineOrder (id) {

var siteSortable = new Sortables($(id+'Contacts'), {
constrain: true,
opacity: 0.5,
handle: 'span.move',
onComplete: function(response){

//Variablen initialisieren
var elements = '';

//Liste durchlaufen
$$('#'+id+'Contacts > .elementsLine').each(function(item) {

if (item.getProperty('data-contacts-order') != null) {
if (elements != '') elements += '::';
elements += item.getProperty('data-contacts-order');
}

});

//Reihenfolge sichern
$(id+'ContactsOrder').value = elements;

}

});

}






function elementsContactsAddLine (id) {

new Request.JSON({url: config['fileWeb'], onComplete: function(response){

if (response.status == "true") {

var els = Elements.from(response.html);
els.inject($(id+'Contacts'), 'bottom');

$(id+'ContactsCount').value = $(id+'ContactsCount').value.toInt()+1;

elementsContactsLineOrder(id);
if (response.javascript != '') Browser.exec(response.javascript);
}

}}).get({'ajax': 'elementsContactsAddLine', 'id': id, 'index': $(id+'ContactsCount').value});

return false;
}







function elementsContactsChangeLayout (key) {

new Request.JSON({url: config['fileWeb'], onComplete: function(response){

if (response.status == "true") {

$('siteElementContent_'+key).set('html', '');
var els = Elements.from(response.html);
els.inject($('siteElementContent_'+key), 'top');

}

}}).get({'ajax': 'elementsContactsChangeLayout', 'key': key});

return false;
}


/**
 * Zeilen bei Liste von Links sortieren
 */

function elementsLinklistLineOrder (id) {

var siteSortable = new Sortables($(id+'Linklist'), {
constrain: true,
opacity: 0.5,
handle: 'img.move',
onComplete: function(response){

//Variablen initialisieren
var elements = '';

//Liste durchlaufen
$$('#'+id+'Linklist > .elementsLine').each(function(item) {

if (item.getProperty('data-linklist-order') != null) {
if (elements != '') elements += '::';
elements += item.getProperty('data-linklist-order');
}

});

//Reihenfolge sichern
$(id+'LinklistOrder').value = elements;

}

});

}






function elementsLinklistAddLine (id) {

new Request.JSON({url: config['fileWeb'], onComplete: function(response){

if (response.status == "true") {

var els = Elements.from(response.html);
els.inject($(id+'Linklist'), 'bottom');

$(id+'LinklistCount').value = $(id+'LinklistCount').value.toInt()+1;

elementsLinklistLineOrder(id);
if (response.javascript != '') Browser.exec(response.javascript);
}

}}).get({'ajax': 'elementsLinklistAddLine', 'id': id, 'index': $(id+'LinklistCount').value});

return false;
}

/**
 * Zeilen bei Slideshow sortieren
 */

function elementsSlideshowLineOrder (id) {

var siteSortable = new Sortables($(id+'Slideshow'), {
constrain: true,
opacity: 0.5,
handle: '.move',
onComplete: function(response){

//Variablen initialisieren
var elements = '';

//Liste durchlaufen
$$('#'+id+'Slideshow > .elementsLine').each(function(item) {

if (item.getProperty('data-slideshow-order') != null) {
if (elements != '') elements += '::';
elements += item.getProperty('data-slideshow-order');
}

});

//Reihenfolge sichern
$(id+'SlideshowOrder').value = elements;

}

});

}






function elementsSlideshowAddLine (id) {

new Request.JSON({url: config['fileWeb'], onComplete: function(response){

if (response.status == "true") {

var els = Elements.from(response.html);
els.inject($(id+'Slideshow'), 'bottom');

$(id+'SlideshowCount').value = $(id+'SlideshowCount').value.toInt()+1;

elementsSlideshowLineOrder(id);
if (response.javascript != '') Browser.exec(response.javascript);
}

}}).get({'ajax': 'elementsSlideshowAddLine', 'id': id, 'index': $(id+'SlideshowCount').value});

return false;
}


/**
 * Zeilen bei Liste von Symbolen sortieren
 */

function elementsSymbolslistsLineOrder (id) {

var siteSortable = new Sortables($(id+'Symbolslists'), {
constrain: true,
opacity: 0.5,
handle: 'span.move',
onComplete: function(response){

//Variablen initialisieren
var elements = '';

//Liste durchlaufen
$$('#'+id+'Symbolslists > .elementsLine').each(function(item) {

if (item.getProperty('data-symbolslists-order') != null) {
if (elements != '') elements += '::';
elements += item.getProperty('data-symbolslists-order');
}

});

//Reihenfolge sichern
$(id+'SymbolslistsOrder').value = elements;

}

});

}






function elementsSymbolslistsAddLine (id) {

new Request.JSON({url: config['fileWeb'], onComplete: function(response){

if (response.status == "true") {

var els = Elements.from(response.html);
els.inject($(id+'Symbolslists'), 'bottom');

$(id+'SymbolslistsCount').value = $(id+'SymbolslistsCount').value.toInt()+1;

elementsSymbolslistsLineOrder(id);
if (response.javascript != '') Browser.exec(response.javascript);
}

}}).get({'ajax': 'elementsSymbolslistsAddLine', 'id': id, 'index': $(id+'SymbolslistsCount').value});

return false;
}




function elementsThumbsAddLine (id) {

new Request.JSON({url: config['fileWeb'], onComplete: function(response){

if (response.status == "true") {

var els = Elements.from(response.html);
els.inject($(id+'Thumbs'), 'bottom');

$(id+'ThumbsCount').value = $(id+'ThumbsCount').value.toInt()+1;

if (response.javascript != '') Browser.exec(response.javascript);
}

}}).get({'ajax': 'elementsThumbsAddLine', 'id': id, 'index': $(id+'ThumbsCount').value});

return false;
}





/**
 * Zeilen bei Bildergalerie sortieren
 */

function elementsThumbsLineOrder (id) {

var siteSortable = new Sortables($(id+'Thumbs'), {
constrain: true,
opacity: 0.5,
handle: 'span.move',
onComplete: function(response){

//Variablen initialisieren
var elements = '';

//Liste durchlaufen
$$('#'+id+'Thumbs > .elementsLine').each(function(item) {

if (item.getProperty('data-thumbs-order') != null) {
if (elements != '') elements += '::';
elements += item.getProperty('data-thumbs-order');
}

});

//Reihenfolge sichern
$(id+'ThumbsOrder').value = elements;

}

});

}









function elementsVitaAddLine (id) {

new Request.JSON({url: config['fileWeb'], onComplete: function(response){

if (response.status == "true") {

var els = Elements.from(response.html);
els.inject($(id+'Vita'), 'bottom');

$(id+'VitaCount').value = $(id+'VitaCount').value.toInt()+1;

elementsVitaLineOrder(id);
}

}}).get({'ajax': 'elementsVitaAddLine', 'id': id, 'index': $(id+'VitaCount').value});

return false;
}







/**
 * Zeilen bei Lebenslauf sortieren
 */

function elementsVitaLineOrder (id) {

var siteSortable = new Sortables($(id+'Vita'), {
constrain: true,
opacity: 0.5,
handle: 'span.move',
onComplete: function(response){

//Variablen initialisieren
var elements = '';

//Liste durchlaufen
$$('#'+id+'Vita > .elementsLine').each(function(item) {

if (item.getProperty('data-vita-order') != null) {
if (elements != '') elements += '::';
elements += item.getProperty('data-vita-order');
}

});

//Reihenfolge sichern
$(id+'VitaOrder').value = elements;

}

});

}




function pdfArchivSearchUpdate (elem) {

var value = elem.value;
var key = elem.get('name');

new Request.JSON({url: config["fileWeb"], onComplete: function(response){

if (response.status == "true") {

$('pdfArchivList').set('html', '');
$('pdfArchivSearchErg').set('html', response.erg);
$('pdfArchivSearchReset').removeClass('element_hidden');

var els = Elements.from(response.list);
els.inject($('pdfArchivList'), 'bottom');

if (response.button == "true") {
$('loadMorePdfArchiv').removeClass('element_hidden');
} else {
$('loadMorePdfArchiv').addClass('element_hidden');
}

}
}}).get({'ajax': 'pdfArchivSearchUpdate', 'key': key, 'value': value});

}






window.addEvent('domready', function() {

if ($('loadMorePdfArchivButton') != null) {

$('loadMorePdfArchivButton').addEvent('click', function() {

var counter = 0;
var topic = "";
var params = $('loadMorePdfArchivButton').getProperty('href').replace(/#/, '').parseQueryString();
var ajax = params.ajax;
if (params.topic) topic = params.topic;

//letzte ID ermitteln
$$('#pdfArchivList tr').each(function(item, index) {
counter++;
});

//Ajax-Request ermitteln
new Request.JSON({url: config['fileWeb'], onRequest: function(instance) {  }, onComplete: function(response){

if (response.status == "true") {

var els = Elements.from(response.html);
els.inject($('pdfArchivList'), 'bottom');

if ($('loadMoreCount') != null) $('loadMoreCount').set('text', $('loadMoreCount').get('text').toInt()+response.count.toInt());

if (response.end == "true") $('loadMorePdfArchiv').dispose();

$('loadMorePdfArchiv').removeClass('element_hidden');

} else {

$('loadMorePdfArchiv').addClass('element_hidden');

}

}}).get({'ajax': ajax, 'counter': counter, 'topic': topic});

return false;
});
}
});



function searchIndexRenew (response) {

if (response.status == 'true') {

indexCurrent++;

if (indexCurrent != indexSteps) {

var indexStatusbar = indexStatus * indexCurrent;

$('searchIndexStatusBar').setStyle('width', indexStatusbar+'%');
$('searchIndexStatusCounter').innerHTML = indexStatusbar.round(1)+' %';

new Request.JSON({url: config['fileWeb'], onComplete: searchIndexRenew}).get({'ajax': 'searchIndexRenew', 'more': indexCurrent});

} else {

$('searchIndexWorking').setStyle('display', 'none');
$('searchIndexSuccess').removeClass('element_hidden');

}


}
}




window.addEvent('domready', function() {

if ($('usersLoadMoreButton') != null) {

$('usersLoadMoreButton').addEvent('click', function() {

var usersDetails = '';
var ajax = '';
var search = '';
var counter = 0;
var more = 0;
var params = $('usersLoadMoreButton').getProperty('href').replace(/#/, '').parseQueryString();
if (params.ajax) ajax = params.ajax;
if (params.search) search = params.search;
if (params.more) more = params.more;

$$('#usersList tr').each(function(item, index) {
usersDetails = item.get('id');
counter++;
});
usersDetails = usersDetails.split('-');

//Ajax-Request ermitteln
new Request.JSON({url: config['fileWeb'], onRequest: function(instance) {  }, onComplete: function(response){

if (response.status == "true") {

var els = Elements.from(response.html);
els.inject($('usersList'), 'bottom');

if ($('loadMoreCount') != null) $('loadMoreCount').set('text', $('loadMoreCount').get('text').toInt()+response.count.toInt());

if (response.end == "true") {

$('usersLoadMore').addClass('element_hidden');

} else {

$('usersLoadMore').removeClass('element_hidden');
}


} else {

$('usersLoadMore').addClass('element_hidden');

}

}}).get({'ajax': ajax, 'id': usersDetails[2], 'counter': counter, 'search': search, 'more': more});

return false;
});
}
});




