/* Copyright (C) 2007 - 2009 YOOtheme GmbH */

//eval(function(p,a,c,k,e,d){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--){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}('3 15={16:6(y,k){3 8=0;$$(y).n(6(4,i){3 7;9(4.K){7=4.K}O 9(4.h.J){7=4.h.J}8=A.8(8,7)});9(k!=14){8=A.8(8,k)}$$(y).n(6(4,i){3 I=4.m(\'E-z\').j()+4.m(\'E-F\').j()+4.m(\'C-z-G\').j()+4.m(\'C-F-G\').j();3 7=8-I;3 h=Y.Z?\'7\':\'k-7\';4.1i(h,7+\'1k\')})}};3 V=c W({X:6(4,B,U,q,L,o){b.l({x:1m,S:r.M.1n,R:Q,p:\'\'},q);3 5=b.5;$$(4).n(6(a,i){3 s=a;9(o){3 t=a.1j(o);9(t.P>0){s=t[0]}}3 f=c r.1b(s,5);9(!($1e(5.p)&&a.1f(5.p))){a.D(\'1h\',6(e){f.l(5,q).w(B)});a.D(\'1g\',6(e){f.l(5,L).w(U)})}})}});V.T(c H);3 N=c W({X:6(5){b.l({S:r.M.1c,x:1d,R:Q,g:[\'#1a\',\'#1l\']},5);3 u=c 17(13.u);3 f=u.11(b.5);3 d=0;3 g=b.5.g;3 10=v.12(b.5.x*2);v();6 v(){f.w({\'19-18\':g[d]});9(d+1>=g.P){d=0}O{d++}}}});N.T(c H);',62,86,'|||var|element|options|function|height|max|if|el|this|new|index||fx|colors|style||toInt|min|setOptions|getStyle|each|elementFx|ignoreClass|enterFx|Fx|elfx|elms|body|animate|start|duration|elements|top|Math|enter|border|addEvent|padding|bottom|width|Options|offset|pixelHeight|offsetHeight|leaveFx|Transitions|YOOBackgroundFx|else|length|false|wait|transition|implement|leave|YOOMorph|Class|initialize|window|ie6|timer|effects|periodical|document|undefined|YOOBase|matchHeight|Element|color|background|FFFFFF|Styles|linear|9000|chk|hasClass|mouseleave|mouseenter|setStyle|getElementsBySelector|px|999999|500|expoOut'.split('|'),0,{}))
var YOOBase = {
	matchHeight: function (elements, min) {
		var max = 0;
		$$(elements).each(function (element, i) {
			var height;
			if (element.offsetHeight) {
				height = element.offsetHeight
			} else if (element.style.pixelHeight) {
				height = element.style.pixelHeight
			}
			max = Math.max(max, height)
		});
		if (min != undefined) {
			max = Math.max(max, min)
		}
		$$(elements).each(function (element, i) {
			var offset = element.getStyle('padding-top').toInt() + element.getStyle('padding-bottom').toInt() + element.getStyle('border-top-width').toInt() + element.getStyle('border-bottom-width').toInt();
			var height = max - offset;
			var style = window.ie6 ? 'height': 'min-height';
			element.setStyle(style, height + 'px')
		})
	}
};
var YOOMorph = new Class({
	initialize: function (element, enter, leave, enterFx, leaveFx, elementFx) {
		this.setOptions({
			duration: 500,
			transition: Fx.Transitions.expoOut,
			wait: false,
			ignoreClass: ''
		},
		enterFx);
		var options = this.options;
		$$(element).each(function (el, i) {
			var elfx = el;
			if (elementFx) {
				var elms = el.getElementsBySelector(elementFx);
				if (elms.length > 0) {
					elfx = elms[0]
				}
			}
			var fx = new Fx.Styles(elfx, options);
			if (! ($chk(options.ignoreClass) && el.hasClass(options.ignoreClass))) {
				el.addEvent('mouseenter', function (e) {
					fx.setOptions(options, enterFx).start(enter)
				});
				el.addEvent('mouseleave', function (e) {
					fx.setOptions(options, leaveFx).start(leave)
				})
			}
		})
	}
});
YOOMorph.implement(new Options);
var YOOBackgroundFx = new Class({
	initialize: function (options) {
		this.setOptions({
			transition: Fx.Transitions.linear,
			duration: 9000,
			wait: false,
			colors: ['#FFFFFF', '#999999']
		},
		options);
		var body = new Element(document.body);
		var fx = body.effects(this.options);
		var index = 0;
		var colors = this.options.colors;
		var timer = animate.periodical(this.options.duration * 2);
		animate();
		function animate() {
			fx.start({
				'background-color': colors[index]
			});
			if (index + 1 >= colors.length) {
				index = 0
			} else {
				index++
			}
		}
	}
});
YOOBackgroundFx.implement(new Options);
