$(document).ready(function() {
    
    $('a.fancybox').fancybox(
    );
    
    $('#theme').cycle({ slideExpr: 'span.slideshowimage' });

    // Suchfeld leeren
    $('#search-input').focus(function () {
        $(this).attr('value','');
    });

    function center(toCenterParent,toCenterChild) {
        $(toCenterParent).each(function(){
            span = $(this).find(toCenterChild);
            height = span.height();
            margin = '-' + Math.round(height/2) + 'px';
            var cssProp = {
                position: 'relative',
                top: '50%',
                marginTop: margin,
                display: 'block'
            };
            span.css(cssProp);
        });
    }
    center('.companies-row li','span');
    
    $('.tx-billitonemployeesearch-pi5 > ul').tabs();
    
        
});

