/* reflection.js for mootools v1.2 by Christophe Beyls (http://www.digitalia.be) - MIT-style license */ var Reflection = { add: function(img, options){ img = $(img); if (img.getTag() != 'img') return; options = {arguments: [img, options]}; if (window.ie) options.delay = 50; img.preload = new Image(); img.preload.onload = Reflection.reflect.create(options); img.preload.src = img.src; }, remove: function(img){ img = $(img); if (img.preload) img.preload.onload = null; if ((img.getTag() == 'img') && (img.className == 'reflected')){ img.className = img.parentNode.className; img.style.cssText = img.backupStyle; img.parentNode.replaceWith(img); } }, reflect: function(img, options){ options = $extend({ height: 0.33, opacity: 0.5 }, options || {}); Reflection.remove(img); var canvas, canvasHeight = Math.floor(img.height*options.height); if (window.ie){ canvas = new Element('img', {'src': img.src, 'styles': { 'width': img.width, 'marginBottom': -img.height+canvasHeight, 'filter': 'flipv progid:DXImageTransform.Microsoft.Alpha(opacity='+(options.opacity*100)+', style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy='+(options.height*100)+')' }}); } else { canvas = new Element('canvas', {'styles': {'width': img.width, 'height': canvasHeight}}); if (!canvas.getContext) return; } var div = new Element('div').injectAfter(img).adopt(img, canvas); div.className = img.className; div.style.cssText = img.backupStyle = img.style.cssText; div.removeClass('reflect').setStyles({'width': img.width, 'height': canvasHeight+img.height}); img.style.cssText = 'vertical-align: bottom'; img.className = 'reflected'; if (window.ie) return; var context = canvas.setProperties({'width': img.width, 'height': canvasHeight}).getContext('2d'); context.save(); context.translate(0, img.height-1); context.scale(1, -1); context.drawImage(img, 0, 0, img.width, img.height); context.restore(); context.globalCompositeOperation = 'destination-out'; var gradient = context.createLinearGradient(0, 0, 0, canvasHeight); gradient.addColorStop(0, 'rgba(255, 255, 255, '+(1-options.opacity)+')'); gradient.addColorStop(1, 'rgba(255, 255, 255, 1.0)'); context.fillStyle = gradient; context.rect(0, 0, img.width, canvasHeight); context.fill(); }, addFromClass: function(){ $each(document.getElementsByTagName('img'), function(img){ if ($(img).hasClass('reflect')) Reflection.add(img); }); } }; Element.extend({ addReflection: function(options) { Reflection.add(this, options); return this; }, removeReflection: function(options) { Reflection.remove(this, options); return this; } }); Window.addEvent("domready", Reflection.addFromClass); /* Slimbox v1.4 - The ultimate lightweight Lightbox clone by Christophe Beyls (http://www.digitalia.be) - MIT-style license. Inspired by the original Lightbox v2 by Lokesh Dhakar. */ var Lightbox = { init: function(options){ this.options = $extend({ resizeDuration: 400, resizeTransition: false, // default transition initialWidth: 250, initialHeight: 250, animateCaption: true, showCounter: true }, options || {}); this.anchors = []; $each(document.links, function(el){ if (el.rel && el.rel.test(/^lightbox/i)){ el.onclick = this.click.pass(el, this); this.anchors.push(el); } }, this); this.eventKeyDown = this.keyboardListener.bindAsEventListener(this); this.eventPosition = this.position.bind(this); this.overlay = new Element('div', {'id': 'lbOverlay'}).injectInside(document.body); this.center = new Element('div', {'id': 'lbCenter', 'styles': {'width': this.options.initialWidth, 'height': this.options.initialHeight, 'marginLeft': -(this.options.initialWidth/2), 'display': 'none'}}).injectInside(document.body); this.image = new Element('div', {'id': 'lbImage'}).injectInside(this.center); this.prevLink = new Element('a', {'id': 'lbPrevLink', 'href': '#', 'styles': {'display': 'none'}}).injectInside(this.image); this.nextLink = this.prevLink.clone().setProperty('id', 'lbNextLink').injectInside(this.image); this.prevLink.onclick = this.previous.bind(this); this.nextLink.onclick = this.next.bind(this); this.bottomContainer = new Element('div', {'id': 'lbBottomContainer', 'styles': {'display': 'none'}}).injectInside(document.body); this.bottom = new Element('div', {'id': 'lbBottom'}).injectInside(this.bottomContainer); new Element('a', {'id': 'lbCloseLink', 'href': '#'}).injectInside(this.bottom).onclick = this.overlay.onclick = this.close.bind(this); this.caption = new Element('div', {'id': 'lbCaption'}).injectInside(this.bottom); this.number = new Element('div', {'id': 'lbNumber'}).injectInside(this.bottom); new Element('div', {'styles': {'clear': 'both'}}).injectInside(this.bottom); var nextEffect = this.nextEffect.bind(this); this.fx = { overlay: this.overlay.effect('opacity', {duration: 500}).hide(), resize: this.center.effects($extend({duration: this.options.resizeDuration, onComplete: nextEffect}, this.options.resizeTransition ? {transition: this.options.resizeTransition} : {})), image: this.image.effect('opacity', {duration: 500, onComplete: nextEffect}), bottom: this.bottom.effect('margin-top', {duration: 400, onComplete: nextEffect}) }; this.preloadPrev = new Image(); this.preloadNext = new Image(); }, click: function(link){ if (link.rel.length == 8) return this.show(link.href, link.title); var j, imageNum, images = []; this.anchors.each(function(el){ if (el.rel == link.rel){ for (j = 0; j < images.length; j++) if(images[j][0] == el.href) break; if (j == images.length){ images.push([el.href, el.title]); if (el.href == link.href) imageNum = j; } } }, this); return this.open(images, imageNum); }, show: function(url, title){ return this.open([[url, title]], 0); }, open: function(images, imageNum){ this.images = images; this.position(); this.setup(true); this.top = window.getScrollTop() + (window.getHeight() / 15); this.center.setStyles({top: this.top, display: ''}); this.fx.overlay.start(0.8); return this.changeImage(imageNum); }, position: function(){ this.overlay.setStyles({'top': window.getScrollTop(), 'height': window.getHeight()}); }, setup: function(open){ var elements = $A(document.getElementsByTagName('object')); elements.extend(document.getElementsByTagName(window.ie ? 'select' : 'embed')); elements.each(function(el){ if (open) el.lbBackupStyle = el.style.visibility; el.style.visibility = open ? 'hidden' : el.lbBackupStyle; }); var fn = open ? 'addEvent' : 'removeEvent'; window[fn]('scroll', this.eventPosition)[fn]('resize', this.eventPosition); document[fn]('keydown', this.eventKeyDown); this.step = 0; }, keyboardListener: function(event){ switch (event.keyCode){ case 27: case 88: case 67: this.close(); break; case 37: case 80: this.previous(); break; case 39: case 78: this.next(); } }, previous: function(){ return this.changeImage(this.activeImage-1); }, next: function(){ return this.changeImage(this.activeImage+1); }, changeImage: function(imageNum){ if (this.step || (imageNum < 0) || (imageNum >= this.images.length)) return false; this.step = 1; this.activeImage = imageNum; this.center.style.backgroundColor = ''; this.bottomContainer.style.display = this.prevLink.style.display = this.nextLink.style.display = 'none'; this.fx.image.hide(); this.center.className = 'lbLoading'; this.preload = new Image(); this.preload.onload = this.nextEffect.bind(this); this.preload.src = this.images[imageNum][0]; return false; }, nextEffect: function(){ switch (this.step++){ case 1: this.center.className = ''; this.image.style.backgroundImage = 'url('+this.images[this.activeImage][0]+')'; this.image.style.width = this.bottom.style.width = this.preload.width+'px'; this.image.style.height = this.prevLink.style.height = this.nextLink.style.height = this.preload.height+'px'; this.caption.setHTML(this.images[this.activeImage][1] || ''); this.number.setHTML((!this.options.showCounter || (this.images.length == 1)) ? '' : 'Image '+(this.activeImage+1)+' of '+this.images.length); if (this.activeImage) this.preloadPrev.src = this.images[this.activeImage-1][0]; if (this.activeImage != (this.images.length - 1)) this.preloadNext.src = this.images[this.activeImage+1][0]; if (this.center.clientHeight != this.image.offsetHeight){ this.fx.resize.start({height: this.image.offsetHeight}); break; } this.step++; case 2: if (this.center.clientWidth != this.image.offsetWidth){ this.fx.resize.start({width: this.image.offsetWidth, marginLeft: -this.image.offsetWidth/2}); break; } this.step++; case 3: this.bottomContainer.setStyles({top: this.top + this.center.clientHeight, height: 0, marginLeft: this.center.style.marginLeft, display: ''}); this.fx.image.start(1); break; case 4: this.center.style.backgroundColor = '#000'; if (this.options.animateCaption){ this.fx.bottom.set(-this.bottom.offsetHeight); this.bottomContainer.style.height = ''; this.fx.bottom.start(0); break; } this.bottomContainer.style.height = ''; case 5: if (this.activeImage) this.prevLink.style.display = ''; if (this.activeImage != (this.images.length - 1)) this.nextLink.style.display = ''; this.step = 0; } }, close: function(){ if (this.step < 0) return; this.step = -1; if (this.preload){ this.preload.onload = Class.empty; this.preload = null; } for (var f in this.fx) this.fx[f].stop(); this.center.style.display = this.bottomContainer.style.display = 'none'; this.fx.overlay.chain(this.setup.pass(false, this)).start(0); return false; } }; /* call moved to YtTools.start */ // window.addEvent('domready', Lightbox.init.bind(Lightbox)); /** * @author yootheme.com * @copyright Copyright (C) 2007 YOOtheme Ltd & Co. KG. All rights reserved. */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?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}('3 I={Z:4(c,d,e){3 f=0;3 g=[];3 h=$8(c+" C");$8(c).6(4(a,i){1(!h.V(a)){g.T(a)}});g.6(4(a,i){3 b,5;1(a.w){b=a.w;5=0;5+=a.n("o-F").q();5+=a.n("o-B").q();b-=5;1(d!=p){b-=d}}k{1(a.r.v){b=a.r.v}}f=u.t(f,b)});1(e!=p){f=u.t(f,e)}g.6(4(a,i){1(X.W){a.s("m",f+"l")}k{a.s("R-m",f+"l")}})},Q:4(){$8("P.N").6(4(a,i){3 b=L K("a");3 c=a.7("J").H(/^(\\S+)\\.(G|M|E|O)$/,"$D.$2");b.9("A",c);b.9("z",a.U);1(a.7("j")){b.9("j",y(a.7("j")))}a.x().Y(b);a.10(b)})}};',62,63,'|if||var|function|divPadding|each|getProperty|ES|setProperty||||||||||title|else|px|height|getStyle|padding|undefined|toInt|style|setStyle|max|Math|pixelHeight|offsetHeight|clone|String|rel|href|bottom|div|1_lightbox|jpeg|top|gif|replace|YtBase|src|Element|new|jpg|lightbox|png|img|setupLightbox|min||push|className|test|ie6|window|injectInside|matchDivHeight|replaceWith'.split('|'),0,{}))/** * @author yootheme.com * @copyright Copyright (C) 2007 YOOtheme Ltd & Co. KG. All rights reserved. */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?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}('9 6=3 r({8:1(){C{v:q,o:5.m.k,j:B}},y:1(b,c,d,e){0.n(0.8(),e);0.7=c;0.h=d;$$(b).l(1(a,i){0.4(a,i)}.2(0))},4:1(a,i){9 b=3 5.s(a,0.A);z(!a.x("w")){a.g("u",1(e){b.f(0.7)}.2(0));a.g("t",1(e){b.f(0.h)}.2(0))}}});6.p(3 D);',40,40,'this|function|bind|new|createOver|Fx|YtTabMenu|enter|getOptions|var||||||start|addEvent|leave||wait|expoOut|each|Transitions|setOptions|transition|implement|500|Class|Styles|mouseleave|mouseenter|duration|active|hasClass|initialize|if|options|false|return|Options'.split('|'),0,{}))/** * @author yootheme.com * @copyright Copyright (C) 2007 YOOtheme Ltd & Co. KG. All rights reserved. */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?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}('3 g=5 A({k:2(){M{l:"p"}},w:2(a,b,c){0.L(0.k(),c);0.4=a;0.6=b;H(0.z.l){x"v":0.m();t;p:0.o()}},o:2(){3 b=-1;$e(0.4).9(2(a,i){8(a.f("n")){b=i}}.j(0));3 c=5 7.K(0.4,0.6,{J:b})},m:2(){$e(0.4).9(2(a,i){3 b=a.h("B");3 c=a.h(0.6);3 d=5 7.y(c,{C:7.D.E,F:G});8(!a.f("n")){d.u()}b.I("s",2(){d.r()})}.j(0))}});g.q(5 N);',50,50,'this||function|var|togs|new|elms|Fx|if|each|||||ES|hasClass|YtAccordionMenu|getElement||bind|getOptions|accordion|createSlide|active|createDefault|default|implement|toggle|click|break|hide|slide|initialize|case|Slide|options|Class|span|transition|Transitions|linear|duration|250|switch|addEvent|show|Accordion|setOptions|return|Options'.split('|'),0,{}))/** * @author yootheme.com * @copyright Copyright (C) 2007 YOOtheme Ltd & Co. KG. All rights reserved. */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?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=j.T.M({l:4(){5{Q:L,H:j.D.C}},z:4(a,b,c,d){3.K(3.l(),d);3.7=$(a);3.8=$(b);3.6="k";3.p="r";3.e=c;3.9=[];3.y(3.g)},x:4(a){v b=$E(a);t(3.7&&b){b.R("P",4(){3.m()}.O(3))}},N:4(){J(v i=0;i<2;i++){3.9[i]=3.G(3.I[i],3.F[i])}},f:4(){5[3.7.o("6-k").n(),3.8.o("r").n()]},w:4(){5 3.s(3.f(),[0,3.e])},q:4(){5 3.s(3.f(),[-3.e,0])},m:4(){t(3.8.B==0){5 3.w()}A{5 3.q()}},S:4(){3.7.h("6-"+3.6,3.9[0]+3.g.u);3.8.h(3.p,3.9[1]+3.g.u)}});',57,57,'|||this|function|return|margin|element|wrapper|now|||||offset|vertical|options|setStyle||Fx|top|getOptions|toggle|toInt|getStyle|layout|slideOut|height|start|if|unit|var|slideIn|addTriggerEvent|parent|initialize|else|offsetHeight|linear|Transitions||to|compute|transition|from|for|setOptions|500|extend|setNow|bind|click|duration|addEvent|increase|Base|YtSlidePanel'.split('|'),0,{}))/** * @author yootheme.com * @copyright Copyright (C) 2007 YOOtheme Ltd & Co. KG. All rights reserved. */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?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}('3 r=p J({H:2(){m{t:"j-O",G:10,F:T,C:0.9,1j:1f.1c.1a,16:13,k:J.Y}},X:2(a,b){1.R(1.H(),b);1.B="A-1q",1.z="A-1p",1.s="A-1i",1.D="j-1e";1.N="j-O";1.n="j-1b";1.w=$$(a);1.v=p 15(14.12);1.6("k",1.7.k);1.11="";3 c=$E("#W");3 d=$E("#V");3 e=$E("#U");3 f=$E("#S");3 g=$E("#Z");3 h=$E("#1t");4(c){c.6("8",2(){1.q(1.D)}.5(1))}4(d){d.6("8",2(){1.q(1.N)}.5(1))}4(e){e.6("8",2(){1.q(1.n)}.5(1))}4(f){f.6("8",2(){1.o(1.B)}.5(1))}4(g){g.6("8",2(){1.o(1.z)}.5(1))}4(h){h.6("8",2(){1.o(1.s)}.5(1))}},o:2(b){3 c=[1.B,1.z,1.s];c.y(2(a,i){4(a==b){1.v.1m(b)}1l{1.v.1k(a)}}.5(1));l.M("1h",b,{L:"/"});1.1g("k")},q:2(c){3 d=1.x(l.K("u")||1.7.t);3 e=1.x(c);l.M("u",c,{L:"/"});1.w.y(2(a,i){3 b=a.1d("j",1.7);b.6("I",1.P.5(1)).6("I",1.7.k);b.1n(d,e)}.5(1))},P:2(){3 b=l.K("u")||1.7.t;4(b==1.n){1.w.y(2(a,i){a.1o("j",(1.7.C*19)+"%")}.5(1))}},x:2(a){4(a==1.D){m 1.7.G}4(a==1.n){m 18((17.1r())*1.7.C)}m 1.7.F}});r.Q(p 1s);r.Q(p 1u);',62,93,'|this|function|var|if|bind|addEvent|options|click|||||||||||width|afterSwitch|Cookie|return|widthFluid|fontSwitch|new|widthSwitch|YtStyleSwitcher|fontLarge|widthDefault|ytstylewidth|htmlbody|wrappers|getWidthPx|each|fontMedium|font|fontSmall|widthFluidPx|widthThin||widthWidePx|widthThinPx|getOptions|onComplete|Class|get|path|set|widthWide|wide|widthSwitchComplete|implement|setOptions|switchfontsmall|940|switchwidthfluid|switchwidthwide|switchwidththin|initialize|empty|switchfontmedium|780|widthStyle|body|500|document|Element|duration|Window|parseInt|100|quadOut|fluid|Transitions|effect|thin|Fx|fireEvent|ytstylefont|large|transition|removeClass|else|addClass|start|setStyle|medium|small|getWidth|Events|switchfontlarge|Options'.split('|'),0,{}))/** * YOOtheme Javascript file, spotlight.js * * @author yootheme.com * @copyright Copyright (C) 2007 YOOtheme Ltd. & Co. KG. All rights reserved. */ eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('7 n=9 F({E:6(h,b){4.A({z:y,x:j.B.w,D:G},b);$$(h).r(6(3,i){v((3.f()==\'s\'||3.f()==\'u\')&&3.m(\'g-5\')!=\'t\'){4.k(3,i)}}.a(4))},k:6(3,i){7 5=3.m(\'g-5\').p(/^(\\S+)\\.(q|C|Q|V)/,"$U.$2");7 8=9 W(3.f(),{\'Y\':3.H(\'T\',\'R\')});7 c=9 j.K(8,4.b);8.J({\'I\':\'L\',\'g-5\':5,\'d\':0});8.M(3);3.l(\'P\',6(e){c.o({\'d\':1})}.a(4));3.l(\'O\',6(e){c.o({\'d\':0})}.a(4))}});n.N(9 X);',61,61,'|||el|this|image|function|var|overlay|new|bind|options|fxs|opacity||getTag|background|element||Fx|createOver|addEvent|getStyle|YtSpotlight|start|replace|gif|each|div|none|span|if|quadInOut|transition|600|duration|setOptions|Transitions|jpg|wait|initialize|Class|false|getStyles|display|setStyles|Styles|block|injectInside|implement|mouseleave|mouseenter|jpeg|height||width|1_spotlight|png|Element|Options|styles'.split('|'),0,{})) /** * YtTools * requires mootools version 1.1 * * @author yootheme.com * @copyright Copyright (C) 2007 YOOtheme Ltd & Co. KG. All rights reserved. */ var YtTools = { start: function() { /* Match height of div tags */ YtTools.setDivHeight(); /* Accordion menu */ var accordionFx = new YtAccordionMenu('div#middle ul.menu li.toggler', 'ul.accordion', { accordion: 'slide' }); /* Main menu */ var enterColor = '#bebebe'; var leaveColor = '#e6e6e6'; if (YtSettings.color == 'black') enterColor = '#787878'; if (YtSettings.color == 'black') leaveColor = '#505050'; var enterOptions = { 'background-color': enterColor, 'margin-left': 0 }; var leaveOptions = { 'background-color': leaveColor, 'margin-left': 10 }; if (YtSettings.layout == 'right') { enterOptions = { 'background-color': enterColor, 'margin-right': 0 }; leaveOptions = { 'background-color': leaveColor, 'margin-right': 10 }; } var menuFx = new YtTabMenu('#menu li', { 'margin-top': 0 }, { 'margin-top': 10 }, { transition: Fx.Transitions.expoOut }); var submenuFx = new YtTabMenu('div#middle ul.menu li.level1', enterOptions, leaveOptions, { transition: Fx.Transitions.expoOut }); /* Top panel */ var toppanelFx = new YtSlidePanel($E('#toppanel'), $E('#toppanel-wrapper'), YtSettings.heightToppanel, { transition: Fx.Transitions.expoOut, duration: 500 }); toppanelFx.addTriggerEvent('#toppanel-container .trigger'); toppanelFx.addTriggerEvent('#toppanel .close'); /* Style switcher */ var switcherFx = new YtStyleSwitcher($ES('.wrapper'), { widthDefault: YtSettings.widthDefault, widthThinPx: YtSettings.widthThinPx, widthWidePx: YtSettings.widthWidePx, widthFluidPx: YtSettings.widthFluidPx, afterSwitch: YtTools.setDivHeight, transition: Fx.Transitions.expoOut, duration: 500 }); /* Lightbox */ YtBase.setupLightbox(); Lightbox.init(); /* Spotlight */ var spotlightFx = new YtSpotlight('div.spotlight, span.spotlight'); }, /* Match height of div tags */ setDivHeight: function() { YtBase.matchDivHeight('div.topbox div', 2, 40); YtBase.matchDivHeight('div.bottombox div', 2, 40); YtBase.matchDivHeight('div.maintopbox div', 2); YtBase.matchDivHeight('div.mainbottombox div', 2); YtBase.matchDivHeight('div.contenttopbox div', 2); } }; /* Add functions on window load */ window.addEvent('load', YtTools.start);