window.addEvent('domready',function() {

// drag the sticker
var myDrag = new Drag.Move('draggable',{ });	

// Snook style menu
	$$('#snookmenu a').each(function(el) {
		if (!el.hasClass('active')) {
			//css
			var reset = false;
			var fx = new Fx.Tween(el,{
				duration: 500,
				link: 'cancel',
				onComplete:function() {
					if(reset) {
						el.setStyle('background-position','0 0');
					}
				}
			});
			//events
			el.setStyle('background-position','0 0').addEvents({
				'mouseenter': function(e) {
					e.stop();
					fx.start('background-position','-150px 0');
					reset = false;
				},
				'mouseleave': function(e) {
					reset = true;
					fx.start('background-position','-300px 0');
				}
			});
		}
	});
	
	// fade to (snook menu)
	$each($$('#snookmenu a'), function(el) {
		if (!el.hasClass('active')) {
			var original = el.getStyle('color');
			var morph = new Fx.Morph(el,{ 'duration':'300', link:'cancel' });
			el.addEvents({
				'mouseenter' : function() { morph.start({ 'color':'#041133' }) },
				'mouseleave' : function() { morph.start({ 'color': original }) }
			});
		}
	});

	// Flip the banners
	$('container').getElements('div.background').fade('hide');
	$('container').getElements('div.content').addEvents({
		'mouseenter': function() {
			this.getPrevious('div.background').set('tween', {property: 'opacity', duration: 200}).tween(1);
		},
		'mouseleave': function() {
			this.getPrevious('div.background').set('tween', {property: 'opacity', duration: 1000}).tween(0);
		}
	});


			var mootips = new Tips($$('.mootips'));
                        var mootips2 = new Tips($$('.mootips2'));
}); 


