﻿//
//      @filename:       script.js
//      @author:         andreas.klein[at]nexum.de
//      @date:           2012-02-02
//      @version:        1.02a
//
        
        
/*
 * Load SWFObject for embedding Flash and detecting Flash-Player
 * 
 * For embedding Flash, just put the variable "flashAktionsBanner" || "videoStartseite" 
 * into a scriptTag and place it whereever you want to embed the SWF at.
 * 
 * After the ScriptTag you need to append a placeholder for the flashmovie.
 * <div id="flashcontent">Fallback</div>
 * 
 * 
 * 
 * 
 */
$(document).ready(function(){
	$.getScript('/dis/SiteCollectionDocuments/js/swfobject.js', function() {
		var hasFlash = swfobject.hasFlashPlayerVersion('9.0.18');
                var flashContentDiv = 'flashcontent';

		//-- Handle font-replacment 
		hasFlash == true ? null : $("#primaryNav").css("visibility", "visible");

		// If Home -> Embed the Flash File
		if(typeof flashAktionsBanner != 'undefined' && hasFlash)
		{
			var flashvars = {};
                            flashvars.configfile = "adventskalendar.php";
			var params = {};
                            params.wmode = "transparent";
                            params.scale = "noscale";
                            params.allowFullScreen = "true";
                            params.allowScriptAccess = "always";
                            params.base = ".";
			var attributes = {};
                            attributes.id = flashContentDiv;
			swfobject.embedSWF("http://www.dis-adventskalender.de/teaser.swf", "flashcontent", "628", "353", "9.0.0", false, flashvars, params, attributes);
		}
                
                // If Home -> Embed the Flash File
		if(typeof videoStartseite != 'undefined' && hasFlash)
		{
			var flashvars = {};
			    flashvars.xmlFile = "/dis/PublishingImages/Video/ilona-kuehn-dis-ag.xml";
			var params = {};
                            params.wmode = "transparent";
                            params.scale = "noscale";
                            params.allowFullScreen = "true";
                            params.allowScriptAccess = "always";
                            params.base = ".";
			var attributes = {};
                            attributes.id = flashContentDiv;
			swfobject.embedSWF("/dis/PublishingImages/Video/videoplayer.swf", "flashcontent", "628", "353", "9.0.0", false, flashvars, params, attributes);
		}
	});
});



var DIS = {
    init: function(){
        this.adjustIFrameHeights();
        this.replaceMainNavElements();
        this.replaceSearchMenu();
        this.adjustLeftNav();
        this.adjustFooterMenu();
        this.removePageTitle();
        this.applySIFR();
        this.adjustElements();
        this.replaceLinks(".buttonPfeilLinks");
        this.replaceLinks(".buttonPfeilLinksGross");
        this.replaceLinks(".contactMapPart .button");
        this.replaceLinks("#applyDirectly .link");
        this.replaceLinks(".applyDirectlyRed .link");
        this.replaceLinks(".wpBranchLocator .link, .wpBranchLocator .linkClear");
        this.addInputScripts();
        this.addContactFormScript();
        this.addPressFormScript();
        this.addJobGroupsScript();
        this.adjustSiteSearchResults();
        this.applyTipsy();
        this.addFilterBoxScript();
        this.addSubmitHandlers();
        this.addCebitImageSlider();
    },
    

    addCebitImageSlider : function() 
    {
        

	var items = [], current, slideIntv, len;
        $('#cebitImageSlider').find('a').each(function(i, e) 
        {
              items[i] = this;
              $(items[0]).fadeIn(1);
              current = 0;
        });
        len = items.length;
        slideIntv = setInterval(function() 
        {
              $(items[current]).fadeOut(1, function() 
              {
                  current < len-1 ? current++ : current = 0;
                  $(items[current]).fadeIn(1);
              });
        }, 3000);
   },
    replaceMainNavElements: function(){
        var c = this;
        var b = $("#primaryNav");
        var a = $("<div></div>");
        $("li", b).each(function(f, k){
            var h = $("a", k);
            var j = h.text().split(":");
            if (j[0].indexOf("Startseite") < 0 && j[0].indexOf("Presse") < 0 && j[0].indexOf("English") < 0 && j[0].indexOf("DIS-Mitarbeiter") < 0) {
                var l = "primaryNav" + f;
                var d = '<a href="' + h.attr("href") + '" title="' + j[1] + '">';
                var g = $('<div id="' + l + '" class="item' + ($(k).hasClass("selected") ? " selected" : "") + '"><a href="' + h.attr("href") + '" title="' + j[1] + '"><span class="clickfix"></span></a><a class="heading" href="' + h.attr("href") + '" title="' + j[1] + '">' + $.trim(j[0]) + ':</a><span class="name">' + d + $.trim(j[1]) + "</a></span></div>");
                c.disableSelection(g);
                a.append(g);
                $(g).mouseover(function(){
                    $("div.item", b).each(function(m, n){
                        $(n).removeClass("highlight")
                    });
                    $(g).addClass("highlight")
                });
                $(g).mouseout(function(){
                    $("div.item", b).each(function(m, n){
                        $(n).removeClass("highlight")
                    })
                })
            }
        });
        a.append('<div class="clear"></div>');
        b.empty();
        b.append(a)
    },
    replaceSearchMenu: function(){
        var d = this;
        var c = $('<div class="label">Suche:</div>');
        c.click(function(){
            d.toggleSearchBox()
        });
        c.insertBefore($("#genericSearch input"));
        $("#genericSearch input").attr("title", "Bitte Suchbegriff eingeben ...");
        $("#genericSearch .ms-sbgo a").addClass("buttonPfeilLinksRoterHintergrund");
        $("#genericSearch .ms-sbgo img").replaceWith("suchen");
        var b = $('<div class="inner"></div>');
        b.append($(".searchBoxContainer input[type='hidden']"));
        b.append($(".ms-sbtable", $(".N1 .searchBoxContainer")));
        $("#genericSearch").replaceWith(b);
        $(".N1 .searchBoxContainer .ms-sbcell input").after('<div class="clear"></div>');
        $(".N1 .searchBoxContainer").after('<div class="clear"></div>');
        var a = $(".N1 .searchBoxContainer .ms-sbcell input");
        $("a", ".N1 .links").each(function(f, g){
            if ($(g).text() == "Suche") {
                $(g).click(function(){
                    d.toggleSearchBox();
                    return false
                })
            }
        })
    },
    toggleSearchBox: function(){
        var a = $(".N1 .searchBoxContainer");
        var b = 500;
        var c = "swing";
        if (!a.is(":visible")) {
            a.animate({
                width: "261px"
            }, b, c)
        }
        else {
            a.animate({
                width: "1px"
            }, b, c, function(){
                a.hide()
            })
        }
    },
    adjustLeftNav: function(){
        $(".A02 h3").remove();
        this.tagNavItems($(".A02 .content .links"), 0)
    },
    tagNavItems: function(a, d){
        var c = this;
        var b = false;
        $(a).children("li").each(function(f, g){
            $(g).children("a").each(function(h, j){
                $(j).wrap('<div class="leftNav' + d + '"><div class="text"></div></div>')
            });
            $(g).children("ul").each(function(h, e){
                if (c.tagNavItems(e, d + 1)) {
                    $(g).addClass("childSelected")
                }
            });
            if ($(g).hasClass("selected")) {
                b = true
            }
        });
        return b
    },
    adjustFooterMenu: function(){
        $("#footer .left li").each(function(a, c){
            var b = $("a", c);
            b.addClass("buttonPfeilLinksWeisserHintergrund");
            b.attr("title", b.text())
        })
    },
    replaceLinks: function(a){
        $(a).each(function(c, d){
            var b = "div";
            var f = $("<" + b + ' class="linkWrapper"></' + b + ">");
            $(f).append("<" + b + ' class="linkArrow"></' + b + ">");
            $(f).append("<" + b + ' class="linkText"></' + b + ">");
            $(f).append("<" + b + ' class="clear"></' + b + ">");
            $(".linkText", f).append($(d).clone());
            $(f).attr("class", $(d).attr("class"));
            $(f).attr("style", $(d).attr("style"));
            $(f).css("background-image", "none");
            $(d).replaceWith(f)
        })
    },
    addInputScripts: function(){
        this.inputDefaultValue(".N1 .searchBoxContainer input", "Bitte Suchbegriff eingeben ...");
        this.inputDefaultValue("#newsletterContainer .email input", "Ihre E-Mail-Adresse");
        this.inputDefaultValue("#jobSearch input", "Job-Titel oder Stichwort");
        this.inputDefaultValue(".jobSearchLarge input", "Job-Titel oder Stichwort")
    },
    inputDefaultValue: function(a, b){
        $(a).each(function(){
            if (this.type != "text" && this.type != "password" && this.type != "textarea") {
                return
            }
            $(this).val(b);
            var c = this;
            $(this).focus(function(){
                if (this.value == b || this.value == "") {
                    this.value = "";
                    $(this).addClass("userInput")
                }
            });
            $(this).blur(function(){
                if (this.value == b || this.value == "") {
                    this.value = b;
                    $(this).removeClass("userInput")
                }
            });
            $(this).parents("form").each(function(){
                $(this).submit(function(){
                    if (c.value == b) {
                        c.value = ""
                    }
                })
            })
        })
    },
    validateContactFormField: function(a, b){
        var a = $("input[name$=" + a + "]");
        if (a.val() == "") {
            a.addClass("highlight");
            $(b).removeClass("hidden");
            return false
        }
        a.removeClass("highlight");
        $(b).addClass("hidden");
        return true
    },
    validateContactForm: function(){
        var a = true;
        if (!this.validateContactFormField("txtName", ".contactNameError")) {
            a = false
        }
        if (!this.validateContactFormField("txtPhoneOrEmail", ".contactMailError")) {
            a = false
        }
        return a
    },
    validatePressForm: function(){
        var a = true;
        if (!this.validateContactFormField("txtPublisherCompany", ".publisherCompanyError")) {
            a = false
        }
        if (!this.validateContactFormField("txtFirstName", ".firstNameError")) {
            a = false
        }
        if (!this.validateContactFormField("txtLastName", ".lastNameError")) {
            a = false
        }
        if (!this.validateContactFormField("txtEmail", ".emailError")) {
            a = false
        }
        return a
    },
    addContactFormScript: function(){
        if ($("#contactForm").length > 0) {
            var onClickCode = "if(DIS.validateContactForm())" + $("#contactForm .submit").attr("href").replace("javascript:", "");
            $("#contactForm .submit").attr("href", "javascript:" + onClickCode);
            $("#contactForm input").keypress(function(event){
                if (event.which == 13) {
                    eval(onClickCode)
                }
            })
        }
    },
    addPressFormScript: function(){
        if ($("#DivPressDistributionList").length > 0) {
            var onClickCode = "if(DIS.validatePressForm())" + $("#DivPressDistributionList .submit").attr("href").replace("javascript:", "");
            $("#DivPressDistributionList .submit").attr("href", "javascript:" + onClickCode);
            $("#DivPressDistributionList input").keypress(function(event){
                if (event.which == 13) {
                    eval(onClickCode)
                }
            })
        }
    },
    addSubmitHandlers: function(){
        $("#newsletterContainer .email .subscribe").click(function(){
            $(this).parents("form").submit()
        });
        $(".jobGroupsrchResults .searchOptions .submit").click(function(){
            $(this).parents("form").submit()
        });
        $(".jobSearchResults .filterCity .buttonPfeilLinks").click(function(){
            $(this).parents("form").submit()
        });
        $(".jobSearchHome .buttonBlauGrueneSchrift").click(function(){
            $(this).parents("form").submit()
        });
        $(".jobSearchSmall .buttonBlauGrueneSchrift").click(function(){
            $(this).parents("form").submit()
        });
        $(".jobSearchLarge .button").click(function(){
            $(this).parents("form").submit()
        })
    },
    disableSelection: function(a){
        if ($.browser.mozilla) {
            $(a).css("MozUserSelect", "none")
        }
        else {
            if ($.browser.msie) {
                $(a).bind("selectstart", function(){
                    return false
                })
            }
            else {
                $(a).mousedown(function(){
                    return false
                })
            }
        }
    },
    addJobGroupsScript: function(){
        var h = this;
        var c = 100 + 2;
        var d = 3;
        var a = $(".jobGroups");
        var g = $('<div class="wrapper"></div>');
        a.append(g);
        var b = $('<div class="inner"></div>');
        g.append(b);
        $("a", a).each(function(k, m){
            var j = $("img", m);
            var l = $('<div class="item"></div>');
            l.append('<a class="textLink" href="' + $(m).attr("href") + '"> ' + $(j).attr("alt") + "</a>");
            l.append(m);
            b.append(l)
        });
        this.jobsAnimating = false;
        this.leftJobItem = 0;
        this.totalJobItems = $(".item", a).length;
        var b = $(".inner", a);
        var f = $('<a href="#" class="prev"></a>');
        a.append(f);
        f.click(function(j){
            if (!h.jobsAnimating && h.leftJobItem < (h.totalJobItems - d)) {
                h.jobsAnimating = true;
                var i = parseInt($(b).css("left").replace(/px/, ""));
                $(".inner", a).animate({
                    left: (i - c) + "px"
                }, 350, "swing", function(){
                    h.jobsAnimating = false;
                    h.leftJobItem++
                })
            }
            j.preventDefault();
            return false
        });
        var e = $('<a href="#" class="next"></a>');
        a.append(e);
        e.click(function(j){
            if (!h.jobsAnimating && h.leftJobItem > 0) {
                h.jobsAnimating = true;
                var i = parseInt($(b).css("left").replace(/px/, ""));
                $(".inner", a).animate({
                    left: (i + c) + "px"
                }, 350, "swing", function(){
                    h.jobsAnimating = false;
                    h.leftJobItem--
                })
            }
            j.preventDefault();
            return false
        })
    },
    adjustSiteSearchResults: function(){
        $("#SRCHRSSI").replaceWith("");
        var a = $(".searchSite .srch-sort-right").contents().filter(function(){
            return this.nodeType == 3 || this.nodeType == 1
        });
        var b = $('<div class="searchOptions"></div>');
        a.each(function(h, k){
            if (k.nodeType == 3) {
                var l = $.trim(k.nodeValue);
                if (l.length > 0) {
                    $(b).append($('<span class="item">' + l + "</span>"))
                }
            }
            else {
                var j = $('<span class="item"></span>');
                $(j).append(k);
                $(b).append(j)
            }
        });
        $(".searchSite .srch-sort-right").replaceWith(b);
        $(b).parent().append($('<span class="clear"></span>'));
        $(".searchSite .srch-Page").each(function(j, k){
            var h = $('<div class="pageBar"></div>');
            var l = $(k).contents().filter(function(){
                return this.nodeType == 3 || this.nodeType == 1
            });
            $(l).each(function(i, o){
                if (o.nodeType == 1) {
                    var n = $(o).text().replace(/>|</, "");
                    var m = $('<a href="' + $(o).attr("href") + '" title="' + $(o).attr("title") + '"><span class="pageNo' + (o.id == "SRP_Prev" ? " prevPage" : "") + (o.id == "SRP_Next" ? " nextPage" : "") + '"><span class="text">' + n + "</span></span></a>");
                    $(h).append(m)
                }
                else {
                    if (o.nodeType == 3) {
                        var n = $.trim(o.nodeValue);
                        if (n.match(/[\s0-9a-z<>]+/)) {
                            $(h).append($('<span class="pageNo pageNoActive">' + n + "</span>"))
                        }
                    }
                }
            });
            $(h).append($('<span class="clear"></span>'));
            $(h.parent()).append($('<span class="clear"></span>'));
            $(k).replaceWith(h)
        });
        var d = $(".searchSite .srch-results").children();
        var g = $('<div class="srch-results"></div>');
        for (var c = 0; c < d.length; c += 4) {
            var f = $('<div class="row ' + (c / 4 % 2 == 0 ? "even" : "odd") + '"></div>');
            $(g).append($(f));
            var e = $('<div class="srch-Metadata"></div>');
            $(d[c + 3]).contents().each(function(l, m){
                if (m.nodeType == 3) {
                    var h = /([\d]*KB)/gi;
                    var n = /([\d]*\/[\d]*\/[\d]*)/gi;
                    var k = m.data.match(h);
                    var j = m.data.match(n);
                    if (k) {
                        e.append("&nbsp;-&nbsp;" + k[0])
                    }
                    if (j) {
                        e.append("&nbsp;-&nbsp;" + j[0])
                    }
                }
                else {
                    $(e).append(m)
                }
            });
            f.append(d[c]);
            f.append(d[c + 2]);
            f.append(e)
        }
        $(".searchSite .srch-results").replaceWith(g)
    },
    removePageTitle: function(){
        var a = $("#pageTitle");
        if ($.trim(a.text()) == "") {
            a.remove()
        }
    },
    applyTipsy: function(){
        var a = $(".jobSearchResults .searchOptions .filter .remove");
        if (a.length > 0) {
            $(a).tipsy({
                gravity: "s"
            })
        }
        a = $(".jobSearchResults .searchOptions .filter a.disRot");
        if (a.length > 0) {
            $(a).tipsy({
                gravity: "s"
            })
        }
    },
    adjustIFrameHeights: function(){
        $("iframe").each(function(d, f){
            $(f).attr("allowtransparency", "true")
        });
        if (typeof $ == "function" && typeof $.receiveMessage == "function") {
            var a = document.getElementById("jobSearchIFrame");
            if (a) {
                $(a).wrap('<table width="800" height="100%"><tr><td></td></tr></table>');
                $.receiveMessage(function(d){
                    $(a).css("height", d.data + "px")
                });
                a.src = a.src + (a.src.indexOf("?") == -1 ? "?" : "&") + "tick=" + new Date().getTime() + "#" + encodeURIComponent(document.location.href)
            }
        }
        var c = this;
        var b = $("body.jobSearchResultsFrame");
        if (b && b.length > 0) {
            window.setInterval(function(){
                var d = $(".jobSearchResults").height() + 120;
                if (typeof c.iframeHeight == "undefined" || d != c.iframeHeight) {
                    var e = decodeURIComponent(document.location.hash.replace(/^#/, ""));
                    $.postMessage("" + d, e, parent)
                }
                c.iframeHeight = d
            }, $("body").hasClass("ie") ? 1000 : 100)
        }
    },
    addFilterBoxScript: function(){
        $(".jobSearchResults .filterBox").each(function(b, c){
            var a = [];
            $(".filters div", c).each(function(d, f){
                a.push(f)
            });
            $("a[rel='SortCount']", c).click(function(d){
                a.sort(function(f, e){
                    var i = $(".count", f).text();
                    var j = parseInt(i.substr(2, i.length - 3));
                    var g = $(".count", e).text();
                    var h = parseInt(g.substr(2, g.length - 3));
                    return j < h ? -1 : (j > h ? 1 : 0)
                });
                $(".filters div", c).remove("*");
                $(a).each(function(f, g){
                    $(".filters", c).append(g)
                });
                d.preventDefault();
                return 0
            });
            $("a[rel='SortAlpha']", c).click(function(d){
                a.sort(function(f, e){
                    var h = $(".filter", f).text();
                    var g = $(".filter", e).text();
                    return h.localeCompare(g)
                });
                $(".filters div", c).remove("*");
                $(a).each(function(f, g){
                    $(".filters", c).append(g)
                });
                d.preventDefault();
                return 0
            })
        })
    },
    initSIFR: function(){
        if ((typeof window.sIFR != "object") || (typeof window.sIFR.activate != "function")) {
            return
        }
        sIFR.autoInitialize = false;
        sIFR.useStyleCheck = false;
        this.book = {
            src: "/_controltemplates/Cap_DE_Dis/flash/bookosi.swf"
        };
        sIFR.activate(this.book)
    },
    adjustElements: function(){
        $("#teaserBox .teaser").each(function(a, b){
            $("a.buttonPfeilRechtsGelberHintergrund, img", b).wrapAll('<div class="imgAndLink"></div>');
            $(".text", b).wrapInner('<div class="content"></div>');
            $(".text", b).after('<div class="clear"></div>')
        });
        $(".textContainer .bildTextZweispaltig .rechteSeite").each(function(a, b){
            $(b).html('<div class="text">' + $(b).html() + "</div>")
        });
        if ($("#jobSearchFrameLarge").length > 0) {
            $("#content #rightTop").addClass("largePageHeader")
        }
        $("iframe").each(function(a, b){
            $(b).attr("scrolling", "no");
            $(b).attr("frameborder", "no");
            $(b).attr("allowtransparency", "true")
        });
        $("#contentTripletContainer").each(function(a, b){
            if (!$("#contentTripletTop .innerContainer").html() && !$("#contentTripletLeft .innerContainer").html() && !$("#contentTripletMiddle .innerContainer").html() && !$("#contentTripletRight .innerContainer").html()) {
                !$(b).addClass("hidden")
            }
        });
        $("li p").each(function(a, b){
            $(b).replaceWith($(b).contents())
        });
        $(".callToAction").each(function(c, f){
            var d = $('<div class="topRow"></div>');
            $(d).append($("h3", f));
            var a = $('<div class="middleRow"><div class="leftPane"></div><div class="rightPane"></div></div>');
            $(".leftPane", a).append($(".leftPane img", f));
            $(".rightPane", a).append($(".rightPane img", f));
            $(a).append('<div class="clear"></div>');
            var g = $('<div class="bottomRow"><div class="leftPane"></div><div class="rightPane"></div></div>');
            $(".leftPane", g).append($(".leftPane .text", f));
            $(".rightPane", g).append($(".rightPane .text", f));
            $(g).append('<div class="clear"></div>');
            var b = $('<div class="buttons"><div class="leftPane"></div><div class="rightPane"></div></div>');
            $(".leftPane", b).append($(".leftPane a", f));
            $(".rightPane", b).append($(".rightPane a", f));
            $(b).append('<div class="clear"></div>');
            $(f).html("");
            $(f).append(d);
            $(f).append(a);
            $(f).append(g);
            $(f).append(b)
        });
        if ($.trim($("#MasterHeader").html()) != "") {
            $("#MasterHeader").css("display", "block")
        }
    },
    applySIFR: function(){
        if ((typeof window.sIFR != "object") || (typeof window.sIFR.activate != "function")) {
            return
        }
        var a = $("#primaryNav .item").length;
        var b = 0;
        sIFR.replace(this.book, {
            selector: "#primaryNav .name",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: false,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:19px; font-style:italic; }", "a { color:#ad0e29; text-decoration:none; }", "a:link { color: #ad0e29; }", "a:hover { color: #ad0e29; }"],
            onReplacement: function(){
                if (++b >= a) {
                    $("#primaryNav").css("visibility", "visible")
                }
            }
        });
        sIFR.replace(this.book, {
            selector: "#companyClaim h3",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: false,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:19px; font-style:italic; color:#fffef6; }"]
        });
        sIFR.replace(this.book, {
            selector: "#applyDirectly h3",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:20px; font-style:italic; color:#ad0e29; }"]
        });
        sIFR.replace(this.book, {
            selector: ".applyDirectlyRed h3",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:20px; font-style:italic; color:#ffffff; }"]
        });
        sIFR.replace(this.book, {
            selector: ".quote h3",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:16px; font-style:italic; color:#727272; }"]
        });
        sIFR.replace(this.book, {
            selector: ".contactMapTeaser h3",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:20px; font-style:italic; color:#5f5f5f; }", "a { color:#5f5f5f; text-decoration:none; }", "a:link { color: #5f5f5f; }", "a:hover { color: #5f5f5f; }"]
        });
        sIFR.replace(this.book, {
            selector: ".contactMapPart h3",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:20px; font-style:italic; color:#ad0e29; }", "a { color:#ad0e29; text-decoration:none; }", "a:link { color: #ad0e29; }", "a:hover { color: #ad0e29; }"]
        });
        sIFR.replace(this.book, {
            selector: "h1",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:22px; font-style:italic; color:#5f5f5f; }"]
        });
        sIFR.replace(this.book, {
            selector: ".hotline .tel",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:20px; font-style:italic; color:#ad0e29; }"]
        });
        sIFR.replace(this.book, {
            selector: ".callToAction h3",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:22px; font-style:italic; color:#ad0e29; }"]
        });
        sIFR.replace(this.book, {
            selector: ".jobGroups h3",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:20px; font-style:italic; color:#5f5f5f; }"]
        });
        sIFR.replace(this.book, {
            selector: ".hotlineNumber",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:20px; font-style:italic; color:#ad0e29; }"]
        });
        sIFR.replace(this.book, {
            selector: ".sIFR-Rot20px",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:20px; font-style:italic; color:#ad0e29; }"]
        });
        sIFR.replace(this.book, {
            selector: ".sIFR-Grau20px",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:20px; font-style:italic; color:#5F5F5F; }"]
        });
        sIFR.replace(this.book, {
            selector: "h3:contains(Wussten Sie schon?)",
            wmode: "transparent",
            forceSingeLine: true,
            pixelFont: true,
            selectable: true,
            antiAliasType: "normal",
            css: [".sIFR-root { font-size:20px; font-style:italic; color:#ad0e29; }"]
        });
        sIFR.initialize()
    }
};
DIS.initSIFR();
$(document).ready(function(){
    DIS.init()
});
if (typeof deconcept == "undefined") {
    var deconcept = {}
}
if (typeof deconcept.util == "undefined") {
    deconcept.util = {}
}
if (typeof deconcept.SWFObjectUtil == "undefined") {
    deconcept.SWFObjectUtil = {}
}
deconcept.SWFObject = function(f, d, m, g, j, l, n, i, a, e){
    if (!document.getElementById) {
        return
    }
    this.DETECT_KEY = e ? e : "detectflash";
    this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
    this.params = {};
    this.variables = {};
    this.attributes = [];
    if (f) {
        this.setAttribute("swf", f)
    }
    if (d) {
        this.setAttribute("id", d)
    }
    if (m) {
        this.setAttribute("width", m)
    }
    if (g) {
        this.setAttribute("height", g)
    }
    if (j) {
        this.setAttribute("version", new deconcept.PlayerVersion(j.toString().split(".")))
    }
    this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
    if (!window.opera && document.all && this.installedVer.major > 7) {
        if (!deconcept.unloadSet) {
            deconcept.SWFObjectUtil.prepUnload = function(){
                __flash_unloadHandler = function(){
                };
                __flash_savedUnloadHandler = function(){
                };
                window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs)
            };
            window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
            deconcept.unloadSet = true
        }
    }
    if (l) {
        this.addParam("bgcolor", l)
    }
    var b = n ? n : "high";
    this.addParam("quality", b);
    this.setAttribute("useExpressInstall", false);
    this.setAttribute("doExpressInstall", false);
    var k = (i) ? i : window.location;
    this.setAttribute("xiRedirectUrl", k);
    this.setAttribute("redirectUrl", "");
    if (a) {
        this.setAttribute("redirectUrl", a)
    }
};
deconcept.SWFObject.prototype = {
    useExpressInstall: function(a){
        this.xiSWFPath = !a ? "expressinstall.swf" : a;
        this.setAttribute("useExpressInstall", true)
    },
    setAttribute: function(a, b){
        this.attributes[a] = b
    },
    getAttribute: function(a){
        return this.attributes[a] || ""
    },
    addParam: function(a, b){
        this.params[a] = b
    },
    getParams: function(){
        return this.params
    },
    addVariable: function(a, b){
        this.variables[a] = b
    },
    getVariable: function(a){
        return this.variables[a] || ""
    },
    getVariables: function(){
        return this.variables
    },
    getVariablePairs: function(){
        var a = [];
        var b;
        var c = this.getVariables();
        for (b in c) {
            a[a.length] = b + "=" + c[b]
        }
        return a
    },
    getSWFHTML: function(){
        var d = "";
        if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) {
            if (this.getAttribute("doExpressInstall")) {
                this.addVariable("MMplayerType", "PlugIn");
                this.setAttribute("swf", this.xiSWFPath)
            }
            d = '<embed type="application/x-shockwave-flash" src="' + this.getAttribute("swf") + '" width="' + this.getAttribute("width") + '" height="' + this.getAttribute("height") + '" style="' + (this.getAttribute("style") || "") + '"';
            d += ' id="' + this.getAttribute("id") + '" name="' + this.getAttribute("id") + '" ';
            var c = this.getParams();
            for (var a in c) {
                d += [a] + '="' + c[a] + '" '
            }
            var b = this.getVariablePairs().join("&");
            if (b.length > 0) {
                d += 'flashvars="' + b + '"'
            }
            d += "/>"
        }
        else {
            if (this.getAttribute("doExpressInstall")) {
                this.addVariable("MMplayerType", "ActiveX");
                this.setAttribute("swf", this.xiSWFPath)
            }
            d = '<object id="' + this.getAttribute("id") + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + this.getAttribute("width") + '" height="' + this.getAttribute("height") + '" style="' + (this.getAttribute("style") || "") + '">';
            d += '<param name="movie" value="' + this.getAttribute("swf") + '" />';
            var c = this.getParams();
            for (var a in c) {
                d += '<param name="' + a + '" value="' + c[a] + '" />'
            }
            var b = this.getVariablePairs().join("&");
            if (b.length > 0) {
                d += '<param name="flashvars" value="' + b + '" />'
            }
            d += "</object>"
        }
        return d
    },
    write: function(a){
        if (this.getAttribute("useExpressInstall")) {
            var b = new deconcept.PlayerVersion([6, 0, 65]);
            if (this.installedVer.versionIsValid(b) && !this.installedVer.versionIsValid(this.getAttribute("version"))) {
                this.setAttribute("doExpressInstall", true);
                this.addVariable("MMredirectURL", escape(this.getAttribute("xiRedirectUrl")));
                document.title = document.title.slice(0, 47) + " - Flash Player Installation";
                this.addVariable("MMdoctitle", document.title)
            }
        }
        if (this.skipDetect || this.getAttribute("doExpressInstall") || this.installedVer.versionIsValid(this.getAttribute("version"))) {
            var c = (typeof a == "string") ? document.getElementById(a) : a;
            c.innerHTML = this.getSWFHTML();
            return true
        }
        else {
            if (this.getAttribute("redirectUrl") != "") {
                document.location.replace(this.getAttribute("redirectUrl"))
            }
        }
        return false
    }
};
deconcept.SWFObjectUtil.getPlayerVersion = function(){
    var c = new deconcept.PlayerVersion([0, 0, 0]);
    if (navigator.plugins && navigator.mimeTypes.length) {
        var a = navigator.plugins["Shockwave Flash"];
        if (a && a.description) {
            c = new deconcept.PlayerVersion(a.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."))
        }
    }
    else {
        if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0) {
            var d = 1;
            var b = 3;
            while (d) {
                try {
                    b++;
                    d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + b);
                    c = new deconcept.PlayerVersion([b, 0, 0])
                } 
                catch (f) {
                    d = null
                }
            }
        }
        else {
            try {
                var d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")
            } 
            catch (f) {
                try {
                    var d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
                    c = new deconcept.PlayerVersion([6, 0, 21]);
                    d.AllowScriptAccess = "always"
                } 
                catch (f) {
                    if (c.major == 6) {
                        return c
                    }
                }
                try {
                    d = new ActiveXObject("ShockwaveFlash.ShockwaveFlash")
                } 
                catch (f) {
                }
            }
            if (d != null) {
                c = new deconcept.PlayerVersion(d.GetVariable("$version").split(" ")[1].split(","))
            }
        }
    }
    return c
};
deconcept.PlayerVersion = function(a){
    this.major = a[0] != null ? parseInt(a[0]) : 0;
    this.minor = a[1] != null ? parseInt(a[1]) : 0;
    this.rev = a[2] != null ? parseInt(a[2]) : 0
};
deconcept.PlayerVersion.prototype.versionIsValid = function(a){
    if (this.major < a.major) {
        return false
    }
    if (this.major > a.major) {
        return true
    }
    if (this.minor < a.minor) {
        return false
    }
    if (this.minor > a.minor) {
        return true
    }
    if (this.rev < a.rev) {
        return false
    }
    return true
};
deconcept.util = {
    getRequestParameter: function(d){
        var c = document.location.search || document.location.hash;
        if (d == null) {
            return c
        }
        if (c) {
            var b = c.substring(1).split("&");
            for (var a = 0; a < b.length; a++) {
                if (b[a].substring(0, b[a].indexOf("=")) == d) {
                    return b[a].substring((b[a].indexOf("=") + 1))
                }
            }
        }
        return ""
    }
};
deconcept.SWFObjectUtil.cleanupSWFs = function(){
    var c = document.getElementsByTagName("OBJECT");
    for (var b = c.length - 1; b >= 0; b--) {
        c[b].style.display = "none";
        for (var a in c[b]) {
            if (typeof c[b][a] == "function") {
                c[b][a] = function(){
                }
            }
        }
    }
};
if (!document.getElementById && document.all) {
    document.getElementById = function(a){
        return document.all[a]
    }
}
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject;
var SWFObject = deconcept.SWFObject;


