window.addEvent('domready',function() {
    new SmoothScroll({ duration: 700 }, window);    //700 milliseconds to get there
    $('logo').addEvents({
        'mouseover': function() {
            $('logo').set('src', 'images/hiHover.gif');
        },
        'mouseout': function() {
            $('logo').set('src', 'images/hi.gif');
        }
    });
	var highlighter = new Highlighter({
		elements: $$('#header h1, #header h2'),
		className: 'tipper',
		autoUnhighlight: false
	});
	if($chk('toolTipBubbles')) {
		$$('#toolTipBubbles dt').each(function(el){
			highlighter.highlight(el.get('text').replace(/_/g,' '));
		})

		$$('.tipper').each(function(el){
			el.set('rel', "{content:'"+	el.get('rel').replace(/ /g,'_')+"'}");
		})

		var ToolTips = new MooTooltips({
			hovered:'.tipper',
			ToolTipClass:'ToolTips',	
			toolTipPosition:1, 			
			sticky:true,				
			fromTop: 5,					
			fromLeft: 0,				
			duration: 300,				
			fadeDistance: 0				
		});
		$(document.body).addEvent('click',function(){
			if($chk($$('.ToolTips'))) {
				$$('.ToolTips').each(function(el){
					ToolTips.hide(el);
				});
			}
		})
	}
});


// window.addEvent('keyup', function(event) {
//     if (event.key == "g") {
//         $('gridHelper').setStyle('display', 'block');
//     }
//     if (event.key == "h") {
//         $('gridHelper').setStyle('display', 'none');
//     }
// });


