var isSmall = new Boolean(true);



function growBox(myDur)
	{
		var growDiv = new Fx.Styles($('the_first_div'), {duration: myDur, transition: Fx.Transitions.Quad.easeOut});
		
		
		growDiv.start({
			'width':	[100, 600],
			'height':	[100, 400],
			'background-color': '#FFFFFF'
		});
		
		isSmall = false;
	}
	
function shrinkBox(myDur)
	{
		var growDiv = new Fx.Styles($('the_first_div'),{duration: myDur, transition: Fx.Transitions.Quad.easeOut});
		
		growDiv.start({
			'width':	[600, 100],
			'height':	[400, 100],
			'background-color': '#666666'
		});
		
		isSmall = true;
	}
	
	
function growShrink(myDur)
	{
		if (isSmall)
			{
				growBox(myDur);	
				
			}
		else
			shrinkBox(myDur);
			
	}
	



//:::::::::::::::
// Wait for the DOM to load
//:::::::::::::::

window.addEvent('domready',function(){
									
									
											
											//:::::::::::::::
											// Create an ARRAY of DIV rollover objects
											//:::::::::::::::
											
											var rollItems = $$('div#roll-list div.datarow');
											
											
											//:::::::::::::::
											// Step through the ARRAY and assign each DIV a set of rollover FUNCTIONS
											//:::::::::::::::
											
											rollItems.each(function(element)
																	{
																	
																	
																		var hiliteFx = new Fx.Styles(element, {duration: 250, transition: Fx.Transitions.Quad.easeOut});
																		
																	
																		function hiliteOn()
																			{
																			
																				hiliteFx.start({
																							   
																								'background-color': '#fff',
																								'color': 	'#666',
																								'width':	600
																							   
																							   });
																			
																			}
																			
																				
																		function hiliteOff()
																			{
																			
																				hiliteFx.start({
																							   
																								'background-color': '#666',
																								'color': '#ccc',
																								'width':	450
																							   
																							   });
																			
																			}
																		
																		
																		
																		element.addEvent('mouseenter',hiliteOn);
																		
																		element.addEvent('mouseleave',hiliteOff);
																		
																		
																		
																		
																		//:::::::::::::::
																		// AJAX
																		//:::::::::::::::
																		
																		element.addEvent('click', function(e) {
																				e = new Event(e).stop();
																			 
																				var url = "ajax-retrieved.html";
																				
																			 
																				/**
																				 * The simple way for an Ajax request, use onRequest/onComplete/onFailure
																				 * to do add your own Ajax depended code.
																				 */
																				 
																				 
																				new Ajax(url, {method: 'get', update: $('container')}).request();
																				
																		});
																		
																		
																		
																		
																	
																	});
									
									
											//:::::::::::::::
											// ACCORDION
											//:::::::::::::::
											
											new Accordion($$('div#accordion-parent h1.toggler'), $$('div#accordion-parent div.panel'),{'alwaysHide': true, 'display': 0});
											
											
											//:::::::::::::::
											// TIPS
											//:::::::::::::::
											
											var accTips = new Tips($$('div#accordion-parent h1.toggler'), {
																	  
																	 	 initialize:function(){
																			this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
																		},
																		onShow: function(toolTip) {
																			this.fx.start(1);
																		},
																		onHide: function(toolTip) {
																			this.fx.start(0);
																		}
																	  
																	  });
									});