function Delegate(){}Delegate.create=function(a,b){for(var c=[],d=arguments.length,e=2;e<d;e++)c[e-2]=arguments[e];return function(){var f=[].concat(arguments,c);b.apply(a,f)}};Tween=function(a,b,c,d,e,f,g){this.init(a,b,c,d,e,f,g)};var t=Tween.prototype;t.obj={};t.prop="";t.func=function(a,b,c,d){return c*a/d+b};t.begin=0;t.change=0;t.prevTime=0;t.prevPos=0;t.looping=false;t._duration=0;t._time=0;t._pos=0;t._position=0;t._startTime=0;t._finish=0;t.name="";t.suffixe="";t._listeners=[];
t.setTime=function(a){this.prevTime=this._time;if(a>this.getDuration())if(this.looping){this.rewind(a-this._duration);this.update();this.broadcastMessage("onMotionLooped",{target:this,type:"onMotionLooped"})}else{this._time=this._duration;this.update();this.stop();this.broadcastMessage("onMotionFinished",{target:this,type:"onMotionFinished"})}else{if(a<0)this.rewind();else this._time=a;this.update()}};t.getTime=function(){return this._time};
t.setDuration=function(a){this._duration=a==null||a<=0?1E6:a};t.getDuration=function(){return this._duration};t.setPosition=function(a){this.prevPos=this._pos;var b=this.suffixe!=""?this.suffixe:"";this.obj[this.prop]=Math.round(a)+b;this._pos=a;this.broadcastMessage("onMotionChanged",{target:this,type:"onMotionChanged"})};t.getPosition=function(a){if(a==undefined)a=this._time;return this.func(a,this.begin,this.change,this._duration)};t.setFinish=function(a){this.change=a-this.begin};
t.geFinish=function(){return this.begin+this.change};t.init=function(a,b,c,d,e,f,g){if(arguments.length){this._listeners=[];this.addListener(this);if(g)this.suffixe=g;this.obj=a;this.prop=b;this._pos=this.begin=d;this.setDuration(f);if(c!=null&&c!="")this.func=c;this.setFinish(e)}};t.start=function(){this.rewind();this.startEnterFrame();this.broadcastMessage("onMotionStarted",{target:this,type:"onMotionStarted"})};t.rewind=function(a){this.stop();this._time=a==undefined?0:a;this.fixTime();this.update()};
t.fforward=function(){this._time=this._duration;this.fixTime();this.update()};t.update=function(){this.setPosition(this.getPosition(this._time))};t.startEnterFrame=function(){this.stopEnterFrame();this.isPlaying=true;this.onEnterFrame()};t.onEnterFrame=function(){if(this.isPlaying){this.nextFrame();setTimeout(Delegate.create(this,this.onEnterFrame),0)}};t.nextFrame=function(){this.setTime((this.getTimer()-this._startTime)/700)};
t.stop=function(){this.stopEnterFrame();this.broadcastMessage("onMotionStopped",{target:this,type:"onMotionStopped"})};t.stopEnterFrame=function(){this.isPlaying=false};t.continueTo=function(a,b){this.begin=this._pos;this.setFinish(a);this._duration!=undefined&&this.setDuration(b);this.start()};t.resume=function(){this.fixTime();this.startEnterFrame();this.broadcastMessage("onMotionResumed",{target:this,type:"onMotionResumed"})};t.yoyo=function(){this.continueTo(this.begin,this._time)};
t.addListener=function(a){this.removeListener(a);return this._listeners.push(a)};t.removeListener=function(a){for(var b=this._listeners,c=b.length;c--;)if(b[c]==a){b.splice(c,1);return true}return false};t.broadcastMessage=function(){for(var a=[],b=0;b<arguments.length;b++)a.push(arguments[b]);var c=a.shift(),d=this._listeners,e=d.length;for(b=0;b<e;b++)d[b][c]&&d[b][c].apply(d[b],a)};t.fixTime=function(){this._startTime=this.getTimer()-this._time*1E3};
t.getTimer=function(){return(new Date).getTime()-this._time};Tween.backEaseIn=function(a,b,c,d){if(e==undefined)var e=1.70158;return c*(a/=d)*a*((e+1)*a-e)+b};Tween.backEaseOut=function(a,b,c,d){if(e==undefined)var e=1.70158;return c*((a=a/d-1)*a*((e+1)*a+e)+1)+b};Tween.backEaseInOut=function(a,b,c,d){if(e==undefined)var e=1.70158;if((a/=d/2)<1)return c/2*a*a*(((e*=1.525)+1)*a-e)+b;return c/2*((a-=2)*a*(((e*=1.525)+1)*a+e)+2)+b};
Tween.elasticEaseIn=function(a,b,c,d,e,f){if(a==0)return b;if((a/=d)==1)return b+c;f||(f=d*0.3);if(!e||e<Math.abs(c)){e=c;c=f/4}else c=f/(2*Math.PI)*Math.asin(c/e);return-(e*Math.pow(2,10*(a-=1))*Math.sin((a*d-c)*2*Math.PI/f))+b};Tween.elasticEaseOut=function(a,b,c,d,e,f){if(a==0)return b;if((a/=d)==1)return b+c;f||(f=d*0.3);if(!e||e<Math.abs(c)){e=c;var g=f/4}else g=f/(2*Math.PI)*Math.asin(c/e);return e*Math.pow(2,-10*a)*Math.sin((a*d-g)*2*Math.PI/f)+c+b};
Tween.elasticEaseInOut=function(a,b,c,d,e,f){if(a==0)return b;if((a/=d/2)==2)return b+c;f||(f=d*0.3*1.5);if(!e||e<Math.abs(c)){e=c;var g=f/4}else g=f/(2*Math.PI)*Math.asin(c/e);if(a<1)return-0.5*e*Math.pow(2,10*(a-=1))*Math.sin((a*d-g)*2*Math.PI/f)+b;return e*Math.pow(2,-10*(a-=1))*Math.sin((a*d-g)*2*Math.PI/f)*0.5+c+b};
Tween.bounceEaseOut=function(a,b,c,d){return(a/=d)<1/2.75?c*7.5625*a*a+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+0.984375)+b};Tween.bounceEaseIn=function(a,b,c,d){return c-Tween.bounceEaseOut(d-a,0,c,d)+b};Tween.bounceEaseInOut=function(a,b,c,d){return a<d/2?Tween.bounceEaseIn(a*2,0,c,d)*0.5+b:Tween.bounceEaseOut(a*2-d,0,c,d)*0.5+c*0.5+b};Tween.strongEaseInOut=function(a,b,c,d){return c*(a/=d)*a*a*a*a+b};
Tween.regularEaseIn=function(a,b,c,d){return c*(a/=d)*a+b};Tween.regularEaseOut=function(a,b,c,d){return-c*(a/=d)*(a-2)+b};Tween.regularEaseInOut=function(a,b,c,d){if((a/=d/2)<1)return c/2*a*a+b;return-c/2*(--a*(a-2)-1)+b};Tween.strongEaseIn=function(a,b,c,d){return c*(a/=d)*a*a*a*a+b};Tween.strongEaseOut=function(a,b,c,d){return c*((a=a/d-1)*a*a*a*a+1)+b};Tween.strongEaseInOut=function(a,b,c,d){if((a/=d/2)<1)return c/2*a*a*a*a*a+b;return c/2*((a-=2)*a*a*a*a+2)+b};OpacityTween.prototype=new Tween;
OpacityTween.prototype.constructor=Tween;OpacityTween.superclass=Tween.prototype;function OpacityTween(a,b,c,d,e){this.targetObject=a;this.init({},"x",b,c,d,e)}var o=OpacityTween.prototype;o.targetObject={};o.onMotionChanged=function(a){a=a.target._pos;var b=this.targetObject;b.style.opacity=a/100;b.style["-moz-opacity"]=a/100;if(b.filters)b.filters.alpha.opacity=a};
function getDataReturnText(a,b){var c=false;if(window.XMLHttpRequest)c=new XMLHttpRequest;else if(window.ActiveXObject)c=new ActiveXObject("Microsoft.XMLHTTP");if(c){c.open("GET",a);c.onreadystatechange=function(){if(c.readyState==4&&c.status==200){b(c.responseText);delete c;c=null}};c.send(null)}}
function getDataReturnXml(a,b){var c=false;if(window.XMLHttpRequest)c=new XMLHttpRequest;else if(window.ActiveXObject)c=new ActiveXObject("Microsoft.XMLHTTP");if(c){c.open("GET",a);c.onreadystatechange=function(){if(c.readyState==4&&c.status==200){b(c.responseXML);delete c;c=null}};c.send(null)}}
function postDataReturnText(a,b,c){var d=false;if(window.XMLHttpRequest)d=new XMLHttpRequest;else if(window.ActiveXObject)d=new ActiveXObject("Microsoft.XMLHTTP");if(d){d.open("POST",a);d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.onreadystatechange=function(){if(d.readyState==4&&d.status==200){c(d.responseText);delete d;d=null}};d.send(b)}}
function postDataReturnXml(a,b,c){var d=false;if(window.XMLHttpRequest)d=new XMLHttpRequest;else if(window.ActiveXObject)d=new ActiveXObject("Microsoft.XMLHTTP");if(d){d.open("POST",a);d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.onreadystatechange=function(){if(d.readyState==4&&d.status==200){c(d.responseXML);delete d;d=null}};d.send(b)}}var mainContent,overlay,innerContent,selectedPanel="000";function changeTheMouse(){document.body.style.cursor="pointer"}
function changeTheMouseBack(){document.body.style.cursor="default"}
function firstRun(){if(startPage)flipPanel(startPage);else{mainContent=document.getElementById("mainContent");overlay=document.getElementById("mainContent2");innerContent=document.getElementById("innerContent");mainContent.style.filter="alpha(opacity=0)";mainContent.style.opacity="0";mainContent.style.display="block";overlay.style.display="none";var a=new OpacityTween(mainContent,Tween.regularEaseOut,0,100,5);a.start();a.onMotionFinished=function(){setTimeout("finishFirstRun()",2E3)}}}
function finishFirstRun(){overlay.style.opacity="0";overlay.style.filter="alpha(opacity=0)";overlay.style.display="block";(new OpacityTween(overlay,Tween.regularEaseInOut,0,100,1)).start()}
function flipPanel(a){var b=document.getElementById("talkingGirl");mainContent=document.getElementById("mainContent");b&&mainContent.removeChild(b);overlay=document.getElementById("mainContent2");overlay.style.background="url(Images/overlay.png)";innerContent=document.getElementById("innerContent");if(a!=selectedPanel)if(parseFloat(navigator.appVersion.split("MSIE")[1])<8){if(startPage){mainContent.style.background="url(Images/bac-"+a+".png)";mainContent.style.display="block";selectedPanel=a;startPage=
null}else{mainContent.style.background="url(Images/bac-"+a+".png)";mainContent.style.display="block";selectedPanel=a}loadContent2(a)}else if(startPage){mainContent.style.opacity="0";mainContent.style.filter="alpha(opacity=0)";mainContent.style.background="url(Images/bac-"+a+".png)";overlay.style.opacity="0";overlay.style.display="none";overlay.style.filter="alpha(opacity=0)";mainContent.style.display="block";b=new OpacityTween(mainContent,Tween.regularEaseInOut,0,100,1);b.start();selectedPanel=a;
b.onMotionFinished=function(){startPage=null;setTimeout("loadContent('"+a+"')",2E3)}}else{b=new OpacityTween(mainContent,Tween.regularEaseOut,100,0,1);b.start();b.onMotionFinished=function(){mainContent.style.opacity="0";mainContent.style.filter="alpha(opacity=0)";mainContent.style.background="url(Images/bac-"+a+".png)";overlay.style.opacity="0";overlay.style.display="none";overlay.style.filter="alpha(opacity=0)";mainContent.style.display="block";var c=new OpacityTween(mainContent,Tween.regularEaseInOut,
0,100,1);c.start();selectedPanel=a;c.onMotionFinished=function(){setTimeout("loadContent('"+a+"')",2E3)}}}}function loadContent(a){postDataReturnText("content.php?","pageLoad="+a,showContent)}function loadContent2(a){postDataReturnText("content.php?","pageLoad="+a,showContent2)}
function showContent(a){innerContent.innerHTML=a;var b=new OpacityTween(overlay,Tween.regularEaseInOut,0,100,1);overlay.style.display="block";b.start();b.onMotionFinished=function(){innerContent.innerHTML="";innerContent.innerHTML=a;new multiBox("mb2")}}function showContent2(a){innerContent.innerHTML=a;overlay.style.display="block";innerContent.innerHTML="";innerContent.innerHTML=a;new multiBox("mb2")}function showFade(){}function fadeAway(){}
var Lighter=new Class({Implements:[Options],name:"Lighter",options:{altLines:"",container:null,editable:false,flame:"standard",fuel:"standard",id:null,indent:-1,jsStyles:true,matchType:"standard",mode:"pre",path:"./",strict:false},initialize:function(a,b){this.setOptions(b);b=this.options;this.id=b.id||this.name+"_"+$time();this.codeblock=$(a);this.code=a.get("html").chop().replace(/&lt;/gim,"<").replace(/&gt;/gim,">").replace(/&amp;/gim,"&");this.container=$(this.options.container);if(b.indent>-1)this.code=
this.code.tabToSpaces(b.indent);this.builder=new Hash({pre:this.createLighter.bind(this),ol:this.createLighterWithLines.pass([["ol"],["li"]],this),div:this.createLighterWithLines.pass([["div"],["div","span"],true,"span"],this),table:this.createLighterWithLines.pass([["table","tbody"],["tr","td"],true,"td"],this)});var c=this.codeblock.get("class").split(":");if(!c[0])c[0]=this.options.fuel;if(!c[1])c[1]=this.options.flame;this.loadFlameSrc(c)},loadFlameSrc:function(a){$chk(Flame[a[1]])?this.loadFlame(a):
(new Element("script",{src:this.options.path+"Flame."+a[1]+".js",type:"text/javascript"})).addEvents({load:function(){this.loadFlame(a)}.bind(this),error:function(){a[1]="standard";this.loadFlame(a)}.bind(this)}).inject(document.head)},loadFlame:function(a){this.flame=new Flame[a[1]](this);this.loadFuelSrc(a)},loadFuelSrc:function(a){$chk(Fuel[a[0]])?this.loadFuel(a):(new Element("script",{src:this.options.path+"Fuel."+a[0]+".js",type:"text/javascript"})).addEvents({load:function(){this.loadFuel(a)}.bind(this),
error:function(){a[0]="standard";this.loadFuel(a)}.bind(this)}).inject(document.head)},loadFuel:function(a){this.fuel=new Fuel[a[0]](this,this.flame,{matchType:this.options.matchType,strict:this.options.strict});this.light()},light:function(){this.element=this.toElement();if(this.container){this.container.empty();this.element.inject(this.container)}else{this.codeblock.setStyle("display","none");this.element.inject(this.codeblock,"after")}},createLighter:function(){var a=new Element("pre",{"class":this.flame.shortName+
this.name}),b=0;if($defined(this.fuel.wicks[0])){this.fuel.wicks.each(function(c){a.appendText(this.code.substring(b,c.index));this.insertAndKeepEl(a,c.text,c.type);b=c.index+c.text.length},this);b<this.code.length&&a.appendText(this.code.substring(b,this.code.length))}else a.appendText(this.code);return a},createLighterWithLines:function(a,b,c,d){var e=new Element(a[0],{"class":this.flame.shortName+this.name,id:this.id}),f=new Element(b[0]),g=1,i=0,h=null;a[0]=="table"&&e.set("cellpadding",0).set("cellspacing",
0).set("border",0);if(a[1])e=(new Element(a[1])).inject(e);if(b[1])f=(new Element(b[1])).inject(f);f.addClass(this.flame.shortName+"line");if(c)g=this.insertLineNum(f,g,d);this.fuel.wicks.each(function(k){if(i!=k.index){h=this.code.substring(i,k.index).split("\n");for(var j=0;j<h.length;j++)if(j<h.length-1){if(h[j]=="")h[j]=" ";f=this.insertAndMakeEl(f,e,h[j],b);if(c)g=this.insertLineNum(f,g,d)}else this.insertAndKeepEl(f,h[j])}h=k.text.split("\n");for(j=0;j<h.length;j++)if(j<h.length-1){f=this.insertAndMakeEl(f,
e,h[j],b,k.type);if(c)g=this.insertLineNum(f,g,d)}else this.insertAndKeepEl(f,h[j],k.type);i=k.end},this);if(i<=this.code.length){h=this.code.substring(i,this.code.length).split("\n");for(var l=0;l<h.length;l++){f=this.insertAndMakeEl(f,e,h[l],b);if(c)g=this.insertLineNum(f,g,d)}}if(this.options.altLines!=="")if(this.options.altLines=="hover")e.getElements("."+this.flame.shortName+"line").addEvents({mouseover:function(){this.toggleClass("alt")},mouseout:function(){this.toggleClass("alt")}});else b[1]?
e.getChildren(":"+this.options.altLines).getElement("."+this.flame.shortName+"line").addClass("alt"):e.getChildren(":"+this.options.altLines).addClass("alt");if(b[1]){e.getFirst().getChildren().addClass(this.flame.shortName+"first");e.getLast().getChildren().addClass(this.flame.shortName+"last")}else{e.getFirst().addClass(this.flame.shortName+"first");e.getLast().addClass(this.flame.shortName+"last")}if(a[1])e=e.getParent();return e},insertAndKeepEl:function(a,b,c){if(b.length>0){var d=new Element("span");
d.set("text",b);c&&d.addClass(this.flame.aliases[c]);d.inject(a)}},insertAndMakeEl:function(a,b,c,d,e){this.insertAndKeepEl(a,c,e);if(d[1])a=a.getParent();a.inject(b);a=new Element(d[0]);if(d[1])a=(new Element(d[1])).inject(a);a.addClass(this.flame.shortName+"line");return a},insertLineNum:function(a,b,c){(new Element(c,{text:b++,"class":this.flame.shortName+"num"})).inject(a.getParent(),"top");return b},toElement:function(){if(!this.element){this.element=this.builder[this.options.mode]();this.options.editable&&
this.element.set("contenteditable","true")}return this.element},replaces:function(a){a=$(a,true);a.parentNode.replaceChild(this.toElement(),a);return this}});Element.implement({light:function(a){return new Lighter(this,a)}});String.implement({chop:function(){return this.replace(/(^\s*\n|\n\s*$)/gi,"")},tabToSpaces:function(a){for(var b=0,c="";b<a;b++)c+=" ";return this.replace(/\t/g,c)}});
var Fuel=new Class({Implements:[Options],options:{matchType:"standard",strict:false},language:"",defaultFlame:"standard",patterns:new Hash,keywords:new Hash,rules:new Hash,delimiters:new Hash({start:null,end:null}),common:{slashComments:/(?:^|[^\\])\/\/.*$/gm,poundComments:/#.*$/gm,multiComments:/\/\*[\s\S]*?\*\//gm,aposStrings:/'[^'\\]*(?:\\.[^'\\]*)*'/gm,quotedStrings:/"[^"\\]*(?:\\.[^"\\]*)*"/gm,strings:/'[^'\\]*(?:\\.[^'\\]*)*'|"[^"\\]*(?:\\.[^"\\]*)*"/gm,properties:/\.([\w]+)\s*/gi,methodCalls:/\.([\w]+)\s*\(/gm,
functionCalls:/\b([\w]+)\s*\(/gm,brackets:/\{|\}|\(|\)|\[|\]/g,numbers:/\b((?:(\d+)?\.)?[0-9]+|0x[0-9A-F]+)\b/gi},initialize:function(a,b,c,d){this.setOptions(c);this.wicks=d||[];this.lighter=a;this.flame=b;this.builder=new Hash({standard:this.findMatches,lazy:this.findMatchesLazy});if(!c.strict){this.delimiters.start&&this.addFuel("delimBeg",this.delimiters.start,"de1");this.delimiters.end&&this.addFuel("delimEnd",this.delimiters.end,"de2")}this.keywords.each(function(i,h){i.csv!=""&&this.addFuel(h,
this.csvToRegExp(i.csv,"g"),i.alias)},this);this.patterns.each(function(i,h){this.addFuel(h,i.pattern,i.alias)},this);var e=0,f=a.code.length;f="";b=this.delimiters;d=[];var g=e=null;if(c.strict){if(b.start&&b.end)for(;(e=b.start.exec(a.code))!=null;){b.end.lastIndex=b.start.lastIndex;if((g=b.end.exec(a.code))!=null){d.push(new Wick(e[0],"de1",e.index));e=b.start.lastIndex;f=g.index-1;f=a.code.substring(e,f);d.extend(this.builder[c.matchType].pass([f,e],this)());d.push(new Wick(g[0],"de2",g.index))}}}else d.extend(this.builder[c.matchType].pass(a.code,
this)());this.wicks=d},addFuel:function(a,b,c){this.rules[a]=b;this.flame.addAlias(a,c)},csvToRegExp:function(a,b){return new RegExp("\\b("+a.replace(/,\s*/g,"|")+")\\b",b)},delimToRegExp:function(a,b,c,d,e){a=a.escapeRegExp();if(b)b=b.escapeRegExp();c=c?c.escapeRegExp():a;pat=b?a+"[^"+c+b+"\\n]*(?:"+b+".[^"+c+b+"\\n]*)*"+c:a+"[^"+c+"\\n]*"+c;return new RegExp(pat+(e||""),d||"")},strictRegExp:function(){for(var a="(",b=0;b<arguments.length;b++){a+=arguments[b].escapeRegExp();a+=b<arguments.length-
1?"|":""}a+=")";return new RegExp(a,"gim")},findMatches:function(a,b){var c=[],d=0,e=a.length;insertIndex=0;rule=newWick=type=match=null;rules={};futureMatch=currentMatch=null;b=b||0;for(this.rules.each(function(f,g){rules[g]={pattern:f,lastIndex:0}},this);d<a.length;){e=a.length;match=null;for(rule in rules){rules[rule].pattern.lastIndex=d;currentMatch=rules[rule].pattern.exec(a);if(currentMatch===null)delete rules[rule];else{if(currentMatch.index<e||currentMatch.index==e&&match[0].length<currentMatch[0].length){match=
currentMatch;type=rule;e=currentMatch.index}rules[rule].nextIndex=rules[rule].pattern.lastIndex-currentMatch[0].length}}if(match!=null){index=match[1]&&match[0].contains(match[1])?match.index+match[0].indexOf(match[1]):match.index;newWick=new Wick(match[1]||match[0],type,index+b);c.push(newWick);futureMatch=rules[type].pattern.exec(a);rules[type].nextIndex=futureMatch?rules[type].pattern.lastIndex-futureMatch[0].length:a.length;d=a.length;for(rule in rules)if(rules[rule].nextIndex<d)d=rules[rule].nextIndex;
d=Math.max(d,newWick.end-b)}else break}return c},findMatchesLazy:function(a,b){var c=this.wicks,d=null;index=0;b=b||0;this.rules.each(function(e,f){for(;(d=e.exec(a))!=null;){index=d[1]&&d[0].contains(d[1])?d.index+d[0].indexOf(d[1]):d.index;c.push(new Wick(d[1]||d[0],f,index+b))}},this);return this.purgeWicks(c)},purgeWicks:function(a){a=a.sort(this.compareWicks);for(var b=0,c=0;b<a.length;b++)if(a[b]!=null)for(c=b+1;c<a.length&&a[b]!=null;c++)if(a[c]!=null)if(a[c].isBeyond(a[b]))break;else if(a[c].overlaps(a[b]))a[b]=
null;else if(a[b].contains(a[c]))a[c]=null;return a.clean()},compareWicks:function(a,b){return a.index-b.index}});Fuel.standard=new Class({Extends:Fuel,initialize:function(a,b,c,d){this.parent(a,b,c,d)}});
var Wick=new Class({initialize:function(a,b,c){this.text=a;this.type=b;this.index=c;this.length=this.text.length;this.end=this.index+this.length},contains:function(a){return a.index>=this.index&&a.index<this.end},isBeyond:function(a){return this.index>=a.end},overlaps:function(a){return this.index==a.index&&this.length>a.length},toString:function(){return this.index+" - "+this.text+" - "+this.end}}),Flame=new Class({shortName:"lt",aliases:new Hash,common:new Hash,layout:new Hash,styles:new Hash,defaultCommon:new Hash({"font-family":"Monaco, Courier, Monospace",
"font-size":"12px","line-height":"1.5",overflow:"auto","white-space":"pre-wrap","word-wrap":"break-word"}),defaultLayout:new Hash({numBgColor:new Hash,lineBgColor:new Hash,lineNumStyles:new Hash,lineStyles:new Hash,altLineStyles:new Hash,top:new Hash,right:new Hash,bottom:new Hash,left:new Hash,codeStyles:new Hash}),fixes:new Hash({div:new Hash({div:new Hash({clear:"left",overflow:"auto"}),num:new Hash({display:"block","float":"left","text-align":"center",width:"30px"}),line:new Hash({display:"block",
"margin-left":"30px"})}),table:new Hash({num:new Hash({"text-align":"center",width:"30px"})}),ol:new Hash({ol:new Hash({"margin-top":"0","margin-bottom":"0","margin-left":"0","padding-left":"0"}),li:new Hash({"margin-left":"40px"})})}),initialize:function(a,b){this.lighter=a;this.fuel=b;this.common.combine(this.defaultCommon);this.layout.combine(this.defaultLayout);this.styles.each(function(c,d){this.addAlias(d)},this);this.lighter.options.jsStyles&&this.injectTag()},addAlias:function(a,b){this.aliases[a]=
b||a},injectTag:function(){this.styleTag=(new Element("style")).setProperty("type","text/css").inject(document.head);this.styleText="";var a=this.lighter.options.mode,b=a+"."+this.shortName+this.lighter.name,c=b+" ."+this.shortName,d=this.layout.lineNumStyles.extend(this.layout.numBgColor),e=this.layout.lineStyles.extend(this.layout.lineBgColor),f=this.layout.left.extend(this.layout.right);this.addCSS(b,this.common);this.addCSS(b,new Hash({"white-space":"-moz-pre-wrap"}));this.addCSS(b,new Hash({"white-space":"-pre-wrap"}));
this.addCSS(b,new Hash({"white-space":"-o-pre-wrap"}));switch(a){case "pre":f=f.extend(this.layout.top).extend(this.layout.bottom);this.addCSS(b,this.layout.lineBgColor.extend(f));this.addCSS(b+" span",this.layout.codeStyles);break;case "ol":this.addCSS(b,d.extend(this.fixes.ol.ol));this.addCSS(b+" li",e.extend(f).extend(this.fixes.ol.li));this.addCSS(c+"first",this.layout.top);this.addCSS(c+"last",this.layout.bottom);this.addCSS(b+" .alt",this.layout.altLineStyles);this.addCSS(b+" span",this.layout.codeStyles);
break;case "div":this.addCSS(c+"num",d.extend(this.fixes.div.num));this.addCSS(c+"line",e.extend(f).extend(this.fixes.div.line));this.addCSS(b+" div",this.fixes.div.div.extend(this.layout.numBgColor));this.addCSS(c+"first",this.layout.top);this.addCSS(c+"last",this.layout.bottom);this.addCSS(b+" .alt",this.layout.altLineStyles);this.addCSS(b+" span",this.layout.codeStyles);break;case "table":this.addCSS(c+"num",d.extend(this.fixes.table.num));this.addCSS(c+"line",e.extend(f));this.addCSS(c+"first",
this.layout.top);this.addCSS(c+"last",this.layout.bottom);this.addCSS(b+" .alt",this.layout.altLineStyles);this.addCSS(b+" span",this.layout.codeStyles);break}this.styles.each(function(g,i){this.addCSS(b+" ."+i,g)},this);if(Browser.Engine.trident)this.styleTag.styleSheet.cssText+=this.styleText;else this.styleTag.appendText(this.styleText)},addCSS:function(a,b){var c="\n"+a+" {\n";b&&b.each(function(d,e){c+="\t"+e+": "+d+";\n"});c+="}\n";this.styleText+=c}});
Flame.standard=new Class({Extends:Flame,styles:new Hash({de1:new Hash({}),de2:new Hash({}),kw1:new Hash({color:"#1b609a"}),kw2:new Hash({color:"#9a6f1b"}),kw3:new Hash({color:"#784e0c"}),kw4:new Hash({color:"#9a6f1b"}),co1:new Hash({color:"#888888"}),co2:new Hash({color:"#888888"}),st0:new Hash({color:"#489a1b"}),st1:new Hash({color:"#489a1b"}),st2:new Hash({color:"#489a1b"}),nu0:new Hash({color:"#70483d"}),me0:new Hash({color:"#666666"}),br0:new Hash({color:"#444444"}),sy0:new Hash({color:"#444444"}),
es0:new Hash({color:"#444444"}),re0:new Hash({color:"#784e0c"})}),layout:new Hash({numBgColor:new Hash({"background-color":"#f2f2f2"}),lineBgColor:new Hash({"background-color":"#fff"}),lineNumStyles:new Hash({color:"#939393","font-size":"10px","list-style":"decimal-leading-zero"}),lineStyles:new Hash({"border-top":"1px solid #fff","border-bottom":"1px solid #fff","border-left":"1px solid #939393",padding:"0 3px 0 10px"}),altLineStyles:new Hash({"border-top":"1px solid #eee","border-bottom":"1px solid #eee",
"background-color":"#F4F8FC"}),top:new Hash({"padding-top":"5px"}),right:new Hash({"padding-right":"5px"}),bottom:new Hash({"padding-bottom":"5px"}),left:new Hash({"padding-left":"15px"}),codeStyles:new Hash({color:"black","font-size":"12px"})}),initialize:function(a,b){this.parent(a,b)}});
Fuel.css=new Class({Extends:Fuel,language:"css",initialize:function(a,b,c){this.keywords=new Hash({css1:{csv:"background-attachment, background-color, background-image, background-position, background-repeat, background, border-bottom, border-bottom-width, border-color, border-left, border-left-width, border-right, border-right-width, border-style, border-top, border-top-width, border-width, border, clear, color, display, float, font-family, font-size, font-style, font-variant, font-weight, font, height, letter-spacing, line-height, list-style-image, list-style-position, list-style-type, list-style, margin-bottom, margin-left, margin-right, margin-top, margin, padding-bottom, padding-left, padding-right, padding-top, padding, text-align, text-decoration, text-indent, text-transform, vertical-align, white-space, width, word-spacing",alias:"kw1"},
css2:{csv:"azimuth, border-bottom-color, border-bottom-style, border-collapse, border-left-color, border-left-style, border-right-color, border-right-style, border-spacing, border-top-color, border-top-style, bottom, caption-side, clip, content, counter-increment, counter-reset, cue, cue-after, cue-before, cursor, direction, elevation, empty-cells, left, max-height, max-width, min-height, min-width, orphans, outline, outline-color, outline-style, outline-width, overflow, page-break-after, page-break-before, page-break-inside, pause, pause-after, pause-before, pitch, pitch-range, play-during, position, quotes, richness, right, speak, speak-header, speak-numeral, speak-punctuation, speech-rate, stress, table-layout, top, unicode-bidi, visibility, voice-family, volume, widows, z-index",
alias:"kw1"},css3:{csv:"alignment-adjust, alignment-baseline, appearance, background-break, background-clip, background-origin, background-size, baseline-shift, binding, bookmark-label, bookmark-level, bookmark-target, border-bottom-left-radius, border-bottom-right-radius, border-break, border-image, border-length, border-radius, border-top-left-radius, border-top-right-radius, box-align, box-direction, box-flex, box-flex-group, box-lines, box-orient, box-pack, box-shadow, box-sizing, color-profile, column-break-after, column-break-before, column-count, column-fill, column-gap, column-rule, column-rule-color, column-rule-style, column-rule-width, column-span, column-width, columns, crop, display-model, display-role, dominant-baseline, drop-initial-after-adjust, drop-initial-after-align, drop-initial-before-adjust, drop-initial-before-align, drop-initial-size, drop-initial-value, fit, fit-position, float-offset, font-effect, font-emphasize, font-emphasize-position, font-emphasize-style, font-size-adjust, font-smooth, font-stretch, grid-columns, grid-rows, hanging-punctuation, hyphenate-after, hyphenate-before, hyphenate-character, hyphenate-lines, hyphenate-resource, hyphens, icon, image-orientation, image-resolution, inline-box-align, line-stacking, line-stacking-ruby, line-stacking-shift, line-stacking-strategy, mark, mark-after, mark-before, marker-offset, marks, marquee-direction, marquee-play-count, marquee-speed, marquee-style, move-to, nav-down, nav-index, nav-left, nav-right, nav-up, opacity, outline-offset, overflow-style, overflow-x, overflow-y, page, page-policy, phonemes, presentation-level, punctuation-trim, rendering-intent, resize, rest, rest-after, rest-before, rotation, rotation-point, ruby-align, ruby-overhang, ruby-position, ruby-span, size, string-set, tab-side, target, target-name, target-new, target-position, text-align-last, text-emphasis, text-height, text-justify, text-outline, text-replace, text-shadow, text-wrap, voice-balance, voice-duration, voice-pitch, voice-pitch-range, voice-rate, voice-stress, voice-volume, white-space-collapse, word-break, word-wrap",
alias:"kw2"},values:{csv:"100, 200, 300, 400, 500, 600, 700, 800, 900, above, absolute, always, aqua, armenian, auto, avoid, baseline, below, bidi-override, black, blink, block, blue, bold, bolder, both, bottom, break-all, break-strict, break-word, break, capitalize, caption, center, circle, cjk-ideographic, close-quote, collapse, compact, condensed, crop, cross, crosshair, dashed, decimal-leading-zero, decimal, default, disc, dotted, double, e-resize, embed, expanded, extra-condensed, extra-expanded, fixed, fuchsia, georgian, gray, green, groove, hand, hebrew, help, hidden, hide, higher, hiragana-iroha, hiragana, icon, inherit, inline-table, inline, inset, inside, invert, italic, justify, katakana-iroha, katakana, keep-all, konq-center, landscape, large, larger, left, level, light, lighter, lime, line-through, list-item, loose, loud, lower-alpha, lower-greek, lower-latin, lower-roman, lowercase, lower, ltr, marker, maroon, medium, menu, message-box, middle, mix, move, n-resize, narrower, navy, ne-resize, never, no-close-quote, no-open-quote, no-repeat, none, normal, nowrap, nw-resize, oblique, olive, open-quote, outset, outside, overline, pointer, portrait, pre-wrap, pre, purple, red, relative, repeat, repeat-x, repeat-y, ridge, right, rtl, run-in, s-resize, scroll, se-resize, semi-condensed, semi-expanded, separate, show, silver, small-caps, small-caption, smaller, small, solid, square, static-position, static, status-bar, sub, super, sw-resize, table-caption, table-cell, table-column-group, table-column, table-footer-group, table-header-group, table-row, table-row-group, table, teal, text-bottom, text-top, text, thick, thin, top, transparent, ultra-condensed, ultra-expanded, underline, upper-alpha, upper-latin, upper-roman, uppercase, visible, w-resize, wait, white, wider, x-large, x-small, xx-large, xx-small, yellow",
alias:"kw3"}});this.patterns=new Hash({multiComments:{pattern:this.common.multiComments,alias:"co1"},strings:{pattern:this.common.strings,alias:"st0"},selectors:{pattern:/([^\}\n]+)\{/gi,alias:"se0"},uri:{pattern:/url\s*\([^\)]*\)/gi,alias:"kw4"},units:{pattern:/\b(\d+[\.\d+]?\s*(px|pt|em|ex|cm|in|mm|pc|%)?)/gi,alias:"nu0"},hexColors:{pattern:/(#[A-F0-9]{3}([A-F0-9]{3})?)\b/gi,alias:"kw3"},rgbColors:{pattern:/(rgb\s*\(([1-2]?[0-9]{2}(\,\s*)?){3}\))/g,alias:"kw3"}});this.delimiters=new Hash({start:this.strictRegExp('<style type="text/css">'),
end:this.strictRegExp("</style>")});this.parent(a,b,c)}});
Fuel.html=new Class({Extends:Fuel,language:"html",initialize:function(a,b,c){c.matchType="lazy";this.patterns=new Hash({comments:{pattern:/(?:\&lt;|<)!--[\s\S]*?--(?:\&gt;|>)/gim,alias:"co1"},cdata:{pattern:/(?:\&lt;|<)!\[CDATA\[[\s\S]*?\]\](?:\&gt;|>)/gim,alias:"st1"},closingTags:{pattern:/(?:\&lt;|<)\/[A-Z][A-Z0-9]*?(?:\&gt;|>)/gi,alias:"kw1"},doctype:{pattern:/(?:\&lt;|<)!DOCTYPE[\s\S]+?(?:\&gt;|>)/gim,alias:"st2"}});for(var d=/((?:\&lt;|<)[A-Z][A-Z0-9]*)(.*?)(\/?(?:\&gt;|>))/gi,e=/\b([\w-]+)([ \t]*)(=)([ \t]*)(['"][^'"]+['"]|[^'" \t]+)/gi,
f=[],g=null,i=null,h=0;(g=d.exec(a.code))!=null;){for(f.push(new Wick(g[1],"kw1",g.index));(i=e.exec(g[2]))!=null;){h=g.index+g[1].length+i.index;f.push(new Wick(i[1],"kw2",h));h+=i[1].length+i[2].length;f.push(new Wick(i[3],"kw1",h));h+=i[3].length+i[4].length;f.push(new Wick(i[5],"kw3",h))}f.push(new Wick(g[3],"kw1",g.index+g[1].length+g[2].length))}this.parent(a,b,c,f)}});
Fuel.js=new Class({Extends:Fuel,language:"js",initialize:function(a,b,c){this.keywords=new Hash({commonKeywords:{csv:"as, break, case, catch, continue, delete, do, else, eval, finally, for, if, in, is, item, instanceof, return, switch, this, throw, try, typeof, void, while, write, with",alias:"kw1"},langKeywords:{csv:"class, const, default, debugger, export, extends, false, function, import, namespace, new, null, package, private, protected, public, super, true, use, var",alias:"kw2"},windowKeywords:{csv:"alert, back, blur, close, confirm, focus, forward, home, navigate, onblur, onerror, onfocus, onload, onmove, onresize, onunload, open, print, prompt, scroll, status, stop",
alias:"kw3"}});this.patterns=new Hash({slashComments:{pattern:this.common.slashComments,alias:"co1"},multiComments:{pattern:this.common.multiComments,alias:"co2"},strings:{pattern:this.common.strings,alias:"st0"},methodCalls:{pattern:this.common.properties,alias:"me0"},brackets:{pattern:this.common.brackets,alias:"br0"},numbers:{pattern:/\b((([0-9]+)?\.)?[0-9_]+([e][-+]?[0-9]+)?|0x[A-F0-9]+)\b/gi,alias:"nu0"},regex:{pattern:this.delimToRegExp("/","\\","/","g","[gimy]*"),alias:"re0"},symbols:{pattern:/\+|-|\*|\/|%|!|@|&|\||\^|\<|\>|=|,|\.|;|\?|:/g,
alias:"sy0"}});this.delimiters=new Hash({start:this.strictRegExp('<script type="text/javascript">','<script language="javascript">'),end:this.strictRegExp("<\/script>")});this.parent(a,b,c)}});
overlay=new Class({getOptions:function(){return{colour:"#000",opacity:0.7,zIndex:1,container:document.body,_onClick:$empty}},initialize:function(a){this.setOptions(this.getOptions(),a);this.options.container=$(this.options.container);this.container=(new Element("div")).setProperty("id","OverlayContainer").setStyles({position:"absolute",left:"0px",top:"0px",width:"100%",zIndex:this.options.zIndex}).injectInside(this.options.container);this.iframe=(new Element("iframe")).setProperties({id:"OverlayIframe",
name:"OverlayIframe",src:"javascript:void(0);",frameborder:0,scrolling:"no"}).setStyles({position:"absolute",top:0,left:0,width:"100%",height:"100%",filter:"progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)",opacity:0,zIndex:1}).injectInside(this.container);this.overlay=(new Element("div")).setProperty("id","Overlay").setStyles({position:"absolute",left:"0px",top:"0px",width:"100%",height:"100%",zIndex:2,backgroundColor:this.options.colour}).injectInside(this.container);this.options._onClick&&
this.container.addEvent("click",function(){this.options._onClick.call(this)}.bind(this));this.container.fade("hide");this.position();window.addEvent("resize",this.position.bind(this))},setOnClick:function(a){this.container.addEvent("click",a)},position:function(){if(this.options.container==document.body)this.container.setStyles({top:"0px",height:window.getScrollHeight()+"px"});else{var a=this.options.container.getCoordinates();this.container.setStyles({top:a.top+"px",height:a.height+"px",left:a.left+
"px",width:a.width+"px"})}},show:function(){this.container.fade(this.options.opacity)},hide:function(){this.container.fade("out")}});overlay.implement(new Options);
var Asset=new Hash({javascript:function(a,b){b=$extend({onload:$empty,document:document,check:$lambda(true)},b);var c=new Element("script",{src:a,type:"text/javascript"}),d=b.onload.bind(c),e=b.check,f=b.document;delete b.onload;delete b.check;delete b.document;c.addEvents({load:d,readystatechange:function(){["loaded","complete"].contains(this.readyState)&&d()}}).setProperties(b);if(Browser.Engine.webkit419)var g=function(){if($try(e)){$clear(g);d()}}.periodical(50);return c.inject(f.head)},css:function(a,
b){return(new Element("link",$merge({rel:"stylesheet",media:"screen",type:"text/css",href:a},b))).inject(document.head)},image:function(a,b){b=$merge({onload:$empty,onabort:$empty,onerror:$empty},b);var c=new Image,d=$(c)||new Element("img");["load","abort","error"].each(function(e){var f="on"+e,g=b[f];delete b[f];c[f]=function(){if(c){if(!d.parentNode){d.width=c.width;d.height=c.height}c=c.onload=c.onabort=c.onerror=null;g.delay(1,d,d);d.fireEvent(e,d,1)}}});c.src=d.src=a;c&&c.complete&&c.onload.delay(1);
return d.setProperties(b)},images:function(a,b){b=$merge({onComplete:$empty,onProgress:$empty},b);a.push||(a=[a]);var c=[],d=0;a.each(function(e){var f=new Asset.image(e,{onload:function(){b.onProgress.call(this,d,a.indexOf(e));d++;d==a.length&&b.onComplete()}});c.push(f)});return new Elements(c)}}),multiBox=new Class({getOptions:function(){return{initialWidth:250,initialHeight:250,container:document.body,overlay:false,contentColor:"#FFF",showNumbers:true,showControls:true,descClassName:false,descMinWidth:400,
descMaxWidth:600,movieWidth:400,movieHeight:300,offset:{x:0,y:0},fixedTop:false,path:"files/",_onOpen:$empty,_onClose:$empty,openFromLink:true}},initialize:function(a,b){this.setOptions(this.getOptions(),b);this.openClosePos={};this.timer=0;this.contentToLoad={};this.index=0;this.opened=false;this.contentObj={};this.containerDefaults={};this.createArray=[];if(this.options.useOverlay)this.overlay=new Overlay({container:this.options.container,onClick:this.close.bind(this)});(this.overlay=this.options.overlay)&&
this.overlay.setOnClick(this.close.bind(this));this.content=$$("."+a);if(this.options.descClassName){this.descriptions=$$("."+this.options.descClassName);this.descriptions.each(function(c){c.setStyle("display","none")})}this.container=(new Element("div")).addClass("MultiBoxContainer").injectInside(this.options.container);this.iframe=(new Element("iframe")).setProperties({id:"multiBoxIframe",name:"mulitBoxIframe",src:"javascript:void(0);",frameborder:0,scrolling:"no"}).setStyles({position:"absolute",
top:-20,left:-20,filter:"progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)",opacity:0}).inject(this.container);this.box=(new Element("div")).addClass("MultiBoxContent").inject(this.container);this.closeButton=(new Element("div")).addClass("MultiBoxClose").inject(this.container).addEvent("click",this.close.bind(this));this.closeButton.setAttribute("onclick","fadeAway()");this.controlsContainer=(new Element("div")).addClass("MultiBoxControlsContainer").inject(this.container);this.controls=
(new Element("div")).addClass("MultiBoxControls").inject(this.controlsContainer);this.previousButton=(new Element("div")).addClass("MultiBoxPrevious").inject(this.controls).addEvent("click",this.previous.bind(this));this.nextButton=(new Element("div")).addClass("MultiBoxNext").inject(this.controls).addEvent("click",this.next.bind(this));this.title=(new Element("div")).addClass("MultiBoxTitle").inject(this.controls);this.titleMargin=this.title.getStyle("margin-left");this.number=(new Element("div")).addClass("MultiBoxNumber").inject(this.controls);
this.description=(new Element("div")).addClass("MultiBoxDescription").inject(this.controls);if(this.content.length==1){this.title.setStyles({"margin-left":0});this.description.setStyles({"margin-left":0});this.previousButton.setStyle("display","none");this.nextButton.setStyle("display","none");this.number.setStyle("display","none")}(new Element("div")).setStyle("clear","both").inject(this.controls);this.content.each(function(c,d){c.index=d;c.addEvent("click",function(e){(new Event(e)).stop();this.open(c)}.bind(this));
if(c.href.indexOf("#")>-1){c.content=$(c.href.substr(c.href.indexOf("#")+1));c.content&&c.content.setStyle("display","none")}},this);this.containerEffects=new Fx.Morph(this.container,{duration:400,transition:Fx.Transitions.Sine.easeInOut});this.iframeEffects=new Fx.Morph(this.iframe,{duration:400,transition:Fx.Transitions.Sine.easeInOut});this.controlEffects=new Fx.Morph(this.controlsContainer,{duration:300,transition:Fx.Transitions.Sine.easeInOut});this.reset()},setContentType:function(a){var b=
a.href.substr(a.href.lastIndexOf(".")+1).toLowerCase(),c={};$chk(a.rel)&&a.rel.split(",").each(function(d){d=d.split(":");c[d[0]]=d[1]});if(c.type!=undefined)b=c.type;this.contentObj={};this.contentObj.url=a.href;this.contentObj.src=a.href;this.contentObj.xH=0;this.contentObj.width=c.width?c.width:this.options.movieWidth;this.contentObj.height=c.height?c.height:this.options.movieHeight;this.panelPosition=c.panel?c.panel:this.options.panel;switch(b){case "jpg":case "image":case "gif":case "png":this.type=
"image";break;case "swf":this.type="flash";break;case "youtube":this.type="youtube";break;case "flv":this.type="flashVideo";this.contentObj.xH=70;break;case "mov":this.type="quicktime";break;case "wmv":this.type="windowsMedia";break;case "rv":case "rm":case "rmvb":this.type="real";break;case "mp3":this.type="flashMp3";this.contentObj.width=320;this.contentObj.height=70;break;case "element":this.type="htmlelement";this.elementContent=a.content;this.elementContent.setStyles({display:"block",opacity:0});
if(this.elementContent.getStyle("width")!="auto")this.contentObj.width=this.elementContent.getStyle("width");this.contentObj.height=this.elementContent.getSize().y;this.elementContent.setStyles({display:"none",opacity:1});break;default:this.type="iframe";if(c.ajax)this.type="ajax";break}},reset:function(){this.container.setStyles({opacity:0,display:"none"});this.controlsContainer.setStyles({height:0});this.removeContent();this.previousButton.removeClass("MultiBoxButtonDisabled");this.nextButton.removeClass("MultiBoxButtonDisabled");
this.opened=false},getOpenClosePos:function(a){if(this.options.openFromLink)if(a.getFirst()){var b=a.getFirst().getCoordinates().width-this.container.getStyle("border").toInt()*2;if(b<0)b=0;var c=a.getFirst().getCoordinates().height-this.container.getStyle("border").toInt()*2;if(c<0)c=0;this.openClosePos={width:b,height:c,top:a.getFirst().getCoordinates().top,left:a.getFirst().getCoordinates().left}}else{b=a.getCoordinates().width-this.container.getStyle("border").toInt()*2;if(b<0)b=0;c=a.getCoordinates().height-
this.container.getStyle("border").toInt()*2;if(c<0)c=0;this.openClosePos={width:b,height:c,top:a.getCoordinates().top,left:a.getCoordinates().left}}else{a=this.container.getStyle("border").toInt();this.openClosePos={width:this.options.initialWidth,height:this.options.initialHeight,top:this.options.fixedTop?this.options.fixedTop:window.getHeight()/2-this.options.initialHeight/2-a+this.options.offset.y,left:window.getWidth()/2-this.options.initialWidth/2-a+this.options.offset.x}}return this.openClosePos},
open:function(a){this.options._onOpen();this.index=this.content.indexOf(a);this.openId=a.getProperty("id");var b=this.container.getStyle("border").toInt();if(this.opened){this.options.showControls&&this.hideControls();this.getOpenClosePos(this.content[this.index]);this.timer=this.hideContent.bind(this).delay(500);this.timer=this.load.pass(this.index,this).delay(1100)}else{this.opened=true;this.options.overlay&&this.overlay.show();this.container.setStyles(this.getOpenClosePos(a));this.container.setStyles({opacity:0,
display:"block"});this.containerEffects.start({width:this.options.initialWidth,height:this.options.initialHeight,top:this.options.fixedTop?this.options.fixedTop:window.getHeight()/2-this.options.initialHeight/2-b+this.options.offset.y,left:window.getWidth()/2-this.options.initialWidth/2-b+this.options.offset.x,opacity:[0,1]});this.load(this.index)}},create:function(a){if(this.createArray.contains(a.url))var b=this.content[this.createArray.indexOf(a.url)];else{var c="mbDirect_"+$time();b=[];a.type&&
b.push("type:"+a.type);a.width&&b.push("width:"+a.width);a.height&&b.push("height:"+a.height);b=new Element("a",{href:a.url,id:c,title:a.title||"",rel:b.join(",")});c=new Element("div",{"class":c,html:a.description||""});this.createArray.push(a.url);this.content.push(b);this.options.descClassName&&this.descriptions.include(c)}this.open(b)},getContent:function(a){this.setContentType(this.content[a]);var b=false;this.options.descClassName&&this.descriptions.each(function(c){if(c.hasClass(this.openId))b=
c.clone()},this);this.contentToLoad={title:this.content[a].title||"&nbsp;",desc:b,number:a+1}},close:function(){this.options.overlay&&this.overlay.hide();this.options.showControls&&this.hideControls();this.hideContent();this.containerEffects.cancel();this.zoomOut.bind(this).delay(500);this.options._onClose()},zoomOut:function(){this.iframeEffects.start({width:this.openClosePos.width,height:this.openClosePos.height});this.containerEffects.start({width:this.openClosePos.width,height:this.openClosePos.height,
top:this.openClosePos.top,left:this.openClosePos.left,opacity:0});this.reset.bind(this).delay(500)},load:function(a){this.box.addClass("MultiBoxLoading");this.getContent(a);if(this.type=="image"){var b=this.contentObj.xH;this.contentObj=new Asset.image(this.content[a].href,{onload:this.resize.bind(this)});this.contentObj.xH=b}else this.resize()},resize:function(){if(this.tempSRC!=this.contentObj.src){var a=this.container.getStyle("border").toInt(),b=this.options.fixedTop?this.options.fixedTop:window.getHeight()/
2-(Number(this.contentObj.height)+this.contentObj.xH)/2-a+window.getScrollTop()+this.options.offset.y,c=window.getWidth()/2-this.contentObj.width.toInt()/2-a+this.options.offset.x;if(b<0)b=0;if(c<0)c=0;this.containerEffects.cancel();this.containerEffects.start({width:this.contentObj.width,height:Number(this.contentObj.height)+this.contentObj.xH,top:b,left:c,opacity:1});this.iframeEffects.start({width:Number(this.contentObj.width)+a*2,height:Number(this.contentObj.height)+this.contentObj.xH+a*2});
this.timer=this.showContent.bind(this).delay(500);this.tempSRC=this.contentObj.src}},showContent:function(){this.tempSRC="";this.box.removeClass("MultiBoxLoading");this.removeContent();this.contentContainer=(new Element("div")).setProperties({id:"MultiBoxContentContainer"}).setStyles({opacity:0,width:this.contentObj.width,height:Number(this.contentObj.height)+this.contentObj.xH}).injectInside(this.box);if(this.type=="image")this.contentObj.injectInside(this.contentContainer);else if(this.type=="iframe")(new Element("iframe")).setProperties({id:"iFrame"+
(new Date).getTime(),width:this.contentObj.width,height:this.contentObj.height,src:this.contentObj.url,frameborder:0,scrolling:"auto"}).injectInside(this.contentContainer);else if(this.type=="htmlelement")this.elementContent.clone().setStyle("display","block").injectInside(this.contentContainer);else if(this.type=="ajax")(new Request.HTML({update:$("MultiBoxContentContainer"),autoCancel:true})).get(this.contentObj.url);else{this.createEmbedObject().injectInside(this.contentContainer);if(this.str!=
"")$("MultiBoxMediaObject").innerHTML=this.str}this.contentEffects=new Fx.Morph(this.contentContainer,{duration:500,transition:Fx.Transitions.linear});this.contentEffects.start({opacity:1});this.title.set("html",this.contentToLoad.title);this.content.length>1?this.number.set("html",this.contentToLoad.number+" of "+this.content.length):this.number.set("html","");if(this.options.descClassName){this.description.getFirst()&&this.description.getFirst().destroy();this.contentToLoad.desc&&this.contentToLoad.desc.inject(this.description).setStyles({display:"block"})}if(this.options.showControls)if(this.contentToLoad.title!=
"&nbsp;"||this.content.length>1)this.timer=this.showControls.bind(this).delay(800)},hideContent:function(){this.box.addClass("MultiBoxLoading");this.contentEffects.start({opacity:0});this.removeContent.bind(this).delay(500)},removeContent:function(){if($("MultiBoxMediaObject")){$("MultiBoxMediaObject").empty();$("MultiBoxMediaObject").destroy()}$("MultiBoxContentContainer")&&$("MultiBoxContentContainer").destroy()},showControls:function(){this.clicked=false;if(this.container.getStyle("height")!="auto"){this.containerDefaults.height=
this.container.getStyle("height");this.containerDefaults.backgroundColor=this.options.contentColor}this.container.setStyles({height:"auto"});if(this.content.length>1){this.previousButton.setStyle("visibility","visible");this.nextButton.setStyle("visibility","visible");this.title.setStyle("margin-left",this.titleMargin);this.contentToLoad.number==1?this.previousButton.addClass("MultiBoxPreviousDisabled"):this.previousButton.removeClass("MultiBoxPreviousDisabled");this.contentToLoad.number==this.content.length?
this.nextButton.addClass("MultiBoxNextDisabled"):this.nextButton.removeClass("MultiBoxNextDisabled")}else{this.previousButton.setStyle("visibility","hidden");this.nextButton.setStyle("visibility","hidden");this.title.setStyle("margin-left",0)}this.controlEffects.start({height:this.controls.getCoordinates().height});this.iframeEffects.start({height:this.iframe.getStyle("height").toInt()+this.controls.getStyle("height").toInt()});this.options.overlay&&this.options.overlay.position()},hideControls:function(){this.iframeEffects.start({height:this.iframe.getStyle("height").toInt()-
this.controls.getStyle("height").toInt()});this.controlEffects.start({height:0}).chain(function(){this.container.setStyles(this.containerDefaults)}.bind(this))},showThumbnails:function(){},next:function(){if(this.index<this.content.length-1){this.index++;this.openId=this.content[this.index].getProperty("id");this.options.showControls&&this.hideControls();this.getOpenClosePos(this.content[this.index]);this.timer=this.hideContent.bind(this).delay(500);this.timer=this.load.pass(this.index,this).delay(1100)}},
previous:function(){if(this.index>0){this.index--;this.openId=this.content[this.index].getProperty("id");this.options.showControls&&this.hideControls();this.getOpenClosePos(this.content[this.index]);this.timer=this.hideContent.bind(this).delay(500);this.timer=this.load.pass(this.index,this).delay(1E3)}},createEmbedObject:function(){if(this.type=="flash"){var a=this.contentObj.url,b=(new Element("div")).setProperties({id:"MultiBoxMediaObject"});this.str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" ';
this.str+='width="'+this.contentObj.width+'" ';this.str+='height="'+this.contentObj.height+'" ';this.str+='title="MultiBoxMedia">';this.str+='<param name="movie" value="'+a+'" />';this.str+='<param name="quality" value="high" />';this.str+='<embed src="'+a+'" ';this.str+='quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ';this.str+='width="'+this.contentObj.width+'" ';this.str+='height="'+this.contentObj.height+
'"></embed>';this.str+="</object>"}if(this.type=="youtube"){a=this.contentObj.url;b=(new Element("div")).setProperties({id:"MultiBoxMediaObject"});this.str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" ';this.str+='width="'+this.contentObj.width+'" ';this.str+='height="'+this.contentObj.height+'" ';this.str+='title="MultiBoxMedia">';this.str+='<param name="movie" value="'+a+'" />';this.str+=
'<param name="quality" value="high" />';this.str+='<param name="allowFullScreen" value="true"></param>';this.str+='<embed src="'+a+'" ';this.str+='quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ';this.str+='allowfullscreen="true" ';this.str+='width="'+this.contentObj.width+'" ';this.str+='height="'+this.contentObj.height+'"></embed>';this.str+="</object>"}if(this.type=="flashVideo"){a=this.contentObj.url;
b=(new Element("div")).setProperties({id:"MultiBoxMediaObject"});this.str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" ';this.str+='width="'+this.contentObj.width+'" ';this.str+='height="'+(Number(this.contentObj.height)+this.contentObj.xH)+'" ';this.str+='title="MultiBoxMedia">';this.str+='<param name="movie" value="'+this.options.path+'flvplayer.swf" />';this.str+='<param name="quality" value="high" />';
this.str+='<param name="salign" value="TL" />';this.str+='<param name="scale" value="noScale" />';this.str+='<param name="FlashVars" value="path='+a+'" />';this.str+='<embed src="'+this.options.path+'flvplayer.swf" ';this.str+='quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ';this.str+='width="'+this.contentObj.width+'" ';this.str+='height="'+(Number(this.contentObj.height)+this.contentObj.xH)+'"';
this.str+='salign="TL" ';this.str+='scale="noScale" ';this.str+='FlashVars="path='+a+'"';this.str+="></embed>";this.str+="</object>"}if(this.type=="flashMp3"){a=this.contentObj.url;b=(new Element("div")).setProperties({id:"MultiBoxMediaObject"});this.str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" ';this.str+='width="'+this.contentObj.width+'" ';this.str+='height="'+this.contentObj.height+
'" ';this.str+='title="MultiBoxMedia">';this.str+='<param name="movie" value="'+this.options.path+'mp3player.swf" />';this.str+='<param name="quality" value="high" />';this.str+='<param name="salign" value="TL" />';this.str+='<param name="scale" value="noScale" />';this.str+='<param name="FlashVars" value="path='+a+'" />';this.str+='<embed src="'+this.options.path+'mp3player.swf" ';this.str+='quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ';
this.str+='width="'+this.contentObj.width+'" ';this.str+='height="'+this.contentObj.height+'"';this.str+='salign="TL" ';this.str+='scale="noScale" ';this.str+='FlashVars="path='+a+'"';this.str+="></embed>";this.str+="</object>"}if(this.type=="quicktime"){b=(new Element("div")).setProperties({id:"MultiBoxMediaObject"});this.str='<object  type="video/quicktime" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab"';this.str+=' width="'+this.contentObj.width+
'" height="'+this.contentObj.height+'">';this.str+='<param name="src" value="'+this.contentObj.url+'" />';this.str+='<param name="autoplay" value="true" />';this.str+='<param name="controller" value="true" />';this.str+='<param name="enablejavascript" value="true" />';this.str+='<embed src="'+this.contentObj.url+'" autoplay="true" pluginspage="http://www.apple.com/quicktime/download/" width="'+this.contentObj.width+'" height="'+this.contentObj.height+'"></embed>';this.str+="<object/>"}if(this.type==
"windowsMedia"){b=(new Element("div")).setProperties({id:"MultiBoxMediaObject"});this.str='<object  type="application/x-oleobject" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"';this.str+=' width="'+this.contentObj.width+'" height="'+this.contentObj.height+'">';this.str+='<param name="filename" value="'+this.contentObj.url+'" />';this.str+='<param name="Showcontrols" value="true" />';this.str+=
'<param name="autoStart" value="true" />';this.str+='<embed type="application/x-mplayer2" src="'+this.contentObj.url+'" Showcontrols="true" autoStart="true" width="'+this.contentObj.width+'" height="'+this.contentObj.height+'"></embed>';this.str+="<object/>"}if(this.type=="real"){b=(new Element("div")).setProperties({id:"MultiBoxMediaObject"});this.str='<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"';this.str+=' width="'+this.contentObj.width+'" height="'+this.contentObj.height+'">';
this.str+='<param name="src" value="'+this.contentObj.url+'" />';this.str+='<param name="controls" value="ImageWindow" />';this.str+='<param name="autostart" value="true" />';this.str+='<embed src="'+this.contentObj.url+'" controls="ImageWindow" autostart="true" width="'+this.contentObj.width+'" height="'+this.contentObj.height+'"></embed>';this.str+="<object/>"}return b}});multiBox.implement(new Options);multiBox.implement(new Events);