var s = {
	
	start: function() {
		s.setFont();
	},

	
	setFont: function() {
		if( Cookie.get( 'baggagefont' ) )
			$( 'wrapper' ).setStyle( 'font-size', Cookie.get( 'baggagefont' ) + 'px' );
	},
	
	textTo: function( size ) {
		
		$( 'wrapper' ).effect( 'font-size', { duration: 500, transition: Fx.Transitions.Back.easeOut } ).start( size );
		
		Cookie.remove( 'baggagefont' );
		Cookie.set( 'baggagefont', size, { path: '/', duration: 28 } );
	}
		
}

window.addEvent( 'domready', s.start );


window.addEvent('domready', function(){
	var list = $$('#idList li.yo');
	list.each(function(element) {
		element.addEvent('mouseenter', function(){
			element.className = 'hover';
		
		});
		element.addEvent('mouseleave', function(){
			element.className = '';
		
		});
	});
	
	var slist = $$('#snav li');
	slist.each(function(element) {
	
		element.addEvent('mouseenter', function(){
			slist.each( function(element) { element.className = ''; } );
			element.className = 'hover';
		});
	
		element.addEvent('mouseleave', function() { element.className= ''; } );
	});
	
	
	/*****************
		Main Top navigation with on hover boxes
	*****************/
	var sfEls = $("nav").getElementsByTagName("li");
        nodes = $A(sfEls);   
        
        nodes.each(function(node){
            node.onmouseover = function() 
            { 
            	this.className+= " sfhover";
            };
            node.onmouseout = function() { 
            {
            	this.className = this.className.replace(new RegExp("sfhover+"), ""); };
            }
	});

}); 