window.addEvent('domready', function() {
	
	$$('#menu .mainmenu').each(function(item){ 
     var o = item.id
	 var child=item.getLast();
	  
		var h=child.getStyle('height').toInt()+40;
	   var fx = new Fx.Morph(o,{
				duration: 500,
				transition: Fx.Transitions.Back.ease,
				link: 'cancel'});
	
	  var openTimer
   
	  item.addEvents({ 
          'mouseenter' : function(e){ 
			myTimer = myFunction.delay(400);
          },
		   'mouseleave' : function(e){ 
			myTimer = $clear(myTimer); 
			fx.start({'height':'25px'});
          } 		  
        }); 

     	if(item.hasClass("mainmenuopen")){
			fx.start({'height':h});
		 	item.addEvents({ 
	      	    'mouseenter' : function(e){ 
		 			openTimer = openF.delay(400);
	      	    }	  
	      	 }); 
		}else{	
		 item.addEvents({ 
	          'mouseenter' : function(e){ 
				openTimer = openF.delay(400);
	          },
			   'mouseleave' : function(e){ 
				openTimer = $clear(openTimer); 
				fx.start({'height':'25px'});
	          } 		  
	        }); 
		}


		function openF(){
			fx.start({'height':h});
		}
   }) 






	if($("brand_prod")){
		ptabs = new mootabs('brand_prod', {	width: '100%', height: '', changeTransition: 'none', duration: 1000, mouseOverClass: 'over',	activateOnLoad:	'first', useAjax: false	});
	}
	var id=1
		ReMooz.assign('.remooz', {
		'origin': 'img',
		'shadow': 'onOpenEnd', // fx is faster because shadow appears after resize animation
		'resizeFactor': 0.8, // resize to maximum 80% of screen size
		'cutOut': false, // don't hide the original
		'opacityResize': 0.4, // opaque resize
		'dragging': false, // disable dragging
		'centered': true // resize to center of the screen, not relative to the source element
		});

});


