// Copyright (c) 2006 Ian Tyndall - ityndall@ctc.net
//
// Modified by Sindre Wimberger - wimberger@echonet.at
// added support for 'ntoggle' and 'ncontent' classes to identify accordion containers
// added support for custom eventlistner
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
Effect.Accordion = Class.create();
Effect.Accordion.prototype = {
initialize: function(element) {
var accordion = this;
this.element = element;
this.options = ({
eventlistener: 'click',
duration: '0.5',
openAll: 'false',
closeAll: 'false',
toggleAll: 'false',
downBeforestart: 'false',
downAfterfinish: 'false',
upBeforestart: 'false',
upAfterfinish: 'false'
}, arguments[1] || {});
this.allOpen = false;
this._setup(this.element);
},
_setup: function(element) {
this.accBodies = []; //bodies accordion blind elements
this.bodOptions = [];
var manager = function(el){
var onClickargs = [];
var clickOptions = this._getBlindOptions('down', this.options.duration);
onClickargs[0] = el.next('.ncontent');
var elementDims =  Element.getDimensions(onClickargs[0]);
clickOptions.scaleMode =  {originalHeight: elementDims.height, originalWidth: elementDims.width};
onClickargs[1] = clickOptions;
this.bodOptions.push(onClickargs);
this.accBodies.push(onClickargs[0]);
Event.observe(el, this.options.eventlistener, this._onClick.bindAsEventListener(this, onClickargs));
}.bind(this);
$$('#'+this.element+' .ntoggle').each( function(el) {
manager(el);
});
this._closeOpen(0, 'start');
$H(this.options).each( function(opt) {
if(opt.value) { this._setupOptions(opt.key, opt.value); }
}.bind(this));
},
_setupOptions: function(optionkey, optionval) {
switch(optionkey) {
case 'openAll' : Event.observe($(this.options.openAll), "click", this._openAll.bindAsEventListener(this, 0.5));
break;
case 'closeAll' : Event.observe($(this.options.closeAll), "click", this._closeAll.bindAsEventListener(this, 0.5));
break;
case 'toggleAll' : Event.observe($(this.options.toggleAll), "click", this._toggleAll.bindAsEventListener(this, 0.5));
break;
}
},
destroy: function() {
if (Event.observers) {
$A(Event.observers).each(function(ob, i) {
if (ob[0] == this.accBodies[i].previous('.ntoggle')) {
Event.stopObserving(ob[0], ob[1], ob[2]);
}
}.bind(this));
}
if(this.options.openAll) { Event.stopObserving($(this.options.openAll), "click", this._openAll.bindAsEventListener(this, 0.5)); }
if(this.options.closeAll) { Event.stopObserving($(this.options.closeAll), "click", this._closeAll.bindAsEventListener(this, 0.5)); }
if(this.options.toggleAll) { Event.stopObserving($(this.options.toggleAll), "click", this._toggleAll.bindAsEventListener(this, 0.5)); }
this._openAll(false, 0);
},
_getBlindOptions: function(action, lapse) {
var tempObj = ({});
if(lapse >= 0) { tempObj.duration = lapse };
//		tempObj.fps = 1000;
//		tempObj.scaleContent = false;
//		tempObj.scaleMode = 'contents';
if(action == 'up') {
if(typeof this.options.upBeforestart == 'function') { tempObj.beforeStart = this.options.upBeforestart; }
if(typeof this.options.upAfterfinish == 'function') { tempObj.afterFinish = this.options.upAfterfinish; }
} else if(action == 'down') {
if(typeof this.options.downBeforestart == 'function') { tempObj.beforeStart = this.options.downBeforestart; }
if(typeof this.options.downAfterfinish == 'function') { tempObj.afterFinish = this.options.downAfterfinish; }
}
return tempObj;
},
_onClick: function(event, args) {
var i = this.accBodies.indexOf(args[0]);
var openOptions = this._getBlindOptions('down', args[1]);
args[1].beforeSetup = function(e) { e.index = i + 1; }
if(!Element.visible(args[0])) {
Effect.BlindDown(args[0], openOptions);
}
this._closeOpen(this.options.duration, true, i);
},
_closeOpen: function(lapse, keepopen, camefrom) {
var closeOptions = this._getBlindOptions('up', lapse); //
var openOptions = this._getBlindOptions('down', lapse); //
this.accBodies.each( function(bod, i) {
if(keepopen == true) {
if(Element.hasClassName(bod.previous('.ntoggle'), 'locked') && i != camefrom) { return false; }
} else if(keepopen == 'start') {
if(Element.hasClassName(bod.previous('.ntoggle'), 'active')) {
//bod.previous('.ntoggle').scrollTo();
if(!Element.visible(bod)) {
Effect.BlindDown(bod, openOptions);
}
return false;
}
}
closeOptions.beforeSetup = function(e) { e.index = i + 1 }
if(Element.visible(bod)) {
Effect.BlindUp(bod, closeOptions);
}
});
},
_openAll: function(event, lapse) {
var openOptions = this._getBlindOptions('down', lapse);
this.accBodies.each( function(bod, i) {
if(!Element.visible(bod)) {
openOptions.beforeSetup = function(e) { e.index = i + 1 }
Effect.BlindDown(bod, openOptions); }
});
this.allOpen = true;
},
_closeAll: function(event, lapse) {
var closeOptions = this._getBlindOptions('up', lapse);
this.accBodies.each( function(bod, i) {
closeOptions.beforeSetup = function(e) { e.index = i + 1 }
if(!Element.hasClassName(bod.previous('.ntoggle'), 'locked') && Element.visible(bod)) { Effect.BlindUp(bod, closeOptions); }
});
this.allOpen = false;
},
_toggleAll: function(event, lapse) {
this.allOpen ? this._closeAll(event, lapse) : this._openAll(event, lapse);
}
};
/*
ImgRotator
*/
var ImgRotator = Class.create ({
options: {
pause: 5, // seconds
duration: 1.5, //seconds
loop: true
},
initialize: function(container,options) {
this.container = $(container);
this.imgs = $$('#' + container + ' li');
if (this.imgs.length > 1) {
this.imgs[0].setStyle({
'position':'absolute',
'top':0,
'left':0,
'opacity':1,
'display':'block'
});
for (var i = 1; i < this.imgs.length; i++) {
this.imgs[i].setStyle({
'position':'absolute',
'top':0,
'left':0,
'opacity':0,
'display':'block'
});
}
//			this.el = new Element('div');
//			this.el.setStyle({'position':'relative'});
//			Element.insert(this.container,{bottom: this.el});
//			for (var i = 0; i < this.imgs.length; i++) {
//				this.imgs[i].remove();
//  			Element.insert(this.el,{bottom: this.imgs[i]});
//			}
this.next = 0;
this.start();
}
},
start: function() {
this.periodical = new PeriodicalExecuter(this.show.bind(this),this.options.pause);
},
stop: function() {
this.periodical.stop();
},
show: function() {
if (!this.options.loop && this.next==this.imgs.length-1) {
this.stop();
}
this.next = (this.next==this.imgs.length-1)?0:this.next+1;
var prev = (this.next==0)?this.imgs.length-1:this.next-1;
new Effect.Morph(this.imgs[this.next],{style:"opacity:1",duration: this.options.duration});
new Effect.Morph(this.imgs[prev],{style:"opacity:0",duration: this.options.duration});
}
});
//  Lightview 2.5.1 - 05-09-2009
//  Copyright (c) 2008-2009 Nick Stakenburg (http://www.nickstakenburg.com)
//
//  Licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License
//  http://creativecommons.org/licenses/by-nc-nd/3.0/
//  More information on this project:
//  http://www.nickstakenburg.com/projects/lightview/
var Scriptaculous = {Version: '1.8.2'}
var Lightview = {
Version: '2.5.1',
// Configuration
options: {
backgroundColor: '#FFFFFF',                            // Background color of the view
border: 12,                                            // Size of the border
buttons: {
opacity: {                                           // Opacity of inner buttons
disabled: 0.4,
normal: 0.75,
hover: 1
},
side: { display: true },                             // Toggle side buttons
innerPreviousNext: { display: true },                // Toggle the inner previous and next button
slideshow: { display: true },                        // Toggle slideshow button
topclose: { side: 'right' }                          // 'right' or 'left'
},
controller: {                                          // The controller is used on sets
backgroundColor: '#4d4d4d',
border: 6,
buttons: {
innerPreviousNext: true,
side: false
},
margin: 18,
opacity: 0.7,
radius: 6,
setNumberTemplate: '#{position} von #{total}'
},
cyclic: false,                                         // Makes galleries cyclic, no end/begin
images: '/assets/style/lightview/',                        // The directory of the images, from this file
imgNumberTemplate: 'Bild #{position} von #{total}',    // Want a different language? change it here
keyboard: true,                                        // Toggle keyboard buttons
menubarPadding: 6,                                     // Space between menubar and content in px
overlay: {                                             // Overlay
background: '#464A51',                                  // Background color, Mac Firefox & Mac Safari use overlay.png
close: true,
opacity: 0.7,
display: true
},
preloadHover: false,                                   // Preload images on mouseover
radius: 12,                                            // Corner radius of the border
removeTitles: true,                                    // Set to false if you want to keep title attributes intact
resizeDuration: 0.45,                                  // The duration of the resize effect in seconds
slideshowDelay: 5,                                     // Delay in seconds before showing the next slide
titleSplit: '::',                                      // The characters you want to split title with
transition: function(pos) {                            // Or your own transition
return ((pos/=0.5) < 1 ? 0.5 * Math.pow(pos, 4) :
-0.5 * ((pos-=2) * Math.pow(pos,3) - 2));
},
viewport: true,                                        // Stay within the viewport, true is recommended
zIndex: 5000,                                          // zIndex of #lightview, #overlay is this -1
startDimensions: {                                     // Dimensions Lightview starts at
width: 100,
height: 100
},
closeDimensions: {                                     // Modify if you've changed the close button images
large: { width: 77, height: 22 },
small: { width: 25, height: 22 }
},
sideDimensions: {                                      // Modify if you've changed the side button images
width: 16,
height: 22
},
defaultOptions : {                                     // Default options for each type of view
image: {
menubar: 'top',
closeButton: 'small',
topclose: true,
keyboard: true
},
gallery: {
menubar: 'bottom',
controls: true,
closeButton: 'small',
topclose: true,
keyboard: true
},
ajax:   {
width: 400,
height: 300,
menubar: 'top',
closeButton: 'small',
overflow: 'auto'
},
iframe: {
width: 400,
height: 300,
menubar: 'top',
scrolling: true,
closeButton: 'small'
},
inline: {
width: 400,
height: 300,
menubar: 'top',
closeButton: 'small',
overflow: 'auto'
},
flash: {
width: 400,
height: 300,
menubar: 'bottom',
closeButton: 'large'
},
quicktime: {
width: 480,
height: 220,
autoplay: true,
controls: true,
closeButton: 'large'
}
}
},
classids: {
quicktime: 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
flash: 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
},
codebases: {
quicktime: 'http://www.apple.com/qtactivex/qtplugin.cab#version=7,5,5,0',
flash: 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0'
},
errors: {
requiresPlugin: "<div class='message'> The content your are attempting to view requires the <span class='type'>#{type}</span> plugin.</div><div class='pluginspage'><p>Please download and install the required plugin from:</p><a href='#{pluginspage}' target='_blank'>#{pluginspage}</a></div>"
},
mimetypes: {
quicktime: 'video/quicktime',
flash: 'application/x-shockwave-flash'
},
pluginspages: {
quicktime: 'http://www.apple.com/quicktime/download',
flash: 'http://www.adobe.com/go/getflashplayer'
},
// used with auto detection
typeExtensions: {
flash: 'swf',
image: 'bmp gif jpeg jpg png',
iframe: 'asp aspx cgi cfm htm html jsp php pl php3 php4 php5 phtml rb rhtml shtml txt',
quicktime: 'avi mov mpg mpeg movie'
}
};
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(u(){G l=!!1d.8P("3j").5h,2H=1l.1T.2I&&(u(a){G b=E 4p("8Q ([\\\\d.]+)").8R(a);O b?3J(b[1]):-1})(35.4q)<7,2t=(1l.1T.5i&&!1d.3K),2R=35.4q.22("6x")>-1&&3J(35.4q.3L(/6x[\\/\\s](\\d+)/)[1])<3,4r=!!35.4q.3L(/8S/i)&&(2t||2R);18.1o(11,{8T:"1.6.1",8U:"1.8.2",V:{1b:"5j",3k:"Y"},5k:u(a){q((8V 1J[a]=="8W")||(n.5l(1J[a].8X)<n.5l(n["6y"+a]))){8Y("11 8Z "+a+" >= "+n["6y"+a])}},5l:u(a){G v=a.2S(/6z.*|\\./g,"");v=4s(v+"0".90(4-v.1s));O a.22("6z")>-1?v-1:v},5m:u(){n.5k("1l");q(!!1J.17&&!1J.6A){n.5k("6A")}q(/^(91?:\\/\\/|\\/)/.4t(n.F.1f)){n.1f=n.F.1f}10{G b=/Y(?:-[\\w\\d.]+)?\\.92(.*)/;n.1f=(($$("93 94[1x]").6B(u(s){O s.1x.3L(b)})||{}).1x||"").2S(b,"")+n.F.1f}q(!l){q(1d.5n>=8&&!1d.6C.3l){1d.6C.95("3l","96:97-98-99:9a","#5o#6D")}10{1d.1i("5p:3M",u(){G a=1d.9b();a.9c="3l\\\\:*{9d:3N(#5o#6D)}"})}}},5q:u(){n.1C=n.F.1C;n.W=(n.1C>n.F.W)?n.1C:n.F.W;n.1K=n.F.1K;n.1U=n.F.1U;n.4u()}});18.1o(11,{6E:14,2g:u(){G a=3O.9e;a.5r++;q(a.5r==n.6E){$(1d.29).5s("Y:3M")}}});11.2g.5r=0;18.1o(11,{4u:u(){n.Y=E N("U",{2T:"Y"});G d,3m,4v=1V(n.1U);q(2t){n.Y.19=u(){n.I("1j:-3n;1e:-3n;1p:1W;");O n};n.Y.1c=u(){n.I("1p:1y");O n};n.Y.1y=u(){O(n.1L("1p")=="1y"&&3J(n.1L("1e").2S("M",""))>-6F)}}$(1d.29).Q(n.2u=E N("U",{2T:"6G"}).I({2U:n.F.2U-1,1b:(!(2R||2H))?"4w":"36",2a:4r?"3N("+n.1f+"2u.1w) 1e 1j 3o":n.F.2u.2a}).1q(4r?1:n.F.2u.1F).19()).Q(n.Y.I({2U:n.F.2U,1e:"-3n",1j:"-3n"}).1q(0).Q(n.6H=E N("U",{R:"9f"}).Q(n.3P=E N("3p",{R:"9g"}).Q(n.6I=E N("1D",{R:"9h"}).I(3m=18.1o({1M:-1*n.1U.H+"M"},4v)).Q(n.4x=E N("U",{R:"5t"}).I(18.1o({1M:n.1U.H+"M"},4v)).Q(E N("U",{R:"1G"})))).Q(n.6J=E N("1D",{R:"9i"}).I(18.1o({6K:-1*n.1U.H+"M"},4v)).Q(n.4y=E N("U",{R:"5t"}).I(3m).Q(E N("U",{R:"1G"}))))).Q(n.6L=E N("U",{R:"6M"}).Q(n.4z=E N("U",{R:"5t 9j"}).Q(n.9k=E N("U",{R:"1G"})))).Q(E N("3p",{R:"9l"}).Q(E N("1D",{R:"6N 9m"}).Q(d=E N("U",{R:"9n"}).I({J:n.W+"M"}).Q(E N("3p",{R:"6O 9o"}).Q(E N("1D",{R:"6P"}).Q(E N("U",{R:"2v"})).Q(E N("U",{R:"38"}).I({1j:n.W+"M"})))).Q(E N("U",{R:"6Q"})).Q(E N("3p",{R:"6O 9p"}).Q(E N("1D",{R:"6P"}).I("1N-1e: "+(-1*n.W)+"M").Q(E N("U",{R:"2v"})).Q(E N("U",{R:"38"}).I("1j: "+(-1*n.W)+"M")))))).Q(n.4A=E N("1D",{R:"9q"}).I("J: "+(9r-n.W)+"M").Q(E N("U",{R:"9s"}).Q(E N("U",{R:"6R"}).I("1N-1e: "+n.W+"M").Q(n.2V=E N("U",{R:"9t"}).1q(0).I("3q: 0 "+n.W+"M").Q(n.6S=E N("U",{R:"9u 38"})).Q(n.1r=E N("U",{R:"9v 6T"}).Q(n.2h=E N("U",{R:"1G 6U"}).I(1V(n.F.1K.3a)).I({2a:n.F.12}).1q(n.F.1E.1F.3b)).Q(n.2W=E N("3p",{R:"9w"}).Q(n.5u=E N("1D",{R:"9x"}).Q(n.1H=E N("U",{R:"9y"})).Q(n.2i=E N("U",{R:"9z"}))).Q(n.5v=E N("U",{R:"9A"}).Q(n.3Q=E N("1D",{R:"9B"}).Q(E N("U"))).Q(n.4B=E N("1D",{R:"9C"}).Q(n.9D=E N("U",{R:"1G"}).1q(n.F.1E.1F.3b).I({12:n.F.12}).1O(n.1f+"9E.1w",{12:n.F.12})).Q(n.9F=E N("U",{R:"1G"}).1q(n.F.1E.1F.3b).I({12:n.F.12}).1O(n.1f+"9G.1w",{12:n.F.12}))).Q(n.2b=E N("1D",{R:"9H"}).Q(n.3c=E N("U",{R:"1G"}).1q(n.F.1E.1F.3b).I({12:n.F.12}).1O(n.1f+"6V.1w",{12:n.F.12})))))).Q(n.6W=E N("U",{R:"9I "}))))).Q(n.3r=E N("U",{R:"6X"}).Q(n.9J=E N("U",{R:"1G"}).I("2a: 3N("+n.1f+"3r.5w) 1e 1j 4C-3o")))).Q(E N("1D",{R:"6N 9K"}).Q(d.9L(2c))).Q(n.1X=E N("1D",{R:"9M"}).19().I("1N-1e: "+n.W+"M; 2a: 3N("+n.1f+"9N.5w) 1e 1j 3o"))))).Q(E N("U",{2T:"3R"}).19());G f=E 2j();f.1z=u(){f.1z=1l.2w;n.1U={H:f.H,J:f.J};G a=1V(n.1U),3m;n.3P.I({23:0-(f.J/2).2k()+"M",J:f.J+"M"});n.6I.I(3m=18.1o({1M:-1*n.1U.H+"M"},a));n.4x.I(18.1o({1M:a.H},a));n.6J.I(18.1o({6K:-1*n.1U.H+"M"},a));n.4y.I(3m);n.2g()}.X(n);f.1x=n.1f+"2x.1w";$w("2V 1H 2i 3Q").3S(u(e){n[e].I({12:n.F.12})}.X(n));G g=n.6H.2y(".2v");$w("6Y 6Z bl br").1g(u(a,i){q(n.1C>0){n.5x(g[i],a)}10{g[i].Q(E N("U",{R:"38"}))}g[i].I({H:n.W+"M",J:n.W+"M"}).70("2v"+a.1P());n.2g()}.X(n));n.Y.2y(".6Q",".38",".6R").3s("I",{12:n.F.12});G S={};$w("2x 1h 2l").1g(u(s){n[s+"3t"].1Q=s;G b=n.1f+s+".1w";q(s=="2l"){S[s]=E 2j();S[s].1z=u(){S[s].1z=1l.2w;n.1K[s]={H:S[s].H,J:S[s].J};G a=n.F.1E.2l.1Q,2e=18.1o({"5y":a,23:n.1K[s].J+"M"},1V(n.1K[s]));2e["3q"+a.1P()]=n.W+"M";n[s+"3t"].I(2e);n.6L.I({J:S[s].J+"M",1e:-1*n.1K[s].J+"M"});n[s+"3t"].5z().1O(b).I(1V(n.1K[s]));n.2g()}.X(n);S[s].1x=n.1f+s+".1w"}10{n[s+"3t"].1O(b)}},n);G C={};$w("3a 5A").1g(u(a){C[a]=E 2j();C[a].1z=u(){C[a].1z=1l.2w;n.1K[a]={H:C[a].H,J:C[a].J};n.2g()}.X(n);C[a].1x=n.1f+"71"+a+".1w"},n);G L=E 2j();L.1z=u(){L.1z=1l.2w;n.3r.I({H:L.H+"M",J:L.J+"M",23:-0.5*L.J+0.5*n.W+"M",1M:-0.5*L.H+"M"});n.2g()}.X(n);L.1x=n.1f+"3r.5w";G h=E 2j();h.1z=u(a){h.1z=1l.2w;G b={H:h.H+"M",J:h.J+"M"};n.2b.I(b);n.3c.I(b);n.2g()}.X(n);h.1x=n.1f+"72.1w";$w("2x 1h").1g(u(s){G S=s.1P(),i=E 2j();i.1z=u(){i.1z=1l.2w;n["3u"+S+"3v"].I({H:i.H+"M",J:i.J+"M"});n.2g()}.X(n);i.1x=n.1f+"9O"+s+".1w";n["3u"+S+"3v"].1X=s},n);$w("2b 4B 3Q").1g(u(c){n[c].19=n[c].19.1A(u(a,b){n.2e.1b="36";a(b);O n});n[c].1c=n[c].1c.1A(u(a,b){n.2e.1b="9P";a(b);O n})},n);n.Y.2y("*").3s("I",{2U:n.F.2U+1});n.Y.19();n.2g()},73:u(){17.2J.2m("Y").3S(u(e){e.74()});n.1Y=1I;q(n.y.1Z()){n.75=n.76;q(n.13&&!n.13.1y()){n.13.I("1p:1W").1c();n.3d.1q(0)}}10{n.75=1I;n.13.19()}q(4s(n.4z.1L("23"))<n.1K.2l.J){n.5B(2K)}n.77();n.78();E 17.1m({V:n.V,1t:u(){$w("1e 3T").1g(u(a){G b=a.1P();n["3w"+b].2n();G c={};n["3w"+b]=E N("U",{R:"9Q"+b}).19();c[a]=n["3w"+b];n.2V.Q(c)}.X(n))}.X(n)});n.5C();n.1n=1I},5D:u(){q(!n.3U||!n.3V){O}n.3V.Q({2X:n.3U.I({2z:n.3U.79})});n.3V.2n();n.3V=1I},1c:u(b){n.1u=1I;G c=18.7a(b);q(18.7b(b)||c){q(c&&b.3x("#")){n.1c({1k:b,F:18.1o({4D:2c},3O[1]||{})});O}n.1u=$(b);q(!n.1u){O}n.1u.9R();n.y=n.1u.24||E 11.3W(n.1u)}10{q(b.1k){n.1u=$(1d.29);n.y=E 11.3W(b)}10{q(18.7c(b)){n.1u=n.4E(n.y.26)[b];n.y=n.1u.24}}}q(!n.y.1k){O}n.73();q(n.y.2o()||n.y.1Z()){n.7d(n.y.26);n.1n=n.5E(n.y.26);q(n.y.1Z()){n.2A=n.1n.1s>1?n.7e:0;n.2Y=n.1n.9S(u(a){O a.2Z()})}}n.3X();n.7f();q(n.y.1k!="#3R"&&18.7g(11.4F).7h(" ").22(n.y.1a)>=0){q(!11.4F[n.y.1a]){$("3R").1B(E 4G(n.9T.9U).3K({1a:n.y.1a.1P(),5F:n.5G[n.y.1a]}));G d=$("3R").2f();n.1c({1k:"#3R",1H:n.y.1a.1P()+" 9V 9W",F:d});O 2K}}G e=18.1o({1r:"3T",2l:2K,5H:"9X",3Y:n.y.2o()&&n.F.1E.3Y.2z,5I:n.F.5I,2b:(n.y.2o()&&n.F.1E.2b.2z)||(n.2Y),2B:"1W",7i:n.F.2u.9Y,3Z:n.F.3Z},n.F.9Z[n.y.1a]||{});n.y.F=18.1o(e,n.y.F);q(n.y.1Z()){n.y.F.2l=(n.1n.1s<=1)}q(!(n.y.1H||n.y.2i||(n.1n&&n.1n.1s>1))&&n.y.F.2l){n.y.F.1r=2K}n.1R="3w"+(n.y.F.1r=="1e"?"7j":"7k");q(n.y.2Z()){q(!l&&!n.y.7l){n.y.7l=2c;G f=E N("3l:2p",{1x:n.y.1k,2z:"a0"}).I("J:5J;H:5J;");$(1d.29).Q(f);N.2n.3e(0.1,f)}q(n.y.2o()||n.y.1Z()){n.1b=n.1n.22(n.y);n.7m()}n.27=n.y.4H;q(n.27){n.4I()}10{n.5K();G f=E 2j();f.1z=u(){f.1z=1l.2w;n.4J();n.27={H:f.H,J:f.J};n.4I()}.X(n);f.1x=n.y.1k}}10{q(n.y.1Z()){n.1b=n.1n.22(n.y)}n.27=n.y.F.7n?m.2f():{H:n.y.F.H,J:n.y.F.J};n.4I()}},4K:(u(){u 5L(a,b,c){a=$(a);G d=1V(c);a.1B(E N("7o",{2T:"2C",1x:b,a1:"",a2:"4C"}).I(d))}G k=(u(){u 7p(a,b,c){a=$(a);G d=18.1o({"5y":"1j"},1V(c));G e=E N("3l:2p",{1x:b,2T:"2C"}).I(d);a.1B(e);e.4L=e.4L}u 7q(b,c,d){b=$(b);G f=1V(d),2p=E 2j();2p.1z=u(){3j=E N("3j",f);b.1B(3j);40{G a=3j.5h("2d");a.a3(2p,0,0,d.H,d.J)}41(e){5L(b,c,d)}}.X(n);2p.1x=c}q(1l.1T.2I){O 7p}10{O 7q}})();O u(){G c=n.7r(n.y.1k),2L=n.1Y||n.27;q(n.y.2Z()){G d=1V(2L);n[n.1R].I(d);q(n.1Y){k(n[n.1R],n.y.1k,2L)}10{5L(n[n.1R],n.y.1k,2L)}}10{q(n.y.5M()){4M(n.y.1a){2M"42":G f=18.5N(n.y.F.42)||{};G g=u(){n.4J();q(n.y.F.4D){n[n.1R].I({H:"1S",J:"1S"});n.27=n.5O(n[n.1R])}E 17.1m({V:n.V,1t:n.4N.X(n)})}.X(n);q(f.4O){f.4O=f.4O.1A(u(a,b){g();a(b)})}10{f.4O=g}n.5K();E a4.a5(n[n.1R],n.y.1k,f);2D;2M"2E":q(n.1Y){2L.J-=n.3f.J}n[n.1R].1B(n.2E=E N("2E",{a6:0,a7:0,1x:n.y.1k,2T:"2C",2q:"a8"+(7s.a9()*aa).2k(),7t:(n.y.F&&n.y.F.7t)?"1S":"4C"}).I(18.1o({W:0,1N:0,3q:0},1V(2L))));2D;2M"4P":G h=n.y.1k,2r=$(h.5P(h.22("#")+1));q(!2r||!2r.43){O}G i=2r.2f();2r.Q({ab:n.3V=E N(2r.43).19()});2r.79=2r.1L("2z");n.3U=2r.1c();n[n.1R].1B(n.3U);n[n.1R].2y("2y, 3y, 5Q").1g(u(b){n.44.1g(u(a){q(a.1u==b){b.I({1p:a.1p})}})}.X(n));q(n.y.F.4D){n.27=i;E 17.1m({V:n.V,1t:n.4N.X(n)})}2D}}10{G j={20:"3y",2T:"2C",H:2L.H,J:2L.J};4M(n.y.1a){2M"45":18.1o(j,{5F:n.5G[n.y.1a],3z:[{20:"2F",2q:"7u",2N:n.y.F.7u},{20:"2F",2q:"7v",2N:"ac"},{20:"2F",2q:"13",2N:n.y.F.7w},{20:"2F",2q:"ad",2N:2c},{20:"2F",2q:"1x",2N:n.y.1k},{20:"2F",2q:"7x",2N:n.y.F.7x||2K}]});18.1o(j,1l.1T.2I?{ae:n.af[n.y.1a],ag:n.ah[n.y.1a]}:{2W:n.y.1k,1a:n.7y[n.y.1a]});2D;2M"46":18.1o(j,{2W:n.y.1k,1a:n.7y[n.y.1a],ai:"aj",5H:n.y.F.5H,5F:n.5G[n.y.1a],3z:[{20:"2F",2q:"ak",2N:n.y.1k},{20:"2F",2q:"al",2N:"2c"}]});q(n.y.F.7z){j.3z.47({20:"2F",2q:"am",2N:n.y.F.7z})}2D}n[n.1R].I(1V(2L)).1B(n.5R(j)).1c();q(n.y.48()){(u(){40{q("7A"7B $("2C")){$("2C").7A(n.y.F.7w)}}41(e){}}.X(n)).an()}}}}})(),5O:u(b){b=$(b);G d=b.ao(),5S=[],5T=[];d.47(b);d.1g(u(c){q(c!=b&&c.1y()){O}5S.47(c);5T.47({2z:c.1L("2z"),1b:c.1L("1b"),1p:c.1L("1p")});c.I({2z:"ap",1b:"36",1p:"1y"})});G e={H:b.aq,J:b.ar};5S.1g(u(r,a){r.I(5T[a])});O e},4Q:u(){G a=$("2C");q(a){4M(a.43.4R()){2M"3y":q(1l.1T.5i&&n.y.48()){40{a.7C()}41(e){}a.as=""}q(a.7D){a.2n()}10{a=1l.2w}2D;2M"2E":a.2n();q(1l.1T.at&&1J.7E.2C){5U 1J.7E.2C}2D;5o:a.2n();2D}}$w("7k 7j").1g(u(S){n["3w"+S].I("H:1S;J:1S;").1B("").19()},n)},7F:1l.K,4I:u(){E 17.1m({V:n.V,1t:n.4S.X(n)})},4S:u(){n.3g();q(!n.y.5V()){n.4J()}q(!((n.y.F.4D&&n.y.7G())||n.y.5V())){n.4N()}q(!n.y.4T()){E 17.1m({V:n.V,1t:n.4K.X(n)})}q(n.y.F.2l){E 17.1m({V:n.V,1t:n.5B.X(n,2c)})}},7H:u(){E 17.1m({V:n.V,1t:n.7I.X(n)});q(n.y.4T()){E 17.1m({3e:0.2,V:n.V,1t:n.4K.X(n)})}q(n.3A){E 17.1m({V:n.V,1t:n.7J.X(n)})}q(n.y.48()){E 17.1m({V:n.V,1t:N.I.X(n,n[n.1R],"1p:1y")})}},2O:u(){q(17.2J.2m(11.V.3k).5W.1s){O}n.1c(n.30().2O)},1h:u(){q(17.2J.2m(11.V.3k).5W.1s){O}n.1c(n.30().1h)},4N:u(){n.7F();G a=n.5X(),31=n.7K();q(n.y.F.3Z&&(a.H>31.H||a.J>31.J)){q(n.y.F.7n){n.1Y=31;n.3g();a=31}10{G c=n.7L(),b=31;q(n.y.4U()){G d=[31.J/c.J,31.H/c.H,1].au();n.1Y={H:(n.27.H*d).2k(),J:(n.27.J*d).2k()}}10{n.1Y={H:c.H>b.H?b.H:c.H,J:c.J>b.J?b.J:c.J}}n.3g();a=18.5N(n.1Y);q(n.y.4U()){a.J+=n.3f.J}}}10{n.3g();n.1Y=1I}n.5Y(a)},49:u(a){n.5Y(a,{28:0})},5Y:(u(){G e,4V,4W,7M,7N,2A,b;G f=(u(){G w,h;u 4X(p){w=(e.H+p*4V).4a(0);h=(e.J+p*4W).4a(0)}G a;q(2H){a=u(p){n.Y.I({H:(e.H+p*4V).4a(0)+"M",J:(e.J+p*4W).4a(0)+"M"});n.4A.I({J:h-1*n.W+"M"})}}10{q(2R){a=u(p){G v=n.4Y(),o=1d.3Z.7O();n.Y.I({1b:"36",1M:0,23:0,H:w+"M",J:h+"M",1j:(o[0]+(v.H/2)-(w/2)).4b()+"M",1e:(o[1]+(v.J/2)-(h/2)).4b()+"M"});n.4A.I({J:h-1*n.W+"M"})}}10{a=u(p){n.Y.I({1b:"4w",H:w+"M",J:h+"M",1M:((0-w)/2).2k()+"M",23:((0-h)/2-2A).2k()+"M"});n.4A.I({J:h-1*n.W+"M"})}}}O u(p){4X.3B(n,p);a.3B(n,p)}})();O u(a){G c=3O[1]||{};e=n.Y.2f();b=2*n.W;H=a.H?a.H+b:e.H;J=a.J?a.J+b:e.J;n.5Z();q(e.H==H&&e.J==J){E 17.1m({V:n.V,1t:n.60.X(n,a)});O}G d={H:H+"M",J:J+"M"};4V=H-e.H;4W=J-e.J;7M=4s(n.Y.1L("1M").2S("M",""));7N=4s(n.Y.1L("23").2S("M",""));2A=n.13.1y()?(n.2A/2):0;q(!2H){18.1o(d,{1M:0-H/2+"M",23:0-J/2+"M"})}q(c.28==0){f.3B(n,1)}10{n.61=E 17.7P(n.Y,0,1,18.1o({28:n.F.av,V:n.V,7Q:n.F.7Q,1t:n.60.X(n,a)},c),f.X(n))}}})(),60:u(a){q(!n.3f){O}G b=n[n.1R],4Z;q(n.y.F.2B=="1S"){4Z=b.2f()}b.I({J:(a.J-n.3f.J)+"M",H:a.H+"M"});q(n.y.F.2B!="1W"&&(n.y.5V()||n.y.7G())){q(1l.1T.2I){q(n.y.F.2B=="1S"){G c=b.2f();b.I("2B:1y");G d={7R:"1W",7S:"1W"},62=0,51=15;q(4Z.J>a.J){d.7S="1S";d.H=c.H-51;d.aw="7T";62=51}q(4Z.H-62>a.H){d.7R="1S";d.J=c.J-51;d.ax="7T"}b.I(d)}10{b.I({2B:n.y.F.2B})}}10{b.I({2B:n.y.F.2B})}}10{b.I("2B:1W")}n.3X();n.61=1I;n.7H()},7I:u(){E 17.1m({V:n.V,1t:n.5Z.X(n)});E 17.1m({V:n.V,1t:u(){n[n.1R].1c();n.3g();q(n.1r.1y()){n.1r.I("1p:1y").1q(1)}}.X(n)});E 17.ay([E 17.7U(n.2V,{7V:2c,52:0,53:1}),E 17.54(n.3P,{7V:2c})],{V:n.V,28:0.25,1t:u(){q(n.1u){n.1u.5s("Y:az")}}.X(n)});q(n.y.2o()||(n.2Y&&n.F.13.1E.1Q)){E 17.1m({V:n.V,1t:n.7W.X(n)})}},78:(u(){u 2X(){n.4Q();n.4z.I({23:n.1K.2l.J+"M"});n.5D();q(n.y.48()){n[n.1R].I("1p:1W")}}u 7X(p){n.2V.1q(p);n.3P.1q(p)}O u(){q(!n.Y.1y()){n.2V.1q(0);n.3P.1q(0);n.4Q();O}E 17.7P(n.Y,1,0,{28:0.2,V:n.V,1t:2X.X(n)},7X.X(n))}})(),7Y:u(){$w("5v 2W 5u 1H 2i 3Q 4B 2b 2h").1g(u(a){N.19(n[a])},n);n.1r.I("1p:1W").1q(0)},3g:u(){n.7Y();q(!n.y.F.1r){n.3f={H:0,J:0};n.63=0;n.1r.19()}10{n.1r.1c()}q(n.y.1H||n.y.2i){n.5u.1c();n.2W.1c()}q(n.y.1H){n.1H.1B(n.y.1H).1c()}q(n.y.2i){n.2i.1B(n.y.2i).1c()}q(n.1n&&n.1n.1s>1){q(n.y.1Z()){n.2G.1B(E 4G(n.F.13.7Z).3K({1b:n.1b+1,64:n.1n.1s}));q(n.13.1L("1p")=="1W"){n.13.I("1p:1y");q(n.65){17.2J.2m("Y").2n(n.65)}n.65=E 17.54(n.3d,{V:n.V,28:0.1})}}10{n.2W.1c();q(n.y.2Z()){n.5v.1c();n.3Q.1c().5z().1B(E 4G(n.F.aA).3K({1b:n.1b+1,64:n.1n.1s}));q(n.y.F.2b){n.3c.1c();n.2b.1c()}}}}G a=n.y.1Z();q((n.y.F.3Y||a)&&n.1n.1s>1){G b={2x:(n.F.32||n.1b!=0),1h:(n.F.32||((n.y.2o()||a)&&n.30().1h!=0))};$w("2x 1h").1g(u(z){G Z=z.1P(),3C=b[z]?"80":"1S";q(a){n["13"+Z].I({3C:3C}).1q(b[z]?1:n.F.1E.1F.66)}10{n["3u"+Z+"3v"].I({3C:3C}).1q(b[z]?n.F.1E.1F.3b:n.F.1E.1F.66)}}.X(n));q(n.y.F.3Y||n.F.13.3Y){n.4B.1c()}}n.4c.1q(n.2Y?1:n.F.1E.1F.66).I({3C:n.2Y?"80":"1S"});n.81();q(!n.1r.aB().6B(N.1y)){n.1r.19();n.y.F.1r=2K}n.82()},81:u(){G a=n.1K.5A.H,3a=n.1K.3a.H,3h=n.1Y?n.1Y.H:n.27.H,55=aC,H=0,2h=n.y.F.2h||"3a",2a=n.F.aD;q(n.y.F.2l||n.y.1Z()||!n.y.F.2h){2a=1I}10{q(3h>=55+a&&3h<55+3a){2a="5A";H=a}10{q(3h>=55+3a){2a=2h;H=n.1K[2h].H}}}q(H>0){n.2W.1c();n.2h.I({H:H+"M"}).1c()}10{n.2h.19()}q(2a){n.2h.1O(n.1f+"71"+2a+".1w",{12:n.F.12})}n.63=H},5K:u(){n.67=E 17.54(n.3r,{28:0.2,52:0,53:1,V:n.V})},4J:u(){q(n.67){17.2J.2m("Y").2n(n.67)}E 17.83(n.3r,{28:0.2,V:n.V,3e:0.2})},84:u(){q(!n.y.2Z()){O}G a=(n.F.32||n.1b!=0),1h=(n.F.32||((n.y.2o()||n.y.1Z())&&n.30().1h!=0));n.4x[a?"1c":"19"]();n.4y[1h?"1c":"19"]();G b=n.1Y||n.27;n.1X.I({J:b.J+"M",23:n.W+(n.y.F.1r=="1e"?n.1r.4d():0)+"M"});G c=((b.H/2-1)+n.W).4b();q(a){n.1X.Q(n.3D=E N("U",{R:"1G aE"}).I({H:c+"M"}));n.3D.1Q="2x"}q(1h){n.1X.Q(n.3E=E N("U",{R:"1G aF"}).I({H:c+"M"}));n.3E.1Q="1h"}q(a||1h){n.1X.1c()}},7W:u(){q(!n.y||!n.F.1E.1Q.2z||!n.y.2Z()){O}n.84();n.1X.1c()},5Z:u(){n.1X.1B("").19();n.4x.19().I({1M:n.1U.H+"M"});n.4y.19().I({1M:-1*n.1U.H+"M"})},7f:(u(){u 2X(){n.Y.1q(1)}q(!2t){2X=2X.1A(u(a,b){a(b);n.Y.1c()})}O u(){q(n.Y.1L("1F")!=0){O}q(n.F.2u.2z){E 17.54(n.2u,{28:0.2,52:0,53:4r?1:n.F.2u.1F,V:n.V,aG:n.68.X(n),1t:2X.X(n)})}10{2X.3B(n)}}})(),19:u(){q(1l.1T.2I&&n.2E&&n.y.4T()){n.2E.2n()}q(2t&&n.y.48()){G a=$$("3y#2C")[0];q(a){40{a.7C()}41(e){}}}q(n.Y.1L("1F")==0){O}n.2s();n.1X.19();q(!1l.1T.2I||!n.y.4T()){n.2V.19()}q(17.2J.2m("69").5W.1s>0){O}17.2J.2m("Y").1g(u(e){e.74()});E 17.1m({V:n.V,1t:n.5D.X(n)});E 17.7U(n.Y,{28:0.1,52:1,53:0,V:{1b:"5j",3k:"69"}});E 17.83(n.2u,{28:0.16,V:{1b:"5j",3k:"69"},1t:n.85.X(n)})},85:u(){n.4Q();n.Y.19();n.2V.1q(0).1c();n.1X.1B("").19();n.6S.1B("").19();n.6W.1B("").19();n.5C();n.86();E 17.1m({V:n.V,1t:n.49.X(n,n.F.aH)});E 17.1m({V:n.V,1t:u(){q(n.1u){n.1u.5s("Y:1W")}$w("1u 1n y 1Y 2Y aI 3w").3S(u(a){n[a]=1I}.X(n))}.X(n)})},82:u(){n.1r.I("3q:0;");G a={},3h=n[(n.1Y?"aJ":"i")+"aK"].H;n.1r.I({H:3h+"M"});n.2W.I({H:3h-n.63-1+"M"});a=n.5O(n.1r);q(n.y.F.1r){a.J+=n.F.6a;4M(n.y.F.1r){2M"3T":n.1r.I("3q:"+n.F.6a+"M 0 0 0");2D;2M"1e":n.1r.I("3q: 0 0 "+n.F.6a+"M 0");2D}}n.1r.I({H:"87%"});n.3f=n.y.F.1r?a:{H:a.H,J:0}},3X:(u(){G a,2A;u 4X(){a=n.Y.2f();2A=n.13.1y()?(n.2A/2):0}G b;q(2H){b=u(){n.Y.I({1e:"50%",1j:"50%"})}}10{q(2t||2R){b=u(){G v=n.4Y(),o=1d.3Z.7O();n.Y.I({1M:0,23:0,1j:(o[0]+(v.H/2)-(a.H/2)).4b()+"M",1e:(o[1]+(v.J/2)-(a.J/2)).4b()+"M"})}}10{b=u(){n.Y.I({1b:"4w",1j:"50%",1e:"50%",1M:(0-a.H/2).2k()+"M",23:(0-a.J/2-2A).2k()+"M"})}}}O u(){4X.3B(n);b.3B(n)}})(),88:u(){n.2s();n.3A=2c;n.1h.X(n).3e(0.25);n.3c.1O(n.1f+"72.1w",{12:n.F.12}).19();n.4c.1O(n.1f+"89.1w",{12:n.F.13.12})},2s:u(){q(n.3A){n.3A=2K}q(n.6b){aL(n.6b)}n.3c.1O(n.1f+"6V.1w",{12:n.F.12});n.4c.1O(n.1f+"8a.1w",{12:n.F.13.12})},6c:u(){q(n.y.1Z()&&!n.2Y){O}n[(n.3A?"56":"5q")+"aM"]()},7J:u(){q(n.3A){n.6b=n.1h.X(n).3e(n.F.aN)}},aO:u(){$$("a[33~=Y], 3F[33~=Y]").1g(u(a){G b=a.24;q(!b){O}q(b.4e){a.8b("1H",b.4e)}a.24=1I})},4E:u(a){G b=a.22("][");q(b>-1){a=a.5P(0,b+1)}O $$(\'a[26^="\'+a+\'"], 3F[26^="\'+a+\'"]\')},5E:u(a){O n.4E(a).8c("24")},8d:u(){$(1d.29).1i("2P",n.8e.1v(n));$w("34 4f").1g(u(e){n.1X.1i(e,u(a){G b=a.3G("U");q(!b){O}q(n.3D&&n.3D==b||n.3E&&n.3E==b){n.57(a)}}.1v(n))}.X(n));n.1X.1i("2P",u(c){G d=c.3G("U");q(!d){O}G e=(n.3D&&n.3D==d)?"2O":(n.3E&&n.3E==d)?"1h":1I;q(e){n[e].1A(u(a,b){n.2s();a(b)}).X(n)()}}.1v(n));$w("2x 1h").1g(u(s){G S=s.1P(),2s=u(a,b){n.2s();a(b)},4g=u(a,b){G c=b.1u().1X;q((c=="2x"&&(n.F.32||n.1b!=0))||(c=="1h"&&(n.F.32||((n.y.2o()||n.y.1Z())&&n.30().1h!=0)))){a(b)}};n[s+"3t"].1i("34",n.57.1v(n)).1i("4f",n.57.1v(n)).1i("2P",n[s=="1h"?s:"2O"].1A(2s).1v(n));n["3u"+S+"3v"].1i("2P",n[s=="1h"?s:"2O"].1A(4g).1A(2s).1v(n)).1i("34",N.1q.58(n["3u"+S+"3v"],n.F.1E.1F.8f).1A(4g).1v(n)).1i("4f",N.1q.58(n["3u"+S+"3v"],n.F.1E.1F.3b).1A(4g).1v(n));n["13"+S].1i("2P",n[s=="1h"?s:"2O"].1A(4g).1A(2s).1v(n))},n);G f=[n.2h,n.3c];q(!2t){f.1g(u(b){b.1i("34",N.1q.X(n,b,n.F.1E.1F.8f)).1i("4f",N.1q.X(n,b,n.F.1E.1F.3b))},n)}10{f.3s("1q",1)}n.3c.1i("2P",n.6c.1v(n));n.4c.1i("2P",n.6c.1v(n));q(2t||2R){G g=u(a,b){q(n.Y.1L("1e").6d(0)=="-"){O}a(b)};1m.1i(1J,"4h",n.3X.1A(g).1v(n));1m.1i(1J,"49",n.3X.1A(g).1v(n))}q(2R){1m.1i(1J,"49",n.68.1v(n))}q(2H){u 6e(){q(n.13){n.13.I({1j:((1d.6f.aP||0)+m.59()/2).2k()+"M"})}}1m.1i(1J,"4h",6e.1v(n));1m.1i(1J,"49",6e.1v(n))}q(n.F.aQ){n.8g=u(a){G b=a.3G("a[33~=Y], 3F[33~=Y]");q(!b){O}a.56();q(!b.24){E 11.3W(b)}n.8h(b)}.1v(n);$(1d.29).1i("34",n.8g)}},5B:u(a){q(n.8i){17.2J.2m("aR").2n(n.aS)}G b={23:(a?0:n.1K.2l.J)+"M"};n.8i=E 17.8j(n.4z,{2e:b,28:0.16,V:n.V,3e:a?0.15:0})},8k:u(){G a={};$w("H J").1g(u(d){G D=d.1P(),5a=1d.6f;a[d]=1l.1T.2I?[5a["6g"+D],5a["4h"+D]].aT():1l.1T.5i?1d.29["4h"+D]:5a["4h"+D]});O a},68:u(){q(!2R){O}n.2u.I(1V(n.8k()))},8e:(u(){G b=".6U, .6M .1G, .6X, .8l";O u(a){q(n.y&&n.y.F&&a.3G(b+(n.y.F.7i?", #6G":""))){n.19()}}})(),57:u(a){G b=a.2r,1Q=b.1Q,w=n.1U.H,6g=(a.1a=="34")?0:1Q=="2x"?w:-1*w,2e={1M:6g+"M"};q(!n.4i){n.4i={}}q(n.4i[1Q]){17.2J.2m("8m"+1Q).2n(n.4i[1Q])}n.4i[1Q]=E 17.8j(n[1Q+"3t"],{2e:2e,28:0.2,V:{3k:"8m"+1Q,aU:1},3e:(a.1a=="4f")?0.1:0})},30:u(){q(!n.1n){O}G a=n.1b,1s=n.1n.1s;G b=(a<=0)?1s-1:a-1,1h=(a>=1s-1)?0:a+1;O{2O:b,1h:1h}},5x:u(a,b){G c=3O[2]||n.F,1C=c.1C,W=c.W;1b={1e:(b.6d(0)=="t"),1j:(b.6d(1)=="l")};q(l){G d=E N("3j",{R:"aV"+b.1P(),H:W+"M",J:W+"M"});d.I("5y:1j");a.Q(d);G e=d.5h("2d");e.aW=c.12;e.aX((1b.1j?1C:W-1C),(1b.1e?1C:W-1C),1C,0,7s.aY*2,2c);e.aZ();e.8n((1b.1j?1C:0),0,W-1C,W);e.8n(0,(1b.1e?1C:0),W,W-1C)}10{G f=E N("3l:b0",{b1:c.12,b2:"5J",b3:c.12,b4:(1C/W*0.5).4a(2)}).I({H:2*W-1+"M",J:2*W-1+"M",1b:"36",1j:(1b.1j?0:(-1*W))+"M",1e:(1b.1e?0:(-1*W))+"M"});a.Q(f);f.4L=f.4L}},77:(u(){u 6h(){O $$("3y, 5Q, 2y")}q(1l.1T.2I&&1d.5n>=8){6h=u(){O 1d.b5("3y, 5Q, 2y")}}O u(){q(n.6i){O}G a=6h();n.44=[];8o(G i=0,1s=a.1s;i<1s;i++){G b=a[i];n.44.47({1u:b,1p:b.2e.1p});b.2e.1p="1W"}n.6i=2c}})(),86:u(){n.44.1g(u(a,i){a.1u.2e.1p=a.1p});5U n.44;n.6i=2K},5X:u(){O{H:n.27.H,J:n.27.J+n.3f.J}},7L:u(){G i=n.5X(),b=2*n.W;O{H:i.H+b,J:i.J+b}},7K:u(){G a=21,6j=2*n.1U.J+a,v=n.4Y();O{H:v.H-6j,J:v.J-6j}},4Y:u(){G v=m.2f();q(n.13&&n.13.1y()&&n.1n&&n.1n.1s>1){v.J-=n.2A}O v}});G m={2f:u(){O{H:n.59(),J:n.4d()}}};(u(a){G B=1l.1T,5b=1d,1u,6k={};u 8p(){q(2t){O 5b}q(B.b6&&1J.3J(1J.b7.b8())<9.5){O 5b.29}O 5b.6f}u 6l(D){q(!1u){1u=8p()}6k[D]="b9"+D;a["2m"+D]=u(){O 1u[6k[D]]};O a["2m"+D]()}a.59=6l.58("ba");a.4d=6l.58("bb")})(m);(u(){u 8q(a,b){q(!n.y){O}a(b)}$w("3g 4K").1g(u(a){n[a]=n[a].1A(8q)},11)})();u 1V(b){G c={};18.7g(b).1g(u(a){c[a]=b[a]+"M"});O c}18.1o(11,{8r:u(){q(!n.y.F.5I){O}n.5c=n.8s.1v(n);1d.1i("8t",n.5c)},5C:u(){q(n.5c){1d.bc("8t",n.5c)}},8s:u(a){G b=bd.be(a.2Q).4R(),2Q=a.2Q,3H=(n.y.2o()||n.2Y)&&!n.61,2b=n.y.F.2b,4j;q(n.y.4U()){a.56();4j=(2Q==1m.8u||["x","c"].6m(b))?"19":(2Q==37&&3H&&(n.F.32||n.1b!=0))?"2O":(2Q==39&&3H&&(n.F.32||n.30().1h!=0))?"1h":(b=="p"&&2b&&3H)?"88":(b=="s"&&2b&&3H)?"2s":1I;q(b!="s"){n.2s()}}10{4j=(2Q==1m.8u)?"19":1I}q(4j){n[4j]()}q(3H){q(2Q==1m.bf&&n.1n.bg()!=n.y){n.1c(0)}q(2Q==1m.bh&&n.1n.bi()!=n.y){n.1c(n.1n.1s-1)}}}});11.4S=11.4S.1A(u(a,b){n.8r();a(b)});18.1o(11,{7d:u(a){G b=n.4E(a);q(!b){O}b.3S(11.4k)},7m:u(){q(n.1n.1s==0){O}G a=n.30();n.8v([a.1h,a.2O])},8v:u(c){G d=(n.1n&&n.1n.6m(c)||18.bj(c))?n.1n:c.26?n.5E(c.26):1I;q(!d){O}G e=$A(18.7c(c)?[c]:c.1a?[d.22(c)]:c).bk();e.1g(u(a){G b=d[a];n.6n(b)},n)},8w:u(a,b){a.4H={H:b.H,J:b.J}},6n:u(a){q(a.4H||a.5d||!a.1k){O}G P=E 2j();P.1z=u(){P.1z=1l.2w;a.5d=1I;n.8w(a,P)}.X(n);a.5d=2c;P.1x=a.1k},8h:u(a){G b=a.24;q(b&&b.4H||b.5d||!b.2Z()){O}n.6n(b)}});N.bm({1O:u(a,b){a=$(a);G c=18.1o({8x:"1e 1j",3o:"4C-3o",6o:"7v",12:""},3O[2]||{});a.I(2H?{bn:"bo:bp.bq.bs(1x=\'"+b+"\'\', 6o=\'"+c.6o+"\')"}:{2a:c.12+" 3N("+b+") "+c.8x+" "+c.3o});O a}});18.1o(11,{6p:u(a,b){G c;$w("46 2p 2E 45").1g(u(t){q(E 4p("\\\\.("+n.bt[t].2S(/\\s+/g,"|")+")(\\\\?.*)?","i").4t(a)){c=t}}.X(n));q(c){O c}q(a.3x("#")){O"4P"}q(1d.8y&&1d.8y!=(a).2S(/(^.*\\/\\/)|(:.*)|(\\/.*)/g,"")){O"2E"}O"2p"},7r:u(a){G b=a.bu(/\\?.*/,"").3L(/\\.([^.]{3,4})$/);O b?b[1]:1I},5R:u(b){G c="<"+b.20;8o(G d 7B b){q(!["3z","6q","20"].6m(d)){c+=" "+d+\'="\'+b[d]+\'"\'}}q(E 4p("^(?:3F|bv|bw|br|bx|by|bz|7o|8z|bA|bB|bC|2F|bD|bE|bF)$","i").4t(b.20)){c+="/>"}10{c+=">";q(b.3z){b.3z.1g(u(a){c+=n.5R(a)}.X(n))}q(b.6q){c+=b.6q}c+="</"+b.20+">"}O c}});(u(){1d.1i("5p:3M",u(){G c=(35.6r&&35.6r.1s);u 4l(a){G b=2K;q(c){b=($A(35.6r).8c("2q").7h(",").22(a)>=0)}10{40{b=E bG(a)}41(e){}}O!!b}q(c){1J.11.4F={46:4l("bH bI"),45:4l("6s")}}10{1J.11.4F={46:4l("8A.8A"),45:4l("6s.6s")}}})})();11.3W=bJ.bK({bL:u(b){q(b.24){O}G c=18.7b(b);q(c&&!b.24){b.24=n;q(b.1H){b.24.4e=b.1H;q(11.F.8B){b.bM("1H","")}}}n.1k=c?b.bN("1k"):b.1k;q(n.1k.22("#")>=0){n.1k=n.1k.5P(n.1k.22("#"))}G d=b.26;q(d){n.26=d;q(d.3x("4m")){n.1a="4m"}10{q(d.3x("5e")){q(d.bO("][")){G e=d.8C("]["),6t=e[1].3L(/([a-bP-Z]*)/)[1];q(6t){n.1a=6t;G f=e[0]+"]";b.8b("26",f);n.26=f}}10{n.1a=11.6p(n.1k)}}10{n.1a=d}}}10{n.1a=11.6p(n.1k);n.26=n.1a}$w("42 46 4m 2E 2p 4P 45 8D 8E 5e").3S(u(a){G T=a.1P(),t=a.4R();q("2p 4m 8E 8D 5e".22(a)<0){n["bQ"+T]=u(){O n.1a==t}.X(n)}}.X(n));q(c&&b.24.4e){G g=b.24.4e.8C(11.F.bR).3s("bS");q(g[0]){n.1H=g[0]}q(g[1]){n.2i=g[1]}G h=g[2];n.F=(h&&18.7a(h))?bT("({"+h+"})"):{}}10{n.1H=b.1H;n.2i=b.2i;n.F=b.F||{}}q(n.F.6u){n.F.42=18.5N(n.F.6u);5U n.F.6u}},2o:u(){O n.1a.3x("4m")},1Z:u(){O n.26.3x("5e")},2Z:u(){O(n.2o()||n.1a=="2p")},5M:u(){O"2E 4P 42".22(n.1a)>=0},4U:u(){O!n.5M()}});11.4k=u(a){G b=$(a);E 11.3W(a);O b};(u(){u 8F(a){G b=a.3G("a[33~=Y], 3F[33~=Y]");q(!b){O}a.56();n.4k(b);n.1c(b)}u 8G(a){G b=a.3G("a[33~=Y], 3F[33~=Y]");q(!b){O}n.4k(b)}u 8H(a){G b=a.2r,1a=a.1a,3i=a.3i;q(3i&&3i.43){q(1a==="5m"||1a==="bU"||(1a==="2P"&&3i.43.4R()==="8z"&&3i.1a==="bV")){b=3i}}q(b.bW==bX.bY){b=b.7D}O b}u 8I(a,b){q(!a){O}G c=a.R;O(c.1s>0&&(c==b||E 4p("(^|\\\\s)"+b+"(\\\\s|$)").4t(c)))}u 8J(a){G b=8H(a);q(b&&8I(b,"Y")){n.4k(b)}}1d.1i("Y:3M",u(){$(1d.29).1i("2P",8F.1v(11));q(11.F.8B&&1l.1T.2I&&1d.5n>=8){$(1d.29).1i("34",8J.1v(11))}10{$(1d.29).1i("34",8G.1v(11))}})})();18.1o(11,{5f:u(){G b=n.F.13,W=b.W;$(1d.29).Q(n.13=E N("U",{2T:"bZ"}).I({2U:n.F.2U+1,c0:b.1N+"M",1b:"36",1p:"1W"}).Q(n.c1=E N("U",{R:"c2"}).Q(E N("U",{R:"5g c3"}).I("1N-1j: "+W+"M").Q(E N("U",{R:"2v"}))).Q(E N("U",{R:"6v"}).I({1N:"0 "+W+"M",J:W+"M"})).Q(E N("U",{R:"5g c4"}).I("1N-1j: -"+W+"M").Q(E N("U",{R:"2v"})))).Q(n.3I=E N("U",{R:"6w 6T"}).Q(n.3d=E N("3p",{R:"c5"}).I("1N: 0 "+W+"M").Q(E N("1D",{R:"c6"}).Q(n.2G=E N("U"))).Q(E N("1D",{R:"4n c7"}).Q(n.c8=E N("U",{R:"1G"}).1O(n.1f+"8K.1w",{12:b.12}))).Q(E N("1D",{R:"4n c9"}).Q(n.ca=E N("U",{R:"1G"}).1O(n.1f+"cb.1w",{12:b.12}))).Q(E N("1D",{R:"4n cc"}).Q(n.4c=E N("U",{R:"1G"}).1O(n.1f+"8a.1w",{12:b.12}))).Q(E N("1D",{R:"4n 8l"}).Q(n.cd=E N("U",{R:"1G"}).1O(n.1f+"ce.1w",{12:b.12}))))).Q(n.cf=E N("U",{R:"cg"}).Q(E N("U",{R:"5g ch"}).I("1N-1j: "+W+"M").Q(E N("U",{R:"2v"}))).Q(E N("U",{R:"6v"}).I({1N:"0 "+W+"M",J:W+"M"})).Q(E N("U",{R:"5g ci"}).I("1N-1j: -"+W+"M").Q(E N("U",{R:"2v"})))));$w("2x 1h").1g(u(s){G S=s.1P();n["13"+S].1X=s},n);q(2t){n.13.19=u(){n.I("1j:-3n;1e:-3n;1p:1W;");O n};n.13.1c=u(){n.I("1p:1y");O n};n.13.1y=u(){O(n.1L("1p")=="1y"&&3J(n.1L("1e").2S("M",""))>-6F)}}n.13.2y(".4n U").3s("I",1V(n.8L));G c=n.13.2y(".2v");$w("6Y 6Z bl br").1g(u(a,i){q(b.1C>0){n.5x(c[i],a,b)}10{c[i].Q(E N("U",{R:"38"}))}c[i].I({H:b.W+"M",J:b.W+"M"}).70("2v"+a.1P())},n);n.13.5z(".6w").I("H:87%;");n.13.I(2H?{1b:"36",1e:"1S",1j:""}:{1b:"4w",1e:"1S",1j:"50%"});n.13.2y(".6v",".6w",".1G",".38").3s("I",{12:b.12});n.2G.1B(E 4G(b.7Z).3K({1b:8M,64:8M}));n.2G.I({H:n.2G.59()+"M",J:n.3d.4d()+"M"});n.8N();n.2G.1B("");n.13.19().I("1p:1y");n.8d();n.2g()},8N:u(){G b,4o,13=n.F.13,W=13.W;q(2H){b=n.3d.2f(),4o=b.H+2*W;n.3d.I({H:b.H+"M",1N:0});n.3I.I("H:1S;");n.3d.I({cj:W+"M"});n.3I.I({H:4o+"M"});$w("1e 3T").1g(u(a){n["13"+a.1P()].I({H:4o+"M"})},n);n.13.I("1N-1j:-"+(4o/2).2k()+"M")}10{n.3I.I("H:1S");b=n.3I.2f();n.2G.ck().I({8O:b.J+"M",H:n.2G.2f().H+"M"});n.13.I({H:b.H+"M",1M:(0-(b.H/2).2k())+"M"});n.3I.I({H:b.H+"M"});$w("1e 3T").1g(u(a){n["13"+a.1P()].I({H:b.H+"M"})},n)}n.7e=13.1N+b.J+2*W;n.76=n.13.4d();n.2G.I({8O:b.J+"M"})}});11.5f=11.5f.1A(u(a,b){G c=E 2j();c.1z=u(){c.1z=1l.2w;n.8L={H:c.H,J:c.J};a(b)}.X(n);c.1x=n.1f+"8K.1w";G d=(E 2j()).1x=n.1f+"89.1w"});11.4u=11.4u.1A(u(a,b){a(b);n.5f()});11.19=11.19.1A(u(a,b){q(n.y&&n.y.1Z()){n.13.19();n.2G.1B("")}a(b)})})();11.5m();1d.1i("5p:3M",11.5q.X(11));',62,765,'|||||||||||||||||||||||this|||if||||function||||view||||||new|options|var|width|setStyle|height|||px|Element|return||insert|className|||div|queue|border|bind|lightview||else|Lightview|backgroundColor|controller||||Effect|Object|hide|type|position|show|document|top|images|each|next|observe|left|href|Prototype|Event|views|extend|visibility|setOpacity|menubar|length|afterFinish|element|bindAsEventListener|png|src|visible|onload|wrap|update|radius|li|buttons|opacity|lv_Button|title|null|window|closeDimensions|getStyle|marginLeft|margin|setPngBackground|capitalize|side|_contentPosition|auto|Browser|sideDimensions|pixelClone|hidden|prevnext|scaledInnerDimensions|isSet|tag||indexOf|marginTop|_view||rel|innerDimensions|duration|body|background|slideshow|true||style|getDimensions|_lightviewLoadedEvent|closeButton|caption|Image|round|topclose|get|remove|isGallery|image|name|target|stopSlideshow|BROWSER_IS_WEBKIT_419|overlay|lv_Corner|emptyFunction|prev|select|display|controllerOffset|overflow|lightviewContent|break|iframe|param|setNumber|BROWSER_IS_IE_LT7|IE|Queues|false|dimensions|case|value|previous|click|keyCode|BROWSER_IS_FIREFOX_LT3|replace|id|zIndex|center|data|after|isSetGallery|isImage|getSurroundingIndexes|bounds|cyclic|class|mouseover|navigator|absolute||lv_Fill||large|normal|slideshowButton|controllerCenter|delay|menubarDimensions|fillMenuBar|imgWidth|currentTarget|canvas|scope|ns_vml|sideNegativeMargin|9500px|repeat|ul|padding|loading|invoke|ButtonImage|inner|Button|content|startsWith|object|children|sliding|call|cursor|prevButton|nextButton|area|findElement|staticGallery|controllerMiddle|parseFloat|evaluate|match|loaded|url|arguments|sideButtons|imgNumber|lightviewError|_each|bottom|inlineContent|inlineMarker|View|restoreCenter|innerPreviousNext|viewport|try|catch|ajax|tagName|overlappingRestore|quicktime|flash|push|isQuicktime|resize|toFixed|floor|controllerSlideshow|getHeight|_title|mouseout|blockInnerPrevNext|scroll|sideEffect|action|Extend|detectPlugin|gallery|lv_ButtonWrapper|finalWidth|RegExp|userAgent|FIX_OVERLAY_WITH_PNG|parseInt|test|build|sideStyle|fixed|prevButtonImage|nextButtonImage|topcloseButtonImage|resizeCenter|innerPrevNext|no|autosize|getSet|Plugin|Template|preloadedDimensions|afterEffect|stopLoading|insertContent|outerHTML|switch|resizeWithinViewport|onComplete|inline|clearContent|toLowerCase|afterShow|isIframe|isMedia|wdiff|hdiff|init|getViewportDimensions|contentDimensions||scrollbarWidth|from|to|Appear|minimum|stop|toggleSideButton|curry|getWidth|ddE|doc|keyboardEvent|isPreloading|set|buildController|lv_controllerCornerWrapper|getContext|WebKit|end|require|convertVersionString|load|documentMode|default|dom|start|counter|fire|lv_Wrapper|dataText|innerController|gif|createCorner|float|down|small|toggleTopClose|disableKeyboardNavigation|restoreInlineContent|getViews|pluginspage|pluginspages|wmode|keyboard|1px|startLoading|insertImageUsingHTML|isExternal|clone|getHiddenDimensions|substr|embed|createHTML|restore|styles|delete|isAjax|effects|getInnerDimensions|_resize|hidePrevNext|_afterResize|resizing|corrected|closeButtonWidth|total|_controllerCenterEffect|disabled|loadingEffect|maxOverlay|lightview_hide|menubarPadding|slideTimer|toggleSlideshow|charAt|centerControllerIELT7|documentElement|offset|getOverlappingElements|preventingOverlap|safety|property|define|member|preloadImageDimensions|sizingMethod|detectType|html|plugins|QuickTime|relType|ajaxOptions|lv_controllerBetweenCorners|lv_controllerMiddle|Firefox|REQUIRED_|_|Scriptaculous|find|namespaces|VML|_lightviewLoadedEvents|9500|lv_overlay|container|prevSide|nextSide|marginRight|topButtons|lv_topButtons|lv_Frame|lv_Half|lv_CornerWrapper|lv_Filler|lv_WrapDown|contentTop|clearfix|lv_Close|inner_slideshow_play|contentBottom|lv_Loading|tl|tr|addClassName|close_|inner_slideshow_stop|prepare|cancel|controllerHeight|_controllerHeight|hideOverlapping|hideContent|_inlineDisplayRestore|isString|isElement|isNumber|extendSet|_controllerOffset|appear|keys|join|overlayClose|Bottom|Top|_VMLPreloaded|preloadSurroundingImages|fullscreen|img|insertImageUsingVML|insertImageUsingCanvas|detectExtension|Math|scrolling|autoplay|scale|controls|loop|mimetypes|flashvars|SetControllerVisible|in|Stop|parentNode|frames|adjustDimensionsToView|isInline|finishShow|showContent|nextSlide|getBounds|getOuterDimensions|mleft|mtop|getScrollOffsets|Tween|transition|overflowX|overflowY|15px|Opacity|sync|showPrevNext|tween|hideData|setNumberTemplate|pointer|setCloseButtons|setMenubarDimensions|Fade|setPrevNext|afterHide|showOverlapping|100|startSlideshow|controller_slideshow_stop|controller_slideshow_play|writeAttribute|pluck|addObservers|delegateClose|hover|_preloadImageHover|preloadImageHover|_topCloseEffect|Morph|getScrollDimensions|lv_controllerClose|lightview_side|fillRect|for|getRootElement|guard|enableKeyboardNavigation|keyboardDown|keydown|KEY_ESC|preloadFromSet|setPreloadedDimensions|align|domain|input|ShockwaveFlash|removeTitles|split|external|media|handleClick|handleMouseOver|elementIE8|hasClassNameIE8|handleMouseOverIE8|controller_prev|controllerButtonDimensions|999|_fixateController|lineHeight|createElement|MSIE|exec|mac|REQUIRED_Prototype|REQUIRED_Scriptaculous|typeof|undefined|Version|throw|requires|times|https|js|head|script|add|urn|schemas|microsoft|com|vml|createStyleSheet|cssText|behavior|callee|lv_Container|lv_Sides|lv_PrevSide|lv_NextSide|lv_topcloseButtonImage|topcloseButton|lv_Frames|lv_FrameTop|lv_Liquid|lv_HalfLeft|lv_HalfRight|lv_Center|150|lv_WrapUp|lv_WrapCenter|lv_contentTop|lv_MenuBar|lv_Data|lv_DataText|lv_Title|lv_Caption|lv_innerController|lv_ImgNumber|lv_innerPrevNext|innerPrevButton|inner_prev|innerNextButton|inner_next|lv_Slideshow|lv_contentBottom|loadingButton|lv_FrameBottom|cloneNode|lv_PrevNext|blank|inner_|relative|lv_content|blur|all|errors|requiresPlugin|plugin|required|transparent|close|defaultOptions|none|alt|galleryimg|drawImage|Ajax|Updater|frameBorder|hspace|lightviewContent_|random|99999|before|tofit|enablejavascript|codebase|codebases|classid|classids|quality|high|movie|allowFullScreen|FlashVars|defer|ancestors|block|clientWidth|clientHeight|innerHTML|Gecko|min|resizeDuration|paddingRight|paddingBottom|Parallel|opened|imgNumberTemplate|childElements|180|borderColor|lv_PrevButton|lv_NextButton|beforeStart|startDimensions|_openEffect|scaledI|nnerDimensions|clearTimeout|Slideshow|slideshowDelay|updateViews|scrollLeft|preloadHover|lightview_topCloseEffect|topCloseEffect|max|limit|cornerCanvas|fillStyle|arc|PI|fill|roundrect|fillcolor|strokeWeight|strokeColor|arcSize|querySelectorAll|Opera|opera|version|client|Width|Height|stopObserving|String|fromCharCode|KEY_HOME|first|KEY_END|last|isArray|uniq||addMethods|filter|progid|DXImageTransform|Microsoft||AlphaImageLoader|typeExtensions|gsub|base|basefont|col|frame|hr|link|isindex|meta|range|spacer|wbr|ActiveXObject|Shockwave|Flash|Class|create|initialize|setAttribute|getAttribute|include|zA|is|titleSplit|strip|eval|error|radio|nodeType|Node|TEXT_NODE|lightviewController|marginBottom|controllerTop|lv_controllerTop|lv_controllerCornerWrapperTopLeft|lv_controllerCornerWrapperTopRight|lv_controllerCenter|lv_controllerSetNumber|lv_controllerPrev|controllerPrev|lv_controllerNext|controllerNext|controller_next|lv_controllerSlideshow|controllerClose|controller_close|controllerBottom|lv_controllerBottom|lv_controllerCornerWrapperBottomLeft|lv_controllerCornerWrapperBottomRight|paddingLeft|up'.split('|'),0,{}));
if($('wohnservice')){
var body = $('wohnservice');
if(body.hasClassName('black')) {
Lightview.options.backgroundColor = "#ffcc00";
Lightview.options.overlay.background = "#000000";
} else if (body.hasClassName('yellow')) {
Lightview.options.backgroundColor = "#000000";
Lightview.options.overlay.background = "#ffcc00";
} else if (body.hasClassName('white')) {
Lightview.options.backgroundColor = "#000099";
Lightview.options.overlay.background = "#ffffff";
} else if (body.hasClassName('blue')) {
Lightview.options.backgroundColor = "#ffffff";
Lightview.options.overlay.background = "#000099";
}
}
var Texpand=Class.create();Texpand.prototype={initialize:function(b){var c=this;this.element=$(b);this.increment=30;if(this.element.tagName.toLowerCase()!='textarea')throw('Texpand: can only be initialized with a <textarea> but got <'+this.element.tagName.toLowerCase()+'>');if(typeof Prototype=='undefined'||(parseFloat(Prototype.Version.split(".")[0]+"."+Prototype.Version.split(".")[1])<1.6))throw('Texpand: requires Prototype 1.6.0+');if(typeof Effect=='undefined')throw('Textpand: requires Script.aculo.us, specifically Effects');this.element.insert({after:'<div id="texpand-mimic-'+this.element.identify()+'"></div>'});this.mimic=this.element.next();this.mimic.update(this.element.value);if(Prototype.Browser.IE){var d=this.element.getStyle('fontSize');if(d.search(/em/)>=0){var e=parseFloat(d.replace(/em/,''))*10;this.element.setStyle({fontSize:e+'px'})}}var f={};var g=$w('borderBottomColor borderBottomStyle borderBottomWidth borderTopColor borderTopStyle borderTopWidth borderRightColor borderRightStyle borderRightWidth borderLeftColor borderLeftStyle borderLeftWidth fontSize fontFamily fontWeight letterSpacing lineHeight marginTop marginRight marginBottom marginLeft paddingTop paddingRight paddingBottom paddingLeft textAlign textIndent width wordSpacing');g.each(function(a){f[a]=c.element.getStyle(a)});this.mimic.setStyle(f);this.mimic.setStyle({display:'block',position:'absolute',left:'-9999px',top:'-9999px'});this.element.observe("keyup",c._autoExpand.bind(c));return this.element},_autoExpand:function(b){this.mimic.update(this.element.value.replace(/\n/gm,'<br />'));var c=this.mimic.getHeight();var d=this.element.getHeight();var e=d-c;var f=d+(this.increment-e);if(e<this.increment){var g=Effect.Queues.get('texpand'+this.element.identify());g.each(function(a){a.cancel()});this.element.morph('height: '+f+'px;',{duration:0.1,queue:{position:'end',scope:'texpand'+this.element.identify(),limit:2}})}}};
// -----------------------------------------------------------------------------------
//	echonet v 1.1 - 2009-07-25
//	by Sindre Wimberger - wimberger@echonet.at
//  dependencies - prototype
//
//  v 1.1 - added ARIA Roles (breadcrumbs,banner,menu,menuitem,article)
//
// -----------------------------------------------------------------------------------
/*
JSTarget function by Roger Johansson, www.456bereastreet.com
*/
var JSTarget = {
init: function(att,val,warning) {
if (document.getElementById && document.createElement && document.appendChild) {
var strAtt = ((typeof att == 'undefined') || (att == null)) ? 'rel' : att;
var strVal = ((typeof val == 'undefined') || (val == null)) ? 'extern' : val;
var arrLinks = document.getElementsByTagName('a');
var oLink;
var oRegExp = new RegExp("(^|\\s)" + strVal + "(\\s|$)");
for (var i = 0; i < arrLinks.length; i++) {
oLink = arrLinks[i];
if ((strAtt == 'class') && (oRegExp.test(oLink.className)) || (oRegExp.test(oLink.getAttribute(strAtt)))) {
oLink.onclick = JSTarget.openWin;
}
}
oWarning = null;
}
},
openWin: function(e) {
var event = (!e) ? window.event : e;
if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return true;
else {
var oWin = window.open(this.getAttribute('href'), '_blank');
if (oWin) {
if (oWin.focus) oWin.focus();
return false;
}
oWin = null;
return true;
}
}
};
// -----------------------------------------------------------------------------------
// ARIA Functions
function addARIARole(el, strRole) {
if(!el) return false;
el.setAttribute('role', strRole);
if (strRole == "navigation") {
el.setAttribute('role', strRole+" menu");
var items = el.getElementsByTagName('li')
for (var i=0; i<items.length; i++) {
items[i].setAttribute('role', "menuitem");
}
}
}
function removeARIARole(el) {
if(!el) return false;
el.removeAttribute('role');
}
function addARIARequired(el) {
if(!el) return false;
el.setAttribute('aria-required', 'true');
}
function addARIAInvalid (el) {
if(!el) return false;
el.setAttribute('aria-invalid', 'true');
}
function setupARIARequired () {
$$('#content form li.req input').each(function(obj){
addARIARequired(obj);
});
// all required fields outside of "main" container
var phrase = $("suchbegriff");
if(phrase) { addARIARequired(phrase);}
}
function setupARIAInvalid () {
$$('#content form li.error input').each(function(obj){
addARIAInvalid(obj);
});
}
function setupARIAArticle () {
$$('#content ul.article').each(function(el){
el.setAttribute('role', 'region ');
});
$$('#content ul.article li').each(function(el){
el.setAttribute('role', 'article');
});
}
function addARIALive (el,rel,ato,liv) {
if(!el) return false;
if(rel) { el.setAttribute('aria-relevant',rel);	}
if(rel) { el.setAttribute('aria-atomic',ato);	}
if(rel) { el.setAttribute('aria-live',liv);	}
}
function setupARIA() {
// Add ARIA roles to the document
addARIARole($('content'), 'main');
addARIARole($('nav'), 'navigation');
addARIARole($('search'), 'search');
addARIARole($('footer'), 'contentinfo');
addARIARole($('breadcrumb'), 'breadcrumbs');
addARIARole($('header'), 'banner');
setupARIARequired();
setupARIAInvalid();
setupARIAArticle();
}
// -----------------------------------------------------------------------------------
//
function focusLabels() {
if (!document.getElementsByTagName) return false;
var labels = document.getElementsByTagName("label");
for (var i=0; i<labels.length; i++) {
if (!labels[i].getAttribute("for")) continue;
labels[i].onclick = function() {
var id = this.getAttribute("for");
if (!document.getElementById(id)) return false;
var element = document.getElementById(id);
element.focus();
}
}
}
function resetFields(whichform) {
for (var i=0; i<whichform.elements.length; i++) {
var element = whichform.elements[i];
if (element.type == "submit" || element.type == "checkbox" || element.type == "radio") continue;
if (!element.defaultValue) continue;
element.onfocus = function() {
if (this.value == this.defaultValue) {
this.value = "";
}
}
element.onblur = function() {
if (this.value == "") {
this.value = this.defaultValue;
}
}
}
}
// -----------------------------------------------------------------------------------
// Clicklist ein/ausklappen
function Clicklist() {
$$('#clicklist li div.ncontent').invoke('setStyle', {display: "none"});
$$('#clicklist li h3.ntoggle')[0].addClassName('active');
//$('clicklist').addClassName('clicklistjs');
new Effect.Accordion("clicklist", {duration: '1', eventlistener:'click',
downBeforestart: function(e) {
e.element.up().addClassName('active');
},
downAfterfinish: function(e) {
//if($("googlemap")) { initializeGMap(); }
/*document.getElementsByTagName("body").item(0).insert({
bottom: new Element('div', {id: 'blubb'})
});
Element.remove($('blubb'));*/
},
upBeforestart: function(e) {
var dimen = getPageSize();
document.getElementsByTagName("html").item(0).style.height = dimen[0]+'px';
//			 document.getElementsByTagName("html").item(0).style.overflow = 'hidden';
//			 alert(getPageSize[0]);
//			 document.getElementsByTagName("html").item(0).setStyle({ height: getPageSize[0]+'px'});
},
upAfterfinish: function(e) {
e.element.up().removeClassName('active');
//			var dimen = $("c-main").getHeight()+300;
//			alert(dimen);
//			Effect.ScrollTo('c-parent', {afterfinish: function(e) {
document.getElementsByTagName("html").item(0).style.height = 'auto';
//			 document.getElementsByTagName("html").item(0).style.overflow = 'visible';
//			 document.getElementsByTagName("html").item(0).morph('height:'+dimen+'px');
//			}});
/*mybody = document.getElementsByTagName("body").item(0);
mybody.insert({
bottom: new Element('div', {id: 'blubb'})
});
Element.remove($('blubb'));*/
}
})
}
// -----------------------------------------------------------------------------------
// getPageSize()
// Returns array with page width, height and window width, height
// Core code from - quirksmode.com
// Edit for Firefox by pHaez
//
function getPageSize(){
var yScroll;
if (window.innerHeight && window.scrollMaxY) {
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
yScroll = document.body.scrollHeight;
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
yScroll = document.body.offsetHeight;
}
var windowHeight;
if (self.innerHeight) {	// all except Explorer
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowHeight = document.body.clientHeight;
}
// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
arrayPageSize = new Array(pageHeight,windowHeight);
return arrayPageSize;
}
// -----------------------------------------------------------------------------------
// dafuer muss texpand.packed.js geladen sein.
// Alle Textareas im content vergössern automatisch um den gesamten Inhalt anzuzeigen
function textExpand() {
$('content').select('textarea').each(function(el) {
new Texpand(el);
});
}
// -----------------------------------------------------------------------------------
document.observe("dom:loaded", function() {
if ($('print')) { $('print').show(); }
if($("clicklist")) { Clicklist(); }
focusLabels();
JSTarget.init();
setupARIA();
textExpand();
});