var descs = {
    one: 'E-Commerce-Lösungen mit Magento',
    two: 'Content Management mit TYPO3 und Textpattern',
    three: 'Individuelle Weblösungen mit Zend Framework und Codeigniter',
    four: 'Applikationen für mobile Endgeräte mit jQuery Mobile Framework' 
};


$(document).ready(function() {

    $('body').clearFields();
    
    $('ul.leistung li').focus(function() {
        var useText = (typeof descs[$(this).attr('id')] != 'undefined') ? descs[$(this).attr('id')] : '';
        $('#description').html(useText).fadeIn(200);
    }).blur(function() {
        $('#description').fadeOut(100);
    });
    
    $('ul.leistung').roundabout({
        minOpacity: 0.1,
        minScale: 0.4,
        duration: 300
    });

    var timer;
    jQuery(function($) {
            timer = setTimeout(DoIt, 8000);
    });

    function DoIt() {
        $('ul.leistung').roundabout_animateToPreviousChild();
        timer = setTimeout(DoIt, 8000);
    }

    $(".open-impressum").fancybox({
		'speedIn'		:	200,
		'speedOut'		:	200,
		'overlayShow'	:	true,
		'titlePosition'		: 'inside',
		'overlayColor'		: '#000',
		'overlayOpacity'	: 0.5,
		'autoDimensions': 	false,
		'width'			:	450,
		'height'		:	350
	});

    $(".open-privacy").fancybox({
		'speedIn'		:	200,
		'speedOut'		:	200,
		'overlayShow'	:	true,
		'titlePosition'		: 'inside',
		'overlayColor'		: '#000',
		'overlayOpacity'	: 0.5,
		'autoDimensions': 	false,
		'width'			:	450,
		'height'		:	560
	});

});
