/*ROLLS AND PRELOADS*/

window.addEvent("domready", function(){
    /* taken from foobarcms.com */
    /* preload image(s) */
    new Asset.images(['images/ISU_Official_Seal_Black.png', 'images/ISU_Official_Seal_Brown.png', 'images/menudark.png', 'images/menulight.png', 'images/froglab_menu.png', 'images/froglab_weblogo.png']);
    /*
		for multiple images:
		new Asset.images(['/images/image1.png', '/images/image2.jpg']);
	*/
    if($('ISUseal')) {
	/* mouseover */
	$('ISUseal').addEvent('mouseover', function() {
	    $('ISUseal').setProperty('src', 'images/ISU_Official_Seal_Brown.png');
	});
	/* mouseout */
	$('ISUseal').addEvent('mouseout', function() {
	    $('ISUseal').setProperty('src', 'images/ISU_Official_Seal_Black.png');
	});
	/* set style */
	if(window.ie) {
	    $('ISUseal').setStyle('cursor','hand');
	} else {
	    $('ISUseal').setStyle('cursor','pointer');
	};
    };

    /*$$('.menubutton').addEvent('mouseover', function() { this.setProperty('src', 'images/menulight.png'); })
    $$('.menubutton').addEvent('mouseout', function() { this.setProperty('src', 'images/menudark.png'); })*/

});

/*ANIMATED MENU*/
window.onload=function(){
    $$('.animate').each(function(el) { 
	el.addEvent('mouseenter',function(){
	    //el.innerHTML = p;
	    //p = el.innerHTML.UpperCase();
	    myEffect = el.effect('margin-left', {duration: 100,transition: Fx.Transitions.linear, wait: true}).start('10','30');
	})
	
	el.addEvent('mouseleave',function(){
	    //el.innerHTML = p;
	    //el.setStyle('background','url(bg.jpg)');
	    myEffect = el.effect('margin-left', {duration: 800,transition: Fx.Transitions.Bounce.easeOut, wait: true}).start('30','0');
	})
	
    })
    
    myStretch = document.getElementsByClassName('toggler');
    myStretcher = document.getElementsByClassName('accordion');
    
    // setup the accordion elements by clearing display styles	
    myStretcher.each(function(el){
	el.style.display = '';
    });
    
    
    var ac = new Fx.Accordion(myStretch,myStretcher,
			      
			      {
				  onActive: function(tog){
				      tog.setStyle('color', '#ACDA4E');
				      tog.setStyle('cursor', 'help');
				      
				  },
				  onBackground: function(tog){
				      
				      tog.setStyle('color', '#FFF');
				      tog.setStyle('cursor', 'help');
				      
				  },
				  alwaysHide: true,
				  start : 'all-closed',
				  
				  height: true,
				  opacity : true			
			      });
}

st = document.getElementsByClassName('toggler2');
stc = document.getElementsByClassName('accordion2');

// setup the accordion elements by clearing display styles	
stc.each(function(el){
    el.style.display = '';
});

var acc = new Fx.Accordion(st,stc,
			   
			   {
			       onActive: function(tog){
				   tog.setStyle('color', '#ACDA4E');
				   tog.setStyle('cursor', 'help');
				   
			       },
			       onBackground: function(tog){
				   
				   tog.setStyle('color', '#FFF');
				   tog.setStyle('cursor', 'help');
				   
			       },
			       alwaysHide: true,
			       start : 'all-closed',
			       opacity : true			
			   });

/*NIFTYCUBE ROUNDED CORNERS*/

window.addEvent("domready", function(){
    Nifty("#page-content","big");
});






