/***************************************************************************************************
                Projekt:	Kaiser Otto
                Erstellt:	10.01.2009

                Aufgabe dieser Datei
                x
                
                wichtige Informationen
                x

                Änderungen
                x
                
/**************************************************************************************************/

	/****************/
	/** Core Effects
	/****************/

	/**
	 * Funktion opacityObject		 
	 * 
	 * This effect changes an elements opacity (transparency).
	 */
	function opacityObject(object,opFrom,opTo){
		new Effect.Opacity(object, { from: opFrom, to: opTo, duration: 0.5 });
	}

	/**
	 * Funktion moveObject		 
	 * 
	 * This effect moves an element by modifying its position attributes.
	 * 
	 * This will move the object to the top left corner of the window (x=0; y=0): 
	 * moveObject(object,0,0,'absolute');
	 *
	 * This will move the object 30px up and 20px to the right relative to its current position: 
	 * moveObject(object,20,-30,'relative');
	 */
	function moveObject(object,xKoord,yKoord,art){
		new Effect.Move(object, { x: xKoord, y: yKoord, mode: art });
	}

	/**
	 * Funktion morphObject		 
	 * 
	 * This effect changes the CSS properties of an element
	 */
	function morphObject(object,cssSyntax){
		$(object).morph(cssSyntax);
	}
	
	/**
	 * Funktion highlightObject		 
	 * 
	 * This effect flashes a color as the background 
	 * of an element. It is mostly used to draw attention 
	 * to a part of the page that has been updated via 
	 * JavaScript or AJAX, when the update would not otherwise be obvious
	 *
	 * examplecolor: #ffffff
	 */
	function highlightObject(object,getStartColor,getEndColor){
		new Effect.Highlight(object, { startcolor: getStartColor, endcolor: getEndColor });
	}
	
	
	/****************/
	/** Combination Effects
	/****************/
	
	/**
	 * Funktion switchOffObject		 
	 * 
	 * Gives the illusion of a TV-style switch off
	 */
	function switchOffObject(object){
		Effect.SwitchOff(object);
	}

	/**
	 * Funktion squishObject		 
	 * 
	 * Reduce the element to its top-left corner
	 */
	function squishObject(object){
		Effect.Squish(object);
	}

	/**
	 * Funktion slideUpObject		 
	 * 
	 * This effect simulates a window blind, where the contents of the affected elements scroll up accordingly
	 */
	function slideUpObject(object){
		Effect.SlideUp(object, { duration: 3.0 });
	}

	/**
	 * Funktion slideDownObject		 
	 * 
	 * This effect simulates a window blind, where the contents of the affected elements scroll up and down accordingly
	 */
	function slideDownObject(object){
		Effect.SlideDown(object, { duration: 3.0 });
	}

	/**
	 * Funktion shrinkObject		 
	 * 
	 * Shrinks an element into a specific direction, 
	 * hides it when the effect is complete
	 */
	function shrinkObject(object){
		Effect.Shrink(object);
	}

	/**
	 * Funktion shakeObject		 
	 * 
	 * Moves the element slightly to the left, then to the right, repeatedly
	 */
	function shakeObject(object){
		Effect.Shake(object);
	}

	/**
	 * Funktion pulsateObject		 
	 * 
	 * Pulsates the element, loops over five times over fading out and in
	 */
	function pulsateObject(object){
		Effect.Pulsate(object, { pulses: 5, duration: 1.5 });
	}

	/**
	 * Funktion puffObject		 
	 * 
	 * Gives the illusion of the element puffing away (like a in a cloud of smoke)
	 */
	function puffObject(object){
		Effect.Puff(object, { duration: 3.0 });
	}
	
	/**
	 * Funktion growObject		 
	 * 
	 * Grows an element into a specific direction
	 */
	function growObject(object){
		Effect.Grow(object);
	}
	
	/**
	 * Funktion foldObject		 
	 * 
	 * Reduce the element to its top then to left to make it disappear
	 */
	function foldObject(object){
		Effect.Fold(object);
	}
	
	/**
	 * Funktion fadeObject		 
	 * 
	 * Makes an element fade away and takes it out of the 
	 * document flow when the effect is complete by setting 
	 * the CSS display property to none. Opposite of appearObject
	 */
	function fadeObject(object){
		Effect.Fade(object, { duration: 3.0 });
	}

	/**
	 * Funktion dropOutObject		 
	 * 
	 * Makes an element drop and fade out at the same time
	 */
	function dropOutObject(object){
		Effect.DropOut(object);
	}

	/**
	 * Funktion appearObject		 
	 * 
	 * Make an element appear. If the element was previously set 
	 * to display:none inside the style attribute of the element, 
	 * the effect will automatically show the element. This 
	 * means that display must be set within the style attribute 
	 * of an object, and not in the CSS in the head of the document 
	 * or a linked file. In other words, this Effect will not work 
	 * if display:none is set within style tag or linked CSS file
	 */
	function appearObject(object){
		Effect.Appear(object, { duration: 3.0 });
	}

	/**
	 * Funktion blindUpObject		 
	 * 
	 * This effect simulates a window blind, where the contents of 
	 * the affected elements stay in place
	 */
	function blindUpObject(object){
		Effect.BlindUp(object, { duration: 3.0 });
	}
	
	/**
	 * Funktion blindDownObject		 
	 * 
	 * This effect simulates a window blind, where the contents 
	 * of the affected elements stay in place
	 */
	function blindDownObject(object){
		Effect.BlindDown(object, { duration: 3.0 });
	}