/**
 * Basic JS
 *
 * @category   Navigation
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2011-03-09
 */
	
	$(function() {
		// Animate navigation
		$('#navigation ul.level_1 > li:not(.active):not(.trail)')
			.css('background-position', '0px 0px')
			.mouseover(function() { $(this).animate({backgroundPosition: '(0px -55px)'}, {duration: 200}); })
			.mouseout(function() { $(this).animate({backgroundPosition: '(0px 0px)'}, {duration: 200}); })

		// Fancy Box
		$('a[rel="lightbox"]').fancybox({
			'padding' : 0,
			'overlayOpacity' : '0.75',
			'overlayColor' : '#000',
			'titleShow' : false
		});

		$('div.ce_gallery a[rel]').fancybox({
			'padding' : 0,
			'overlayOpacity' : '0.75',
			'overlayColor' : '#000',
			'titleShow' : false
		});

		// Zebra table
		$("table.list tr:nth-child(odd)").addClass("odd");
		
		// ADAC label
		$('#adac-label').delay(2000).animate({ width: '50px' });
		
		$('#adac-label').hover(
			function() {
				$(this).animate({ width: '183px' });
			},

			function() {
				$(this).animate({ width: '50px' });
			}
		);
	});

/**
 * Toggle Box
 *
 * @category   Navigation
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2011-01-05
 */

    var toggleBox = function(id, mode) {
    	mode == 'open' ? $('#' + id).removeClass('invisible') : $('#' + id).addClass('invisible');
    };

