var navArrowSlider = function(navWrap, navElementsArray, activeID, arrowY) {
	var offset = 45;
	var youAreHere = new Fx.Tween($(navWrap), { 
		duration: 1200,
		transition: Fx.Transitions.Bounce.easeOut  
	});

	$$(navElementsArray).each(function(item){  
		item.addEvent('mouseenter', function() { 
			var thisPos = item.getPosition(navWrap).x  + ((item.getSize().x - offset) * .5); //controls hover
			youAreHere.cancel();
			youAreHere.start('background-position', thisPos + 'px ' + arrowY + 'px');
		});
	});
	
	var currentArrow = function() {
		youAreHere.cancel();
		var activePos = $(activeID).getPosition(navWrap).x  + ($(activeID).getSize().x - offset) * .5; //controls set position
		youAreHere.start('background-position', activePos + 'px ' + arrowY + 'px');  
	};
	 
	//correct IE rendering problem (without this, it wont go to the active nav onload)
	var activePos = $(activeID).getPosition(navWrap).x  + $(activeID).getSize().x - offset;  
	$(navWrap).setStyle('background-position', activePos + 'px ' + arrowY + 'px');
	
	//works to set image to starting position in other browsers
	currentArrow(); 
	
	$(navWrap).addEvent('mouseleave', currentArrow);	
}; 
	
window.addEvent('domready', function() {
	navArrowSlider(
		'nav_wrap', // ID of nav wrap
		'#nav ul li', // Array selector of nav elements 
		'active_nav', // ID of current nav element
		119 //  Background position y of background image
	);
	
	//store titles and text
    $$('.tipz').each(function(element,index) {
        var content = element.get('alt').split('::');
        element.store('tip:title', content[0]);
        element.store('tip:text', content[1]);
    });
     
    //create the tooltips
    var tipz = new Tips('.tipz',{
        className: 'tipz',
        fixed: true,
        hideDelay: 0,
        showDelay: 100,
		offsets: {'x': 50, 'y': 70}
    });
});