/* Minification failed. Returning unminified contents.
(2,9): run-time error CSS1031: Expected selector, found '='
(2,9): run-time error CSS1025: Expected comma or open brace, found '='
(3,10): run-time error CSS1031: Expected selector, found '='
(3,10): run-time error CSS1025: Expected comma or open brace, found '='
(6,1): run-time error CSS1019: Unexpected token, found '$'
(6,2): run-time error CSS1019: Unexpected token, found '('
(6,11): run-time error CSS1031: Expected selector, found ')'
(6,11): run-time error CSS1025: Expected comma or open brace, found ')'
(69,2): run-time error CSS1019: Unexpected token, found ')'
 */

var win = $(window);
var body = $(document.body);


$(document).ready(function (e) {

    $('.kandidaten__listview').click(function (e) {
        var kandidaten = $(this).closest('.kandidaten');
        location.href = '/kandidaten/' + kandidaten.attr('data-eeid') + '/' + kandidaten.attr('data-pdid') + '/' + kandidaten.attr('data-dnr') + '/0';
    });

    $('.kandidaten__thumbview').click(function (e) {
        var kandidaten = $(this).closest('.kandidaten');
        location.href = '/kandidaten/' + kandidaten.attr('data-eeid') + '/' + kandidaten.attr('data-pdid') + '/' + kandidaten.attr('data-dnr') + '/1';
    });

    if ($(document.body).hasClass("body--noimages") && $(document.body).hasClass('body--touch') == false) {
        if (!detect.device.touch && !detect.device.tablet) {
            $('.person').candidatetip({ offsetY: ($('.default').length > 0 ? 2 : 163), offsetX: -2 });
        }
    }


    if ($(window).width() > 680)
    {
        if (!detect.device.touch && !detect.device.tablet) {
            $('.item[title]').tooltipster({
                delay: 0,
                contentAsHTML: true,
                side: 'right'
            });
        }
    }

    if ($(document.body).hasClass('body--withimage')) {
        return;
    }


    $(window).resized(function (e) {

        var districts = $('.district');

        for (var i = 0; i < districts.length; i++) {

            var maxh = 0;
            var hasdiff = false;

            var persons = $(districts[i]).find('.person--type1');

            for (var x = 0; x < persons.length; x++) {

                if ($(persons[x]).outerHeight() > maxh) {
                    maxh = $(persons[x]).outerHeight();
                }

                if (maxh > 0) {
                    hasdiff = true;
                }
            }

            if (hasdiff) {
                persons.css('min-height', maxh);
            }
        }

    }, 500);
});


