var Site = {
	start: function(){	
		if ($('tx-bdpsmoothmenu-pi1-container')) Site.parseSmoothmenu();
	},
	
	parseSmoothmenu: function(){
		var kwicks = $$('#tx-bdpsmoothmenu-pi1-container .kwick');
		var fx = new Fx.Elements(kwicks, {wait: false, duration: 400, transition: Fx.Transitions.Quad.easeOut});
		kwicks.each(function(kwick, i){
			kwick.addEvent('mouseenter', function(e){
				var obj = {};
				obj[i] = {
					'width': [kwick.getStyle('width').toInt(), 260]
				};
				kwicks.each(function(other, j){
					if (other != kwick){
						var w = other.getStyle('width').toInt();
						if (w != 105) obj[j] = {'width': [w, 107]};
					}
				});
				fx.start(obj);
			});
		});
		
		$('tx-bdpsmoothmenu-pi1-container').addEvent('mouseleave', function(e){
			var obj = {};
			kwicks.each(function(other, j){
				obj[j] = {'width': [other.getStyle('width').toInt(), 158]};
			});
			fx.start(obj);
		});
	}

};

window.addEvent('load', Site.start);
