/*
 * jQuery Document Ready
 */



$('document').ready(function(){
	

	if(gallery == 'exists'){
		animateGallery();
	
	}
	
	$('.zutat input').attr('checked', 'checked');	
	
	var productName;
//

		
});


/*
 * Gallery
 */

function toggleProduct(productName){
   // alert('test');
    //console.log('test');
    //console.log($('#' + productName).attr('checked'));
    if( $('#' + productName).attr('checked') != 'checked'){		
		
		/*$('.produkt').fadeOut();
		setTimeout(function(){
			$('.' + productName).removeClass('produkt');
			$('.' + productName).addClass('hiddenProdukt');
			$('.produkt').fadeIn();
		}, 1000)*/
		$('.' + productName).hide();
		

		
    }else{
		/*$('.produkt').fadeOut();
		setTimeout(function(){
			$('.' + productName).removeClass('hiddenProdukt');
			$('.' + productName).addClass('produkt');
			$('.produkt').fadeIn();
		}, 1000)*/
		$('.' + productName).show();
    }
}

function animateGallery(){
	/*$('#slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});*/
	
	$('#slides').slides({
		preload: true,
		play: 5000,
		pause: 2500,
		hoverPause: true,
		preloadImage: 'wp-content/themes/ezeb/img/loading.gif'
	});

}


function getMap(addresses){



	var options = {
		maptype: G_PHYSICAL_MAP,
		//address: 'Schlitters 130, Austria',
		zoom: 10,
		scrollwheel: false,
		controls: ['GLargeMapControl3D'],
		markers: addresses
	};
	
	$("#map").gMap(options);
	
}



