/**
 * This file contains javascript needed by the system and modules,
 * and offers general browser fixes.
 * Thus it should never be changed on a project basis
 */

$(document).ready(function(){
	
	/**
	 * form module (handle static non-ajax forms)
	 */
	$('.js_form').each(function(){
		$(this).append(decodeURI('%3Cinput%20type=%22hidden%22%20name=%22ajax%22%20value=%22oke%22%20/%3E'));
		if ($(this).hasClass('js_labelless'))
		{
//			$(this).attr('onsubmit', function(){
//				$(this).find('.js_hint').val('');
//			});
			$(this).submit(function(){
				$(this).find('.js_hint').val('');
			});
		}
	});
	if ($('.js_bedankt').length > 0)
	{
		if ( typeof _gaq == 'object' )
			_gaq.push(['_trackPageview', location.pathname + '-bedankt']);
		else if ( typeof pageTracker == 'object' )
			pageTracker._trackPageview( location.pathname + '-bedankt' );
	}
	
	setTimeout("menuSlideDown('slow');",500);
	setTimeout("$('.slideshow').fadeIn('slow');",1500);
	
	$('.slideshow').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc... 
		speed:  1000,
		cleartype: 0,
		delay:   -2000,
		height: 315,
		width: 990,
		zoom: 1,
		containerResize: 1,
		timeout: 10000
	});

});
	/**
	 * Lavalamp menu
	 */
	 
function menuSlideDown()
{
	$('.lavalamp').slideDown(function(){
		$(function() {
			$("#1").lavaLamp({ 
				speed: 350,
				zoom: 1
			});
		});	
	});
}
//JQuery Slideshow

// fx:      'custom',
//		easing: 'backinout',
 //   	sync: 0,
//		speed:  1500, 
//	    delay:   -2000,
//		timeout: 10000,
//    	cssBefore: {  
//        top:  350, 
//        left: 0, 
//        display: 'block' 
//    }, 
//    animIn:  { 
//        top: 0 
 //   }, 
//    animOut: {  
//        top: 350 
//    }, 
//    delay: -1000

	 
	 

