// Function: Smooth Bg Position Change
function BgTrans(els, bgStart, bgEnd) {

    // default bg position
    els.setStyle('background-position', bgEnd);
 
    // mouseover effects
    els.addEvents({
        'mouseenter': function() {
            this.set('morph', {
                duration: 600,
                transition: Fx.Transitions.Quint.easeOut 
            }).morph({
                 'background-position': bgStart
            });
        },
        'mouseleave': function() {
            this.set('morph', {
                duration: 2000,
                transition: Fx.Transitions.Quint.easeOut 
            }).morph({
                 'background-position': bgEnd
            });
        }
    });
}

window.addEvent('domready', function () {
    // Main Nav
    BgTrans($$('#nav dl dt a.forum-off'), '0 0', '0 -80px');
    BgTrans($$('#nav dl dt a.downloads-off'), '0 0', '0 -80px');
    BgTrans($$('#nav dl dt a.shop-off'), '0 0', '0 -80px');
});

// SUBNAV TOOLTIPS
window.addEvent('domready', function() {	
	//create the tooltips
	var tipz = new Tips('#subnav ul li a',{
		fixed: true,
		hideDelay: 0,
		showDelay: 0
    });
	var tipz2 = new Tips('.sig_preview',{
		fixed: false,
		hideDelay: 0,
		showDelay: 0
    });
});
