window.addEvent('domready', function() {

var szNormal = 166, szSmall = 84, szFull = 330;

if ($("galery")!=null)
{
 
var kwicks = $$("#galery .motiv");
var fx = new Fx.Elements(kwicks, {wait: false, duration: 400, transition: Fx.Transitions.Cubic.easeOut});
kwicks.each(function(kwick, i) {
	kwick.addEvent("mouseenter", function(event) {
		var o = {};
		o[i] = {width: [kwick.getStyle("width").toInt(), szFull]}
		kwicks.each(function(other, j) {
			if(i != j) {
				var w = other.getStyle("width").toInt();
				if(w != szSmall) o[j] = {width: [w, szSmall]};
			}
		});
		fx.start(o);
	});
});
 
$("galery").addEvent("mouseleave", function(event) {
	var o = {};
	kwicks.each(function(kwick, i) {
		o[i] = {width: [kwick.getStyle("width").toInt(), szNormal]}
	});
	fx.start(o);
})

/*var fxs = new Fx.Style("vitezepanel", 'opacity', {duration:400}); 
$("viteze").addEvent("mouseenter", function(e) {
	e.stop(); 
	fxs.start(0,0.9);
})	
$("vitezepanel").addEvent("mouseleave", function(e) {
	e.stop(); 
	fxs.start(0.9,0);
});	*/

new marquee({marqueeIn:'poukazky',marqueeMe:'marquee',speed:20});

}

$$("#menu li").addEvents({
		'mouseenter': function(){
				this.addClass('sfhover')
		},
		'mouseleave': function(){
				this.removeClass('sfhover')
		}
	}); 

});
