$(document).ready(function () { /** * Startseiten-Bühne * */ var numberStages = $('#stage2 .stageItem').length; $('#stage2 .stage2Flyout').each(function () { // initiales Aufklappen if($(this).parent().hasClass('active')) { $('#stage2Claim a').css("color", $(this).parent().children(".colorCode").text()); $('#stage2Claim a').text($(this).parent().children(".claim").text()); $('#stage2Claim a').attr("href", $(this).parent().children(".claim").attr("href")); $('#stage2Claim a').css({ opacity:1 }); if ($('#stage2 .stage2-bg img').css('display') === 'none') { $(this).parent().children('a.stage2TeaserLink').show(); } else { $(this).parent().css({ width: 980 - (numberStages - 1) * 54 }); } } $(this).click(function (event) { var clickedItem = this; event.preventDefault(); if ($(this).parent().hasClass("active")) { $(this).parent().removeClass("active"); $('#stage2Claim a').animate({ opacity:0 }, 600); if ($('#stage2 .stage2-bg img').css('display') === 'none') { $(this).parent().children('a.stage2TeaserLink').hide(); $('#stage2Claim a').text($('#stage2 .hpClaim').text()); $('#stage2Claim a').css("color", $('#stage2 .hpColorCode').text()); $('#stage2Claim a').attr("href", $('#stage2 .hpClaim').attr("href")); $('#stage2Claim a').animate({ opacity:1 }, 500); } else { $(this).parent().animate({ width:48 }, 600, function () { $('#stage2Claim a').text($('#stage2 .hpClaim').text()); $('#stage2Claim a').css("color", $('#stage2 .hpColorCode').text()); $('#stage2Claim a').attr("href", $('#stage2 .hpClaim').attr("href")); $('#stage2Claim a').animate({ opacity:1 }, 500); }); } } else { $('#stage2Claim a').animate({ opacity:0 }, 200); $("#stage2 .stage2Flyout").each(function () { if (clickedItem === this) { if ($('#stage2 .stage2-bg img').css('display') === 'none') { $(this).parent().addClass("active"); $(this).parent().children('a.stage2TeaserLink').show(); $('#stage2Claim a').css("color", $(this).parent().children(".colorCode").text()); $('#stage2Claim a').text($(this).parent().children(".claim").text()); $('#stage2Claim a').attr("href", $(this).parent().children(".claim").attr("href")); $('#stage2Claim a').animate({ opacity:1 }, 500); } else { $(this).parent().animate({ width:980 - (numberStages - 1) * 54 }, 600, "linear", function () { $(this).addClass("active"); $('#stage2Claim a').css("color", $(this).children(".colorCode").text()); $('#stage2Claim a').text($(this).children(".claim").text()); $('#stage2Claim a').attr("href", $(this).children(".claim").attr("href")); $('#stage2Claim a').animate({ opacity:1 }, 500); }); } } else { $(this).parent().removeClass("active"); if ($('#stage2 .stage2-bg img').css('display') === 'none') { $(this).parent().children('a.stage2TeaserLink').hide(); } else { $(this).parent().animate({ width:48 }, 600, "linear"); } } }); } }) }); /** * * SUCHE * */ $(".orderMultiSelect select").each(function () { var childrenGroup = {}; $(this).children('option').each(function () { if (!childrenGroup[$(this).text().charAt(0)]) { childrenGroup[$(this).text().charAt(0)] = []; } childrenGroup[$(this).text().charAt(0)].push($(this)); }); for (var child in childrenGroup) { if (childrenGroup.hasOwnProperty(child)) { var optgroup = $(''); for (var option in childrenGroup[child]) { if (childrenGroup[child].hasOwnProperty(option)) { optgroup.append(childrenGroup[child][option]); } } $(this).append(optgroup); } } }); if($("#searchResult").children().length > 0) { $('.advancedExpertSearchToggle').hide(); $('.advancedExpertSearchToggleControl .toggleOn').show(); $('.advancedExpertSearchToggleControl .toggleOff').hide(); } $('.advancedExpertSearchToggleControl .toggleOn a').click(function(event) { event.preventDefault(); $('.advancedExpertSearchToggle').slideDown(500); $(this).parent().hide(); $('.advancedExpertSearchToggleControl .toggleOff').show(); }); $('.advancedExpertSearchToggleControl .toggleOff a').click(function(event) { event.preventDefault(); $('.advancedExpertSearchToggle').slideUp(500); $(this).parent().hide(); $('.advancedExpertSearchToggleControl .toggleOn').show(); }); /** * * MOBILE * * */ // TODO: User-Agent-Abfrage rein nehmen um Auswirkungen auf "normale" Browsers zu verhindern // if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) { $('body div#wrapperBranding').before('
'); if ($('#css-check').css('display') == 'none') { //$('#css-check').remove(); if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { $('html').addClass('chrome'); } if (navigator.userAgent.toLowerCase().indexOf('opera') > -1) { $('html').addClass('opera'); } $('#navPrimary').css("display", 'block'); $('#navPrimary ul').addClass('primary-nav'); $('#navPrimary ul').before('