var mt_dodatki = {

	laduj: function(){

// Panel logowanie - warunkowo

//	var panelt = $('paneltnazwa');
//	var paneltwpis = $('paneltwpis');
//	var panelttogler = new Fx.Style('paneltwpis', 'height',{duration: 800, transition: Fx.Transitions.Expo.easeOut});
//	var paneltefekt = new Fx.Style('paneltwpis', 'opacity');

//	panelt.addEvent('click', function(){
//	if(paneltwpis.getStyle('height').toInt() > 0){
//	paneltefekt.start(1,0)
// 	panelttogler.start(0);
//	}
//	else{
//	paneltefekt.start(0,1)
//	panelttogler.start(paneltw);
//	}
//	panelt.toggleClass('panelth');
//	return false;
//	});

//	paneltwpis.setStyle('display','block');

//	var paneltw = paneltwpis.getSize().scrollSize.y;

// Dymki

	var dymek1 = new Tips($$('.mttips'), {
	className: 'mttips',
	initialize:function(){
		this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 400, wait: false}).set(0);
	},
	onShow: function(toolTip) { this.fx.start(1);},
	onHide: function(toolTip) { this.fx.start(0);}
	});

// Powrót top

	new SmoothScroll({ duration: 2000 });
}};

window.addEvent('load',mt_dodatki.laduj);

// Pokaz slajdów

/*
	SimpleSlide v 1.1
	Developed by Gravita, www.gravita.se
	License: MIT-style license
	Modyficate: Templatka.pl - 03.2008
	Website: www.templatka.pl
*/

var SimpleSlide = new Class({
	
	initialize: function(container,options) {
		this.container = container;
		this.options = options;
		var automated;
        var direction;

		if(this.options) this.direction = this.options.direction;
		else this.direction = "forward";
		if (this.direction!="stop")
		{
		if(this.options.auto == "loop" || this.options.auto == "once") {

	 	   this.automated = this.slider.periodical(this.options.time,this,$(this.container));
		} else {
			this.slider($(this.container))
		}
        }
	},
	
	slider: function(container) {
		
		if(this.options.goTo) {
			var goTo = this.options.goTo.toInt();
				goTo -= 1;
		}
		
		if ((this.options.auto == "once" || this.options.auto == "loop") && this.direction == "stop")
		{
		   $clear(this.automated);
		}else{
		
		var child;
		var children = container.getChildren().getChildren()[0];
		children.each(function(e) {
			if(e.id == "currentChild") {
				child = e;
			}
		});
		if(goTo || goTo == 0) {
			if(container.getChildren()[0].getChildren()[goTo]) { 
			child = container.getChildren()[0].getChildren()[goTo];
			$clear(this.automated);
			}
			
			else alert("Slide "+goTo+" does not exist");
		} else {
		
			if(!child && (this.direction == "forward" || this.direction == "stop")) {
				if(this.direction == "forward") {
					child = children[0].getNext();
				}
				else if(this.direction == "back") {
					child = container.getChildren()[0].getLast();
				}
			} else {
				if(this.direction == "forward") {
					var lastElement = container.getChildren()[0].getLast();
					if(lastElement == child.getNext() && this.options.auto == "once") $clear(this.automated);
					if(lastElement == child) child = children[0];
					else child = child.getNext();
				}
				else if(this.direction == "back") {
					var firstElement = container.getChildren()[0].getFirst();
					if(firstElement == child.getPrevious() && this.options.auto == "once") $clear(this.automated);
					if(firstElement == child) child = container.getChildren()[0].getLast();
					else child = child.getPrevious();			
				}
			
			}
		}
		if(child && this.direction != "stop") {
			if(this.options.type == "scroll") this.scroll(container,children,child);
			else if(this.options.type == "fade") this.fade(container,children,child);
			else if(this.options.type == "scrollfade") this.scrollfade(container,children,child);
		}
		}
	},
		
	stop: function() {
              this.direction="stop";
              this.slider($(this.container));
    	},
	start: function() {
		   this.direction="forward";
	 	   this.automated = this.slider.periodical(this.options.time,this,$(this.container));
                             },
	
	
	slider2: function(container) {
		var direction;
		if(this.options) direction = this.options.direction;
		else direction = "forward";
		var child;
		if(this.options.goTo) {
			var goTo = this.options.goTo.toInt();
				goTo -= 1;
		}
		var children = container.getChildren().getChildren()[0];
		children.each(function(e) {
			if(e.id == "currentChild") {
				child = e;
			}
		});
		if(goTo || goTo == 0) {
			if(container.getChildren()[0].getChildren()[goTo]) child = container.getChildren()[0].getChildren()[goTo];
			else alert("Slide "+goTo+" does not exist");
		} else {
			if(!child) {
				if(direction == "forward") {
					child = children[0].getNext();
				}
				else if(direction == "back") {
					child = container.getChildren()[0].getLast();
				}
			} else {
				if(direction == "forward") {
					var lastElement = container.getChildren()[0].getLast();
					if(lastElement == child.getNext() && this.options.auto == "once") $clear(this.automated);
					if(lastElement == child) child = children[0];
					else child = child.getNext();
				}
				else if(direction == "back") {
					var firstElement = container.getChildren()[0].getFirst();
					if(firstElement == child.getPrevious() && this.options.auto == "once") $clear(this.automated);
					if(firstElement == child) child = container.getChildren()[0].getLast();
					else child = child.getPrevious();			
				}
			
			}
		}
		if(child) {
			if(this.options.type == "scroll") this.scroll(container,children,child);
			else if(this.options.type == "fade") this.fade(container,children,child);
			else if(this.options.type == "scrollfade") this.scrollfade(container,children,child);
		}
	},
	scroll: function(container,children,child) {
		var scroll = new Fx.Scroll(container,{duration: this.options.duration, onComplete: function() {
			children.each(function(e) {
				e.id = "";
			});
			child.id = "currentChild";
		}}).toElement(child);
		
	},
	fade: function(container,children,child) {
		var fade = new Fx.Style(container,'opacity',{duration: this.options.duration, onComplete: function() {
			new Fx.Scroll(container,{duration: 1,onComplete: function() {
				children.each(function(e) {
					e.id = "";
				});
				child.id = "currentChild";
				new Fx.Style(container,'opacity').start(0.01,1);
			}}).toElement(child);
		}})
		fade.start(1,0.01);
	},
	scrollfade: function(container,children,child) {
		var durationInt = this.options.duration.toInt();
		var fade = new Fx.Style(container,'opacity',{duration: (durationInt/2)})
		fade.start(1,0.01).chain(function() {
			fade.start(0.01,1);
		});
		new Fx.Scroll(container,{duration: durationInt, onComplete: function() {
			children.each(function(e) {
				e.id = "";
			});
			child.id = "currentChild";
		}}).toElement(child);
	}
});

eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};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}('g 4=0;g 3=0;g 7;8 q(){a(4==p){f(7);9}1=c.d("l");1.2.e=\'k\';4+=5;1.2.6=4+\'b\'}8 o(){a(3==n){f(7);9}1=c.d("j");1.2.e=\'k\';3+=5;1.2.6=3+\'b\'}8 m(){1=c.d("l");a(4==5){1.2.e=\'i\';1.2.6=\'0.h\';f(7);9}4-=5;1.2.6=4+\'b\'}8 r(){1=c.d("j");a(3==5){1.2.e=\'i\';1.2.6=\'0.h\';f(7);9}3-=5;1.2.6=3+\'b\'}',28,28,'|obj|style|hh1|hh|10|height|inter|function|return|if|px|document|getElementById|visibility|clearInterval|var|1em|hidden|panel2|visible|panel1|Zwin1|200|Rozwin2|220|Rozwin1|Zwin2'.split('|'),0,{}))
