window.addEvent('domready', function() { 

/* Main Accordion */
	new Accordion($$('#accordion h3.atStart'), $$('#accordion div.atStart'), {
		opacity: true,
		onActive: function(toggler, element){
			toggler.setStyle('color', '#ff3300');
			toggler.setStyle('font-weight', 'normal');
		},
 
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#ccc');
			toggler.setStyle('font-weight', 'normal');
		}
	}, $('accordion'));
	
/* Menu Accordion */
	new Accordion($$('#menuaccordion h3.atStart'), $$('#menuaccordion div.atStart'), {
		alwaysHide: true,
		show: 0,
		opacity: true,
		onActive: function(toggler, element){
			toggler.setStyle('color', '#ff3300');
			toggler.setStyle('font-weight', 'normal');
		},
 
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#ccc');
			toggler.setStyle('font-weight', 'normal');
		}
	}, $('menuaccordion'));



/* Tips 2 */
	var Tips2 = new Tips($$('.Tips2'), {
		initialize:function(){
			this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: 	false}).set(0);
		},
		onShow: function(toolTip) {
			this.fx.start(1);
		},
		onHide: function(toolTip) {
		this.fx.start(0);
		}
	});


/* Fx.Styles */

	$$('.SideMenuLista dd').each(function(el) {
		el.addEvent('mouseenter',function(){
		myEffect = el.effect('margin-left', {duration: 100,transition: Fx.Transitions.linear, wait: true}).start('0','5');
		})
	
		el.addEvent('mouseleave',function(){
		myEffect = el.effect('margin-left', {duration: 800,transition: Fx.Transitions.Bounce.easeOut, wait: true}).start('6','0');
		})

	})

/*Fade in Images*/

$$('div#accordion img').each(function(e){
  var fade = new Fx.Style(e, 'opacity', {wait:false});
  fade.set(.5);
  e.addEvent('mouseover', function(){
    fade.start(1);
  });
  e.addEvent('mouseout', function(){
    fade.start(.5);
  });
});


$$('div#menuaccordion img').each(function(e){
  var fade = new Fx.Style(e, 'opacity', {wait:false});
  fade.set(.5);
  e.addEvent('mouseover', function(){
    fade.start(1);
  });
  e.addEvent('mouseout', function(){
    fade.start(.5);
  });
});



	$$('div#videoclip img').each(function(e){
		var fade = new Fx.Style(e, 'opacity', {wait:false});
		fade.set(.5);
		e.addEvent('mouseover', function(){
		fade.start(1);
		});
		e.addEvent('mouseout', function(){
		fade.start(.5);
  		});
	});


/*SmoothScroll */

var myScroll = new SmoothScroll();

/*Fancy menu */

new SlideList($E('ul', 'fancymenu'), {transition: Fx.Transitions.backOut, duration: 700});


});  // This ends dom ready

