var winscroll;
 window.addEvent('domready', function() {
if($('nav'))
FancyExample = new SlideList($E('ul', 'nav'), {
          transition: Fx.Transitions.backOut, 
          duration: 500, 
          onClick: function(ev, item) { /*ev.stop();document.location.href=item.href;*/ }});
}); /*end dom-ready*/


window.addEvent('load', function () {
slidingtabs = new SlidingTabs('feature_buttons', 'slider_wrap');
			
			// this sets up the previous/next buttons, if you want them
			$('previous').addEvent('click', slidingtabs.previous.bind(slidingtabs));
			$('next').addEvent('click', slidingtabs.next.bind(slidingtabs));
		});

window.addEvent('domready',function() { new SmoothScroll({ duration: 900 }); });

window.addEvent('domready', function(){
			/* Tips 1 */
			var Tips1 = new Tips($$('.Tips1'));
			
			/* Tips 2 */
			var Tips2 = new Tips($$('.feature-tip'), {
				initialize:function(){
					this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 300, wait: false}).set(0);
				},
				onShow: function(toolTip) {
					this.fx.start(1);
				},
				onHide: function(toolTip) {
					this.fx.start(0);
				}
			});
			
			/* Tips 3 */
			var Tips3 = new Tips($$('.Tips3'), {
				showDelay: 400,
				hideDelay: 400,
				fixed: true
			});
			
			/* Tips 4 */
			var Tips4 = new Tips($$('.Tips4'), {
				className: 'custom'
			});
		});
 
// mootools.js line 210 - Back:function(B,A){A=A[0]||1.618;return Math.pow - change 1.618 to lower number to make bounce less

var SlideList = new Class({
initialize: function(menu, options) {
this.setOptions(this.getOptions(), options);
 
this.menu = $(menu), this.current = this.menu.getElement('li.current');
 
this.menu.getElements('li').each(function(item){
item.addEvent('mouseover', function(){ this.moveBg(item); }.bind(this));
item.addEvent('mouseout', function(){ this.moveBg(this.current); }.bind(this));
item.addEvent('click', function(event){ this.clickItem(event, item); }.bind(this));
}.bind(this));
 
this.back = new Element('li').addClass('background').adopt(new Element('div').addClass('left')).injectInside(this.menu);
this.back.fx = this.back.effects(this.options);
if(this.current) this.setCurrent(this.current);
},
  
setCurrent: function(el, effect){
this.back.setStyles({left: (el.offsetLeft)+'px', width: (el.offsetWidth)+'px'});
(effect) ? this.back.effect('opacity').set(0).start(1) : this.back.setOpacity(1);
this.current = el;
},
 
getOptions: function(){
return {
transition: Fx.Transitions.sineInOut,
duration: 500, wait: false,
onClick: Class.empty
};
},
  
clickItem: function(event, item) {
if(!this.current) this.setCurrent(item, true);
this.current = item;
this.options.onClick(new Event(event), item);
},
 
moveBg: function(to) {
if(!this.current) return;
this.back.fx.custom({
left: [this.back.offsetLeft, to.offsetLeft],
width: [this.back.offsetWidth, to.offsetWidth]
});
}
});
  
SlideList.implement(new Options);
