// Script: my.SmoothBox
// Version: 1.0.1
// Framework: Mootools 1.2 
// Auothr: Michel Frömmgen 

// PARAMETER YOU CAN CHANGE //------------------------------------------------------------------------------

var	selectors 	   = '#flyer',  // you can add CSS-paths, several classes and IDs separated by comma 
	startheight	   = '782',				// start-height for animation
	endheight	   = '782',				// end-height for animation, resize start-height to given value
	startwidth	   = '600',				// start-width for animation
	endwidth	   = '600',				// end-width for animation, resize start-width to given value
	startfontsize  = '13',				// strat-font-size for animation
	endfontsize	   = '13',				// end-font-size for animation, resize strat-font-size to given value
	startopacity   = '0.8',				// start-opacity: (0, 0.1, 0.3,... 0.9 until 1)
	endopacity     = '1',				// step down until 0 for transparents (1, 0.9, 0.8,... 0.1 until 0)
	bgcolor		   = '',			// background-color for given selectors 
	bgimage		   = '' 				// url(images/image.jpg)
	
// START OF PROGRAM - DO NOT TOUCH THE CODE BELLOW //-------------------------------------------------------

window.addEvent('domready', function(){
	
	var list = $$(selectors);
		list.each(function(element) { 

		var fx = new Fx.Morph(element, {duration: 1000, transition: Fx.Transitions.linear});
		
 


		$('closePanel').addEvent('click', function(){
			fx.start({
				'opacity': [endopacity , startopacity],
				'height': [endheight, startheight],
				'width': [endwidth, startwidth],
				'font-size': [endfontsize, startfontsize],	
				'opacity': 0
			});	
		});
 
	});

// Make element draggable //							 
	var draglist = $$('.drag');          	// draglist contains all Class-Name  
 		draglist.each(function(element) { 	// All Class-Names adress by "element"		 

		 element.makeDraggable({
			}); 

	});
}); //end of domready

// END OF PROGRAM // ---------------------------------------------------------------------------------------
