MooTools.More={version:"1.2.2.1"};(function(){var b={wait:function(c){return this.chain(function(){this.callChain.delay($pick(c,500),this);}.bind(this));
	}};Chain.implement(b);if(window.Fx){Fx.implement(b);["Css","Tween","Elements"].each(function(c){if(Fx[c]){Fx[c].implement(b);}});}try{Element.implement({chains:function(c){$splat($pick(c,["tween","morph","reveal"])).each(function(d){d=this.get(d);
	if(!d){return;}d.setOptions({link:"chain"});},this);return this;},pauseFx:function(d,c){this.chains(c).get($pick(c,"tween")).wait(d);return this;}});}catch(a){}})();
	Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(b,a){this.element=this.subject=$(b);this.parent(a);var d=this.cancel.bind(this,false);
	if($type(this.element)!="element"){this.element=$(this.element.getDocument().body);}var c=this.element;if(this.options.wheelStops){this.addEvent("start",function(){c.addEvent("mousewheel",d);
	},true);this.addEvent("complete",function(){c.removeEvent("mousewheel",d);},true);}},set:function(){var a=Array.flatten(arguments);this.element.scrollTo(a[0],a[1]);
	},compute:function(c,b,a){return[0,1].map(function(d){return Fx.compute(c[d],b[d],a);});},start:function(c,h){if(!this.check(c,h)){return this;}var e=this.element.getSize(),f=this.element.getScrollSize();
	var b=this.element.getScroll(),d={x:c,y:h};for(var g in d){var a=f[g]-e[g];if($chk(d[g])){d[g]=($type(d[g])=="number")?d[g].limit(0,a):a;}else{d[g]=b[g];
	}d[g]+=this.options.offset[g];}return this.parent([b.x,b.y],[d.x,d.y]);},toTop:function(){return this.start(false,0);},toLeft:function(){return this.start(0,false);
	},toRight:function(){return this.start("right",false);},toBottom:function(){return this.start(false,"bottom");},toElement:function(b){var a=$(b).getPosition(this.element);
	return this.start(a.x,a.y);}});




window.addEvent('domready',function()
{	$$('a.main-menu-item').each(function(menu_link)
	{	menu_link.set('text','');
		if(menu_link.getNext())
		{	menu_link.getNext().set('morph', {duration: '200'}).setStyle('opacity','0');
		
			menu_link.getParent().addEvent('mouseover',function()
			{	menu_link.getNext().morph({opacity: 1});
			});
			menu_link.getParent().addEvent('mouseout',function()
			{	menu_link.getNext().morph({opacity: 0});
			});
		}
	});

$$('div.gallery-images a img').each(function(img)
	{	//console.log(img.src);
		//$(img).getParent().set('href',img.src.replace('.jpg', 'L.jpg'));
		$(img).getParent().set('class','mb-'+$(img).getParent().getParent().get('id'));
		$(img).getParent().setStyle('background','url("'+img.src.replace('.jpg', 'ov.jpg") no-repeat scroll center top transparent'));	
		//$(img).getParent().set('target','_blank');
	});
	
	var my_overlay = new  overlay();
	new multiBox('mb-packaged', {overlay: my_overlay}); 
	new multiBox('mb-custom', {overlay: my_overlay}); 
	new multiBox('mb-commercial', {overlay: my_overlay}); 

});



